JP2004120632A - System and method for data analysis - Google Patents

System and method for data analysis Download PDF

Info

Publication number
JP2004120632A
JP2004120632A JP2002284174A JP2002284174A JP2004120632A JP 2004120632 A JP2004120632 A JP 2004120632A JP 2002284174 A JP2002284174 A JP 2002284174A JP 2002284174 A JP2002284174 A JP 2002284174A JP 2004120632 A JP2004120632 A JP 2004120632A
Authority
JP
Japan
Prior art keywords
data
start code
timing
packet
predetermined number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2002284174A
Other languages
Japanese (ja)
Inventor
Hideaki Iwaki
岩木 英明
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2002284174A priority Critical patent/JP2004120632A/en
Publication of JP2004120632A publication Critical patent/JP2004120632A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To effectively analysis data of predetermined bit number following a start code without unnecessary load to an analysis means. <P>SOLUTION: First, a start code detector 21 detects a start code. The start code detector 21 supplies an input data signal to a delay circuit 22 every time one byte data are supplied. The start code detector 21 supplies "1" as the input data signal to the delay circuit 22 when a start code is recognized, and supplies "0" when not recognized. The delay circuit 22 recognizes the bit number of data inputted to the start code detector 21 following the start code by memorizing the supplied input data signal one by one to a shift register. When all separation data are inputted to the start code detector 21, it supplies a start code detection signal to a detection position storing part 24, and the detection position storing part 24 supplies a position signal to a data analysis part 4. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、例えば、MPEG(Moving Picture Expert Group)システムなどにおいて、ビデオ符号化データ及びオーディオ符号化データなどを多重化するとき、並びに多重化されたデータを分離するときなどに使用されるデータ解析システム及びデータ解析方法に関する。
【0002】
【従来の技術】
近年、デジタル放送メディアやデジタル通信メディアなどを伝送媒体としたデジタル伝送システムにおいては、一般に、音声情報及び画像情報の圧縮多重化規格の1つであるMPEGシステムを利用したデジタル多重化方式を採用している。
【0003】
MPEGとは、ISO/IEC JTC1/SC29(International Organization/International Electrotechnical Commission, Joint Technical Committee 1/Sub Commitee 29:国際標準化機構/国際電気標準会議 合同技術委員会1/専門部会29)における蓄積用動画像符号化の検討組織(Moving Picture Expert Group)の略称であり、例えば、MPEG1標準としてISO11172が、MPEG2標準としてISO13818が規格化されている。なお、以下では、MPEGによって定められた動画像符号化の国際規格基準を、MPEGと称することとする。
【0004】
以下では、MPEG2−PS(Program Stream)に基づいたデジタル多重伝送システムについて説明する。MPEG2−PSに基づいたデジタル多重伝送システム100は、図6に示すように、送信系101と、受信系102と、伝送路103とから構成されている。
【0005】
送信系101は、オーディオエンコーダ111と、ビデオエンコーダ112と、オーディオエンコードバッファ113と、ビデオエンコードバッファ114と、多重化器115とを備えている。
【0006】
オーディオエンコーダ111には、例えばマイクによって集音されたデジタルのオーディオ信号や、記録媒体から再生されたオーディオ信号などが入力される。オーディオエンコーダ111は、入力されたデジタルのオーディオ信号をMPEG2−PS規格に基づいて圧縮符号化して、オーディオ符号化データを生成する。生成されたオーディオ符号化データは、オーディオエンコードバッファ113に格納される。
【0007】
ビデオエンコーダ112には、例えばカメラによって撮影されたデジタルのビデオ信号や記録媒体から再生されたデジタルのビデオ信号が入力される。ビデオエンコーダ112は、入力されたデジタルのビデオ信号をMPEG2規格に基づいて圧縮符号化して、ビデオ符号化データを生成する。生成されたビデオ符号化データは、ビデオエンコードバッファ114に格納される。
【0008】
オーディオエンコードバッファ113は、供給されたオーディオ符号化データを、多重化器115に読み出されるまで一時的に格納する。
【0009】
ビデオエンコードバッファ114は、供給されたビデオ符号化データを、多重化器115に読み出されるまで一時的に格納する。
【0010】
多重化器115は、オーディオエンコードバッファ113に格納されたオーディオ符号化データ及びビデオエンコードバッファ114に格納されたビデオ符号化データを多重化し、MPEG2−PS規格に規定されたPES(Program Elementary Stream)パケットを生成する。
【0011】
PESパケットは、図1に示すように、オーディオ符号化データ及びビデオ符号化データなどのパケットデータの先頭にヘッダが付加した構成とされる。ヘッダは、PESパケットの先頭を示す3バイトのスタートコード、パケットデータの内容を示す1バイトのストリームID、この領域に続くデータの長さを示す2バイトのPESパケット長、2バイトのフラグ、1バイトのPESヘッダデータ長、及びPESヘッダデータを含む。なお、PESヘッダデータとパケットデータとは、バイト数が可変とされている。
【0012】
そして、多重化器115は、1つ又は複数のPESパケットの先頭にパックヘッダを付加することでパックを生成し、パックを繋げることでプログラムストリーム(以下、PSと称する。)を生成する。
【0013】
なお、多重化器115は、PESパケットを生成するときに、アクセスユニットと呼ばれる再生単位毎に、復号時刻を示す時間情報であるDTS(Decoding Time Stamp)及び再生出力時刻を示す時間情報であるPTS(Presentation TimeStamp)と呼ばれるタイムスタンプを付加する。DTS及びPTSは、PESヘッダデータに含まれる。
【0014】
また、多重化器115は、パックを生成するときに、SCR(System Clock Reference)も付加する。SCRは、復号のときに用いられる基準同期クロックであるSTC(System Time Crock)を、受信系102において意図した値にセットするための情報である。SCRは、パックヘッダに含まれる。
【0015】
一方、受信系102は、分離器121と、オーディオデコードバッファ122と、ビデオデコードバッファ123と、オーディオデコーダ124と、ビデオデコーダ125とを備える。
【0016】
分離器121は、供給されたPESパケットに記述されたストリームIDに基づいて、当該PESパケットに含まれるパケットデータが、ビデオ符号化データであるか、オーディオ符号化データであるかなどを判別する。分離器121は、当該PESパケットに含まれるパケットデータが、ビデオ符号化データであるときには当該データをビデオデコードバッファへ格納し、オーディオ符号化データであるときには当該データをオーディオデコードバッファへ格納する。
【0017】
オーディオデコードバッファ122は、供給されたオーディオ符号化データを、当該データがオーディオデコーダ124により読み出されるまで一時的に記憶する。
【0018】
ビデオデコードバッファ123は、供給されたビデオ符号化データを、当該データがビデオデコーダ125により読み出されるまで一時的に記憶する。
【0019】
オーディオデコーダ124は、オーディオデコードバッファ122に格納されたオーディオ符号化データをアクセスユニット単位で読み出して、MPEG2−PS規格に従って復号し、オーディオ信号を生成する。オーディオデコーダ124は、STCとPTSとが一致したタイミングで、オーディオ符号化データの復号及び出力を行う。
【0020】
ビデオデコーダ125は、ビデオデコードバッファ122に格納されたビデオ符号化データをアクセスユニット単位で読み出して、MPEG2−PS規格に従って復号し、ビデオ信号を生成する。ビデオデコーダ125は、STCとDTSとが一致したタイミングでビデオ符号化データの復号を行い、STCとPTSとが一致したタイミングで復号したビデオ信号の出力を行う。
【0021】
以上説明したデジタル多重伝送システムでは、PESパケット、オーディオ符号化データ、及びビデオ符号化データなどの各データストリームが解析される。各データストリームはパケットから構成されており、パケットの先頭にパケットヘッダが付加した構成とされている。パケットヘッダには、先頭がスタートコードとされており、スタートコードに続く位置にはストリームの長さや解析方法などに関するデータが含まれている。データストリームを解析するときには、スタートコードの検出を行った後にパケットヘッダのデータを解析することによってパケットデータの解析方法や長さなどの読みとり、読みとった結果に従ってパケットデータに対する処理を行う。
【0022】
以下では、分離器121が、PESパケットのパケットヘッダを解析して、パケットデータをオーディオデコードバッファ122又はビデオデコードバッファ123へ供給する方法について詳細に説明する。
【0023】
分離器121は、図7に示すように、データ用バッファ130と、スタートコード検出部131と、データ解析部132とを備える。
【0024】
先ず、データストリームは、データ用バッファ130へ記憶される。次に、スタートコード検出部131が、データ用バッファ130に対して記憶されたデータを検索する。
【0025】
次に、スタートコード検出部131は、スタートコードが検出されたときに、スタートコードが検出された旨をデータ解析部132に通知する。
【0026】
次に、データ解析部132がデータ用バッファ130へアクセスし、パケットヘッダのデータが全てデータ用バッファ130に対して記憶されたことを確認する。
【0027】
そして、データ解析部132がパケットヘッダを解析することによってパケットデータの種類などを判断し、パケットデータがビデオ符号化データであるときには、当該パケットデータをビデオデコードバッファ123へ供給し、オーディオ符号化データであるときには、当該パケットデータをオーディオデコードバッファ124へ供給する。
【0028】
【発明が解決しようとする課題】
ところで、データ解析部132は、データ用バッファ130に対してパケットヘッダのデータが全て記憶されてから、パケットヘッダのデータを解析を開始する。データ解析部132がパケットヘッダのデータを解析するを開始するまでの過程は、以下の図8に示す通りとなる。
【0029】
先ず、ステップS1において、スタートコード検出器131が入力されたデータからスタートコードを検出し、データ解析部132に通知する。
【0030】
次に、ステップS2において、データ解析部132は、データ用バッファ130にアクセスし、パケットヘッダのデータが全てデータ用バッファ130に対して記憶されているか否かを判断する。パケットヘッダのデータが全てデータ用バッファ130に対して記憶されているときにはステップS3へすすみ、記憶されていないときには再度ステップS2の動作を行う。
【0031】
そして、ステップS3において、データ解析部132は、パケットヘッダのデータの解析を開始する。
【0032】
すなわち、データ解析部132では、スタートコードが検出された後に、パケットヘッダが全て記憶されるまで、データ用バッファ130に繰り返しアクセスする必要性が生じる。
【0033】
しかしながら、受信系103においては、図9に示すように、パケットヘッダが断続的に分離器121に対して供給される場合が生じる。パケットヘッダが断続的に分離器121に対して供給される場合には、データ用バッファ130に対してパケットヘッダが全て記憶されるまでに長い時間を要することとなる。
【0034】
したがって、データ解析部132がデータ用バッファ130に対してアクセスする回数が多くなる。データ解析部132がデータ用バッファ130に対してアクセスする回数が多いときには、データ解析部132の負担が大きくなる。また、データ解析部132がパケットヘッダを解析するために要する時間も長くなる。
【0035】
本発明は、以上説明した従来の実情に鑑みて提案されたものであり、解析手段が記憶手段に対して複数回アクセスすることなくスタートコードに続く所定のビット数のヘッダデータが記憶手段に対して記憶されたことを判断することによって、データストリームに対する処理を効率良く行うことが可能となるデータ解析システム及びデータ解析方法を提供することを目的とする。
【0036】
【課題を解決するための手段】
本発明に係るデータ解析システムは、複数のパケットから構成されるデータストリームが順次入力され、当該データストリームを解析するデータ解析システムにおいて、入力されたデータストリームから上記パケットの先頭を示すスタートコードを検出する検出手段と、上記データストリームを順次記憶するパケットデータ記憶手段と、上記検出手段がスタートコードを検出したタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータが上記パケットデータ記憶手段に対して全て記憶されたタイミングを生成するタイミング生成手段と、上記パケットデータ記憶手段に対して記憶されているデータのうち、上記スタートコードに続く所定のビット数のヘッダデータを解析する解析手段とを備え、上記解析手段は、上記タイミング生成手段が生成したタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータの解析を開始することを特徴とする。
【0037】
本発明に係るデータ解析システムでは、検出手段がスタートコード検出信号を出力したタイミングに基づいて、タイミング生成手段が上記スタートコードに続く所定のビット数のヘッダデータが全て上記パケットデータ記憶手段に記憶されたタイミングを検出する。そして、解析手段は、上記タイミング生成手段がスタートコード検出信号を出力したタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータの解析を開始する。
【0038】
また、本発明に係るデータ解析方法は、複数のパケットから構成されるデータストリームが順次入力され、当該データストリームを解析するデータ解析方法において、入力されたデータストリームから上記パケットの先頭を示すスタートコードを検出する検出ステップと、上記データストリームを記憶手段に対して順次記憶する記憶ステップと、上記検出ステップにおいてスタートコードが検出されたタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータが上記パケットデータ記憶手段に対して全て記憶されたタイミングを生成するタイミング生成ステップと、上記記憶手段に対して記憶されているデータのうち、上記スタートコードに続く所定のビット数のヘッダデータを解析する解析ステップとを備え、上記解析ステップにおいては、上記タイミング生成ステップにおいてスタートコード検出信号が出力されたタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータの解析を開始することを特徴とする。
【0039】
【発明の実施の形態】
以下、本発明の実施の形態について、図面を参照しながら詳細に説明する。以下では、本発明をPES(Program Elementary Stream)パケットに含まれるデータを分離するPESパケット分離器に適用した例について説明する。
【0040】
PESパケットは、図1に示すように、オーディオ符号化データ及びビデオ符号化データなどのパケットデータの先頭にヘッダが付加した構成とされる。ヘッダは、PESパケットの先頭を示す3バイトのスタートコード、パケットデータの内容を示す1バイトのストリームID、この領域に続くデータの長さを示す2バイトのPESパケット長、2バイトのフラグ、1バイトのPESヘッダデータ長、及びPESヘッダデータを含む。なお、PESヘッダデータとパケットデータとは、バイト数が可変とされている。
【0041】
なお、本実施の形態では、PESパケットにおけるストリームID、PESパケット長、フラグ、PESヘッダデータ長、PTS、DTSを分離データと称することとする。分離データを解析することによって、パケットデータの種類やタイムスタンプなどを知ることが可能となり、PESパケットの分離を行うことが可能となる。また、図1に示すように、分離データは固定長とされる。
【0042】
図2に示すように、PESパケット分離器1は、解析遅延部2と、データ用バッファ3と、データ解析部4と、DMA転送部5とを備える。また、PESパケット分離器1は、オーディオデコードバッファ6及びビデオデコードバッファ7と接続している。PESパケット分離器1は、外部から入力されたデータストリームのPESパケットを、パケットデータがオーディオ符号化データであるものと、ビデオ符号化データであるものとに分離する。
【0043】
解析遅延部2は、データ用バッファ3に対して分離データが全て記憶されたときに、データ解析部4へ位置信号を供給し、データ解析部4に対して分離データの解析を開始させる。なお、解析遅延部2については、詳細を後述する。
【0044】
データ用バッファ3は、PESパケット分離器1に入力されたデータを記憶する。
【0045】
データ解析部4は、解析遅延部2から供給された位置信号に基づいてデータ用バッファ3に対して記憶された分離データを解析し、パケットデータの種類、位置、及び復号方法などを読みとる。データ解析部4は、CPU(Central Processing Unit)10と、データを解析するためのプログラムが記憶されたプログラム記憶手段11とを備えている。データ解析部4は、解析遅延部2から位置信号が供給されたときに、当該プログラムを起動させて分離データの解析を開始する。
【0046】
DMA転送部5は、データ解析部4からの指示に従って、パケットデータがオーディオ符号化データであるときには当該パケットデータをオーディオデコードバッファ6へ供給し、パケットデータがビデオ符号化データであるときには当該パケットデータをビデオデコードバッファ7へ供給する。
【0047】
オーディオデコードバッファ6は、供給されたオーディオ符号化データがオーディオデコーダ(図示せず。)により読み出されるまで、当該オーディオ符号化データを一時的に記憶する。
【0048】
ビデオデコードバッファ7は、供給されたビデオ符号化データがビデオデコーダ(図示せず。)により読み出されるまで、当該ビデオ符号化データを一時的に記憶する。
【0049】
以下では、解析遅延部2について詳細に説明する。
【0050】
解析遅延部2は、図3に示すように、スタートコード検出部21と、遅延回路22と、位置検出部23と、検出位置保持部24とを備える。
【0051】
スタートコード検出部21は、データストリームを構成するPESパケットのスタートコードを検出する。また、データが供給される毎に遅延回路22に対して、「1」又は「0」をデータ入力信号として供給する。詳述すると、スタートコード検出部21は、データが入力されることによってスタートコードが検出されたときには遅延回路22に対して「1」を供給し、データが入力されてもスタートコードが検出されないときには遅延回路22に対して「0」を供給する。さらに、スタートコード検出部21は、データが入力される毎に、位置検出部23に対して位置検出信号を供給する。
【0052】
なお、本実施の形態においては、スタートコード検出部21は、1バイトのデータが入力される毎に、遅延回路22に対してデータ入力信号を供給し、位置検出部23に対して位置検出信号を供給する。スタートコード検出部21の詳細な構成については後述する。
【0053】
遅延回路22は、データストリームの同期クロックで動作し、スタートコード検出信号をタイミングを、分離データのバイト数分遅延させて出力する。なお、遅延回路22の詳細な構成については後述する。
【0054】
位置検出部23は、スタートコード検出部21から位置検出信号が供給される毎に値を1ずつ増やすことによって、データ用バッファ3に対して記憶されたデータのデータ用バッファ3上の位置を示す。
【0055】
検出位置保持部24は、スタートコード検出信号が供給されたときの位置検出部23のデータを保持する。保持したデータは位置信号としてデータ解析部4に対して供給される。
【0056】
以下では、スタートコード検出部21の詳細な構成について説明する。
【0057】
スタートコード検出部21は、例えば、図4に示すように、AND回路41と、第1のデータ比較部42aと、第2のデータ比較部42bと、第3のデータ比較部42c(以下、総称するときには、第1〜第3のデータ比較部42a〜42cと称する。)とを備える。
【0058】
AND回路41は、第1〜第3のデータ比較部42a〜42cからの出力が全て「1」であったときに「1」を出力し、第1〜第3のデータ比較部42a〜42cからの出力の中に「0」があるときには、「0」を出力する。
【0059】
第1〜第3のデータ比較部42a〜42cは、入力されたデータをスタートコードを構成するデータと比較し、一致するか否かを判断する。
【0060】
第1のデータ比較部42aは、第1の入力データレジスタ51aと、第1のスタートコードレジスタ52aと、第1のXOR回路53aと、第1のパターンマスク54aと、第1のNAND回路55aとを備える。また、第2のデータ比較部42bは、第2の入力データレジスタ51bと、第2のスタートコードレジスタ52bと、第2のXOR回路53bと、第2のパターンマスク54bと、第2のNAND回路55bとを備える。さらに、第3のデータ比較部42cは、第3の入力データレジスタ51cと、第3のスタートコードレジスタ52cと、第3のXOR回路53cと、第3のパターンマスク54cと、第3のNAND回路55cとを備える。
【0061】
なお、以下では、第1の入力データレジスタ51a、第2の入力データレジスタ51b、第3の入力データレジスタ51cを総称するときには第1〜第3の入力データレジスタ51a〜51cと称する。また、第1のスタートコードレジスタ52a、第2のスタートコードレジスタ52b、第3のスタートコードレジスタ52cを総称するときには第1〜第3のスタートコードレジスタ52a〜52cと称する。さらに、第1のXOR回路53a、第2のXOR回路53b、第3のXOR回路53cを総称するときには第1〜第3のXOR回路53a〜53cと称する。さらにまた、第1のパターンマスク54a、第2のパターンマスク54b、第3のパターンマスク54cを総称するときには第1〜第3のパターンマスク54a〜54cと称する。さらにまた、第1のNAND回路55a、第2のNAND回路55b、第3のNAND回路55cを総称するときには第1〜第3のNAND回路55a〜55cと称する。
【0062】
第1〜第3の入力データレジスタ51a〜51cは、スタートコード検出部21に入力されたデータを1バイトずつ記憶する。スタートコード検出部2にデータが1バイト入力されると、当該データは第1の入力データレジスタ51aに対して記憶され、第1の入力データレジスタ51aに対して記憶されていたデータは第2の入力データレジスタ51bに対して記憶され、第2の入力データレジスタ51bに対して記憶されていたデータは第3の入力データレジスタ51Cに対して記憶される。
【0063】
第1〜第3のスタートコードレジスタ52a〜52cは、スタートコードを構成するデータを1バイトずつ記憶している。詳述すると、第1のスタートコードレジスタ52aはスタートコードを構成するデータのうち先頭から3バイト目のデータを記憶しており、第2のスタートコードレジスタ52bはスタートコードを構成するデータのうち先頭から2バイト目のデータを記憶しており、第3のスタートコードレジスタ52cはスタートコードを構成するデータのうち先頭のバイトのデータを記憶している。
【0064】
第1〜第3のXOR回路53a〜53cは、第1〜第3の入力データレジスタ51a〜51cに対して記憶されたデータと第1〜第3のスタートコードレジスタ52a〜52cに対して記憶されたデータとを比較して一致したときに「0」を出力する。詳述すると、第1のXOR回路53aは第1の入力データレジスタ51aに対して記憶されたデータと第1のスタートコードレジスタ52aに対して記憶されたデータとを比較し、第2のXOR回路53bは第2の入力データレジスタ51bに対して記憶されたデータと第2のスタートコードレジスタ52bに対して記憶されたデータとを比較し、第3のXOR回路53cは第3の入力データレジスタ51cに対して記憶されたデータと第3のスタートコードレジスタ52cに対して記憶されたデータとを比較する。
【0065】
第1〜第3のパターンマスク54a〜54cは、「1」を記憶している。
【0066】
第1〜第3のNAND回路55a〜55cは、第1〜第3のXOR回路53a〜53cから出力された信号と、第1〜第3のパターンマスク54a〜54cに対して記憶されている信号とを比較し、第1〜第3のXOR回路53a〜53cから「0」が出力されたときに「1」を出力する。
【0067】
以上説明したスタートコード検出部21の動作は、以下に説明する通りとなる。
【0068】
先ず、スタートコード検出部21に1バイトのデータが入力されると、入力されたデータが第1の入力データレジスタ51aに対して記憶される。また、第1の入力データレジスタ51aに対して記憶されていたデータは第2の入力データレジスタ51bに対して記憶され、第2の入力データレジスタ51bに対して記憶されていたデータは第3の入力データレジスタ51cに対して記憶される。
【0069】
次に、第1のXOR回路53aは、第1の入力データレジスタ51aに対して記憶されたデータと第1のスタートコードレジスタ52aに対して記憶されたデータとが一致したときには「0」を出力し、一致しないときには「1」を出力する。
【0070】
また、第2のXOR回路53bは、第2の入力データレジスタ51bに対して記憶されたデータと第2のスタートコードレジスタ52bに対して記憶されたデータとが一致したときには「0」を出力し、一致しないときには「1」を出力する。
【0071】
さらに、第3のXOR回路53cは、第3の入力データレジスタ51cに対して記憶されたデータと第3のスタートコードレジスタ52cに対して記憶されたデータとが一致したときには「0」を出力し、一致しないときには「1」を出力する。
【0072】
次に、第1のNAND回路55aは、第1のXOR回路53aが「0」を出力したときには「1」を出力し、第1のXOR回路53aが「1」を出力したときには「0」を出力する。
【0073】
また、第2のNAND回路55bは、第2のXOR回路53bが「0」を出力したときには「1」を出力し、第2のXOR回路53bが「1」を出力したときには「0」を出力する。
【0074】
さらに、第3のNAND回路55cは、第3のXOR回路53cが「0」を出力したときには「1」を出力し、第3のXOR回路53cが「1」を出力したときには「0」を出力する。
【0075】
そして、AND回路41が、第1〜第3のNAND回路55a〜55cの全てから「1」が出力されたときにのみ「1」を出力し、第1〜第3のNAND回路55a〜55cのうち1つ以上から「0」が出力されたときには「0」を出力する。AND回路41が出力した「1」及び「0」は、入力データ信号として遅延回路22へ供給される。
【0076】
以上説明したように、スタートコード検出部21は、データが1バイト入力される毎にスタートコードの検出を行い、入力データ信号を遅延回路22へ供給している。
【0077】
以下では、遅延回路22の構成について詳細に説明する。
【0078】
遅延回路22は、例えば図5に示すように、分離データのバイト数が異なるときに遅延量の調整を行うディレイセレクタ30と、入力データ信号を記憶するレジスタ31−1,31−2,31−3,・・・31−(n−1),31−n(nは自然数。)から構成されるシフトレジスタ32とを備える。遅延回路22は、データストリームの同期クロックで動作する。
【0079】
すなわち、遅延回路22は、スタートコード検出信号を分離データのバイト数分遅延させて出力する。遅延回路22は、レジスタ31−1に対して「1」が記憶されている状態でスタートコード検出部21からデータ入力信号が供給されたときに、検出位置保持部24へスタートコード検出信号を供給する。
【0080】
以上説明したPESパケット分離器1の動作は以下に説明する通りとなる。
【0081】
先ず、PESパケット分離器1に対して、PESパケットを構成するデータが順次入力される。供給されたデータは解析遅延部2へ供給され、且つデータ用バッファ3に対して記憶される。
【0082】
解析遅延部2に供給されたデータは、スタートコード検出部21に備えられた第1の入力データ用バッファ51aに対して1バイト毎に記憶される。また、スタートコード検出部21においては、第1の入力データ用バッファ51aに対して新しくデータが記憶されると、第1の入力データ用バッファ51aに対して記憶されていたデータが第2の入力データ用バッファ51bに対して記憶され、第2の入力データ用バッファ51bに対して記憶されていたデータが第3の入力データ用バッファ51cに対して記憶される。
【0083】
そして、スタートコード検出部21は、第1〜第3の入力データ用バッファ51a〜51cに対して記憶された3バイトのデータが、スタートコードと一致するか否かを検出する。スタートコード検出部21は、当該データがスタートコードと一致したとき、すなわちスタートコードを検出したときには「1」を出力し、一致しないときには「0」を出力する。スタートコード検出部21が出力した「1」及び「0」は、遅延回路22へ供給される。
【0084】
また、スタートコード検出部21は、データが1バイト供給される毎に、位置検出部23に対して位置検出信号を供給する。位置検出部23は、位置検出信号が供給される毎に数値を1だけ増加させる。
【0085】
次に、遅延回路22は、スタートコード検出部21から「1」が供給されたタイミングよりもmバイト分遅延させて、検出位置保持部24へスタートコード検出信号を供給する。
【0086】
スタートコード検出信号が供給されると、検出位置保持部24は、位置検出部23のデータを保持する。保持したデータは位置信号としてデータ解析部4に対して供給される。
【0087】
データ解析部4は、位置信号が供給されることによって、データ用バッファ3に対して記憶された分離データの解析を開始し、PESパケットのパケットデータがオーディオ符号化データであるかビデオ符号化データであるかを判断する。
【0088】
次に、DMA転送部5は、データ解析部4からの指示に従って、パケットデータがオーディオ符号化データであるPESパケットをオーディオデコードバッファ6へ供給し、パケットデータがビデオ符号化データであるPESパケットをビデオデコードバッファ7へ供給する。
【0089】
そして、オーディオデコードバッファ6は、供給されたオーディオ符号化データを、当該データがオーディオデコーダにより読み出されるまで一時的に記憶し、ビデオデコードバッファ7は、供給されたビデオ符号化データを、当該データがビデオデコーダにより読み出されるまで一時的に記憶する。
【0090】
以上説明したように、本発明を適用したPESパケット分離器1は、遅延回路22がスタートコード検出手段21から出力されたスタートコード検出信号を、上記分離データのビット数分遅延させている。そして、検出位置保持部24は、スタートコード検出信号が供給されたときに、位置検出部23のデータを保持し、データ解析部4に対して位置信号を供給する。データ解析部4は、位置信号が供給されたときに、分離データの解析を開始する。
【0091】
すなわち、本発明を適用したPESパケット分離器1によれば、データ解析部4がデータ用バッファ3に対してアクセスすることなく、分離データ全てがデータ用バッファ3に対して記憶されたタイミングを検出することが可能となる。
【0092】
したがって、本発明を適用したPESパケット分離器1においては、データ解析部4に備えられたCPU10に負担をかけることなく、効率良く分離データの解析を行うことが可能となる。例えば分離データが断続的にスタートコード検出部2に対して入力されたときにも、データ解析部4に備えられたCPU10に負担をかけることなく分離データの解析を行うことが可能となる。
【0093】
なお、本実施の形態では、本発明をPESパケット分離器に適用したときを例に挙げて説明したが、本発明の適用は、PESパケット分離器に限定されない。例えば、本発明は、TS(Transport Stream)パケットのパケットデータを分離するための分離器に適用しても良い。また、本発明は、オーディオデコーダやビデオデコーダに適用しても良い。
【0094】
【発明の効果】
本発明に係るデータ解析システムは、検出手段がスタートコードを検出したタイミングに基づいて、タイミング生成手段が所定のビット数のヘッダデータが記憶手段に対して全て記憶されたタイミングを生成する。そして、解析手段は、タイミング生成手段が所定のビット数のデータが記憶手段に対して全て記憶されたタイミングを検出した後に、当該ヘッダデータの解析を開始する。
【0095】
すなわち、本発明に係るデータ解析システムにおいては、解析手段が記憶手段に対してアクセスすることなく、スタートコードに続く所定のビット数のデータが記憶手段に対して記憶されたタイミングを検出することが可能となる。
【0096】
したがって、本発明に係るデータ解析システムによれば、解析手段に負担をかけることなく、スタートコードに続く所定の数のヘッダデータの解析を効率良く行うことが可能となる。
【0097】
また、本発明に係るデータ解析方法では、スタートコードを検出したタイミングに基づいて、スタートコードに続く所定のビット数のヘッダデータが記憶手段に対して全て記憶されたタイミングを生成した後に、当該ヘッダデータの解析を開始する。
【0098】
したがって、本発明に係るデータ解析方法によれば、スタートコードに続く所定の数のヘッダデータの解析を効率良く行うことが可能となる。
【図面の簡単な説明】
【図1】PESパケットのフォーマットを示すブロック図である。
【図2】本発明を適用したPESパケットの分離器を示す模式図である。
【図3】同分離器における解析遅延部を示す模式図である。
【図4】同分離器におけるスタートコード検出部を示す模式図である。
【図5】同分離器における遅延部を示す模式図である。
【図6】MPEG2−PSシステムのデジタル多重システムを示し模式図である。
【図7】従来のPESパケットの分離器を示す模式図である。
【図8】同分離器の動作を示すフローチャートである。
【図9】パケットヘッダが断続的に分離器へ入力する状態を示す模式図である。
【符号の説明】
2 解析遅延部、3 データ用バッファ、4 データ検出部、21 スタートコード検出装置、22 遅延回路、23 位置検出部、24 検出位置保持部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data analysis method used when multiplexing video coded data and audio coded data and separating the multiplexed data in, for example, an MPEG (Moving Picture Expert Group) system. The present invention relates to a system and a data analysis method.
[0002]
[Prior art]
2. Description of the Related Art In recent years, digital transmission systems using digital broadcasting media and digital communication media as transmission media generally adopt a digital multiplexing method using an MPEG system, which is one of compression and multiplexing standards for audio information and image information. ing.
[0003]
MPEG is defined as ISO / IEC JTC1 / SC29 (International Organization / International Electrotechnical Commission, Joint Technical Committee / Sub Committee / 29). This is an abbreviation of a moving picture expert group for coding. For example, ISO11172 is standardized as the MPEG1 standard, and ISO13818 is standardized as the MPEG2 standard. In the following, the international standard for moving picture coding defined by MPEG is referred to as MPEG.
[0004]
Hereinafter, a digital multiplex transmission system based on MPEG2-PS (Program Stream) will be described. As shown in FIG. 6, the digital multiplex transmission system 100 based on MPEG2-PS includes a transmission system 101, a reception system 102, and a transmission path 103.
[0005]
The transmission system 101 includes an audio encoder 111, a video encoder 112, an audio encode buffer 113, a video encode buffer 114, and a multiplexer 115.
[0006]
The audio encoder 111 receives, for example, a digital audio signal collected by a microphone, an audio signal reproduced from a recording medium, and the like. The audio encoder 111 compresses and encodes the input digital audio signal based on the MPEG2-PS standard to generate encoded audio data. The generated audio encoded data is stored in the audio encode buffer 113.
[0007]
For example, a digital video signal captured by a camera or a digital video signal reproduced from a recording medium is input to the video encoder 112. The video encoder 112 compression-encodes the input digital video signal based on the MPEG2 standard to generate encoded video data. The generated encoded video data is stored in the video encoding buffer 114.
[0008]
The audio encode buffer 113 temporarily stores the supplied encoded audio data until the audio encoded data is read out by the multiplexer 115.
[0009]
The video encoding buffer 114 temporarily stores the supplied encoded video data until it is read by the multiplexer 115.
[0010]
The multiplexer 115 multiplexes the audio encoded data stored in the audio encode buffer 113 and the video encoded data stored in the video encode buffer 114, and generates a PES (Program Elementary Stream) packet defined by the MPEG2-PS standard. Generate
[0011]
As shown in FIG. 1, the PES packet has a configuration in which a header is added to the head of packet data such as audio encoded data and video encoded data. The header includes a 3-byte start code indicating the start of the PES packet, a 1-byte stream ID indicating the contents of the packet data, a 2-byte PES packet length indicating the length of data following this area, a 2-byte flag, It contains the PES header data length in bytes and the PES header data. The PES header data and the packet data are variable in the number of bytes.
[0012]
Then, the multiplexer 115 generates a pack by adding a pack header to the beginning of one or more PES packets, and generates a program stream (hereinafter, referred to as PS) by connecting the packs.
[0013]
When generating a PES packet, the multiplexer 115 outputs, for each reproduction unit called an access unit, DTS (Decoding Time Stamp) which is time information indicating a decoding time and PTS which is time information indicating a reproduction output time. A time stamp called (Presentation TimeStamp) is added. DTS and PTS are included in PES header data.
[0014]
The multiplexer 115 also adds an SCR (System Clock Reference) when generating a pack. The SCR is information for setting an STC (System Time Clock), which is a reference synchronization clock used at the time of decoding, to an intended value in the receiving system 102. The SCR is included in the pack header.
[0015]
On the other hand, the receiving system 102 includes a separator 121, an audio decode buffer 122, a video decode buffer 123, an audio decoder 124, and a video decoder 125.
[0016]
The separator 121 determines, based on the stream ID described in the supplied PES packet, whether the packet data included in the PES packet is video encoded data, audio encoded data, or the like. When the packet data included in the PES packet is video encoded data, the separator 121 stores the data in the video decode buffer, and when the packet data is audio encoded data, stores the data in the audio decode buffer.
[0017]
The audio decode buffer 122 temporarily stores the supplied encoded audio data until the data is read by the audio decoder 124.
[0018]
The video decode buffer 123 temporarily stores the supplied encoded video data until the data is read by the video decoder 125.
[0019]
The audio decoder 124 reads out the encoded audio data stored in the audio decode buffer 122 for each access unit, decodes the data according to the MPEG2-PS standard, and generates an audio signal. The audio decoder 124 decodes and outputs the encoded audio data at the timing when the STC and the PTS match.
[0020]
The video decoder 125 reads out the encoded video data stored in the video decode buffer 122 for each access unit, decodes the data according to the MPEG2-PS standard, and generates a video signal. The video decoder 125 decodes the encoded video data at the timing when the STC matches the DTS, and outputs the decoded video signal at the timing when the STC matches the PTS.
[0021]
In the digital multiplex transmission system described above, each data stream such as PES packets, audio encoded data, and video encoded data is analyzed. Each data stream is composed of a packet, and has a configuration in which a packet header is added to the head of the packet. The start of the packet header is a start code, and the position following the start code includes data on the length of the stream, the analysis method, and the like. When analyzing the data stream, after detecting a start code, the packet header data is analyzed to read the analysis method and length of the packet data, and to process the packet data according to the read result.
[0022]
Hereinafter, a method in which the separator 121 analyzes the packet header of the PES packet and supplies the packet data to the audio decode buffer 122 or the video decode buffer 123 will be described in detail.
[0023]
As shown in FIG. 7, the separator 121 includes a data buffer 130, a start code detection unit 131, and a data analysis unit 132.
[0024]
First, the data stream is stored in the data buffer 130. Next, the start code detecting unit 131 searches the data buffer 130 for data stored therein.
[0025]
Next, when the start code is detected, the start code detection unit 131 notifies the data analysis unit 132 that the start code has been detected.
[0026]
Next, the data analysis unit 132 accesses the data buffer 130 and confirms that all data of the packet header has been stored in the data buffer 130.
[0027]
The data analysis unit 132 analyzes the packet header to determine the type of the packet data, and when the packet data is video encoded data, supplies the packet data to the video decode buffer 123 and outputs the audio encoded data. If so, the packet data is supplied to the audio decode buffer 124.
[0028]
[Problems to be solved by the invention]
The data analysis unit 132 starts analyzing the data of the packet header after all the data of the packet header is stored in the data buffer 130. The process until the data analysis unit 132 starts analyzing the data of the packet header is as shown in FIG. 8 below.
[0029]
First, in step S1, the start code detector 131 detects a start code from the input data and notifies the data analyzer 132 of the start code.
[0030]
Next, in step S2, the data analysis unit 132 accesses the data buffer 130 and determines whether or not all data of the packet header is stored in the data buffer 130. If all the data of the packet header is stored in the data buffer 130, the process proceeds to step S3, and if not, the operation of step S2 is performed again.
[0031]
Then, in step S3, the data analysis unit 132 starts analyzing the data of the packet header.
[0032]
That is, the data analysis unit 132 needs to repeatedly access the data buffer 130 after the start code is detected until all the packet headers are stored.
[0033]
However, in the receiving system 103, as shown in FIG. 9, there is a case where the packet header is intermittently supplied to the separator 121. When the packet header is intermittently supplied to the separator 121, it takes a long time until all the packet headers are stored in the data buffer 130.
[0034]
Therefore, the number of times that the data analysis unit 132 accesses the data buffer 130 increases. When the number of times that the data analysis unit 132 accesses the data buffer 130 is large, the load on the data analysis unit 132 increases. Further, the time required for the data analysis unit 132 to analyze the packet header also increases.
[0035]
The present invention has been proposed in view of the conventional situation described above, and header data of a predetermined number of bits following a start code is stored in the storage unit without the analysis unit accessing the storage unit a plurality of times. An object of the present invention is to provide a data analysis system and a data analysis method capable of efficiently performing processing on a data stream by determining that the data stream has been stored.
[0036]
[Means for Solving the Problems]
In the data analysis system according to the present invention, a data stream composed of a plurality of packets is sequentially input, and in the data analysis system for analyzing the data stream, a start code indicating the head of the packet is detected from the input data stream. A packet data storage unit for sequentially storing the data stream; and a header data of a predetermined number of bits following the start code is stored in the packet data storage unit based on a timing at which the detection unit detects a start code. Timing generation means for generating the timings stored for the packet data storage means, and analysis means for analyzing a predetermined number of bits of header data following the start code among the data stored in the packet data storage means. Wherein the analysis means is Based on the timing of the timing generating means is generated, characterized in that starting the analysis of the header data of the predetermined number of bits subsequent to the start code.
[0037]
In the data analysis system according to the present invention, based on the timing at which the detection unit outputs the start code detection signal, the timing generation unit stores all the header data of a predetermined number of bits following the start code in the packet data storage unit. Detected timing. Then, the analysis means starts analyzing header data of a predetermined number of bits following the start code based on the timing at which the timing generation means outputs the start code detection signal.
[0038]
Further, in the data analysis method according to the present invention, in the data analysis method for sequentially inputting a data stream composed of a plurality of packets, and analyzing the data stream, a start code indicating a head of the packet from the input data stream Detection step, a storage step of sequentially storing the data stream in storage means, and header data of a predetermined number of bits following the start code based on a timing at which a start code is detected in the detection step. Generating a timing stored in the packet data storage means, and analyzing a predetermined number of bits of header data following the start code in the data stored in the storage means. Analyzing step, In analysis step, based on the timing of the start code detection signal is output at the timing generating step, characterized in that starting the analysis of the header data of the predetermined number of bits subsequent to the start code.
[0039]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Hereinafter, an example will be described in which the present invention is applied to a PES (Sequence Elementary Stream) packet separator that separates data included in a packet.
[0040]
As shown in FIG. 1, the PES packet has a configuration in which a header is added to the head of packet data such as audio encoded data and video encoded data. The header includes a 3-byte start code indicating the start of the PES packet, a 1-byte stream ID indicating the contents of the packet data, a 2-byte PES packet length indicating the length of data following this area, a 2-byte flag, It contains the PES header data length in bytes and the PES header data. The PES header data and the packet data are variable in the number of bytes.
[0041]
In the present embodiment, a stream ID, a PES packet length, a flag, a PES header data length, a PTS, and a DTS in a PES packet are referred to as separated data. By analyzing the separated data, it becomes possible to know the type and time stamp of the packet data, and it is possible to separate the PES packets. Further, as shown in FIG. 1, the separation data has a fixed length.
[0042]
As shown in FIG. 2, the PES packet separator 1 includes an analysis delay unit 2, a data buffer 3, a data analysis unit 4, and a DMA transfer unit 5. The PES packet separator 1 is connected to an audio decode buffer 6 and a video decode buffer 7. The PES packet separator 1 separates a PES packet of a data stream input from the outside into one in which packet data is audio encoded data and one in which packet data is video encoded data.
[0043]
The analysis delay unit 2 supplies a position signal to the data analysis unit 4 when all the separated data is stored in the data buffer 3, and causes the data analysis unit 4 to start analyzing the separated data. The details of the analysis delay unit 2 will be described later.
[0044]
The data buffer 3 stores data input to the PES packet separator 1.
[0045]
The data analysis unit 4 analyzes the separated data stored in the data buffer 3 based on the position signal supplied from the analysis delay unit 2, and reads the type, position, and decoding method of the packet data. The data analysis unit 4 includes a CPU (Central Processing Unit) 10 and a program storage unit 11 in which a program for analyzing data is stored. When the position signal is supplied from the analysis delay unit 2, the data analysis unit 4 starts the program and starts analyzing the separated data.
[0046]
The DMA transfer unit 5 supplies the packet data to the audio decode buffer 6 when the packet data is audio encoded data, and supplies the packet data to the audio decode buffer 6 when the packet data is video encoded data in accordance with an instruction from the data analysis unit 4. Is supplied to the video decode buffer 7.
[0047]
The audio decode buffer 6 temporarily stores the supplied encoded audio data until the supplied encoded audio data is read by an audio decoder (not shown).
[0048]
The video decode buffer 7 temporarily stores the supplied encoded video data until the supplied encoded video data is read by a video decoder (not shown).
[0049]
Hereinafter, the analysis delay unit 2 will be described in detail.
[0050]
As shown in FIG. 3, the analysis delay unit 2 includes a start code detection unit 21, a delay circuit 22, a position detection unit 23, and a detection position holding unit 24.
[0051]
The start code detection unit 21 detects a start code of a PES packet forming a data stream. Further, each time data is supplied, “1” or “0” is supplied to the delay circuit 22 as a data input signal. More specifically, the start code detection unit 21 supplies “1” to the delay circuit 22 when a start code is detected by inputting data, and when a start code is not detected even when data is input. “0” is supplied to the delay circuit 22. Further, the start code detector 21 supplies a position detection signal to the position detector 23 every time data is input.
[0052]
In the present embodiment, the start code detection unit 21 supplies a data input signal to the delay circuit 22 every time 1-byte data is input, and a position detection signal to the position detection unit 23. Supply. The detailed configuration of the start code detection unit 21 will be described later.
[0053]
The delay circuit 22 operates with the synchronous clock of the data stream, and outputs the start code detection signal with the timing delayed by the number of bytes of the separated data. The detailed configuration of the delay circuit 22 will be described later.
[0054]
The position detector 23 indicates the position of the data stored in the data buffer 3 on the data buffer 3 by incrementing the value by one each time the position detection signal is supplied from the start code detector 21. .
[0055]
The detection position holding unit 24 holds the data of the position detection unit 23 when the start code detection signal is supplied. The held data is supplied to the data analyzer 4 as a position signal.
[0056]
Hereinafter, a detailed configuration of the start code detection unit 21 will be described.
[0057]
For example, as shown in FIG. 4, the start code detection unit 21 includes an AND circuit 41, a first data comparison unit 42a, a second data comparison unit 42b, and a third data comparison unit 42c (hereinafter, collectively referred to as “general name”). The first to third data comparison units 42a to 42c).
[0058]
The AND circuit 41 outputs “1” when all the outputs from the first to third data comparison units 42 a to 42 c are “1”, and outputs the “1” from the first to third data comparison units 42 a to 42 c. When "0" is present in the output of "1", "0" is output.
[0059]
The first to third data comparison units 42a to 42c compare the input data with the data constituting the start code and determine whether or not they match.
[0060]
The first data comparison unit 42a includes a first input data register 51a, a first start code register 52a, a first XOR circuit 53a, a first pattern mask 54a, and a first NAND circuit 55a. Is provided. The second data comparison unit 42b includes a second input data register 51b, a second start code register 52b, a second XOR circuit 53b, a second pattern mask 54b, and a second NAND circuit 55b. Further, the third data comparison unit 42c includes a third input data register 51c, a third start code register 52c, a third XOR circuit 53c, a third pattern mask 54c, and a third NAND circuit 55c.
[0061]
Hereinafter, the first input data register 51a, the second input data register 51b, and the third input data register 51c are collectively referred to as first to third input data registers 51a to 51c. Further, the first start code register 52a, the second start code register 52b, and the third start code register 52c are collectively referred to as first to third start code registers 52a to 52c. Further, the first XOR circuit 53a, the second XOR circuit 53b, and the third XOR circuit 53c are collectively referred to as first to third XOR circuits 53a to 53c. Furthermore, the first pattern mask 54a, the second pattern mask 54b, and the third pattern mask 54c are collectively referred to as first to third pattern masks 54a to 54c. Furthermore, the first NAND circuit 55a, the second NAND circuit 55b, and the third NAND circuit 55c are collectively referred to as first to third NAND circuits 55a to 55c.
[0062]
The first to third input data registers 51a to 51c store the data input to the start code detection unit 21 byte by byte. When one byte of data is input to the start code detection unit 2, the data is stored in the first input data register 51a, and the data stored in the first input data register 51a is stored in the second input data register 51a. The data stored in the input data register 51b and the data stored in the second input data register 51b are stored in the third input data register 51C.
[0063]
The first to third start code registers 52a to 52c store data constituting a start code one byte at a time. More specifically, the first start code register 52a stores the data of the third byte from the top of the data constituting the start code, and the second start code register 52b stores the first byte of the data constituting the start code. The third start code register 52c stores the data of the first byte of the data constituting the start code.
[0064]
The first to third XOR circuits 53a to 53c store the data stored in the first to third input data registers 51a to 51c and the first to third start code registers 52a to 52c. And outputs "0" when they match. More specifically, the first XOR circuit 53a compares the data stored in the first input data register 51a with the data stored in the first start code register 52a, 53b compares the data stored in the second input data register 51b with the data stored in the second start code register 52b, and the third XOR circuit 53c compares the data stored in the third input data register 51c. Is compared with the data stored in the third start code register 52c.
[0065]
The first to third pattern masks 54a to 54c store "1".
[0066]
The first to third NAND circuits 55a to 55c are used to output the signals output from the first to third XOR circuits 53a to 53c and the signals stored for the first to third pattern masks 54a to 54c. And outputs “1” when “0” is output from the first to third XOR circuits 53a to 53c.
[0067]
The operation of the start code detecting unit 21 described above is as described below.
[0068]
First, when 1-byte data is input to the start code detection unit 21, the input data is stored in the first input data register 51a. The data stored in the first input data register 51a is stored in the second input data register 51b, and the data stored in the second input data register 51b is stored in the third input data register 51b. The data is stored in the input data register 51c.
[0069]
Next, the first XOR circuit 53a outputs “0” when the data stored in the first input data register 51a matches the data stored in the first start code register 52a. If they do not match, "1" is output.
[0070]
Further, the second XOR circuit 53b outputs “0” when the data stored in the second input data register 51b matches the data stored in the second start code register 52b. If they do not match, "1" is output.
[0071]
Further, the third XOR circuit 53c outputs “0” when the data stored in the third input data register 51c matches the data stored in the third start code register 52c. If they do not match, "1" is output.
[0072]
Next, the first NAND circuit 55a outputs “1” when the first XOR circuit 53a outputs “0”, and outputs “0” when the first XOR circuit 53a outputs “1”. Output.
[0073]
The second NAND circuit 55b outputs “1” when the second XOR circuit 53b outputs “0”, and outputs “0” when the second XOR circuit 53b outputs “1”. I do.
[0074]
Further, the third NAND circuit 55c outputs “1” when the third XOR circuit 53c outputs “0”, and outputs “0” when the third XOR circuit 53c outputs “1”. I do.
[0075]
Then, the AND circuit 41 outputs “1” only when “1” is output from all of the first to third NAND circuits 55a to 55c, and the AND circuit 41 outputs the “1” to the first to third NAND circuits 55a to 55c. When "0" is output from one or more of them, "0" is output. “1” and “0” output from the AND circuit 41 are supplied to the delay circuit 22 as input data signals.
[0076]
As described above, the start code detection unit 21 detects a start code every time one byte of data is input, and supplies an input data signal to the delay circuit 22.
[0077]
Hereinafter, the configuration of the delay circuit 22 will be described in detail.
[0078]
As shown in FIG. 5, for example, as shown in FIG. 5, the delay circuit 22 adjusts the delay amount when the number of bytes of the separated data is different, and registers 31-1, 31-2, 31- for storing the input data signal. 3,... 31- (n-1) and 31-n (n is a natural number). The delay circuit 22 operates with a synchronous clock of the data stream.
[0079]
That is, the delay circuit 22 delays the start code detection signal by the number of bytes of the separated data and outputs the result. The delay circuit 22 supplies a start code detection signal to the detection position holding unit 24 when a data input signal is supplied from the start code detection unit 21 in a state where “1” is stored in the register 31-1. I do.
[0080]
The operation of the PES packet separator 1 described above is as described below.
[0081]
First, data constituting a PES packet is sequentially input to the PES packet separator 1. The supplied data is supplied to the analysis delay unit 2 and stored in the data buffer 3.
[0082]
The data supplied to the analysis delay unit 2 is stored in the first input data buffer 51a provided in the start code detection unit 21 for each byte. In the start code detecting unit 21, when new data is stored in the first input data buffer 51a, the data stored in the first input data buffer 51a is replaced with the second input data buffer 51a. The data stored in the data buffer 51b and stored in the second input data buffer 51b is stored in the third input data buffer 51c.
[0083]
Then, the start code detection unit 21 detects whether the 3-byte data stored in the first to third input data buffers 51a to 51c matches the start code. The start code detector 21 outputs “1” when the data matches the start code, that is, when the start code is detected, and outputs “0” when the data does not match. “1” and “0” output from the start code detection unit 21 are supplied to the delay circuit 22.
[0084]
In addition, the start code detection unit 21 supplies a position detection signal to the position detection unit 23 every time one byte of data is supplied. The position detection unit 23 increases the numerical value by 1 each time the position detection signal is supplied.
[0085]
Next, the delay circuit 22 supplies a start code detection signal to the detection position holding unit 24 with a delay of m bytes from the timing at which “1” is supplied from the start code detection unit 21.
[0086]
When the start code detection signal is supplied, the detection position holding unit 24 holds the data of the position detection unit 23. The held data is supplied to the data analyzer 4 as a position signal.
[0087]
When the position signal is supplied, the data analyzer 4 starts analyzing the separated data stored in the data buffer 3 and determines whether the packet data of the PES packet is audio encoded data or video encoded data. Is determined.
[0088]
Next, the DMA transfer unit 5 supplies a PES packet whose packet data is audio encoded data to the audio decode buffer 6 in accordance with an instruction from the data analysis unit 4 and converts the PES packet whose packet data is video encoded data. It is supplied to the video decode buffer 7.
[0089]
Then, the audio decode buffer 6 temporarily stores the supplied audio encoded data until the data is read out by the audio decoder, and the video decode buffer 7 stores the supplied video encoded data in the data. The data is temporarily stored until read by the video decoder.
[0090]
As described above, in the PES packet separator 1 to which the present invention is applied, the delay circuit 22 delays the start code detection signal output from the start code detection means 21 by the number of bits of the separated data. Then, when the start code detection signal is supplied, the detection position holding unit 24 holds the data of the position detection unit 23 and supplies the position signal to the data analysis unit 4. The data analyzer 4 starts analyzing the separated data when the position signal is supplied.
[0091]
That is, according to the PES packet separator 1 to which the present invention is applied, the data analyzer 4 detects the timing at which all the separated data is stored in the data buffer 3 without accessing the data buffer 3. It is possible to do.
[0092]
Therefore, in the PES packet separator 1 to which the present invention is applied, it is possible to efficiently analyze the separated data without imposing a load on the CPU 10 provided in the data analyzer 4. For example, even when the separated data is intermittently input to the start code detection unit 2, the analysis of the separated data can be performed without burdening the CPU 10 provided in the data analysis unit 4.
[0093]
In the present embodiment, the case where the present invention is applied to a PES packet separator is described as an example, but the application of the present invention is not limited to the PES packet separator. For example, the present invention may be applied to a separator for separating packet data of a TS (Transport Stream) packet. Further, the present invention may be applied to an audio decoder or a video decoder.
[0094]
【The invention's effect】
In the data analysis system according to the present invention, based on the timing at which the detecting means detects the start code, the timing generating means generates the timing at which all the header data of a predetermined number of bits are stored in the storage means. Then, the analysis unit starts analyzing the header data after the timing generation unit detects the timing at which all data of a predetermined number of bits are stored in the storage unit.
[0095]
That is, in the data analysis system according to the present invention, it is possible for the analysis unit to detect the timing at which the data of a predetermined number of bits following the start code is stored in the storage unit without accessing the storage unit. It becomes possible.
[0096]
Therefore, according to the data analysis system of the present invention, it is possible to efficiently analyze a predetermined number of header data following the start code without putting a load on the analysis means.
[0097]
Further, in the data analysis method according to the present invention, based on the timing at which the start code is detected, after generating the timing at which all header data of a predetermined number of bits following the start code are stored in the storage means, Start analyzing the data.
[0098]
Therefore, according to the data analysis method of the present invention, it is possible to efficiently analyze a predetermined number of header data following the start code.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a format of a PES packet.
FIG. 2 is a schematic diagram showing a PES packet separator to which the present invention is applied.
FIG. 3 is a schematic diagram showing an analysis delay unit in the separator.
FIG. 4 is a schematic diagram showing a start code detection unit in the separator.
FIG. 5 is a schematic diagram showing a delay unit in the separator.
FIG. 6 is a schematic diagram showing a digital multiplex system of the MPEG2-PS system.
FIG. 7 is a schematic diagram showing a conventional PES packet separator.
FIG. 8 is a flowchart showing the operation of the separator.
FIG. 9 is a schematic diagram showing a state where a packet header is intermittently input to a separator.
[Explanation of symbols]
2 Analysis delay unit, 3 data buffer, 4 data detection unit, 21 start code detection device, 22 delay circuit, 23 position detection unit, 24 detection position holding unit

