JP2010118898A - Clock circuit, and video processor - Google Patents

Clock circuit, and video processor Download PDF

Info

Publication number
JP2010118898A
JP2010118898A JP2008290718A JP2008290718A JP2010118898A JP 2010118898 A JP2010118898 A JP 2010118898A JP 2008290718 A JP2008290718 A JP 2008290718A JP 2008290718 A JP2008290718 A JP 2008290718A JP 2010118898 A JP2010118898 A JP 2010118898A
Authority
JP
Japan
Prior art keywords
clock
transport packet
timing
value
transport
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.)
Granted
Application number
JP2008290718A
Other languages
Japanese (ja)
Other versions
JP4904331B2 (en
Inventor
Toshihiro Takashima
稔弘 高島
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.)
Sumitomo Electric Industries Ltd
Sumitomo Electric Networks Inc
Original Assignee
Sumitomo Electric Industries Ltd
Sumitomo Electric Networks Inc
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 Sumitomo Electric Industries Ltd, Sumitomo Electric Networks Inc filed Critical Sumitomo Electric Industries Ltd
Priority to JP2008290718A priority Critical patent/JP4904331B2/en
Publication of JP2010118898A publication Critical patent/JP2010118898A/en
Application granted granted Critical
Publication of JP4904331B2 publication Critical patent/JP4904331B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 obtain a clock circuit capable of achieving timing adjustment processing based on time information, and clock generation processing based on clock adjustment values by one clock generation circuit. <P>SOLUTION: A first transport packet to which first time information is added, and a second transport packet to which second time information is added are inputted to a timing adjustment circuit 4 in this order. The timing adjustment circuit 4 inputs the first transport packet to a clock generation circuit 5 at first timing. Also, the timing adjustment circuit 4 obtains the differential value between the first time information and the second time information, and inputs the second transport packet to the clock generation circuit 5 at second timing, where time corresponding to the differential value passes from the first timing. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、クロック回路及び、それを備えた映像処理装置に関する。   The present invention relates to a clock circuit and a video processing apparatus including the clock circuit.

MPEG(Moving Picture Experts Group)2−TS(Transport Stream)を用いた通信プロトコルにおいて、送信側のエンコーダは、所定間隔のトランスポートパケット毎に、PCR(Program Clock Reference)を付加する。受信側のデコーダは、トランスポートパケット内に含まれるPCRを検出し、検出したPCRに基づいて、エンコーダのクロックを再生する。また、MPEG2−TSにおいては、通信速度の調整のために、無意味なトランスポートパケット(ヌルパケット)が、トランスポートストリーム内に含まれている。エンコーダでは、ヌルパケットを含むトランスポートストリームに対して、PCRを付加する。   In a communication protocol using MPEG (Moving Picture Experts Group) 2-TS (Transport Stream), an encoder on the transmission side adds a PCR (Program Clock Reference) for each transport packet at a predetermined interval. The decoder on the receiving side detects the PCR included in the transport packet and regenerates the encoder clock based on the detected PCR. In MPEG2-TS, meaningless transport packets (null packets) are included in the transport stream in order to adjust the communication speed. In the encoder, PCR is added to the transport stream including a null packet.

IP(Internet Protocol)ネットワークを経由した通信、例えばIP放送又はVOD(Video On Demand)サービス等においては、通信データ量の削減のために、ヌルパケットを削除した後にトランスポートストリームを送信することが望ましい。この場合には、PCRを含むトランスポートパケットの位置が、ヌルパケットの削除の前後で異なる。そのため、デコーダが受信するトランスポートストリームにおいても、PCRを含むトランスポートパケットの位置が、本来の位置(ヌルパケットが削除される前のトランスポートストリーム内における位置)とは異なっている。従って、デコーダは、検出したPCRのみによっては、エンコーダのクロックを正確に再生することができない。   In communication via an IP (Internet Protocol) network, such as IP broadcast or VOD (Video On Demand) service, it is desirable to transmit a transport stream after deleting null packets in order to reduce the amount of communication data. . In this case, the position of the transport packet including the PCR differs before and after the null packet is deleted. Therefore, also in the transport stream received by the decoder, the position of the transport packet including the PCR is different from the original position (position in the transport stream before the null packet is deleted). Therefore, the decoder cannot accurately reproduce the encoder clock only by the detected PCR.

下記特許文献1,2には、MPEG2−TSの各トランスポートパケットにタイムスタンプを付加することにより、MPEG2−TSをMPEG2−TTS(Time-stamped Transport Stream)に変換する技術が開示されている。エンコーダにおいてヌルパケットが削除された場合であっても、デコーダは、タイムスタンプに基づいて、PCRを含むトランスポートパケットの本来の位置を復元することができる。従って、デコーダは、本来の位置に復元されたトランスポートパケット内に含まれるPCRに基づいて、エンコーダのクロックを再生することが可能となる。   Patent Documents 1 and 2 below disclose techniques for converting MPEG2-TS into MPEG2-TTS (Time-stamped Transport Stream) by adding a time stamp to each MPEG2-TS transport packet. Even when the null packet is deleted in the encoder, the decoder can restore the original position of the transport packet including the PCR based on the time stamp. Therefore, the decoder can regenerate the encoder clock based on the PCR included in the transport packet restored to the original position.

図14は、MPEG2−TTSを扱うデコーダの構成の一部を抜き出して示すブロック図である。TTSデコーダ330は、クロック発生部334が発生する基準クロックに基づいて動作し、各TTSパケットに付加されているタイムスタンプに従って、TTSパケットバッファ332からTTSパケットを読み出して、TSパケットとしてMPEGデコーダ340に入力する。   FIG. 14 is a block diagram showing a part of the configuration of a decoder that handles MPEG2-TTS. The TTS decoder 330 operates based on the reference clock generated by the clock generation unit 334, reads the TTS packet from the TTS packet buffer 332 according to the time stamp added to each TTS packet, and sends it to the MPEG decoder 340 as a TS packet. input.

また、TTSデコーダ330は、以下のようにして基準クロックの周波数を調整する機能を有している。TTSパケットバッファ332には、その容量の半分程度のTTSパケットが貯められる(つまり占有量が1/2程度)。TTSデコーダ330は、TTSパケットバッファ332の占有量を監視し、その占有量が規定範囲を上回る場合には、基準クロックの周波数を上げる。これにより、TTSパケットバッファ332からTTSパケットが読み出されるペースが早くなる。一方、その占有量が規定範囲を下回る場合には、基準クロックの周波数を下げる。これにより、TTSパケットバッファ332からTTSパケットが読み出されるペースが遅くなる。   The TTS decoder 330 has a function of adjusting the frequency of the reference clock as follows. The TTS packet buffer 332 stores TTS packets that are about half of their capacity (that is, the occupation amount is about 1/2). The TTS decoder 330 monitors the occupation amount of the TTS packet buffer 332, and raises the frequency of the reference clock when the occupation amount exceeds the specified range. This speeds up the pace at which TTS packets are read from the TTS packet buffer 332. On the other hand, when the occupation amount falls below the specified range, the frequency of the reference clock is lowered. This slows down the pace at which TTS packets are read from the TTS packet buffer 332.

特開2008−35197号公報JP 2008-35197 A 特開2008−35198号公報JP 2008-35198 A

図14に示したデコーダによると、MPEGデコーダ340内に含まれているクロック発生回路とは別に、クロック発生部334を設ける必要がある。つまり、PCRに基づくクロックリカバリ用のクロック発生回路とは別に、TTS処理用のクロック発生回路を設ける必要がある。そのため、回路構成が複雑となり、装置の大型化及び製造コストの上昇を招く。   According to the decoder shown in FIG. 14, it is necessary to provide a clock generation unit 334 separately from the clock generation circuit included in the MPEG decoder 340. That is, it is necessary to provide a clock generation circuit for TTS processing separately from a clock generation circuit for clock recovery based on PCR. As a result, the circuit configuration becomes complicated, leading to an increase in the size of the device and an increase in manufacturing costs.

本発明はかかる事情に鑑みて成されたものであり、トランスポートパケットに付加されている時刻情報(タイムスタンプ)に基づくタイミング調整処理と、トランスポートパケット内に含まれているクロック調整値(PCR)に基づくクロック生成処理とを、一つのクロック発生回路を用いて実現することが可能な、クロック回路及びそれを備えた映像処理装置を得ることを目的とするものである。   The present invention has been made in view of such circumstances, and a timing adjustment process based on time information (time stamp) added to a transport packet, and a clock adjustment value (PCR) included in the transport packet. The clock generation processing based on (1) is realized by using a single clock generation circuit, and a clock circuit and a video processing apparatus including the clock circuit are provided.

本発明の第1の態様に係るクロック回路は、複数のトランスポートパケットのうちの一部のトランスポートパケットに含まれるクロック調整値に基づいて、周波数が調整されたクロックを生成する、クロック生成手段と、前記複数のトランスポートパケットを前記クロック生成手段に入力するタイミングを調整する、タイミング調整手段とを備え、前記タイミング調整手段には、第1の時刻情報が付加された第1のトランスポートパケットと、第2の時刻情報が付加された第2のトランスポートパケットとが、この順に入力され、前記タイミング調整手段は、前記第1のトランスポートパケットを第1のタイミングで前記クロック生成手段に入力し、前記第1の時刻情報と前記第2の時刻情報との第1の差分値を求め、前記第2のトランスポートパケットを、前記第1のタイミングから前記第1の差分値に応じた時間が経過した第2のタイミングで、前記クロック生成手段に入力することを特徴とするものである。   The clock circuit according to the first aspect of the present invention is configured to generate a clock whose frequency is adjusted based on a clock adjustment value included in a part of the plurality of transport packets. And a timing adjustment unit that adjusts a timing at which the plurality of transport packets are input to the clock generation unit, wherein the timing adjustment unit includes a first transport packet to which first time information is added. And the second transport packet to which the second time information is added are input in this order, and the timing adjustment unit inputs the first transport packet to the clock generation unit at a first timing. Then, a first difference value between the first time information and the second time information is obtained, and the second transporation is obtained. The door packet, at a second timing period in response to said first difference value from the first timing has elapsed, and is characterized in that the input to the clock generating means.

第1の態様に係るクロック回路によれば、タイミング調整手段は、第1の時刻情報と第2の時刻情報との第1の差分値を求め、第2のトランスポートパケットを、第1のタイミングから第1の差分値に応じた時間が経過した第2のタイミングで、クロック生成手段に入力する。つまり、第1の時刻情報と第2の時刻情報との第1の差分値を求め、その第1の差分値をカウンタを用いてカウントすることによって、クロック生成手段への第2のトランスポートパケットの入力タイミングを調整することができる。ここで、カウンタは、クロック生成手段によって生成されたクロックを用いて、カウント動作を実行することができる。従って、時刻情報に基づくタイミング調整処理と、クロック調整値に基づくクロック生成処理とを、クロック生成手段内の一つのクロック発生回路を用いて実現することが可能となる。   According to the clock circuit according to the first aspect, the timing adjustment unit obtains a first difference value between the first time information and the second time information, and the second transport packet is converted into the first timing. Is input to the clock generation means at the second timing when the time corresponding to the first difference value has elapsed. That is, the second transport packet to the clock generation means is obtained by obtaining the first difference value between the first time information and the second time information and counting the first difference value using the counter. The input timing can be adjusted. Here, the counter can perform a counting operation using the clock generated by the clock generation means. Therefore, the timing adjustment process based on the time information and the clock generation process based on the clock adjustment value can be realized by using one clock generation circuit in the clock generation unit.

