JP2000307643A - Device and method for analyzing data - Google Patents

Device and method for analyzing data

Info

Publication number
JP2000307643A
JP2000307643A JP11014499A JP11014499A JP2000307643A JP 2000307643 A JP2000307643 A JP 2000307643A JP 11014499 A JP11014499 A JP 11014499A JP 11014499 A JP11014499 A JP 11014499A JP 2000307643 A JP2000307643 A JP 2000307643A
Authority
JP
Japan
Prior art keywords
data
packet
memory
stored
pattern
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
Application number
JP11014499A
Other languages
Japanese (ja)
Inventor
Shojiro Shibata
正二郎 柴田
Kanta Yasuda
幹太 安田
Takuya Kitamura
卓也 北村
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 JP11014499A priority Critical patent/JP2000307643A/en
Publication of JP2000307643A publication Critical patent/JP2000307643A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)
  • Time-Division Multiplex Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To execute packet analysis in real time by simple constitution by writing positional information of matching data in a packet when data of the packet stored in a second storing means match the bit pattern of a prescribed parameter. SOLUTION: This device is provided with a pattern collating means which collates data of a packet stored in a second storing means with the bit pattern of a prescribed parameter and which writes the positional information of matching data when they match. In this device, the searching part 60 of a data analyzing part 20 searches the pay load of a TS block stored in a TS[] memory 32 by using a previously stored search pattern in accordance with a search command by an operation program to execute pattern matching. Then, in the case of detecting a bit string being matched with the search pattern, the end address of the bit string is written in the local header of the TS block.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はデータ解析装置及び
データ解析方法に関し、例えばパケット化されたデータ
を解析して当該パケットに記入されたデータを得るデー
タ解析装置に適用して好適なものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data analysis device and a data analysis method, and is suitable for application to, for example, a data analysis device for analyzing packetized data to obtain data written in the packet. .

【0002】[0002]

【従来の技術】従来、映像やそれに伴う音声の情報量を
減らす方法として、MPEG(MovingPicture Experts
Group)2方式が用いられている。かかるMPEG2方
式では、映像データを圧縮符号化してなるエレメンタリ
ーストリーム(Elementary Stream )をパケット化して
PESパケットを生成する。PESパケットの先頭に
は、符号化処理における各種の情報を記入したPESヘ
ッダが付加される。
2. Description of the Related Art Conventionally, MPEG (Moving Picture Experts) has been used as a method for reducing the amount of information of video and accompanying audio.
Group) 2 system is used. In the MPEG2 system, a PES packet is generated by packetizing an elementary stream obtained by compressing and encoding video data. At the head of the PES packet, a PES header in which various kinds of information in the encoding process are written is added.

【0003】このPESパケットはペイロードとして1
84[byte]毎に分割され、さらにその先頭に4[byte]の
TSヘッダを付加することにより、全体として188[b
yte]の、伝送用パケットであるTS(Transport Strea
m)パケットを生成する。
This PES packet has a payload of 1
It is divided every 84 [bytes], and by adding a 4 [byte] TS header to the beginning of the data, 188 [b] as a whole is obtained.
yte], TS (Transport Strea
m) Generate a packet.

【0004】MPEG2方式では複数の番組(エレメン
タリーストリーム)のTSパケットを時分割多重してト
ランスポートストリームを生成し、これを放送すること
により一つの回線で複数の番組を放送し得るようになさ
れている。TSヘッダには番組別にPID(Packet Ide
ntification )と呼ばれるパケット識別子が記入されて
おり、これにより多重化されたトランスポートストリー
ムから所望の番組を分離できるようになされている。
In the MPEG2 system, TS packets of a plurality of programs (elementary streams) are time-division multiplexed to generate a transport stream, and by broadcasting this, a plurality of programs can be broadcast on one line. ing. The TS header contains a PID (Packet Ide
ntification), so that a desired program can be separated from the multiplexed transport stream.

【0005】[0005]

【発明が解決しようとする課題】ところで、多重化され
たトランスポートストリームを中継局で受信し、当該ト
ランスポートストリームの中の所定の番組の映像データ
に対して例えば広告映像データ(いわゆるCM)を挿入
したり、ニュース番組の中の天気予報の部分にその地方
の天気予報を挿入するようなことが考えられる。
By the way, a multiplexed transport stream is received by a relay station, and for example, advertising video data (so-called CM) is added to video data of a predetermined program in the transport stream. It is conceivable to insert the local weather forecast into the weather forecast portion in the news program.

【0006】このような処理を行うには、第1の映像デ
ータと第2の映像データとを切替え接続して最終的な映
像データを生成する。このような映像編集作業をスプラ
イシング処理と呼ぶ。
[0006] In order to perform such processing, first video data and second video data are switched and connected to generate final video data. Such a video editing operation is called a splicing process.

【0007】第1及び第2の映像データが圧縮符号化し
ていないベースバンドの映像データであれば、第1及び
第2の映像データの間でフレームタイミングを同期させ
て切り換えることで容易にスプライシング処理を行うこ
とができる。
If the first and second video data are baseband video data that have not been compression-encoded, the splicing process can be easily performed by synchronizing and switching the frame timing between the first and second video data. It can be performed.

【0008】ところが第1及び第2の映像データが圧縮
符号化されている場合、ピクチャ毎に発生符号量が異な
るため、単純にデータを切り替えるだけではスプライシ
ング処理を行うことができない。このためスプライシン
グ対象のTSパケットを解析し、PESパケットに記入
されている発生符号量等のパラメータを読み出し、当該
パラメータに基づいてスプライシング処理を行う必要が
ある。
[0008] However, when the first and second video data are compression-encoded, the generated code amount differs for each picture, so that the splicing process cannot be performed simply by switching the data. Therefore, it is necessary to analyze a TS packet to be spliced, read out a parameter such as a generated code amount written in the PES packet, and perform a splicing process based on the parameter.

【0009】かかるパラメータの読み出し方法として、
TSパケットからペイロードを抽出してPESパケット
を再生し、これを用いてパラメータを得るという方法が
考えられるが、この場合PESパケットの再生に時間が
かかり、リアルタイムでの解析が困難であるという問題
を有している。
As a method for reading such parameters,
A method of extracting a payload from a TS packet to reproduce a PES packet and obtaining a parameter using the PES packet can be considered. However, in this case, it takes time to reproduce the PES packet and it is difficult to perform analysis in real time. Have.

【0010】本発明は以上の点を考慮してなされたもの
で、簡易な構成による、リアルタイムでのパケット解析
を行い得るデータ解析装置及びデータ解析方法を提案し
ようとするものである。
The present invention has been made in view of the above points, and it is an object of the present invention to propose a data analysis device and a data analysis method capable of performing real-time packet analysis with a simple configuration.

【0011】[0011]

【課題を解決するための手段】かかる課題を解決するた
め本発明においては、所定のパケットが連続してなるト
ランスポートストリームを解析して、当該各パケットの
ペイロードにそれぞれ分割して割り当てられた符号化デ
ータに記入されているパラメータを得るデータ解析装置
において、トランスポートストリームを記憶する第1の
記憶手段と、パケットを1パケット記憶する第2の記憶
手段と、所定の読み出し対象データを含むパケットを第
1の記憶手段から読み出して第2の記憶手段に記憶し、
読み出し対象データを当該第2の記憶手段から読み出し
て出力する記憶手段の制御手段と、読み出し対象データ
を演算してパラメータを得る演算手段と、第2の記憶手
段に記憶されたパケットのデータと所定のパラメータの
ビットパターンとを照合し、パケットのデータとビット
パターンが一致した場合、当該一致したデータの位置情
報を、当該パケットに記入するパターン照合手段とを設
けた。
In order to solve the above-mentioned problems, according to the present invention, a transport stream composed of a series of predetermined packets is analyzed, and codes which are divided and assigned to payloads of the respective packets. In a data analysis device for obtaining parameters written in coded data, a first storage means for storing a transport stream, a second storage means for storing one packet, and a packet including predetermined data to be read are stored. Read from the first storage means and stored in the second storage means,
Control means for a storage means for reading and outputting the data to be read from the second storage means; calculating means for calculating the data to be read to obtain a parameter; data for the packet stored in the second storage means; Pattern matching means for comparing the bit pattern of the packet with the bit pattern of the parameter, and when the data of the packet matches the bit pattern, writing the position information of the matched data in the packet.

【0012】ビットパターンを照合する手段を演算手段
とは別個に設けたことにより、パラメータの取り出しを
高速に実行することができる。
Since the means for collating the bit pattern is provided separately from the arithmetic means, the parameter can be extracted at a high speed.

【0013】また、第2の記憶手段に記憶されているパ
ケットの末尾のデータをパターン照合手段に保存してお
き、当該第2の記憶手段に記憶されたパケットの次のパ
ケットのビットパターンの照合時に、末尾のデータを次
のパケットの先頭に付加してビットパターンを照合する
ようにした。
The data at the end of the packet stored in the second storage means is stored in the pattern matching means, and the bit pattern of the packet next to the packet stored in the second storage means is checked. Sometimes, the last data is added to the beginning of the next packet to check the bit pattern.

【0014】末尾のデータを保存しておき、次のパケッ
トの先頭に付加してビットパターンを照合することによ
り、2つのパケットにまたがったビットパターンを検出
することができる。
By storing the data at the end and adding it to the head of the next packet and collating the bit pattern, a bit pattern over two packets can be detected.

【0015】[0015]

【発明の実施の形態】以下図面について、本発明の一実
施の形態を詳述する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below in detail with reference to the drawings.

【0016】(1)スプライシング装置の全体構成 図1において、1は全体としてスプライシング装置を示
し、位置情報付加手段としての入力処理部3、データ処
理部4、出力処理部5、CPU(Central Processing U
nit )6、データバス7、コマンドバス8、SDRAM
(Syncronous Dynamic Randam Access Memory )でなる
第1の記憶手段としての外部メモリ9、インターフェー
ス部10及びデータ解析部20で構成される。
(1) Overall Configuration of Splicing Device In FIG. 1, reference numeral 1 denotes a splicing device as a whole, and an input processing unit 3, a data processing unit 4, an output processing unit 5, and a CPU (Central Processing Unit) as position information adding means.
nit) 6, data bus 7, command bus 8, SDRAM
(Synchronous Dynamic Random Access Memory) as an external memory 9, an interface unit 10, and a data analysis unit 20 as first storage means.

【0017】このスプライシング装置1は、ホストコン
ピュータ2から供給される制御情報に基づいて、複数の
映像データを多重化してなるトランスポートストリーム
S1及びS2に対してスプライシング処理を施し、出力
トランスポートストリームSoutを生成し外部に出力
するようになされている。
The splicing apparatus 1 performs splicing processing on transport streams S1 and S2 obtained by multiplexing a plurality of video data based on control information supplied from a host computer 2, and outputs an output transport stream Sout. Is generated and output to the outside.