Claims (4)

複数のパケットから構成されるデータストリームが順次入力され、当該データストリームを解析するデータ解析システムにおいて、
入力されたデータストリームから上記パケットの先頭を示すスタートコードを検出する検出手段と、
上記データストリームを順次記憶するパケットデータ記憶手段と、
上記検出手段がスタートコードを検出したタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータが上記パケットデータ記憶手段に対して全て記憶されたタイミングを生成するタイミング生成手段と、
上記パケットデータ記憶手段に対して記憶されているデータのうち、上記スタートコードに続く所定のビット数のヘッダデータを解析する解析手段とを備え、
上記解析手段は、上記タイミング生成手段が生成したタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータの解析を開始すること
を特徴とするデータ解析システム。
In a data analysis system that sequentially receives a data stream composed of a plurality of packets and analyzes the data stream,
Detecting means for detecting a start code indicating the beginning of the packet from the input data stream;
Packet data storage means for sequentially storing the data stream;
Timing generation means for generating a timing at which header data of a predetermined number of bits following the start code are all stored in the packet data storage means, based on the timing at which the detection means detects the start code,
Analyzing means for analyzing header data of a predetermined number of bits following the start code among data stored in the packet data storage means,
The data analysis system according to claim 1, wherein the analysis unit starts analyzing header data of a predetermined number of bits following the start code based on the timing generated by the timing generation unit.
上記検出手段は、スタートコードを検出したタイミングを示すスタートコード検出信号を上記タイミング生成手段に対して供給し、
上記タイミング生成手段は、上記データストリームの同期クロックで動作する遅延回路からなり、上記スタートコード検出信号を上記所定のビット数分遅延させて出力し、
上記解析手段は、上記タイミング生成手段から上記スタートコード検出信号が出力されたタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータの解析を開始すること
を特徴とする請求項1記載のデータ解析システム。
The detection means supplies a start code detection signal indicating a timing at which a start code is detected to the timing generation means,
The timing generation means includes a delay circuit that operates with a synchronous clock of the data stream, and outputs the start code detection signal with a delay of the predetermined number of bits.
2. The analysis unit according to claim 1, wherein the analysis unit starts analyzing header data of a predetermined number of bits following the start code, based on a timing at which the start code detection signal is output from the timing generation unit. Data analysis system.
上記スタートコードに続く所定のビット数のヘッダデータを解析するためのプログラムが記録されたプログラム記録手段を備え、
上記解析手段は、上記遅延手段が上記スタートコード検出信号を出力したタイミングで上記プログラムを起動させ、上記所定のビット数のヘッダデータの解析を開始すること
を特徴とする請求項1記載のデータ解析システム。
A program recording means in which a program for analyzing header data of a predetermined number of bits following the start code is recorded,
2. The data analysis method according to claim 1, wherein said analysis means starts said program at a timing when said delay means outputs said start code detection signal, and starts analysis of said predetermined number of bits of header data. system.
複数のパケットから構成されるデータストリームが順次入力され、当該データストリームを解析するデータ解析方法において、
入力されたデータストリームから上記パケットの先頭を示すスタートコードを検出する検出ステップと、
上記データストリームを記憶手段に対して順次記憶する記憶ステップと、
上記検出ステップにおいてスタートコードが検出されたタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータが上記パケットデータ記憶手段に対して全て記憶されたタイミングを生成するタイミング生成ステップと、
上記記憶手段に対して記憶されているデータのうち、上記スタートコードに続く所定のビット数のヘッダデータを解析する解析ステップとを備え、
上記解析ステップにおいては、上記タイミング生成ステップにおいてスタートコード検出信号が出力されたタイミングに基づいて、上記スタートコードに続く所定のビット数のヘッダデータの解析を開始すること
を特徴とするデータ解析方法。
In a data analysis method for sequentially inputting a data stream composed of a plurality of packets and analyzing the data stream,
A detecting step of detecting a start code indicating the head of the packet from the input data stream;
A storage step of sequentially storing the data stream in storage means;
A timing generation step of generating a timing at which header data of a predetermined number of bits following the start code are all stored in the packet data storage means, based on the timing at which the start code is detected in the detection step;
An analyzing step of analyzing header data of a predetermined number of bits following the start code among data stored in the storage means,
In the analyzing step, a data analyzing method is started, based on a timing at which a start code detection signal is output in the timing generating step, to analyze header data of a predetermined number of bits following the start code.
JP2002284174A 2002-09-27 2002-09-27 System and method for data analysis Withdrawn JP2004120632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002284174A JP2004120632A (en) 2002-09-27 2002-09-27 System and method for data analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002284174A JP2004120632A (en) 2002-09-27 2002-09-27 System and method for data analysis

