JP5958008B2 - Stream processing apparatus, stream processing method, and stream processing program - Google Patents

Stream processing apparatus, stream processing method, and stream processing program Download PDF

Info

Publication number
JP5958008B2
JP5958008B2 JP2012069986A JP2012069986A JP5958008B2 JP 5958008 B2 JP5958008 B2 JP 5958008B2 JP 2012069986 A JP2012069986 A JP 2012069986A JP 2012069986 A JP2012069986 A JP 2012069986A JP 5958008 B2 JP5958008 B2 JP 5958008B2
Authority
JP
Japan
Prior art keywords
clock
tts
packet
stream processing
frequency
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.)
Active
Application number
JP2012069986A
Other languages
Japanese (ja)
Other versions
JP2013201702A (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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries 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 Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Priority to JP2012069986A priority Critical patent/JP5958008B2/en
Publication of JP2013201702A publication Critical patent/JP2013201702A/en
Application granted granted Critical
Publication of JP5958008B2 publication Critical patent/JP5958008B2/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)

Description

本発明は、ストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムに関し、遅延時間を増大させることなく、基準クロックの周波数を調整するためのストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムに関する。   The present invention relates to a stream processing device, a stream processing method, and a stream processing program, and more particularly to a stream processing device, a stream processing method, and a stream processing program for adjusting the frequency of a reference clock without increasing a delay time.

特開2007−104085号公報(特許文献1)には、バッファに蓄積したパケットの占有量を監視することにより、基準クロックの周波数を調整するための技術が開示されている。すなわち、第2のデータストリームのパケットを第1のデータストリームに対応したフォーマットへ変換する際に、パケットを一旦バッファリングする場合において、第2のデータストリームのパケットをバッファに格納し、このバッファに対するパケットの占有量を調べる。そして、占有量が予め定めた規定範囲を下回るときはバッファからパケットを読み出すペースを遅くし、占有量が規定範囲を上回るときはバッファからパケットを読み出すペースを早くし、占有量が規定範囲内にあるときはバッファからパケットを所定のペースで読み出す。   Japanese Unexamined Patent Application Publication No. 2007-104085 (Patent Document 1) discloses a technique for adjusting the frequency of a reference clock by monitoring the occupation amount of packets accumulated in a buffer. That is, when the packet of the second data stream is converted into a format corresponding to the first data stream, when the packet is temporarily buffered, the packet of the second data stream is stored in the buffer, and Check packet occupancy. When the occupancy is below the predetermined range, the pace at which packets are read from the buffer is slowed down. When the occupancy is above the specified range, the pace at which packets are read out from the buffer is increased, and the occupancy is within the specified range. In some cases, packets are read from the buffer at a predetermined pace.

特開2007−104085号公報JP 2007-104085 A

しかしながら、特許文献1に記載の技術では、基準クロックの周波数を調整するために、予め定めた規定範囲までパケットをバッファへ蓄積する必要がある。たとえば、受信されたパケットが順次バッファに蓄積されていき、パケットが予め定めた規定範囲まで蓄積された後に、最初に受信されたパケットは、バッファから取り出されて次の処理へ移される。従って、パケットが、バッファへ入ってからバッファを出るまでの滞留時間が発生し、パケットを受信しても、滞留時間を経過するまで当該パケットの処理を行うことができない。すなわち、受信したパケットを次の処理へ移すまでの遅延時間が発生してしまう。   However, in the technique described in Patent Document 1, in order to adjust the frequency of the reference clock, it is necessary to accumulate packets in a buffer up to a predetermined specified range. For example, the received packets are sequentially accumulated in the buffer, and after the packets are accumulated to a predetermined specified range, the first received packet is taken out from the buffer and moved to the next processing. Therefore, a residence time from when the packet enters the buffer until it leaves the buffer is generated, and even if the packet is received, the packet cannot be processed until the residence time elapses. That is, a delay time until the received packet is transferred to the next process occurs.

この発明は、上述の課題を解決するためになされたもので、その目的は、ストリームを処理する構成において、遅延時間を増大させることなく、基準クロックの周波数を調整することが可能なストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムを提供することである。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a stream processing apparatus capable of adjusting the frequency of the reference clock without increasing the delay time in a stream processing configuration. It is to provide a stream processing method and a stream processing program.

(1)上記課題を解決するために、この発明のある局面に係わるストリーム処理装置は、1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置であって、上記パケットはヘッダおよびペイロードを含み、上記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、上記複数のパケットの各々のヘッダは時刻情報を含み、基準クロックを生成するためのクロック生成部と、上記基準クロックに基づいてカウント値を更新するためのカウンタと、上記カウント値および上記時刻情報に基づいて上記クロック生成部を制御することにより、上記基準クロックの周波数を調整するためのクロック調整部とを備える。   (1) In order to solve the above problems, a stream processing apparatus according to an aspect of the present invention is a stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets, The packet includes a header and a payload, at least some headers of the plurality of packets include information for clock recovery, each header of the plurality of packets includes time information, and clock generation for generating a reference clock And a counter for updating the count value based on the reference clock, and a clock for adjusting the frequency of the reference clock by controlling the clock generation unit based on the count value and the time information And an adjustment unit.

このように、カウント値および時刻情報は、ストリーム処理装置がパケットを受信した時刻から取得することができるので、クロック生成部を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつゲートにおけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置がパケットを受信した時刻から、当該パケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。   As described above, the count value and the time information can be acquired from the time when the stream processing apparatus receives the packet, so that the processing for controlling the clock generation unit and the processing for decoding can be started from the time, In addition, the buffer at the gate is not necessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing apparatus receives the packet until the packet is decoded, for example.

また、ストリーム処理装置におけるクロックに基づいたカウント値、およびVOD(Video On Demand)サーバ等の局側装置におけるクロックに基づいた時刻情報を利用することにより、ストリーム処理装置におけるクロックを、局側装置におけるクロックに同期させることができる。   Further, by using the count value based on the clock in the stream processing device and the time information based on the clock in the station side device such as a VOD (Video On Demand) server, the clock in the stream processing device is Can be synchronized to the clock.

このように、カウント値が局側装置におけるクロックと同期するので、ストリーム処理装置は、ストリーム処理装置におけるクロックに基づいて処理を行うことにより、局側装置におけるクロックに基づいて作成されたストリームを、局側装置におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。   In this way, since the count value is synchronized with the clock in the station side device, the stream processing device performs processing based on the clock in the stream processing device, so that the stream created based on the clock in the station side device is Each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station side device.

(2)好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報に基づいて、上記パケット用の仮想的なバッファの評価値を算出し、算出した上記評価値に応じて上記クロック生成部を制御することにより、上記基準クロックの周波数を調整する。   (2) Preferably, the clock adjustment unit calculates an evaluation value of a virtual buffer for the packet based on the count value and the time information, and the clock generation unit is set according to the calculated evaluation value. By controlling the frequency of the reference clock.

このような構成により、実際にバッファを設けることなく、仮想的なバッファの評価値を算出することができるため、ストリーム処理装置におけるクロックを適切に制御することができる。   With such a configuration, an evaluation value of a virtual buffer can be calculated without actually providing a buffer, so that the clock in the stream processing apparatus can be appropriately controlled.

そして、ストリーム処理装置は、バッファを実装しないので、受信したパケットを、バッファに滞留させることなく次の処理へ移すことができる。   Since the stream processing apparatus does not mount a buffer, the received packet can be transferred to the next process without staying in the buffer.

(3)好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報の差に基づいて、上記基準クロックの周波数を調整する。   (3) Preferably, the clock adjustment unit adjusts the frequency of the reference clock based on the difference between the count value and the time information.

このように、ストリーム処理装置におけるクロックに基づいたカウント値、および局側装置におけるクロックに基づいた時刻情報の差を計算することにより、ストリーム処理装置における動作タイミング、および局側装置における動作タイミングのずれの経時的な変化を分析することができるので、ストリーム処理装置におけるクロックの調整を正確に行うことができる。   Thus, by calculating the difference between the count value based on the clock in the stream processing device and the time information based on the clock in the station side device, the operation timing in the stream processing device and the difference in operation timing in the station side device Can be analyzed, so that the clock in the stream processing apparatus can be adjusted accurately.

また、上記差を算出するために必要なカウント値および時刻情報は、パケットを受信した時刻において取得するので、上記差を算出するための処理を、当該時刻から開始することができる。従って、ストリーム処理装置は、上記パケットを受信した時刻において、ストリーム処理装置におけるクロックの周波数の調整に、上記差を反映させることができる。   In addition, since the count value and time information necessary for calculating the difference are acquired at the time when the packet is received, the process for calculating the difference can be started from the time. Therefore, the stream processing apparatus can reflect the difference in the adjustment of the clock frequency in the stream processing apparatus at the time when the packet is received.

(4)好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報の大小関係に基づいて1または複数の上記パケットを選択し、選択した上記パケットのデータ量の合計に基づいて上記基準クロックの周波数を調整する。   (4) Preferably, the clock adjustment unit selects one or a plurality of the packets based on the magnitude relationship between the count value and the time information, and the reference clock based on the total data amount of the selected packets. Adjust the frequency.

このような構成により、バッファにおけるパケットの蓄積量を仮想的に求めることができるため、上記蓄積量を経時的に監視することにより、ストリーム処理装置における動作タイミング、および局側装置における動作タイミングのずれの経時的な変化を分析することができる。これにより、ストリーム処理装置におけるクロックの調整を正確に行うことができる。   With this configuration, it is possible to virtually determine the amount of packets stored in the buffer. By monitoring the amount of storage over time, the operation timing in the stream processing device and the operation timing in the station side device are shifted. Over time can be analyzed. This makes it possible to accurately adjust the clock in the stream processing apparatus.

(5)より好ましくは、上記クロック調整部は、上記差が所定値になるように、上記基準クロックの周波数を調整する。   (5) More preferably, the clock adjustment unit adjusts the frequency of the reference clock so that the difference becomes a predetermined value.

ストリーム処理装置におけるクロックおよび局側装置におけるクロックが同期していると、ストリーム処理装置におけるクロックに基づいたカウント値、および局側装置におけるクロックに基づいた時刻情報の差が一定になるので、上記差が一定になる。ストリーム処理装置におけるクロックの周波数を調整することにより、ストリーム処理装置におけるクロックを局側装置におけるクロックに同期させることができる。   If the clock in the stream processing device and the clock in the station side device are synchronized, the difference between the count value based on the clock in the stream processing device and the time information based on the clock in the station side device becomes constant, so the above difference Becomes constant. By adjusting the frequency of the clock in the stream processing device, the clock in the stream processing device can be synchronized with the clock in the station side device.

(6)より好ましくは、上記クロック調整部は、上記複数のパケットの一部の上記時刻情報と上記カウント値との差に基づいて、上記基準クロックの周波数を調整する。   (6) More preferably, the clock adjustment unit adjusts the frequency of the reference clock based on a difference between the time information and the count value of a part of the plurality of packets.

このような構成により、ストリーム処理装置が受信する全てのパケットでなく、一部のパケットからストリーム処理装置におけるクロックに基づいたカウント値、および局側装置におけるクロックに基づいた時刻情報の差を計算するので、ストリーム処理装置における計算の負担を軽減することができる。   With such a configuration, the difference between the count value based on the clock in the stream processing device and the time information based on the clock in the station side device is calculated from some packets instead of all the packets received by the stream processing device. Therefore, the calculation burden on the stream processing apparatus can be reduced.

(7)より好ましくは、上記クロック調整部は、上記合計が所定値になるように、上記基準クロックの周波数を調整する。   (7) More preferably, the clock adjustment unit adjusts the frequency of the reference clock so that the total becomes a predetermined value.

このように、ストリーム処理装置により受信されたパケットにおいて、当該パケットを受信したタイミングから、カウント値が時刻情報の示す値となるタイミングまでの間、当該パケットのバイト数を合計に含める。ストリーム処理装置におけるクロックおよび局側装置におけるクロックが同期していると、上記合計が一定になるので、上記合計が一定になるようにストリーム処理装置におけるクロックの周波数を調整することにより、ストリーム処理装置におけるクロックを局側装置におけるクロックに同期させることができる。   In this way, in the packet received by the stream processing device, the number of bytes of the packet is included in the total from the timing when the packet is received until the timing when the count value becomes the value indicated by the time information. When the clock in the stream processing device and the clock in the station-side device are synchronized, the total is constant. Therefore, by adjusting the frequency of the clock in the stream processing device so that the total is constant, the stream processing device Can be synchronized with the clock in the station side device.

(8)より好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報の差を、仮想的なバッファにおける上記パケットの滞留時間として算出し、算出した上記滞留時間に基づいて上記基準クロックの周波数を調整する。   (8) More preferably, the clock adjustment unit calculates a difference between the count value and the time information as a retention time of the packet in a virtual buffer, and based on the calculated retention time, Adjust the frequency.

このような構成により、仮想的なバッファの評価値として、仮想的な滞留時間を計算することができるため、ストリーム処理装置におけるクロックの調整を正確に行うことができる。   With such a configuration, since the virtual residence time can be calculated as the evaluation value of the virtual buffer, the clock in the stream processing apparatus can be accurately adjusted.

(9)より好ましくは、上記クロック調整部は、上記時刻情報が上記カウント値以下となる1または複数の上記パケットのデータ量の合計を、仮想的なバッファにおける上記パケットの蓄積量として算出し、算出した上記蓄積量に基づいて上記基準クロックの周波数を調整する。   (9) More preferably, the clock adjustment unit calculates a sum of data amounts of one or a plurality of the packets whose time information is equal to or less than the count value as an accumulation amount of the packets in a virtual buffer, The frequency of the reference clock is adjusted based on the calculated accumulation amount.

このような構成により、仮想的なバッファの評価値として、仮想的な蓄積量を計算することができるため、ストリーム処理装置におけるクロックの調整を正確に行うことができる。   With such a configuration, since the virtual accumulation amount can be calculated as the evaluation value of the virtual buffer, the clock in the stream processing apparatus can be adjusted accurately.

(10)好ましくは、上記ストリーム処理装置は、さらに、上記パケットのペイロードに対して所定の処理を行うためのペイロード処理部を備え、上記ペイロード処理部は、上記クロック再生用情報および上記時刻情報が同期している場合には、上記基準クロックのタイミングに従って上記所定の処理を行う。   (10) Preferably, the stream processing apparatus further includes a payload processing unit for performing predetermined processing on the payload of the packet, and the payload processing unit stores the clock reproduction information and the time information. If they are synchronized, the predetermined processing is performed according to the timing of the reference clock.

このように、クロック再生用情報および時刻情報が同期していると、ストリーム処理装置は、クロック再生用情報によりクロックを再生させるための、受信したパケットに対するゲート動作を行う必要がないので、速やかに上記パケットに所定の処理を行うことができる。   As described above, when the clock reproduction information and the time information are synchronized, the stream processing apparatus does not need to perform a gate operation on the received packet to reproduce the clock based on the clock reproduction information. Predetermined processing can be performed on the packet.

また、クロック再生用情報によりクロックを再生させるための動作が不要になるので、ストリーム処理装置における処理負担を軽減することができ、かつゲートおよび当該ゲートにおけるバッファも不要となる。   In addition, since the operation for regenerating the clock by the information for clock recovery is not necessary, the processing load on the stream processing apparatus can be reduced, and the gate and the buffer in the gate are also unnecessary.

(11)また、この発明のある局面に係わるストリーム処理方法は、1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置におけるストリーム処理方法であって、上記パケットはヘッダおよびペイロードを含み、上記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、上記複数のパケットの各々のヘッダは時刻情報を含み、基準クロックを生成するステップと、上記基準クロックに基づいてカウント値を更新するステップと、上記カウント値および上記時刻情報に基づいて、上記基準クロックの周波数を調整するステップとを含む。   (11) A stream processing method according to an aspect of the present invention is a stream processing method in a stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets, and the packet Includes a header and a payload, at least some headers of the plurality of packets include information for clock recovery, each header of the plurality of packets includes time information, and generates a reference clock; and the reference clock And updating the count value based on the above and adjusting the frequency of the reference clock based on the count value and the time information.

このように、カウント値および時刻情報は、ストリーム処理装置がパケットを受信した時刻から取得することができるので、クロック生成部を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつゲートにおけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置がパケットを受信した時刻から、当該パケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。   As described above, the count value and the time information can be acquired from the time when the stream processing apparatus receives the packet, so that the processing for controlling the clock generation unit and the processing for decoding can be started from the time, In addition, the buffer at the gate is not necessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing apparatus receives the packet until the packet is decoded, for example.

また、ストリーム処理装置におけるクロックに基づいたカウント値、およびVODサーバ等の局側装置におけるクロックに基づいた時刻情報を利用することにより、ストリーム処理装置におけるクロックを、局側装置におけるクロックに同期させることができる。   Also, by using the count value based on the clock in the stream processing device and the time information based on the clock in the station side device such as the VOD server, the clock in the stream processing device is synchronized with the clock in the station side device. Can do.

このように、カウント値が局側装置におけるクロックと同期するので、ストリーム処理装置は、ストリーム処理装置におけるクロックに基づいて処理を行うことにより、局側装置におけるクロックに基づいて作成されたストリームを、局側装置におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。   In this way, since the count value is synchronized with the clock in the station side device, the stream processing device performs processing based on the clock in the stream processing device, so that the stream created based on the clock in the station side device is Each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station side device.

(12)また、この発明のある局面に係わるストリーム処理プログラムは、1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置において用いられるストリーム処理プログラムであって、上記パケットはヘッダおよびペイロードを含み、上記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、上記複数のパケットの各々のヘッダは時刻情報を含み、コンピュータに、基準クロックを生成するステップと、上記基準クロックに基づいてカウント値を更新するステップと、上記カウント値および上記時刻情報に基づいて、上記基準クロックの周波数を調整するステップとを実行させるためのプログラムである。   (12) A stream processing program according to an aspect of the present invention is a stream processing program used in a stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets, The packet includes a header and a payload; at least some of the headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information; and generating a reference clock to the computer And a step of updating a count value based on the reference clock and a step of adjusting the frequency of the reference clock based on the count value and the time information.

このように、カウント値および時刻情報は、ストリーム処理装置がパケットを受信した時刻から取得することができるので、クロック生成部を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつゲートにおけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置がパケットを受信した時刻から、当該パケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。   As described above, the count value and the time information can be acquired from the time when the stream processing apparatus receives the packet, so that the processing for controlling the clock generation unit and the processing for decoding can be started from the time, In addition, the buffer at the gate is not necessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing apparatus receives the packet until the packet is decoded, for example.