【0018】CPU6はRISC(Reduced Instructio
n Set Computer:縮小命令セットコンピュータ)構成で
なるマイクロプロセッサであり、スプライシング装置の
各回路ブロック(入力処理部3、データ処理部4、出力
処理部5、外部メモリ9及びデータ解析部20)を制御
するものである。すなわちCPU7は上位のホストコン
ピュータ2から供給されるスプライシング命令をインタ
ーフェース部10及びコマンドバス8を介して受け、当
該スプライシング命令に基づいてスプライシング装置1
の各回路ブロックに対する動作命令を生成し、これを当
該各回路ブロックに供給することにより、ホストコンピ
ュータ2が指示するスプライシング処理を実行するよう
になされている。なお、このCPU6は外部メモリ9に
格納されている動作プログラムに基づいて動作すること
により、これら各回路ブロックの動作を制御するように
なされている。ちなみにこの動作プログラムは、外部か
らホストコンピュータを介して外部メモリ9にダウンロ
ードされる。
The CPU 6 is provided with a RISC (Reduced Instructio).
n Set Computer: A microprocessor having a reduced instruction set computer configuration, and controls each circuit block (input processing unit 3, data processing unit 4, output processing unit 5, external memory 9, and data analysis unit 20) of the splicing device. Is what you do. That is, the CPU 7 receives the splicing command supplied from the host computer 2 via the interface unit 10 and the command bus 8, and based on the splicing command, the splicing device 1
By generating an operation instruction for each of the circuit blocks and supplying the operation instruction to each of the circuit blocks, a splicing process instructed by the host computer 2 is executed. The CPU 6 operates based on an operation program stored in the external memory 9 to control the operation of each of these circuit blocks. Incidentally, the operation program is externally downloaded to the external memory 9 via the host computer.

【0019】またこのスプライシング装置1において
は、各回路ブロック(入力処理部3、データ処理部4、
出力処理部5、CPU6及びデータ解析部20)はデー
タバス7を介して外部メモリ9に接続されており、当該
各回路ブロックは外部メモリ9に対して所望のデータを
書き込めるとともに、当該外部メモリ9から所望のデー
タを読み出し得るようになされている。なお、データバ
ス7にはアービトレーション機能が設けられており、こ
のアービトレーション機能によってデータバス7の使用
権を調停することにより外部メモリ9に対するアクセス
が衝突しないようになされている。
In the splicing apparatus 1, each circuit block (input processing unit 3, data processing unit 4,
The output processing unit 5, the CPU 6, and the data analysis unit 20) are connected to the external memory 9 via the data bus 7, and each of the circuit blocks can write desired data to the external memory 9 and, at the same time, write data to the external memory 9. The desired data can be read out from the. The data bus 7 is provided with an arbitration function, and arbitration of the right to use the data bus 7 by this arbitration function prevents access to the external memory 9 from colliding.

【0020】入力処理部3はトランスポートストリーム
S1及びS2を入力し、当該トランスポートストリーム
S1及びS2を構成するTSパケットを、図2に示すよ
うに同一のPID(Packet Identification :パケット
識別情報)を有するTSパケット毎に整理する。そして
入力処理部3は、図3に示すように各TSパケット(18
8[byte] 長)の先頭に当該TSパケットについての情報
の記入領域としてのローカルヘッダ(64[byte]長)を付
加するとともに、当該TSパケットの末尾に予約領域と
してのリザーブ(4[byte] 長)を付加することにより全
体として256[byte] 長のTSブロックを生成し、これを
順次外部メモリ9に書き込んでいく。
The input processing unit 3 receives the transport streams S1 and S2, and converts the TS packets constituting the transport streams S1 and S2 into the same PID (Packet Identification: packet identification information) as shown in FIG. It arranges for every TS packet which it has. Then, as shown in FIG. 3, the input processing unit 3
A local header (64 [byte] length) as an area for writing information on the TS packet is added to the beginning of the 8 [byte] length, and a reserve (4 [byte] as a reserved area) is added at the end of the TS packet. In addition, a TS block having a length of 256 [bytes] is generated as a whole by adding the “length”, and the TS block is sequentially written to the external memory 9.

【0021】ここでTSパケットは、図4に示すように
MPEG(Moving Picture ExpertsGroup)2方式の映
像符号化の基本単位であるPES(Packetized Element
al Stream )パケットを分割したペイロードにTSヘッ
ダを付加して生成される。入力処理部3は、同一のPI
Dで整理したTSブロックのペイロードデータの先頭
(すなわちPESパケットの先頭)から計数した、当該
TSブロックが有するペイロードの先頭アドレスを「ab
s sum bgn 」に記入し、当該TSブロックが有するペイ
ロードの末尾アドレスを「abs sum end 」に記入し、当
該TSブロックが有するペイロードの先頭を示すポイン
タ情報を「payload ptr 」に記入する。また入力処理部
3は、当該TSブロックのアダプテーションフィールド
の情報を「Else header 」に記入する。
As shown in FIG. 4, the TS packet is a PES (Packetized Element), which is a basic unit of video coding in the MPEG (Moving Picture Experts Group) 2 system.
al Stream) Generated by adding a TS header to a payload obtained by dividing a packet. The input processing unit 3 uses the same PI
D, the leading address of the payload of the TS block counted from the beginning of the payload data of the TS block (that is, the beginning of the PES packet) is denoted by “ab”.
s sum bgn ", the end address of the payload of the TS block is written in" abs sum end ", and the pointer information indicating the head of the payload of the TS block is written in" payload ptr ". Further, the input processing unit 3 writes the information of the adaptation field of the TS block in “Else header”.

【0022】データ解析部20は、スプライシング処理
の対象となる映像データのTSブロックを外部メモリ9
から読み出してローカルヘッダに基づいて解析し、当該
解析結果のデータをTSブロックのローカルヘッダに記
入して当該TSブロックを外部メモリ9に書き戻すとも
に、圧縮符号化時及びパケット化時に付加された各種パ
ラメータを取り出して外部メモリ9に格納する。
The data analysis unit 20 stores TS blocks of video data to be spliced in the external memory 9.
And analyzes the data based on the local header, writes the data of the analysis result in the local header of the TS block, writes the TS block back to the external memory 9, and adds various data added at the time of compression encoding and packetization. The parameters are taken out and stored in the external memory 9.

【0023】ローカルヘッダに記入されるデータとして
は、「PES pyld ptr」、「PES pcktlngt ptr 」、「PES
hdr lngt ptr」、「PTS ptr 」、「DTS ptr 」及び「A
U ptr」がある。「PES pyld ptr」はPESパケットの
ペイロードの先頭を示すポインタ情報であり、PESパ
ケットのペイロードの先頭が当該TSブロックに無い場
合は「0xff」が記入される。「PES pckt lngt ptr 」は
PESパケットのパケット長情報の先頭を示すポインタ
であり、パケット長情報が当該TSブロックに無い場合
は「0xff」が記入される。「PES hdr lngt ptr」はPE
Sパケットのヘッダ長情報の先頭を示すポインタであ
り、ヘッダ長情報が当該TSブロックに無い場合は「0x
ff」が記入される。
The data to be written in the local header are "PES pyld ptr", "PES pcktlngt ptr", "PES
hdr lngt ptr "," PTS ptr "," DTS ptr "and" A
U ptr ”. “PES pyld ptr” is pointer information indicating the head of the payload of the PES packet. If the head of the payload of the PES packet does not exist in the TS block, “0xff” is entered. “PES pckt lngt ptr” is a pointer indicating the head of the packet length information of the PES packet. If the packet length information does not exist in the TS block, “0xff” is entered. "PES hdr lngt ptr" is PE
This is a pointer indicating the head of the header length information of the S packet. If the header length information does not exist in the corresponding TS block, “0x
ff ”is entered.

【0024】「PTS ptr 」は映像データの表示時間情報
PTSの先頭を示すポインタ情報であり、PTSの先頭
が当該TSブロックに無い場合は「0xff」が記入され
る。「DTS ptr 」は映像データの表示時間情報DTSの
先頭を示すポインタ情報であり、DTSの先頭が当該T
Sブロックに無い場合は「0xff」が記入される。「AU p
tr」はアクセスユニットの先頭を示すポインタ情報であ
り、アクセスユニットの先頭が当該TSブロックに無い
場合は「0xff」が記入される。
[PTS ptr] is pointer information indicating the head of the display time information PTS of the video data. If the head of the PTS does not exist in the TS block, "0xff" is entered. “DTS ptr” is pointer information indicating the head of the display time information DTS of the video data.
If it is not in the S block, “0xff” is entered. "AU p
“tr” is pointer information indicating the head of the access unit. If the head of the access unit does not exist in the TS block, “0xff” is entered.

【0025】またTSブロックから取り出されるパラメ
ータとしては、符号化データの表示時間情報であるPT
S(Presentation Time Stamp )、符号化データの復号
時間情報であるDTS(Decoding Time Stamp )、PE
Sパケット長、PESヘッダ長、ビットレート、VBV
(Video Buffer Verifier :発生符号量制御のための仮
想バッファ)サイズ、ビットレート・エクステンショ
ン、VBVサイズ・エクステンション、クローズドGO
P、テンポラリ・リファレンス・コーディング・タイ
プ、VBVディレイ、等といった圧縮符号化時及びパケ
ット化時のパラメータである。
The parameters extracted from the TS block include PT, which is display time information of encoded data.
S (Presentation Time Stamp), DTS (Decoding Time Stamp) as decoding time information of encoded data, PE
S packet length, PES header length, bit rate, VBV
(Video Buffer Verifier: virtual buffer for controlling the amount of generated code) Size, bit rate extension, VBV size extension, closed GO
The parameters at the time of compression encoding and packetization, such as P, temporary reference coding type, VBV delay, and the like.

【0026】ここで、入力されるトランスポートストリ
ームがマルチプログラムの場合、当該トランスポートス
トリームには異なるプログラムのTSパケットが混合さ
れており、このためこれらのパラメータを取り出すには
複雑な作業が伴う。しかしながらこのスプライシング装
置1では、入力処理部3によってトランスポートストリ
ームを同一のPIDを有するTSパケット毎に整理して
外部メモリ9に格納しているため、これらのパラメータ
を容易に取り出すことができる。スプライシング処理は
少なくとも2つ以上の映像データを対象として処理を行
うため、データ解析部20は複数の映像データのストリ
ームを時分割処理によって平行して解析するようになさ
れている。
Here, when the input transport stream is a multi-program, TS packets of different programs are mixed in the transport stream. Therefore, complicated operations are required to extract these parameters. However, in the splicing apparatus 1, since the transport stream is sorted by the input processing unit 3 for each TS packet having the same PID and stored in the external memory 9, these parameters can be easily extracted. Since the splicing process is performed on at least two or more pieces of video data, the data analysis unit 20 is configured to analyze a plurality of video data streams in parallel by time division processing.

【0027】CPU6は、データ解析部20の解析によ
って得られたパラメータに基づいてスプライシング処理
を決める連結点を決めると共に、その連結点においてブ
ランキングデータやスタフィングデータを挿入した方が
良いか否かを判断し、当該判断内容をデータ結合指令と
してデータ処理部4に送出する。
The CPU 6 determines a connection point for determining the splicing process based on the parameters obtained by the analysis of the data analysis unit 20, and determines whether it is better to insert blanking data or stuffing data at the connection point. Is sent to the data processing unit 4 as a data combination command.