Publications (1)

Publication Number Publication Date
JP2004120632A true JP2004120632A (en) 2004-04-15

Family

ID=32277822

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002284174A Withdrawn JP2004120632A (en) 2002-09-27 2002-09-27 System and method for data analysis

Country Status (1)

Country Link
JP (1) JP2004120632A (en)

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
US6236432B1 (en) MPEG II system with PES decoder
JP3692164B2 (en) MPEG decoder
US20030103766A1 (en) After-recording apparatus
EP0933949B1 (en) Transmitting system, transmitting apparatus, recording and reproducing apparatus
US8359413B2 (en) Data stream buffer control using reference time and decoding time
CN100416689C (en) Reproducing apparatus and method, and recording medium
JP3990813B2 (en) Encoding apparatus, encoding method, digital transmission apparatus, and digital transmission system
JP4288549B2 (en) Recording apparatus and method, and reproducing apparatus and method
JP2005151463A (en) Device and method for receiving stream data
US6556626B1 (en) MPEG decoder, MPEG system decoder and MPEG video decoder
JP2004120632A (en) System and method for data analysis
JP4254007B2 (en) Playback apparatus and method, and recording medium
JP4175038B2 (en) MPEG2 decoder
JPH1173729A (en) Recording and reproducing device
JP2008176918A (en) Reproducing apparatus and method, and recording medium
JP2001111610A (en) Receiver for information data transmission system
US7248780B2 (en) Reproducing device, medium, information aggregate, transmitting medium, and recording medium
JP2823806B2 (en) Image decoding device
JP2000049726A (en) Multiplexing device and method therefor
US7058279B2 (en) Special reproduction data generating device, medium and information aggregate
JP2000187940A (en) Recording/reproducing device and recorder
JP4284574B2 (en) Recording apparatus and method, and recording medium
JP3531324B2 (en) Encoding / multiplexing apparatus, multiplexing preprocessing apparatus, and encoding / multiplexing method
JP2002281498A (en) Reception reproducing device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060110