また、ストリーム処理装置におけるクロックに基づいたカウント値、およびVODサーバ等の局側装置におけるクロックに基づいた時刻情報を利用することにより、ストリーム処理装置におけるクロックを、局側装置におけるクロックに同期させることができる。   Also, by using the count value based on the clock in the stream processing device and the time information based on the clock in the station side device such as the VOD server, the clock in the stream processing device is synchronized with the clock in the station side device. Can do.

このように、カウント値が局側装置におけるクロックと同期するので、ストリーム処理装置は、ストリーム処理装置におけるクロックに基づいて処理を行うことにより、局側装置におけるクロックに基づいて作成されたストリームを、局側装置におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。   In this way, since the count value is synchronized with the clock in the station side device, the stream processing device performs processing based on the clock in the stream processing device, so that the stream created based on the clock in the station side device is Each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station side device.

本発明によれば、ストリームを処理する構成において、遅延時間を増大させることなく、基準クロックの周波数を調整することが可能なストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムを提供することである。   The present invention provides a stream processing device, a stream processing method, and a stream processing program that can adjust the frequency of a reference clock without increasing the delay time in a stream processing configuration.

本発明の実施の形態に係るストリーム処理システムの構成を示す図である。It is a figure which shows the structure of the stream processing system which concerns on embodiment of this invention. 本発明の実施の形態に係るストリーム処理装置において処理されるストリームの一例を示す図である。It is a figure which shows an example of the stream processed in the stream processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係るストリーム処理装置の構成を示す図である。It is a figure which shows the structure of the stream processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係るストリーム処理装置において仮想バッファを用いて算出した平均仮想滞留時間に基づいてTTSクロックの再生処理を行う際の動作手順を定めたフローチャートである。It is the flowchart which defined the operation | movement procedure at the time of performing the reproduction | regeneration process of a TTS clock based on the average virtual residence time calculated using the virtual buffer in the stream processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係るストリーム処理装置において仮想バッファにおける仮想蓄積量の算出処理を行う際の動作手順を定めたフローチャートである。It is the flowchart which defined the operation | movement procedure at the time of performing the calculation process of the virtual accumulation | storage amount in a virtual buffer in the stream processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係るストリーム処理装置において仮想バッファを用いて算出した平均仮想蓄積量に基づいてTTSクロックの再生処理を行う際の動作手順を定めたフローチャートである。It is the flowchart which defined the operation | movement procedure at the time of performing the reproduction | regeneration process of a TTS clock based on the average virtual accumulation amount calculated using the virtual buffer in the stream processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係るストリーム処理装置において受信したTTSパケットを処理する際の動作手順を定めたフローチャートである。It is the flowchart which defined the operation | movement procedure at the time of processing the TTS packet received in the stream processing apparatus which concerns on embodiment of this invention.

以下、本発明の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals and description thereof will not be repeated.

[ストリーム処理システムの概要]
図1は、本発明の実施の形態に係るストリーム処理システムの構成を示す図である。
図1を参照して、ストリーム処理システム13は、VODサーバ等の局側装置10と、ストリーム処理装置20と、表示装置12とを備える。なお、局側装置10は、ネットワーク11を経由してストリーム処理装置20と接続される。
[Overview of stream processing system]
FIG. 1 is a diagram showing a configuration of a stream processing system according to an embodiment of the present invention.
Referring to FIG. 1, the stream processing system 13 includes a station side device 10 such as a VOD server, a stream processing device 20, and a display device 12. The station apparatus 10 is connected to the stream processing apparatus 20 via the network 11.

局側装置10は、1または複数の番組の情報を含むストリームをネットワーク11経由で送信する。ネットワーク11は、たとえばインターネットであり、局側装置10およびストリーム処理装置20は、IP(Internet Protocol)によりストリームを送受信する。   The station-side device 10 transmits a stream including information on one or more programs via the network 11. The network 11 is, for example, the Internet, and the station-side device 10 and the stream processing device 20 transmit and receive streams using IP (Internet Protocol).

図2は、本発明の実施の形態に係るストリーム処理装置において処理されるストリームの一例を示す図である。
図2を参照して、図2の(A)は、たとえばMPEG2−TS(Moving Picture Experts Group 2 Transport Stream)規格のコンテナ形式を用いて、局側装置から送信されるストリームを示し、当該ストリームには、番組の情報が含まれる。
FIG. 2 is a diagram showing an example of a stream processed in the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 2, (A) in FIG. 2 shows a stream transmitted from a station side apparatus using, for example, a container format of MPEG2-TS (Moving Picture Experts Group 2 Transport Stream) standard. Includes program information.

MPEG2―TSは、複数のTSパケットを含む。TSパケットは、188バイトのデータを有し、TSヘッダおよびペイロードを含む。V1、V2、V3およびV4等で示されるビデオTSパケットは、ペイロードにおいて、たとえばMPEG2またはH.264/AVC等により上記番組の情報を符号化したビデオデータであるビデオES(Elementary Stream)を含む。また、TSヘッダは、ペイロードに含まれるビデオデータに対応するPID(Packet Identifier)等の情報を含む。   MPEG2-TS includes a plurality of TS packets. The TS packet has 188 bytes of data and includes a TS header and a payload. Video TS packets indicated by V1, V2, V3, V4, etc. are, for example, MPEG2 or H.264 in the payload. It includes a video ES (Elementary Stream) which is video data obtained by encoding the program information by H.264 / AVC or the like. Further, the TS header includes information such as a PID (Packet Identifier) corresponding to video data included in the payload.

A1で示されるオーディオTSパケットは、ペイロードにおいて、音声情報を符号化したオーディオデータであるオーディオES(Elementary Stream)を含む。また、TSヘッダは、ペイロードに含まれるオーディオデータに対応するPID等の情報を含む。   The audio TS packet indicated by A1 includes an audio ES (Elementary Stream) that is audio data obtained by encoding audio information in the payload. The TS header includes information such as PID corresponding to the audio data included in the payload.

PCR(Program Clock Reference)で示されるPCRパケットは、TSヘッダに含まれるアダプテーションフィールドにおいて、PCRを含む。PCRは、たとえばストリーム処理装置20のSTC(System Time Clock)またはPCRクロックを、局側装置で用いられるPCRクロックと同期させるために用いる。以下、局側装置10におけるPCRクロックを局側PCRクロックと称する。   A PCR packet indicated by PCR (Program Clock Reference) includes PCR in an adaptation field included in the TS header. The PCR is used, for example, to synchronize the STC (System Time Clock) or the PCR clock of the stream processing device 20 with the PCR clock used in the station side device. Hereinafter, the PCR clock in the station side device 10 is referred to as a station side PCR clock.

NULLで示されるヌルパケットは、データを含まないTSパケットであり、0x1FFFのPIDで示される。TSストリームが放送波により送信される場合、所定の周波数帯域および時間を占有して送信することから、送信するデータ量が少ない際にヌルパケットをTSストリームに挿入することにより、伝送ビットレートの調整が行われる。   A null packet indicated by NULL is a TS packet not including data, and is indicated by a PID of 0x1FFF. When a TS stream is transmitted by broadcast waves, the transmission bit rate is adjusted by inserting a null packet into the TS stream when the amount of data to be transmitted is small because it occupies a predetermined frequency band and time. Is done.

一方、図1に示すようなインターネット等のネットワーク11を経由して局側装置10からストリームを送信する場合、送信するデータ量を減らすことにより情報伝送に必要な周波数帯域および時間を節約することが好ましい。   On the other hand, when a stream is transmitted from the station-side device 10 via the network 11 such as the Internet as shown in FIG. 1, the frequency band and time required for information transmission can be saved by reducing the amount of data to be transmitted. preferable.

従って、局側装置10は、たとえば図2の(A)に示すMPEG2−TSをネットワーク11経由で再送信する際に、ヌルパケット等の番組の情報に関係のないTSパケットを削除した、図2の(B)に示すたとえばMPEG2−TTS(Timestamped TS)に変換する。これにより、局側装置10は、情報伝送に必要な周波数帯域および時間を節約することができる。   Therefore, when the station side apparatus 10 retransmits, for example, the MPEG2-TS shown in FIG. 2A via the network 11, the TS packet unrelated to program information such as a null packet is deleted. For example, it is converted into MPEG2-TTS (Timestamped TS) shown in (B) of FIG. Thereby, the station side apparatus 10 can save the frequency band and time required for information transmission.

ネットワーク11経由で送信されるストリームには、複数のTTSパケットが含まれる。TTSパケットは、4バイトのTTSヘッダがTSパケットに付加されたパケットであり、192バイトの大きさを持つ。TTSヘッダには、4バイトのタイムスタンプが含まれる。なお、TTSヘッダは、TSヘッダに含められてもよい。   A stream transmitted via the network 11 includes a plurality of TTS packets. The TTS packet is a packet in which a 4-byte TTS header is added to the TS packet, and has a size of 192 bytes. The TTS header includes a 4-byte time stamp. Note that the TTS header may be included in the TS header.

ストリーム処理装置20は、ネットワーク11経由で局側装置10からTTSパケットを受信すると、受信したTTSパケットに含まれる符号化された番組の情報をデコーダにおいてデコードし、デコードした番組画像および音声情報を、たとえば表示装置12において再生させる。   When the stream processing apparatus 20 receives the TTS packet from the station side apparatus 10 via the network 11, the decoder decodes the encoded program information included in the received TTS packet, and the decoded program image and audio information For example, it is reproduced on the display device 12.

しかしながら、局側装置10がネットワーク11経由でストリームを送信する場合、ネットワーク11における伝送速度、通信経路、中継機器の処理能力または回線の混雑度等の揺らぎ、およびNULLパケットの削除等により上記ストリームに含まれるパケットが局側装置10からストリーム処理装置20までの伝送時間は、パケット毎にばらついてしまう。このため、以下の問題が発生する。   However, when the station-side device 10 transmits a stream via the network 11, the stream is transferred to the stream due to fluctuations in the transmission speed, communication path, processing capability of the relay device, line congestion, etc. in the network 11 and deletion of NULL packets. The transmission time of included packets from the station side device 10 to the stream processing device 20 varies for each packet. For this reason, the following problems occur.

すなわち、局側装置10は、放送波によりストリームの各パケットを送信する際は、当該各パケットが送信される時刻の差である相対送信タイミングを、当該各パケットをデコーダへ投入すべき時刻の差である相対デコードタイミングに合わせて、当該各パケットを送信する。具体的には、局側装置10は、たとえば第一のパケットに続く第二のパケットをデコーダへ投入すべきタイミングが第一のパケットの1秒後である場合、第二のパケットを第一のパケットの1秒後に放送波により送信する。   That is, when the station side device 10 transmits each packet of a stream by a broadcast wave, the station side device 10 indicates the relative transmission timing that is the difference in time at which each packet is transmitted, and the difference in time at which each packet should be input to the decoder. Each packet is transmitted in accordance with the relative decoding timing. Specifically, for example, when the timing at which the second packet following the first packet is to be input to the decoder is 1 second after the first packet, the station-side device 10 transmits the second packet to the first packet. Transmit by broadcast wave 1 second after packet.

局側装置10が放送波によりストリームのパケットを送信する場合、パケットが局側装置10からストリーム処理装置20へ到達するまでの伝送時間は、全てのパケットにおいて一定である。   When the station-side device 10 transmits a stream packet by broadcast waves, the transmission time until the packet reaches the stream processing device 20 from the station-side device 10 is constant in all packets.

従って、ストリーム処理装置20は、放送波によりストリームを受信する際は、受信した上記ストリームの各パケットを、受信したタイミングでデコーダへ投入することにより、相対デコードタイミングを保持したまま当該各パケットをデコーダへ投入することができる。   Therefore, when receiving the stream by the broadcast wave, the stream processing device 20 inputs each packet of the received stream to the decoder at the received timing, thereby decoding each packet while maintaining the relative decoding timing. Can be thrown into.

一方、局側装置10がネットワーク11経由でストリームを送信する場合、局側装置10からストリーム処理装置20までのパケットの伝送時間は、パケット毎にばらついてしまう。   On the other hand, when the station side device 10 transmits a stream via the network 11, the packet transmission time from the station side device 10 to the stream processing device 20 varies for each packet.

従って、ストリーム処理装置20は、ネットワーク11経由で受信した上記ストリームの各パケットを、受信したタイミングでデコーダへ投入しても、相対デコードタイミングを保持したまま当該各パケットをデコーダへ投入することができない。これにより、ストリーム処理装置20は、上記ストリームに含まれる番組の情報を適切に再生することができなくなる。   Therefore, even if the stream processing apparatus 20 inputs each packet of the stream received via the network 11 to the decoder at the reception timing, the stream processing apparatus 20 cannot input each packet to the decoder while maintaining the relative decoding timing. . As a result, the stream processing apparatus 20 cannot appropriately reproduce the program information included in the stream.

このため、局側装置10は、各TSパケットをデコーダへ投入すべき相対デコードタイミングを示す時刻情報を、27MHzの局側装置10におけるTTSクロックに基づいて生成する。そして、局側装置10は、上記TSパケットに、生成した時刻情報をTTSタイムスタンプとして含むTTSヘッダを付加することによりTTSパケットを作成し、作成したTTSパケットをネットワーク11経由で送信する。以下、局側装置10におけるTTSクロックを局側TTSクロックと称する。   For this reason, the station side device 10 generates time information indicating the relative decoding timing at which each TS packet should be input to the decoder based on the TTS clock in the station side device 10 of 27 MHz. The station side device 10 creates a TTS packet by adding a TTS header including the generated time information as a TTS time stamp to the TS packet, and transmits the created TTS packet via the network 11. Hereinafter, the TTS clock in the station side device 10 is referred to as a station side TTS clock.

ストリーム処理装置20は、自己における基準クロックを局側TTSクロックに同期させることができれば、受信したTTSパケットにおけるTTSタイムスタンプに基づいて、相対デコードタイミングでパケットをデコーダへ投入することができる。   If the stream processing apparatus 20 can synchronize its own reference clock with the station-side TTS clock, the stream processing apparatus 20 can input the packet to the decoder at the relative decoding timing based on the TTS time stamp in the received TTS packet.

[ストリーム処理装置の構成]
図3は、本発明の実施の形態に係るストリーム処理装置の構成を示す図である。
図3を参照して、ストリーム処理装置20は、タイムスタンプ取得部21と、TTSゲート部22と、仮想バッファ演算部(クロック調整部)23と、TTSカウンタ部(カウンタ)24と、TTSクロック調整部(クロック調整部)25と、TTSクロック生成部26と、デマックス部27と、PCR回復部28と、ビデオESバッファ29と、ビデオデコーダ部(ペイロード処理部)30と、オーディオESバッファ31と、オーディオデコーダ部(ペイロード処理部)32とを備える。
[Configuration of stream processing device]
FIG. 3 is a diagram showing the configuration of the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 3, the stream processing apparatus 20 includes a time stamp acquisition unit 21, a TTS gate unit 22, a virtual buffer calculation unit (clock adjustment unit) 23, a TTS counter unit (counter) 24, and a TTS clock adjustment. Unit (clock adjustment unit) 25, TTS clock generation unit 26, demax unit 27, PCR recovery unit 28, video ES buffer 29, video decoder unit (payload processing unit) 30, audio ES buffer 31, And an audio decoder unit (payload processing unit) 32.

タイムスタンプ取得部21は、ストリーム処理装置20が受信したストリームに含まれるTTSパケットのTTSヘッダからTTSタイムスタンプを取得し、取得したTTSタイムスタンプを仮想バッファ演算部23へ出力する。そして、タイムスタンプ取得部21は、TTSタイムスタンプを取得済のTTSパケットを、TTSゲート部22へ出力する。   The time stamp acquisition unit 21 acquires the TTS time stamp from the TTS header of the TTS packet included in the stream received by the stream processing device 20, and outputs the acquired TTS time stamp to the virtual buffer calculation unit 23. Then, the time stamp acquisition unit 21 outputs the TTS packet for which the TTS time stamp has been acquired to the TTS gate unit 22.

TTSゲート部22は、タイムスタンプ取得部21からTTSパケットを受けると、受けたTTSパケットのTTSタイムスタンプおよびTTSカウンタ部24におけるカウント値に基づいてゲート動作を行う。より詳細には、TTSゲート部22は、TTSパケットを受けると、TTSカウンタ部24からのカウント値を監視し、当該カウント値が当該TTSパケットのTTSタイムスタンプと一致すると、当該TTSパケットからTTSヘッダを削除することによりTSパケットを作成し、作成したTSパケットをデマックス部27へ出力する。   When receiving the TTS packet from the time stamp acquisition unit 21, the TTS gate unit 22 performs a gate operation based on the TTS time stamp of the received TTS packet and the count value in the TTS counter unit 24. More specifically, when receiving the TTS packet, the TTS gate unit 22 monitors the count value from the TTS counter unit 24, and when the count value matches the TTS timestamp of the TTS packet, the TTS header The TS packet is created by deleting, and the created TS packet is output to the demux unit 27.

また、TTSゲート部22は、ストリームにおけるTTSパケットのTTSタイムスタンプ、および後述するPCRパケットのPCRが同期している場合、ゲート動作を行わない。ここでいう同期とは、TTSタイムスタンプおよびPCRが同一のクロックにより生成されるカウント値であることを意味する。   Further, the TTS gate unit 22 does not perform the gate operation when the TTS time stamp of the TTS packet in the stream and the PCR of the PCR packet described later are synchronized. Here, the synchronization means that the TTS time stamp and the PCR are count values generated by the same clock.

たとえば、TTSゲート部22は、複数のPCRパケットからPCR、および上記PCRパケットのTTSタイムスタンプを取得する。そして、TTSゲート部22は、取得した各パケットにおけるPCRおよびTTSタイムスタンプの差が一定である場合、TTSタイムスタンプおよびPCRが同期していると判断する。なお、ストリーム処理システム上同期していることが定まっていれば、すなわち局側装置10において同期していることが定まっていれば、特に判断の必要はない。   For example, the TTS gate unit 22 acquires a PCR from a plurality of PCR packets and a TTS time stamp of the PCR packet. The TTS gate unit 22 determines that the TTS time stamp and the PCR are synchronized when the difference between the PCR and the TTS time stamp in each acquired packet is constant. If it is determined that the stream processing system is synchronized, that is, if it is determined that the station side device 10 is synchronized, there is no need to make a determination.