【0028】データ処理部4はこのデータ結合指令を受
けて、スプライシング処理の対象の映像データに対して
スプライシング処理を実行する。すなわちデータ処理部
4は、データ結合指令に応じて外部メモリ9からスプラ
イシング対象の複数の映像データを読み出し、必要があ
ればブランキングデータやスタフィングデータを挿入
し、これら複数の映像データを連結することによって連
結映像データを生成し、これを再び外部メモリ9に格納
する。
The data processing section 4 receives the data combination command and executes splicing processing on the video data to be spliced. That is, the data processing unit 4 reads a plurality of pieces of video data to be spliced from the external memory 9 in response to the data combining command, inserts blanking data and stuffing data if necessary, and links the plurality of pieces of video data. As a result, the connected video data is generated and stored in the external memory 9 again.

【0029】出力処理部5は、外部メモリ9に格納され
ている映像データのうち、スプライシング処理によって
得られた連結映像データ及びその他の映像データを多重
化し、出力トランスポートストリームSoutを生成し
て出力する。
The output processing unit 5 multiplexes the concatenated video data and other video data obtained by the splicing process among the video data stored in the external memory 9 to generate and output an output transport stream Sout. I do.

【0030】(2)データ解析部の構成 図5は全体として本発明の一実施の形態によるデータ解
析部20を示し、CPU6(図1)は当該データ解析部
20の動作プログラムを外部メモリ9からプログラムメ
モリ25にダウンロードして実行することにより、デー
タ解析部20全体を制御する。プログラムメモリ25の
容量は24[bit] ×1024[word]であり、当該プログ
ラムメモリ25のアドレスはプログラムカウンタ24に
よって指定される。プログラムデコーダ26はプログラ
ムカウンタ24によって指定された動作プログラムのコ
マンドコードをデコードし、デコード結果をデータ解析
部20の各モジュールに対して出力する。
(2) Configuration of Data Analysis Unit FIG. 5 shows a data analysis unit 20 according to an embodiment of the present invention as a whole, and the CPU 6 (FIG. 1) transmits an operation program of the data analysis unit 20 from the external memory 9. The entire data analysis unit 20 is controlled by downloading the program to the program memory 25 and executing the program. The capacity of the program memory 25 is 24 [bit] × 1024 [word], and the address of the program memory 25 is specified by the program counter 24. The program decoder 26 decodes the command code of the operation program specified by the program counter 24 and outputs the decoding result to each module of the data analysis unit 20.

【0031】ジャンプ先判定部23は動作プログラムに
応じて、プログラムカウンタ24のカウンタ値をインク
リメントするか、又は当該カウンタ値に相対ジャンプ値
を加算することにより当該カウンタ値を更新する。かか
るカウンタ値の更新は、1つのコマンドコードの終了時
に行われる。
The jump destination determining section 23 updates the counter value by incrementing the counter value of the program counter 24 or adding a relative jump value to the counter value in accordance with the operation program. The updating of the counter value is performed at the end of one command code.

【0032】データ解析部20はTS[]メモリ32、G
M[]メモリ42及びRM[]メモリ52の3つの内部メモ
リを有しており、各内部メモリはそれぞれTSメモリ制
御部31、GMメモリ制御部41及びRMメモリ制御部
51によって書き込み及び読み出しが制御される。これ
ら3つの内部メモリの容量はそれぞれ8[bit] ×256
[word]であり、TSブロックのデータ長(256[byt
e])と同一である。
The data analyzer 20 has a TS [] memory 32, a G
It has three internal memories, an M [] memory 42 and an RM [] memory 52. The writing and reading of each internal memory are controlled by the TS memory control unit 31, the GM memory control unit 41, and the RM memory control unit 51, respectively. Is done. The capacity of each of these three internal memories is 8 [bit] × 256.
[word] and the data length of the TS block (256 [byt
e]).

【0033】TS[]メモリ32は、外部メモリ9から読
み出されたTSブロックを格納するメモリであり、演算
器22は当該TS[]メモリ32にアクセスしてTSブロ
ックのペイロード(すなわちPESパケット)内の所望
のデータを読み出す。GM[]メモリ42は汎用メモリ
として用いられ、動作プログラム内のレジスタ値の退避
等に用いられる。
The TS [] memory 32 is a memory for storing the TS blocks read from the external memory 9, and the computing unit 22 accesses the TS [] memory 32 to load the TS blocks (ie, the PES packets). Read the desired data from within. The GM [] memory 42 is used as a general-purpose memory, and is used for saving register values in an operation program.

【0034】TS[]メモリ32及びGM[]メモリ42
はそれぞれTSメモリレジスタ33及びGMメモリレジ
スタ43によって間接アドレッシングされる。例えば、
TS[RegA0] はTS[]メモリ32におけるRegA0 番地の
値を示す。
The TS [] memory 32 and the GM [] memory 42
Are indirectly addressed by the TS memory register 33 and the GM memory register 43, respectively. For example,
TS [RegA0] indicates the value of the RegA0 address in the TS [] memory 32.

【0035】TSメモリレジスタ33のレジスタRegA+
はインクリメント機能付きレジスタであり、分割前のP
ESパケットにおける先頭からの番地を示し、当該レジ
スタRegA+ を用いることによりPESパケット(すなわ
ちTSブロックのペイロード)を連続的にアクセスし得
るようになされている。
The register RegA + of the TS memory register 33
Is a register with an increment function.
It indicates the address from the beginning of the ES packet, and the PES packet (that is, the payload of the TS block) can be continuously accessed by using the register RegA +.

【0036】SEGレジスタ34はインクリメント機能
付きレジスタであり、同一のPIDで整理したTSブロ
ック列の先頭から計数した、当該TSブロック列におけ
るTSブロックの位置(順位)を指定するレジスタであ
る。TSメモリ制御部31は、当該SEGレジスタ34
が示すTSブロックを外部メモリ9から読み出す。また
TSメモリ制御部31は「abs sum bgn 」及び「abs su
m end 」とレジスタRegA+ との比較結果に基づいて、当
該SEGレジスタ34をインクリメント(+1または−
1)する。
The SEG register 34 is a register with an increment function, and specifies the position (order) of the TS block in the TS block sequence counted from the head of the TS block sequence arranged by the same PID. The TS memory control unit 31 stores the SEG register 34
Is read from the external memory 9. Further, the TS memory control unit 31 outputs “abs sum bgn” and “abs su
mend ”and the register RegA +, the SEG register 34 is incremented (+1 or −
1) Yes.

【0037】RM[]メモリ52は演算器22による解析
結果を保存するメモリであり、当該RM[]メモリ52が
満量になった場合に解析結果を外部メモリ9に書き出す
ようになされている。
The RM [] memory 52 is a memory for storing the results of the analysis performed by the computing unit 22. When the RM [] memory 52 becomes full, the analysis results are written to the external memory 9.

【0038】第1の演算器入力セレクタ27Aは、動作
プログラムに応じてその入力をTSメモリ制御部31、
GMメモリ制御部41、RMメモリ制御部51、TSメ
モリレジスタ33、GMメモリレジスタ43及びSEG
レジスタ34から選択し、その出力を演算器22の第1
の入力端に供給する。同様に第2の演算器入力セレクタ
27Bはその入力をTSメモリ制御部31、GMメモリ
制御部41又、RMメモリ制御部51、TSメモリレジ
スタ33、GMメモリレジスタ43及びSEGレジスタ
34から選択し、その出力を演算器22の第2の入力端
に供給する。
The first arithmetic unit input selector 27A inputs its input to the TS memory control unit 31 in accordance with the operation program.
GM memory control unit 41, RM memory control unit 51, TS memory register 33, GM memory register 43, and SEG
Select from the register 34, and output it to the first
To the input end of the Similarly, the second arithmetic unit input selector 27B selects its input from the TS memory control unit 31, the GM memory control unit 41, the RM memory control unit 51, the TS memory register 33, the GM memory register 43, and the SEG register 34, The output is supplied to a second input terminal of the arithmetic unit 22.

【0039】演算手段としての演算器22は、動作プロ
グラムに応じて第1の演算器入力セレクタ27A及び第
2の演算器入力セレクタ27Bから供給されるデータに
対して加算、シフト、論理演算(AND、OR)、反
転、定数ロード等の演算を行い、当該演算結果を、動作
プログラムに応じたモジュール(TSメモリレジスタ3
3、SEGレジスタ34、GMメモリレジスタ43、R
Mメモリレジスタ53、TSメモリ制御部31、GMメ
モリ制御部41及びRMメモリ制御部51)に出力す
る。
The operation unit 22 as an operation means adds, shifts, and performs a logical operation (AND) on the data supplied from the first operation unit input selector 27A and the second operation unit input selector 27B according to the operation program. , OR), inversion, constant loading, and the like, and stores the calculation result in a module (TS memory register 3
3, SEG register 34, GM memory register 43, R
M memory register 53, TS memory control unit 31, GM memory control unit 41, and RM memory control unit 51).

【0040】書込パルス発生部28は、データ解析部2
0の各モジュール(TSメモリレジスタ33、GMメモ
リレジスタ43、RMメモリレジスタ53、SEGレジ
スタ34、TSメモリ制御部31、GMメモリ制御部4
1及びRMメモリ制御部51)に対して書込パルスをセ
レクトして供給する。
The write pulse generator 28 includes the data analyzer 2
0 modules (TS memory register 33, GM memory register 43, RM memory register 53, SEG register 34, TS memory control unit 31, GM memory control unit 4)
1 and the RM memory controller 51).

【0041】データ解析部20が有するレジスタ及びメ
モリは全てアドレスマッピングされており、CPU6
(図1)及び状態退避部56から、入力セレクタ58及
び出力セレクタ59を介してアクセスし得るようになさ
れている。そしてデータ解析部20は、状態退避部56
を介して当該データ解析部20の内部状態(レジスタ及
びメモリ)を外部メモリ9に退避及び読み込むことによ
り、複数の映像データのストリームを時分割処理し得る
ようになされている。
The registers and memories of the data analysis unit 20 are all address-mapped, and the CPU 6
(FIG. 1) and the state saving unit 56 can be accessed via an input selector 58 and an output selector 59. Then, the data analysis unit 20 includes the state saving unit 56
By saving and reading the internal state (register and memory) of the data analysis unit 20 to and from the external memory 9 via the external memory 9, a plurality of video data streams can be time-divisionally processed.