本発明の第2の態様に係るクロック回路は、第1の態様に係るクロック回路において特に、前記タイミング調整手段は、前記複数のトランスポートパケットを一時的に記憶する記憶手段と、前記記憶手段内における前記複数のトランスポートパケットの記憶量を検出する検出手段とを有し、前記クロック生成手段は、前記クロック調整値と、前記検出手段による前記記憶量の検出結果とに基づいて、前記クロックの周波数を調整することを特徴とするものである。   The clock circuit according to a second aspect of the present invention is the clock circuit according to the first aspect, in particular, the timing adjustment means includes a storage means for temporarily storing the plurality of transport packets, Detecting means for detecting a storage amount of the plurality of transport packets in the clock, the clock generation means based on the clock adjustment value and the detection result of the storage amount by the detection means. The frequency is adjusted.

第2の態様に係るクロック回路によれば、検出手段は、記憶手段内における複数のトランスポートパケットの記憶量を検出する。そして、クロック生成手段は、クロック調整値のみならず、検出手段による記憶量の検出結果に基づいて、クロックの周波数を調整する。記憶手段の記憶量が増加傾向にある場合はクロックの周波数を上げ、記憶手段の記憶量が減少傾向にある場合はクロックの周波数を下げることにより、受信側のデコーダのクロックの周波数を、送信側のエンコーダのクロックの周波数に近付けることができる。その結果、クロック生成手段は、クロック調整値を用いて、クロックの周波数を確実に調整することが可能となる。   According to the clock circuit of the second aspect, the detection means detects the storage amount of a plurality of transport packets in the storage means. Then, the clock generation means adjusts the clock frequency based not only on the clock adjustment value but also on the detection result of the storage amount by the detection means. When the storage amount of the storage means is increasing, the clock frequency is increased, and when the storage amount of the storage means is decreasing, the clock frequency of the reception side decoder is decreased by decreasing the clock frequency. The frequency of the encoder clock can be approached. As a result, the clock generation means can reliably adjust the clock frequency using the clock adjustment value.

本発明の第3の態様に係るクロック回路は、第2の態様に係るクロック回路において特に、前記クロック生成手段は、前記クロック調整値及び前記記憶量の検出結果の少なくとも一方に対して重み付けを行うことを特徴とするものである。   The clock circuit according to a third aspect of the present invention is the clock circuit according to the second aspect, particularly, wherein the clock generation means weights at least one of the clock adjustment value and the detection result of the storage amount. It is characterized by this.

第3の態様に係るクロック回路によれば、クロック調整値及び記憶量の検出結果の少なくとも一方に重み付けを行うことにより、クロック調整値及び記憶量の検出結果がクロックの周波数の調整に与える影響の度合いを、所望に調整することが可能となる。   According to the clock circuit of the third aspect, by weighting at least one of the clock adjustment value and the storage amount detection result, the influence of the clock adjustment value and the storage amount detection result on the adjustment of the clock frequency is affected. The degree can be adjusted as desired.

本発明の第4の態様に係るクロック回路は、第1〜第3のいずれか一つの態様に係るクロック回路において特に、前記タイミング調整手段は、前記第1の差分値が異常値を示す場合には、前記第2のトランスポートパケットを、前記第1のタイミングから所定時間が経過した第3のタイミングで、前記クロック生成手段に入力することを特徴とするものである。   The clock circuit according to a fourth aspect of the present invention is the clock circuit according to any one of the first to third aspects, in particular, when the timing adjustment means has an abnormal value as the first difference value. Is characterized in that the second transport packet is input to the clock generation means at a third timing when a predetermined time has elapsed from the first timing.

第4の態様に係るクロック回路によれば、タイミング調整手段は、第1の差分値が異常値を示す場合には、第2のトランスポートパケットを、第1のタイミングから所定時間が経過した第3のタイミングで、クロック生成手段に入力する。これにより、何らかの原因によって第2の時刻情報が異常値を示す場合には、第1の差分値に関わらず、所定時間が経過した後に第2のトランスポートパケットをクロック生成手段に入力することができる。その結果、異常な時刻情報に起因してクロック回路の動作が停止する事態を回避することが可能となる。   According to the clock circuit of the fourth aspect, when the first difference value indicates an abnormal value, the timing adjustment unit sends the second transport packet to the second transport packet after a predetermined time has elapsed from the first timing. 3 is input to the clock generation means. Thus, when the second time information indicates an abnormal value for some reason, the second transport packet can be input to the clock generation unit after a predetermined time has elapsed regardless of the first difference value. it can. As a result, it is possible to avoid a situation where the operation of the clock circuit stops due to abnormal time information.

本発明の第5の態様に係るクロック回路は、第1〜第4のいずれか一つの態様に係るクロック回路において特に、前記タイミング調整手段には、前記第1のトランスポートパケットと前記第2のトランスポートパケットとの間に、第3の時刻情報が付加された第3のトランスポートパケットが入力され、前記タイミング調整手段は、前記第3のトランスポートパケットを、前記第1のトランスポートパケットに連続して前記クロック生成手段に入力することを特徴とするものである。   The clock circuit according to a fifth aspect of the present invention is the clock circuit according to any one of the first to fourth aspects, in particular, the timing adjustment means includes the first transport packet and the second transport packet. A third transport packet to which third time information is added is input between the transport packet, and the timing adjustment unit converts the third transport packet into the first transport packet. It is characterized in that it is continuously input to the clock generating means.

第5の態様に係るクロック回路によれば、タイミング調整手段は、第3のトランスポートパケットを、第1のトランスポートパケットに連続してクロック生成手段に入力する。つまり、第3のトランスポートパケットに関しては、直前の第1のトランスポートパケットとの間で時刻情報の差分値を求める処理が行われない。これにより、全てのトランスポートパケットに関して時刻情報の差分値を求める処理が行われる場合と比較して、処理の負荷を軽減することが可能となる。   According to the clock circuit according to the fifth aspect, the timing adjustment means inputs the third transport packet to the clock generation means in succession to the first transport packet. That is, regarding the third transport packet, the process for obtaining the difference value of the time information with respect to the immediately preceding first transport packet is not performed. As a result, the processing load can be reduced as compared with the case where the processing for obtaining the difference value of the time information is performed for all transport packets.

本発明の第6の態様に係るクロック回路は、第1〜第4のいずれか一つの態様に係るクロック回路において特に、前記タイミング調整手段には、前記第1のトランスポートパケットと前記第2のトランスポートパケットとの間に、第3の時刻情報が付加された第3のトランスポートパケットが入力され、前記第3のトランスポートパケットが、前記クロック調整値を含まないトランスポートパケットである場合には、前記タイミング調整手段は、前記第3のトランスポートパケットを、前記第1のトランスポートパケットに連続して前記クロック生成手段に入力し、前記第3のトランスポートパケットが、前記クロック調整値を含むトランスポートパケットである場合には、前記タイミング調整手段は、前記第1の時刻情報と前記第3の時刻情報との第2の差分値を求め、前記第3のトランスポートパケットを、前記第1のタイミングから前記第2の差分値に応じた時間が経過した第4のタイミングで、前記クロック生成手段に入力することを特徴とするものである。   The clock circuit according to a sixth aspect of the present invention is the clock circuit according to any one of the first to fourth aspects, in particular, the timing adjusting means includes the first transport packet and the second transport packet. When a third transport packet to which third time information is added is input between the transport packet and the third transport packet is a transport packet that does not include the clock adjustment value. The timing adjustment means inputs the third transport packet to the clock generation means in succession to the first transport packet, and the third transport packet receives the clock adjustment value. In the case of a transport packet including the timing packet, the timing adjustment means includes the first time information and the third time. A second difference value from the first information is obtained, and the third transport packet is sent to the clock generation means at a fourth timing when a time corresponding to the second difference value has elapsed from the first timing. It is characterized by inputting.

第6の態様に係るクロック回路によれば、タイミング調整手段は、第3のトランスポートパケットがクロック調整値を含まない場合には、第3のトランスポートパケットを、第1のトランスポートパケットに連続してクロック生成手段に入力する。つまり、第3のトランスポートパケットに関しては、直前の第1のトランスポートパケットとの間で時刻情報の差分値を求める処理が行われない。これにより、全てのトランスポートパケットに関して時刻情報の差分値を求める処理が行われる場合と比較して、処理の負荷を軽減することが可能となる。しかも、タイミング調整手段は、第3のトランスポートパケットがクロック調整値を含む場合には、第1の時刻情報と第3の時刻情報との第2の差分値を求め、第3のトランスポートパケットを、第1のタイミングから第2の差分値に応じた時間が経過した第4のタイミングで、クロック生成手段に入力する。これにより、クロック調整値を含むトランスポートパケットに関しては、時刻情報の差分値に応じた適切なタイミングで、クロック生成手段に入力することができる。その結果、クロック生成手段によるクロックの周波数の調整精度が低下する事態を回避することが可能となる。   According to the clock circuit of the sixth aspect, when the third transport packet does not include the clock adjustment value, the timing adjustment unit continues the third transport packet to the first transport packet. And input to the clock generation means. That is, regarding the third transport packet, the process for obtaining the difference value of the time information with respect to the immediately preceding first transport packet is not performed. As a result, the processing load can be reduced as compared with the case where the processing for obtaining the difference value of the time information is performed for all transport packets. In addition, when the third transport packet includes the clock adjustment value, the timing adjustment unit obtains a second difference value between the first time information and the third time information, and the third transport packet Is input to the clock generation means at the fourth timing when the time corresponding to the second difference value has elapsed from the first timing. Thereby, the transport packet including the clock adjustment value can be input to the clock generation means at an appropriate timing according to the difference value of the time information. As a result, it is possible to avoid a situation in which the accuracy of adjustment of the clock frequency by the clock generation means decreases.

本発明の第7の態様に係る映像処理装置は、第1〜第6のいずれか一つの態様に係るクロック回路と、前記クロック回路が生成するクロックに基づいて、トランスポートパケットのデコード処理を実行するデコード回路とを備えることを特徴とするものである。   A video processing device according to a seventh aspect of the present invention executes a transport packet decoding process based on a clock circuit according to any one of the first to sixth aspects and a clock generated by the clock circuit. And a decoding circuit.

第7の態様に係る映像処理装置によれば、クロック回路においては、時刻情報に基づくタイミング調整処理と、クロック調整値に基づくクロック生成処理とが、クロック生成手段内の一つのクロック発生回路を用いて実現されている。これにより、クロック回路の小型化が図られている。従って、小型化されたクロック回路を映像処理装置が備えることにより、映像処理装置の全体として、装置の小型化を図ることが可能となる。   According to the video processing device of the seventh aspect, in the clock circuit, the timing adjustment process based on the time information and the clock generation process based on the clock adjustment value use one clock generation circuit in the clock generation means. Has been realized. This reduces the size of the clock circuit. Accordingly, by providing the video processing device with a miniaturized clock circuit, the overall size of the video processing device can be reduced.

本発明によれば、トランスポートパケットに付加されている時刻情報に基づくタイミング調整処理と、トランスポートパケット内に含まれているクロック調整値に基づくクロック生成処理とを、一つのクロック発生回路を用いて実現することが可能となる。   According to the present invention, one clock generation circuit is used for timing adjustment processing based on time information added to a transport packet and clock generation processing based on a clock adjustment value included in the transport packet. Can be realized.

以下、本発明の実施の形態について、図面を用いて詳細に説明する。なお、異なる図面において同一の符号を付した要素は、同一又は相応する要素を示すものとする。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the element which attached | subjected the same code | symbol in different drawing shall show the same or corresponding element.