TTSクロック生成部26は、ストリーム処理装置20における基準クロックであるTTSクロックを生成する。TTSクロック生成部26によって生成されたTTSクロックは、TTSカウンタ部24または図示しないPCRカウンタに用いる27MHzの基準クロックとして用いられる。具体的には、TTSクロック生成部26は、VCXO(Voltage Controlled Xtal Oscillator)を含み、たとえば水晶などの結晶を用いた発振器である。VCXOへ出力する電圧を調整することにより、VCXOの共鳴周波数が変化する。   The TTS clock generation unit 26 generates a TTS clock that is a reference clock in the stream processing device 20. The TTS clock generated by the TTS clock generation unit 26 is used as a 27 MHz reference clock used for the TTS counter unit 24 or a PCR counter (not shown). Specifically, the TTS clock generation unit 26 includes a VCXO (Voltage Controlled Xtal Oscillator) and is an oscillator using a crystal such as a crystal. By adjusting the voltage output to the VCXO, the resonance frequency of the VCXO changes.

TTSクロック生成部26は、たとえばVCXOにより生成したクロックをTTSカウンタ部24へ出力する。また、TTSクロック調整部25によりVCXOへ出力する電圧が調整され、これによりTTSクロック生成部26がTTSカウンタ部24へ出力するクロックの周波数が変化する。以下、ストリーム処理装置20におけるTTSクロックをローカルTTSクロックと称する場合がある。   The TTS clock generation unit 26 outputs a clock generated by, for example, VCXO to the TTS counter unit 24. Further, the voltage output to the VCXO is adjusted by the TTS clock adjustment unit 25, whereby the frequency of the clock output from the TTS clock generation unit 26 to the TTS counter unit 24 is changed. Hereinafter, the TTS clock in the stream processing device 20 may be referred to as a local TTS clock.

TTSカウンタ部24は、たとえばTTSクロック生成部26から受けたクロックに基づいて、TTSカウント値を更新する。そして、TTSカウンタ部24は、更新したカウント値をTTSゲート部22および仮想バッファ演算部23へ出力する。具体的には、TTSカウント値は、たとえばクロックを受けるごとにTTSカウント値をインクリメントする。従って、TTSカウンタ部24は、時間が経過するに従い、TTSクロックと同期してカウント値を増加させる。これにより、カウント値は、現在時刻として利用でき、当該カウント値の大小関係から時系列の前後関係を取得することができる。   The TTS counter unit 24 updates the TTS count value based on the clock received from the TTS clock generation unit 26, for example. Then, the TTS counter unit 24 outputs the updated count value to the TTS gate unit 22 and the virtual buffer calculation unit 23. Specifically, the TTS count value is incremented every time a clock is received, for example. Therefore, the TTS counter unit 24 increases the count value in synchronization with the TTS clock as time elapses. As a result, the count value can be used as the current time, and the time-series context can be acquired from the magnitude relationship of the count value.

仮想バッファ演算部23は、TTSカウンタ部24から取得したTTSカウント値およびタイムスタンプ取得部21から受けたTTSタイムスタンプに基づいて、仮想的なバッファの評価値として仮想バッファ滞留時間および仮想バッファ蓄積量を計算する。そして、仮想バッファ演算部23は、計算した仮想バッファ滞留時間および仮想バッファ蓄積量に応じて、ローカルTTSクロックの周波数が、局側TTSクロックと比べて高い、低いまたは適切かどうかを判断し、判断した結果をTTSクロック調整部25へ通知する。   Based on the TTS count value acquired from the TTS counter unit 24 and the TTS time stamp received from the time stamp acquisition unit 21, the virtual buffer calculation unit 23 uses the virtual buffer residence time and the virtual buffer storage amount as the virtual buffer evaluation values. Calculate Then, the virtual buffer calculation unit 23 determines whether the frequency of the local TTS clock is higher, lower, or appropriate than the local TTS clock according to the calculated virtual buffer residence time and the virtual buffer accumulation amount. The result is notified to the TTS clock adjustment unit 25.

より詳細には、仮想バッファ演算部23は、仮想バッファ滞留時間を計算する際には、以下の動作を行う。すなわち、仮想バッファ演算部23は、ユーザによる番組選択またはエラー発生等の後、最初のTTSタイムスタンプをタイムスタンプ取得部21から受けると、TTSカウンタ部24におけるカウント値を、当該最初のTTSタイムスタンプで初期化する。そして、仮想バッファ演算部23は、タイムスタンプ取得部21からTTSタイムスタンプを受けると共に、TTSカウンタ部24から現在の時刻を示すTTSカウント値を取得する。上記TTSカウント値は、ストリーム処理装置20が上記TTSタイムスタンプに対応するTTSパケットを受信した時刻を示す。   More specifically, the virtual buffer calculation unit 23 performs the following operation when calculating the virtual buffer residence time. That is, when the virtual buffer calculation unit 23 receives the first TTS time stamp from the time stamp acquisition unit 21 after the user selects a program or an error occurs, the virtual buffer calculation unit 23 uses the count value in the TTS counter unit 24 as the first TTS time stamp. Initialize with. The virtual buffer calculation unit 23 receives a TTS time stamp from the time stamp acquisition unit 21 and acquires a TTS count value indicating the current time from the TTS counter unit 24. The TTS count value indicates the time when the stream processing apparatus 20 receives a TTS packet corresponding to the TTS time stamp.

そして、仮想バッファ演算部23は、上記TTSタイムスタンプおよび上記TTSカウント値の差を計算し、計算した差を仮想バッファにおける仮想滞留時間を示すΔtとする。仮想バッファ演算部23は、複数のTTSパケットに対してΔtを計算し、計算した複数のΔtに基づいてΔtの傾向を分析する。   Then, the virtual buffer calculation unit 23 calculates the difference between the TTS time stamp and the TTS count value, and sets the calculated difference as Δt indicating the virtual residence time in the virtual buffer. The virtual buffer calculation unit 23 calculates Δt for a plurality of TTS packets, and analyzes the tendency of Δt based on the calculated plurality of Δt.

この際、仮想バッファ演算部23は、たとえば計算した2つのΔtから、Δtの傾向を分析してもよい。また、仮想バッファ演算部23は、たとえば複数のΔtの移動平均を示すAvgΔtを計算し、計算したAvgΔtに基づいてAvgΔtの傾向を分析してもよい。   At this time, the virtual buffer calculation unit 23 may analyze the tendency of Δt from two calculated Δt, for example. The virtual buffer calculation unit 23 may calculate, for example, AvgΔt indicating a moving average of a plurality of Δt, and analyze the tendency of AvgΔt based on the calculated AvgΔt.

仮想バッファ演算部23は、たとえばΔtまたはAvgΔtが増加傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて低いと判断する。仮想バッファ演算部23がこの際行う判断の詳細については、後述する。   For example, when Δt or AvgΔt tends to increase, the virtual buffer calculation unit 23 determines that the frequency of the local TTS clock is lower than the frequency of the station-side TTS clock. Details of the determination performed by the virtual buffer calculation unit 23 will be described later.

また、仮想バッファ演算部23は、たとえばΔtまたはAvgΔtが減少傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高いと判断する。また、仮想バッファ演算部23は、たとえばΔtまたはAvgΔtが一定である場合、ローカルTTSクロックの周波数および局側TTSクロックの周波数が同じであると判断する。   For example, when Δt or AvgΔt tends to decrease, the virtual buffer calculation unit 23 determines that the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock. For example, when Δt or AvgΔt is constant, the virtual buffer calculation unit 23 determines that the frequency of the local TTS clock and the frequency of the station-side TTS clock are the same.

そして、仮想バッファ演算部23は、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて、高い、低いまたは同じのいずれかを示す上記判断結果をクロック調整部25へ通知する。   Then, the virtual buffer calculation unit 23 notifies the clock adjustment unit 25 of the determination result indicating whether the frequency of the local TTS clock is higher, lower, or the same as the frequency of the local TTS clock.

また、仮想バッファ演算部23は、仮想バッファ蓄積量を計算する際には、以下の動作を行う。すなわち、仮想バッファ演算部23は、タイムスタンプ取得部21からTTSタイムスタンプを受けると共に、仮想蓄積量であるSnに192を加える。192は、TTSパケットのバイト数を示す。   Further, the virtual buffer calculation unit 23 performs the following operations when calculating the virtual buffer accumulation amount. That is, the virtual buffer calculation unit 23 receives the TTS time stamp from the time stamp acquisition unit 21 and adds 192 to Sn which is the virtual accumulation amount. 192 indicates the number of bytes of the TTS packet.

そして、仮想バッファ演算部23は、上記TTSタイムスタンプを、上記TTSタイムスタンプに対応するTTSパケットが仮想バッファを出る時刻とみなし、TTSカウンタ部24におけるTTSカウント値を監視することにより、TTSカウント値が上記時刻を示すタイミングにおいて以下の動作を行う。   Then, the virtual buffer calculation unit 23 regards the TTS time stamp as the time when the TTS packet corresponding to the TTS time stamp leaves the virtual buffer, and monitors the TTS count value in the TTS counter unit 24 to thereby obtain the TTS count value. The following operations are performed at the timing indicating the above time.

すなわち、仮想バッファ演算部23は、TTSカウント値および上記TTSタイムスタンプが一致すると、仮想バッファにおける仮想蓄積量であるSnから192を減算する。仮想バッファ演算部23は、上記処理を、複数のTTSパケットについて行うことによりSnを計算する。言い換えれば、仮想バッファ演算部23は、TTSパケットのTTSタイムスタンプが、TTSカウント値以上であるTTSパケットを選択し、選択したTTSパケットの大きさの合計であるSnを算出する。   That is, when the TTS count value and the TTS time stamp coincide with each other, the virtual buffer calculation unit 23 subtracts 192 from Sn that is the virtual accumulation amount in the virtual buffer. The virtual buffer calculation unit 23 calculates Sn by performing the above processing on a plurality of TTS packets. In other words, the virtual buffer calculation unit 23 selects a TTS packet whose TTS time stamp of the TTS packet is equal to or greater than the TTS count value, and calculates Sn, which is the total size of the selected TTS packet.

仮想バッファ演算部23は、たとえばTTSカウンタ部24におけるTTSカウント値を監視し、当該TTSカウント値が所定の値を増加させる毎にSnを取得し、取得した複数のSnに基づいてSnの傾向を分析する。   The virtual buffer calculation unit 23 monitors, for example, the TTS count value in the TTS counter unit 24, acquires Sn every time the TTS count value increases a predetermined value, and displays the tendency of Sn based on the plurality of acquired Sn. analyse.

この際、仮想バッファ演算部23は、たとえば計算した2つのSnからSnの傾向を分析してもよい。また、仮想バッファ演算部23は、たとえば複数のSnの移動平均を示すAvgSnを計算し、計算したAvgSnに基づいてAvgSnの傾向を分析してもよい。   At this time, the virtual buffer calculation unit 23 may analyze, for example, the calculated two Sn to Sn trends. The virtual buffer calculation unit 23 may calculate, for example, AvgSn indicating a moving average of a plurality of Sns, and analyze the trend of AvgSn based on the calculated AvgSn.

仮想バッファ演算部23は、たとえばSnまたはAvgSnが増加傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて低いと判断する。仮想バッファ演算部23がこの際行う判断の詳細については、後述する。   For example, when Sn or AvgSn tends to increase, the virtual buffer calculation unit 23 determines that the frequency of the local TTS clock is lower than the frequency of the local TTS clock. Details of the determination performed by the virtual buffer calculation unit 23 will be described later.

また、仮想バッファ演算部23は、たとえばSnまたはAvgSnが減少傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高いと判断する。また、仮想バッファ演算部23は、たとえばSnまたはAvgSnが一定である場合、ローカルTTSクロックの周波数および局側TTSクロックの周波数が同じであると判断する。   For example, when Sn or AvgSn tends to decrease, the virtual buffer calculation unit 23 determines that the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock. For example, if Sn or AvgSn is constant, the virtual buffer calculation unit 23 determines that the frequency of the local TTS clock and the frequency of the station TTS clock are the same.

そして、仮想バッファ演算部23は、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて、高い、低いまたは同じのいずれかを示す上記判断結果をクロック調整部25へ通知する。   Then, the virtual buffer calculation unit 23 notifies the clock adjustment unit 25 of the determination result indicating whether the frequency of the local TTS clock is higher, lower, or the same as the frequency of the local TTS clock.

TTSクロック調整部25は、仮想バッファ演算部23からの判断結果に基づいて、TTSクロック生成部26におけるTTSクロックの周波数を調整する。具体的には、TTSクロック調整部25は、TTSクロックの周波数が局側TTSクロックの周波数と比べて低いことを示す判断結果を仮想バッファ演算部23から受けると、TTSクロック生成部26におけるVCXOへ出力する電圧を調整することにより、TTSクロックの周波数を高くする。   The TTS clock adjustment unit 25 adjusts the frequency of the TTS clock in the TTS clock generation unit 26 based on the determination result from the virtual buffer calculation unit 23. Specifically, when the TTS clock adjustment unit 25 receives a determination result indicating that the frequency of the TTS clock is lower than the frequency of the station-side TTS clock from the virtual buffer calculation unit 23, the TTS clock adjustment unit 25 performs the VCTSO in the TTS clock generation unit 26. The frequency of the TTS clock is increased by adjusting the output voltage.

また、TTSクロック調整部25は、TTSクロックの周波数が局側TTSクロックの周波数と比べて高いことを示す判断結果を仮想バッファ演算部23から受けると、TTSクロック生成部26におけるVCXOへ出力する電圧を調整することにより、TTSクロックの周波数を低くする。   When the TTS clock adjustment unit 25 receives a determination result indicating that the frequency of the TTS clock is higher than the frequency of the TTS clock on the station side from the virtual buffer calculation unit 23, the voltage output to the VCXO in the TTS clock generation unit 26 Is adjusted to lower the frequency of the TTS clock.

デマックス部27は、たとえばTTSゲート部22から受けたビデオTSパケット、オーディオTSパケットまたはPCRパケット等のTSパケットを、PIDで識別して分離する。より詳細には、デマックス部27は、TTSゲート部22からビデオTSパケットを受けると、受けたビデオTSパケットをTSヘッダおよびペイロードに分離し、分離したペイロードに含まれるビデオデータをビデオESバッファ29へ出力する。   The demux unit 27 identifies and separates TS packets such as video TS packets, audio TS packets, and PCR packets received from the TTS gate unit 22 by PID, for example. More specifically, when receiving a video TS packet from the TTS gate unit 22, the demax unit 27 separates the received video TS packet into a TS header and a payload, and sends video data included in the separated payload to the video ES buffer 29. Output.

また、デマックス部27は、TTSゲート部22からオーディオTSパケットを受けると、受けたオーディオTSパケットをTSヘッダおよびペイロードに分離し、分離したペイロードに含まれるオーディオデータをオーディオESバッファ31へ出力する。   In addition, when receiving the audio TS packet from the TTS gate unit 22, the demax unit 27 separates the received audio TS packet into a TS header and a payload, and outputs the audio data included in the separated payload to the audio ES buffer 31.

また、デマックス部27は、TTSゲート部22からPCRパケットを受けると、受けたPCRパケットをTSヘッダおよびペイロードに分離し、分離したTSヘッダのアダプテーションフィールドに含まれるPCRを取得し、取得したPCRをPCR回復部28へ出力する。   Further, upon receiving the PCR packet from the TTS gate unit 22, the demax unit 27 separates the received PCR packet into a TS header and a payload, acquires the PCR included in the adaptation field of the separated TS header, and acquires the acquired PCR. Output to the PCR recovery unit 28.

PCR回復部28は、デマックス部27からPCRを受けると、受けたPCRおよび図示しないストリーム処理装置20におけるPCRクロックに基づくPCRカウント値を比較する。以下、ストリーム処理装置20におけるPCRクロックをローカルPCRクロックと称する場合がある。   When receiving the PCR from the demax unit 27, the PCR recovery unit 28 compares the received PCR and a PCR count value based on the PCR clock in the stream processing device 20 (not shown). Hereinafter, the PCR clock in the stream processing device 20 may be referred to as a local PCR clock.

PCRは、局側PCRクロックに基づいて付与されるカウント値であるので、PCR回復部28は、複数のPCRパケットにおいて、PCRおよびPCRカウント値の差が一定となるようにローカルPCRクロックの周波数を調整することにより、ローカルPCRクロックを局側PCRクロックに同期させる。   Since the PCR is a count value given based on the local side PCR clock, the PCR recovery unit 28 sets the frequency of the local PCR clock so that the difference between the PCR and the PCR count value is constant in a plurality of PCR packets. By adjusting, the local PCR clock is synchronized with the local PCR clock.

ビデオESバッファ29は、デマックス部27から受けたビデオデータを一時的に保持する。ビデオESバッファ29は、ビデオデコーダ部30の要求に応じて、保持するビデオデータをビデオデコーダ部30へ出力する。   The video ES buffer 29 temporarily holds the video data received from the demax unit 27. The video ES buffer 29 outputs the held video data to the video decoder unit 30 in response to a request from the video decoder unit 30.

ビデオデコーダ部30は、ビデオESバッファ29において保持されるビデオデータをデコード処理する。この際、ビデオデコーダ部30は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期している場合、TTSクロックを基準クロックとして用いる。また、ビデオデコーダ部30は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期していない場合、PCR回復部28により再生されたPCRクロックを基準クロックとして用いる。   The video decoder unit 30 decodes the video data held in the video ES buffer 29. At this time, the video decoder unit 30 uses the TTS clock as a reference clock when the TTS time stamp and the PCR are synchronized in the received stream. In addition, when the TTS time stamp and the PCR are not synchronized in the received stream, the video decoder unit 30 uses the PCR clock reproduced by the PCR recovery unit 28 as a reference clock.

より詳細には、ビデオデコーダ部30は、ビデオESバッファ29において保持される、TTSパケットのペイロードに含まれるビデオPES(Packetized Elementary Stream)のPESヘッダに含まれるDTS(Decoding Time Stamp)およびPTS(Presentation Time Stamp)を参照する。   More specifically, the video decoder unit 30 holds the DTS (Decoding Time Stamp) and PTS (Presentation) included in the PES header of the video PES (Packetized Elementary Stream) included in the payload of the TTS packet held in the video ES buffer 29. See Time Stamp).