【0042】図6は4つのストリームを時分割処理する
場合の外部メモリ9におけるデータ解析部20の使用領
域を示し、データ解析部のプログラムエリア、RM[]メ
モリ52からのデータを格納するRMリングエリア、及
びデータ解析部20の内部状態を退避するレジスタ退避
エリアを有しており、RMリングエリア及びレジスタ退
避エリアは4分割されている。RMリングエリアは、メ
モリエリアの折り返し位置に到達した場合にメモリエリ
アの先頭に戻るリング構成で使用される。
FIG. 6 shows a use area of the data analysis unit 20 in the external memory 9 when time-division processing is performed on four streams, a program area of the data analysis unit, and an RM ring for storing data from the RM [] memory 52. It has an area and a register save area for saving the internal state of the data analysis unit 20, and the RM ring area and the register save area are divided into four. The RM ring area is used in a ring configuration that returns to the head of the memory area when the memory area reaches the turn-back position.

【0043】次に、TSメモリ制御部31によるTSブ
ロックの読み出しについて説明する。外部メモリ9上に
おいて、PESパケットはTSブロックのペイロードと
して不連続に存在する。記憶手段の制御手段としてのT
Sメモリ制御部31は、動作プログラムに応じて外部メ
モリ9からTSブロックを読み出してTS[]メモリ32
に格納し、当該TSブロックからペイロード(すなわち
PESパケット)のみを読み出すことにより、ペイロー
ドを連続的にアクセスし得るようになされている。
Next, reading of a TS block by the TS memory control unit 31 will be described. On the external memory 9, the PES packet exists discontinuously as the payload of the TS block. T as control means of storage means
The S memory control unit 31 reads the TS block from the external memory 9 according to the operation program and
, And by reading only the payload (ie, PES packet) from the TS block, the payload can be continuously accessed.

【0044】すなわち、動作プログラムによるペイロー
ドの読み出し命令が発生した場合、TSメモリ制御部3
1はこれに応じてSEGレジスタ34で指定されたTS
ブロックを外部メモリ9から読み出し、これをTS[]メ
モリ32に格納する。かかる読み出し命令における読み
出し対象のデータは、レジスタRegA+ を用いて「TS[R
egA+] 」の形式で指定される。
That is, when a payload read command is issued by the operation program, the TS memory control unit 3
1 corresponds to the TS designated by the SEG register 34.
The block is read from the external memory 9 and stored in the TS [] memory 32. The data to be read in such a read instruction is expressed by “TS [R
egA +] ”.

【0045】このときTSメモリ制御部31は、TSブ
ロックのローカルヘッダに記入されている「abs sum bg
n 」、「abs sum end 」及びレジスタRegA+ に基づい
て、読み出し対象のデータ(TS[RegA+] )が現在TS
[]メモリ32に格納されているTSブロックにあるか否
かを判断し、当該読み出し対象のデータが当該TSブロ
ックに無い場合、SEGレジスタ34をインクリメント
することにより、当該読み出し対象のデータを含むTS
ブロックを外部メモリ9から読みだしてTS[]メモリ3
2に格納する。
At this time, the TS memory control unit 31 sets “abs sum bg” written in the local header of the TS block.
n ”,“ abs sum end ”and the register RegA +, the data to be read (TS [RegA +]) is
It is determined whether or not the data to be read exists in the TS block stored in the memory 32. If the data to be read is not in the TS block, the TS including the data to be read is incremented by the SEG register 34.
The block is read from the external memory 9 and the TS [] memory 3
2 is stored.

【0046】図7は全体としてTSメモリ制御部31を
示し、第1の加算器62Aはレジスタ値RegA+ から「ab
s sum end 」を減算し、その結果を第1の判定部63A
に出力する。第1の判定部63Aは、当該減算結果が負
の場合は”0”を、それ以外の場合は”1”を第3の加
算器62Cに出力する。同様に第2の加算器62Bはレ
ジスタ値RegA+ から「abs sum bgn 」を減算し、その結
果を第2の判定部63Bに出力する。第2の判定部63
Bは、当該減算結果が負の場合は”−1”を、それ以外
の場合は”0”を第3の加算器62Cに出力する。第3
の加算器62Cは第1の判定部63A及び第2の判定部
63Bの出力を加算し、これを演算結果S62Cとして
第4の加算器62Dに出力する。
FIG. 7 shows the TS memory control unit 31 as a whole, and the first adder 62A converts the register value RegA + to “ab”
s sum end ”and subtracts the result into the first determination unit 63A.
Output to The first determination unit 63A outputs “0” to the third adder 62C if the subtraction result is negative, and outputs “1” otherwise. Similarly, the second adder 62B subtracts “abs sum bgn” from the register value RegA +, and outputs the result to the second determination unit 63B. Second determination unit 63
B outputs “−1” to the third adder 62C when the subtraction result is negative, and outputs “0” otherwise. Third
Adder 62C adds the outputs of the first determination unit 63A and the second determination unit 63B, and outputs the result to the fourth adder 62D as a calculation result S62C.

【0047】演算結果S62Cは、TS[RegA+] が現在
TS[]メモリ32に格納されているTSブロック内を示
している場合(すなわちabs sum bgn ≦RegA+ ≦abs su
m end の場合)に”0”となり、TS[RegA+] が現在T
S[]メモリ32に格納されているTSブロックよりも前
のTSブロックを示している場合(すなわちRegA+ <ab
s sum bgn の場合)に”−1”となり、TS[RegA+] が
現在TS[]メモリ32に格納されているTSブロックよ
りも後のTSブロックを示している場合(すなわちabs
sum end <RegA+ の場合)に”1”となる。
The operation result S62C indicates that TS [RegA +] indicates the inside of the TS block currently stored in the TS [] memory 32 (that is, abs sum bgn ≦ RegA + ≦ abs su
mend), it becomes “0”, and TS [RegA +] is T
S [] indicates a TS block before the TS block stored in the memory 32 (that is, RegA + <ab
s sum bgn) becomes “−1”, and TS [RegA +] indicates a TS block after the TS block currently stored in the TS [] memory 32 (ie, abs)
It becomes "1" when sum end <RegA +).

【0048】第4の加算器62Dは、SEGレジスタ3
4のレジスタ値に演算結果S62Cを加算し、これを演
算結果S62Dとして第1の比較器64Aに供給する。
第1の比較器64Aは演算器22からの書き込み命令に
応じて、演算結果S62DをSEGレジスタ34に供給
してSEGレジスタ34を書き換える。
The fourth adder 62D is provided in the SEG register 3
The calculation result S62C is added to the register value of No. 4 and the result is supplied to the first comparator 64A as the calculation result S62D.
The first comparator 64A supplies the operation result S62D to the SEG register 34 and rewrites the SEG register 34 in response to the write command from the operation unit 22.

【0049】これによりSEGレジスタ34は、TS[R
egA+] が現在TS[]メモリ32に格納されているTSブ
ロック内を示している場合は変化せず、TS[RegA+] が
現在TS[]メモリ32に格納されているTSブロックよ
りも前のTSブロックを示している場合は1だけ減算さ
れ、TS[RegA+] が現在TS[]メモリ32に格納されて
いるTSブロックよりも後のTSブロックを示している
場合は1だけ加算される。
As a result, the SEG register 34 stores TS [R
If egA +] indicates the inside of the TS block currently stored in the TS [] memory 32, no change occurs, and TS [RegA +] is the TS block preceding the TS block currently stored in the TS [] memory 32. If it indicates a block, it is decremented by one, and if TS [RegA +] indicates a TS block subsequent to the TS block currently stored in the TS [] memory 32, it is incremented by one.

【0050】またSEGレジスタ34は、演算器22か
らの直接その値を書き換えることができるようになされ
ている。
The value of the SEG register 34 can be rewritten directly from the arithmetic unit 22.

【0051】読出制御部65は、SEGレジスタ34で
指定されたTSブロック(すなわち読み出し対象のデー
タ(TS[RegA+] )を含むTSブロック)を外部メモリ
9から読み出し、これをTS[]メモリ32に格納する。
かかるSEGレジスタ34の書き換え(インクリメン
ト)及びTSブロックの読出は、加算器62A〜62
D、判定部62A、62B及び比較器64Aによるハー
ドウェア処理であるため、高速に処理が実行される。
The read control unit 65 reads the TS block specified by the SEG register 34 (that is, the TS block including the data to be read (TS [RegA +])) from the external memory 9 and stores it in the TS [] memory 32. Store.
The rewriting (increment) of the SEG register 34 and the reading of the TS block are performed by the adders 62A-62.
D, hardware processing by the determination units 62A and 62B and the comparator 64A, the processing is executed at high speed.

【0052】TS[]メモリ32内におけるTS[RegA+]
の位置は、RegA+ −abs sum bgn +paylode ptr で求め
られる。第5の加算器62Eは、第2の加算器62Bの
出力(RegA+ −abs sum bgn )にpaylode ptr を加算
し、これを演算結果S62Eとして比較器64Bを介し
てTS[]メモリ32に供給する。TS[]メモリ32は、
演算結果S62Eを読出アドレスとしてTSブロックの
データを読み出すことによりTS[RegA+] を読み出し、
これを演算器22(図5)に供給する。
TS [RegA +] in the TS [] memory 32
Is obtained by RegA + −abs sum bgn + paylode ptr. The fifth adder 62E adds the paylode ptr to the output (RegA + −abs sum bgn) of the second adder 62B, and supplies the result to the TS [] memory 32 via the comparator 64B as the operation result S62E. . The TS [] memory 32
TS [RegA +] is read by reading the data of the TS block using the operation result S62E as a read address,
This is supplied to the arithmetic unit 22 (FIG. 5).

【0053】かくしてTSメモリ制御部31は、ペイロ
ードの読み出し命令が発生した場合、TS[RegA+] を含
むTSブロックを外部メモリ9から読み出してTS[]メ
モリ32に格納し、TS[RegA+] をTS[]メモリ32か
ら読み出して演算器22に出力する。TSメモリ制御部
31の外部からは、TS[RegA+] がどのTSブロックに
含まれているかを意識することなくTS[RegA+] を読み
出すことができ、これによりPESパケットがペイロー
ドとして分割されていることを意識することなく、当該
PESパケットを連続的にアクセスし得るようになされ
ている。
Thus, when a read command of the payload is generated, the TS memory control unit 31 reads the TS block including TS [RegA +] from the external memory 9 and stores it in the TS [] memory 32, and stores TS [RegA +] in the TS [RegA +]. [] Read from the memory 32 and output to the arithmetic unit 22. TS [RegA +] can be read from the outside of the TS memory control unit 31 without being aware of which TS block contains TS [RegA +], whereby the PES packet is divided as a payload. The PES packet can be continuously accessed without being aware of the PES packet.

【0054】演算器22(図5)は、このようにして読
みだされたペイロードを動作プログラムに基づいて演算
して解析することにより、PESパケットに記入されて
いるPTS、DTS、PESパケット長、PESヘッダ
長、ビットレート、VBVサイズ、ビットレート・エク
ステンション、VBVサイズ・エクステンション、クロ
ーズドGOP、テンポラリ・リファレンス・コーディン
グ・タイプ、VBVディレイ等のパラメータを取り出
し、これらをRMメモリ制御部51を介してRM[]メモ
リ52に書き込む。
The arithmetic unit 22 (FIG. 5) calculates and analyzes the payload thus read out based on the operation program, thereby obtaining the PTS, DTS, PES packet length, and PTS written in the PES packet. The parameters such as the PES header length, bit rate, VBV size, bit rate extension, VBV size extension, closed GOP, temporary reference coding type, VBV delay, etc. are extracted, and these are extracted from the RM via the RM memory control unit 51. [] Write to the memory 52.