図1は、本発明の実施の形態に係る映像処理装置1の構成を簡略化して示すブロック図である。映像処理装置1は、例えば、IPネットワークを経由した通信(IP放送や、ストリーミング型又はダウンロード型のVODサービス等)において、送信側のエンコーダから送信された映像信号を受信するための受信装置(セットトップボックス)である。図1を参照して、映像処理装置1は、クロック回路2とデコード回路3とを備えている。クロック回路2は、タイミング調整回路4とクロック生成回路5とを有している。   FIG. 1 is a block diagram showing a simplified configuration of a video processing apparatus 1 according to an embodiment of the present invention. The video processing device 1 is, for example, a receiving device (set) for receiving a video signal transmitted from an encoder on the transmission side in communication via an IP network (IP broadcasting, streaming type or download type VOD service, etc.). Top box). Referring to FIG. 1, the video processing apparatus 1 includes a clock circuit 2 and a decode circuit 3. The clock circuit 2 includes a timing adjustment circuit 4 and a clock generation circuit 5.

図2は、タイミング調整回路4の構成を示すブロック図である。また、図3は、クロック生成回路5の構成を示すブロック図である。図2の接続関係で示すように、タイミング調整回路4は、バッファ21(記憶手段)、検出部22、ゲート23、抽出部24、レジスタ25、演算部26、及びダウンカウンタ27を有している。また、図3の接続関係で示すように、クロック生成回路5は、PCR検出部31、STC(System Time Clock)カウンタ32、減算器33、DAC(Digital to Analog Converter)34,38、LPF(Low Pass Filter)35,39、加算器36、及びVCO(Voltage Control Oscillator)37を有している。   FIG. 2 is a block diagram showing a configuration of the timing adjustment circuit 4. FIG. 3 is a block diagram showing the configuration of the clock generation circuit 5. As shown in the connection relationship of FIG. 2, the timing adjustment circuit 4 includes a buffer 21 (storage means), a detection unit 22, a gate 23, an extraction unit 24, a register 25, a calculation unit 26, and a down counter 27. . 3, the clock generation circuit 5 includes a PCR detection unit 31, an STC (System Time Clock) counter 32, a subtracter 33, DACs (Digital to Analog Converter) 34, 38, LPF (Low Pass Filters 35 and 39, an adder 36, and a VCO (Voltage Control Oscillator) 37.

図4は、映像処理装置1が受信するトランスポートストリームS1の一部を抜き出して示す図である。トランスポートストリームS1は、複数のトランスポートパケットTPを含む。図4では、説明の簡単化のため、この順に連続する8個のトランスポートパケットTP1〜TP8のみを示している。   FIG. 4 is a diagram showing a part of the transport stream S1 received by the video processing device 1. The transport stream S1 includes a plurality of transport packets TP. In FIG. 4, only eight transport packets TP <b> 1 to TP <b> 8 that are consecutive in this order are shown for simplicity of explanation.

図5,6は、トランスポートパケットTPの構造を示す図である。トランスポートパケットTPは、ヘッダ部PHとペイロード部PPとを有しており、これらの合計のデータ長は188バイトである。トランスポートパケットTPには、データ長が4バイトのタイムスタンプ(時刻情報)50が付加されている。また、所定間隔のトランスポートパケットTP毎に、ヘッダ部PHにPCR(クロック調整値)51が含まれている。図5にはPCR51を含むトランスポートパケットTPを示しており、図6にはPCR51を含まないトランスポートパケットTPを示している。タイムスタンプ50及びPCR51はいずれもカウンタ値であり、エンコーダ6において、27MHzの共通のクロックを用いたカウント動作によって生成されるが、通常は両者の値は互いに異なる。   5 and 6 are diagrams illustrating the structure of the transport packet TP. The transport packet TP has a header part PH and a payload part PP, and the total data length of these is 188 bytes. A time stamp (time information) 50 having a data length of 4 bytes is added to the transport packet TP. Further, a PCR (clock adjustment value) 51 is included in the header portion PH for each transport packet TP at a predetermined interval. FIG. 5 shows a transport packet TP including the PCR 51, and FIG. 6 shows a transport packet TP not including the PCR 51. Both the time stamp 50 and the PCR 51 are counter values, and are generated by a counting operation using a common clock of 27 MHz in the encoder 6, but usually both values are different from each other.

以下、映像処理装置1の動作について説明する。まず、タイミング調整回路4の動作について説明する。映像処理装置1は、エンコーダ6から送信されたMPEG2−TTSのトランスポートストリームS1を、IPネットワークを経由して受信する。そして、受信したトランスポートストリームS1を、バッファ21内に一時的に記憶する。図2を参照して、トランスポートストリームS1は、バッファ21から読み出されて、ゲート23に入力される。   Hereinafter, the operation of the video processing apparatus 1 will be described. First, the operation of the timing adjustment circuit 4 will be described. The video processing apparatus 1 receives the MPEG2-TTS transport stream S1 transmitted from the encoder 6 via the IP network. Then, the received transport stream S1 is temporarily stored in the buffer 21. Referring to FIG. 2, transport stream S <b> 1 is read from buffer 21 and input to gate 23.

図7は、ゲート23に入力されるトランスポートストリームS1と、ゲート23から出力されるトランスポートストリームS2との関係を示すタイミングチャートである。トランスポートストリームS1に関しては、トランスポートパケットTP1〜TP8がこの順にバッファ21から連続して読み出されて、ゲート23に入力される。   FIG. 7 is a timing chart showing the relationship between the transport stream S1 input to the gate 23 and the transport stream S2 output from the gate 23. Regarding the transport stream S1, transport packets TP1 to TP8 are successively read from the buffer 21 in this order and input to the gate 23.

まず、抽出部24は、バッファ21から読み出されたトランスポートストリームS1のうち、先頭のトランスポートパケットTP1に付加されているタイムスタンプ50の値(タイムスタンプ値ST(1))を抽出し、そのタイムスタンプ値ST(1)をレジスタ25に格納する。   First, the extraction unit 24 extracts the value of the time stamp 50 (time stamp value ST (1)) added to the first transport packet TP1 from the transport stream S1 read from the buffer 21, The time stamp value ST (1) is stored in the register 25.

次に、抽出部24は、トランスポートパケットTP1に続くトランスポートパケットTP2に付加されているタイムスタンプ50の値(タイムスタンプ値ST(2))を抽出し、そのタイムスタンプ値ST(2)をレジスタ25に格納するとともに、演算部26に入力する。この時、演算部26には、レジスタ25に格納されているタイムスタンプ値ST(1)も入力される。演算部26は、タイムスタンプ値ST(2)からタイムスタンプ値ST(1)を減算することにより、両者の差分値SW(2)をダウンカウンタ27に設定する。   Next, the extraction unit 24 extracts the value of the time stamp 50 (time stamp value ST (2)) added to the transport packet TP2 following the transport packet TP1, and uses the time stamp value ST (2). The data is stored in the register 25 and input to the calculation unit 26. At this time, the time stamp value ST (1) stored in the register 25 is also input to the calculation unit 26. The calculation unit 26 sets the difference value SW (2) between the two by subtracting the time stamp value ST (1) from the time stamp value ST (2).

ダウンカウンタ27への差分値SW(2)の設定が完了すると同時にゲート23がオープンすることにより、時刻T1において、クロック生成回路5へのトランスポートパケットTP1の入力が開始される。トランスポートパケットTP1がゲート23の通過を完了すると、ゲート23は再びクローズされる。なお、ゲート23を通過する際、トランスポートパケットTP1に付加されているタイムスタンプ50が削除されることにより、MPEG2−TTSからMPEG2−TSへの変換が行われる。   When the setting of the difference value SW (2) to the down counter 27 is completed and the gate 23 is opened simultaneously, the input of the transport packet TP1 to the clock generation circuit 5 is started at time T1. When the transport packet TP1 completes passing through the gate 23, the gate 23 is closed again. When passing through the gate 23, the time stamp 50 added to the transport packet TP1 is deleted, whereby conversion from MPEG2-TTS to MPEG2-TS is performed.

ダウンカウンタ27には、VCO37から出力されたクロックS4が入力されている。ダウンカウンタ27は、クロックS4が入力される毎に、ダウンカウンタ27の設定値を「1」ずつデクリメントする。そして、差分値SW(2)に対応するダウンカウンタ27の設定値がゼロになると同時に、ゲート23をオープンするための制御信号SOをゲート23に入力する。ゲート23がオープンすることにより、時刻T2において、クロック生成回路5へのトランスポートパケットTP2の入力が開始される。トランスポートパケットTP2がゲート23の通過を完了すると、ゲート23は再びクローズされる。なお、上記と同様に、ゲート23を通過する際、トランスポートパケットTP2に付加されているタイムスタンプ50が削除される。   The down counter 27 receives the clock S4 output from the VCO 37. The down counter 27 decrements the set value of the down counter 27 by “1” every time the clock S4 is input. Then, at the same time as the set value of the down counter 27 corresponding to the difference value SW (2) becomes zero, a control signal SO for opening the gate 23 is input to the gate 23. By opening the gate 23, input of the transport packet TP2 to the clock generation circuit 5 is started at time T2. When the transport packet TP2 completes passing through the gate 23, the gate 23 is closed again. Similarly to the above, when passing through the gate 23, the time stamp 50 added to the transport packet TP2 is deleted.

また、抽出部24は、トランスポートパケットTP2に続くトランスポートパケットTP3に付加されているタイムスタンプ50の値(タイムスタンプ値ST(3))を抽出し、そのタイムスタンプ値ST(3)をレジスタ25に格納するとともに、演算部26に入力する。この時、演算部26には、レジスタ25に格納されているタイムスタンプ値ST(2)も入力される。演算部26は、タイムスタンプ値ST(3)からタイムスタンプ値ST(2)を減算する。そして、差分値SW(2)に対応するダウンカウンタ27の設定値がデクリメントによってゼロになると同時に、差分値SW(3)をダウンカウンタ27に設定する。   Further, the extraction unit 24 extracts the value of the time stamp 50 (time stamp value ST (3)) added to the transport packet TP3 following the transport packet TP2, and registers the time stamp value ST (3). 25 and input to the calculation unit 26. At this time, the time stamp value ST (2) stored in the register 25 is also input to the arithmetic unit 26. The computing unit 26 subtracts the time stamp value ST (2) from the time stamp value ST (3). Then, the set value of the down counter 27 corresponding to the difference value SW (2) becomes zero by decrement, and at the same time, the difference value SW (3) is set in the down counter 27.

上記と同様に、ダウンカウンタ27は、クロックS4が入力される毎に、ダウンカウンタ27の設定値を「1」ずつデクリメントする。そして、差分値SW(3)に対応するダウンカウンタ27の設定値がゼロになると同時に、ゲート23をオープンするための制御信号SOをゲート23に入力する。ゲート23がオープンすることにより、時刻T3において、クロック生成回路5へのトランスポートパケットTP3の入力が開始される。トランスポートパケットTP3がゲート23の通過を完了すると、ゲート23は再びクローズされる。なお、上記と同様に、ゲート23を通過する際、トランスポートパケットTP3に付加されているタイムスタンプ50が削除される。   Similarly to the above, every time the clock S4 is input, the down counter 27 decrements the set value of the down counter 27 by “1”. Then, at the same time as the set value of the down counter 27 corresponding to the difference value SW (3) becomes zero, the control signal SO for opening the gate 23 is input to the gate 23. When the gate 23 is opened, input of the transport packet TP3 to the clock generation circuit 5 is started at time T3. When the transport packet TP3 completes passing through the gate 23, the gate 23 is closed again. As described above, when passing through the gate 23, the time stamp 50 added to the transport packet TP3 is deleted.

トランスポートパケットTP4以降についても上記と同様の動作が繰り返され、タイミング調整回路4からクロック生成回路5にトランスポートストリームS2が入力される。   The same operation as described above is repeated for the transport packets TP4 and subsequent ones, and the transport stream S2 is input from the timing adjustment circuit 4 to the clock generation circuit 5.

図7を参照して、トランスポートストリームS2に関して、例えば、トランスポートパケットTP2は、トランスポートパケットTP1に連続してクロック生成回路5に入力されている。これは、エンコーダ6において、トランスポートパケットTP1とトランスポートパケットTP2との間に、ヌルパケットが存在していなかったことに起因する。なお、厳密には、トランスポートパケットTP1の末尾とトランスポートパケットTP2の先頭との間には、ゲート23において削除されたタイムスタンプ50に相当する4バイト分の間隔が存在しているが、図7ではその間隔を無視して図示している。   Referring to FIG. 7, for transport stream S2, for example, transport packet TP2 is input to clock generation circuit 5 in succession to transport packet TP1. This is because the encoder 6 does not have a null packet between the transport packet TP1 and the transport packet TP2. Strictly speaking, an interval of 4 bytes corresponding to the time stamp 50 deleted in the gate 23 exists between the end of the transport packet TP1 and the start of the transport packet TP2. In FIG. 7, the interval is ignored.

また例えば、トランスポートパケットTP3は、トランスポートパケットTP2から遅延してクロック生成回路5に入力されている。遅延量は、先頭同士の比較で、トランスポートパケットTPの2個分に相当する時間WT1である。これは、エンコーダ6において、トランスポートパケットTP2とトランスポートパケットTP3との間に存在していた1個のヌルパケットが削除されたことに起因する。   For example, the transport packet TP3 is input to the clock generation circuit 5 with a delay from the transport packet TP2. The delay amount is a time WT1 corresponding to two transport packets TP in comparison between the heads. This is because the encoder 6 has deleted one null packet that existed between the transport packet TP2 and the transport packet TP3.

また例えば、トランスポートパケットTP6は、トランスポートパケットTP5から遅延してクロック生成回路5に入力されている。遅延量は、先頭同士の比較で、トランスポートパケットTPの3個分に相当する時間WT2である。これは、エンコーダ6において、トランスポートパケットTP5とトランスポートパケットTP6との間に存在していた2個のヌルパケットが削除されたことに起因する。   For example, the transport packet TP6 is input to the clock generation circuit 5 with a delay from the transport packet TP5. The delay amount is a time WT2 corresponding to three transport packets TP in comparison between the heads. This is because the encoder 6 has deleted two null packets that existed between the transport packet TP5 and the transport packet TP6.

以上の動作を一般化すると、タイミング調整回路4は、トランスポートパケットTP(N)に関するタイムスタンプ値ST(N)と、直前のトランスポートパケットTP(N−1)に関するタイムスタンプ値ST(N−1)との差分値SW(N)を求める。そして、クロック生成回路5へのトランスポートパケットTP(N−1)の入力を開始したタイミングから、差分値SW(N)に応じた時間が経過したタイミングで、クロック生成回路5へのトランスポートパケットTP(N)の入力を開始する。このようにして、タイミング調整回路4は、複数のトランスポートパケットTPをクロック生成回路5に入力するタイミングを調整する。   When the above operation is generalized, the timing adjustment circuit 4 has a time stamp value ST (N) related to the transport packet TP (N) and a time stamp value ST (N−) related to the immediately preceding transport packet TP (N−1). A difference value SW (N) from 1) is obtained. Then, the transport packet to the clock generation circuit 5 is transmitted at the timing when the time corresponding to the difference value SW (N) has elapsed from the start of the input of the transport packet TP (N−1) to the clock generation circuit 5. Start inputting TP (N). In this way, the timing adjustment circuit 4 adjusts the timing at which the plurality of transport packets TP are input to the clock generation circuit 5.