DTSは、当該ビデオPESに含まれる番組画像データをデコード処理するタイミングを指定する。PTSは、当該番組画像データをデコード処理して作成した番組画像を提示するタイミングを指定する。   The DTS specifies the timing for decoding the program image data included in the video PES. The PTS designates the timing for presenting a program image created by decoding the program image data.

そして、ビデオデコーダ部30は、DTSが基準クロックと一致すると、上記DTSに対応するPESに含まれるビデオデータをデコード処理することにより、番組画像を作成する。そして、ビデオデコーダ部30は、PTSが基準クロックと一致すると、上記PTSに対応するPESに含まれるビデオデータをデコード処理することにより作成した番組画像を、たとえば表示装置12へ出力する。   When the DTS coincides with the reference clock, the video decoder unit 30 creates a program image by decoding the video data included in the PES corresponding to the DTS. When the PTS matches the reference clock, the video decoder unit 30 outputs a program image created by decoding the video data included in the PES corresponding to the PTS to the display device 12, for example.

オーディオESバッファ31は、デマックス部27から受けたオーディオデータを一時的に保持する。オーディオESバッファ31は、オーディオデコーダ部32の要求に応じて、保持するオーディオデータをオーディオデコーダ部32へ出力する。   The audio ES buffer 31 temporarily holds the audio data received from the demax unit 27. The audio ES buffer 31 outputs the held audio data to the audio decoder unit 32 in response to a request from the audio decoder unit 32.

オーディオデコーダ部32は、オーディオESバッファ31において保持されるオーディオデータをデコード処理する。この際、オーディオデコーダ部32は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期している場合、TTSクロックを基準クロックとして用いる。また、オーディオデコーダ部32は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期していない場合、PCR回復部28により再生されたPCRクロックを基準クロックとして用いる。   The audio decoder unit 32 decodes the audio data held in the audio ES buffer 31. At this time, the audio decoder unit 32 uses the TTS clock as a reference clock when the TTS time stamp and the PCR are synchronized in the received stream. The audio decoder unit 32 uses the PCR clock reproduced by the PCR recovery unit 28 as a reference clock when the TTS time stamp and the PCR are not synchronized in the received stream.

より詳細には、オーディオデコーダ部32は、オーディオESバッファ31において保持される、TTSパケットのペイロードに含まれるオーディオPESのPESヘッダに含まれるPTSを参照する。   More specifically, the audio decoder unit 32 refers to the PTS included in the PES header of the audio PES included in the payload of the TTS packet held in the audio ES buffer 31.

そして、オーディオデコーダ部32は、PTSが基準クロックと一致すると、上記PTSに対応するPESに含まれるオーディオデータをデコード処理することにより作成した音声情報を、たとえば表示装置12へ出力する。   When the PTS matches the reference clock, the audio decoder unit 32 outputs the audio information created by decoding the audio data included in the PES corresponding to the PTS to the display device 12, for example.

[ローカルTTSクロックおよび局側TTSクロックの同期関係]
ところで、特許文献1により示される第一の技術を実装したストリーム処理装置14は、受信したストリームのTTSパケットを、TTSゲート部へ出力する前にバッファに滞留させる。そして、TTSゲート部は、バッファに滞留するTTSパケットの中から、TTSカウント値と一致するTTSタイムスタンプを含むTTSパケットをデマックス部へ出力させる。
[Synchronization of local TTS clock and station TTS clock]
By the way, the stream processing apparatus 14 that implements the first technique disclosed in Patent Document 1 causes the TTS packet of the received stream to stay in the buffer before being output to the TTS gate unit. Then, the TTS gate unit outputs a TTS packet including a TTS time stamp that matches the TTS count value from the TTS packets staying in the buffer to the demax unit.

たとえば、バッファへ入力するTTSパケットの単位時間当たりのバイト数を示す入力レート、およびバッファからデマックス部へ出力するTTSパケットの単位時間当たりのバイト数を示す出力レートが同じであれば、バッファに滞留するTTSパケットのバイト数を示す実蓄積量は、変化しない。   For example, if the input rate indicating the number of bytes per unit time of the TTS packet input to the buffer and the output rate indicating the number of bytes per unit time of the TTS packet output from the buffer to the demux unit are the same, the buffer stays in the buffer. The actual accumulated amount indicating the number of bytes of the TTS packet to be changed does not change.

また、たとえば、入力レートが出力レートより大きいと、実蓄積量は、増加する。また、たとえば、入力レートが出力レートより小さいと、実蓄積量は、減少する。   Further, for example, when the input rate is higher than the output rate, the actual accumulation amount increases. For example, when the input rate is smaller than the output rate, the actual accumulation amount decreases.

入力レートは、局側装置における局側TTSクロックにより決定される。また、出力レートは、ストリーム処理装置14におけるローカルTTSクロックにより決定される。従って、ストリーム処理装置14は、実蓄積量を監視することにより、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高い、低いまたは適正であるかどうかを判断することができる。   The input rate is determined by the station TTS clock in the station apparatus. The output rate is determined by the local TTS clock in the stream processing device 14. Therefore, the stream processing apparatus 14 can determine whether the frequency of the local TTS clock is higher, lower, or appropriate than the frequency of the local TTS clock by monitoring the actual accumulation amount.

しかしながら、上記の動作では、ストリーム処理装置14が新しいストリームを受信する際に、バッファにある程度TTSパケットを滞留させないと、入力レートおよび出力レートの大小関係は判断できない。このため、最初のTTSパケットは、バッファへ入力された後、バッファにある程度ストリームが滞留するまでバッファから出力されない。従って、実蓄積量の評価は、バッファへ入力したTTSパケットがバッファから出力されるまでなされないので、遅延時間が発生してしまう。特に、入力レートが小さい場合、遅延時間が長くなってしまうという問題が発生する。また、たとえばストリーム処理装置14は、受信したパケットがバッファを出てくるまでは、当該パケットを次の処理へ移すことができない。   However, in the above operation, when the stream processing apparatus 14 receives a new stream, the magnitude relationship between the input rate and the output rate cannot be determined unless the TTS packet is retained in the buffer to some extent. For this reason, after the first TTS packet is input to the buffer, it is not output from the buffer until a stream stays in the buffer to some extent. Therefore, since the actual accumulated amount is not evaluated until the TTS packet input to the buffer is output from the buffer, a delay time occurs. In particular, when the input rate is small, there arises a problem that the delay time becomes long. For example, the stream processing device 14 cannot move the received packet to the next process until the received packet comes out of the buffer.

上記問題を解決するために、たとえば第二の技術を実装したストリーム処理装置15が考えられる。ストリーム受信装置15は、受信したストリームのTTSパケットをバッファへ入力するタイミングで、上記タイミングを示す入力時刻を取得する。そして、ストリーム処理装置15は、当該TTSパケットをバッファで滞留させた後、当該TTSパケットのTTSタイムスタンプがTTSカウント値と一致するタイミングで、上記タイミングを示す出力時刻を取得し、当該TTSパケットをデマックス部へ出力させる。ストリーム処理装置15は、出力時刻および入力時刻の差を計算することにより、当該TTSパケットがバッファに実際に滞留した時間を示す実滞留時間を取得する。   In order to solve the above-described problem, for example, a stream processing device 15 that implements the second technique is conceivable. The stream receiving device 15 acquires the input time indicating the above timing at the timing when the TTS packet of the received stream is input to the buffer. Then, after the stream processing device 15 retains the TTS packet in the buffer, the stream processing device 15 acquires an output time indicating the timing at a timing when the TTS timestamp of the TTS packet matches the TTS count value, Output to the demax section. The stream processing device 15 calculates the difference between the output time and the input time, thereby acquiring the actual residence time indicating the time that the TTS packet actually stayed in the buffer.

ストリーム処理装置15は、複数のTTSパケットにおける実滞留時間を取得し、取得した実滞留時間の傾向に基づいて、ストリーム処理装置15におけるローカルTTSクロックの周波数が局側装置における局側TTSクロックの周波数と比べて、高い、低いまたは適正であるかどうかを判断する。   The stream processing device 15 acquires the actual residence time in a plurality of TTS packets, and the frequency of the local TTS clock in the stream processing device 15 is the frequency of the station TTS clock in the station side device based on the acquired tendency of the actual residence time. To determine whether it is high, low or reasonable.

より詳細には、たとえば、ローカルTTSクロックが示す時刻をTとする。また、局側TTSクロックが示す時刻をtとする。Tおよびtの関係は、一般にはT=a×t+bと記述でき、aが1の場合、ローカルTTSクロックおよび局側TTSクロックが同期している。また、a>1の場合、ローカルTTSクロックの周波数は、局側TTSクロックの周波数より高い。また、a<1の場合、ローカルTTSクロックの周波数は、局側TTSクロックの周波数より低い。   More specifically, for example, let T be the time indicated by the local TTS clock. The time indicated by the station TTS clock is t. The relationship between T and t can be generally described as T = a × t + b. When a is 1, the local TTS clock and the station-side TTS clock are synchronized. When a> 1, the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock. When a <1, the frequency of the local TTS clock is lower than the frequency of the station side TTS clock.

たとえば、局側装置は、時刻(t1+L)を示すTTSタイムスタンプを付与したTTSパケットを時刻t1において、ストリーム処理装置15へ送信する。ストリーム処理装置15は、伝送時間を無視できるとして、時刻T1において当該TTSパケットをバッファへ入力する。時刻T1は、時刻(a×t1+b)に対応する。ストリーム処理装置15は、時刻(t1+L)において当該パケットをバッファからデマックス部へ出力させる。従って、実滞留時間を示すD1は、時刻(t1+L)および時刻(a×t1+b)の差である、((1−a)×t1+L−b)となる。   For example, the station side device transmits a TTS packet with a TTS time stamp indicating the time (t1 + L) to the stream processing device 15 at time t1. The stream processing device 15 inputs the TTS packet to the buffer at time T1, assuming that the transmission time can be ignored. Time T1 corresponds to time (a × t1 + b). The stream processing device 15 outputs the packet from the buffer to the demux unit at time (t1 + L). Therefore, D1 indicating the actual residence time is ((1−a) × t1 + L−b), which is the difference between the time (t1 + L) and the time (a × t1 + b).

また、たとえば、局側装置は、時刻(t2+L)を示すTTSタイムスタンプを付与したTTSパケットを、時刻t1より後の時刻t2において、ストリーム処理装置15へ送信する。ストリーム処理装置15は、伝送時間を無視できるとして、時刻T2において当該TTSパケットをバッファへ入力する。時刻T2は、時刻(a×t2+b)に対応する。ストリーム処理装置15は、時刻(t2+L)において当該パケットをバッファからデマックス部へ出力させる。従って、実滞留時間を示すD2は、時刻(t2+L)および時刻(a×t2+b)の差である、((1−a)×t2+L−b)となる。   Further, for example, the station side device transmits a TTS packet with a TTS time stamp indicating the time (t2 + L) to the stream processing device 15 at time t2 after time t1. Assuming that the transmission time can be ignored, the stream processing device 15 inputs the TTS packet to the buffer at time T2. Time T2 corresponds to time (a × t2 + b). The stream processing device 15 outputs the packet from the buffer to the demux unit at time (t2 + L). Therefore, D2 indicating the actual residence time is ((1−a) × t2 + L−b), which is the difference between the time (t2 + L) and the time (a × t2 + b).

また、実滞留時間の差を示すD2およびD1の差は、((1−a)×(t2−t1))となる。前提条件として、時刻t2は、時刻t1より後の時刻であるので、(t2−t1)は正である。たとえば、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より高い場合、すなわちa>1の場合、(1−a)が負となるので、実滞留時間の差は、負となる。これは、時刻t2が時刻t1より後になればなるほど、D2は、D1より小さくなることを示している。   Further, the difference between D2 and D1 indicating the difference in actual residence time is ((1-a) × (t2-t1)). As a precondition, since the time t2 is a time after the time t1, (t2-t1) is positive. For example, when the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock, that is, when a> 1, (1−a) is negative, so the difference in the actual residence time is negative. This indicates that D2 becomes smaller than D1 as time t2 comes after time t1.

すなわち、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より高い場合、局側装置が送信する時刻が遅いTTSパケットは、局側装置が送信する時刻が早いTTSパケットと比べて、バッファにおける実滞留時間が短くなる。従って、ストリーム処理装置15は、後に受信したTTSパケットの実滞留時間が、先に受信したTTSパケットの実滞留時間と比べて短い、すなわち実滞留時間が減少傾向にある場合に、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高いと判断することができる。   That is, when the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock, the TTS packet transmitted later by the station-side device is more effective than the TTS packet transmitted earlier by the station-side device. Residence time is shortened. Therefore, the stream processing apparatus 15 determines the local TTS clock when the actual residence time of the TTS packet received later is shorter than the actual residence time of the previously received TTS packet, that is, when the actual residence time tends to decrease. It can be determined that the frequency is higher than the frequency of the station-side TTS clock.

また、たとえば、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より低い場合、すなわちa<1の場合、(1−a)が正となるので、実滞留時間の差は、正となる。これは、時刻t2が時刻t1より後になればなるほど、D2は、D1より大きくなることを示している。   Further, for example, when the frequency of the local TTS clock is lower than the frequency of the station-side TTS clock, that is, when a <1, (1-a) is positive, so the difference in the actual residence time is positive. This indicates that D2 becomes larger than D1 as time t2 comes after time t1.

すなわち、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より低い場合、局側装置が送信する時刻が遅いTTSパケットは、局側装置が送信する時刻が早いTTSパケットと比べて、バッファにおける実滞留時間が長くなる。従って、ストリーム処理装置15は、後に受信したTTSパケットの実滞留時間が、先に受信したTTSパケットの実滞留時間と比べて長い、すなわち実滞留時間が増加傾向にある場合に、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて低いと判断することができる。   That is, when the frequency of the local TTS clock is lower than the frequency of the station-side TTS clock, TTS packets transmitted later by the station-side device are more effective in the buffer than TTS packets transmitted earlier by the station-side device. Residence time is increased. Therefore, the stream processing apparatus 15 determines that the local residence time of the local TTS clock when the actual residence time of the TTS packet received later is longer than the actual residence time of the previously received TTS packet, that is, when the actual residence time tends to increase. It can be determined that the frequency is lower than the frequency of the station-side TTS clock.

また、たとえば、ローカルTTSクロックの周波数が、局側TTSクロックの周波数と同じ場合、すなわちa=1の場合、(1−a)が0となるので、実滞留時間の差は、0となる。これは、実滞留時間の差が、時刻t1または時刻t2によらないことを示している。   Further, for example, when the frequency of the local TTS clock is the same as the frequency of the station-side TTS clock, that is, when a = 1, (1−a) is 0, so the difference in the actual residence time is 0. This indicates that the difference in the actual residence time does not depend on the time t1 or the time t2.

すなわち、ローカルTTSクロックの周波数が、局側TTSクロックの周波数と同じ場合、TTSパケットのバッファにおける実滞留時間は変化しない。従って、ストリーム処理装置15は、実滞留時間が変化しない場合に、ローカルTTSクロックおよび局側TTSクロックが同期していると判断することができる。   That is, when the frequency of the local TTS clock is the same as the frequency of the station-side TTS clock, the actual residence time in the TTS packet buffer does not change. Therefore, the stream processing device 15 can determine that the local TTS clock and the station-side TTS clock are synchronized when the actual residence time does not change.

ストリーム処理装置15は、実滞留時間を取得することにより、バッファへ入力するTTSパケットの単位時間当たりのバイト数に応じて遅延時間が変化するという問題を、解決することができる。   By obtaining the actual residence time, the stream processing device 15 can solve the problem that the delay time changes according to the number of bytes per unit time of the TTS packet input to the buffer.

しかしながら、上記の動作によっても、受信したストリームのTTSパケットは、バッファへ入力してから、当該TTSパケットのTTSタイムスタンプがTTSカウント値と一致するタイミングまでバッファに滞留する。従って、バッファへ入力したTTSパケットが、バッファから出力されるまでの遅延時間が発生してしまうという問題が残ってしまう。また、たとえばストリーム処理装置15は、受信したパケットがバッファを出てくるまでは、当該パケットを次の処理へ移すことができない。本発明の実施の形態におけるストリーム処理装置20では、以下の動作により上記問題を解決する。   However, even with the above-described operation, the TTS packet of the received stream remains in the buffer until the TTS time stamp of the TTS packet matches the TTS count value after being input to the buffer. Therefore, there remains a problem that a delay time until the TTS packet input to the buffer is output from the buffer is generated. Further, for example, the stream processing device 15 cannot move the packet to the next processing until the received packet comes out of the buffer. The stream processing apparatus 20 according to the embodiment of the present invention solves the above problem by the following operation.

[滞留時間に基づくTTSクロックの再生処理動作]
ストリーム処理装置10は、以下に示す各シーケンス図の各ステップを図示しないメモリから読み出して実行する。このプログラムは、外部からインストールすることができる。このインストールされるプログラムは、たとえば記録媒体に格納された状態で流通する。
[Regeneration processing operation of TTS clock based on residence time]
The stream processing apparatus 10 reads out and executes each step of each sequence diagram shown below from a memory (not shown). This program can be installed externally. The installed program is distributed in a state stored in a recording medium, for example.

図4は、本発明の実施の形態に係るストリーム処理装置において仮想バッファを用いて算出した平均仮想滞留時間に基づいてTTSクロックの再生処理を行う際の動作手順を定めたフローチャートである。
図4を参照して、まず、ストリーム処理装置20は、受信するストリームにおけるTTSパケットを受ける(ステップS102)。
FIG. 4 is a flowchart that defines an operation procedure when performing the reproduction process of the TTS clock based on the average virtual residence time calculated using the virtual buffer in the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 4, first, stream processing apparatus 20 receives a TTS packet in a stream to be received (step S102).

次に、ストリーム処理装置20におけるタイムスタンプ取得部21は、たとえばi番目のTTSパケットを受けると、受けたTTSパケットにおけるTTSヘッダからTTSタイムスタンプを示すTS[i]を取得する(ステップS104)。   Next, when receiving the i-th TTS packet, for example, the time stamp acquisition unit 21 in the stream processing device 20 acquires TS [i] indicating the TTS time stamp from the TTS header in the received TTS packet (step S104).

次に、タイムスタンプ取得部21は、取得したTS[i]を仮想バッファ演算部23へ出力する。また、タイムスタンプ取得部21は、受けたTTSパケットをTTSゲート部22へ出力する。   Next, the time stamp acquisition unit 21 outputs the acquired TS [i] to the virtual buffer calculation unit 23. In addition, the time stamp acquisition unit 21 outputs the received TTS packet to the TTS gate unit 22.