【0055】RMメモリレジスタ53はインクリメント
機能付きレジスタであり、RM[]メモリ52にデータが
1[byte]書き込まれる毎にインクリメントするようにな
されている。RMメモリ制御部51は、RMメモリレジ
スタ53のレジスタRegC+ を監視しており、当該レジス
タRegC+ の値が256の整数倍になった場合(すなわち
RM[]メモリ52(容量256[byte])がいっぱいにな
った場合)に、RM[]メモリ52を読み出して外部メモ
リ9(図1)に書き込む。
The RM memory register 53 is a register with an increment function, and is incremented every time data is written to the RM [] memory 52 by 1 [byte]. The RM memory control unit 51 monitors the register RegC + of the RM memory register 53, and when the value of the register RegC + has become an integral multiple of 256 (that is, the RM [] memory 52 (capacity 256 [byte]) is full). ), The RM [] memory 52 is read and written to the external memory 9 (FIG. 1).

【0056】また演算器22は読みだされたペイロード
を解析してPESパケットに記入されている「PES pyld
ptr」、「PES pckt lngt ptr 」、「PES hdr lngt pt
r」、「PTS ptr 」、「DTS ptr 」及び「AU ptr」の各
パラメータを取り出し、これらを図3に示すローカルヘ
ッダに記入する。
The arithmetic unit 22 analyzes the read payload and reads “PES pyld” written in the PES packet.
ptr "," PES pckt lngt ptr "," PES hdr lngt pt "
The parameters "r", "PTS ptr", "DTS ptr" and "AU ptr" are extracted, and these are entered in the local header shown in FIG.

【0057】ここで、解析の対象となるデータ(PES
ペイロード)はPESパケットの先頭から始まるとは限
らず、TSブロックをTSブロック列の先頭から一つず
つ読み出して解析していくのは意味がない。このため動
作プログラムは、PESペイロードの先頭を示す「payl
oad unit start indicator」を検出するまでSEGレジ
スタ34をインクリメントすることにより、TSブロッ
クの読み飛ばしを行う。
Here, the data to be analyzed (PES
The payload does not always start from the beginning of the PES packet, and it is meaningless to read and analyze the TS blocks one by one from the beginning of the TS block sequence. For this reason, the operation program uses the “payl
The TS block is skipped by incrementing the SEG register 34 until the "oad unit start indicator" is detected.

【0058】一方パターン照合手段としてのサーチ部6
0は、動作プログラムによるサーチコマンドに応じて、
予め指定されたサーチパターンを用いてTS[]メモリ3
2に格納されているTSブロックのペイロードをサーチ
してパターンマッチングを行い、当該サーチパターンと
一致したビット列を検出した場合、当該ビット列の末尾
アドレスを当該TSブロックのローカルヘッダの「Matc
h ptr 0 〜Match ptr7 」に記入する。
On the other hand, a search section 6 as a pattern matching means
0 is set according to the search command by the operation program.
Using the search pattern specified in advance, the TS [] memory 3
When the pattern matching is performed by searching the payload of the TS block stored in No. 2 and a bit string that matches the search pattern is detected, the end address of the bit string is set to “Matc” in the local header of the TS block.
h ptr 0-Match ptr7 ”.

【0059】ここで指定されるサーチパターンとして
は、PESパケットのPESペイロードに記入されてい
るシーケンス・スタート・コード、グループ・スタート
・コード、ピクチャ・スタート・コード、スライス・ス
タート・コード等がある。これらの情報は、後段の処理
で用いられる。
The search pattern specified here includes a sequence start code, a group start code, a picture start code, a slice start code, and the like written in the PES payload of the PES packet. These pieces of information are used in subsequent processing.

【0060】このときサーチ部60は、サーチパターン
の対象となるビット列がTSブロックにまたがって存在
する場合を考慮して、サーチが行われたペイロードの末
尾3[byte]を記憶しておき、次のサーチ時には当該保存
されている3[byte]を含めてサーチを行う。
At this time, the search unit 60 stores the last 3 [bytes] of the searched payload in consideration of the case where the bit string targeted for the search pattern exists across the TS blocks, When the search is performed, the search including the stored 3 [bytes] is performed.

【0061】またサーチ部60は、TSメモリ制御部3
1によるTSブロックの読み出しと同時に、payload pt
r が示す位置(すなわちPESペイロードの先頭)から
あらかじめパターンマッチングを行い、この時の結果
(サーチパターンと一致したビット列の末尾アドレス)
を保存しておく。かかる処理をプリサーチと呼ぶ。そし
てTS[]メモリ32内のTSブロックに対するサーチに
よって当該TSブロックがPESペイロードのみで構成
されていると判明した場合、プリサーチの結果をローカ
ルヘッダに記入してサーチを終了する。
The search unit 60 is provided with the TS memory control unit 3
1 and at the same time as reading the TS block,
Pattern matching is performed in advance from the position indicated by r (that is, the beginning of the PES payload), and the result at this time (the end address of the bit string that matches the search pattern)
Save. Such processing is called pre-search. If the TS block in the TS [] memory 32 is found to be composed of only the PES payload by searching the TS block, the result of the pre-search is entered in the local header and the search is terminated.

【0062】図8はサーチ部60の状態遷移を示し、3d
0 で表せられる「休止」は、サーチ部60の動作してい
ない状態である。
FIG. 8 shows a state transition of the search unit 60,
“Pause” represented by 0 is a state in which the search unit 60 is not operating.

【0063】3d1 で表せられる「プリサーチ」は、TS
ブロックを外部メモリ9からTS[]メモリ32に読み込
む時に遷移し、「payload ptr 」をサーチの先頭とし
て、TS[]メモリ32内のペイロードについてパターン
サーチを行う状態である。
The “pre-search” represented by 3d1 is the TS
A transition is made when a block is read from the external memory 9 to the TS [] memory 32, and a pattern search is performed for the payload in the TS [] memory 32 with "payload ptr" as the head of the search.

【0064】3d2 で表せられる「PESヘッダの有無を
判定」は、PESヘッダの有無を「PES pyld ptr 」に
基づいて判定する。
The "determine presence / absence of PES header" represented by 3d2 determines the presence / absence of a PES header based on "PES pyld ptr".

【0065】3d3 で表せられる「PES pyld ptrを用いて
サーチ」は、「PES pyld ptr」をサーチの先頭として、
TS[]メモリ32内のペイロードについてパターンサー
チを行う状態である。
The “search using PES pyld ptr” represented by 3d3 is performed by using “PES pyld ptr” as the head of the search.
This is a state in which a pattern search is performed for the payload in the TS [] memory 32.

【0066】3d4 、3d5 で表せられる「パターンマッチ
有無判定」は、CPU9が指定したパターンがサーチ範
囲内にあるかどうか判定する状態である。
The "pattern match presence / absence determination" represented by 3d4 and 3d5 is a state in which the CPU 9 determines whether or not the pattern designated by the CPU 9 is within the search range.

【0067】3d6 で表せられる「マッチしたアドレス転
送」は、パターンマッチしたデータのTSブロックの先
頭からの位置を、ローカルヘッダの Match ptr 0 〜Ma
tchptr 7 へ転送する状態である。
The “matched address transfer” represented by 3d6 indicates the position of the pattern-matched data from the beginning of the TS block using Match ptr 0 to Ma in the local header.
This is the state to transfer to tchptr 7.

【0068】3d7 で表せられる「末尾のpayload 3byte
の保存」は、次のサーチ時にTSブロックに跨がるデー
タを処理するため、ペイロードの末尾3[byte]を保存す
る状態である。
The "payload 3byte at the end" represented by 3d7
“Save” is a state in which the last 3 [bytes] of the payload are saved in order to process data spanning the TS block in the next search.

【0069】以上の状態の中で最も処理に時間を要する
状態は、3d3 で表せられる「PES pyld ptrを用いてサー
チ」であり、最大60クロック程度を要する。また、3d
1 で表せられる「プリサーチ」は、TSブロックの読み
込みに平行して行われるため、処理時間に加算されな
い。その他の状態は条件判定やバイトのコピーにより実
行されるため、1〜2クロック程度である。
The state requiring the longest processing time among the above states is "search using PES pyld ptr" represented by 3d3, and requires about 60 clocks at the maximum. Also 3d
The “pre-search” represented by 1 is performed in parallel with the reading of the TS block, and is not added to the processing time. Other states are executed by condition determination or byte copying, and therefore require about 1 to 2 clocks.

【0070】これらの状態は、発生確率が高い順に次の
3パターンで遷移が発生する。まずTSパケットのペイ
ロードが、全てPESペイロードの場合、遷移パターン
1として、3d0 →3d1 →3d0 →3d2 →3d4 → (3d6 →)
3d7 →3d0 の順で遷移する。ここで (3d6 →) はサーチ
パターンと一致した場合に発生し、プリサーチによる結
果を用いる。この場合、処理時間は8クロック程度とな
る。
In these states, transitions occur in the following three patterns in descending order of occurrence probability. First, when the payloads of the TS packets are all PES payloads, transition pattern 1 is 3d0 → 3d1 → 3d0 → 3d2 → 3d4 → (3d6 →)
Transition is made in the order of 3d7 → 3d0. Here, (3d6 →) occurs when the search pattern matches, and the result of the pre-search is used. In this case, the processing time is about 8 clocks.

【0071】TSパケットのペイロードがTSアダプテ
ーションフィールドやPESヘッダのみの場合、遷移パ
ターン2として、3d0 →3d1 →3d0 →3d2 →3d0 の順で
遷移する。この場合サーチは行われず、処理時間は2ク
ロック程度となる。
When the payload of the TS packet is only the TS adaptation field or the PES header, the transition pattern 2 transits in the order of 3d0 → 3d1 → 3d0 → 3d2 → 3d0. In this case, no search is performed, and the processing time is about two clocks.

【0072】TSパケットのペイロードがPESヘッダ
とPESペイロードのみの場合、遷移パターン3とし
て、3d0 →3d1 →3d0 →3d2 →3d3 → (3d6 →) 3d7 →
3d0 の順で遷移する。ここで (3d6 →) は、サーチパタ
ーンと一致した場合に発生する。この場合、処理時間は
最大68クロックとなる。
When the payload of the TS packet is only the PES header and the PES payload, the transition pattern 3 is 3d0 → 3d1 → 3d0 → 3d2 → 3d3 → (3d6 →) 3d7 →
Transition in order of 3d0. Here, (3d6 →) occurs when the search pattern matches. In this case, the processing time is a maximum of 68 clocks.

【0073】ほとんどのTSパケットは遷移パターン1
(TSパケットのペイロードが、全てPESペイロード
の場合)で処理される。遷移パターン1ではプリサーチ
による結果を用いることができ、最も時間がかかる「PE
S pyld ptrを用いてサーチ」(3d3 )を実行しなくて良
いため、サーチに要する時間を大幅に短縮することがで
きる。
Most TS packets have transition pattern 1
(When the payload of the TS packet is all PES payloads). In transition pattern 1, the result of the pre-search can be used, and "PE
Since it is not necessary to execute “search using Spyld ptr” (3d3), the time required for the search can be significantly reduced.

【0074】かかる解析及びサーチによってTSブロッ
クのローカルヘッダが書き換えられた場合、TSメモリ
制御部31は当該TSブロックをTS[]メモリ32から
外部メモリ9に書き戻す。この書き戻しは外部メモリ9
からのTSブロックの読み込みの直前に行われる。
When the local header of the TS block is rewritten by the analysis and the search, the TS memory control unit 31 rewrites the TS block from the TS [] memory 32 to the external memory 9. This write back is stored in the external memory 9
This is performed immediately before reading of a TS block from.

【0075】図9は動作プログラムのソフトコード処理
の状態遷移を示し、処理の単位を機能別に分けて表して
いる。
FIG. 9 shows the state transition of the soft code processing of the operation program, and the processing unit is represented by function.

【0076】h00 で表わされる「レジスタの初期化」
は、ソフトコード内で使用する汎用レジスタの初期化処
理である。
"Register initialization" represented by h00
Is initialization processing of general-purpose registers used in the soft code.

【0077】h01 で表せられる「PESの開始確認」
は、TSヘッダの payload unit start indicator を検
出することにより、PESの先頭を確認する。
"PES start confirmation" represented by h01
Confirms the head of the PES by detecting the payload unit start indicator of the TS header.

【0078】h02 で表せられる「SEGのインクリメン
ト」は、SEGレジスタ34に1を加算する。SEGレ
ジスタ34はTSパケットを指し示すため、1を加算す
ることで次のTSパケットに移動することを意味する。
In the "increment of SEG" represented by h02, 1 is added to the SEG register 34. Since the SEG register 34 points to the TS packet, it means that by adding 1, it moves to the next TS packet.

【0079】h03 で表せられる「RegA+ の初期化」は、
「abs sum bgn 」をレジスタRegA+にロードする。これ
によりRegA+ はTSパケットの先頭を指し示す。
The “Initialization of RegA +” represented by h03 is
Load "abs sum bgn" into register RegA +. Thus, RegA + indicates the head of the TS packet.

【0080】h04 で表せられる「PESヘッダ開始」
は、再度「 payload unit start indicator 」を検出し
て、PESの先頭であるかどうかを確認する。
"PES header start" represented by h04
Detects “payload unit start indicator” again and confirms whether or not it is the head of PES.

【0081】h05 で表せられる「PESヘッダ長解析」
は、「PES packet length 」や「PTS DTS flag」等を読
み取る。
"PES header length analysis" represented by h05
Reads “PES packet length”, “PTS DTS flag”, etc.

【0082】h06 で表せられる「PTS解析」は、PT
Sを読み取り保存する。
The “PTS analysis” represented by h06
Read and save S.

【0083】h07 で表せられる「DTS解析」は、DT
Sを読み取り保存する。
The “DTS analysis” represented by h07 is
Read and save S.

【0084】h08 で表せられる「 PES pyld ptr 計算」
は、ペイロードの先頭を示すポインタ「 PES pyld ptr
」をPESヘッダ長から計算する。
"PES pyld ptr calculation" represented by h08
Is the pointer "PES pyld ptr
Is calculated from the PES header length.

【0085】h10 で表せられる「サーチ実行」は、後述
するサーチを実行する。
The "search execution" represented by h10 executes a search described later.

【0086】h11 で表せられる「SEGレジスタチェッ
ク」は、RegA+ によってSEGレジスタ34のインクリ
メントが発生したかどうか確認する。
The "SEG register check" represented by h11 confirms whether or not the increment of the SEG register 34 has occurred by RegA +.

【0087】h12 で表せられる「Match ptr チェック」
は、「Match ptr 」を確認して、サーチコマンドにより
パターンの一致があったかどうか確認する。
"Match ptr check" represented by h12
Checks the "Match ptr" to see if there is a pattern match by the search command.

【0088】h13 で表せられる「シーケンス層解析」
は、SHC(Sequence Header Code)が見つかった場合
のシーケンスヘッダ部の解析(Bit Rate Value、VBV Bu
ffer Size Value 等の読み取り) を行う。
"Sequence layer analysis" represented by h13
Is the analysis of the sequence header portion when the SHC (Sequence Header Code) is found (Bit Rate Value, VBV Bu
ffer Size Value).

【0089】h14 で表せられる「シーケンス・エクステ
ンション層解析」は、ESC(Extension Start Code)
が見つかった場合のシーケンスヘッダ部の解析(Bit Rat
e Extension 、VBV Buffer Size Extension 等の読み取
り) を行う。
The “sequence extension layer analysis” represented by h14 is an ESC (Extension Start Code)
Analysis of the sequence header part when
e Extension, VBV Buffer Size Extension, etc.).