次に、クロック生成回路5の動作について説明する。タイミング調整回路4からクロック生成回路5に入力された複数のトランスポートパケットTP1〜TP8のうちの、一部のトランスポートパケットTPには、そのヘッダ部PHにPCR51が含まれている(図5参照)。ここでは、一例として、トランスポートパケットTP1,TP7に、PCR51が含まれているものとする。   Next, the operation of the clock generation circuit 5 will be described. Among the plurality of transport packets TP1 to TP8 input from the timing adjustment circuit 4 to the clock generation circuit 5, some transport packets TP include the PCR 51 in the header portion PH (see FIG. 5). ). Here, as an example, it is assumed that PCR 51 is included in transport packets TP1 and TP7.

図3を参照して、PCR検出部31は、まず、PCR51を含む最初のトランスポートパケットTPであるトランスポートパケットTP1に含まれているPCR51の値(PCR値)を検出し、そのPCR値をSTCカウンタ32に設定する。STCカウンタ32には、VCO37から出力されたクロックS4が入力されている。STCカウンタ32は、クロックS4が入力される毎に、STCカウンタ32の値を「1」ずつインクリメントする。   Referring to FIG. 3, the PCR detection unit 31 first detects the value of the PCR 51 (PCR value) included in the transport packet TP1, which is the first transport packet TP including the PCR 51, and the PCR value is detected. The STC counter 32 is set. The clock S4 output from the VCO 37 is input to the STC counter 32. The STC counter 32 increments the value of the STC counter 32 by “1” every time the clock S4 is input.

PCR検出部31は、次に、トランスポートパケットTP7に含まれているPCR値を検出し、そのPCR値を信号S31として減算器33に入力する。この時、減算器33には、STCカウンタ32の現在値が信号S32として入力されている。減算器33は、信号S31の値から信号S32の値を減算し、その減算結果を信号S33として出力する。DAC34は、ディジタル信号である信号S33をアナログ信号である信号S34に変換して出力する。信号S33の値がゼロである場合は、DAC34からは、例えば1Vの信号S34が出力される。信号S33の値がプラスの値である場合は、DAC34からは、その値に応じて1V超の電圧の信号S34が出力される。信号S33の値がマイナスの値である場合は、DAC34からは、その値に応じて1V未満の電圧の信号S34が出力される。LPF35は、信号S34に対してローパスフィルタ処理を施すことにより、信号S35を出力する。これにより、微小時間内における電圧値の変動が平均化される。信号S35は、加算器36に入力される。   Next, the PCR detection unit 31 detects the PCR value included in the transport packet TP7 and inputs the PCR value to the subtracter 33 as a signal S31. At this time, the current value of the STC counter 32 is input to the subtracter 33 as the signal S32. The subtracter 33 subtracts the value of the signal S32 from the value of the signal S31 and outputs the subtraction result as the signal S33. The DAC 34 converts the signal S33, which is a digital signal, into a signal S34, which is an analog signal, and outputs the signal S34. When the value of the signal S33 is zero, the DAC 34 outputs, for example, a 1V signal S34. When the value of the signal S33 is a positive value, the DAC 34 outputs a signal S34 having a voltage exceeding 1V according to the value. When the value of the signal S33 is a negative value, the DAC 34 outputs a signal S34 having a voltage of less than 1V according to the value. The LPF 35 outputs a signal S35 by performing a low pass filter process on the signal S34. Thereby, the fluctuation | variation of the voltage value in minute time is averaged. The signal S35 is input to the adder 36.

図2を参照して、検出部22は、バッファ21内に現在記憶されている複数のトランスポートパケットTPの合計データ量を検出する。合計データ量として、予め所定の基準値(例えばバッファ21の記憶容量の1/2)が設定されている。検出部22は、その基準値と現在の合計データ量との差に応じた信号S3を出力する。図3を参照して、DAC38は、ディジタル信号である信号S3をアナログ信号である信号S38に変換して出力する。基準値と合計データ量との差がゼロである場合は、DAC38からは、例えば1Vの信号S38が出力される。その差がプラスの値である場合は、DAC38からは、その値に応じて1V超の信号S38が出力される。その差がマイナスの値である場合は、DAC38からは、その値に応じて1V未満の信号S38が出力される。LPF39は、信号S38に対してローパスフィルタ処理を施すことにより、信号S39を出力する。これにより、微小時間内における電圧値の変動が平均化される。信号S39は、加算器36に入力される。   With reference to FIG. 2, the detection unit 22 detects the total data amount of a plurality of transport packets TP currently stored in the buffer 21. A predetermined reference value (for example, ½ of the storage capacity of the buffer 21) is set in advance as the total data amount. The detection unit 22 outputs a signal S3 corresponding to the difference between the reference value and the current total data amount. Referring to FIG. 3, DAC 38 converts signal S3, which is a digital signal, into signal S38, which is an analog signal, and outputs the signal S38. When the difference between the reference value and the total data amount is zero, the DAC 38 outputs a signal S38 of 1 V, for example. When the difference is a positive value, the DAC 38 outputs a signal S38 exceeding 1 V in accordance with the value. When the difference is a negative value, the DAC 38 outputs a signal S38 of less than 1 V according to the value. The LPF 39 outputs a signal S39 by performing a low-pass filter process on the signal S38. Thereby, the fluctuation | variation of the voltage value in minute time is averaged. The signal S39 is input to the adder 36.

加算器36は、信号S35と信号S39とを加算し、その加算結果を信号S36として出力する。VCO37は、信号S36で示されるアナログ電圧値に基づいて周波数が調整されたクロックS4を生成して出力する。VCO37は、例えば、信号S36の値が2Vである場合は27MHzのクロックS4を出力し、信号S36の値が2V超である場合は、その値に応じて27MHz超のクロックS4を出力し、信号S36の値が2V未満である場合は、その値に応じて27MHz未満のクロックS4を出力する。クロックS4は、STCカウンタ32及びダウンカウンタ27に入力される。また、図1を参照して、クロックS4は、デコード回路3に入力される。   The adder 36 adds the signal S35 and the signal S39, and outputs the addition result as a signal S36. The VCO 37 generates and outputs a clock S4 whose frequency is adjusted based on the analog voltage value indicated by the signal S36. For example, when the value of the signal S36 is 2V, the VCO 37 outputs a clock S4 of 27 MHz, and when the value of the signal S36 is more than 2V, the VCO 37 outputs a clock S4 of more than 27 MHz according to the value. When the value of S36 is less than 2V, the clock S4 of less than 27 MHz is output according to the value. The clock S4 is input to the STC counter 32 and the down counter 27. Referring to FIG. 1, clock S4 is input to decoding circuit 3.

図1を参照して、デコード回路3には、クロック生成回路5から、トランスポートストリームS2及びクロックS4が入力される。デコード回路3は、クロックS4に基づいて動作し、トランスポートストリームS2に対してデコード処理を実行することにより、映像信号S5を出力する。映像信号S5は、映像処理装置1に接続されている表示装置7に入力される。   With reference to FIG. 1, a transport stream S <b> 2 and a clock S <b> 4 are input to the decode circuit 3 from the clock generation circuit 5. The decoding circuit 3 operates based on the clock S4, and outputs a video signal S5 by executing a decoding process on the transport stream S2. The video signal S5 is input to the display device 7 connected to the video processing device 1.

