JP2006186674A - Mpeg stream processing method and processor - Google Patents
Mpeg stream processing method and processor Download PDFInfo
- Publication number
- JP2006186674A JP2006186674A JP2004378165A JP2004378165A JP2006186674A JP 2006186674 A JP2006186674 A JP 2006186674A JP 2004378165 A JP2004378165 A JP 2004378165A JP 2004378165 A JP2004378165 A JP 2004378165A JP 2006186674 A JP2006186674 A JP 2006186674A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- output
- mpeg
- stream
- time stamp
- 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.)
- Pending
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Time-Division Multiplex Systems (AREA)
Abstract
Description
本発明は、映像ストリームや音声ストリームなどを処理するMPEGストリーム処理方法および処理装置に関する。 The present invention relates to an MPEG stream processing method and processing apparatus for processing a video stream, an audio stream, and the like.
映像ストリーム、音声ストリームなどを処理するストリーム処理システムとして近年、MPEG−2やMPEG−4に代表されるMPEGシステムが注目されている。 In recent years, MPEG systems represented by MPEG-2 and MPEG-4 have attracted attention as stream processing systems for processing video streams, audio streams, and the like.
これらMPEGシステムでは、映像情報、音声情報、付加データなどの個別ストリームを多重化する方式、それぞれ同期をとりながらこれを再生する方式として2種類の方式を規定している。 In these MPEG systems, two types of schemes are defined: a scheme for multiplexing individual streams such as video information, audio information, and additional data, and a scheme for reproducing each stream while synchronizing them.
その1つはプログラムストリーム(PS:Program Stream)方式であり、従来から使用されているMPEG−1と同様に、1本のストリームの中にただ1つのプログラムだけを含ませることができる。この方式は、誤りが発生しない環境でのデータ伝送、データ蓄積に適用されることを想定し、冗長度を小さくすることができることから、DVDなど強力な誤り訂正符号を用いたデジタルストレージメディアなどで使用されることが多い。 One of them is a program stream (PS: Program Stream) system, and only one program can be included in one stream as in the case of MPEG-1 that has been conventionally used. Since this method can be applied to data transmission and data storage in an error-free environment and can reduce redundancy, it can be used in digital storage media using powerful error correction codes such as DVD. Often used.
もう1つは、トランスポートストリーム(TS:Transport Stream)方式であり、1本のストリームの中に複数のプログラムを含ませることができる。この方式は、データの伝送誤りが発生する環境に適用されることを想定し、その分だけ冗長度も大きく設定されていることから、放送や通信ネットワークなどで使用されることが多い。
ところで、このようなMPEGシステムにおいて、映像や音声、付加データなどをエンコードしてプログラムストリーム形式で外部に出力する場合には、システム・クロック・リファレンス(SCR:System Clock Reference)を含んだプログラムストリーム・パケットにする必要がある。また映像や音声、付加データなどをエンコードしてトランスポートストリーム形式で外部に出力する場合には、プログラム・クロック・リファレンス(PCR:Program Clock Reference)を含んだトランスポートストリーム・パケットにする必要がある。 By the way, in such an MPEG system, when video, audio, additional data, etc. are encoded and output to the outside in a program stream format, a program stream including a system clock reference (SCR) is included. Must be a packet. In addition, when video, audio, additional data, etc. are encoded and output to the outside in the transport stream format, it is necessary to form a transport stream packet including a program clock reference (PCR). .
その際、映像や音声、付加データなどをプログラムストリーム形式、またはトランスポートストリーム形式で外部に出力する直前に、システム・クロック・リファレンスやプログラム・クロック・リファレンスを計算してプログラムストリーム・パケット、トランスポートストリーム・パケットを生成し、これを外部に出力するようにしているので、エンコード後から出力までの間ではタイムシフトが困難であり、また、出力時のシステム負荷が大きくなってしまうという問題があった。 At that time, immediately before outputting video, audio, additional data, etc. in the program stream format or transport stream format, the system clock reference or program clock reference is calculated and the program stream packet or transport is calculated. Since stream packets are generated and output to the outside, it is difficult to time shift from encoding to output, and the system load at the time of output increases. It was.
また、このようなMPEGシステムにおいて、単一のプログラムストリーム、または単一のトランスポートストリームを出力する場合、単一の出力タイミングで、単一の出力ポートから出力するようにしているので、単一のプログラムストリーム、または単一のトランスポートストリームのパケット数が多いとき、出力開始から出力完了までに長い時間がかかってしまうばかりでなく、出力の自由度が制限されてしまうという問題があった。 Also, in such an MPEG system, when a single program stream or a single transport stream is output, it is output from a single output port at a single output timing. When there are a large number of packets of a single program stream or a single transport stream, there is a problem that not only does it take a long time from the start of output to the completion of output, but also the degree of freedom of output is limited.
一方、従来、設定された出力レートと有効パケットとの間に差がある場合、差分を埋めるために、NULL(ヌル)パケットを挿入する手法が知られている。または、上述した特許文献2に記載のように、ヌルパケットの代わりにPSI(Program Specific Information)を挿入する手法も知られている。
On the other hand, conventionally, when there is a difference between a set output rate and a valid packet, a technique of inserting a NULL (null) packet to fill the difference is known. Alternatively, as described in
しかしながら、このような従来のヌルパケットを挿入する手法、ヌルパケットに代えてPSIを挿入する手法では、同一のストリームに対してそれぞれのパケット出力部毎に異なるタイミングでの送出が出来ないという不具合があった。また、同一のストリームに対して、それぞれのパケット出力部毎に異なるストリームの多重が出来ないという問題もあった。 However, the conventional method of inserting null packets and the method of inserting PSI instead of null packets have a problem that transmission at different timings for each packet output unit for the same stream is not possible. there were. Another problem is that different streams cannot be multiplexed for each packet output unit for the same stream.
本発明は上記の事情に鑑み、プログラムストリーム・パケット、トランスポートストリーム・パケットを出力するとき、エンコードから出力までのタイムシフトを可能にして出力時のシステム負荷を小さくすることができ、さらに単一のプログラムストリーム、単一のトランスポートストリームを出力するときにも、複数の出力ポート、複数の出力タイミングを使用してパケット数が多い場合でも、出力開始から出力完了までに要する時間を短くすることができるとともに、出力の自由度を高めることができるMPEGストリーム処理方法および処理装置を提供することを目的としている。 In view of the above circumstances, the present invention enables a time shift from encoding to output when outputting a program stream packet and a transport stream packet, thereby reducing a system load at the time of output. Even when a single program stream or a single transport stream is output, even if there are many packets using multiple output ports and multiple output timings, the time required from output start to output completion should be shortened It is an object of the present invention to provide an MPEG stream processing method and a processing apparatus that can increase the degree of freedom of output.
上記の目的を達成するために、請求項1の発明は、映像情報、音声情報をMPEGパケット形式で外部に出力するMPEGストリーム処理方法において、前記映像情報、前記音声情報をMPEGパケットにする際、出力タイミングに対応するタイムスタンプを付加するとともに、出力レートと有効パケットの差分にヌルパケットを挿入して記憶領域に蓄積した後、前記各MPEGパケットに付加されている前記タイムスタンプに基づき、出力タイミングになっているかどうかをチェックし、出力タイミングになっているMPEGパケットがあるとき、当該MPEGパケットを前記記憶領域から読み出し、このMPEGパケットに付加されている前記タイムスタンプを削除するとともに、前記ヌルパケットを外部に出力するか、破棄するか、他のパケットと差し替えて出力するかを判断した後、その判断結果に従ったMPEGパケットを外部に出力することを特徴としている。 In order to achieve the above object, according to the first aspect of the present invention, in the MPEG stream processing method for outputting video information and audio information to the outside in the MPEG packet format, the video information and audio information are converted into MPEG packets. A time stamp corresponding to the output timing is added, a null packet is inserted into the difference between the output rate and the valid packet and stored in the storage area, and then the output timing is determined based on the time stamp added to each MPEG packet. If there is an MPEG packet that is in output timing, the MPEG packet is read from the storage area, the time stamp added to the MPEG packet is deleted, and the null packet Output to the outside, discard, etc. After determining whether to output the replace packet, it is characterized by outputting the MPEG packets in accordance with the determination result to the outside.
また、請求項2の発明は、映像情報、音声情報をMPEGパケット形式で外部に出力するMPEGストリーム処理装置において、前記映像情報、前記音声情報を取り込み、出力タイミングに対応するタイムスタンプを付加するとともに、出力レートと有効パケットの差分にヌルパケットを挿入したMPEGパケットを生成するパケット生成部と、このパケット生成部によって生成されたタイムスタンプ付きで、かつヌルパケットが挿入された前記MPEGパケットを記憶する記憶部と、この記憶部に記憶されている前記各MPEGパケットに付加されたタイムスタンプの内容に基づき、出力タイミングになっているMPEGパケットを読み出し、このMPEGパケットに付加された前記タイムスタンプを削除するとともに、前記ヌルパケットを外部に出力するか、破棄するか、他のパケットと差し替えて出力するかを判断し、その判断結果に従ったMPEGパケットを外部に出力するパケット出力部とを備えたことを特徴としている。 According to a second aspect of the present invention, in the MPEG stream processing apparatus for outputting video information and audio information to the outside in the MPEG packet format, the video information and the audio information are captured, and a time stamp corresponding to the output timing is added. A packet generation unit for generating an MPEG packet in which a null packet is inserted into the difference between the output rate and the effective packet, and a time stamp generated by the packet generation unit and the MPEG packet in which the null packet is inserted is stored Based on the content of the time stamp added to each MPEG packet stored in the storage unit and the storage unit, the MPEG packet at the output timing is read, and the time stamp added to the MPEG packet is deleted. And the null packet Or output to the outside, or discard, is characterized in that it is determined whether to output replaced with other packets, and a packet output unit for outputting the MPEG packets in accordance with the determination result to the outside.
請求項1、2の発明によれば、同一のストリームに対してそれぞれのパケット出力部毎に異なるタイミングでの送出が可能となり、また、同一のストリームに対して、それぞれのパケット出力部毎に異なるストリームの多重が可能となる。 According to the first and second aspects of the invention, it is possible to send the same stream at different timings for each packet output unit, and for the same stream, different for each packet output unit Multiplexing of streams is possible.
《参考例》
図1は本発明の参考例を示すブロック図である。
《Reference example》
FIG. 1 is a block diagram showing a reference example of the present invention.
この図に示すMPEGストリーム処理装置1は、映像ストリーム領域2、音声ストリーム領域3、パケット化ストリーム領域4を持ち、メモリバス6を介して映像ストリーム、音声ストリーム、プログラムストリーム・パケット、トランスポートストリーム・パケットなどを取り込んで一時記憶するメモリ5と、メモリバス6を介して出力対象となる映像情報を取り込んでエンコードした後、メモリ5の映像ストリーム領域2に記憶させる映像エンコード部7と、メモリバス6を介して出力対象となる音声情報を取り込んでエンコードした後、メモリ5の音声ストリーム領域3に記憶させる音声エンコード部8と、メモリバス6を介してメモリ5の映像ストリーム領域2、音声ストリーム領域3に一時記憶されている映像ストリーム、音声ストリームを読み出しながら、CPUから出力されるプログラム・クロック・リファレンス(または、システム・クロック・リファレンス)、タイムスタンプなどを用いて、タイムスタンプ付きのトランスポートストリーム・パケット、またはタイムスタンプ付きのプログラムストリーム・パケットを生成し、これをメモリ5のパケット化ストリーム領域4に一時記憶させるパケット生成部9と、メモリバス6を介してメモリ5のパケット化ストリーム領域4に一時記憶されている各トランスポートストリーム・パケット(または各プログラムストリーム・パケット)に付加されたタイムスタンプをチェックし、出力時になったとき、各トランスポートストリーム・パケット(または各プログラムストリーム・パケット)に付加されているタイムスタンプを削除して外部に出力するパケット出力部10とを備えている。
The MPEG
パケット生成部9は、図2に示すように、4つの合成器12,13,14,15を備えており、プログラム・クロック・リファレンス(PCR)を付加するとともに、タイムスタンプを挿入してタイムスタンプ付きのトランスポートストリーム・パケットを生成する。
As shown in FIG. 2, the
パケット出力部10は、図4に示すように、出力タイミングをカウントする出力タイミングカウンタ16と、メモリ5から読み出されたパケットを一時保持するバッファ17と、パケットに挿入されたタイムスタンプと出力タイミングとを比較して出力タイミングが到来したかどうかを判定するタイムスタンプ比較部18とを備えている。持っており、異なるタイミングでトランスポートストリーム・パケットを外部へ出力可能に構成されている。
As shown in FIG. 4, the
以上の構成において、CPUから映像情報のエンコード指示、音声情報のエンコード指示が出されると、映像エンコード部7、音声エンコード部8によって、メモリバス6を介して映像情報、音声情報が取り込まれて、エンコードされる。これによって得られた映像ストリーム、音声ストリームがメモリ5の映像ストリーム領域2、音声ストリーム領域3にそれぞれ一時記憶される。
In the above configuration, when an instruction for encoding video information and an instruction for encoding audio information is issued from the CPU, video information and audio information are captured via the memory bus 6 by the
この後、図2に示すように、CPU内に形成された出力タイミング予測算出部11によって、メモリ5の映像ストリーム領域2、音声ストリーム領域3に各々、一時記憶されている映像ストリーム、音声ストリームに対し、プログラムストリーム化指示またはトランスポートストリーム化指示のどちらが指示されているかチェックされる。このとき、トランスポートストリーム化指示がされていれば、出力タイミング予測算出部11によって、トランスポートストリーム・パケットを外部に出力する際に必要なプログラム・クロック・リファレンスが予測算出される。
After that, as shown in FIG. 2, the output timing
次いで、出力タイミング予測算出部11によって、メモリ5上の映像ストリーム領域2、音声ストリーム領域3に一時記憶されている映像ストリーム、音声ストリームをパケット化してこれを指定された時刻に出力するのに必要な各トランスポートストリーム・パケット毎の連続した値となるタイムスタンプと、上述した計算動作で得られたプログラム・クロック・リファレンスの予測結果とがメモリバス6上に出力される。
Next, it is necessary for the output timing
これにより、パケット生成部9によって、メモリ5の映像ストリーム領域2、音声ストリーム領域3に一時記憶されている映像ストリーム、音声ストリームの取り込みが開始されて、これら映像ストリーム、音声ストリームがパケット単位長毎に分割され、分割ストリームが生成される。各合成器12〜15上では、各分割ストリームに対し、出力タイミング予測算出部11から出力されたプログラム・クロック・リファレンスが付加されてトランスポートストリーム・パケットが生成されるとともに、図3に示すように、各トランスポートストリーム・パケットに対し、出力タイミング予測算出部11から出力されたタイムスタンプがそれぞれ付加されて、メモリ5上のパケット化ストリーム領域4に一時記憶される。
Thereby, the
また、この処理と並行し、パケット出力部10によって、メモリ5上のパケット化ストリーム領域4に一時記憶されている各トランスポートストリーム・パケットが読み出され、バッファ17に一時記憶され、タイムスタンプ比較器18によって、各トランスポートストリーム・パケットに付加されているタイムスタンプの値と、出力タイミングカウンタ16から出力される、現在の時刻と対応した出力タイミング値とが比較される。タイムスタンプの値と出力タイミング値とが一致しているとき、バッファ17内のトランスポートストリーム・パケットからタイムスタンプが削除されて、外部に出力される。
In parallel with this processing, each transport stream packet temporarily stored in the
このように、この参考例では、メモリ5上に形成された映像ストリーム領域2と、音声ストリーム領域3とに各々、一時記憶されている映像ストリーム、音声ストリームに対する実際の出力タイミングより前に、CPUによって、トランスポートストリームを外部に出力する際のプログラム・クロック・リファレンス、またはプログラムストリームを外部に出力する際のシステム・クロック・リファレンスを予測算出する。そして、この予測算出結果と、指定された時刻に出力するのに必要なタイムスタンプとを使用して図5の模式図に示すように、パケット生成部9にて映像ストリーム、音声ストリームをパケット化し、メモリ5上のパケット化ストリーム領域4に一時記憶する。この後、指定された時刻になったとき、パケット出力部10がこれを検知してパケット化ストリーム領域4に一時記憶されている各トランスポートストリーム・パケット、または各プログラムストリーム・パケットに付加されているタイムスタンプを削除して外部に出力するようにした。そのため、トランスポートストリーム・パケット、またはプログラムストリーム・パケットを外部に出力するとき、エンコードから出力までのタイムシフトを可能にして出力時のシステム負荷を小さくすることができる。
Thus, in this reference example, before the actual output timing for the video stream and the audio stream temporarily stored in the
《他の参考例》
上述した参考例では、パケット生成部9によって生成されたタイムスタンプ付きの各トランスポートストリーム・パケット、または各プログラムストリーム・パケットをメモリ5のパケット化ストリーム領域4に一時記憶し、指定された時刻になったとき、パケット出力部10がこれを検知してパケット化ストリーム領域4に一時記憶されている各トランスポートストリーム・パケット、または各プログラムストリーム・パケットに付加されているタイムスタンプを削除して外部に出力するようにした。
《Other reference examples》
In the reference example described above, each transport stream packet with a time stamp generated by the
しかし、複数の映像ストリーム、音声ストリームを連続的にパケット化するときには、図6の模式図に示すように、パケット生成部9によって生成されたタイムスタンプ付きの各トランスポートストリーム・パケット、プログラムストリーム・パケットをメモリ5のパケット化ストリーム領域4に一時記憶した後、ハードディスクなどの外部記憶装置19に移動する。
However, when a plurality of video streams and audio streams are continuously packetized, as shown in the schematic diagram of FIG. 6, each transport stream packet with a time stamp generated by the
そして、外部記憶装置19に格納されているタイムスタンプ付きの各トランスポートストリーム・パケット、または各プログラムストリーム・パケットを再度、メモリ5に移動した後、パケット出力部10によって、指定した出力タイミングで外部に出力するようにしても良い。
Then, after transporting each transport stream packet with a time stamp or each program stream packet stored in the
このように構成することにより、メモリ5の容量が小さいときにも、複数の映像ストリーム、音声ストリームを連続的にパケット化して外部に出力することができる。
With this configuration, even when the capacity of the
また、上述した参考例では、1つのパケット出力部10を用いて、メモリ5のパケット化ストリーム領域4に一時記憶されているタイムスタンプ付きの各トランスポートストリーム・パケット、または各プログラムストリーム・パケットを読み込ませ、指定された出力タイミングで外部に出力するようにしているが、図7に示すように、複数の出力ポートに対応する複数のパケット出力部10a〜10nを起動してメモリ5のパケット化ストリーム領域4に一時記憶されているタイムスタンプ付きの各トランスポートストリーム・パケット、または各プログラムストリーム・パケットを読み込み、指定された出力タイミングで外部に出力するようにしても良い。
Further, in the above-described reference example, each transport stream packet with a time stamp or each program stream packet temporarily stored in the
このように構成することにより、複数のトランスポートストリーム・パケット、またはプログラムストリーム・パケットを同時、並列的に読み出して外部に出力することができる。また、単一のトランスポートストリーム、単一のプログラムストリームを出力するときにも、複数の出力ポート、複数の出力タイミングを使用することができ、パケット数が多い場合でも、出力開始から出力完了までに要する時間を短縮することができるとともに、出力の自由度を高めることができる。 With this configuration, a plurality of transport stream packets or program stream packets can be read simultaneously and in parallel and output to the outside. Also, when outputting a single transport stream or a single program stream, multiple output ports and multiple output timings can be used. Even when the number of packets is large, from the start of output to the end of output. Can be shortened and the degree of freedom of output can be increased.
《実施形態》
図8は本発明の実施形態を示すブロック図である。
<Embodiment>
FIG. 8 is a block diagram showing an embodiment of the present invention.
この実施形態では、メモリ5は、映像ストリーム領域2、音声ストリーム領域3に加えて、複数の他ストリーム領域21と、第1パケット領域22、第2パケット領域23,および第3パケット領域24とを備えて構成されている。
In this embodiment, the
また、この実施形態では、映像エンコード部7と音声エンコード部8に加えて、映像情報や音声情報とは異なる他の情報を取り込んでエンコードした後、メモリ5の他ストリーム領域21に記憶させる他エンコード部20と、メモリバス6を介してメモリ5の映像ストリーム領域2、音声ストリーム領域3に一時記憶されている映像ストリーム、音声ストリーム、および他ストリーム領域21に一時記憶されている他ストリームを読み出し、出力レートとの差分に相当するヌルパケットを挿入するとともに、CPUから出力されるプログラム・クロック・リファレンス(PCR)(または、システム・クロック・リファレンス)、タイムスタンプなどを用いて、タイムスタンプ付きのトランスポートストリーム・パケット、またはタイムスタンプ付きのプログラムストリーム・パケットを生成し、これをメモリ5の第1パケット領域22,第2パケット領域、第3パケット領域に一時記憶させる第1パケット生成部9−1、第2パケット生成部9−2、第3パケット生成部9−3とを備えている。
In this embodiment, in addition to the
さらに、メモリ5の第1パケット領域22、第2パケット領域23,第3パケット領域24に一時記憶されている各プログラムストリーム・パケット(または各トランスポートストリーム・パケット)に付加されたタイムスタンプをチェックし、出力時になったとき、各プログラムストリーム・パケット(または各トランスポートストリーム・パケット)に付加されているタイムスタンプを削除するとともに、ヌルパケットをそのままの状態で出力させるか、破棄するか、他のパケットに置き換えるかを選択してそれぞれ出力する第1パケット出力部10−1、第2パケット出力部10−2とを備えている。
Further, the time stamp added to each program stream packet (or each transport stream packet) temporarily stored in the
各パケット生成部9−1,9−2,9−3は、図9に示すように、4つの合成器12,13,14,15を備えており、メモリから映像、音声、その他のストリームを読み出すとともに、適宜ヌルパケットを挿入し、また、PCRとタイムスタンプを付加したタイムスタンプ付きのトランスポートストリーム・パケットを生成する。
As shown in FIG. 9, each
各パケット出力部10−1,10−2は、それぞれ異なる出力タイミングが設定される出力タイミングカウンタ16と、パケットに挿入されたタイムスタンプと出力タイミングとを比較して出力タイミングが到来したかどうかを判定するタイムスタンプ比較部18とを備えており、異なるタイミングでトランスポートストリーム・パケットを外部へ出力可能に構成されている。
Each of the
以上の構成において、CPUから映像情報のエンコード指示、音声情報のエンコード指示および他の情報のエンコード指示が出されると、映像エンコード部7、音声エンコード部8および他エンコード部20によって、メモリバス6を介して映像情報、音声情報および他の情報が取り込まれて、エンコードされる。これによって得られた映像ストリーム、音声ストリームおよび他ストリームがメモリ5の映像ストリーム領域2、音声ストリーム領域3および他ストリーム領域21にそれぞれ一時記憶される。
In the above configuration, when an instruction for encoding video information, an instruction for encoding audio information, and an instruction for encoding other information are issued from the CPU, the
この後、図9に示すように、CPU内に形成された出力タイミング予測算出部11によって、メモリ5の映像ストリーム領域2、音声ストリーム領域3および他ストリーム領域21に各々、一時記憶されている映像ストリーム、音声ストリームおよび他ストリームに対し、プログラムストリーム化指示またはトランスポートストリーム化指示のどちらが指示されているかチェックされる。このとき、トランスポートストリーム化指示がされていれば、出力タイミング予測算出部11によって、トランスポートストリーム・パケットを外部に出力する際に必要なプログラム・クロック・リファレンス(PCR)が予測算出される。
Thereafter, as shown in FIG. 9, the video temporarily stored in the
次いで、出力タイミング予測算出部11によって、メモリ5上の映像ストリーム領域2、音声ストリーム領域3に一時記憶されている映像ストリーム、音声ストリームをパケット化してこれを指定された時刻に出力するのに必要な各トランスポートストリーム・パケット毎の連続した値となるタイムスタンプと、上述した計算動作で得られたプログラム・クロック・リファレンス(PCR)の予測結果とがメモリバス6上に出力される。
Next, it is necessary for the output timing
これにより、各パケット生成部9−1,9−2,9−3によって、メモリ5の映像ストリーム領域2、音声ストリーム領域3、および他ストリーム領域21に一時記憶されている映像ストリーム、音声ストリームおよび他ストリームの取り込みが開始されて、これら映像ストリーム、音声ストリームおよび他ストリームがパケット単位長毎に分割され、分割ストリームが生成される。また、このとき、出力レートと有効パケットとの差分が求められる。各合成器12〜15上では、各分割ストリームに対し、出力タイミング予測算出部11から出力されたプログラム・クロック・リファレンスが付加されるとともに、前記差分にヌルパケットが挿入されてトランスポートストリーム・パケットが生成されるとともに、各トランスポートストリーム・パケットに対し、出力タイミング予測算出部11から出力されたタイムスタンプがそれぞれ付加されて、メモリ5上の各パケット領域22,23,24に一時記憶される。
Accordingly, the video stream, the audio stream, and the video stream temporarily stored in the
また、この処理と並行し、各パケット出力部10−1,10−2によって、メモリ5上のパケット領域4に一時記憶されている各トランスポートストリーム・パケットが読み出され、バッファ17に一時記憶され、タイムスタンプ比較器18によって、各トランスポートストリーム・パケットに付加されているタイムスタンプの値と、出力タイミングカウンタ16から出力される、現在の時刻と対応した出力タイミング値とが比較される。タイムスタンプの値と出力タイミング値とが一致しているとき、バッファ17内のトランスポートストリーム・パケットからタイムスタンプが削除されて、外部に出力される。
In parallel with this processing, the transport stream packets temporarily stored in the
特に、この実施形態においては、ヌルパケットをそのまま出力するか、ヌルパケットを破棄するか、バッファ25に一時記憶されたパケットで置き換えて出力するかを選択することができる。例えば、図11(a)のパケット1では、2つのヌルパケットはそのまま出力されるが、他の2つのヌルパケットはパケットP1(0)、パケットP1(1)に置き換えられて出力されている。同(b)のパケット2も同様、2つのヌルパケットはそのまま出力されるが、他の2つのヌルパケットがパケットP2(0)、パケットP2(1)に置き換えられて出力されて、各パケット出力部10−1,10−2ごとに異なるストリームパケットの多重ができる。
In particular, in this embodiment, it is possible to select whether to output a null packet as it is, discard the null packet, or replace it with a packet temporarily stored in the
また、図11に示すように、パケット1を出力する第1パケット出力部10−1の出力タイミングとパケット2を出力する第2パケット出力部10−2の出力タイミングはそれぞれ異なっており、所定の時間差を持って異なるタイミングでパケットを出力することができる。
Further, as shown in FIG. 11, the output timing of the first packet output unit 10-1 that outputs the packet 1 and the output timing of the second packet output unit 10-2 that outputs the
このように、この実施形態によれば、同一のストリームに対して、それぞれ異なるタイミングで出力することができる。また、同一のストリームに対してそれぞれ異なるストリームを多重して出力することができる。 As described above, according to this embodiment, the same stream can be output at different timings. Also, different streams can be multiplexed and output for the same stream.
《変形例》
なお、図12に示すように、第2パケット生成部9−1、第3パケット生成部9−2はメモリバス6に接続されていなくても良く、直接、パケット出力部10−1,10−2に接続されるように構成しても同様の効果を得ることができる。
<Modification>
As shown in FIG. 12, the second
1:MPEGストリーム処理装置
2:映像ストリーム領域
3:音声ストリーム領域
4:パケット化ストリーム領域
5:メモリ
6:メモリバス
7:映像エンコード部
8:音声エンコード部
9,9−1,9−2,9−3:パケット生成部
10,10−1,10−2:パケット出力部
11:出力タイミング予測算出部
12〜15:合成器
16:出力タイミングカウンタ
17,25:バッファ
18:タイムスタンプ比較器
19:外部記憶装置
20:他エンコード部
21:他ストリーム領域
22:第1パケット領域
22:第2パケット領域
23:第3パケット領域
1: MPEG stream processing apparatus 2: a video stream area 3: audio stream area 4: packetized stream area 5: Memory 6: memory bus 7: image encoding section 8: audio encoding
Claims (2)
前記映像情報、前記音声情報をMPEGパケットにする際、出力タイミングに対応するタイムスタンプを付加するとともに、出力レートと有効パケットの差分にヌルパケットを挿入して記憶領域に蓄積した後、前記各MPEGパケットに付加されている前記タイムスタンプに基づき、出力タイミングになっているかどうかをチェックし、
出力タイミングになっているMPEGパケットがあるとき、当該MPEGパケットを前記記憶領域から読み出し、このMPEGパケットに付加されている前記タイムスタンプを削除するとともに、前記ヌルパケットを外部に出力するか、破棄するか、他のパケットと差し替えて出力するかを判断した後、その判断結果に従ったMPEGパケットを外部に出力する、
ことを特徴とするMPEGストリーム処理方法。 In an MPEG stream processing method for outputting video information and audio information to the outside in MPEG packet format,
When the video information and the audio information are converted into MPEG packets, a time stamp corresponding to the output timing is added, a null packet is inserted into the difference between the output rate and the effective packet, and stored in the storage area. Based on the time stamp added to the packet, check whether it is the output timing,
When there is an MPEG packet at the output timing, the MPEG packet is read from the storage area, the time stamp added to the MPEG packet is deleted, and the null packet is output to the outside or discarded. Or after deciding whether to output by replacing with other packets, output the MPEG packet according to the judgment result to the outside,
An MPEG stream processing method.
前記映像情報、前記音声情報を取り込み、出力タイミングに対応するタイムスタンプを付加するとともに、出力レートと有効パケットの差分にヌルパケットを挿入したMPEGパケットを生成するパケット生成部と、
このパケット生成部によって生成されたタイムスタンプ付きで、かつヌルパケットが挿入された前記MPEGパケットを記憶する記憶部と、
この記憶部に記憶されている前記各MPEGパケットに付加されたタイムスタンプの内容に基づき、出力タイミングになっているMPEGパケットを読み出し、このMPEGパケットに付加された前記タイムスタンプを削除するとともに、前記ヌルパケットを外部に出力するか、破棄するか、他のパケットと差し替えて出力するかを判断し、その判断結果に従ったMPEGパケットを外部に出力するパケット出力部と、
を備えたことを特徴とするMPEGストリーム処理装置。 In an MPEG stream processing apparatus that outputs video information and audio information to the outside in MPEG packet format,
A packet generation unit that captures the video information and the audio information, adds a time stamp corresponding to the output timing, and generates an MPEG packet in which a null packet is inserted in the difference between the output rate and the valid packet;
A storage unit for storing the MPEG packet with a time stamp generated by the packet generation unit and a null packet inserted;
Based on the content of the time stamp added to each MPEG packet stored in the storage unit, the MPEG packet at the output timing is read, the time stamp added to the MPEG packet is deleted, and the A packet output unit that determines whether to output a null packet to the outside, discard it, or replace it with another packet and output the MPEG packet according to the determination result,
An MPEG stream processing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004378165A JP2006186674A (en) | 2004-12-27 | 2004-12-27 | Mpeg stream processing method and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004378165A JP2006186674A (en) | 2004-12-27 | 2004-12-27 | Mpeg stream processing method and processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006186674A true JP2006186674A (en) | 2006-07-13 |
Family
ID=36739442
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004378165A Pending JP2006186674A (en) | 2004-12-27 | 2004-12-27 | Mpeg stream processing method and processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006186674A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011024437A1 (en) * | 2009-08-25 | 2011-03-03 | パナソニック株式会社 | Recording device and playback device |
-
2004
- 2004-12-27 JP JP2004378165A patent/JP2006186674A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011024437A1 (en) * | 2009-08-25 | 2011-03-03 | パナソニック株式会社 | Recording device and playback device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2273111C2 (en) | Method for transformation of packet stream of information signals to stream of information signals with time stamps and vice versa | |
US7349410B2 (en) | Data transmission device and data transmission method | |
US7227899B2 (en) | Method and system for re-multiplexing of content-modified MPEG-2 transport streams using interpolation of packet arrival times | |
JP4746998B2 (en) | Transmission rate adjusting device and transmission rate adjusting method | |
JP5409032B2 (en) | Transmitting apparatus, method, and program | |
CN101098209A (en) | FEC encoding method, FEC decoding method, and FEC decoding apparatus | |
JP2009177447A (en) | Moving image transmitting and receiving system | |
US5832256A (en) | System clock recovery apparatus for MPEG decoding system | |
JP2000174819A (en) | Signal format, encoder, decoder and signal transmission device | |
US7693222B2 (en) | Method and system for re-multiplexing of content-modified MPEG-2 transport streams using PCR interpolation | |
JP2007028241A (en) | Video image coding/transmitting device, video image coding/transmitting method, video image coding/transmitting program, and its record medium | |
US7729383B2 (en) | Multiplexer and multiplexing method | |
KR20100027136A (en) | System and method for transport of a constant bit rate stream | |
JP2008245050A (en) | Pcr correction circuit | |
JP2006186674A (en) | Mpeg stream processing method and processor | |
JP2009290768A (en) | Video processing apparatus and video processing method | |
JP5939884B2 (en) | Error correction coding device | |
JP2005333412A (en) | Multiple-stream generating device | |
JP2010028642A (en) | Image transmission system | |
JP6684433B2 (en) | Transmission device, transmission method, and program | |
CA2535457C (en) | Method and system for re-multiplexing of content-modified mpeg-2 transport streams using pcr interpolation | |
JP4212794B2 (en) | Stream multiplexing transmission method | |
JPH09270994A (en) | Stream control system | |
JP2006270595A (en) | Image encoding circuit, image encoding device, and multiplexing circuit | |
KR0138123B1 (en) | An apparatus for coding time-stamp in mpeg-2 system |