【0090】h15 で表せられる「GOP層解析」は、G
SC(Group Start Code)が見つかった場合のGOP層
の解析を行う。
The “GOP layer analysis” represented by h15
The GOP layer is analyzed when an SC (Group Start Code) is found.

【0091】h16 で表せられる「ピクチャ層解析」は、
PSC(Picture Start Code)が見つかった場合のピク
チャ層の解析を行う。
The "picture layer analysis" represented by h16 is
The picture layer is analyzed when a PSC (Picture Start Code) is found.

【0092】h17 で表せられる「シーケンス・エンド・
ピクチャサイズ計算」は、SEC(Sequence end Code
)が見つかった場合の、RegA+ からPESヘッダ長を
差し引いて発生符号量を計算する処理である。
The "sequence end" represented by h17
“Calculation of picture size” is based on SEC (Sequence end Code
) Is a process of calculating the generated code amount by subtracting the PES header length from RegA +.

【0093】かくしてデータ解析部20はTSブロック
のペイロード(すなわちPESパケット)を解析し、そ
の結果をTSブロックのローカルヘッダに記入するとと
もに外部メモリ9に出力する。
Thus, the data analyzer 20 analyzes the payload (ie, PES packet) of the TS block, writes the result in the local header of the TS block, and outputs the result to the external memory 9.

【0094】図10はデータ解析部20全体の状態遷移
を示し、5h00で表される「休止」は、モジュール内のあ
らゆる動作が停止した状態であり、電源投入後及びハー
ドリセット時はこの状態から始まる。CPU6はこの状
態のとき、各種レジスタの設定及びコマンドの発行を行
う。このレジスタ設定には、TSパケットのエリア、開
始位置、終了位置、外部メモリの作業領域(プログラム
位置、状態退避位置、解析結果の格納位置)、サーチ命
令でサーチするパターンの設定等がある。
FIG. 10 shows a state transition of the entire data analysis unit 20. The "pause" indicated by 5h00 is a state in which all operations in the module are stopped. Begin. In this state, the CPU 6 sets various registers and issues commands. The register setting includes setting of an area of a TS packet, a start position, an end position, a work area of an external memory (a program position, a state save position, a storage position of an analysis result), a pattern to be searched by a search command, and the like.

【0095】5h01で表せられる「プログラム読み込み」
は、CPU6からのコマンドによってプログラムを外部
メモリ9からロードする。
"Program read" represented by 5h01
Loads a program from the external memory 9 in response to a command from the CPU 6.

【0096】5h02で表せられる「TS[]読み込み」は、
CPU6からのコマンドによってSEGレジスタの示す
TSパケットを外部メモリ9からロードする。
“TS [] read” represented by 5h02 is
The TS packet indicated by the SEG register is loaded from the external memory 9 according to a command from the CPU 6.

【0097】5h10で表せられる「プログラム実行」は、
CPU6からのスタートコマンドによってプログラムカ
ウンタの指し示す位置よりプログラムを実行する。プロ
グラムの実行は「5h00」であらかじめ設定されたTSパ
ケットの終了位置まで、「5h13」「5h12」「5h14」「5h
17」の遷移を繰り返しながら行われる。TSパケットの
終了位置に到達したとき、あるいはCPU6からのスト
ップコマンドにより「5h00」に遷移する。
"Program execution" represented by 5h10 is
The program is executed from the position indicated by the program counter in response to a start command from the CPU 6. The program is executed until “5h00” reaches the end position of the preset TS packet, “5h13”, “5h12”, “5h14”, “5h
17 ”is repeated. The state transits to “5h00” when the end position of the TS packet is reached or in response to a stop command from the CPU 6.

【0098】5h13で表せられる「自動TS[]書き出し」
は、プログラムコードでTS[]メモリ32にヘッダ等の
書込があった場合に、TS[]メモリ32の内容を外部メ
モリ9に書き戻す。この状態は自動TS[]読み込みの直
前に発生する。
"Automatic TS [] export" represented by 5h13
Writes the contents of the TS [] memory 32 back to the external memory 9 when a header or the like is written in the TS [] memory 32 by the program code. This state occurs immediately before reading the automatic TS [].

【0099】5h12で表せられる「自動TS[]読み込み」
は、プログラムコードでTS[]メモリ32へのアクセス
がある場合で、次の2つの場合がある。
"Automatic TS [] read" represented by 5h12
Is a case where the program code accesses the TS [] memory 32, and there are the following two cases.

【0100】すなわち第1の場合として、SEGレジス
タが書き換えられた後にTS[RegA0〜RegA5]のアクセス
があった場合と、第2の場合として、TS[Reg+0] が次
のTSパケットを示す場合(ローカルヘッダの、abs su
m bgn 、abs sum end とRegA+ を比較して判定する)が
ある。TS[]メモリ32への読み込み終了後に、「5h1
0」に遷移する。
That is, TS [RegA0 to RegA5] is accessed after the SEG register is rewritten as the first case, and TS [Reg + 0] indicates the next TS packet as the second case. If (in the local header, abs su
m bgn, abs sum end and RegA + are compared). After reading into the TS [] memory 32, “5h1
"0".

【0101】5h14で表せられる「自動RM[]書き出し」
は、RM[]メモリ52が満量になった場合、すなわちレ
ジスタRegC+ が256の整数倍(RM[]メモリ52のサ
イズと等しい)になった場合に、RM[]メモリ52内の
データを外部メモリ9に書き出す。
"Automatic RM [] writing" represented by 5h14
When the RM [] memory 52 is full, that is, when the register RegC + has become an integral multiple of 256 (equal to the size of the RM [] memory 52), the data in the RM [] memory 52 is stored in the external memory. Write to memory 9.

【0102】5h17で表せられる「パターンサーチ」は、
プログラムコードでサーチコマンドが発生した場合に遷
移し、CPU6であらかじめセットされたサーチパター
ンと一致するものを検出した場合、TSブロックのロー
カルヘッダの所定位置(match ptr0〜match ptr7)に検
出したパターンの末尾アドレスを書き込んだ後、「5h1
0」に遷移する。
The "pattern search" represented by 5h17 is
The transition is made when a search command is generated in the program code. When the CPU 6 detects a search pattern that matches a preset search pattern, the CPU 6 detects a pattern at a predetermined position (match ptr0 to match ptr7) in the local header of the TS block. After writing the end address, `` 5h1
"0".