このように本実施の形態に係るクロック回路2によれば、タイミング調整回路4は、トランスポートパケットTP(N)に関するタイムスタンプ値ST(N)と、直前のトランスポートパケットTP(N−1)に関するタイムスタンプ値ST(N−1)との差分値SW(N)を求める。そして、クロック生成回路5へのトランスポートパケットTP(N−1)の入力を開始したタイミングから、差分値SW(N)に応じた時間が経過したタイミングで、クロック生成回路5へのトランスポートパケットTP(N)の入力を開始する。つまり、タイムスタンプ値ST(N)とタイムスタンプ値ST(N−1)との差分値SW(N)を求め、その差分値SW(N)をダウンカウンタ27を用いてカウントすることによって、クロック生成回路5へのトランスポートパケットTP(N)の入力タイミングを調整する。ここで、ダウンカウンタ27は、クロック生成回路5によって生成されたクロックS4を用いて、カウント動作を実行する。従って、タイムスタンプ50に基づくタイミング調整処理と、PCRに基づくクロック生成処理とを、クロック生成回路5内の一つのVCO37を用いて実現することが可能となる。その結果、クロック回路2の小型化を図ることができ、また、小型化されたクロック回路2を映像処理装置1が備えることにより、映像処理装置1の全体として、装置の小型化を図ることが可能となる。   As described above, according to the clock circuit 2 according to the present embodiment, the timing adjustment circuit 4 includes the time stamp value ST (N) related to the transport packet TP (N) and the immediately preceding transport packet TP (N−1). A difference value SW (N) with respect to the time stamp value ST (N−1) is obtained. Then, the transport packet to the clock generation circuit 5 is transmitted at the timing when the time corresponding to the difference value SW (N) has elapsed from the start of the input of the transport packet TP (N−1) to the clock generation circuit 5. Start inputting TP (N). That is, the difference value SW (N) between the time stamp value ST (N) and the time stamp value ST (N−1) is obtained, and the difference value SW (N) is counted by using the down counter 27, whereby the clock. The input timing of the transport packet TP (N) to the generation circuit 5 is adjusted. Here, the down counter 27 performs a count operation using the clock S4 generated by the clock generation circuit 5. Therefore, the timing adjustment process based on the time stamp 50 and the clock generation process based on the PCR can be realized by using one VCO 37 in the clock generation circuit 5. As a result, the clock circuit 2 can be reduced in size, and the video processing apparatus 1 can be reduced in size as a whole by providing the reduced-size clock circuit 2 in the video processing apparatus 1. It becomes possible.

また、本実施の形態に係るクロック回路2によれば、検出部22は、バッファ21内における複数のトランスポートパケットTPの記憶量(合計データ量)を検出する。そして、クロック生成回路5は、PCRのみならず、検出部22による記憶量の検出結果(信号S3)に基づいて、クロックS4の周波数を調整する。つまり、バッファ21の記憶量が増加傾向にある場合はクロックS4の周波数を上げ、バッファ21の記憶量が減少傾向にある場合はクロックS4の周波数を下げることにより、受信側のデコーダのクロックS4の周波数を、送信側のエンコーダ6のクロックの周波数に近付ける。その結果、クロック生成回路5は、PCRを用いて、クロックS4の周波数を確実に調整することが可能となる。   Further, according to the clock circuit 2 according to the present embodiment, the detection unit 22 detects the storage amount (total data amount) of the plurality of transport packets TP in the buffer 21. Then, the clock generation circuit 5 adjusts the frequency of the clock S4 based not only on the PCR but also on the detection result (signal S3) of the storage amount by the detection unit 22. That is, when the storage amount of the buffer 21 tends to increase, the frequency of the clock S4 is increased, and when the storage amount of the buffer 21 tends to decrease, the frequency of the clock S4 is decreased to thereby reduce the clock S4 of the receiving side decoder. The frequency is brought close to the frequency of the clock of the encoder 6 on the transmission side. As a result, the clock generation circuit 5 can reliably adjust the frequency of the clock S4 using PCR.

<第1の変形例>
図8は、第1の変形例に係るタイミング調整回路4の構成を示すブロック図である。図2に示した構成に対して、比較部40が追加されている。比較部40には、演算部26から差分値SW(N)が入力される。また、比較部40には、差分値SW(N)に関する所定のしきい値が予め教示されている。比較部40は、そのしきい値と差分値SW(N)とを比較する。そして、差分値SW(N)がしきい値よりも大きい場合には、ダウンカウンタ27によるカウント動作に関わらず、クロック生成回路5へのトランスポートパケットTP(N−1)の入力が開始されてから、予め設定された所定時間WT0が経過した後に、ゲート23をオープンさせるための制御信号S40をゲート23に入力する。これにより、クロック生成回路5へのトランスポートパケットTP(N−1)の入力が開始されてから、所定時間WT0が経過した後に、クロック生成回路5へのトランスポートパケットTP(N)の入力が開始される。
<First Modification>
FIG. 8 is a block diagram showing a configuration of the timing adjustment circuit 4 according to the first modification. A comparison unit 40 is added to the configuration shown in FIG. The comparison unit 40 receives the difference value SW (N) from the calculation unit 26. Further, the comparison unit 40 is taught in advance a predetermined threshold value regarding the difference value SW (N). The comparison unit 40 compares the threshold value with the difference value SW (N). When the difference value SW (N) is larger than the threshold value, the transport packet TP (N−1) is input to the clock generation circuit 5 regardless of the count operation by the down counter 27. After that, after a predetermined time WT0 set in advance, a control signal S40 for opening the gate 23 is input to the gate 23. Thereby, after the input of the transport packet TP (N−1) to the clock generation circuit 5 is started, the transport packet TP (N) is input to the clock generation circuit 5 after a predetermined time WT0 has elapsed. Be started.

図9は、ゲート23に入力されるトランスポートストリームS1と、ゲート23から出力されるトランスポートストリームS2との関係を示すタイミングチャートである。ここでは、図7に示した例において、トランスポートパケットTP3に関する差分値SW(3)(つまりタイムスタンプ値ST(3)とタイムスタンプ値ST(2)との差)が、上記のしきい値よりも大きい場合の例を示している。また、図9の例では、所定時間WT0は、トランスポートパケットTPのデータ長(188バイト)に相当する時間に設定されている。   FIG. 9 is a timing chart showing the relationship between the transport stream S1 input to the gate 23 and the transport stream S2 output from the gate 23. Here, in the example shown in FIG. 7, the difference value SW (3) relating to the transport packet TP3 (that is, the difference between the time stamp value ST (3) and the time stamp value ST (2)) is the above threshold value. The example in the case of larger than is shown. In the example of FIG. 9, the predetermined time WT0 is set to a time corresponding to the data length (188 bytes) of the transport packet TP.

差分値SW(3)がしきい値よりも大きいため、比較部40は、ダウンカウンタ27によるカウント動作に関わらず、時刻T2から所定時間WT0が経過した時刻T4において、ゲート23をオープンさせるための制御信号S40をゲート23に入力する。その結果、トランスポートパケットTP3は、トランスポートパケットTP2に連続して、クロック生成回路5に入力される。   Since the difference value SW (3) is larger than the threshold value, the comparison unit 40 opens the gate 23 at the time T4 when the predetermined time WT0 has elapsed from the time T2, regardless of the counting operation by the down counter 27. The control signal S40 is input to the gate 23. As a result, the transport packet TP3 is input to the clock generation circuit 5 in succession to the transport packet TP2.

なお、ダウンカウンタ27には、時刻T4において、トランスポートパケットTP4に関する差分値SW(4)が設定され、以降の動作は上記実施の形態と同様である。   The down counter 27 is set with the difference value SW (4) related to the transport packet TP4 at time T4, and the subsequent operation is the same as that in the above embodiment.

また、所定時間WT0は、トランスポートパケットTPのデータ長(188バイト)に相当する時間に限定されず、それ以外の時間であっても良い。   Further, the predetermined time WT0 is not limited to the time corresponding to the data length (188 bytes) of the transport packet TP, and may be other time.

また、比較部40は、差分値SW(N)がしきい値よりも大きい場合のみならず、差分値SW(N)がマイナスの値である場合にも、上記と同様の処理を行っても良い。   The comparison unit 40 may perform the same processing as described above not only when the difference value SW (N) is larger than the threshold value but also when the difference value SW (N) is a negative value. good.

第1の変形例に係るクロック回路2によれば、タイミング調整回路4は、差分値SW(N)が所定のしきい値を超える場合(又はマイナスの値である場合)には、クロック生成回路5へのトランスポートパケットTP(N−1)の入力が開始されてから、所定時間WT0が経過した後に、クロック生成回路5へのトランスポートパケットTP(N)の入力を開始する。これにより、何らかの原因によってタイムスタンプ値ST(N)が異常値を示す場合には、差分値SW(N)に関わらず、所定時間WT0が経過した後にトランスポートパケットTP(N)をクロック生成回路5に入力することができる。その結果、異常なタイムスタンプに起因してクロック回路2の動作が停止する事態を回避することが可能となる。   According to the clock circuit 2 according to the first modification, the timing adjustment circuit 4 includes the clock generation circuit when the difference value SW (N) exceeds a predetermined threshold value (or a negative value). After the input of the transport packet TP (N−1) to 5 is started, the input of the transport packet TP (N) to the clock generation circuit 5 is started after a predetermined time WT0 has elapsed. As a result, when the time stamp value ST (N) indicates an abnormal value for some reason, the transport packet TP (N) is transferred to the clock generation circuit after the predetermined time WT0 has elapsed, regardless of the difference value SW (N). 5 can be entered. As a result, it is possible to avoid a situation where the operation of the clock circuit 2 stops due to an abnormal time stamp.

なお、第1の変形例は、後述する第2又は第3の変形例と組み合わせて適用することも可能である。   The first modification can also be applied in combination with the second or third modification described later.

<第2の変形例>
図10は、第2の変形例に係るタイミング調整回路4の構成を示すブロック図である。図2に示した構成に対して、検出部70が追加されている。検出部70は、バッファ21からゲート23に入力されるトランスポートパケットTPを検出し、その個数をカウントする。
<Second Modification>
FIG. 10 is a block diagram showing a configuration of the timing adjustment circuit 4 according to the second modification. A detection unit 70 is added to the configuration shown in FIG. The detection unit 70 detects the transport packet TP input from the buffer 21 to the gate 23 and counts the number thereof.

上記実施の形態では、演算部26は、各トランスポートパケットTP(N)毎に差分値SW(N)を求め、各トランスポートパケットTP(N)毎にゲート23の通過を制御した。これに対して、第2の変形例では、演算部26は、複数個(以下の例では4個)のトランスポートパケットTP(N)毎に差分値SW(N)を求め、4個のトランスポートパケットTP(N)毎にゲート23の通過を制御する。   In the above embodiment, the calculation unit 26 obtains the difference value SW (N) for each transport packet TP (N) and controls the passage of the gate 23 for each transport packet TP (N). On the other hand, in the second modification, the calculation unit 26 obtains a difference value SW (N) for each of a plurality (four in the following example) of transport packets TP (N), and four transformers The passage of the gate 23 is controlled for each port packet TP (N).

図11は、ゲート23から出力されるトランスポートストリームS2を示すタイミングチャートである。上記実施の形態と同様に、トランスポートパケットTP1〜TP8は、バッファ21からこの順に連続して読み出されて、ゲート23に入力される。   FIG. 11 is a timing chart showing the transport stream S2 output from the gate 23. Similar to the above embodiment, the transport packets TP1 to TP8 are successively read from the buffer 21 in this order and input to the gate 23.

検出部70がトランスポートパケットTP1を検出すると、抽出部24は、検出部70から入力された制御信号S70に基づき、トランスポートパケットTP1に付加されているタイムスタンプ50の値(タイムスタンプ値ST(1))を抽出する。そして、抽出部24は、そのタイムスタンプ値ST(1)をレジスタ25に格納する。その後に検出部70がトランスポートパケットTP2〜TP4を検出しても、検出部70から抽出部24に制御信号S70が入力されず、抽出部24は、タイムスタンプ値ST(2)〜ST(4)の抽出を行わない。   When the detection unit 70 detects the transport packet TP1, the extraction unit 24, based on the control signal S70 input from the detection unit 70, the value of the time stamp 50 added to the transport packet TP1 (time stamp value ST ( 1)) is extracted. Then, the extraction unit 24 stores the time stamp value ST (1) in the register 25. Even if the detection unit 70 subsequently detects the transport packets TP2 to TP4, the control signal S70 is not input from the detection unit 70 to the extraction unit 24, and the extraction unit 24 detects the time stamp values ST (2) to ST (4 ) Is not extracted.