次に、仮想バッファ演算部23は、たとえばユーザによる番組選択またはエラー発生等の後、最初のTTSタイムスタンプであるTS[0]を、タイムスタンプ取得部21から受けると(ステップS106でYES)、TTSカウンタ部24におけるTTSカウント値をTS[0]に初期化する(ステップS108)。   Next, when the virtual buffer calculation unit 23 receives TS [0], which is the first TTS time stamp after the user selects a program or an error occurs, for example, from the time stamp acquisition unit 21 (YES in step S106), The TTS count value in the TTS counter unit 24 is initialized to TS [0] (step S108).

次に、仮想バッファ演算部23は、タイムスタンプ取得部21からTS[i]を受けると、TS[i]を受けた時刻tiにおけるTTSカウント値に対応するSTC[i]をTTSカウンタ部24から取得する(ステップS110)。   Next, upon receiving TS [i] from the time stamp acquisition unit 21, the virtual buffer calculation unit 23 obtains STC [i] corresponding to the TTS count value at the time ti that received TS [i] from the TTS counter unit 24. Obtain (step S110).

次に、仮想バッファ演算部23は、TS[i]とSTC[i]との差を示すΔt[i]を計算する(ステップS112)。   Next, the virtual buffer calculation unit 23 calculates Δt [i] indicating the difference between TS [i] and STC [i] (step S112).

より詳細には、TS[i]は、時刻tiにおいてストリーム処理装置20により受信されたi番目のTTSパケットが、TTSゲート部22によりデマックス部27へ出力される時刻である。すなわち、TS[i]は、i番目のTTSパケットが仮想バッファを出る時刻とみなすことができる。   More specifically, TS [i] is the time at which the i-th TTS packet received by the stream processing device 20 at time ti is output to the demux unit 27 by the TTS gate unit 22. That is, TS [i] can be regarded as the time when the i-th TTS packet leaves the virtual buffer.

また、STC[i]は、i番目のTTSパケットがストリーム処理装置20により受信された時刻tiを示す。すなわち、STC[i]は、i番目のTTSパケットが仮想バッファへ入る時刻とみなすことができる。   STC [i] indicates a time ti when the i-th TTS packet is received by the stream processing device 20. That is, STC [i] can be regarded as the time when the i-th TTS packet enters the virtual buffer.

従って、Δt[i]は、i番目のTTSパケットが仮想バッファへ入ってから仮想バッファを出るまでの仮想滞留時間を示す。   Therefore, Δt [i] indicates the virtual residence time from when the i-th TTS packet enters the virtual buffer until it leaves the virtual buffer.

次に、仮想バッファ演算部23は、時刻tiの直近の、たとえばp個のΔtに基づいて移動平均を算出するようにユーザにより設定されている場合、Δt[i-p+1]からΔt[i]までのΔtに基づいて、i番目のTTSパケットの移動平均に対応する平均仮想滞留時間を示すAvgΔt[i]を計算する(ステップS114)。   Next, when the virtual buffer calculation unit 23 is set by the user to calculate the moving average based on, for example, p Δt closest to the time ti, Δt [i−p + 1] to Δt [i]. AvgΔt [i] indicating the average virtual residence time corresponding to the moving average of the i-th TTS packet is calculated based on Δt until (step S114).

次に、仮想バッファ演算部23は、たとえばAvgΔt[i]、および時刻tiより前に計算したAvgΔt[i−1]から、AvgΔtの傾向を分析する(ステップS116)。   Next, the virtual buffer computing unit 23 analyzes the trend of AvgΔt from, for example, AvgΔt [i] and AvgΔt [i−1] calculated before time ti (step S116).

次に、仮想バッファ演算部23は、たとえばAvgΔt[i]がAvgΔt[i−1]より大きい場合、平均仮想滞留時間であるAvgΔtが増加傾向にあると判断し(ステップS118でYES)、平均仮想滞留時間が増加傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を上げる(ステップS120)。   Next, for example, when AvgΔt [i] is larger than AvgΔt [i−1], the virtual buffer calculation unit 23 determines that AvgΔt, which is the average virtual residence time, tends to increase (YES in step S118), and determines the average virtual The TTS clock adjustment unit 25 is notified that the residence time tends to increase. In response to the notification, the TTS clock adjustment unit 25 increases the frequency of the TTS clock generation unit 26 (step S120).

また、仮想バッファ演算部23は、たとえばAvgΔt[i]がAvgΔt[i−1]より小さい場合、平均仮想滞留時間であるAvgΔtが増加傾向でなく(ステップS118でNO)、減少傾向にあると判断し(ステップS122でYES)、平均仮想滞留時間が減少傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を下げる(ステップS124)。   For example, when AvgΔt [i] is smaller than AvgΔt [i−1], the virtual buffer calculation unit 23 determines that AvgΔt, which is the average virtual residence time, is not increasing (NO in step S118) and is decreasing. (YES in step S122), the TTS clock adjustment unit 25 is notified that the average virtual residence time tends to decrease. In response to the notification, the TTS clock adjustment unit 25 decreases the frequency of the TTS clock generation unit 26 (step S124).

また、仮想バッファ演算部23は、たとえばAvgΔt[i]がAvgΔt[i−1]と同じである場合、平均仮想滞留時間であるAvgΔtが増加傾向でも減少傾向でもないと判断し(ステップS122でNO)、TTSクロック生成部26の周波数を調整するための通知をTTSクロック調整部25へ出力しない。   For example, when AvgΔt [i] is the same as AvgΔt [i−1], the virtual buffer calculation unit 23 determines that the average virtual residence time AvgΔt is neither increasing nor decreasing (NO in step S122). ), A notification for adjusting the frequency of the TTS clock generator 26 is not output to the TTS clock adjuster 25.

以上の動作により、ストリーム処理装置20は、仮想バッファを用いて算出した平均仮想滞留時間に基づいてTTSクロックの再生処理を行う。   With the above operation, the stream processing device 20 performs the reproduction process of the TTS clock based on the average virtual residence time calculated using the virtual buffer.

第二の技術では、TTSパケットがバッファを出るタイミングで実滞留時間を計算する。一方、仮想バッファ演算部23は、上記のステップS112において、i番目のTTSパケットが仮想バッファへ入る時刻を示す時刻tiにおいて、実滞留時間と等価な上記仮想滞留時間を算出することができる。   In the second technique, the actual residence time is calculated at the timing when the TTS packet leaves the buffer. On the other hand, the virtual buffer calculation unit 23 can calculate the virtual residence time equivalent to the actual residence time at time ti indicating the time when the i-th TTS packet enters the virtual buffer in step S112.

すなわち、仮想バッファ演算部23は、上記仮想滞留時間を算出するために、i番目のTTSパケットが仮想バッファから出る時刻であるTS[i]まで待つ必要がない。従って、ストリーム処理装置20は、i番目のTTSパケットが仮想バッファへ入る時刻を示す時刻tiにおいて算出した仮想滞留時間に基づいて、TTSクロックを再生することができる。また、ストリーム処理装置20は、受信したパケットを、バッファにおいて滞留させることなく次の処理へ移すことができる。   That is, the virtual buffer calculation unit 23 does not need to wait until TS [i], which is the time when the i-th TTS packet leaves the virtual buffer, in order to calculate the virtual residence time. Therefore, the stream processing device 20 can reproduce the TTS clock based on the virtual residence time calculated at the time ti indicating the time when the i-th TTS packet enters the virtual buffer. Further, the stream processing device 20 can move the received packet to the next processing without staying in the buffer.

また、仮想バッファ演算部23は、上記のステップS114において移動平均を算出したが、これに限定するものではない。仮想バッファ演算部23は、未加工の仮想滞留時間に基づいて、仮想滞留時間の傾向を分析してもよい。   Moreover, although the virtual buffer calculating part 23 calculated the moving average in said step S114, it is not limited to this. The virtual buffer calculation unit 23 may analyze the tendency of the virtual residence time based on the raw virtual residence time.

たとえば、ストリーム処理装置20は、一定の時間間隔で規則正しく局側装置10から送信されたTTSパケットを、一定の時間間隔で規則正しく受信できる状況において、仮想バッファ演算部23は、Δt[i]がΔt[i−1]より大きい場合、仮想滞留時間が増加傾向にあると判断し、Δt[i]がΔt[i−1]より小さい場合、仮想滞留時間が減少傾向にあると判断することができる。また、仮想バッファ演算部23は、Δt[i]がΔt[i−1]と同程度である場合、仮想滞留時間が増加傾向でも減少傾向でもないと判断することができる。すなわち、ストリーム処理装置20は、Δtが所定値になるようにTTSクロック生成部26の周波数を調整することにより、ローカルTTSクロックを局側TTSクロックに同期させることができる。   For example, in a situation in which the stream processing device 20 can regularly receive TTS packets transmitted from the station-side device 10 at regular time intervals, at regular time intervals, the virtual buffer calculation unit 23 sets Δt [i] to Δt When larger than [i-1], it can be determined that the virtual residence time tends to increase, and when Δt [i] is smaller than Δt [i-1], it can be determined that the virtual residence time tends to decrease. . In addition, when Δt [i] is approximately equal to Δt [i−1], the virtual buffer calculation unit 23 can determine that the virtual residence time is neither increasing nor decreasing. That is, the stream processing device 20 can synchronize the local TTS clock with the station-side TTS clock by adjusting the frequency of the TTS clock generation unit 26 so that Δt becomes a predetermined value.

また、局側装置10がMPEG2−TSを再送信する際に、ヌルパケット等を削除することによりMPEG2−TTSを作成する場合、当該MPEG2−TTSは、図2の(B)に示すような時系列上不連続なTTSパケットを含んでしまう。また、TTSパケットの伝送時間は、TTSパケットにより異なるので、ストリーム処理装置20が各TTSパケットを受信する時間間隔は、一定でない。この際、仮想バッファ演算部23が、ステップS112において算出するΔtは、受信するTTSパケット毎にばらついてしまう。   When the station side device 10 retransmits the MPEG2-TS and creates the MPEG2-TTS by deleting the null packet or the like, the MPEG2-TTS is as shown in FIG. It includes TTS packets that are discontinuous in sequence. Further, since the transmission time of the TTS packet varies depending on the TTS packet, the time interval at which the stream processing apparatus 20 receives each TTS packet is not constant. At this time, Δt calculated by the virtual buffer calculation unit 23 in step S112 varies for each received TTS packet.

Δtのばらつきが大きくなると、TTSクロックの周波数の揺らぎが発生する。このTTSクロックの周波数の揺らぎが、さらに大きなΔtのばらつきを引き起こし、これによりTTSクロックの周波数の揺らぎが増幅される場合がある。   When the variation in Δt increases, the frequency of the TTS clock fluctuates. This fluctuation in the frequency of the TTS clock causes an even larger variation in Δt, which may amplify the fluctuation in the frequency of the TTS clock.

この場合においても、仮想バッファ演算部23は、上記のステップS114において、ばらついたΔtの移動平均を算出することにより、Δtを平滑化したAvgΔtを取得する。これにより、AvgΔtは、ローパスフィルタを通過したΔtとみなせるので、過剰なフィードバック処理に起因するTTSクロックの周波数の揺らぎを抑えることができる。   Even in this case, the virtual buffer calculation unit 23 obtains AvgΔt obtained by smoothing Δt by calculating a moving average of Δt that varies in step S114. As a result, AvgΔt can be regarded as Δt that has passed through the low-pass filter, so that fluctuations in the frequency of the TTS clock due to excessive feedback processing can be suppressed.

従って、仮想バッファ演算部23は、ステップS116において、AvgΔtに基づいて滞留時間の傾向を判断する際に、ストリーム処理装置20がTTSパケットを受信する時刻が不規則な場合においても、適切な判断を行うことができる。   Therefore, when determining the tendency of the residence time based on AvgΔt in step S116, the virtual buffer calculation unit 23 makes an appropriate determination even when the time at which the stream processing device 20 receives the TTS packet is irregular. It can be carried out.

また、上記のステップS102からステップS124までの動作は、ストリーム処理装置20が受信する全てのパケットについて行う必要はない。たとえば、ストリーム処理装置20は、所定のパケット数毎に上記動作を行ってもよい。   Further, the above operations from step S102 to step S124 need not be performed for all packets received by the stream processing device 20. For example, the stream processing device 20 may perform the above operation every predetermined number of packets.

[仮想バッファにおける仮想蓄積量の算出処理動作]
図4に示すTTSクロックの再生処理において、仮想バッファを用いて算出した仮想滞留時間を用いたが、仮想バッファを用いて算出した仮想蓄積量によってTTSクロックの再生処理を行ってもよい。以下に、仮想バッファを用いて算出した平均仮想蓄積量に応じてTTSクロックの再生処理を行う際の動作手順を示す。
[Calculation processing operation of virtual accumulation amount in virtual buffer]
In the reproduction process of the TTS clock shown in FIG. 4, the virtual residence time calculated using the virtual buffer is used. However, the reproduction process of the TTS clock may be performed according to the virtual accumulation amount calculated using the virtual buffer. Hereinafter, an operation procedure when performing a reproduction process of the TTS clock according to the average virtual accumulation amount calculated using the virtual buffer will be described.

図5は、本発明の実施の形態に係るストリーム処理装置において仮想バッファにおける仮想蓄積量の算出処理を行う際の動作手順を定めたフローチャートである。
図5を参照して、まず、ストリーム処理装置20は、受信するストリームにおけるTTSパケットを受ける(ステップS202)。
FIG. 5 is a flowchart that defines an operation procedure when performing calculation processing of the virtual accumulation amount in the virtual buffer in the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 5, first, stream processing apparatus 20 receives a TTS packet in a stream to be received (step S202).

次に、ストリーム処理装置20におけるタイムスタンプ取得部21は、たとえばi番目のTTSパケットを受けると、受けたTTSパケットにおけるTTSヘッダからTTSタイムスタンプを示すTS[i]を取得する(ステップS204)。   Next, when receiving the i-th TTS packet, for example, the time stamp acquisition unit 21 in the stream processing device 20 acquires TS [i] indicating the TTS time stamp from the TTS header in the received TTS packet (step S204).

次に、タイムスタンプ取得部21は、取得したTS[i]を仮想バッファ演算部23へ出力する。また、タイムスタンプ取得部21は、受けたTTSパケットをTTSゲート部22へ出力する。   Next, the time stamp acquisition unit 21 outputs the acquired TS [i] to the virtual buffer calculation unit 23. In addition, the time stamp acquisition unit 21 outputs the received TTS packet to the TTS gate unit 22.

次に、仮想バッファ演算部23は、たとえばユーザによる番組選択またはエラー発生等の後、最初のTTSタイムスタンプであるTS[0]を、タイムスタンプ取得部21から受けると(ステップS206でYES)、TTSカウンタ部24におけるTTSカウント値をTS[0]に初期化する(ステップS208)。また、仮想バッファ演算部23は、仮想バッファにおける仮想蓄積量を示すSnに、初期値としてたとえば0を設定する。   Next, when the virtual buffer calculation unit 23 receives TS [0], which is the first TTS time stamp, from the time stamp acquisition unit 21 after the user selects a program or an error occurs, for example (YES in step S206), The TTS count value in the TTS counter unit 24 is initialized to TS [0] (step S208). Further, the virtual buffer calculation unit 23 sets, for example, 0 as an initial value in Sn indicating the virtual accumulation amount in the virtual buffer.

次に、仮想バッファ演算部23は、タイムスタンプ取得部21からTS[i]を受けると、仮想蓄積量であるSnにTTSパケットの大きさである192を加える(ステップS210)。   Next, upon receiving TS [i] from the time stamp acquisition unit 21, the virtual buffer calculation unit 23 adds 192, which is the size of the TTS packet, to Sn, which is the virtual accumulation amount (step S210).

次に、仮想バッファ演算部23は、i番目のTTSパケットが仮想バッファを出ていく時刻を示すTS[i]までTTSカウント値を監視し(ステップS212でNO)、TS[i]がTTSカウント値と一致すると(ステップS212でYES)、仮想蓄積量であるSnからTTSパケットの大きさである192を減じる(ステップS214)。   Next, the virtual buffer calculation unit 23 monitors the TTS count value until TS [i] indicating the time at which the i-th TTS packet leaves the virtual buffer (NO in step S212), and TS [i] is the TTS count. If the values match (YES in step S212), 192, which is the size of the TTS packet, is subtracted from Sn, which is the virtual accumulation amount (step S214).

以上の動作により、ストリーム処理装置20は、仮想バッファにおける仮想蓄積量の算出処理を行う。   Through the above operation, the stream processing apparatus 20 performs the virtual accumulation amount calculation process in the virtual buffer.

第一の技術では、バッファにおいて、ストリームを所定レベルに達するまで蓄積させ、バッファに蓄積させたストリームのバイト数、すなわち蓄積量の変化を監視する。この際、ストリーム処理装置は、ストリームの蓄積量が所定レベルに達するまで、TTSクロックの再生処理を開始できない。また、ストリーム処理装置は、バッファにおけるストリームを次の処理へ移すことができないため、遅延時間が発生してしまう。   In the first technique, a stream is accumulated in a buffer until a predetermined level is reached, and the number of bytes of the stream accumulated in the buffer, that is, a change in the accumulation amount is monitored. At this time, the stream processing apparatus cannot start the reproduction process of the TTS clock until the accumulated amount of the stream reaches a predetermined level. Further, since the stream processing apparatus cannot move the stream in the buffer to the next processing, a delay time occurs.

一方、ストリーム処理装置20における仮想バッファ演算部23は、ステップS210で、TTSパケットが仮想バッファへ入る時刻において仮想蓄積量であるSnに192を加える。また、仮想バッファ演算部23は、ステップS212で、当該TTSパケットが仮想バッファを出る時刻において仮想蓄積量であるSnから192を減じる。すなわち、当該TTSパケットが、仮想バッファに入る時刻および仮想バッファを出る時刻の間だけ、当該TTSパケットの容量が、仮想バッファにおける仮想蓄積量であるSnに含められる。   On the other hand, the virtual buffer calculation unit 23 in the stream processing device 20 adds 192 to Sn which is the virtual accumulation amount at the time when the TTS packet enters the virtual buffer in step S210. In step S212, the virtual buffer calculation unit 23 subtracts 192 from Sn, which is the virtual accumulation amount, at the time when the TTS packet leaves the virtual buffer. That is, the capacity of the TTS packet is included in the virtual storage amount Sn in the virtual buffer only during the time when the TTS packet enters and exits the virtual buffer.