【0103】5h04で表せられる「RM[]書き出し」は、
CPU6からのコマンドによって、RM[]メモリ52内
のデータを外部メモリ9に書き出す。
“RM [] write” represented by 5h04 is
The data in the RM [] memory 52 is written to the external memory 9 according to a command from the CPU 6.

【0104】5h08で表せられる「状態退避」は、CPU
6からのコマンドによって、データ解析部20の各モジ
ュールの全内部状態を、外部メモリ9に退避する。この
状態は、複数のPIDストリームを時分割処理する場合
に用いる。
The “status saving” represented by 5h08 is executed by the CPU
6, the internal state of each module of the data analysis unit 20 is saved in the external memory 9. This state is used when a plurality of PID streams are subjected to time division processing.

【0105】5h07で表せられる「退避読み込み」は、C
PU6からのコマンドによって、「5h08」(状態退避)
で退避した状態を外部メモリ9からデータ解析部20の
各モジュールに再び読み戻す。これにより「5h08」で退
避した状態から処理を再開することができる。
[0105] "Evacuation reading" represented by 5h07
"5h08" (status save) by command from PU6
Is read back from the external memory 9 to each module of the data analysis unit 20. Thus, the processing can be restarted from the state saved at “5h08”.

【0106】上述の各状態は、以下に示す条件で遷移す
る。
Each of the above-mentioned states transits under the following conditions.

【0107】5h00→5h01、5h00→5h02、5h00→5h03、5h
00→5h04、5h00→5h07、5h00→5h08:いずれもCPU6
からのコマンドにより遷移、状態終了後に5h00に自動遷
移する。
5h00 → 5h01, 5h00 → 5h02, 5h00 → 5h03, 5h
00 → 5h04、5h00 → 5h07、5h00 → 5h08: All are CPU6
Automatically transitions to 5h00 after the end of status.

【0108】5h00→5h10:CPU6からのスタートコマ
ンドにより遷移する。
5h00 → 5h10: Transition is made by a start command from the CPU 6.

【0109】5h00→5h12:TSブロックに書き込みが無
く、プログラムコードがSEGレジスタ34を書き換え
た後、TS[C] 、TS[RegA0〜RegA5]を「input 」(後
述の機械語コード参照)に指定した場合、又はTS[Reg
A+] を「input 」に指定して、TS[RegA+ ]を含むTS
パケットが外部メモリ9にある場合に遷移する。
5h00 → 5h12: There is no writing in the TS block, and after the program code rewrites the SEG register 34, TS [C] and TS [RegA0 to RegA5] are designated as “input” (see machine code described later). Or TS [Reg
A +] is specified as “input” and TS including TS [RegA +]
Transition is made when the packet is in the external memory 9.

【0110】5h10→5h13→5h12:5h10→5h12の条件でT
Sブロックに書き込みがある場合、5h13状態は終了後、
必ず5h12状態に遷移する。
5h10 → 5h13 → 5h12: T under the condition of 5h10 → 5h12
If there is a write in the S block, after the 5h13 state ends,
Be sure to transit to 5h12 state.

【0111】5h10→5h14:RM[RegC+] を「output」に
指定し、RM[]メモリ52が満量の場合に遷移する。
5h10 → 5h14: RM [RegC +] is designated as “output”, and transition is made when the RM [] memory 52 is full.

【0112】5h10→5h17:プログラムコードでサーチコ
マンドを用いたとき、サーチ処理終了後、5h10状態に自
動遷移してプログラム処理を再開する。
5h10 → 5h17: When a search command is used in the program code, after the search processing is completed, the state automatically transitions to the 5h10 state and the program processing is restarted.

【0113】これらの遷移は、(5h00 →5h01→) (5h00
→5h08→) 5h00→5h07→5h00→5h02→5h00→5h10→(5h1
7 →5h10、5h13→5h12→5h10、5h12→5h10、5h14→5h1
0) →5h00→5h14→5h00→5h08→5h00の順で発生する。
These transitions are (5h00 → 5h01 →) (5h00
→ 5h08 →) 5h00 → 5h07 → 5h00 → 5h02 → 5h00 → 5h10 → (5h1
7 → 5h10, 5h13 → 5h12 → 5h10, 5h12 → 5h10, 5h14 → 5h1
0) → 5h00 → 5h14 → 5h00 → 5h08 → 5h00.

【0114】ここで、(5h00 →5h01→) はシステムの起
動時にのみ発生する。また(5h00 →5h08→) は、時分割
処理するPIDストリームの数だけ繰り返し、初期状態
を保存しておく。(5h17 →5h10、5h13→5h12→5h10、5h
12→5h10、5h14→5h10) は順不同で繰り返し発生する。
Here, (5h00 → 5h01 →) occurs only when the system is started. (5h00 → 5h08 →) is repeated as many times as the number of PID streams to be subjected to time division processing, and the initial state is stored. (5h17 → 5h10, 5h13 → 5h12 → 5h10, 5h
12 → 5h10, 5h14 → 5h10) occur repeatedly in any order.

【0115】図11〜図18に、動作プログラムの機械
語コードの例を示す。
FIGS. 11 to 18 show examples of the machine language code of the operation program.

【0116】以上の構成において、データ解析部20の
サーチ部60は動作プログラムによるサーチコマンドに
応じて、予め指定されたサーチパターンを用いてTS[]
メモリ32に格納されているTSブロックのペイロード
をサーチしてパターンマッチングを行い、当該サーチパ
ターンと一致したビット列を検出した場合、当該ビット
列の末尾アドレスを当該TSブロックのローカルヘッダ
の「Match ptr 0 〜Match ptr 7 」に記入する。このと
きサーチ部60は、サーチパターンの対象となるビット
列がTSブロックにまたがって存在する場合を考慮して
サーチが行われたペイロードの末尾3[byte]を記憶して
おき、次のサーチ時には当該保存されている3[byte]を
含めてサーチを行う。
In the above configuration, the search section 60 of the data analysis section 20 uses the search pattern specified in advance by using TS [] according to the search command by the operation program.
When the pattern matching is performed by searching the payload of the TS block stored in the memory 32 and detecting a bit string that matches the search pattern, the end address of the bit string is set to “Match ptr 0 to” in the local header of the TS block. Fill in Match ptr 7 ". At this time, the search unit 60 stores the last 3 [bytes] of the searched payload in consideration of the case where the bit string targeted for the search pattern exists across the TS blocks, and stores the last 3 bytes in the next search. Search is performed including the stored 3 [bytes].

【0117】またサーチ部60は、TS[]メモリ32へ
のTSブロックの読み出しと同時にプリサーチを行い、
PESペイロードの先頭を示すpayload ptr から、あら
かじめパターンマッチングを行ってこの時の結果を保存
しておく。そしてTS[]メモリ32内のTSブロックに
対するサーチによって当該TSブロックがPESペイロ
ードのみで構成されていると判明した場合、プリサーチ
の結果をローカルヘッダに記入してサーチを終了する。
The search section 60 performs a pre-search simultaneously with reading of the TS block from the TS [] memory 32,
Pattern matching is performed in advance from the payload ptr indicating the beginning of the PES payload, and the result at this time is stored. If the TS block in the TS [] memory 32 is found to be composed of only the PES payload by searching the TS block, the result of the pre-search is entered in the local header and the search is terminated.

【0118】以上の構成によれば、TS[]メモリ32に
格納されているTSブロックのペイロードをサーチして
その結果をローカルヘッダに記入するとともに、TSブ
ロックの読み出しと同時にプリサーチを行ってその結果
を保存しておき、TSブロックがPESペイロードのみ
で構成されていると判明した場合、当該プリサーチの結
果をローカルヘッダに記入することにより、高速にサー
チを行うことができる。
According to the above configuration, the payload of the TS block stored in the TS [] memory 32 is searched, the result is written in the local header, and the pre-search is performed simultaneously with the reading of the TS block. When the result is stored and it is determined that the TS block is composed of only the PES payload, the search can be performed at high speed by writing the result of the pre-search in the local header.

【0119】[0119]

【発明の効果】上述のように本発明によれば、第2の記
憶手段に記憶されているパケットのデータと所定のビッ
トパターンをパターン照合手段で照合し、その結果を当
該パケットに記入するとともに、当該パケットが第2の
記憶手段に書き込まれる際に符号化データの先頭から予
めビットパターンの照合を行ってその照合結果を記憶し
ておき、当該パケットのペイロードが符号化データのみ
の場合は当該照合結果を当該パケットに記入することに
より、高速に解析を行うことができる。
As described above, according to the present invention, the packet data stored in the second storage means is compared with a predetermined bit pattern by the pattern matching means, and the result is written in the packet. When the packet is written in the second storage means, the bit pattern is collated from the beginning of the encoded data in advance and the collation result is stored, and if the payload of the packet is the encoded data only, The analysis can be performed at high speed by writing the collation result in the packet.

【図面の簡単な説明】[Brief description of the drawings]

【図1】スプライシング装置の構成を示すブロック図で
ある。
FIG. 1 is a block diagram illustrating a configuration of a splicing device.

【図2】TSパケットのPID別整理の状態を示す略線
図である。
FIG. 2 is a schematic diagram showing a state of organizing TS packets by PID.

【図3】TSブロックのデータフォーマットを示す略線
図である。
FIG. 3 is a schematic diagram illustrating a data format of a TS block.

【図4】PESパケットの分割状態を示す略線図であ
る。
FIG. 4 is a schematic diagram illustrating a divided state of a PES packet.

【図5】本発明の一実施の形態によるデータ解析部の構
成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a data analysis unit according to one embodiment of the present invention.

【図6】外部メモリの使用領域を示す略線図である。FIG. 6 is a schematic diagram illustrating a use area of an external memory.

【図7】TSメモリ制御部の構成を示すブロック図であ
る。
FIG. 7 is a block diagram illustrating a configuration of a TS memory control unit.

【図8】サーチ部の状態遷移を示す略線図である。FIG. 8 is a schematic diagram illustrating a state transition of a search unit.

【図9】プログラムコードの状態遷移を示す略線図であ
る。
FIG. 9 is a schematic diagram illustrating a state transition of a program code.

【図10】データ解析部の状態遷移を示す略線図であ
る。
FIG. 10 is a schematic diagram illustrating a state transition of a data analysis unit.

【図11】ジャンプ命令の機械語コードを示す表であ
る。
FIG. 11 is a table showing machine language codes of jump instructions.

【図12】定数ロードの機械語コードを示す表である。FIG. 12 is a table showing a machine language code for constant load.

【図13】定数ロードの機械語コードを示す表である。FIG. 13 is a table showing a machine language code for constant load.

【図14】演算 register − register の機械語コード
を示す表である。
FIG. 14 is a table showing machine language codes of operation register-register.