次に、検出部70がトランスポートパケットTP5を検出すると、抽出部24は、検出部70から入力された制御信号S70に基づき、トランスポートパケットTP5に付加されているタイムスタンプ50の値(タイムスタンプ値ST(5))を抽出する。そして、抽出部24は、そのタイムスタンプ値ST(5)をレジスタ25に格納するとともに、演算部26に入力する。また、演算部26は、検出部70から入力された制御信号S70に基づき、レジスタ25に格納されているタイムスタンプ値ST(1)を読み出す。そして、演算部26は、タイムスタンプ値ST(5)からタイムスタンプ値ST(1)を減算することにより、両者の差分値SW(5)をダウンカウンタ27に設定する。   Next, when the detection unit 70 detects the transport packet TP5, the extraction unit 24 determines the value of the time stamp 50 (time stamp) added to the transport packet TP5 based on the control signal S70 input from the detection unit 70. The value ST (5)) is extracted. Then, the extraction unit 24 stores the time stamp value ST (5) in the register 25 and inputs it to the calculation unit 26. Further, the calculation unit 26 reads the time stamp value ST (1) stored in the register 25 based on the control signal S70 input from the detection unit 70. Then, the calculation unit 26 sets the difference value SW (5) between the two by subtracting the time stamp value ST (1) from the time stamp value ST (5).

ダウンカウンタ27への差分値SW(5)の設定が完了すると同時にゲート23がオープンすることにより、クロック生成回路5へのトランスポートパケットTP1〜TP4の連続入力が開始される。トランスポートパケットTP4がゲート23の通過を完了すると、検出部70から入力された制御信号S71に基づき、ゲート23は再びクローズされる。なお、ゲート23を通過する際、各トランスポートパケットTP1〜TP4に付加されているタイムスタンプ50が削除されることにより、MPEG2−TTSからMPEG2−TSへの変換が行われる。   When the setting of the difference value SW (5) to the down counter 27 is completed, the gate 23 is opened at the same time, whereby continuous input of the transport packets TP1 to TP4 to the clock generation circuit 5 is started. When the transport packet TP4 completes passing through the gate 23, the gate 23 is closed again based on the control signal S71 input from the detection unit 70. When passing through the gate 23, the time stamp 50 added to each of the transport packets TP1 to TP4 is deleted, so that conversion from MPEG2-TTS to MPEG2-TS is performed.

ダウンカウンタ27には、VCO37から出力されたクロックS4が入力されている。ダウンカウンタ27は、クロックS4が入力される毎に、ダウンカウンタ27の設定値を「1」ずつデクリメントする。そして、差分値SW(5)に対応するダウンカウンタ27の設定値がゼロになると同時に、ゲート23をオープンするための制御信号SOをゲート23に入力する。ゲート23がオープンすることにより、クロック生成回路5へのトランスポートパケットTP5〜TP8の連続入力が開始される。トランスポートパケットTP8がゲート23の通過を完了すると、検出部70から入力された制御信号S71に基づき、ゲート23は再びクローズされる。なお、上記と同様に、ゲート23を通過する際、各トランスポートパケットTP5〜TP8に付加されているタイムスタンプ50が削除される。   The down counter 27 receives the clock S4 output from the VCO 37. The down counter 27 decrements the set value of the down counter 27 by “1” every time the clock S4 is input. Then, at the same time as the set value of the down counter 27 corresponding to the difference value SW (5) becomes zero, a control signal SO for opening the gate 23 is input to the gate 23. When the gate 23 is opened, continuous input of the transport packets TP5 to TP8 to the clock generation circuit 5 is started. When the transport packet TP8 completes passing through the gate 23, the gate 23 is closed again based on the control signal S71 input from the detection unit 70. Similarly to the above, when passing through the gate 23, the time stamp 50 added to each of the transport packets TP5 to TP8 is deleted.

なお、以上の説明では、4個のトランスポートパケットTP5〜TP8の先頭のトランスポートパケットTP5に付加されているタイムスタンプ値ST(5)から、その前の4個のトランスポートパケットTP1〜TP4の先頭のトランスポートパケットTP1に付加されているタイムスタンプ値ST(1)を減算した。その変形例として、4個のトランスポートパケットTP5〜TP8の先頭のトランスポートパケットTP5に付加されているタイムスタンプ値ST(5)から、その前の4個のトランスポートパケットTP1〜TP4の最後尾のトランスポートパケットTP4に付加されているタイムスタンプ値ST(1)を減算しても良い。   In the above description, from the time stamp value ST (5) added to the first transport packet TP5 of the four transport packets TP5 to TP8, the previous four transport packets TP1 to TP4 The time stamp value ST (1) added to the first transport packet TP1 is subtracted. As a modified example, from the time stamp value ST (5) added to the first transport packet TP5 of the four transport packets TP5 to TP8, the last four transport packets TP1 to TP4 are added. The time stamp value ST (1) added to the transport packet TP4 may be subtracted.

図11を参照して、トランスポートパケットTP5は、トランスポートパケットTP4から遅延してクロック生成回路5に入力されている。遅延量は、トランスポートパケットTP1,TP5の先頭同士の比較で、トランスポートパケットTPの6個分に相当する時間WT3である。これは、エンコーダ6において、トランスポートパケットTP1とトランスポートパケットTP5との間に存在していた2個のヌルパケットが削除されたことに起因する。   Referring to FIG. 11, transport packet TP5 is input to clock generation circuit 5 with a delay from transport packet TP4. The amount of delay is a time WT3 corresponding to six transport packets TP in comparison between the heads of the transport packets TP1 and TP5. This is because the encoder 6 has deleted two null packets that existed between the transport packet TP1 and the transport packet TP5.

第2の変形例に係るクロック回路2によれば、タイミング調整回路4は、トランスポートパケットTP2〜TP4を、トランスポートパケットTP1に連続してクロック生成回路5に入力する。つまり、トランスポートパケットTP2〜TP4に関しては、それぞれの直前のトランスポートパケットTP1〜TP3との間で差分値SW(2)〜SW(4)を求める処理が行われない。同様に、タイミング調整回路4は、トランスポートパケットTP6〜TP8を、トランスポートパケットTP5に連続してクロック生成回路5に入力する。つまり、トランスポートパケットTP6〜TP8に関しては、それぞれの直前のトランスポートパケットTP5〜TP7との間で差分値SW(6)〜SW(8)を求める処理が行われない。これにより、上記実施の形態のように全てのトランスポートパケットTP(N)に関して差分値SW(N)を求める処理が行われる場合と比較して、処理の負荷を軽減することが可能となる。   According to the clock circuit 2 according to the second modified example, the timing adjustment circuit 4 inputs the transport packets TP2 to TP4 to the clock generation circuit 5 following the transport packet TP1. That is, for the transport packets TP2 to TP4, the processing for obtaining the difference values SW (2) to SW (4) is not performed between the immediately preceding transport packets TP1 to TP3. Similarly, the timing adjustment circuit 4 inputs the transport packets TP6 to TP8 to the clock generation circuit 5 following the transport packet TP5. That is, for the transport packets TP6 to TP8, the process for obtaining the difference values SW (6) to SW (8) is not performed between the immediately preceding transport packets TP5 to TP7. As a result, the processing load can be reduced compared to the case where the processing for obtaining the difference value SW (N) is performed for all the transport packets TP (N) as in the above embodiment.

<第3の変形例>
第3の変形例に係るタイミング調整回路4の構成は、図10に示した構成と同様である。上記第2の変形例では、トランスポートパケットTP2〜TP4は、トランスポートパケットPT1に連続してクロック生成回路5に入力された。第3の変形例では、トランスポートパケットTP2〜TP4の中に、PCR51を含むトランスポートパケットTPが存在している場合の対応について説明する。以下の説明では、トランスポートパケットTP3にPCR51が含まれているものとする。
<Third Modification>
The configuration of the timing adjustment circuit 4 according to the third modification is the same as the configuration illustrated in FIG. In the second modified example, the transport packets TP2 to TP4 are input to the clock generation circuit 5 in succession to the transport packet PT1. In the third modification, a case will be described in which a transport packet TP including the PCR 51 exists in the transport packets TP2 to TP4. In the following description, it is assumed that the PCR 51 is included in the transport packet TP3.

図12は、ゲート23から出力されるトランスポートストリームS2を示すタイミングチャートである。上記第2の変形例と同様に、トランスポートパケットTP1〜TP10は、バッファ21からこの順に連続して読み出されて、ゲート23に入力される。   FIG. 12 is a timing chart showing the transport stream S2 output from the gate 23. Similar to the second modified example, the transport packets TP1 to TP10 are successively read from the buffer 21 in this order and input to the gate 23.

検出部70がトランスポートパケットTP1を検出すると、抽出部24は、検出部70から入力された制御信号S70に基づき、トランスポートパケットTP1に付加されているタイムスタンプ50の値(タイムスタンプ値ST(1))を抽出する。そして、抽出部24は、そのタイムスタンプ値ST(1)をレジスタ25に格納する。その後に検出部70がトランスポートパケットTP2を検出しても、検出部70から抽出部24に制御信号S70が入力されず、抽出部24は、タイムスタンプ値ST(2)の抽出を行わない。   When the detection unit 70 detects the transport packet TP1, the extraction unit 24, based on the control signal S70 input from the detection unit 70, the value of the time stamp 50 added to the transport packet TP1 (time stamp value ST ( 1)) is extracted. Then, the extraction unit 24 stores the time stamp value ST (1) in the register 25. Thereafter, even if the detection unit 70 detects the transport packet TP2, the control signal S70 is not input from the detection unit 70 to the extraction unit 24, and the extraction unit 24 does not extract the time stamp value ST (2).

次に、検出部70が、PCR51を含むトランスポートパケットTP3を検出すると、抽出部24は、検出部70から入力された制御信号S70に基づき、トランスポートパケットTP3に付加されているタイムスタンプ50の値(タイムスタンプ値ST(3))を抽出する。そして、抽出部24は、そのタイムスタンプ値ST(3)をレジスタ25に格納するとともに、演算部26に入力する。また、演算部26は、検出部70から入力された制御信号S70に基づき、レジスタ25に格納されているタイムスタンプ値ST(1)を読み出す。そして、演算部26は、タイムスタンプ値ST(3)からタイムスタンプ値ST(1)を減算することにより、両者の差分値SW(3)をダウンカウンタ27に設定する。   Next, when the detection unit 70 detects the transport packet TP3 including the PCR 51, the extraction unit 24 uses the control signal S70 input from the detection unit 70 to set the time stamp 50 added to the transport packet TP3. A value (time stamp value ST (3)) is extracted. Then, the extraction unit 24 stores the time stamp value ST (3) in the register 25 and inputs it to the calculation unit 26. Further, the calculation unit 26 reads the time stamp value ST (1) stored in the register 25 based on the control signal S70 input from the detection unit 70. Then, the calculation unit 26 sets the difference value SW (3) between the two in the down counter 27 by subtracting the time stamp value ST (1) from the time stamp value ST (3).

ダウンカウンタ27への差分値SW(3)の設定が完了すると同時にゲート23がオープンすることにより、クロック生成回路5へのトランスポートパケットTP1,TP2の連続入力が開始される。トランスポートパケットTP2がゲート23の通過を完了すると、検出部70から入力された制御信号S71に基づき、ゲート23は再びクローズされる。なお、ゲート23を通過する際、各トランスポートパケットTP1,TP2に付加されているタイムスタンプ50が削除されることにより、MPEG2−TTSからMPEG2−TSへの変換が行われる。   When the setting of the difference value SW (3) to the down counter 27 is completed, the gate 23 is opened at the same time, whereby continuous input of the transport packets TP1 and TP2 to the clock generation circuit 5 is started. When the transport packet TP2 completes passing through the gate 23, the gate 23 is closed again based on the control signal S71 input from the detection unit 70. When passing through the gate 23, the time stamp 50 added to each transport packet TP1, TP2 is deleted, so that conversion from MPEG2-TTS to MPEG2-TS is performed.