以上の動作により、i番目のTTSパケットが仮想バッファへ入る時刻を示す時刻tiにおける処理を行うだけで、当該TTSパケットを仮想バッファに蓄積させる処理を完了させることができる。   With the above operation, the processing for accumulating the TTS packet in the virtual buffer can be completed only by performing the processing at the time ti indicating the time when the i-th TTS packet enters the virtual buffer.

これにより、TTSパケットが仮想バッファに入る時刻から仮想バッファを出る時刻まで、当該TTSパケットを仮想バッファに蓄積させることができる。   Thereby, the TTS packet can be accumulated in the virtual buffer from the time when the TTS packet enters the virtual buffer to the time when the virtual buffer exits.

また、仮想バッファ演算部23は、上記仮想蓄積量を算出するために、仮想バッファにおいて所定レベルに達するまでストリームを蓄積する必要がない。従って、ストリーム処理装置20は、実際のバッファにストリームを蓄積することなく次の処理へ移すことができる。   In addition, the virtual buffer calculation unit 23 does not need to accumulate streams until the virtual buffer reaches a predetermined level in order to calculate the virtual accumulation amount. Therefore, the stream processing apparatus 20 can move to the next process without accumulating the stream in the actual buffer.

また、上記のステップS202からステップS214までの動作は、ストリーム処理装置20が受信する全てのパケットについて行う必要はない。たとえば、ストリーム処理装置20は、所定のパケット数毎に上記動作を行ってもよい。   Further, the operations from step S202 to step S214 need not be performed for all packets received by the stream processing device 20. For example, the stream processing device 20 may perform the above operation every predetermined number of packets.

[蓄積量に基づくTTSクロックの再生処理動作]
図6は、本発明の実施の形態に係るストリーム処理装置において仮想バッファを用いて算出した平均仮想蓄積量に基づいてTTSクロックの再生処理を行う際の動作手順を定めたフローチャートである。
[Reproduction processing operation of TTS clock based on accumulated amount]
FIG. 6 is a flowchart that defines an operation procedure when performing the reproduction process of the TTS clock based on the average virtual accumulation amount calculated using the virtual buffer in the stream processing apparatus according to the embodiment of the present invention.

ストリーム処理装置20は、以下に示す、仮想バッファを用いて算出した平均仮想蓄積量に応じてTTSクロックの再生処理を行う際の動作と、図5に示すステップS210からステップS216までの仮想蓄積量を算出するための動作とを並行して行ってもよい。   The stream processing apparatus 20 performs the following operation when performing TTS clock regeneration processing according to the average virtual accumulation amount calculated using the virtual buffer, and the virtual accumulation amount from step S210 to step S216 shown in FIG. You may perform in parallel with the operation | movement for calculating.

図6を参照して、ストリーム処理装置20は、局側装置10から最初のTTSパケットを受けることにより動作を開始する(ステップS308)。   Referring to FIG. 6, the stream processing device 20 starts the operation by receiving the first TTS packet from the station side device 10 (step S308).

次に、仮想バッファ演算部23は、たとえば仮想蓄積量であるSnを評価する時間間隔がユーザにより設定されている場合、TTSカウンタ部24におけるTTSカウント値を監視し(ステップS310でNO)、当該TTSカウント値において上記時間間隔に対応する所定時間分のTTSカウント値が増加すると(ステップS310でYES)、所定時間が経過した時刻tjにおける仮想蓄積量であるSn[j]を取得する(ステップS312)。   Next, for example, when the time interval for evaluating the virtual accumulation amount Sn is set by the user, the virtual buffer calculation unit 23 monitors the TTS count value in the TTS counter unit 24 (NO in step S310). When the TTS count value for a predetermined time corresponding to the time interval increases in the TTS count value (YES in step S310), Sn [j] that is a virtual accumulation amount at time tj when the predetermined time has elapsed is acquired (step S312). ).

次に、仮想バッファ演算部23は、時刻tjの直近の、たとえばr個のSnに基づいて移動平均を算出するようにユーザにより設定されている場合、Sn[j-r+1]からSn[j]までのSnに基づいて、j番目のSnの移動平均に対応する平均仮想蓄積量であるAvgSn[j]を計算する(ステップS314)。   Next, when the virtual buffer calculation unit 23 is set by the user to calculate a moving average based on, for example, r Sn nearest to time tj, Sn [j−r + 1] to Sn [j] AvgSn [j], which is the average virtual accumulation amount corresponding to the moving average of the jth Sn, is calculated based on the previous Sn (step S314).

次に、仮想バッファ演算部23は、たとえばAvgSn[j]、および時刻tjより前に計算したAvgSn[j−1]から、AvgSnの傾向を分析する(ステップS316)。   Next, the virtual buffer calculation unit 23 analyzes the trend of AvgSn from, for example, AvgSn [j] and AvgSn [j−1] calculated before time tj (step S316).

次に、仮想バッファ演算部23は、たとえばAvgSn[i]がAvgSn[i−1]より大きい場合、平均仮想蓄積量であるAvgSnが増加傾向にあると判断し(ステップS318でYES)、平均仮想蓄積量が増加傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を上げる(ステップS320)。   Next, for example, when AvgSn [i] is larger than AvgSn [i−1], the virtual buffer calculation unit 23 determines that the average virtual accumulation amount AvgSn tends to increase (YES in Step S318). The TTS clock adjustment unit 25 is notified that the accumulation amount tends to increase. In response to the notification, the TTS clock adjustment unit 25 increases the frequency of the TTS clock generation unit 26 (step S320).

また、仮想バッファ演算部23は、たとえばAvgSn[i]がAvgSn[i−1]より小さい場合、平均仮想蓄積量であるAvgSnが増加傾向でなく(ステップS318でNO)、減少傾向にあると判断し(ステップS322でYES)、平均仮想蓄積量が減少傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を下げる(ステップS324)。   For example, when AvgSn [i] is smaller than AvgSn [i−1], the virtual buffer calculation unit 23 determines that the average virtual accumulation amount AvgSn is not increasing (NO in step S318) and is decreasing. (YES in step S322), the TTS clock adjustment unit 25 is notified that the average virtual accumulation amount tends to decrease. The TTS clock adjustment unit 25 lowers the frequency of the TTS clock generation unit 26 in response to the notification (step S324).

また、仮想バッファ演算部23は、たとえばAvgSn[i]がAvgSn[i−1]と同じである場合、平均仮想蓄積量であるAvgSnが増加傾向でも減少傾向でもないと判断し(ステップS322でNO)、TTSクロック生成部26の周波数を調整するための通知をTTSクロック調整部25へ出力しない。   Further, for example, when AvgSn [i] is the same as AvgSn [i−1], the virtual buffer calculation unit 23 determines that the average virtual accumulation amount AvgSn is neither increasing nor decreasing (NO in Step S322). ), A notification for adjusting the frequency of the TTS clock generator 26 is not output to the TTS clock adjuster 25.

以上の動作により、ストリーム処理装置20は、仮想バッファを用いて算出した平均仮想蓄積量に基づいてTTSクロックの再生処理を行う。   Through the above operation, the stream processing apparatus 20 performs the reproduction process of the TTS clock based on the average virtual accumulation amount calculated using the virtual buffer.

次に、仮想バッファ演算部23は、ストリームを受信している間は(ステップS326でNO)、ステップS310に戻り所定時間ごとにSnを取得する。また、仮想バッファ演算部23は、ストリームの受信が終了すると(ステップS326でYES)、上記動作を終了する。   Next, while receiving the stream (NO in step S326), the virtual buffer calculation unit 23 returns to step S310 and acquires Sn at every predetermined time. In addition, when the reception of the stream ends (YES in step S326), the virtual buffer calculation unit 23 ends the above operation.

なお、仮想バッファ演算部23は、上記のステップS310においてユーザにより設定されている時間間隔で仮想蓄積量であるSnを評価するが、これに限定するものではない。仮想バッファ演算部23は、たとえばタイムスタンプ取得部21からTTSタイムスタンプを受けるタイミングに同期して、仮想蓄積量であるSnを評価してもよい。しかしながら、仮想蓄積量であるSnは、時間と共に変化するので、所定の時間間隔毎にSnを取得することが好ましい。これにより、サンプリングの偏りを防ぐことができる。   The virtual buffer calculation unit 23 evaluates Sn, which is a virtual accumulation amount, at the time interval set by the user in step S310, but is not limited thereto. For example, the virtual buffer calculation unit 23 may evaluate the virtual storage amount Sn in synchronization with the timing of receiving the TTS time stamp from the time stamp acquisition unit 21. However, since the virtual accumulation amount Sn changes with time, it is preferable to obtain Sn at predetermined time intervals. As a result, sampling bias can be prevented.

また、仮想バッファ演算部23は、上記のステップS314において移動平均を算出したが、これに限定するものではなく、未加工の仮想蓄積量に基づいて、仮想蓄積量の傾向を分析してもよい。   In addition, the virtual buffer calculation unit 23 calculates the moving average in step S314 described above, but the present invention is not limited to this, and the trend of the virtual accumulation amount may be analyzed based on the raw virtual accumulation amount. .

たとえば、ストリーム処理装置20は、一定の時間間隔で規則正しく局側装置10から送信されたTTSパケットを、一定の時間間隔で規則正しく受信できる状況において、仮想バッファ演算部23は、Sn[j]がSn[j−1]より大きい場合、仮想蓄積量が増加傾向にあると判断し、Sn[j]がSn[j−1]より小さい場合、仮想蓄積量が減少傾向にあると判断することができる。また、仮想バッファ演算部23は、Sn[j]がSn[j−1]と同程度である場合、仮想蓄積量が増加傾向でも減少傾向でもないと判断することができる。すなわち、ストリーム処理装置20は、Snが所定値になるようにTTSクロック生成部26の周波数を調整することにより、ローカルTTSクロックを局側TTSクロックに同期させることができる。   For example, in a situation where the stream processing apparatus 20 can regularly receive TTS packets transmitted from the station-side apparatus 10 regularly at a constant time interval, the virtual buffer calculation unit 23 can set Sn [j] to Sn When it is larger than [j−1], it can be determined that the virtual accumulation amount tends to increase, and when Sn [j] is smaller than Sn [j−1], it can be determined that the virtual accumulation amount tends to decrease. . Further, when Sn [j] is approximately the same as Sn [j−1], the virtual buffer calculator 23 can determine that the virtual accumulation amount is neither increasing nor decreasing. That is, the stream processing device 20 can synchronize the local TTS clock with the station-side TTS clock by adjusting the frequency of the TTS clock generation unit 26 so that Sn becomes a predetermined value.

また、局側装置10がMPEG2−TSを再送信する際に、ヌルパケット等を削除することによりMPEG2−TTSを作成する場合、当該MPEG2−TTSは、図2の(B)に示すような時系列上不連続なTTSパケットを含んでしまう。また、TTSパケットの伝送時間は、TTSパケットにより異なるので、ストリーム処理装置20が各TTSパケットを受信する時間間隔は、一定でない。この際、仮想バッファ演算部23が、ステップS312において取得するSnは、取得するタイミングによって大きくばらついてしまう。   When the station side device 10 retransmits the MPEG2-TS and creates the MPEG2-TTS by deleting the null packet or the like, the MPEG2-TTS is as shown in FIG. It includes TTS packets that are discontinuous in sequence. Further, since the transmission time of the TTS packet varies depending on the TTS packet, the time interval at which the stream processing apparatus 20 receives each TTS packet is not constant. At this time, the Sn acquired by the virtual buffer calculation unit 23 in step S312 greatly varies depending on the acquisition timing.

Snのばらつきが大きくなると、TTSクロックの周波数の揺らぎが発生する。このTTSクロックの周波数の揺らぎが、さらに大きなSnのばらつきを引き起こし、これによりTTSクロックの周波数の揺らぎが増幅される場合がある。   When the variation in Sn increases, the frequency of the TTS clock fluctuates. This fluctuation in the frequency of the TTS clock causes a larger variation in Sn, which may amplify the fluctuation in the frequency of the TTS clock.

この場合においても、仮想バッファ演算部23は、上記のステップS314において、ばらついたSnの移動平均を算出することにより、Snを平滑化したAvgSnを取得する。これにより、AvgSnは、ローパスフィルタを通過したSnとみなせるので、過剰なフィードバック処理に起因するTTSクロックの周波数の揺らぎを抑えることができる。   Also in this case, the virtual buffer calculation unit 23 obtains AvgSn obtained by smoothing Sn by calculating a moving average of Sn that has been varied in the above-described step S314. As a result, AvgSn can be regarded as Sn that has passed through the low-pass filter, so that fluctuations in the frequency of the TTS clock due to excessive feedback processing can be suppressed.

従って、仮想バッファ演算部23は、ステップS316において、AvgSnに基づいて仮想蓄積量の傾向を判断する際に、ストリーム処理装置20がTTSパケットを受信する時刻が不規則な場合においても、適切な判断を行うことができる。   Accordingly, when the virtual buffer calculation unit 23 determines the tendency of the virtual accumulation amount based on AvgSn in step S316, even if the time at which the stream processing device 20 receives the TTS packet is irregular, an appropriate determination is made. It can be performed.

[受信したTTSパケットの処理動作]
図7は、本発明の実施の形態に係るストリーム処理装置において受信したTTSパケットを処理する動作手順を定めたフローチャートである。
[Processing of received TTS packet]
FIG. 7 is a flowchart defining an operation procedure for processing a received TTS packet in the stream processing apparatus according to the embodiment of the present invention.

タイムスタンプ取得部21は、図4に示すステップS104、図5に示すステップS204および図6に示すステップS304において、i番目のTTSパケットからTTSタイムスタンプを取得後、上記TTSパケットをTTSゲート部22へ出力する。   The time stamp acquisition unit 21 acquires the TTS time stamp from the i-th TTS packet in step S104 shown in FIG. 4, step S204 shown in FIG. 5, and step S304 shown in FIG. Output to.

ストリーム処理装置20は、以下に示す、上記TTSパケットがTTSゲート部22へ出力されてから行われる動作と、図4に示すステップS110からステップS124までの動作、図5に示すステップS210からステップS216までの動作、または図6に示すステップS310からステップS324までの動作とを並行して行ってもよい。   The stream processing apparatus 20 performs the following operations after the TTS packet is output to the TTS gate unit 22, the operations from step S110 to step S124 shown in FIG. 4, and the steps S210 to S216 shown in FIG. The operations up to or the operations from step S310 to step S324 shown in FIG. 6 may be performed in parallel.

図7を参照して、ストリーム処理装置20は、受信するストリームにおけるTTSパケットを受ける動作以降の動作(ステップS402〜ステップS408)は、図4に示すフローチャートにおける動作(ステップS102〜ステップS108)、および図5に示すフローチャートにおける動作(ステップS202〜ステップS208)と同様であるため、ここでは詳細な説明を繰り返さない。   Referring to FIG. 7, the stream processing apparatus 20 performs the operation after the operation of receiving the TTS packet in the received stream (step S402 to step S408), the operation in the flowchart shown in FIG. 4 (step S102 to step S108), and Since this is the same as the operation in the flowchart shown in FIG. 5 (steps S202 to S208), detailed description will not be repeated here.

次に、TTSゲート部22は、i番目のTTSパケットをタイムスタンプ取得部21から受けると、受信するストリームにおける、TTSタイムスタンプおよびPCRが同期しているかどうか確認する(ステップS410)。   Next, when receiving the i-th TTS packet from the time stamp acquisition unit 21, the TTS gate unit 22 checks whether the TTS time stamp and the PCR in the received stream are synchronized (step S410).

次に、TTSゲート部22は、受信するストリームにおける、TTSタイムスタンプおよびPCRが同期している場合(ステップS410でYES)、PCRクロックの代わりにTTSクロックを利用できるので、ゲート動作を行わない。すなわち、TTSゲート部22は、タイムスタンプ取得部21から受けたi番目のTTSパケットからTTSヘッダを外すことによりi番目のTSパケットを作成し、作成したi番目のTSパケットをデマックス部27へ出力する。   Next, when the TTS time stamp and the PCR in the received stream are synchronized (YES in step S410), the TTS gate unit 22 does not perform the gate operation because the TTS clock can be used instead of the PCR clock. That is, the TTS gate unit 22 creates the i-th TS packet by removing the TTS header from the i-th TTS packet received from the time stamp acquisition unit 21, and outputs the created i-th TS packet to the demax unit 27. To do.

次に、デマックス部27は、i番目のTSパケットをTTSゲート部22から受けると、受けたTSパケットをビデオTSパケット、オーディオTSパケットまたはPCRパケット等に多重分離し、多重分離したTSパケットをTSヘッダおよびペイロードに分離する(ステップS412)。   Next, upon receiving the i-th TS packet from the TTS gate unit 22, the demax unit 27 demultiplexes the received TS packet into a video TS packet, an audio TS packet, a PCR packet, or the like, and the demultiplexed TS packet is converted into a TS. The header and the payload are separated (step S412).

次に、デマックス部27は、たとえばi番目のTSパケットがビデオTSパケットである場合、ビデオデータを含むペイロードをビデオESバッファへ出力する。また、デマックス部27は、たとえばi番目のTSパケットがオーディオTSパケットである場合、オーディオデータを含むペイロードをオーディオESバッファ31へ出力する。   Next, for example, when the i-th TS packet is a video TS packet, the demax unit 27 outputs a payload including video data to the video ES buffer. For example, when the i-th TS packet is an audio TS packet, the demax unit 27 outputs a payload including audio data to the audio ES buffer 31.

また、デマックス部27は、i番目のTSパケットがPCRを含むPCRパケットである場合、PCRクロックの代わりにTTSクロックを利用するので、アダプテーションフィールドに含まれるPCRをPCR回復部28へ出力しなくてもよい。   Further, when the i-th TS packet is a PCR packet including the PCR, the demax unit 27 uses the TTS clock instead of the PCR clock, so that the PCR included in the adaptation field does not have to be output to the PCR recovery unit 28. Also good.

次に、ビデオデコーダ部30は、TTSクロック生成部26における基準クロックのタイミングに従って、ビデオデータのデコード処理を行う(ステップS414)。次に、ビデオデコーダ部30は、デコード処理により作成した番組画像を例えば表示装置12へ出力する。   Next, the video decoder unit 30 performs video data decoding processing according to the timing of the reference clock in the TTS clock generation unit 26 (step S414). Next, the video decoder unit 30 outputs the program image created by the decoding process to, for example, the display device 12.