【図15】演算 register − register の機械語コード
を示す表である。
FIG. 15 is a table showing machine language codes of operation register-register.

【図16】演算 register − register の機械語コード
を示す表である。
FIG. 16 is a table showing machine language codes of operation register-register.

【図17】演算 register − immediateの機械語コード
を示す表である。
FIG. 17 is a table showing machine language codes of operation register-immediate;

【図18】演算 register − immediateの機械語コード
を示す表である。
FIG. 18 is a table showing machine language codes of operation register-immediate;

【符号の説明】[Explanation of symbols]

1……スプライシング装置、2……ホストコンピュー
タ、3……入力処理部、4……データ処理部、5……出
力処理部、6……CPU、7……データバス、8……ホ
ストバス、9……外部メモリ、10……インターフェー
ス部、20……データ解析部、22……演算器、23…
…ジャンプ先判定部、24……プログラムカウンタ、2
5……プログラムメモリ、26……プログラムデコー
ダ、27A、27B……演算器入力セレクタ、28……
書込パルス発生部、31……TSメモリ制御部、32…
…TS[]メモリ、33……レジスタA、34……SEG
レジスタ、41……GMメモリ制御部、42……GM[]
メモリ、43……レジスタB、41……RMメモリ制御
部、42……RM[]メモリ、53……レジスタC、56
……状態退避部、57……外部メモリ制御部、58……
入力セレクタ、59……出力セレクタ、60……サーチ
部。
DESCRIPTION OF SYMBOLS 1 ... Splicing apparatus, 2 ... Host computer, 3 ... Input processing part, 4 ... Data processing part, 5 ... Output processing part, 6 ... CPU, 7 ... Data bus, 8 ... Host bus, 9 external memory, 10 interface unit, 20 data analysis unit, 22 arithmetic unit, 23
... jump destination determination unit, 24 ... program counter, 2
5 Program memory, 26 Program decoder, 27A, 27B Computing unit input selector, 28
Write pulse generator, 31 ... TS memory controller, 32 ...
... TS [] memory, 33 ... register A, 34 ... SEG
Register, 41 ... GM memory control unit, 42 ... GM []
Memory, 43: Register B, 41: RM memory control unit, 42: RM [] memory, 53: Register C, 56
…… State saving unit, 57 …… External memory control unit, 58 ……
Input selector, 59 ... Output selector, 60 ... Search section.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) H04N 7/24 (72)発明者 北村 卓也 東京都品川区北品川6丁目7番35号ソニー 株式会社内 Fターム(参考) 5C059 KK39 MA00 RB02 RB10 RB16 RC01 RE01 SS02 UA38 5C063 AB03 AB07 AC01 AC10 CA23 CA34 5D110 BB20 CA05 CA14 CA17 CA50 CB06 CD16 CF11 CJ14 CK02 CM12 CM16 5K028 AA06 EE03 KK01 5K030 GA05 HA08 HB02 JA01 JT06 LA07 ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification symbol FI theme coat ゛ (Reference) H04N 7/24 (72) Inventor Takuya Kitamura 7-35 Kita Shinagawa, Shinagawa-ku, Tokyo Inside Sony Corporation F-term (reference) 5C059 KK39 MA00 RB02 RB10 RB16 RC01 RE01 SS02 UA38 5C063 AB03 AB07 AC01 AC10 CA23 CA34 5D110 BB20 CA05 CA14 CA17 CA50 CB06 CD16 CF11 CJ14 CK02 CM12 CM16 5K028 AA06 EE03 KK03 H01 GA07

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】所定のパケットが連続してなるトランスポ
ートストリームを解析して、当該各パケットのペイロー
ドにそれぞれ分割して割り当てられた符号化データに記
入されているパラメータを得るデータ解析装置におい
て、 上記トランスポートストリームを記憶する第1の記憶手
段と、 上記パケットを1パケット記憶する第2の記憶手段と、 所定の読み出し対象データを含む上記パケットを上記第
1の記憶手段から読み出して上記第2の記憶手段に記憶
し、上記読み出し対象データを当該第2の記憶手段から
読み出して出力する記憶手段の制御手段と、 上記読み出し対象データを演算して上記パラメータを得
る演算手段と、 上記第2の記憶手段に記憶されたパケットのデータと所
定のパラメータのビットパターンとを照合し、上記パケ
ットのデータと上記ビットパターンが一致した場合、当
該一致したデータの位置情報を、当該パケットに記入す
るパターン照合手段とを具えることを特徴とするデータ
解析装置。
1. A data analysis apparatus for analyzing a transport stream composed of a series of predetermined packets and obtaining parameters written in encoded data divided and assigned to payloads of the respective packets. A first storage unit that stores the transport stream; a second storage unit that stores one packet of the packet; and a second storage unit that reads out the packet including predetermined read target data from the first storage unit. Control means for a storage means for storing the read target data from the second storage means and outputting the read target data; calculating means for calculating the read target data to obtain the parameter; The packet data stored in the storage means is compared with the bit pattern of a predetermined parameter, and the packet If Doo data and the bit pattern is matched, the data analysis device characterized by comprising a location information of the matching data, and a pattern matching unit to fill out the packet.
【請求項2】上記パターン照合手段は、上記第2の記憶
手段に記憶されている上記パケットの末尾のデータを保
存しておき、当該第2の記憶手段に記憶された上記パケ
ットの次のパケットのビットパターンの照合時に、上記
末尾のデータを上記次のパケットの先頭に付加してビッ
トパターンを照合することにより、2つのパケットにま
たがったビットパターンを検出することを特徴とする請
求項1に記載のデータ解析装置。
2. The pattern matching means stores the data at the end of the packet stored in the second storage means, and stores a packet next to the packet stored in the second storage means. 2. A bit pattern extending over two packets is detected by adding the end data to the beginning of the next packet and checking the bit pattern when the bit pattern is compared. Data analysis device as described.
【請求項3】上記パターン照合手段は、上記パケットが
上記第1の記憶手段から上記第2の記憶手段に読み込ま
れる際に、上記符号化データの先頭位置を検出し、当該
先頭位置から予め上記ビットパターンを照合してその結
果を記憶しておき、上記第2の記憶手段に読み込まれた
上記パケットのペイロードが上記符号化データのみでな
る場合、当該記憶していた照合結果を当該パケットに記
入することを特徴とする請求項1に記載のデータ解析装
置。
3. The pattern matching means, when the packet is read from the first storage means to the second storage means, detects a leading position of the encoded data, and pre-determines the encoded data from the leading position. The bit pattern is collated and the result is stored, and when the payload of the packet read into the second storage means is composed of only the encoded data, the stored collation result is written in the packet. The data analysis apparatus according to claim 1, wherein the data analysis is performed.
【請求項4】所定のパケットが連続してなるトランスポ
ートストリームを解析して、当該各パケットのペイロー
ドにそれぞれ分割して割り当てられた符号化データに記
入されているパラメータを得るデータ解析方法におい
て、 上記トランスポートストリームを第1の記憶手段に記憶
し、 所定の読み出し対象データを含む上記パケットを上記第
1の記憶手段から読み出して第2の記憶手段に記憶し、 上記第2の記憶手段に記憶されたパケットのデータと所
定のパラメータのビットパターンとを照合し、上記パケ
ットのデータと上記ビットパターンが一致した場合、当
該一致したデータの位置情報を、当該パケットに記入す
ることを特徴とするデータ解析方法。
4. A data analysis method for analyzing a transport stream composed of a series of predetermined packets and obtaining parameters written in encoded data divided and assigned to payloads of the respective packets. The transport stream is stored in a first storage unit, the packet including predetermined read target data is read out from the first storage unit and stored in a second storage unit, and stored in the second storage unit. Comparing the data of the packet with the bit pattern of a predetermined parameter, and, when the data of the packet matches the bit pattern, writing position information of the matched data in the packet. analysis method.
JP11014499A 1999-04-16 1999-04-16 Device and method for analyzing data Pending JP2000307643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11014499A JP2000307643A (en) 1999-04-16 1999-04-16 Device and method for analyzing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11014499A JP2000307643A (en) 1999-04-16 1999-04-16 Device and method for analyzing data

Publications (1)

Publication Number Publication Date
JP2000307643A true JP2000307643A (en) 2000-11-02

Family

ID=14528168

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11014499A Pending JP2000307643A (en) 1999-04-16 1999-04-16 Device and method for analyzing data

Country Status (1)

Country Link
JP (1) JP2000307643A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009253507A (en) * 2008-04-03 2009-10-29 Sony Corp Information processing apparatus and method, and program
JP2009273065A (en) * 2008-05-11 2009-11-19 Nikon Systems Inc Method of analyzing data of digital broadcasting data, program, and digital broadcasting data analyzer
JP2011109365A (en) * 2009-11-17 2011-06-02 Renesas Electronics Corp Bit stream processing apparatus
JP2014511073A (en) * 2011-03-25 2014-05-01 コスモス Method and apparatus for extracting data from a data stream moving over an IP network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009253507A (en) * 2008-04-03 2009-10-29 Sony Corp Information processing apparatus and method, and program
JP2009273065A (en) * 2008-05-11 2009-11-19 Nikon Systems Inc Method of analyzing data of digital broadcasting data, program, and digital broadcasting data analyzer
JP2011109365A (en) * 2009-11-17 2011-06-02 Renesas Electronics Corp Bit stream processing apparatus
JP2014511073A (en) * 2011-03-25 2014-05-01 コスモス Method and apparatus for extracting data from a data stream moving over an IP network

Similar Documents

Publication Publication Date Title
KR0152916B1 (en) Data synchronization apparatus and method thereof
JPH11261958A (en) Video editing device and video editing method
JP4049863B2 (en) MPEG2 transport stream packet parser system
US6988238B1 (en) Method and system for handling errors and a system for receiving packet stream data
JP4201975B2 (en) Digital transport stream processing
US20150363161A1 (en) Method and apparatus for audio synchronization
US6453424B1 (en) System and method for temporally controlling instruction execution
US7366961B1 (en) Method and system for handling errors
US20080240093A1 (en) Stream multiplexer/de-multiplexer
EP1749266B1 (en) System and method to conditionally shrink an executable module
KR100831186B1 (en) Stream data processor
US7940799B2 (en) Code conversion method and device thereof
US6292887B1 (en) System and method for synchronizing instruction execution with external events
JP2000307643A (en) Device and method for analyzing data
US7433411B2 (en) Receiver, CPU and decoder with improved signal decoding
US5969763A (en) Decoding system for motion picture data
JP2000307642A (en) Device and method for analyzing data
JP2000307644A (en) Device and method for analyzing data
JP3874225B2 (en) Data processing apparatus and data processing method
US6625218B1 (en) Audio/video separator including a user data start address register
JP4136151B2 (en) Encoding apparatus, method, and computer-readable storage medium
JP2001308921A (en) Demultiplexer
van Kampenhout et al. Programming and analysing scenario-aware dataflow on a multi-processor platform
EP1027781B1 (en) Apparatus and method for depacketizing and aligning packetized input data
JP2000307533A (en) Data processor and data processing method