ダウンカウンタ27には、VCO37から出力されたクロックS4が入力されている。ダウンカウンタ27は、クロックS4が入力される毎に、ダウンカウンタ27の設定値を「1」ずつデクリメントする。そして、差分値SW(3)に対応するダウンカウンタ27の設定値がゼロになると同時に、ゲート23をオープンするための制御信号SOをゲート23に入力する。トランスポートパケットTP4〜TP6にはPCR51が含まれていないため、ゲート23がオープンすることにより、クロック生成回路5へのトランスポートパケットTP3〜TP6の連続入力が開始される。トランスポートパケットTP6がゲート23の通過を完了すると、検出部70から入力された制御信号S71に基づき、ゲート23は再びクローズされる。なお、上記と同様に、ゲート23を通過する際、各トランスポートパケットTP3〜TP6に付加されているタイムスタンプ50が削除される。   The down counter 27 receives the clock S4 output from the VCO 37. The down counter 27 decrements the set value of the down counter 27 by “1” every time the clock S4 is input. Then, at the same time as the set value of the down counter 27 corresponding to the difference value SW (3) becomes zero, the control signal SO for opening the gate 23 is input to the gate 23. Since the transport packets TP4 to TP6 do not include the PCR 51, when the gate 23 is opened, continuous input of the transport packets TP3 to TP6 to the clock generation circuit 5 is started. When the transport packet TP6 completes passing through the gate 23, the gate 23 is closed again based on the control signal S71 input from the detection unit 70. As described above, when passing through the gate 23, the time stamp 50 added to each of the transport packets TP3 to TP6 is deleted.

次に、検出部70がトランスポートパケットTP7を検出すると、抽出部24は、検出部70から入力された制御信号S70に基づき、トランスポートパケットTP7に付加されているタイムスタンプ50の値(タイムスタンプ値ST(7))を抽出する。そして、抽出部24は、そのタイムスタンプ値ST(7)をレジスタ25に格納するとともに、演算部26に入力する。また、演算部26は、検出部70から入力された制御信号S70に基づき、レジスタ25に格納されているタイムスタンプ値ST(3)を読み出す。そして、演算部26は、タイムスタンプ値ST(7)からタイムスタンプ値ST(3)を減算することにより、両者の差分値SW(7)をダウンカウンタ27に設定する。   Next, when the detection unit 70 detects the transport packet TP7, the extraction unit 24 determines the value of the time stamp 50 (time stamp) added to the transport packet TP7 based on the control signal S70 input from the detection unit 70. The value ST (7)) is extracted. Then, the extraction unit 24 stores the time stamp value ST (7) in the register 25 and inputs it to the calculation unit 26. The computing unit 26 reads the time stamp value ST (3) stored in the register 25 based on the control signal S70 input from the detecting unit 70. Then, the arithmetic unit 26 subtracts the time stamp value ST (3) from the time stamp value ST (7), thereby setting the difference value SW (7) between the two in the down counter 27.

上記と同様に、ダウンカウンタ27は、クロックS4が入力される毎に、ダウンカウンタ27の設定値を「1」ずつデクリメントする。そして、差分値SW(7)に対応するダウンカウンタ27の設定値がゼロになると同時に、ゲート23をオープンするための制御信号SOをゲート23に入力する。トランスポートパケットTP8〜TP10にはPCR51が含まれていないため、ゲート23がオープンすることにより、クロック生成回路5へのトランスポートパケットTP7〜TP10の連続入力が開始される。トランスポートパケットTP10がゲート23の通過を完了すると、ゲート23は再びクローズされる。なお、上記と同様に、ゲート23を通過する際、トランスポートパケットTP7〜TP10に付加されているタイムスタンプ50が削除される。   Similarly to the above, every time the clock S4 is input, the down counter 27 decrements the set value of the down counter 27 by “1”. Then, at the same time as the set value of the down counter 27 corresponding to the difference value SW (7) becomes zero, a control signal SO for opening the gate 23 is input to the gate 23. Since the transport packets TP8 to TP10 do not include the PCR 51, when the gate 23 is opened, continuous input of the transport packets TP7 to TP10 to the clock generation circuit 5 is started. When the transport packet TP10 completes passing through the gate 23, the gate 23 is closed again. As described above, when passing through the gate 23, the time stamp 50 added to the transport packets TP7 to TP10 is deleted.

図12を参照して、トランスポートパケットTP3は、トランスポートパケットTP2から遅延してクロック生成回路5に入力されている。遅延量は、トランスポートパケットTP1,TP3の先頭同士の比較で、トランスポートパケットTPの2個分に相当する時間WT4である。これは、エンコーダ6において、トランスポートパケットTP1とトランスポートパケットTP3との間に存在していた1個のヌルパケットが削除されたことに起因する。   Referring to FIG. 12, transport packet TP3 is input to clock generation circuit 5 with a delay from transport packet TP2. The delay amount is a time WT4 corresponding to two transport packets TP in comparison between the heads of the transport packets TP1 and TP3. This is because the encoder 6 has deleted one null packet that existed between the transport packet TP1 and the transport packet TP3.

また、トランスポートパケットTP7は、トランスポートパケットTP6から遅延してクロック生成回路5に入力されている。遅延量は、トランスポートパケットTP3,TP7の先頭同士の比較で、トランスポートパケットTPの5個分に相当する時間WT5である。これは、エンコーダ6において、トランスポートパケットTP3とトランスポートパケットTP7との間に存在していた1個のヌルパケットが削除されたことに起因する。   The transport packet TP7 is input to the clock generation circuit 5 with a delay from the transport packet TP6. The amount of delay is a time WT5 corresponding to five transport packets TP in comparison between the heads of the transport packets TP3 and TP7. This is because the encoder 6 has deleted one null packet that existed between the transport packet TP3 and the transport packet TP7.

第3の変形例に係るクロック回路2によれば、タイミング調整回路4は、例えば、PCR51を含まないトランスポートパケットTP4〜TP6に関しては、トランスポートパケットTP3に連続してクロック生成回路5に入力する。つまり、トランスポートパケットTP4〜TP6に関しては、それぞれの直前のトランスポートパケットTP3〜TP5との間で差分値SW(4)〜SW(6)を求める処理が行われない。これにより、上記第2の変形例と同様に、全てのトランスポートパケットTP(N)に関して差分値SW(N)を求める処理が行われる場合と比較して、処理の負荷を軽減することが可能となる。   According to the clock circuit 2 according to the third modification, the timing adjustment circuit 4 inputs, for example, the transport packets TP4 to TP6 that do not include the PCR 51 to the clock generation circuit 5 following the transport packet TP3. . That is, for the transport packets TP4 to TP6, the process for obtaining the difference values SW (4) to SW (6) is not performed between the immediately preceding transport packets TP3 to TP5. As a result, as in the second modification, it is possible to reduce the processing load as compared to the case where the process for obtaining the difference value SW (N) is performed for all the transport packets TP (N). It becomes.

しかも、第3の変形例に係るクロック回路2によれば、タイミング調整回路4は、PCR51を含むトランスポートパケットTP3に関しては、そのタイムスタンプ値ST(3)と、レジスタ25に格納されているタイムスタンプ値ST(1)との差分値SW(3)を求める処理を行う。そして、クロック生成回路5へのトランスポートパケットTP1の入力を開始したタイミングから、差分値SW(3)に応じた時間が経過したタイミングで、クロック生成回路5へのトランスポートパケットTP3の入力を開始する。これにより、PCR51を含むトランスポートパケットTP3に関しては、差分値SW(3)に応じた適切なタイミングで、クロック生成回路5に入力することができる。その結果、クロック生成回路5においてクロックS4の周波数の調整精度が低下する事態を回避することが可能となる。   In addition, according to the clock circuit 2 according to the third modification, the timing adjustment circuit 4 regarding the transport packet TP3 including the PCR 51, the time stamp value ST (3) and the time stored in the register 25. Processing for obtaining a difference value SW (3) from the stamp value ST (1) is performed. Then, the input of the transport packet TP3 to the clock generation circuit 5 is started at the timing when the time corresponding to the difference value SW (3) has elapsed from the start of the input of the transport packet TP1 to the clock generation circuit 5. To do. Thereby, the transport packet TP3 including the PCR 51 can be input to the clock generation circuit 5 at an appropriate timing according to the difference value SW (3). As a result, it is possible to avoid a situation in which the accuracy of adjusting the frequency of the clock S4 in the clock generation circuit 5 is lowered.

<第4の変形例>
図13は、第4の変形例に係るクロック生成回路5の構成を示すブロック図である。図3に示した構成に対して、乗算器80,81が追加されている。乗算器80は、DAC34から入力された信号S34に対して所望の重み付け係数Yを乗算することにより、信号S80を出力する。信号S80はLPF35に入力される。乗算器81は、DAC38から入力された信号S38に対して所望の重み付け係数Zを乗算することにより、信号S81を出力する。信号S81はLPF39に入力される。なお、乗算器80,81の一方は省略することもできる。
<Fourth Modification>
FIG. 13 is a block diagram showing a configuration of the clock generation circuit 5 according to the fourth modification. Multipliers 80 and 81 are added to the configuration shown in FIG. The multiplier 80 multiplies the signal S34 input from the DAC 34 by a desired weighting coefficient Y to output a signal S80. The signal S80 is input to the LPF 35. The multiplier 81 multiplies the signal S38 input from the DAC 38 by a desired weighting coefficient Z, and outputs a signal S81. The signal S81 is input to the LPF 39. One of the multipliers 80 and 81 may be omitted.

第4の変形例に係るクロック回路2によれば、PCR値に関連する信号S34と、バッファ21の記憶量の検出結果に関連する信号S38との少なくとも一方に重み付けを行うことにより、PCR値及びバッファ21の記憶量の検出結果がクロックS4の周波数の調整に与える影響の度合いを、所望に調整することが可能となる。   According to the clock circuit 2 according to the fourth modified example, by weighting at least one of the signal S34 related to the PCR value and the signal S38 related to the detection result of the storage amount of the buffer 21, the PCR value and It is possible to adjust the degree of influence of the detection result of the storage amount of the buffer 21 on the adjustment of the frequency of the clock S4 as desired.

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

本発明の実施の形態に係る映像処理装置の構成を簡略化して示すブロック図である。It is a block diagram which simplifies and shows the structure of the video processing apparatus which concerns on embodiment of this invention. タイミング調整回路の構成を示すブロック図である。It is a block diagram which shows the structure of a timing adjustment circuit. クロック生成回路の構成を示すブロック図である。It is a block diagram which shows the structure of a clock generation circuit. 映像処理装置が受信するトランスポートストリームの一部を抜き出して示す図である。It is a figure which extracts and shows a part of transport stream which a video processing apparatus receives. トランスポートパケットの構造を示す図である。It is a figure which shows the structure of a transport packet. トランスポートパケットの構造を示す図である。It is a figure which shows the structure of a transport packet. ゲートに入力されるトランスポートストリームと、ゲートから出力されるトランスポートストリームとの関係を示すタイミングチャートである。It is a timing chart which shows the relationship between the transport stream input into a gate, and the transport stream output from a gate. 第1の変形例に係るタイミング調整回路の構成を示すブロック図である。It is a block diagram which shows the structure of the timing adjustment circuit which concerns on a 1st modification. ゲートに入力されるトランスポートストリームと、ゲートから出力されるトランスポートストリームとの関係を示すタイミングチャートである。It is a timing chart which shows the relationship between the transport stream input into a gate, and the transport stream output from a gate. 第2の変形例に係るタイミング調整回路の構成を示すブロック図である。It is a block diagram which shows the structure of the timing adjustment circuit which concerns on a 2nd modification. ゲートから出力されるトランスポートストリームを示すタイミングチャートである。It is a timing chart which shows the transport stream output from a gate. ゲートから出力されるトランスポートストリームを示すタイミングチャートである。It is a timing chart which shows the transport stream output from a gate. 第4の変形例に係るクロック生成回路の構成を示すブロック図である。It is a block diagram which shows the structure of the clock generation circuit which concerns on a 4th modification. デコーダの構成の一部を抜き出して示すブロック図である。It is a block diagram which extracts and shows a part of structure of a decoder.