また、オーディオデコーダ部30は、TTSクロック生成部26における基準クロックのタイミングに従って、オーディオデータのデコード処理を行う(ステップS416)。次に、オーディオデコーダ部30は、デコード処理により作成した音声情報をたとえば表示装置12へ出力する。   In addition, the audio decoder unit 30 performs audio data decoding processing in accordance with the timing of the reference clock in the TTS clock generation unit 26 (step S416). Next, the audio decoder unit 30 outputs the audio information created by the decoding process to the display device 12, for example.

また、TTSゲート部22は、受信したストリームにおける、TTSタイムスタンプおよびPCRが同期していない場合(ステップS410でNO)、ローカルPCRクロックを再生するためにゲート動作を行う(ステップS418)。   In addition, when the TTS time stamp and the PCR in the received stream are not synchronized (NO in step S410), the TTS gate unit 22 performs a gate operation to reproduce the local PCR clock (step S418).

すなわち、TTSゲート部22は、TTSカウンタ部24から受けるTTSカウント値が、タイムスタンプ取得部21から受けたi番目のTTSパケットに対応するTS[i]と一致すると、TTSヘッダを外すことにより作成したi番目のTSパケットをデマックス部27へ出力する。   That is, when the TTS count value received from the TTS counter unit 24 matches TS [i] corresponding to the i-th TTS packet received from the time stamp acquisition unit 21, the TTS gate unit 22 creates the TTS header by removing the TTS header. The i th TS packet is output to the demux unit 27.

次に、デマックス部27は、i番目のTSパケットをTTSゲート部22から受けると、受けたTSパケットをビデオTSパケット、オーディオTSパケットまたはPCRパケット等に多重分離し、多重分離したTSパケットをTSヘッダおよびペイロードに分離する(ステップS420)。   Next, upon receiving the i-th TS packet from the TTS gate unit 22, the demax unit 27 demultiplexes the received TS packet into a video TS packet, an audio TS packet, a PCR packet, or the like, and the demultiplexed TS packet is converted into a TS. Separated into a header and a payload (step S420).

次に、デマックス部27は、たとえばi番目のTSパケットがビデオTSパケットである場合、ビデオデータを含むペイロードをビデオESバッファへ出力する。また、デマックス部27は、たとえばi番目のTSパケットがオーディオTSパケットである場合、オーディオデータを含むペイロードをオーディオESバッファへ出力する。   Next, for example, when the i-th TS packet is a video TS packet, the demax unit 27 outputs a payload including video data to the video ES buffer. For example, when the i-th TS packet is an audio TS packet, the demax unit 27 outputs a payload including audio data to the audio ES buffer.

また、デマックス部27は、i番目のTSパケットがPCRを含むPCRパケットである場合、アダプテーションフィールドからPCRを分析し、分析したPCRをPCR回復部28へ出力する。   Further, when the i-th TS packet is a PCR packet including PCR, the demax unit 27 analyzes the PCR from the adaptation field and outputs the analyzed PCR to the PCR recovery unit 28.

次に、PCR回復部28は、PCRをデマックス部27から受けると、受けたPCRに基づいて、PCRクロックを再生する(ステップS422)。具体的には、PCR回復部28は、受けたPCRがローカルPCRクロックより進んでいる場合、ローカルPCRクロックの周波数を上げる。また、PCR回復部28は、受けたPCRがローカルPCRクロックより遅れている場合、ローカルPCRクロックの周波数を下げる。   Next, when receiving the PCR from the demax unit 27, the PCR recovery unit 28 regenerates the PCR clock based on the received PCR (step S422). Specifically, when the received PCR is ahead of the local PCR clock, the PCR recovery unit 28 increases the frequency of the local PCR clock. The PCR recovery unit 28 lowers the frequency of the local PCR clock when the received PCR is behind the local PCR clock.

これにより、ストリーム処理装置30は、局側PCRクロックと同期したローカルPCRクロックに合わせて、受信したストリームを処理することができる。   As a result, the stream processing apparatus 30 can process the received stream in synchronization with the local PCR clock synchronized with the station-side PCR clock.

また、ビデオデコーダ部30は、ローカルPCRクロックのタイミングに従って、ビデオデータのデコード処理を行う(ステップS424)。次に、ビデオデコーダ部30は、デコード処理により作成した番組画像を例えば表示装置12へ出力する。   In addition, the video decoder unit 30 performs video data decoding processing according to the local PCR clock timing (step S424). Next, the video decoder unit 30 outputs the program image created by the decoding process to, for example, the display device 12.

また、オーディオデコーダ部30は、ローカルPCRクロックのタイミングに従って、オーディオデータのデコード処理を行う(ステップS426)。次に、オーディオデコーダ部30は、デコード処理により作成した音声情報をたとえば表示装置12へ出力する。   Also, the audio decoder unit 30 performs audio data decoding processing according to the local PCR clock timing (step S426). Next, the audio decoder unit 30 outputs the audio information created by the decoding process to the display device 12, for example.

以上の動作により、ストリーム処理装置20は、ストリーム処理装置において受信したTTSパケットを処理する。   Through the above operation, the stream processing device 20 processes the TTS packet received by the stream processing device.

なお、ビデオTSパケットまたはオーディオTSパケットのペイロードに含まれる情報は、ビデオESバッファ29またはオーディオESバッファ31において滞留する。このため、ビデオTSパケットおよびオーディオTSパケットは、どのタイミングでTTSゲート部22からデマックス部27へ出力しても構わない。   Information included in the payload of the video TS packet or the audio TS packet stays in the video ES buffer 29 or the audio ES buffer 31. For this reason, the video TS packet and the audio TS packet may be output from the TTS gate unit 22 to the demax unit 27 at any timing.

一方、PCRパケットは、ローカルPCRクロックを局側PCRクロックに同期させるために用いられるので、所定のタイミングでPCR回復部28へ出力する必要がある。   On the other hand, since the PCR packet is used to synchronize the local PCR clock with the local PCR clock, it is necessary to output it to the PCR recovery unit 28 at a predetermined timing.

従って、TTSゲート部22は、ステップS418において、PCRパケットのみゲート動作を行い、PCRパケット以外のTSパケットについてはそのままデマックス部27へ出力してもよい。   Therefore, in step S418, the TTS gate unit 22 may perform the gate operation for only the PCR packet, and output TS packets other than the PCR packet to the demux unit 27 as they are.

また、TTSゲート部22は、ローカルPCRクロックを再生させるために、局側TTSクロックと同期したローカルTTSクロックによりゲート動作を行う。すなわち、TTSゲート部22は、局側TTSクロックと同期したローカルTTSクロックに基づいて、PCRパケットに含まれるTTSタイムスタンプに対応したタイミングで、上記PCRパケットをデマックス部27へ出力する。これにより、PCR回復部28は、上記PCRパケットを相対デコードタイミングで、デマックス部27経由でTTSゲート部22からPCRを受ける。   Further, the TTS gate unit 22 performs a gate operation using a local TTS clock synchronized with the station-side TTS clock in order to regenerate the local PCR clock. That is, the TTS gate unit 22 outputs the PCR packet to the demax unit 27 at a timing corresponding to the TTS time stamp included in the PCR packet based on the local TTS clock synchronized with the station-side TTS clock. As a result, the PCR recovery unit 28 receives the PCR packet from the TTS gate unit 22 via the demax unit 27 at the relative decode timing.

このように、PCR回復部28が相対デコードタイミングで受けたPCRに基づいてローカルPCRクロックを再生することにより、ストリーム処理装置20は、ローカルPCRクロックを局側PCRクロックに同期させることができる。   In this way, by reproducing the local PCR clock based on the PCR received by the PCR recovery unit 28 at the relative decode timing, the stream processing device 20 can synchronize the local PCR clock with the local PCR clock.

また、局側TTSクロックおよび局側PCRクロックが同期している場合、図4または図6に示すローカルTTSクロックの再生処理により、ローカルTTSクロックを局側TTSクロックに同期させると、ローカルTTSクロックは、自動的に局側PCRクロックと同期する。従って、ストリーム処理装置20は、PCRを用いてローカルPCRクロックを局側PCRに同期させる必要はなく、ローカルPCRクロックの代わりにローカルTTSクロックを利用することができる。   If the station TTS clock and the station PCR clock are synchronized, the local TTS clock is synchronized with the station TTS clock by the local TTS clock regeneration process shown in FIG. 4 or FIG. Automatically synchronizes with the station side PCR clock. Therefore, the stream processing device 20 does not need to synchronize the local PCR clock with the station side PCR using PCR, and can use the local TTS clock instead of the local PCR clock.

これにより、ストリーム処理装置20は、受信するストリームにおいて、TTSタイムスタンプおよびPCRが同期している場合、デマックス部27以降の処理を行う際に、TTSクロックを基準クロックとして用いることができる。   As a result, when the TTS time stamp and the PCR are synchronized in the received stream, the stream processing device 20 can use the TTS clock as the reference clock when performing the processing after the demax unit 27.

また、受信するストリームにおいて、TTSタイムスタンプおよびPCRが同期している場合、PCRクロックを再生する必要がないので、PCRパケットを相対デコードタイミングでPCR回復部28へ投入する必要がない。従って、TTSゲート部22は、ゲート動作を行う必要はなく、受信したストリームのTTSパケットは、滞留することなくタイムスタンプ取得部21からデマックス部27以降の処理へ移される。   Further, when the TTS time stamp and the PCR are synchronized in the received stream, it is not necessary to regenerate the PCR clock, so that it is not necessary to input the PCR packet to the PCR recovery unit 28 at the relative decoding timing. Therefore, the TTS gate unit 22 does not need to perform the gate operation, and the TTS packet of the received stream is transferred from the time stamp acquisition unit 21 to the processing after the demax unit 27 without staying.

すなわち、ストリーム処理装置20は、受信したストリームのTTSパケットを、遅延時間なしでデマックス部27以降の処理へ移すことができる。   That is, the stream processing apparatus 20 can move the TTS packet of the received stream to the processing after the demax unit 27 without a delay time.

ところで、基準クロックの周波数を調整するために、予め定めた規定範囲までパケットをバッファへ蓄積する必要がある。たとえば、受信されたパケットが順次バッファに蓄積されていき、パケットが予め定めた規定範囲まで蓄積された後に、最初に受信されたパケットは、バッファから取り出されて次の処理へ移される。従って、パケットが、バッファへ入ってからバッファを出るまでの滞留時間、すなわち遅延時間が発生することから、パケットを受信しても、遅延時間を経過するまで当該パケットの処理を行うことができない。   By the way, in order to adjust the frequency of the reference clock, it is necessary to store packets in a buffer up to a predetermined specified range. For example, the received packets are sequentially accumulated in the buffer, and after the packets are accumulated to a predetermined specified range, the first received packet is taken out from the buffer and moved to the next processing. Therefore, since a residence time from when the packet enters the buffer until it leaves the buffer, that is, a delay time occurs, even if the packet is received, the packet cannot be processed until the delay time elapses.

これに対して、本発明の実施の形態に係るストリーム処理装置では、TTSパケットはTTSヘッダ、TSヘッダおよびペイロードを含み、複数のTTSパケットの少なくとも一部のTSヘッダはPCRを含み、複数のTTSパケットの各々のTTSヘッダはTTSタイムスタンプを含み、ローカルTTSクロックを生成するためのTTSクロック生成部26と、ローカルTTSクロックに基づいてTTSカウント値を更新するためのTTSカウンタ部24と、TTSカウント値およびTTSタイムスタンプに基づいてTTSクロック生成部26を制御することにより、ローカルTTSクロックの周波数を調整するための仮想バッファ演算部23およびTTSクロック調整部25とを備える。   On the other hand, in the stream processing apparatus according to the embodiment of the present invention, the TTS packet includes a TTS header, a TS header, and a payload, at least a part of the TS headers of the plurality of TTS packets includes a PCR, and the plurality of TTSs Each TTS header of the packet includes a TTS time stamp, a TTS clock generation unit 26 for generating a local TTS clock, a TTS counter unit 24 for updating a TTS count value based on the local TTS clock, and a TTS count A virtual buffer operation unit 23 and a TTS clock adjustment unit 25 for adjusting the frequency of the local TTS clock by controlling the TTS clock generation unit 26 based on the value and the TTS time stamp are provided.

このように、TTSカウント値およびTTSタイムスタンプ値は、ストリーム処理装置20がTTSパケットを受信した時刻から取得することができるので、TTSクロック生成部26を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつTTSゲート部22におけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置20がTTSパケットを受信した時刻から、当該TTSパケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。   Thus, since the TTS count value and the TTS timestamp value can be obtained from the time when the stream processing device 20 receives the TTS packet, the process for controlling the TTS clock generation unit 26 and the process for decoding are performed at the time. And the buffer in the TTS gate unit 22 becomes unnecessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing device 20 receives the TTS packet until the TTS packet is decoded, for example.

また、ローカルTTSクロックに基づいたTTSカウント値、およびVODサーバ等の局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値を利用することにより、ローカルTTSクロックを、局側装置10におけるTTSクロックに同期させることができる。   Further, by using the TTS count value based on the local TTS clock and the TTS time stamp value based on the TTS clock in the station side device 10 such as a VOD server, the local TTS clock is converted into the TTS clock in the station side device 10. Can be synchronized.

このように、TTSカウント値が局側装置10におけるTTSクロックと同期するので、ストリーム処理装置20は、ローカルTTSクロックに基づいて処理を行うことにより、局側装置10におけるTTSクロックに基づいて作成されたストリームを、局側装置10におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。   Thus, since the TTS count value is synchronized with the TTS clock in the station-side device 10, the stream processing device 20 is created based on the TTS clock in the station-side device 10 by performing processing based on the local TTS clock. Thus, each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station-side device 10.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプに基づいて、TTSパケット用の仮想的なバッファの評価値を算出し、算出した評価値に応じてTTSクロック生成部26を制御することにより、ローカルTTSクロックの周波数を調整する。   In the stream processing device according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 evaluate the virtual buffer evaluation value for the TTS packet based on the TTS count value and the TTS time stamp. And the frequency of the local TTS clock is adjusted by controlling the TTS clock generation unit 26 according to the calculated evaluation value.

このような構成により、実際にバッファを設けることなく、仮想的なバッファの評価値を算出することができるため、ローカルTTSクロックを適切に制御することができる。   With such a configuration, an evaluation value of a virtual buffer can be calculated without actually providing a buffer, so that the local TTS clock can be appropriately controlled.

そして、ストリーム処理装置20は、バッファを実装しないので、受信したTTSパケットを、バッファに滞留させることなく次の処理へ移すことができる。   Since the stream processing apparatus 20 does not mount a buffer, the received TTS packet can be moved to the next process without being retained in the buffer.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの差に基づいて、ローカルTTSクロックの周波数を調整する。   In the stream processing apparatus according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 adjust the frequency of the local TTS clock based on the difference between the TTS count value and the TTS time stamp.

このように、TTSクロックに基づいたTTSカウント値、および局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値の差を計算することにより、ストリーム処理装置20における動作タイミング、および局側装置10における動作タイミングのずれの経時的な変化を分析することができるので、ローカルTTSクロックの調整を正確に行うことができる。   Thus, by calculating the difference between the TTS count value based on the TTS clock and the TTS timestamp value based on the TTS clock in the station side device 10, the operation timing in the stream processing device 20 and the station side device 10 Since it is possible to analyze the change over time in the shift in the operation timing, the local TTS clock can be adjusted accurately.

また、上記差を算出するために必要なTTSカウント値およびTTSタイムスタンプ値は、TTSパケットを受信した時刻において取得するので、上記差を算出するための処理を、当該時刻から開始することができる。従って、ストリーム処理装置20は、上記TTSパケットを受信した時刻において、TTSクロックの周波数の調整に、上記差を反映させることができる。   Further, since the TTS count value and the TTS time stamp value necessary for calculating the difference are acquired at the time when the TTS packet is received, the process for calculating the difference can be started from the time. . Therefore, the stream processing device 20 can reflect the difference in the adjustment of the frequency of the TTS clock at the time when the TTS packet is received.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの大小関係に基づいて1または複数のTTSパケットを選択し、選択したTTSパケットのデータ量の合計に基づいてローカルTTSクロックの周波数を調整する。   In the stream processing apparatus according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 select one or more TTS packets based on the magnitude relationship between the TTS count value and the TTS time stamp. The frequency of the local TTS clock is adjusted based on the total data amount of the selected TTS packet.

このような構成により、バッファにおけるTTSパケットの蓄積量を仮想的に求めることができるため、上記蓄積量を経時的に監視することにより、ストリーム処理装置20における動作タイミング、および局側装置10における動作タイミングのずれの経時的な変化を分析することができる。これにより、ローカルTTSクロックの調整を正確に行うことができる。   With such a configuration, it is possible to virtually determine the amount of TTS packets stored in the buffer. Therefore, by monitoring the amount of storage over time, the operation timing in the stream processing device 20 and the operation in the station-side device 10 are monitored. It is possible to analyze a change in timing with time. As a result, the local TTS clock can be adjusted accurately.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの差が所定値になるように、ローカルTTSクロックの周波数を調整する。   In the stream processing apparatus according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 perform the frequency of the local TTS clock so that the difference between the TTS count value and the TTS time stamp becomes a predetermined value. Adjust.

ローカルTTSクロックおよび局側装置10におけるTTSクロックが同期していると、ローカルTTSクロックに基づいたTTSカウント値、および局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値の差が一定になる。上記差が一定になるようにローカルTTSクロックの周波数を調整することにより、ローカルTTSクロックを局側装置10におけるTTSクロックに同期させることができる。   When the local TTS clock and the TTS clock in the station side device 10 are synchronized, the difference between the TTS count value based on the local TTS clock and the TTS time stamp value based on the TTS clock in the station side device 10 becomes constant. By adjusting the frequency of the local TTS clock so that the difference becomes constant, the local TTS clock can be synchronized with the TTS clock in the station side device 10.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、複数のTTSパケットの一部のTTSタイムスタンプとTTSカウント値との差に基づいて、ローカルTTSクロックの周波数を調整する。   Further, in the stream processing device according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 are based on the difference between the TTS time stamps of a part of the plurality of TTS packets and the TTS count value. Adjust the frequency of the local TTS clock.