符号の説明Explanation of symbols

1 映像処理装置
2 クロック回路
3 デコード回路
4 タイミング調整回路
5 クロック生成回路
21 バッファ
22,70 検出部
23 ゲート
24 抽出部
25 レジスタ
26 演算部
27 ダウンカウンタ
31 PCR検出部
32 STCカウンタ
37 VCO
40 比較部
80,81 乗算器
DESCRIPTION OF SYMBOLS 1 Video processing device 2 Clock circuit 3 Decoding circuit 4 Timing adjustment circuit 5 Clock generation circuit 21 Buffer 22,70 Detection part 23 Gate 24 Extraction part 25 Register 26 Operation part 27 Down counter 31 PCR detection part 32 STC counter 37 VCO
40 comparison unit 80, 81 multiplier

Claims (7)

複数のトランスポートパケットのうちの一部のトランスポートパケットに含まれるクロック調整値に基づいて、周波数が調整されたクロックを生成する、クロック生成手段と、
前記複数のトランスポートパケットを前記クロック生成手段に入力するタイミングを調整する、タイミング調整手段と
を備え、
前記タイミング調整手段には、第1の時刻情報が付加された第1のトランスポートパケットと、第2の時刻情報が付加された第2のトランスポートパケットとが、この順に入力され、
前記タイミング調整手段は、
前記第1のトランスポートパケットを第1のタイミングで前記クロック生成手段に入力し、
前記第1の時刻情報と前記第2の時刻情報との第1の差分値を求め、前記第2のトランスポートパケットを、前記第1のタイミングから前記第1の差分値に応じた時間が経過した第2のタイミングで、前記クロック生成手段に入力する、クロック回路。
Clock generating means for generating a clock whose frequency is adjusted based on a clock adjustment value included in some of the plurality of transport packets;
A timing adjustment unit that adjusts a timing at which the plurality of transport packets are input to the clock generation unit;
The timing adjustment means receives the first transport packet to which the first time information is added and the second transport packet to which the second time information is added in this order,
The timing adjusting means includes
Inputting the first transport packet to the clock generation means at a first timing;
A first difference value between the first time information and the second time information is obtained, and a time corresponding to the first difference value has elapsed for the second transport packet from the first timing. A clock circuit that inputs the clock generation means at the second timing.
前記タイミング調整手段は、
前記複数のトランスポートパケットを一時的に記憶する記憶手段と、
前記記憶手段内における前記複数のトランスポートパケットの記憶量を検出する検出手段と
を有し、
前記クロック生成手段は、前記クロック調整値と、前記検出手段による前記記憶量の検出結果とに基づいて、前記クロックの周波数を調整する、請求項1に記載のクロック回路。
The timing adjusting means includes
Storage means for temporarily storing the plurality of transport packets;
Detecting means for detecting a storage amount of the plurality of transport packets in the storage means;
The clock circuit according to claim 1, wherein the clock generation unit adjusts a frequency of the clock based on the clock adjustment value and a detection result of the storage amount by the detection unit.
前記クロック生成手段は、前記クロック調整値及び前記記憶量の検出結果の少なくとも一方に対して重み付けを行う、請求項2に記載のクロック回路。   The clock circuit according to claim 2, wherein the clock generation unit weights at least one of the clock adjustment value and the storage amount detection result. 前記タイミング調整手段は、前記第1の差分値が異常値を示す場合には、前記第2のトランスポートパケットを、前記第1のタイミングから所定時間が経過した第3のタイミングで、前記クロック生成手段に入力する、請求項1〜3のいずれか一つに記載のクロック回路。   When the first difference value indicates an abnormal value, the timing adjustment unit generates the clock at the third timing when a predetermined time has elapsed from the first timing. The clock circuit according to claim 1, wherein the clock circuit is input to the means. 前記タイミング調整手段には、前記第1のトランスポートパケットと前記第2のトランスポートパケットとの間に、第3の時刻情報が付加された第3のトランスポートパケットが入力され、
前記タイミング調整手段は、前記第3のトランスポートパケットを、前記第1のトランスポートパケットに連続して前記クロック生成手段に入力する、請求項1〜4のいずれか一つに記載のクロック回路。
The timing adjustment means receives a third transport packet to which third time information is added between the first transport packet and the second transport packet,
5. The clock circuit according to claim 1, wherein the timing adjustment unit inputs the third transport packet to the clock generation unit in succession to the first transport packet. 6.
前記タイミング調整手段には、前記第1のトランスポートパケットと前記第2のトランスポートパケットとの間に、第3の時刻情報が付加された第3のトランスポートパケットが入力され、
前記第3のトランスポートパケットが、前記クロック調整値を含まないトランスポートパケットである場合には、前記タイミング調整手段は、前記第3のトランスポートパケットを、前記第1のトランスポートパケットに連続して前記クロック生成手段に入力し、
前記第3のトランスポートパケットが、前記クロック調整値を含むトランスポートパケットである場合には、前記タイミング調整手段は、前記第1の時刻情報と前記第3の時刻情報との第2の差分値を求め、前記第3のトランスポートパケットを、前記第1のタイミングから前記第2の差分値に応じた時間が経過した第4のタイミングで、前記クロック生成手段に入力する、請求項1〜4のいずれか一つに記載のクロック回路。
The timing adjustment means receives a third transport packet to which third time information is added between the first transport packet and the second transport packet,
In the case where the third transport packet is a transport packet that does not include the clock adjustment value, the timing adjusting unit continues the third transport packet to the first transport packet. To the clock generation means,
When the third transport packet is a transport packet including the clock adjustment value, the timing adjustment unit is configured to output a second difference value between the first time information and the third time information. And the third transport packet is input to the clock generation means at a fourth timing when a time corresponding to the second difference value has elapsed from the first timing. The clock circuit according to any one of the above.
請求項1〜6のいずれか一つに記載のクロック回路と、
前記クロック回路が生成するクロックに基づいて、トランスポートパケットのデコード処理を実行するデコード回路と
を備える、映像処理装置。
A clock circuit according to any one of claims 1 to 6;
A video processing apparatus comprising: a decoding circuit that performs a decoding process of a transport packet based on a clock generated by the clock circuit.
JP2008290718A 2008-11-13 2008-11-13 Clock circuit and video processing apparatus Active JP4904331B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008290718A JP4904331B2 (en) 2008-11-13 2008-11-13 Clock circuit and video processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008290718A JP4904331B2 (en) 2008-11-13 2008-11-13 Clock circuit and video processing apparatus

Publications (2)

Publication Number Publication Date
JP2010118898A true JP2010118898A (en) 2010-05-27
JP4904331B2 JP4904331B2 (en) 2012-03-28

Family

ID=42306260

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008290718A Active JP4904331B2 (en) 2008-11-13 2008-11-13 Clock circuit and video processing apparatus

Country Status (1)

Country Link
JP (1) JP4904331B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10303910A (en) * 1997-04-24 1998-11-13 Nippon Telegr & Teleph Corp <Ntt> Multimedia information distribution method and distribution system
JPH11317768A (en) * 1998-01-23 1999-11-16 Matsushita Electric Ind Co Ltd Transmission system, transmitting device, recording and reproducing device, and recording device
JP2001308876A (en) * 2000-04-24 2001-11-02 Ntt Communications Kk Information transmission system, transmitter and receiver
JP2006186580A (en) * 2004-12-27 2006-07-13 Toshiba Corp Reproducing device and decoding control method
JP2007251870A (en) * 2006-03-20 2007-09-27 Toshiba Corp Inter-station transmission system, transmitting apparatus, receiving apparatus, and inter-station transmission method
JP2008035197A (en) * 2006-07-28 2008-02-14 Sumitomo Electric Ind Ltd Clocking circuit, video processor and clock adjustment method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10303910A (en) * 1997-04-24 1998-11-13 Nippon Telegr & Teleph Corp <Ntt> Multimedia information distribution method and distribution system
JPH11317768A (en) * 1998-01-23 1999-11-16 Matsushita Electric Ind Co Ltd Transmission system, transmitting device, recording and reproducing device, and recording device
JP2001308876A (en) * 2000-04-24 2001-11-02 Ntt Communications Kk Information transmission system, transmitter and receiver
JP2006186580A (en) * 2004-12-27 2006-07-13 Toshiba Corp Reproducing device and decoding control method
JP2007251870A (en) * 2006-03-20 2007-09-27 Toshiba Corp Inter-station transmission system, transmitting apparatus, receiving apparatus, and inter-station transmission method
JP2008035197A (en) * 2006-07-28 2008-02-14 Sumitomo Electric Ind Ltd Clocking circuit, video processor and clock adjustment method

Also Published As

Publication number Publication date
JP4904331B2 (en) 2012-03-28

Similar Documents

Publication Publication Date Title
KR100564057B1 (en) Encoding system and method, decoding system and method, encoding data recording device and method, encoding data transmission device and method
US9049474B2 (en) Moving image distribution system and moving image distribution server
JP2001036549A (en) Data processing system and time stamp generating method
US6021168A (en) Clock recovery circuit and method for MPEG-2 system decoder
US7729383B2 (en) Multiplexer and multiplexing method
JPH11317768A (en) Transmission system, transmitting device, recording and reproducing device, and recording device
JP4886757B2 (en) Clock circuit and video processing apparatus
JP4886758B2 (en) Clock circuit and video processing apparatus
JP4904331B2 (en) Clock circuit and video processing apparatus
JP2008245050A (en) Pcr correction circuit
JP3846578B2 (en) Information processing apparatus and method, recording medium, and program
JP3617655B2 (en) Encoding system and encoding method, decoding system and decoding method, encoded data recording apparatus and encoded data recording method, encoded data transmission apparatus and encoded data transmission method, and recording medium
JP5149404B2 (en) Video receiver
JP3700817B2 (en) Source clock recovery circuit
US20090323719A1 (en) Methods and apparatus for transforming first transport stream of first format into second transport stream of second format by emulating arrival time stamp information
JP2001016267A (en) Communication equipment and method and medium
JP4016215B2 (en) Digital signal encoding method and apparatus, and digital signal transmission method and apparatus
JP3856135B2 (en) Stream converting / sending device
CN101022544A (en) System clock reference automatic adjusting system and method
JP3749216B2 (en) Digital video / audio recording device
JP2010118900A (en) Video signal receiver, video signal transmitter, and video signal communication system
KR0154005B1 (en) Apparatus for generating the presentation time stamp in the system encoder
JP2011239009A (en) Transmission device
JP5241582B2 (en) Multimedia transmitter
WO2022168306A1 (en) Transmission system, transmission method, and transmission program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110907

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111107

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: 20111221

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: 20120106

R150 Certificate of patent or registration of utility model

Ref document number: 4904331

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150113

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250