このような構成により、ストリーム処理装置20が受信する全てのTTSパケットでなく、一部のTTSパケットからローカルTTSクロックに基づいたTTSカウント値、および局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値の差を計算するので、ストリーム処理装置20における計算の負担を軽減することができる。   With such a configuration, not all TTS packets received by the stream processing device 20, but a TTS count value based on the local TTS clock from some TTS packets, and a TTS time stamp based on the TTS clock in the station side device 10 Since the difference in values is calculated, the calculation burden on the stream processing apparatus 20 can be reduced.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、選択したTTSパケットのデータ量の合計が所定値になるように、ローカルTTSクロックの周波数を調整する。   Further, in the stream processing apparatus according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 determine the frequency of the local TTS clock so that the total data amount of the selected TTS packet becomes a predetermined value. Adjust.

このように、ストリーム処理装置20により受信されたTTSパケットにおいて、当該TTSパケットを受信したタイミングから、TTSカウント値がTTSタイムスタンプの示す値となるタイミングまでの間、当該TTSパケットのバイト数を合計に含める。ローカルTTSクロックおよび局側装置10におけるTTSクロックが同期していると、上記合計が一定になるので、上記合計が一定になるようにローカルTTSクロックの周波数を調整することにより、ローカルTTSクロックを局側装置10におけるTTSクロックに同期させることができる。   Thus, in the TTS packet received by the stream processing device 20, the number of bytes of the TTS packet is totaled from the timing when the TTS packet is received until the timing when the TTS count value becomes the value indicated by the TTS timestamp. Include in When the local TTS clock and the TTS clock in the station-side device 10 are synchronized, the total is constant. Therefore, the local TTS clock is adjusted by adjusting the frequency of the local TTS clock so that the total is constant. It can be synchronized with the TTS clock in the side device 10.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの差を、仮想的なバッファにおけるTTSパケットの仮想滞留時間として算出し、算出した仮想滞留時間に基づいてローカルTTSクロックの周波数を調整する。   Further, in the stream processing apparatus according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 calculate the difference between the TTS count value and the TTS time stamp, and the virtual residence time of the TTS packet in the virtual buffer. And the frequency of the local TTS clock is adjusted based on the calculated virtual residence time.

このような構成により、仮想的なバッファの評価値として、仮想滞留時間を計算することができるため、ローカルTTSクロックの調整を正確に行うことができる。   With such a configuration, the virtual dwell time can be calculated as a virtual buffer evaluation value, so the local TTS clock can be accurately adjusted.

また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSタイムスタンプがTTSカウント値以下となる1または複数のTTSパケットのデータ量の合計を、仮想的なバッファにおけるTTSパケットの仮想蓄積量として算出し、算出した仮想蓄積量に基づいてローカルTTSクロックの周波数を調整する。   In the stream processing apparatus according to the embodiment of the present invention, the virtual buffer calculation unit 23 and the TTS clock adjustment unit 25 calculate the total data amount of one or a plurality of TTS packets whose TTS time stamp is equal to or less than the TTS count value. The virtual accumulation amount of the TTS packet in the virtual buffer is calculated, and the frequency of the local TTS clock is adjusted based on the calculated virtual accumulation amount.

このような構成により、仮想的なバッファの評価値として、仮想蓄積量を計算することができるため、ローカルTTSクロックの調整を正確に行うことができる。   With such a configuration, since the virtual accumulation amount can be calculated as the evaluation value of the virtual buffer, the local TTS clock can be adjusted accurately.

また、本発明の実施の形態に係るストリーム処理装置では、ストリーム処理装置20は、さらに、TTSパケットのペイロードに対してデコード処理を行うためのビデオデコーダ部30およびオーディオデコーダ部32を備え、ビデオデコーダ部30およびオーディオデコーダ部32は、PCRおよびTTSタイムスタンプが同期している場合には、ローカルTTSクロックのタイミングに従ってデコード処理を行う。   In the stream processing apparatus according to the embodiment of the present invention, the stream processing apparatus 20 further includes a video decoder unit 30 and an audio decoder unit 32 for performing decoding processing on the payload of the TTS packet. When the PCR and the TTS time stamp are synchronized, the unit 30 and the audio decoder unit 32 perform a decoding process according to the timing of the local TTS clock.

このように、PCRおよびTTSタイムスタンプが同期していると、ストリーム処理装置20は、PCRクロックを再生させるための、受信したTTSパケットに対するゲート動作を行う必要がないので、速やかにTSSパケットにデコード処理を行うことができる。   As described above, when the PCR and TTS time stamps are synchronized, the stream processing apparatus 20 does not need to perform a gate operation on the received TTS packet to reproduce the PCR clock, so that it is promptly decoded into the TSS packet. Processing can be performed.

また、PCRクロックを再生させるための動作が不要になるので、ストリーム処理装置20における処理負担を軽減することができ、かつバッファ等を含むTTSゲート部22も不要となる。   In addition, since the operation for reproducing the PCR clock is unnecessary, the processing burden on the stream processing apparatus 20 can be reduced, and the TTS gate unit 22 including a buffer and the like is also unnecessary.

なお、TTSカウンタ部24は、TTSクロック生成部26からクロックを受けるごとにTTSカウント値をインクリメントしたが、これに限定するものではない。TTSカウンタ部24は、たとえばTTSクロック生成部26からクロックを受けるごとにTTSカウント値をデクリメントしてもよい。従って、TTSカウンタ部24は、時間が経過するに従い、TTSクロックと同期してカウント値を減少させる。これによっても、カウント値は、現在時刻として利用でき、当該カウント値の大小関係から時系列の前後関係を取得することができる。   The TTS counter unit 24 increments the TTS count value every time a clock is received from the TTS clock generation unit 26, but the present invention is not limited to this. The TTS counter unit 24 may decrement the TTS count value each time a clock is received from the TTS clock generation unit 26, for example. Therefore, the TTS counter unit 24 decreases the count value in synchronization with the TTS clock as time elapses. Also by this, the count value can be used as the current time, and the time-series context can be obtained from the magnitude relationship of the count value.

また、本発明の実施の形態に係るストリーム処理装置は、MPEG2−TS規格に従うストリームの処理を行なう構成であるとしたが、これに限定するものではない。他の規格に従うストリームの処理を行なう構成であってもよい。   Moreover, although the stream processing apparatus according to the embodiment of the present invention is configured to perform stream processing in accordance with the MPEG2-TS standard, the present invention is not limited to this. It may be configured to process a stream according to another standard.

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

10 局側装置
11 ネットワーク
12 表示装置
13 ストリーム処理システム
20 ストリーム処理装置
21 タイムスタンプ取得部
22 TTSゲート部
23 仮想バッファ演算部(クロック調整部)
24 TTSカウンタ部
25 TTSクロック調整部
26 TTSクロック生成部
27 デマックス部
28 PCR回復部
29 ビデオESバッファ
30 ビデオデコーダ部(ペイロード処理部)
31 オーディオESバッファ
32 オーディオデコーダ部(ペイロード処理部)
DESCRIPTION OF SYMBOLS 10 Station side apparatus 11 Network 12 Display apparatus 13 Stream processing system 20 Stream processing apparatus 21 Time stamp acquisition part 22 TTS gate part 23 Virtual buffer calculating part (clock adjustment part)
24 TTS counter section 25 TTS clock adjustment section 26 TTS clock generation section 27 Demax section 28 PCR recovery section 29 Video ES buffer 30 Video decoder section (payload processing section)
31 Audio ES buffer 32 Audio decoder part (payload processing part)

Claims (14)

1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置であって、
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するためのクロック生成部と、
前記基準クロックに基づいてカウント値を更新するためのカウンタと、
前記カウント値および前記時刻情報に基づいて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整するためのクロック調整部とを備え、
前記ストリーム処理装置は、さらに、
前記パケットのペイロードに対して所定の処理を行うためのペイロード処理部を備え、
前記ペイロード処理部は、前記クロック再生用情報および前記時刻情報が同期している場合には、前記基準クロックのタイミングに従って前記所定の処理を行う、ストリーム処理装置。
A stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
A clock generator for generating a reference clock;
A counter for updating the count value based on the reference clock;
By controlling the clock generator based on the count value and the time information, Bei example a clock adjusting portion for adjusting the frequency of the reference clock,
The stream processing device further includes:
A payload processing unit for performing predetermined processing on the payload of the packet;
The payload processing unit performs the predetermined processing according to the timing of the reference clock when the clock reproduction information and the time information are synchronized .
1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置であって、
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するためのクロック生成部と、
前記基準クロックに基づいてカウント値を更新するためのカウンタと、
前記カウント値および前記時刻情報に基づいて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整するためのクロック調整部とを備え、
前記クロック調整部は、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整する、ストリーム処理装置。
A stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
A clock generator for generating a reference clock;
A counter for updating the count value based on the reference clock;
By controlling the clock generator based on the count value and the time information, Bei example a clock adjusting portion for adjusting the frequency of the reference clock,
The clock adjustment unit calculates an evaluation value of the virtual buffer for the packet based on the count value and the time information, and controls the clock generation unit according to the calculated evaluation value, A stream processing apparatus for adjusting a frequency of the reference clock .
前記クロック調整部は、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整する、請求項1に記載のストリーム処理装置。   The clock adjustment unit calculates an evaluation value of the virtual buffer for the packet based on the count value and the time information, and controls the clock generation unit according to the calculated evaluation value, The stream processing apparatus according to claim 1, wherein the frequency of the reference clock is adjusted. 前記クロック調整部は、前記カウント値および前記時刻情報の差に基づいて、前記基準クロックの周波数を調整する、請求項1から請求項3のいずれか1項に記載のストリーム処理装置。 Said clock adjustment unit, based on the difference between the count value and the time information to adjust the frequency of the reference clock, the stream processing apparatus according to any one of claims 1 to 3. 前記クロック調整部は、前記カウント値および前記時刻情報の大小関係に基づいて1または複数の前記パケットを選択し、選択した前記パケットのデータ量の合計に基づいて前記基準クロックの周波数を調整する、請求項1から請求項3のいずれか1項に記載のストリーム処理装置。 The clock adjustment unit selects one or a plurality of the packets based on the magnitude relationship between the count value and the time information, and adjusts the frequency of the reference clock based on the total data amount of the selected packets. The stream processing apparatus according to any one of claims 1 to 3. 前記クロック調整部は、前記差が所定値になるように、前記基準クロックの周波数を調整する、請求項に記載のストリーム処理装置。 The stream processing apparatus according to claim 4 , wherein the clock adjustment unit adjusts the frequency of the reference clock so that the difference becomes a predetermined value. 前記クロック調整部は、前記複数のパケットの一部の前記時刻情報と前記カウント値との差に基づいて、前記基準クロックの周波数を調整する、請求項または請求項に記載のストリーム処理装置。 Said clock adjustment unit, based on a difference between the count value and a portion of the time information of the plurality of packets, to adjust the frequency of the reference clock, the stream processing apparatus according to claim 4 or claim 6 . 前記クロック調整部は、前記合計が所定値になるように、前記基準クロックの周波数を調整する、請求項に記載のストリーム処理装置。 The stream processing apparatus according to claim 5 , wherein the clock adjustment unit adjusts a frequency of the reference clock so that the total becomes a predetermined value. 前記クロック調整部は、前記カウント値および前記時刻情報の差を、仮想的なバッファにおける前記パケットの滞留時間として算出し、算出した前記滞留時間に基づいて前記基準クロックの周波数を調整する、請求項、請求項または請求項に記載のストリーム処理装置。 The clock adjustment unit calculates a difference between the count value and the time information as a retention time of the packet in a virtual buffer, and adjusts a frequency of the reference clock based on the calculated retention time. 4. The stream processing apparatus according to claim 6 or claim 7 . 前記クロック調整部は、前記時刻情報が前記カウント値以下となる1または複数の前記パケットのデータ量の合計を、仮想的なバッファにおける前記パケットの蓄積量として算出し、算出した前記蓄積量に基づいて前記基準クロックの周波数を調整する、請求項または請求項に記載のストリーム処理装置。 The clock adjustment unit calculates a sum of data amounts of one or a plurality of the packets whose time information is equal to or less than the count value as an accumulation amount of the packets in a virtual buffer, and based on the calculated accumulation amount adjusting the frequency of the reference clock Te, stream processing apparatus according to claim 5 or claim 8. 1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置におけるストリーム処理方法であって、
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップとを含み、
前記ストリーム処理方法は、さらに、
前記パケットのペイロードに対して所定の処理を行うステップを含み、
前記所定の処理を行うステップにおいては、前記クロック再生用情報および前記時刻情報が同期している場合には、前記基準クロックのタイミングに従って前記所定の処理を行う、ストリーム処理方法。
A stream processing method in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
Generating a reference clock; and
Updating the count value based on the reference clock;
Based on the count value and the time information, viewing including the step of adjusting the frequency of the reference clock,
The stream processing method further includes:
Performing predetermined processing on the payload of the packet,
In the step of performing the predetermined processing, when the clock reproduction information and the time information are synchronized, the predetermined processing is performed according to the timing of the reference clock .
1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置におけるストリーム処理方法であって、
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップとを含み、
前記周波数を調整するステップにおいては、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記基準クロックの周波数を調整する、ストリーム処理方法。
A stream processing method in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
Generating a reference clock; and
Updating the count value based on the reference clock;
Based on the count value and the time information, viewing including the step of adjusting the frequency of the reference clock,
In the step of adjusting the frequency, an evaluation value of the virtual buffer for the packet is calculated based on the count value and the time information, and the frequency of the reference clock is adjusted according to the calculated evaluation value to, stream processing method.
1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置において用いられるストリーム処理プログラムであって、
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
コンピュータに、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップと
前記パケットのペイロードに対して所定の処理を行うステップとを実行させるためのプログラムであり、
前記所定の処理を行うステップにおいては、前記クロック再生用情報および前記時刻情報が同期している場合には、前記基準クロックのタイミングに従って前記所定の処理を行う、ストリーム処理プログラム。
A stream processing program used in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
On the computer,
Generating a reference clock; and
Updating the count value based on the reference clock;
Adjusting the frequency of the reference clock based on the count value and the time information ;
A program for executing a predetermined process on the payload of the packet,
A stream processing program that, in the step of performing the predetermined process, performs the predetermined process according to the timing of the reference clock when the clock reproduction information and the time information are synchronized .
1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置において用いられるストリーム処理プログラムであって、
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
コンピュータに、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップとを実行させるためのプログラムであり、
前記周波数を調整するステップにおいては、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記基準クロックの周波数を調整する、ストリーム処理プログラム。
A stream processing program used in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
On the computer,
Generating a reference clock; and
Updating the count value based on the reference clock;
Adjusting the frequency of the reference clock based on the count value and the time information ,
In the step of adjusting the frequency, an evaluation value of the virtual buffer for the packet is calculated based on the count value and the time information, and the frequency of the reference clock is adjusted according to the calculated evaluation value A stream processing program.
JP2012069986A 2012-03-26 2012-03-26 Stream processing apparatus, stream processing method, and stream processing program Active JP5958008B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012069986A JP5958008B2 (en) 2012-03-26 2012-03-26 Stream processing apparatus, stream processing method, and stream processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012069986A JP5958008B2 (en) 2012-03-26 2012-03-26 Stream processing apparatus, stream processing method, and stream processing program

Publications (2)

Publication Number Publication Date
JP2013201702A JP2013201702A (en) 2013-10-03
JP5958008B2 true JP5958008B2 (en) 2016-07-27

Family

ID=49521565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012069986A Active JP5958008B2 (en) 2012-03-26 2012-03-26 Stream processing apparatus, stream processing method, and stream processing program

Country Status (1)

Country Link
JP (1) JP5958008B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6252615B2 (en) * 2016-03-25 2017-12-27 住友電気工業株式会社 Clock reproduction apparatus, stream processing apparatus, clock reproduction method, and clock reproduction program
JP7428009B2 (en) * 2020-02-28 2024-02-06 住友電気工業株式会社 Broadcast retransmission system, station side equipment, home side equipment, and broadcast retransmission method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0514399A (en) * 1991-07-03 1993-01-22 Oki Electric Ind Co Ltd Picture packet communication system
JP3837693B2 (en) * 2000-10-24 2006-10-25 富士通株式会社 Packet communication system
JP2007104085A (en) * 2005-09-30 2007-04-19 Toshiba Corp Digital broadcast method and apparatus employing communication line
JP4886758B2 (en) * 2008-11-13 2012-02-29 住友電気工業株式会社 Clock circuit and video processing apparatus

Also Published As

Publication number Publication date
JP2013201702A (en) 2013-10-03

Similar Documents

Publication Publication Date Title
JP4361561B2 (en) Data receiving apparatus and data receiving method
US9832507B2 (en) System and method for synchronizing media output devices connected on a network
US11849166B2 (en) Transmitting method, receiving method, transmitting device, and receiving device
US7778277B2 (en) Timing recovery method and system thereof
US20120207215A1 (en) Video information reproduction method and system, and video information content
JP2013192148A (en) Reception device, clock restoration method, and program
US20240064359A1 (en) Transmitting method, receiving method, transmitting device, and receiving device
JP5958008B2 (en) Stream processing apparatus, stream processing method, and stream processing program
JP3906712B2 (en) Data stream processing device
JP6822407B2 (en) Receiver, data processing method, and program
JP2005151463A (en) Device and method for receiving stream data
JP5149404B2 (en) Video receiver
JP6259227B2 (en) Clock reproduction control device and video signal receiving device
JP4874272B2 (en) Video signal processing apparatus and video signal processing method
JP2008067179A (en) Receiver and coded data reproduction method
JP4212404B2 (en) System clock control apparatus and system clock control method for stream receiver
JP2010136159A (en) Data receiver
JP6252615B2 (en) Clock reproduction apparatus, stream processing apparatus, clock reproduction method, and clock reproduction program
WO2023108500A1 (en) Data processing method and system, storage medium, and terminal device
JP2012016066A (en) Video signal processor, and video signal processing method
JP2008211331A (en) Stream data receiving and reproducing device
JP2013078127A (en) Video receiver
WO2012066832A1 (en) Ip receiver device, ip transmitter device, and ts receiver device
JP2009060324A (en) Time stamp addition device, time stamp addition method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141024

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150911

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151013

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151127

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20160408

TRDD Decision of grant or rejection written
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20160408

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160524

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160606

R150 Certificate of patent or registration of utility model

Ref document number: 5958008

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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