[go: up one dir, main page]

JP2006254039A - System decoder - Google Patents

System decoder Download PDF

Info

Publication number
JP2006254039A
JP2006254039A JP2005067028A JP2005067028A JP2006254039A JP 2006254039 A JP2006254039 A JP 2006254039A JP 2005067028 A JP2005067028 A JP 2005067028A JP 2005067028 A JP2005067028 A JP 2005067028A JP 2006254039 A JP2006254039 A JP 2006254039A
Authority
JP
Japan
Prior art keywords
data
unit
pes
section
packet
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
JP2005067028A
Other languages
Japanese (ja)
Inventor
Masayuki Koyama
雅行 小山
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2005067028A priority Critical patent/JP2006254039A/en
Publication of JP2006254039A publication Critical patent/JP2006254039A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Time-Division Multiplex Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To obtain a system decoder capable of achieving reduction in cost by performing data processing in a TS (transport stream) packet unit. <P>SOLUTION: A TS-IF part 5 synchronizes TSs and writes data in a memory 1 of 188-byte ×2. Then, a scrambling part 6 decodes scrambled data and writes the result in a memory 2 of 188-byte ×2. A DEMUX part 7 uses a PID value and additional information (α part) to filter a TS packet. Packet data that hit the filtering are decoded as data of a section type or PES (packetized elementary stream) system format on the basis of a data type and the result is written in a memory 3 of 188-byte ×2. After that, data extracted, separated and written in the memory 3 are written and temporarily stored in an external storage device (SDRAM) 4. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、DTV−S等に適用されるシステムデコーダの構成に関する。   The present invention relates to a configuration of a system decoder applied to DTV-S or the like.

MPEG方式で圧縮されたストリームの処理をするMPEGパケット処理装置であって、ストリームのTS(Transport Stream)解析部と、TS解析部の出力をデコードするPES(Packetized Elementary Stream)デコーダと、このPESデコーダの部分に記憶手段を設け、PESデコーダを単一化することを特徴としたMPEGパケット処理装置が、下記特許文献1に開示されている。   An MPEG packet processing apparatus for processing a stream compressed by the MPEG method, a TS (Transport Stream) analysis unit of the stream, a PES (Packetized Elementary Stream) decoder for decoding the output of the TS analysis unit, and the PES decoder Patent Document 1 below discloses an MPEG packet processing apparatus characterized in that a storage means is provided in this part and a PES decoder is unified.

特開2003−259366号公報JP 2003-259366 A

上記特許文献に開示された従来のMPEGパケット処理装置では、PESのデコード用に、専用の記憶手段が設けられている。ここで、TSパケットに比べてPESのデータ単位は一般に大規模になることが知られている。従って、PESデコード用の記憶手段をLSIに搭載すると、製造コストが高くなる。一方、LSIの外部に出すと、PESデコーダ専用のアクセスが必要となる。この場合、外部アクセスのバス帯域に余裕が無いことが多いため、バスの破綻を招く要因となる。また、TSパケット単位(188バイト単位)での処理ができないため、一時記憶するメモリ容量がPES単位になるなど、LSIに搭載するメモリ規模が大きくなり、LSIのコストの増大を招くという問題がある。   In the conventional MPEG packet processing apparatus disclosed in the above patent document, a dedicated storage means is provided for decoding the PES. Here, it is known that the data unit of PES is generally larger than that of TS packets. Therefore, if the storage means for PES decoding is mounted on an LSI, the manufacturing cost increases. On the other hand, when it goes out of the LSI, a dedicated access for the PES decoder is required. In this case, the bus band for external access often has no margin, which causes a bus failure. Further, since processing in TS packet units (188 byte units) cannot be performed, there is a problem that the memory capacity to be mounted on the LSI becomes large, such as temporarily storing memory capacity in PES units, leading to an increase in LSI cost. .

本発明はかかる問題を解決するために成されたものであり、TSパケット単位でデータ処理を行うことにより、コストの低減を実現し得るシステムデコーダを得ることを目的とする。   The present invention has been made to solve such a problem, and an object of the present invention is to obtain a system decoder that can realize cost reduction by performing data processing in units of TS packets.

第1の発明に係るシステムデコーダは、TS(Transport Stream)データを同期捕捉する同期捕捉部と、前記同期捕捉部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記同期捕捉部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第1の記憶部と、前記第1の記憶部の後段に接続され、前記第1の記憶部から読み出したTSデータに対してスクランブル解除処理を行うデスクランブル部と、前記デスクランブル部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記デスクランブル部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第2の記憶部と、前記第2の記憶部の後段に接続され、前記第2の記憶部から読み出した複数のTSデータの中から必要なTSデータを抽出分離する抽出分離部と、前記抽出分離部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記抽出分離部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第3の記憶部と、前記第3の記憶部の後段に接続され、前記第3の記憶部から読み出したTSデータを外部メモリに書き込む書き込み部とを備える、TSパケット単位での4段パイプライン構成のシステムデコーダである。   A system decoder according to a first aspect of the present invention is connected to a synchronization acquisition unit that synchronously acquires TS (Transport Stream) data and a subsequent stage of the synchronization acquisition unit, and each memory has a storage capacity corresponding to a data unit of TS data. And a first storage unit including a memory set that alternately performs a write operation and a read operation of TS data input from the synchronization acquisition unit, and is connected to a subsequent stage of the first storage unit, A descrambling unit that performs descrambling processing on the TS data read from the storage unit, and a subsequent stage of the descrambling unit, each memory having a storage capacity corresponding to a data unit of TS data, and A second storage unit including a memory set that alternately performs a write operation and a read operation of TS data input from the scramble unit and a subsequent stage of the second storage unit are connected. Connected to an extraction / separation unit that extracts and separates necessary TS data from a plurality of TS data read from the second storage unit, and a subsequent stage of the extraction / separation unit, and each memory is a TS data A third storage unit having a storage capacity equivalent to a unit and including a memory set that alternately performs a write operation and a read operation of TS data input from the extraction / separation unit; and a subsequent stage of the third storage unit And a writing unit for writing TS data read from the third storage unit to an external memory. The system decoder has a four-stage pipeline structure in units of TS packets.

第2の発明に係るシステムデコーダは、TS(Transport Stream)データを同期捕捉する同期捕捉部と、前記同期捕捉部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記同期捕捉部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第1の記憶部と、前記第1の記憶部の後段に接続され、前記第1の記憶部から読み出した複数のTSデータの中から必要なTSデータを抽出分離する抽出分離部と、前記抽出分離部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記抽出分離部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第2の記憶部と、前記第2の記憶部の後段に接続され、前記第2の記憶部から読み出したTSデータを外部メモリに書き込む書き込み部とを備える、TSパケット単位での3段パイプライン構成のシステムデコーダである。   A system decoder according to a second aspect of the present invention is connected to a synchronization acquisition unit that synchronously acquires TS (Transport Stream) data and a subsequent stage of the synchronization acquisition unit, and each memory has a storage capacity corresponding to a data unit of TS data. And a first storage unit including a memory set that alternately performs a write operation and a read operation of TS data input from the synchronization acquisition unit, and is connected to a subsequent stage of the first storage unit, An extraction / separation unit for extracting and separating necessary TS data from a plurality of TS data read from the storage unit, and a subsequent stage of the extraction / separation unit, each memory having a storage capacity corresponding to a data unit of TS data Including a memory set that alternately performs a write operation and a read operation of TS data input from the extraction / separation unit, and is connected to a subsequent stage of the second storage unit, A system decoder having a three-stage pipeline structure in units of TS packets, including a writing unit that writes TS data read from the second storage unit to an external memory.

第3の発明に係るシステムデコーダは、TS(Transport Stream)データを同期捕捉する同期捕捉部と、前記同期捕捉部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記同期捕捉部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第1の記憶部と、前記第1の記憶部の後段に接続され、前記第1の記憶部から読み出した複数のTSデータの中から必要なTSデータを抽出分離する抽出分離部と、前記抽出分離部の後段に接続され、前記抽出分離部から入力されたTSデータを外部メモリに書き込む書き込み部とを備える、TSパケット単位での2段パイプライン構成のシステムデコーダである。   A system decoder according to a third aspect of the present invention is connected to a synchronization acquisition unit that synchronously acquires TS (Transport Stream) data and a subsequent stage of the synchronization acquisition unit, and each memory has a storage capacity corresponding to a data unit of TS data. And a first storage unit including a memory set that alternately performs a write operation and a read operation of TS data input from the synchronization acquisition unit, and is connected to a subsequent stage of the first storage unit, An extraction / separation unit that extracts and separates necessary TS data from a plurality of TS data read from the storage unit, and is connected to a subsequent stage of the extraction / separation unit, and the TS data input from the extraction / separation unit is stored in an external memory. A system decoder having a two-stage pipeline structure in units of TS packets, including a writing unit for writing.

第1〜第3の発明に係るシステムデコーダによれば、TSパケット単位でデータ処理を行うことにより、コストの低減を図ることができる。   According to the system decoders of the first to third aspects, the cost can be reduced by performing data processing in units of TS packets.

まず、本発明の概要について説明する。   First, an outline of the present invention will be described.

本発明に係るシステムデコーダは、TS(Transport Stream)パケット単位で、ストリームの分離、指定データの抽出、及び外部メモリへの書き込みを行うことを特徴としている。PESのデータであることを判断し、PESのヘッダ部を削除する機能も搭載されているが、PESヘッダ部を一時記憶するためだけの12バイト程度のメモリを、PES系フィルタ数分のみ搭載する構成にしている。   The system decoder according to the present invention is characterized by performing stream separation, extraction of designated data, and writing to an external memory in units of TS (Transport Stream) packets. A function to determine that the data is PES data and delete the header part of the PES is also installed, but only about 12 bytes of memory for temporarily storing the PES header part is installed for the number of PES filters. It has a configuration.

TSパケット単位でデマルチプレクス処理(以下「Demux処理」と称す)を行うことで、必要となるワークメモリは188バイト単位のメモリのみとなる。この188バイトのデータから、抽出分離指定されているデータのみを外部メモリへ書き込む構成をとっている。この際、PES単位のデータを、ES(elementary stream)単位のデータへ変換する処理も実施している。これにより、PES単位でのデータ蓄積を行う必要がなくなり、PES単位のデータを一時記憶するメモリ、及びこのメモリへのアクセスを削除できることとなった。   By performing demultiplex processing (hereinafter referred to as “Demux processing”) in units of TS packets, the required work memory is only 188 bytes. From this 188-byte data, only the data designated for extraction / separation is written to the external memory. At this time, a process of converting data in PES units into data in ES (elementary stream) units is also performed. As a result, there is no need to accumulate data in units of PES, and the memory for temporarily storing data in units of PES and access to this memory can be deleted.

(1)第1の発明に係るシステムデコーダ
図1は、第1の発明に係るシステムデコーダ100aの構成を概略的に示すブロック図である。図1を参照して、TS−IF部5において、TSの同期をとり、188バイト×2個のメモリ1にデータを書き込む。次に、デスクランブル部6において、スクランブルされたデータの解読(デスクランブル)を行い、その結果を188バイト×2個のメモリ2へ書き込む。次に、DEMUX部7において、PID値と追加情報(α部分)とを用いて、TSパケットのフィルタリングを行う。このフィルタにヒットしたパケットデータは、データタイプによりSection系又はPES系フォーマットのデータとしてデコードされ、その結果が188バイト×2個のメモリ3へ書き込まれる。ここで、PES系データであった場合は、PESからESへのデコードも実施される。その後、抽出分離されてメモリ3へ書き込まれたデータは、外部記憶装置(SDRAM)4へ書き込まれて一時保持される。
(1) System Decoder According to the First Invention FIG. 1 is a block diagram schematically showing the configuration of the system decoder 100a according to the first invention. Referring to FIG. 1, TS-IF unit 5 synchronizes TS and writes data to 188 bytes × 2 memories 1. Next, the descrambling unit 6 decodes (descrambles) the scrambled data, and writes the result into the memory 2 of 188 bytes. Next, the DEMUX unit 7 filters TS packets using the PID value and additional information (α portion). The packet data that hits this filter is decoded as data in the Section or PES format depending on the data type, and the result is written to the memory 3 of 188 bytes × 2. Here, in the case of PES data, decoding from PES to ES is also performed. Thereafter, the data extracted and separated and written to the memory 3 is written to the external storage device (SDRAM) 4 and temporarily held.

図2は、システムデコーダ100aのパイプライン処理を示すタイミングチャートである。図2を参照して、システムデコーダ100aは、TSパケット単位での4段のパイプライン動作を行うことを特徴としている。詳細は後述の実施の形態1において説明するが、1段目はMPEG2−TSのストリーミングデータの同期を取るIFステージであり、2段目はデスクランブルを行うSステージであり、3段目はDemux処理を行うDステージであり、4段目はSDRAM4への書き込みを行うWステージである。   FIG. 2 is a timing chart showing pipeline processing of the system decoder 100a. Referring to FIG. 2, system decoder 100a is characterized by performing a four-stage pipeline operation in units of TS packets. Details will be described in the first embodiment described later. The first stage is an IF stage for synchronizing streaming data of MPEG2-TS, the second stage is an S stage for descrambling, and the third stage is a Demux. The D stage that performs processing, and the fourth stage is the W stage that performs writing to the SDRAM 4.

ここで、TSパケット単位とは、MPEG2−TSのデータ単位のことであり、188バイトとなる。システムデコーダ100aでは、188バイトのパケットデータの同期を取り、188バイトの2面メモリ1〜3へのデータの取り込みが完了するたびに、パイプライン処理が進められる。   Here, the TS packet unit is a data unit of MPEG2-TS and is 188 bytes. The system decoder 100a synchronizes the 188-byte packet data, and the pipeline process is advanced each time the data is taken into the 188-byte two-plane memories 1 to 3.

また、パイプライン動作はTSパケット単位なので、システムデコーダ100aに入力されるデータの入力レートに依存して、パイプラインの動作は変動する。換言すれば、188バイトのデータを全て受け取るまでの時間間隔の変動が、そのままパイプライン動作に反映される。   Since the pipeline operation is in units of TS packets, the pipeline operation varies depending on the input rate of data input to the system decoder 100a. In other words, the change in the time interval until all 188 bytes of data are received is directly reflected in the pipeline operation.

(2)第2の発明に係るシステムデコーダ
図3は、第2の発明に係るシステムデコーダ100bの構成を概略的に示すブロック図であり、図4は、システムデコーダ100bのパイプライン処理を示すタイミングチャートである。スクランブルが不要な用途では、Sステージを削除して、3段のパイプライン構成にすることができる。この場合、188バイトの2面メモリ2を1セット省略できる。図3,4に示すように、パイプラインは、3段から構成されている。1段目はMPEG2−TSのストリーミングデータの同期を取るIFステージであり、2段目はDemux処理を行うDステージであり、3段目はSDRAM4への書き込みを行うWステージである。
(2) System Decoder According to Second Invention FIG. 3 is a block diagram schematically showing the configuration of the system decoder 100b according to the second invention, and FIG. 4 is a timing showing pipeline processing of the system decoder 100b. It is a chart. For applications that do not require scrambling, the S stage can be deleted to provide a three-stage pipeline configuration. In this case, one set of the 188-byte two-plane memory 2 can be omitted. As shown in FIGS. 3 and 4, the pipeline is composed of three stages. The first stage is an IF stage that synchronizes MPEG2-TS streaming data, the second stage is a D stage that performs Demux processing, and the third stage is a W stage that performs writing to the SDRAM 4.

DステージとWステージとを分離することで、DステージでのDemux処理に必要とされるクロック数(所要時間)と、WステージでSDRAM4に書き込むまでに必要とされる所要時間とが分離されている。各ステージは1TSパケット期間となるため、最短でも約40μsecの期間が必要である。システムデコーダ100bの処理クロック周波数を100MHzとした場合、少なくとも約2000クロックをDemux処理に割り当てることが可能となる。第2の発明に係るDemux処理では、マルチセクション処理が最も処理サイクルを要し、最大1000クロック程度でDemux処理を終了するが、まだ十分な余裕がある。Wステージを設けているため、SDRAM4へのライトトランザクションで用いる外部バス競合待ち時間を含めた処理系に対する、待ち時間耐性が向上されている。   By separating the D stage and the W stage, the number of clocks (required time) required for the Demux processing at the D stage and the required time required for writing to the SDRAM 4 at the W stage are separated. Yes. Since each stage has a period of 1 TS packet, a period of at least about 40 μsec is required. When the processing clock frequency of the system decoder 100b is 100 MHz, at least about 2000 clocks can be assigned to the Demux processing. In the Demux process according to the second invention, the multi-section process requires the most processing cycle, and the Demux process is completed in about 1000 clocks at the maximum, but there is still sufficient margin. Since the W stage is provided, the waiting time tolerance for the processing system including the external bus contention waiting time used in the write transaction to the SDRAM 4 is improved.

なお、図3ではSDRAM4へアクセスするのはシステムデコーダ100bだけの場合を示しているが、実際には、ほかにもSDRAM4にアクセスするブロックが多数存在するため、システムデコーダ100bがアクセスできるバス帯域は非常に限られたものになる。この限られたバス帯域でも、SDRAM4へのライトトランザクションが破綻しないように、SDRAM4への書き込み期間のためだけにWステージが設けられている。   Although FIG. 3 shows the case where only the system decoder 100b accesses the SDRAM 4, there are actually many other blocks that access the SDRAM 4, so the bus bandwidth accessible by the system decoder 100b is as follows. It will be very limited. The W stage is provided only for the writing period to the SDRAM 4 so that the write transaction to the SDRAM 4 does not fail even in this limited bus band.

(3)第3の発明に係るシステムデコーダ
図5は、第3の発明に係るシステムデコーダ100eの構成を概略的に示すブロック図であり、図6は、システムデコーダ100eのパイプライン処理を示すタイミングチャートである。SDRAM4へのアクセスするのがシステムデコーダ100eだけである場合、又は、システムデコーダ100eから発行されるライトトランザクションが最優先で処理されることが分かっている場合は、Wステージも不要となる。この場合、Dステージで抽出分離したデータを、そのままDステージの期間内にSDRAM4へ書き込むことができる。一方、Demux処理には1500クロック程度のクロック数が必要となるため、少なくともIFステージ及びDステージは個別に設ける必要がある。従って、第3の発明に係るシステムデコーダ100eにおけるパイプライン構成は、図6に示すように2段となる。1段目はMPEG2−TSのストリーミングデータの同期を取るIFステージであり、2段目はDemux処理及びSDRAM4への書き込みを行うDステージである。
(3) System Decoder According to Third Invention FIG. 5 is a block diagram schematically showing the configuration of the system decoder 100e according to the third invention, and FIG. 6 is a timing showing pipeline processing of the system decoder 100e. It is a chart. If only the system decoder 100e has access to the SDRAM 4, or if it is known that the write transaction issued from the system decoder 100e is processed with the highest priority, the W stage is also unnecessary. In this case, the data extracted and separated at the D stage can be directly written into the SDRAM 4 within the period of the D stage. On the other hand, since the number of clocks of about 1500 clocks is required for the Demux process, at least the IF stage and the D stage must be provided separately. Accordingly, the pipeline configuration in the system decoder 100e according to the third aspect of the invention is two stages as shown in FIG. The first stage is an IF stage for synchronizing MPEG2-TS streaming data, and the second stage is a D stage for performing Demux processing and writing to the SDRAM 4.

(4)不連続PCR受信時のタイムスタンプの無効化処理
通常、システムデコーダには、デコード時刻を管理するための時計が装備されている。この時計は、MPEG2−TSに埋め込まれているPCR(Program Clock Reference)と呼ばれる時刻データを基準に時刻を更新している時計である。MPEG2−TSで送られてくるビデオES及びオーディオESには、タイムスタンプ(PTS/DTS)と呼ばれる時刻情報が付加されていて、このタイムスタンプ値とシステムデコーダの時計とが一致すれば、ビデオES及びオーディオESを、システムデコーダから出力する動作が行われる。
(4) Time stamp invalidation processing at the time of discontinuous PCR reception Normally, the system decoder is equipped with a clock for managing the decoding time. This clock is a clock whose time is updated based on time data called PCR (Program Clock Reference) embedded in MPEG2-TS. Time information called a time stamp (PTS / DTS) is added to the video ES and audio ES sent in MPEG2-TS, and if the time stamp value matches the clock of the system decoder, the video ES The audio ES is output from the system decoder.

ここで、このタイムスタンプ値は、SDRAM4に蓄えられているフレームデータ単位にそれぞれ対応している。また、同時に複数個の時計(STC:System Time Clock)を扱う場合には、複数の時間軸上のタイムスタンプ(PCR_PID毎に対応、分類されたタイムスタンプ)として管理されている。   Here, this time stamp value corresponds to each frame data unit stored in the SDRAM 4. When a plurality of clocks (STC: System Time Clock) are handled at the same time, they are managed as a plurality of time stamps (time stamps corresponding and classified for each PCR_PID) on the time axis.

この状態で、不連続PCRを受信すると、まず、どのPID対応のPCRが不連続であるかを確認する。その後、格納しているビデオ、オーディオのタイムスタンプ値のうち、不連続となったPCRに対応するビデオ、オーディオのタイムスタンプ値のバリッドビットを0にクリアする。   When discontinuous PCR is received in this state, first, it is confirmed which PID-compatible PCR is discontinuous. Thereafter, the valid bit of the time stamp value of the video and audio corresponding to the discontinuous PCR among the stored video and audio time stamp values is cleared to 0.

AV同期ES出力部では、システムデコーダから出力しようとしているESデータに対応したタイムスタンプ値と、対応するSTCとの比較が行われる。この際、タイムスタンプ値のバリッドビットがセット(値が1)されていれば、ES出力を行う際に、STCとタイムスタンプ値との比較を行うことで、ES出力制御が行われる。一方、タイムスタンプ値のバリッドビットがクリア(値が0)されていれば、ES出力を行う際に、STCとタイムスタンプ値との比較を行わず、ES出力が行われる。   The AV synchronous ES output unit compares the time stamp value corresponding to the ES data to be output from the system decoder with the corresponding STC. At this time, if the valid bit of the time stamp value is set (value is 1), the ES output control is performed by comparing the STC with the time stamp value when performing ES output. On the other hand, if the valid bit of the time stamp value is cleared (value is 0), the ES output is performed without comparing the STC with the time stamp value when performing ES output.

このタイムスタンプ値のクリア処理により、不連続PCR(時刻が数分間分巻き戻る等の場合)を受信した後においても、システムデコーダからのES出力が停止(数分間停止)する事態が回避される。   This time stamp value clear process avoids a situation where ES output from the system decoder stops (stops for several minutes) even after receiving discontinuous PCR (when the time is rewound for several minutes, etc.). .

実施の形態1.
(1)システムデコーダ100aの基本構成
図7は、本発明の実施の形態1に係るシステムデコーダ100aの前半処理部の構成を示すブロック図である。図7に示すように、システムデコーダ100aの前半処理部は、MPEG2−TS入力を受けて188バイトの同期をとるTS−IF部5と、TS−IF部5の出力を受けて暗号を解読するデスクランブル部6と、デスクランブル部6の出力を受けてDemux処理を行うDEMUX部7と、DEMUX部7から出力されたデータをSDRAM4に書き込むMediaI/F部8とを備えて構成されている。MediaI/F部8は、書き込み部8aとMediaBusI/F部8bとを有している。
Embodiment 1 FIG.
(1) Basic Configuration of System Decoder 100a FIG. 7 is a block diagram showing the configuration of the first half processing unit of the system decoder 100a according to Embodiment 1 of the present invention. As shown in FIG. 7, the first half processing unit of the system decoder 100a receives the MPEG2-TS input and synchronizes with the TS-IF unit 5 that synchronizes 188 bytes, and receives the output of the TS-IF unit 5 and decrypts the cipher. A descrambling unit 6, a DEMUX unit 7 that receives the output of the descrambling unit 6 and performs Demux processing, and a Media I / F unit 8 that writes data output from the DEMUX unit 7 to the SDRAM 4 are configured. The Media I / F unit 8 includes a writing unit 8a and a MediaBus I / F unit 8b.

まず、システムデコーダ100aにおけるTSパケット単位でのパイプライン構成を説明し、その後、PESデコーダまで含めたDemux処理を可能としているアーキテクチャについて説明する。   First, a pipeline configuration in units of TS packets in the system decoder 100a will be described, and then an architecture that enables Demux processing including the PES decoder will be described.

(2)システムデコーダ100aのパイプライン構成
システムデコーダ100aのTSパケット単位でのパイプライン動作としては、TS−IF部5の後段に片面188バイトの2面メモリ1を配備し、IFステージを構成している。
(2) Pipeline configuration of system decoder 100a As a pipeline operation in units of TS packets of the system decoder 100a, a two-sided memory 1 of 188 bytes on one side is arranged at the rear stage of the TS-IF unit 5 to configure an IF stage. ing.

IFステージでは、以下の処理が行われる。   In the IF stage, the following processing is performed.

入力クロック(TSCLK)と共に送られてくるMPEG2−TSデータ(TSDATA)を、TSCLKで取り込む。この際、TSDATAと同時に送られてくるデータバリッド(TSVALID)を参照し、有効なデータである場合にのみ取り込みを行う。また、取り込み単位は、1バイト単位又は1ビット単位となり、選択が可能である。   MPEG2-TS data (TSDATA) sent together with the input clock (TSCLK) is captured by TSCLK. At this time, the data valid (TSVALID) sent simultaneously with TSDATA is referred to, and the data is taken in only when it is valid data. In addition, the capture unit can be selected in units of 1 byte or 1 bit.

MPEG2−TSパケットの先頭データである「47」コードを検索し、188バイト毎に「47」コードが存在することを確認し、同期捕捉を行う。   The “47” code which is the head data of the MPEG2-TS packet is searched, and it is confirmed that the “47” code exists every 188 bytes.

同期捕捉候補処理を高速化させるため、独立で動作する複数個のカウンタを搭載し、複数個の同期捕捉候補を扱う。いずれかの同期捕捉候補の同期捕捉が成立した段階で、他の同期捕捉候補をキャンセルする。   In order to speed up the synchronization acquisition candidate processing, a plurality of counters that operate independently are mounted to handle a plurality of synchronization acquisition candidates. When the synchronization acquisition of any one of the synchronization acquisition candidates is established, the other synchronization acquisition candidates are canceled.

同期捕捉が成立すると、MPEG2−TSパケットのデータを、先頭の「47」コードから順に、188バイトのメモリ1に格納し始める。   When synchronization acquisition is established, data of the MPEG2-TS packet starts to be stored in the 188-byte memory 1 in order from the first “47” code.

188バイトのメモリ1は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 1 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

デスクランブル部6の後段にも片面188バイトの2面メモリ2を配備し、Sステージを構成している。   A two-sided memory 2 of 188 bytes on one side is also arranged at the subsequent stage of the descramble unit 6 to constitute an S stage.

Sステージでは、以下の処理が行われる。   In the S stage, the following processing is performed.

IFステージの後段に設けられている188バイトの2面メモリ1のうち、書き込みが終了している面からMPEG2−TSデータを順次読み出す。   The MPEG2-TS data is sequentially read from the side where writing has been completed in the two-sided memory 1 of 188 bytes provided after the IF stage.

スクランブル解除指定のPIDを持っているMPEG2−TSパケットであるか否かの判定を実施する。   It is determined whether the packet is an MPEG2-TS packet having a descrambling designation PID.

スクランブル解除指定のPIDを持っているMPEG2−TSパケットであった場合は、MPEG2−TSパケットのPayloadに対して、スクランブル解除処理を実施する。   In the case of an MPEG2-TS packet having a PID for descrambling designation, a descrambling process is performed on the payload of the MPEG2-TS packet.

1バイト単位に複数クロックかけてデスクランブル処理を行うことにより、188バイトのデータのスクランブル解除処理を行う。   By performing descrambling over a plurality of clocks in units of 1 byte, descrambling of 188 bytes of data is performed.

スクランブル解除されたデータを、MPEG2−TSの先頭バイトから、188バイトのメモリ2に格納し始める。   The descrambled data starts to be stored in the 188-byte memory 2 from the first byte of MPEG2-TS.

188バイトのメモリ2は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 2 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

デスクランブル処理対象外のMPEG2−TSデータである場合は、スクランブル解除処理を実施しないで、188バイトのメモリ2へ書き込む。例えば、TSパケットのヘッダ情報や、PIDで指定されていないMPEG2−TSパケットの場合は、スクランブル解除処理を実施しないで、188バイトのメモリ2へ書き込まれる。   In the case of MPEG2-TS data that is not subject to descrambling processing, the descrambling processing is not performed and the data is written into the 188-byte memory 2. For example, header information of a TS packet or an MPEG2-TS packet not specified by PID is written to the 188-byte memory 2 without performing the descrambling process.

デスクランブル処理対象外のデータは、デスクランブル処理対象のデータと同じレイテンシとする。換言すれば、MPEG2−TSデータのデスクランブル部6を通過する時間は、デスクランブル処理を実施した場合も実施しなかった場合も、いずれも同じ所要時間となる。   The data not subject to descrambling processing has the same latency as the data subject to descrambling processing. In other words, the time required for the MPEG2-TS data to pass through the descrambling unit 6 is the same required time regardless of whether or not the descrambling process is performed.

さらに、DEMUX部7の後段にも片面188バイトの2面メモリ3a〜3cを配備し、Dステージを構成している。   Further, a single-sided 188-byte two-sided memory 3a to 3c is also provided at the subsequent stage of the DEMUX unit 7 to constitute a D-stage.

Dステージでは、以下の処理が行われる。   In the D stage, the following processing is performed.

デスクランブルステージの後段に設けられている188バイトの2面メモリ2のうち、書き込みが終了している面から、スクランブル解除されたMPEG2−TSデータを順次読み出す。   The scrambled MPEG2-TS data is sequentially read from the 188-byte two-sided memory 2 provided at the subsequent stage of the descrambling stage from the side where the writing has been completed.

読み出したMPEG2−TSパケットデータのうち、TSヘッダ部と、もし存在すればアダプテーション領域の制御データを、TS解析用レジスタ7a1に順次セットする。   Among the read MPEG2-TS packet data, the TS header portion and, if present, the control data of the adaptation area are sequentially set in the TS analysis register 7a1.

この読み出しアドレスは、MPEG2−TSパケットの188バイトのうち、どのバイトを読み出しているかの識別に用いられる。   This read address is used to identify which one of the 188 bytes of the MPEG2-TS packet is being read.

DステージでのMPEG2−TS解析、抽出分離のベースは、上記188バイトの2面メモリ2からの読み出しアドレスと、上記TS解析用レジスタ7a1の値とを参照し、MPEG2−TSパケットのデータ構造の解析が進められる。   The base of MPEG2-TS analysis and extraction / separation at the D stage refers to the read address from the 188-byte two-sided memory 2 and the value of the TS analysis register 7a1, and the data structure of the MPEG2-TS packet Analysis proceeds.

2面メモリ2からの読み出しアドレスが、PIDを読み出し終了時点まで進んだ段階で、抽出分離指定されているPIDであるかどうかの判定が行われる。   At the stage where the read address from the two-plane memory 2 has advanced to the end of reading the PID, it is determined whether or not the PID has been designated for extraction and separation.

このPID判定では、セクション系かPES系か、PES系である場合は、独立PES系か、オーディオ系か、ビデオ系かの判定が行われる。   In this PID determination, if it is a section system, a PES system, or a PES system, it is determined whether it is an independent PES system, an audio system, or a video system.

トランスポートスクランブルコントロール、アダプテーションフィールドコントロール、コンティニュティカウンター値を、TS解析用レジスタ7a1にセットする。   The transport scramble control, adaptation field control, and continuity counter value are set in the TS analysis register 7a1.

コンティニュティカウンター値とアダプテーションフィールドコントロール値とをチェックし、廃棄対象のペイロードを持ったMPEG2−TSパケットであるかどうかの判定と、アダプテーション領域の有無、ペイロードの有無が判断される。   The continuity counter value and the adaptation field control value are checked to determine whether the packet is an MPEG2-TS packet having a payload to be discarded, whether there is an adaptation area, and whether there is a payload.

次に、アダプテーションフィールドが存在する場合は、引き続きTS解析用レジスタ7a1にアダプテーション領域のデータをセットする。   Next, if there is an adaptation field, the data in the adaptation area is continuously set in the TS analysis register 7a1.

アダプテーション領域の先頭はアダプテーションレングスであり、このレングスをチェックして、その値が0でなければ、アダプテーションレングス値をアダプテーションレングスカウンタへセットし、ダウンカウントを開始する。アダプテーションレングスが0である場合は、次のバイトは、セクション系データの場合はポインタフィールドとなり、PES系データの場合はPESの先頭バイトであると判断する。   The beginning of the adaptation area is the adaptation length, and this length is checked. If the value is not 0, the adaptation length value is set in the adaptation length counter, and down-counting is started. When the adaptation length is 0, it is determined that the next byte is a pointer field in the case of section data, and the first byte of the PES in the case of PES data.

アダプテーションレングスが0でない場合は、次のバイトが、PCRフラグ(PCRを含んだMPEG2−TSパケットかどうかの識別子)とか、含んでいるPCRが不連続PCRであるかどうかの識別子であるディスコンティニュティインディケータを、TS解析用レジスタ7a1にセットする。   If the adaptation length is not 0, the next byte includes a PCR flag (identifier indicating whether the packet is an MPEG2-TS packet including PCR) or a discontinuity indicating whether the included PCR is a discontinuous PCR. The tee indicator is set in the TS analysis register 7a1.

PCRフラグで、PCRがあることが判明すれば、PCRの抽出を行う。この時、システムデコーダ100aの時計であるSTCへPCR値をロードするか否かは、PCRのロード制御レジスタ値によって制御される。   If the PCR flag indicates that there is a PCR, the PCR is extracted. At this time, whether or not to load the PCR value to the STC which is the clock of the system decoder 100a is controlled by the load control register value of the PCR.

ディスコンティニュティインディケータがセットされていれば、MPEG2−TSパケットに含まれているPCRが、不連続PCRであると判断する。不連続PCRのSTCへのロード制御は、PCRのロード制御レジスタ値によって制御される。   If the discontinuity indicator is set, it is determined that the PCR included in the MPEG2-TS packet is a discontinuous PCR. The load control of the discontinuous PCR to the STC is controlled by the PCR load control register value.

不連続PCRのSTCへのロードは、SDRAM4に既に蓄えられているビデオES、オーディオESのタイムスタンプ値との関係が不連続になることも意味しているので、既に蓄えられているAVフレームデータ(ビデオES/オーディオES)に対応したタイムスタンプのValidビットを無効化する。ここで、このValidビットは、タイムスタンプ値が有効か無効かの識別に用いられる。有効な場合は、システムデコーダ100aからフレームデータを出力すべき時刻まで待たせる処理を行う時に、STCとの比較に用いるタイムスタンプ値として利用される。無効な場合は、出力すべき時刻まで待たせる処理は行われない。   The loading of the discontinuous PCR into the STC also means that the relationship with the time stamp values of the video ES and audio ES already stored in the SDRAM 4 becomes discontinuous, so that the AV frame data already stored is stored. The valid bit of the time stamp corresponding to (video ES / audio ES) is invalidated. Here, the Valid bit is used for identifying whether the time stamp value is valid or invalid. When it is valid, it is used as a time stamp value used for comparison with the STC when processing is performed to wait until the frame data is output from the system decoder 100a. If it is invalid, the process for waiting until the time to be output is not performed.

アダプテーションフィールドが終了すると、PIDフィルタリングの結果が、セクション系であるか、PES系であるかで、処理が分岐される。   When the adaptation field ends, the process branches depending on whether the PID filtering result is a section system or a PES system.

TSヘッダ部のユニットスタートインディケータがセットされている場合は、セクション系の場合はセクションの先頭データを含むため、ペイロードの前に1バイトのポインタフィールドがあると判断される。また、PES系の場合はペイロードの先頭からPESデータが格納されていると判断される。   When the unit start indicator of the TS header is set, it is determined that there is a 1-byte pointer field in front of the payload because the section head includes section start data. In the case of the PES system, it is determined that PES data is stored from the beginning of the payload.

セクション系の場合は、セクション解析用レジスタ7a2に、セクションヘッダ部がセットされる。   In the case of a section system, a section header part is set in the section analysis register 7a2.

セクションの先頭バイトはテーブルIDである。セクションのフィルタリングは、セクションヘッダ部が揃ってから実施されるが、テーブルIDでMPEG2−TSパケットが終了する場合もある。この場合は、PIDとテーブルIDとでのフィルタリングを実施し、継続フラグが立っているかどうかを確認した後、継続フラグがセットされていなければ、セクション用フィルタのどの番号のフィルタでMPEG2−TSパケットを跨いだセクションを受信したかを記憶しておくための継続フラグをセットする。   The first byte of the section is a table ID. Section filtering is performed after the section headers are aligned, but the MPEG2-TS packet may end with a table ID. In this case, filtering by PID and table ID is performed and it is confirmed whether or not the continuation flag is set. Sets a continuation flag for storing whether or not a section straddling has been received.

ここで、継続フラグは、全てのフィルタに対で装備される。   Here, the continuation flag is provided in pairs for all the filters.

継続フラグのクリアは、継続フラグがセットされているフィルタにヒットしたMPEG2−TSパケットに格納されている、TSヘッダ部のユニットスタートインディケータが1であった場合に実施する。このMPEG2−TSパケットで継続してきたセクションが終了し、新たなセクションが格納されていると判断し、継続フラグがクリアされる。   The continuation flag is cleared when the unit start indicator in the TS header portion stored in the MPEG2-TS packet that hits the filter for which the continuation flag is set is 1. The section continued in the MPEG2-TS packet ends, and it is determined that a new section is stored, and the continuation flag is cleared.

ここで、MPEG2−TSパケットが、セクションヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、セクション解析用レジスタ7a2は、レジスタセットとしてセクションフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the section header portion, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the section analysis register 7a2 is a section filter as a register set. Installed for a few minutes.

PES系の場合、PES解析用レジスタ7a3に、PESヘッダ部がセットされる。   In the case of the PES system, the PES header portion is set in the PES analysis register 7a3.

PESヘッダの先頭は、パケットスタートコードプリフィックスの固定コード「000001」となっている。PESヘッダの先頭から8バイト目がPTSDTSフラグ(PTS,DTSであるタイムスタンプを含んでいるか否かの識別子)であり、タイムスタンプを含んでいる場合は、抽出を行う予定とされる。   The head of the PES header is a fixed code “000001” of the packet start code prefix. The 8th byte from the beginning of the PES header is a PTSDTS flag (an identifier indicating whether or not a time stamp that is PTS or DTS is included). If the time stamp is included, extraction is scheduled to be performed.

次のバイトがPESヘッダ長であり、PESヘッダ長の値が0でない場合は、PESヘッダ長ダウンカウンタに値がセットされ、ダウンカウントが行われる。   When the next byte is the PES header length and the value of the PES header length is not 0, a value is set in the PES header length down counter, and down counting is performed.

PESヘッダ長のダウンカウントが終了した時点に、ESデータの先頭バイトが存在する。   At the time when the PES header length down-count is completed, the first byte of the ES data exists.

ESデータの抽出では、このPESヘッダ部の削除処理を実施することで、ES抽出が実現される。   In the extraction of ES data, the ES extraction is realized by performing the deletion process of the PES header part.

MPEG2−TSパケットが、PESヘッダ部の途中で終了した場合は、PESヘッダ部のどのバイトから再開すればよいかは、PESヘッダ長のダウンカウンタ値と、継続フラグとによって判別されることとなる。   When the MPEG2-TS packet ends in the middle of the PES header part, it is determined from the PES header length down counter value and the continuation flag which byte of the PES header part should be resumed. .

ここで、MPEG2−TSパケットが、PESヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、PESヘッダ解析用レジスタ7a3は、レジスタセットとして、PID設定できるPESフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the PES header part, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the PES header analysis register 7a3 is a register set. There are as many PES filters as PID setting.

セクション系、PES系いずれの場合も、188バイトのメモリ2からの読み出しアドレスで、MPEG2−TSパケットのどのバイトを処理しているか、MPEG2−TSの終了を認識し、継続フラグをセットするか否かの判定が行われる。   Whether the section system or the PES system is used, the 188-byte read address from the memory 2 indicates which byte of the MPEG2-TS packet is being processed, recognizes the end of the MPEG2-TS, and sets the continuation flag. Is determined.

その後、MediaI/F部8からSDRAM4への書き込みが、SDRAM書き込みステージ(Wステージ)となる。   Thereafter, the writing from the Media I / F unit 8 to the SDRAM 4 becomes the SDRAM writing stage (W stage).

Wステージでは、以下の処理が行われる。   In the W stage, the following processing is performed.

Dステージの後段に設けられている188バイトの2面メモリ3a〜3cのうち、書き込みが終了している面のデータが、SDRAM4へ書き込まれる。   Of the two-sided memories 3a to 3c of 188 bytes provided at the subsequent stage of the D stage, the data on the surface where writing has been completed is written into the SDRAM 4.

書き込み単位は、セクション、PES、ESいずれも、MPEG2−TSパケットの188バイトから抽出分離したデータ単位となる。ここで、セクションの場合は、13バイトのものもあり、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、14個となる。PES系の場合、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、1個となる。これは、PES系の場合は一つのMPEG2−TSパケットに複数個のPESパケットが格納されていることがないためである。   The writing unit is a data unit extracted and separated from 188 bytes of the MPEG2-TS packet for all sections, PES, and ES. Here, some sections have 13 bytes, and the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is 14. In the case of the PES system, the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is one. This is because in the case of the PES system, a plurality of PES packets are not stored in one MPEG2-TS packet.

Wステージの期間内に、SDRAM4への書き込みが終了しない場合は、188バイトの2面メモリ3a〜3cが破綻するので、バスエラー割り込みが発生される。   If the writing to the SDRAM 4 is not completed within the period of the W stage, the bus error interrupt is generated because the 188-byte two-plane memories 3a to 3c fail.

これら各ステージに存在する2面メモリ1,2,3a〜3cで、TSパケット単位(188バイト単位)のパイプライン動作が区切られている。以上が、システムデコーダ100aの前半処理部となる。システムデコーダ100aの前半処理部の4段パイプライン動作は、図2に示した通りである。   Pipeline operations in units of TS packets (in units of 188 bytes) are divided by the two-plane memories 1, 2, 3a to 3c existing in these stages. The above is the first half processing unit of the system decoder 100a. The four-stage pipeline operation of the first half processing unit of the system decoder 100a is as shown in FIG.

(3)システムデコーダ100aの後半処理部
図8は、システムデコーダ100aの後半処理部の基本構成を示すブロック図である。システムデコーダ100aの後半処理部では、SDRAM4に書き込まれたデータが読み出され、AV同期をとって、システムデコーダ100aから出力される。ここで、SDRAM4からの読み出し以降の処理は、TSパケット単位のパイプライン動作とは無関係に動作する。
(3) Second Half Processing Unit of System Decoder 100a FIG. 8 is a block diagram showing the basic configuration of the second half processing unit of the system decoder 100a. In the latter half processing unit of the system decoder 100a, the data written in the SDRAM 4 is read out and output from the system decoder 100a with AV synchronization. Here, the processing after reading from the SDRAM 4 operates independently of the pipeline operation in units of TS packets.

(4)Demux処理
(4−1)DEMUX部7の構成
以下、主にPESデコーダからES抽出処理を含めたDemux処理について説明する。ここでは、DEMUX部7のDステージの動作説明を行う。Dステージには、PIDフィルタ動作部7b、TS解析部7a、Section解析部7a2、PES解析部7a3、及び分離結果を一時記憶しておくためのSRAM部3a〜3cがある。図9は、Dステージ及びWステージの動作を示すタイミングチャートである。
(4) Demux Processing (4-1) Configuration of DEMUX Unit 7 Demux processing including mainly ES extraction processing from the PES decoder will be described below. Here, the operation of the D stage of the DEMUX unit 7 will be described. The D stage includes a PID filter operation unit 7b, a TS analysis unit 7a, a Section analysis unit 7a2, a PES analysis unit 7a3, and SRAM units 3a to 3c for temporarily storing separation results. FIG. 9 is a timing chart showing the operations of the D stage and the W stage.

(4−2)DEMUX部7の処理
デスクランブル部6の後段に接続されている2面メモリ2から、TSパケットデータが1パケット分(0バイト目から187バイト目まで)読み出される。この読み出しのアドレスで、TSパケットの先頭から何番目のデータであるかが識別される。このTSパケットは、読み出しアドレス値に応じて、TS解析部7aに設けられているレジスタ7a1に格納される。TS解析部7aで格納対象とされているTSデータは、TSヘッダ部のデータと、アダプテーションに相当するデータの一部、及び、セクションの場合はポインタフィールドが保持される。
(4-2) Processing of DEMUX Unit 7 TS packet data for one packet (from the 0th byte to the 187th byte) is read from the two-plane memory 2 connected to the subsequent stage of the descrambling unit 6. This read address identifies the number of data from the beginning of the TS packet. The TS packet is stored in a register 7a1 provided in the TS analysis unit 7a according to the read address value. The TS data to be stored in the TS analysis unit 7a holds data in the TS header part, a part of data corresponding to adaptation, and a pointer field in the case of a section.

ここで、TS解析部7aのレジスタ7a1にPIDまでの情報が書き込まれた段階で、TSパケットの種別の大分類(セクションか、ビデオか、オーディオか、独立PESか)が行われる。この結果によって、セクション系かPES系(ビデオ、オーディオ、独立PES)かの識別が可能である。この結果を利用して、セクション解析部のレジスタ7a2を用いるのか、PES解析部のレジスタ7a3を用いるのかが判断される。   Here, when the information up to the PID is written in the register 7a1 of the TS analysis unit 7a, the classification of TS packet types (section, video, audio, or independent PES) is performed. Based on this result, it is possible to identify the section system or the PES system (video, audio, independent PES). Using this result, it is determined whether to use the register 7a2 of the section analysis unit or the register 7a3 of the PES analysis unit.

PES系であった場合、このPES解析部のレジスタ7a3に、PESヘッダに対応する情報のうち必要な部分(PES先頭から13バイトで、PESヘッダ長を含む)のみが格納される。ここで、アダプテーションのサイズによっては、PESのヘッダがTSパケットの単位(188バイト)よりも大きい場合があり得る。従って、PESデコードを行うフィルタ数分のレジスタ7a3が搭載されており、各レジスタ7a3は、書き込んだ位置を把握できるPESヘッダライトポインタを有している。TSパケットを跨いだ場合は、このPESヘッダライトポインタが停止される。ここで、TSパケットが終了するまでにPESヘッダ長のダウンカウンタ値が終了しなかった場合には、PESヘッダ部でTSパケットを跨ったことになる。一方、TSパケットが終了するまでにPESヘッダ長のダウンカウンタが終了した場合には、PESヘッダ部以降でTSパケットを跨いだことになる。PESヘッダ長のダウンカウンタ終了時点で、PESヘッダライトポインタはクリアされる。継続して受信再開する場合の動作は、PIDでのフィルタヒット判定と、PID別で管理しているPESヘッダライトポインタとを参照することで、PESヘッダの情報抽出を再開可能となる。なお、PESはPIDのみでフィルタリングが可能なため、特に継続フラグは必要ない。   In the case of the PES system, only the necessary portion (13 bytes from the beginning of the PES and including the PES header length) of the information corresponding to the PES header is stored in the register 7a3 of the PES analysis unit. Here, depending on the size of the adaptation, the PES header may be larger than the TS packet unit (188 bytes). Therefore, registers 7a3 corresponding to the number of filters for performing PES decoding are mounted, and each register 7a3 has a PES header write pointer that can grasp the written position. When straddling TS packets, this PES header write pointer is stopped. Here, when the down counter value of the PES header length does not end by the end of the TS packet, the TS packet is straddled by the PES header portion. On the other hand, when the PES header length down counter is completed before the TS packet is completed, the TS packet is straddled after the PES header part. At the end of the PES header length down counter, the PES header write pointer is cleared. In the case of continuous reception restart, the PES header information extraction can be restarted by referring to the filter hit determination by PID and the PES header write pointer managed for each PID. Since PES can be filtered only by PID, no continuation flag is required.

セクション系であった場合、セクション解析部のレジスタ7a2に、セクションヘッダに対応する情報のうち必要な部分(セクションの先頭から6バイト分。但しセクション長にも依存する)のみが格納される。ここで、アダプテーションのサイズに依存して、セクションヘッダ部に相当するデータをセクション解析部のレジスタ7a2に格納終了する前に、TSパケットが終了してしまうことがあり得る。そのため、セクション解析部でも、セクションヘッダをどこまで書き込んだかを把握できるように、セクションヘッダライトポインタを各々持つとともに、フィルタ番号毎に継続フラグが設けられている。セクションヘッダライトポインタ値と継続フラグとを参照することで、TSパケットを跨いだ後、暫くして後続のセクション部のデータを受信した場合であっても、セクションヘッダの情報抽出を再開可能となる。   In the case of a section system, only the necessary portion (for 6 bytes from the beginning of the section, depending on the section length) of the information corresponding to the section header is stored in the register 7a2 of the section analysis section. Here, depending on the size of the adaptation, the TS packet may end before the data corresponding to the section header section is stored in the register 7a2 of the section analysis section. For this reason, each section analysis unit has a section header write pointer and a continuation flag for each filter number so that the section analysis unit can grasp how much the section header has been written. By referring to the section header write pointer value and the continuation flag, the section header information extraction can be resumed even if the data of the subsequent section is received for a while after straddling the TS packet. .

次に、TSパケット単位を超えた場合の処理について説明する。   Next, processing when the TS packet unit is exceeded will be described.

セクション系の場合、受信したセクションデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、(a)セクションヘッダ部をセクション解析部のレジスタ7a2に格納終了できたかどうかの判断と、(b)セクションヘッダ部に存在するセクション長情報により、TSパケット終了時点(188バイト目)で、セクション長のダウンカウントが終了しているかどうかとの判断とによって行われる。TSパケットに納まっていないと判断された場合は、フィルタにヒットしている番号の継続フラグをセットするとともに、セクション長のダウンカウンタ値をクリアする。   In the case of the section system, the determination as to whether the received section data is data that can be contained in the TS packet or not can be made as follows: The determination is made based on the determination and (b) whether or not the section length down-count is completed at the end of the TS packet (at the 188th byte) based on the section length information existing in the section header section. If it is determined that it is not contained in the TS packet, the continuation flag of the number hitting the filter is set and the section length down counter value is cleared.

なお、継続フラグのクリアは、同一フィルタにヒットしたTSパケットの、TSヘッダ情報部にあるunit_start_indicatorの値が1である場合、このTSパケットで、継続してきたセクションが終了するとともに、新たなセクションが格納されていると判断する。ここで、新たなセクションの開始位置は、pointer_fieldで示される。   In addition, when the value of unit_start_indicator in the TS header information part of the TS packet that hits the same filter is 1, the continuation flag is cleared. Judge that stored. Here, the start position of the new section is indicated by pointer_field.

PES系の場合、受信したPESデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、PESヘッダ部についてのみ実施される。   In the case of the PES system, the determination as to whether the received PES data is data that fits in the TS packet or data that does not fit is performed only for the PES header part.

PESヘッダライトポインタ(PESヘッダをどこまでPES解析部のレジスタ7a3に格納できたかを示すポインタ。PESヘッダ長による終了で、PESヘッダ終了と判断される。)が終了していない状態で、TSパケットが終了(188バイト目)した場合、PESヘッダがTSパケットを跨ったと判断し、フィルタにヒットしている番号の継続フラグがセットされる。この継続フラグは、PES解析部で複数セット設けられているレジスタセットのうちのどのレジスタセットかを識別するのに用いられる。   In a state where the PES header write pointer (pointer indicating how far the PES header has been stored in the register 7a3 of the PES analysis unit. It is determined that the PES header has ended due to the end of the PES header length) has not ended. When the process ends (at the 188th byte), it is determined that the PES header has straddled the TS packet, and the continuation flag of the number hitting the filter is set. This continuation flag is used to identify which register set of a plurality of register sets provided in the PES analysis unit.

PESヘッダ解析部が持っている継続フラグは、PESヘッダ部をPES解析部のレジスタ7a3に格納終了すると、クリアされる。   The continuation flag possessed by the PES header analysis unit is cleared when the PES header unit is stored in the register 7a3 of the PES analysis unit.

PESヘッダ部以降のPESデータ自体は、PIDのみで分離識別可能であるため、PESの長さ情報は参照されない。その代わり、TSパケットヘッダ部にあるunit_start_indicatorでPESの先頭を識別し、PESデータの先頭から分離抽出が行われる。   Since the PES data itself after the PES header part can be separated and identified only by the PID, the PES length information is not referred to. Instead, the beginning of the PES is identified by unit_start_indicator in the TS packet header portion, and separation and extraction are performed from the beginning of the PES data.

セクション解析用レジスタ7a2周辺のブロック図を図10に示し、PES解析用レジスタ7a3周辺のブロック図を図11に示す。TSデータの解析から、セクションの分離(先頭セクションの抽出)までの動作は、図12に示したタイミングチャートの通りである。TSデータの解析から、マルチセクションの抽出分離動作は、図13に示したタイミングチャートの通りである。TSデータの解析から、セクションの分離抽出時、セクションヘッダ部においてTSパケット(188バイト)が終了した場合の動作は、図14に示したタイミングチャートの通りである。TSデータの解析から、セクションの分離抽出時、セクションの途中でTSパケット(188バイト)が終了した場合の動作は、図15に示したタイミングチャートの通りである。TSデータの解析から、ポインタフィールドで示されるデータより手前のデータの抽出分離動作は、図16に示したタイミングチャートの通りである。セクションの抽出時、ポインタフィールドがない場合の動作は、図17に示したタイミングチャートの通りである。セクションを含むMPEG2−TSの例を図18に示し、PESヘッダ部の例を図19に示す。   A block diagram around the section analysis register 7a2 is shown in FIG. 10, and a block diagram around the PES analysis register 7a3 is shown in FIG. The operations from TS data analysis to section separation (leading section extraction) are as shown in the timing chart of FIG. From the analysis of TS data, the multi-section extraction / separation operation is as shown in the timing chart of FIG. From the analysis of the TS data, the operation when the TS packet (188 bytes) ends in the section header at the time of section separation and extraction is as shown in the timing chart of FIG. From the analysis of TS data, the operation when the TS packet (188 bytes) ends in the middle of a section during section separation and extraction is as shown in the timing chart of FIG. From the analysis of the TS data, the data extraction / separation operation before the data indicated by the pointer field is as shown in the timing chart of FIG. The operation when there is no pointer field when extracting a section is as shown in the timing chart of FIG. An example of MPEG2-TS including a section is shown in FIG. 18, and an example of a PES header part is shown in FIG.

以下、抽出分離結果を一時保持するためのSRAM(2面メモリ)3a〜3cについて説明する。   Hereinafter, SRAMs (two-plane memories) 3a to 3c for temporarily holding the extraction / separation results will be described.

188バイトの塊であるTSパケットから必要なデータがフィルタリングされ、分離抽出対象と判断されたデータが、SRAM3a〜3cに格納される。図7には、セクション/独立PES系に対して2面SRAM(188バイトのメモリ×2個)3a、オーディオ系に対して2面SRAM(188バイトのメモリ×2個)3b、ビデオ系に対して2面SRAM(188バイトのメモリ×2個)3cが設けられた構成が示されているが、後述の実施の形態3で説明する通り、本質的には188バイトのSRAMが2個あれば十分である。   Necessary data is filtered from the TS packet which is a lump of 188 bytes, and data determined to be separated and extracted are stored in the SRAMs 3a to 3c. FIG. 7 shows a two-sided SRAM (188 byte memory × 2) 3a for a section / independent PES system, a two-sided SRAM (188 byte memory × 2) 3b for an audio system, and a video system. However, as described in the third embodiment to be described later, if there are essentially two 188-byte SRAMs, a configuration in which two-surface SRAM (188-byte memory × 2) 3c is provided is shown. It is enough.

次に、TSデータから、セクション、オーディオES、ビデオES、独立PES1、及び独立PES2に分離したデータを、Dステージに設けられているSRAM3a〜3cに一時格納する管理部9について説明する。   Next, the management unit 9 that temporarily stores data separated from the TS data into sections, audio ES, video ES, independent PES1, and independent PES2 in the SRAMs 3a to 3c provided in the D stage will be described.

管理部9で扱う情報及び機能を、下記に列挙する。   Information and functions handled by the management unit 9 are listed below.

・フィルタ番号(SDRAM4格納先領域識別番号:マルチセクション時はセクション別に管理)
・SRAM3a〜3cへのデータ書き込みをカウントし、SRAM3a〜3cで一時保持する総バイト数(マルチセクション時はセクション別に管理)
・PES/ESの先頭データを含むTSデータであったかどうかの情報(PES/ESの先頭の場合、PTS/DTS抽出とともに、SDRAM4格納時に、PES/ESの先頭バイトを格納したアドレスを記憶するために、後々使用されることになる)
・PTS/DTSの情報をTS解析部7aから受け取る。
-Filter number (SDRAM4 storage area identification number: managed by section when multi-section)
-Count the number of data writes to SRAM 3a-3c, and the total number of bytes temporarily stored in SRAM 3a-3c (multi-section, managed by section)
Information on whether or not the TS data includes the head data of PES / ES (in the case of the head of PES / ES, in order to store the address storing the head byte of PES / ES when SDRAM4 is stored together with PTS / DTS extraction) Will be used later)
Receives PTS / DTS information from the TS analyzer 7a.

・SRAM3a〜3cからSDRAM4への転送時、PES/ESの先頭バイトを格納したアドレスとセットで、PTS/DTS情報及びフレーム番号を管理する。   When transferring from the SRAMs 3a to 3c to the SDRAM 4, the PTS / DTS information and the frame number are managed with the address and the set storing the first byte of the PES / ES.

・TS解析入力部のSRAM2から読み出したデータを、直接DEMUX出力部のSRAM3a〜3cへ書き込み開始できるタイミングを知らせるタイミング情報を、セクション解析部7a2及びPES解析部7a3から受け取る。   Timing information notifying the timing at which data read from the SRAM 2 of the TS analysis input unit can be directly written to the SRAMs 3a to 3c of the DEMUX output unit is received from the section analysis unit 7a2 and the PES analysis unit 7a3.

・TS解析入力部のSRAM2のTSデータ読み出しカウンタ値を受け取る(DEMUX出力部SRAM3a〜3cは2面あるが、この面切り換えの管理に使用される)。   The TS data reading counter value of the SRAM 2 of the TS analysis input unit is received (the DEMUX output units SRAM 3a to 3c have two surfaces, but are used for managing the surface switching).

次に、Dステージの後段に接続されている2面メモリ3a〜3cの動作について説明する。   Next, the operation of the two-plane memories 3a to 3c connected to the subsequent stage of the D stage will be described.

(イ)セクションのヘッダ部(識別情報部)データのSRAM3aへの書き込み
セクションヘッダ部のデータは、セクション解析部に設けられているレジスタ7a2に積み上げられている。これらのデータは、図12に示したタイミングチャートの最下段の信号で示す期間の間に、セクション/PES系共用のSRAM3aに書き込まれる。
(A) Writing section header (identification information) data to SRAM 3a The data in the section header is stacked in a register 7a2 provided in the section analyzer. These data are written into the section / PES shared SRAM 3a during the period indicated by the lowest signal in the timing chart shown in FIG.

この際、SRAM管理部9では、確定したフィルタ番号を用いて、SDRAM4への格納領域を識別するとともに、SDRAM4への書き込みに使用するライトポインタ(セクション用には32本あるが、基本的にはこのうちの1本を使用する。推定ヒット動作時は、複数領域への書き込みとなるため、複数本のライトポインタを使用するケースも存在する)を特定する。   At this time, the SRAM management unit 9 uses the determined filter number to identify the storage area in the SDRAM 4 and write pointers used for writing to the SDRAM 4 (32 sections are basically used for the section. One of these is used.In the case of the estimated hit operation, since writing to a plurality of areas is performed, there are cases where a plurality of write pointers are used).

(ロ)セクション本体データのSRAM3aへの書き込み
図12のタイミングチャートに示すように、セクションのヘッダ部情報を格納しているDFFからSRAM3aへのデータ転送が終了すると、続けてTS解析入力部のSRAM2から読み出したデータを、DEMUX出力部のSRAM3a〜3cへ直接転送する。
(B) Writing of section body data to SRAM 3a As shown in the timing chart of FIG. 12, when data transfer from the DFF storing the header information of the section to the SRAM 3a is completed, the SRAM 2 of the TS analysis input section continues. The data read from is directly transferred to the SRAMs 3a to 3c of the DEMUX output unit.

(ハ)独立PESのSRAM3aへの書き込み
TSヘッダのみ削除し、PESの先頭か、PESの途中かを、payload_unit_start_indicatorで確認し、PESの先頭からSRAM3aへの書き込みを行う。TSを跨るケースもあるので、セクションのTS跨ぎ処理と同様に、継続フラグを用いて、継続フラグがセットされていれば、PESの途中データとしてSRAM3aへ格納する(SDRAM4上では、切れ目の無い連続データとして書き込まれることとなる)。
(C) Writing to the SRAM 3a of the independent PES Only the TS header is deleted, whether the head of the PES or the middle of the PES is confirmed with the payload_unit_start_indicator, and writing to the SRAM 3a is performed from the head of the PES. Since there is a case where TS is crossed, as in the case of section TS crossing processing, if the continuation flag is set, it is stored in the SRAM 3a as PES intermediate data if the continuation flag is set. Will be written as data).

(ニ)オーディオPESのSRAM3bへの書き込み
TSヘッダのみ削除し、PESの先頭か、PESの途中かを、payload_unit_start_indicatorで確認し、PESの先頭からSRAM3bへの書き込みを行う。TSを跨るケースもあるので、セクションのTS跨ぎ処理と同様に、継続フラグを用いて、継続フラグがセットされていれば、PESの途中データとしてSRAM3bへ格納する(SDRAM4上では、切れ目の無い連続データとして書き込まれることとなる)。
(D) Writing of audio PES to SRAM 3b Only the TS header is deleted, whether the head of the PES or the middle of the PES is confirmed by payload_unit_start_indicator, and writing from the head of the PES to the SRAM 3b is performed. Since there is a case where TS is crossed, as in the case of section crossing TS, if the continuation flag is set, it is stored in the SRAM 3b as PES intermediate data if the continuation flag is set. Will be written as data).

また、PESの先頭である場合は、対応するPTS/DTS、PES先頭バイトの書き込み先アドレス、及びフレーム番号も同時に保持する。このデータ(PTS/DTS/アドレス、フレーム番号)の保存先には、AV同期制御用SRAM10(図8参照)が使用される。   If it is at the head of the PES, the corresponding PTS / DTS, the write destination address of the PES head byte, and the frame number are simultaneously held. As a storage destination of this data (PTS / DTS / address, frame number), an AV synchronization control SRAM 10 (see FIG. 8) is used.

(ホ)ビデオESのSRAM3cへの書き込み
TSヘッダとPESヘッダとを削除し、ESの先頭か、ESの途中かを、payload_unit_start_indicatorで確認し、ESの先頭からSRAM3cへの書き込みを行う。TSを跨るケースもあるので、セクションのTS跨ぎ処理と同様に、継続フラグを用いて、継続フラグがセットされていれば、ESの途中データとしてSRAM3cへ格納する(SDRAM4上では、切れ目の無い連続データとして書き込まれることとなる)。
(E) Writing to the SRAM 3c of the video ES The TS header and the PES header are deleted, whether the head of the ES or the middle of the ES is confirmed by using payload_unit_start_indicator, and writing to the SRAM 3c is performed from the head of the ES. Since there is a case where TS is crossed, as in the case of section crossing TS, if the continuation flag is set, if the continuation flag is set, it is stored in the SRAM 3c as data in the middle of ES (on SDRAM4, there is no continuous Will be written as data).

また、ESの先頭である場合は、対応するPTS/DTS、ES先頭バイトの書き込み先アドレス、及びフレーム番号も同時に保持する。このデータ(PTS/DTS/アドレス、フレーム番号)の保存先には、AV同期制御用SRAM10(図8参照)が使用される。   If it is the head of the ES, the corresponding PTS / DTS, the write destination address of the ES head byte, and the frame number are simultaneously held. As a storage destination of this data (PTS / DTS / address, frame number), an AV synchronization control SRAM 10 (see FIG. 8) is used.

(5)Wステージの処理
Wステージでは、Dステージの最終段にある188バイトの2面メモリ3a〜3cからSDRAM4へのデータの転送及び書き込みが行われる。Wステージも、1TSパケット期間のステージとなる。SRAM3a〜3cからSDRAM4へ書き込まれるデータには、セクション、独立PES、オーディオPES、及びビデオESがある。
(5) Processing of W stage In the W stage, data is transferred and written to the SDRAM 4 from the 188-byte two-plane memories 3a to 3c in the final stage of the D stage. The W stage is also a stage of 1 TS packet period. The data written from the SRAMs 3a to 3c to the SDRAM 4 includes a section, an independent PES, an audio PES, and a video ES.

セクションの書き込みでは、SDRAM4の複数領域への書き込みが発生する場合がある。マルチセクションにおいては、1TSパケット内に複数個の異なるセクションが格納されている場合があり、この場合はSDRAM4への書き込み領域がセクションごとに異なるためである。   In section writing, writing to a plurality of areas of the SDRAM 4 may occur. In the multi-section, a plurality of different sections may be stored in one TS packet, and in this case, the write area to the SDRAM 4 is different for each section.

独立PES、オーディオPES、及びビデオESの場合は、1TSパケット期間単位の動作において、SDRAM4への書き込み領域が異なる事態は発生しない。   In the case of an independent PES, an audio PES, and a video ES, a situation in which the write area to the SDRAM 4 is different does not occur in the operation in units of 1 TS packet period.

SDRAM4への書き込み制御(Storeトランザクション発行処理)で扱う情報及び機能を下記に列挙する。   Information and functions handled in the write control to the SDRAM 4 (Store transaction issuance process) are listed below.

・2面あるDEMUX出力SRAM3a〜3cのうち、SDRAM4転送側の面の確認を行う。   Of the two DEMUX output SRAMs 3a to 3c, the surface on the SDRAM 4 transfer side is confirmed.

・記憶されているフィルタ番号(SDRAM4格納先領域識別番号:マルチセクション時はセクション別に管理)を用いて、使用すべき書き込みライトポインタを特定する。   A write write pointer to be used is specified using the stored filter number (SDRAM 4 storage area identification number: managed by section when multi-section).

・PES/ESの先頭の場合、PTS/DTS抽出結果をAV同期制御SRAM10a(図8参照)へ格納するとともに、PES/ESの先頭バイトを格納したアドレスを、AV同期制御用SRAM10aに書き込む。この際、アドレスは、PTS/DTSと同じアドレスで管理しているAV同期制御用SRAM10bに書き込む。さらに、この際、フレーム番号なる識別番号を、DEMUX部7が独自に番号付けし、0から63までの識別を行う。   In the case of the head of PES / ES, the PTS / DTS extraction result is stored in the AV synchronization control SRAM 10a (see FIG. 8), and the address storing the head byte of the PES / ES is written in the AV synchronization control SRAM 10a. At this time, the address is written in the AV synchronization control SRAM 10b managed by the same address as the PTS / DTS. At this time, the DEMUX unit 7 uniquely assigns an identification number, which is a frame number, and performs identification from 0 to 63.

・フレーム番号は、PES単位(ES単位)と対応した意味を持っている。ここでは、1フレームは1PESパケットデータに対応していることと解釈する。換言すれば、1フレームは1ESデータにも対応していることとなる。   The frame number has a meaning corresponding to the PES unit (ES unit). Here, it is interpreted that one frame corresponds to one PES packet data. In other words, one frame corresponds to 1 ES data.

・フレーム番号を用いて、SDRAM4に格納しているオーディオPES、ビデオESの管理を行う。   Management of audio PES and video ES stored in the SDRAM 4 using the frame number.

・フレーム番号は、オーディオPESで64種類、ビデオESで64種類であり、合計で128種類の識別が可能である。   There are 64 types of frame numbers for audio PES and 64 types for video ES, and a total of 128 types can be identified.

・フレーム番号、PTS/DTS、PES/ES先頭アドレスの一時記憶方法については、図8に示す通りである。   The method for temporarily storing the frame number, PTS / DTS, and PES / ES head address is as shown in FIG.

・SRAM3a〜3cに一時保持しているES/PES/セクションデータの総バイト数(マルチセクション時にはセクション別のバイト総数)を、トランザクションへ変換する。ここでは、DTV−S対応としてサポートされている範囲のトランザクションを用いることとする。このため、使用するStore系トランザクションは、8バイトと、バイトイネーブルを用いたトランザクションへの変換とする。1バイトの転送には、8バイトのトランザクションとバイトイネーブルとを用いることとする。   The total number of bytes of ES / PES / section data temporarily stored in the SRAMs 3a to 3c (the total number of bytes for each section in multi-section) is converted into a transaction. Here, it is assumed that a transaction within a range supported for DTV-S is used. For this reason, the Store transaction to be used is converted into a transaction using 8 bytes and byte enable. For a 1-byte transfer, an 8-byte transaction and a byte enable are used.

・8バイトのライト動作は、8バイト境界に合わせて(アラインして)、トランザクションを発行する。   -An 8-byte write operation issues a transaction in alignment (aligned) with an 8-byte boundary.

・TS入力部位の2面メモリ2の動作に合わせて、TSパケット単位での、DEMUX出力2面メモリ3a〜3cの面切り替えを行う。面の切り替え動作は、概ね40μsec(1TSパケットの受信レート)のスピードで切り替えになる。SDRAM4へのライト動作は、この40μsec単位(2面メモリ3a〜3cの切り替え単位)に合わせて完了する必要がある。この期間内にライト動作が完了しない場合には、DEMUX動作として連続データを保証できないので、バスエラー割り込みを発生させる。   In accordance with the operation of the two-surface memory 2 of the TS input portion, the surface of the DEMUX output two-surface memories 3a to 3c is switched in units of TS packets. The surface switching operation is performed at a speed of approximately 40 μsec (1 TS packet reception rate). The write operation to the SDRAM 4 needs to be completed in accordance with this 40 μsec unit (unit for switching the two-plane memories 3a to 3c). If the write operation is not completed within this period, continuous data cannot be guaranteed as the DEMUX operation, and a bus error interrupt is generated.

・SDRAM4への書き込み開始タイミングは、2面メモリ3a〜3cの切り替えタイミング(TS入力部のSRAM2からの読み出しカウンタの、TS0のタイミング)から、トランザクション生成準備が完了するタイミングで、SDRAM4への書き込み処理を開始する(換言すればStoreトランザクションを発行する)。   The write start timing to the SDRAM 4 is the timing at which the transaction generation preparation is completed from the switching timing of the two-plane memories 3a to 3c (the TS counter timing of the read counter from the SRAM 2 of the TS input unit). (In other words, issue a Store transaction).

・TS解析入力部SRAM2のTSデータ読み出しカウンタ値を受け取る。DEMUX出力部SRAM3a〜3cは2面あるが、この面切り替え管理に使用される。   The TS analysis input unit SRAM2 receives the TS data read counter value. The DEMUX output units SRAM 3a to 3c have two surfaces, and are used for this surface switching management.

以上により、PESデータからPESヘッダ部を削除した後のESデータを抽出してSDRAM4に蓄えることができ、時刻管理を行いながらSDRAM4から必要なデータを読み出して、後段のビデオデコーダやオーディオデコーダにESを提供できるシステムデコーダ100aを構成することができる。   As described above, the ES data after the PES header portion is deleted from the PES data can be extracted and stored in the SDRAM 4, and the necessary data is read from the SDRAM 4 while performing time management, and the ES and the video decoder and audio decoder in the subsequent stage are read out. The system decoder 100a can be configured.

本実施の形態1に係るシステムデコーダ100aによると、TSパケット単位で処理が完結するパイプライン動作が可能であるため、PESデコーダ専用の大規模なメモリが不要となる。そのため、オンチップ又はオフチップでPESデコード用メモリを構成した場合と比較して、チップ製造コストを低減できる効果がある。また、PESデコーダ専用の大規模メモリが不要となるため、このメモリへのアクセスが削減できる。そのため、外部バスの帯域を他のアクセスへ割り振ることが可能となる。例えば、CPUがSDRAM4をワークメモリとして用いるためのアクセス帯域として割り振ることも可能となる。しかも、外部メモリアクセスが低減したので、外部アクセス周波数を下げることが可能となって消費電力が低減されるとともに、外部ピン数を削減できるためチップ製造コストを低減できる。   According to the system decoder 100a according to the first embodiment, since a pipeline operation that completes processing in units of TS packets is possible, a large-scale memory dedicated to the PES decoder becomes unnecessary. Therefore, there is an effect that the chip manufacturing cost can be reduced as compared with the case where the PES decoding memory is configured on-chip or off-chip. Further, since a large-scale memory dedicated to the PES decoder is not necessary, access to this memory can be reduced. Therefore, it is possible to allocate the bandwidth of the external bus to other access. For example, it is possible to allocate an access band for the CPU to use the SDRAM 4 as a work memory. In addition, since the external memory access is reduced, the external access frequency can be lowered, the power consumption is reduced, and the number of external pins can be reduced, so that the chip manufacturing cost can be reduced.

実施の形態2.
(1)システムデコーダ100bの基本構成
図20は、本発明の実施の形態2に係るシステムデコーダ100bの前半処理部の構成を示すブロック図である。図20に示すように、システムデコーダ100bの前半処理部は、MPEG2−TS入力を受けて188バイトの同期をとるTS−IF部5と、TS−IF部5の出力を受けてDemux処理を行うDEMUX部7と、DEMUX部7から出力されたデータをSDRAM4に書き込むMediaI/F部8とを備えて構成されている。MediaI/F部8は、書き込み部8aとMediaBusI/F部8bとを有している。つまり、図7に示した上記実施の形態1に係るシステムデコーダ100aから、デスクランブル部6を省略したものが、本実施の形態2に係るシステムデコーダ100bに相当する。
Embodiment 2. FIG.
(1) Basic Configuration of System Decoder 100b FIG. 20 is a block diagram showing the configuration of the first half processing unit of the system decoder 100b according to Embodiment 2 of the present invention. As shown in FIG. 20, the first half processing unit of the system decoder 100b receives the MPEG2-TS input and performs the demux processing by receiving the TS-IF unit 5 that synchronizes 188 bytes and the output of the TS-IF unit 5. A DEMUX unit 7 and a Media I / F unit 8 that writes data output from the DEMUX unit 7 to the SDRAM 4 are configured. The Media I / F unit 8 includes a writing unit 8a and a MediaBus I / F unit 8b. That is, the system decoder 100b according to the second embodiment is obtained by omitting the descrambling unit 6 from the system decoder 100a according to the first embodiment shown in FIG.

まず、システムデコーダ100bにおけるTSパケット単位でのパイプライン構成を説明し、その後、PESデコーダまで含めたDemux処理を可能としているアーキテクチャについて説明する。   First, a pipeline configuration in units of TS packets in the system decoder 100b will be described, and then an architecture that enables Demux processing including the PES decoder will be described.

(2)システムデコーダ100bのパイプライン構成
システムデコーダ100bのTSパケット単位でのパイプライン動作としては、TS−IF部5の後段に片面188バイトの2面メモリ1を配備し、IFステージを構成している。
(2) Pipeline configuration of system decoder 100b As a pipeline operation in units of TS packets of the system decoder 100b, a two-sided memory 1 of 188 bytes on one side is arranged at the rear stage of the TS-IF unit 5 to configure an IF stage. ing.

IFステージでは、以下の処理が行われる。   In the IF stage, the following processing is performed.

入力クロック(TSCLK)と共に送られてくるMPEG2−TSデータ(TSDATA)を、TSCLKで取り込む。この際、TSDATAと同時に送られてくるデータバリッド(TSVALID)を参照し、有効なデータである場合にのみ取り込みを行う。また、取り込み単位は、1バイト単位又は1ビット単位となり、選択が可能である。   MPEG2-TS data (TSDATA) sent together with the input clock (TSCLK) is captured by TSCLK. At this time, the data valid (TSVALID) sent simultaneously with TSDATA is referred to, and the data is taken in only when it is valid data. In addition, the capture unit can be selected in units of 1 byte or 1 bit.

MPEG2−TSパケットの先頭データである「47」コードを検索し、188バイト毎に「47」コードが存在することを確認し、同期捕捉を行う。   The “47” code which is the head data of the MPEG2-TS packet is searched, and it is confirmed that the “47” code exists every 188 bytes.

同期捕捉候補処理を高速化させるため、独立で動作する複数個のカウンタを搭載し、複数個の同期捕捉候補を扱う。いずれかの同期捕捉候補の同期捕捉が成立した段階で、他の同期捕捉候補をキャンセルする。   In order to speed up the synchronization acquisition candidate processing, a plurality of counters that operate independently are mounted to handle a plurality of synchronization acquisition candidates. When the synchronization acquisition of any one of the synchronization acquisition candidates is established, the other synchronization acquisition candidates are canceled.

同期捕捉が成立すると、MPEG2−TSパケットのデータを、先頭の「47」コードから順に、188バイトのメモリ1に格納し始める。   When synchronization acquisition is established, data of the MPEG2-TS packet starts to be stored in the 188-byte memory 1 in order from the first “47” code.

188バイトのメモリ1は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 1 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

DEMUX部7の後段にも片面188バイトの2面メモリ3a〜3cを配備し、Dステージを構成している。   Two-sided memories 3a to 3c each having 188 bytes on one side are also arranged at the subsequent stage of the DEMUX unit 7 to constitute the D stage.

Dステージでは、以下の処理が行われる。   In the D stage, the following processing is performed.

IFステージの後段に設けられている188バイトの2面メモリ1のうち、書き込みが終了している面から、MPEG2−TSデータを順次読み出す。   The MPEG2-TS data is sequentially read from the side where writing has been completed in the two-sided memory 1 of 188 bytes provided at the subsequent stage of the IF stage.

読み出したMPEG2−TSパケットデータのうち、TSヘッダ部と、もし存在すればアダプテーション領域の制御データを、TS解析用レジスタ7a1に順次セットする。   Among the read MPEG2-TS packet data, the TS header portion and, if present, the control data of the adaptation area are sequentially set in the TS analysis register 7a1.

この読み出しアドレスは、MPEG2−TSパケットの188バイトのうち、どのバイトを読み出しているかの識別に用いられる。   This read address is used to identify which one of the 188 bytes of the MPEG2-TS packet is being read.

DステージでのMPEG2−TS解析、抽出分離のベースは、上記188バイトの2面メモリ1からの読み出しアドレスと、上記TS解析用レジスタ7a1の値とを参照し、MPEG2−TSパケットのデータ構造の解析が進められる。   The base of MPEG2-TS analysis and extraction / separation in the D stage refers to the read address from the 188-byte two-sided memory 1 and the value of the TS analysis register 7a1, and the data structure of the MPEG2-TS packet Analysis proceeds.

2面メモリ1からの読み出しアドレスが、PIDを読み出し終了時点まで進んだ段階で、抽出分離指定されているPIDであるかどうかの判定が行われる。   At the stage where the read address from the two-plane memory 1 has advanced to the end of reading the PID, it is determined whether or not the PID has been designated for extraction and separation.

このPID判定では、セクション系かPES系か、PES系である場合は、独立PES系か、オーディオ系か、ビデオ系かの判定が行われる。   In this PID determination, if it is a section system, a PES system, or a PES system, it is determined whether it is an independent PES system, an audio system, or a video system.

トランスポートスクランブルコントロール、アダプテーションフィールドコントロール、コンティニュティカウンター値を、TS解析用レジスタ7a1にセットする。   The transport scramble control, adaptation field control, and continuity counter value are set in the TS analysis register 7a1.

コンティニュティカウンター値とアダプテーションフィールドコントロール値とをチェックし、廃棄対象のペイロードを持ったMPEG2−TSパケットであるかどうかの判定と、アダプテーション領域の有無、ペイロードの有無が判断される。   The continuity counter value and the adaptation field control value are checked to determine whether the packet is an MPEG2-TS packet having a payload to be discarded, whether there is an adaptation area, and whether there is a payload.

次に、アダプテーションフィールドが存在する場合は、引き続きTS解析用レジスタ7a1にアダプテーション領域のデータをセットする。   Next, if there is an adaptation field, the data in the adaptation area is continuously set in the TS analysis register 7a1.

アダプテーション領域の先頭はアダプテーションレングスであり、このレングスをチェックして、その値が0でなければ、アダプテーションレングス値をアダプテーションレングスカウンタへセットし、ダウンカウントを開始する。アダプテーションレングスが0である場合は、次のバイトは、セクション系データの場合はポインタフィールドとなり、PES系データの場合はPESの先頭バイトであると判断する。   The beginning of the adaptation area is the adaptation length, and this length is checked. If the value is not 0, the adaptation length value is set in the adaptation length counter, and down-counting is started. When the adaptation length is 0, it is determined that the next byte is a pointer field in the case of section data, and the first byte of the PES in the case of PES data.

アダプテーションレングスが0でない場合は、次のバイトが、PCRフラグ(PCRを含んだMPEG2−TSパケットかどうかの識別子)とか、含んでいるPCRが不連続PCRであるかどうかの識別子であるディスコンティニュティインディケータを、TS解析用レジスタ7a1にセットする。   If the adaptation length is not 0, the next byte includes a PCR flag (identifier indicating whether the packet is an MPEG2-TS packet including PCR) or a discontinuity indicating whether the included PCR is a discontinuous PCR. The tee indicator is set in the TS analysis register 7a1.

PCRフラグで、PCRがあることが判明すれば、PCRの抽出を行う。この時、システムデコーダ100bの時計であるSTCへPCR値をロードするか否かは、PCRのロード制御レジスタ値によって制御される。   If the PCR flag indicates that there is a PCR, the PCR is extracted. At this time, whether or not to load the PCR value to the STC which is the clock of the system decoder 100b is controlled by the load control register value of the PCR.

ディスコンティニュティインディケータがセットされていれば、MPEG2−TSパケットに含まれているPCRが、不連続PCRであると判断する。不連続PCRのSTCへのロード制御は、PCRのロード制御レジスタ値によって制御される。   If the discontinuity indicator is set, it is determined that the PCR included in the MPEG2-TS packet is a discontinuous PCR. The load control of the discontinuous PCR to the STC is controlled by the PCR load control register value.

不連続PCRのSTCへのロードは、SDRAM4に既に蓄えられているビデオES、オーディオESのタイムスタンプ値との関係が不連続になることも意味しているので、既に蓄えられているAVフレームデータ(ビデオES/オーディオES)に対応したタイムスタンプのValidビットを無効化する。ここで、このValidビットは、タイムスタンプ値が有効か無効かの識別に用いられる。有効な場合は、システムデコーダ100bからフレームデータを出力すべき時刻まで待たせる処理を行う時に、STCとの比較に用いるタイムスタンプ値として利用される。無効な場合は、出力すべき時刻まで待たせる処理は行われない。   The loading of the discontinuous PCR into the STC also means that the relationship with the time stamp values of the video ES and audio ES already stored in the SDRAM 4 becomes discontinuous, so that the AV frame data already stored is stored. The valid bit of the time stamp corresponding to (video ES / audio ES) is invalidated. Here, the Valid bit is used for identifying whether the time stamp value is valid or invalid. When it is valid, it is used as a time stamp value used for comparison with the STC when performing processing for waiting until the time when the frame data is to be output from the system decoder 100b. If it is invalid, the process for waiting until the time to be output is not performed.

アダプテーションフィールドが終了すると、PIDフィルタリングの結果が、セクション系であるか、PES系であるかで、処理が分岐される。   When the adaptation field ends, the process branches depending on whether the PID filtering result is a section system or a PES system.

TSヘッダ部のユニットスタートインディケータがセットされている場合は、セクション系の場合はセクションの先頭データを含むため、ペイロードの前に1バイトのポインタフィールドがあると判断される。また、PES系の場合はペイロードの先頭からPESデータが格納されていると判断される。   When the unit start indicator of the TS header is set, it is determined that there is a 1-byte pointer field in front of the payload because the section head includes section start data. In the case of the PES system, it is determined that PES data is stored from the beginning of the payload.

セクション系の場合は、セクション解析用レジスタ7a2に、セクションヘッダ部がセットされる。   In the case of a section system, a section header part is set in the section analysis register 7a2.

セクションの先頭バイトはテーブルIDである。セクションのフィルタリングは、セクションヘッダ部が揃ってから実施されるが、テーブルIDでMPEG2−TSパケットが終了する場合もある。この場合は、PIDとテーブルIDとでのフィルタリングを実施し、継続フラグが立っているかどうかを確認した後、継続フラグがセットされていなければ、セクション用フィルタのどの番号のフィルタでMPEG2−TSパケットを跨いだセクションを受信したかを記憶しておくための継続フラグをセットする。   The first byte of the section is a table ID. Section filtering is performed after the section headers are aligned, but the MPEG2-TS packet may end with a table ID. In this case, filtering by PID and table ID is performed and it is confirmed whether or not the continuation flag is set. Sets a continuation flag for storing whether or not a section straddling has been received.

ここで、継続フラグは、全てのフィルタに対で装備される。   Here, the continuation flag is provided in pairs for all the filters.

継続フラグのクリアは、継続フラグがセットされているフィルタにヒットしたMPEG2−TSパケットに格納されている、TSヘッダ部のユニットスタートインディケータが1であった場合に実施する。このMPEG2−TSパケットで継続してきたセクションが終了し、新たなセクションが格納されていると判断し、継続フラグがクリアされる。   The continuation flag is cleared when the unit start indicator in the TS header portion stored in the MPEG2-TS packet that hits the filter for which the continuation flag is set is 1. The section continued in the MPEG2-TS packet ends, and it is determined that a new section is stored, and the continuation flag is cleared.

ここで、MPEG2−TSパケットが、セクションヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、セクション解析用レジスタ7a2は、レジスタセットとしてセクションフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the section header portion, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the section analysis register 7a2 is a section filter as a register set. Installed for a few minutes.

PES系の場合、PES解析用レジスタ7a3に、PESヘッダ部がセットされる。   In the case of the PES system, the PES header portion is set in the PES analysis register 7a3.

PESヘッダの先頭は、パケットスタートコードプリフィックスの固定コード「000001」となっている。PESヘッダの先頭から8バイト目がPTSDTSフラグ(PTS,DTSであるタイムスタンプを含んでいるか否かの識別子)であり、タイムスタンプを含んでいる場合は、抽出を行う予定とされる。   The head of the PES header is a fixed code “000001” of the packet start code prefix. The 8th byte from the beginning of the PES header is a PTSDTS flag (an identifier indicating whether or not a time stamp that is PTS or DTS is included). If the time stamp is included, extraction is scheduled to be performed.

次のバイトがPESヘッダ長であり、PESヘッダ長の値が0でない場合は、PESヘッダ長ダウンカウンタに値がセットされ、ダウンカウントが行われる。   When the next byte is the PES header length and the value of the PES header length is not 0, a value is set in the PES header length down counter, and down counting is performed.

PESヘッダ長のダウンカウントが終了した時点に、ESデータの先頭バイトが存在する。   At the time when the PES header length down-count is completed, the first byte of the ES data exists.

ESデータの抽出では、このPESヘッダ部の削除処理を実施することで、ES抽出が実現される。   In the extraction of ES data, the ES extraction is realized by performing the deletion process of the PES header part.

MPEG2−TSパケットが、PESヘッダ部の途中で終了した場合は、PESヘッダ部のどのバイトから再開すればよいかは、PESヘッダ長のダウンカウンタ値と、継続フラグとによって判別されることとなる。   When the MPEG2-TS packet ends in the middle of the PES header part, it is determined from the PES header length down counter value and the continuation flag which byte of the PES header part should be resumed. .

ここで、MPEG2−TSパケットが、PESヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、PESヘッダ解析用レジスタ7a3は、レジスタセットとして、PID設定できるPESフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the PES header part, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the PES header analysis register 7a3 is a register set. There are as many PES filters as PID setting.

セクション系、PES系いずれの場合も、188バイトのメモリ1からの読み出しアドレスで、MPEG2−TSパケットのどのバイトを処理しているか、MPEG2−TSの終了を認識し、継続フラグをセットするか否かの判定が行われる。   Whether the section system or the PES system is used, the 188-byte read address from the memory 1 is used to recognize which byte of the MPEG2-TS packet is processed, the end of the MPEG2-TS, and whether the continuation flag is set. Is determined.

その後、MediaI/F部8からSDRAM4への書き込みが、SDRAM書き込みステージ(Wステージ)となる。   Thereafter, the writing from the Media I / F unit 8 to the SDRAM 4 becomes the SDRAM writing stage (W stage).

Wステージでは、以下の処理が行われる。   In the W stage, the following processing is performed.

Dステージの後段に設けられている188バイトの2面メモリ3a〜3cのうち、書き込みが終了している面のデータが、SDRAM4へ書き込まれる。   Of the two-sided memories 3a to 3c of 188 bytes provided at the subsequent stage of the D stage, the data on the surface where writing has been completed is written into the SDRAM 4.

書き込み単位は、セクション、PES、ESいずれも、MPEG2−TSパケットの188バイトから抽出分離したデータ単位となる。ここで、セクションの場合は、13バイトのものもあり、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、14個となる。PES系の場合、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、1個となる。これは、PES系の場合は一つのMPEG2−TSパケットに複数個のPESパケットが格納されていることがないためである。   The writing unit is a data unit extracted and separated from 188 bytes of the MPEG2-TS packet for all sections, PES, and ES. Here, some sections have 13 bytes, and the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is 14. In the case of the PES system, the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is one. This is because in the case of the PES system, a plurality of PES packets are not stored in one MPEG2-TS packet.

Wステージの期間内に、SDRAM4への書き込みが終了しない場合は、188バイトの2面メモリ3a〜3cが破綻するので、バスエラー割り込みが発生される。   If the writing to the SDRAM 4 is not completed within the period of the W stage, the bus error interrupt is generated because the 188-byte two-plane memories 3a to 3c fail.

これら各ステージに存在する2面メモリ1,3a〜3cで、TSパケット単位(188バイト単位)のパイプライン動作が区切られている。以上が、システムデコーダ100bの前半処理部となる。システムデコーダ100bの前半処理部の3段パイプライン動作は、図4に示した通りである。   Pipeline operations in units of TS packets (in units of 188 bytes) are delimited by the two-plane memories 1, 3a to 3c existing in these stages. The above is the first half processing unit of the system decoder 100b. The three-stage pipeline operation of the first half processing unit of the system decoder 100b is as shown in FIG.

(3)システムデコーダ100bの後半処理部
図21は、システムデコーダ100bの後半処理部の基本構成を示すブロック図である。システムデコーダ100bの後半処理部では、SDRAM4に書き込まれたデータが読み出され、AV同期をとって、システムデコーダ100bから出力される。ここで、SDRAM4からの読み出し以降の処理は、TSパケット単位のパイプライン動作とは無関係に動作する。
(3) Second Half Processing Unit of System Decoder 100b FIG. 21 is a block diagram showing the basic configuration of the second half processing unit of the system decoder 100b. In the latter half processing unit of the system decoder 100b, the data written in the SDRAM 4 is read out and output from the system decoder 100b with AV synchronization. Here, the processing after reading from the SDRAM 4 operates independently of the pipeline operation in units of TS packets.

(4)Demux処理
(4−1)DEMUX部7の構成
以下、主にPESデコーダからES抽出処理を含めたDemux処理について説明する。ここでは、DEMUX部7のDステージの動作説明を行う。Dステージには、PIDフィルタ動作部7b、TS解析部7a、Section解析部7a2、PES解析部7a3、及び分離結果を一時記憶しておくためのSRAM部3a〜3cがある。Dステージ及びWステージの動作を示すタイミングチャートは、図9に示した通りである。
(4) Demux Processing (4-1) Configuration of DEMUX Unit 7 Demux processing including mainly ES extraction processing from the PES decoder will be described below. Here, the operation of the D stage of the DEMUX unit 7 will be described. The D stage includes a PID filter operation unit 7b, a TS analysis unit 7a, a Section analysis unit 7a2, a PES analysis unit 7a3, and SRAM units 3a to 3c for temporarily storing separation results. A timing chart showing the operations of the D stage and the W stage is as shown in FIG.

(4−2)DEMUX部7の処理
TS−IF部5の後段に接続されている2面メモリ1から、TSパケットデータが1パケット分(0バイト目から187バイト目まで)読み出される。この読み出しのアドレスで、TSパケットの先頭から何番目のデータであるかが識別される。このTSパケットは、読み出しアドレス値に応じて、TS解析部7aに設けられているレジスタ7a1に格納される。TS解析部7aで格納対象とされているTSデータは、TSヘッダ部のデータと、アダプテーションに相当するデータの一部、及び、セクションの場合はポインタフィールドが保持される。
(4-2) Processing of DEMUX Unit 7 TS packet data for one packet (from the 0th byte to the 187th byte) is read from the two-plane memory 1 connected to the subsequent stage of the TS-IF unit 5. This read address identifies the number of data from the beginning of the TS packet. The TS packet is stored in a register 7a1 provided in the TS analysis unit 7a according to the read address value. The TS data to be stored in the TS analysis unit 7a holds data in the TS header part, a part of data corresponding to adaptation, and a pointer field in the case of a section.

ここで、TS解析部7aのレジスタ7a1にPIDまでの情報が書き込まれた段階で、TSパケットの種別の大分類(セクションか、ビデオか、オーディオか、独立PESか)が行われる。この結果によって、セクション系かPES系(ビデオ、オーディオ、独立PES)かの識別が可能である。この結果を利用して、セクション解析部のレジスタ7a2を用いるのか、PES解析部のレジスタ7a3を用いるのかが判断される。   Here, when the information up to the PID is written in the register 7a1 of the TS analysis unit 7a, the classification of TS packet types (section, video, audio, or independent PES) is performed. Based on this result, it is possible to identify the section system or the PES system (video, audio, independent PES). Using this result, it is determined whether to use the register 7a2 of the section analysis unit or the register 7a3 of the PES analysis unit.

PES系であった場合、このPES解析部のレジスタ7a3に、PESヘッダに対応する情報のうち必要な部分(PES先頭から13バイトで、PESヘッダ長を含む)のみが格納される。ここで、アダプテーションのサイズによっては、PESのヘッダがTSパケットの単位(188バイト)よりも大きい場合があり得る。従って、PESデコードを行うフィルタ数分のレジスタ7a3が搭載されており、各レジスタ7a3は、書き込んだ位置を把握できるPESヘッダライトポインタを有している。TSパケットを跨いだ場合は、このPESヘッダライトポインタが停止される。ここで、TSパケットが終了するまでにPESヘッダ長のダウンカウンタ値が終了しなかった場合には、PESヘッダ部でTSパケットを跨ったことになる。一方、TSパケットが終了するまでにPESヘッダ長のダウンカウンタが終了した場合には、PESヘッダ部以降でTSパケットを跨いだことになる。PESヘッダ長のダウンカウンタ終了時点で、PESヘッダライトポインタはクリアされる。継続して受信再開する場合の動作は、PIDでのフィルタヒット判定と、PID別で管理しているPESヘッダライトポインタとを参照することで、PESヘッダの情報抽出を再開可能となる。なお、PESはPIDのみでフィルタリングが可能なため、特に継続フラグは必要ない。   In the case of the PES system, only the necessary portion (13 bytes from the beginning of the PES and including the PES header length) of the information corresponding to the PES header is stored in the register 7a3 of the PES analysis unit. Here, depending on the size of the adaptation, the PES header may be larger than the TS packet unit (188 bytes). Therefore, registers 7a3 corresponding to the number of filters for performing PES decoding are mounted, and each register 7a3 has a PES header write pointer that can grasp the written position. When straddling TS packets, this PES header write pointer is stopped. Here, when the down counter value of the PES header length does not end by the end of the TS packet, the TS packet is straddled by the PES header portion. On the other hand, when the PES header length down counter is completed before the TS packet is completed, the TS packet is straddled after the PES header part. At the end of the PES header length down counter, the PES header write pointer is cleared. In the case of continuous reception restart, the PES header information extraction can be restarted by referring to the filter hit determination by PID and the PES header write pointer managed for each PID. Since PES can be filtered only by PID, no continuation flag is required.

セクション系であった場合、セクション解析部のレジスタ7a2に、セクションヘッダに対応する情報のうち必要な部分(セクションの先頭から6バイト分。但しセクション長にも依存する)のみが格納される。ここで、アダプテーションのサイズに依存して、セクションヘッダ部に相当するデータをセクション解析部のレジスタ7a2に格納終了する前に、TSパケットが終了してしまうことがあり得る。そのため、セクション解析部でも、セクションヘッダをどこまで書き込んだかを把握できるように、セクションヘッダライトポインタを各々持つとともに、フィルタ番号毎に継続フラグが設けられている。セクションヘッダライトポインタ値と継続フラグとを参照することで、TSパケットを跨いだ後、暫くして後続のセクション部のデータを受信した場合であっても、セクションヘッダの情報抽出を再開可能となる。   In the case of a section system, only the necessary portion (for 6 bytes from the beginning of the section, depending on the section length) of the information corresponding to the section header is stored in the register 7a2 of the section analysis section. Here, depending on the size of the adaptation, the TS packet may end before the data corresponding to the section header section is stored in the register 7a2 of the section analysis section. For this reason, each section analysis unit has a section header write pointer and a continuation flag for each filter number so that the section analysis unit can grasp how much the section header has been written. By referring to the section header write pointer value and the continuation flag, the section header information extraction can be resumed even if the data of the subsequent section is received for a while after straddling the TS packet. .

次に、TSパケット単位を超えた場合の処理について説明する。   Next, processing when the TS packet unit is exceeded will be described.

セクション系の場合、受信したセクションデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、(a)セクションヘッダ部をセクション解析部のレジスタ7a2に格納終了できたかどうかの判断と、(b)セクションヘッダ部に存在するセクション長情報により、TSパケット終了時点(188バイト目)で、セクション長のダウンカウントが終了しているかどうかとの判断とによって行われる。TSパケットに納まっていないと判断された場合は、フィルタにヒットしている番号の継続フラグをセットするとともに、セクション長のダウンカウンタ値をクリアする。   In the case of the section system, the determination as to whether the received section data is data that can be contained in the TS packet or not can be made as follows: The determination is made based on the determination and (b) whether or not the section length down-count is completed at the end of the TS packet (at the 188th byte) based on the section length information existing in the section header section. If it is determined that it is not contained in the TS packet, the continuation flag of the number hitting the filter is set and the section length down counter value is cleared.

なお、継続フラグのクリアは、同一フィルタにヒットしたTSパケットの、TSヘッダ情報部にあるunit_start_indicatorの値が1である場合、このTSパケットで、継続してきたセクションが終了するとともに、新たなセクションが格納されていると判断する。ここで、新たなセクションの開始位置は、pointer_fieldで示される。   In addition, when the value of unit_start_indicator in the TS header information part of the TS packet that hits the same filter is 1, the continuation flag is cleared. Judge that stored. Here, the start position of the new section is indicated by pointer_field.

PES系の場合、受信したPESデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、PESヘッダ部についてのみ実施される。   In the case of the PES system, the determination as to whether the received PES data is data that fits in the TS packet or data that does not fit is performed only for the PES header part.

PESヘッダライトポインタ(PESヘッダをどこまでPES解析部のレジスタ7a3に格納できたかを示すポインタ。PESヘッダ長による終了で、PESヘッダ終了と判断される。)が終了していない状態で、TSパケットが終了(188バイト目)した場合、PESヘッダがTSパケットを跨ったと判断し、フィルタにヒットしている番号の継続フラグがセットされる。この継続フラグは、PES解析部で複数セット設けられているレジスタセットのうちのどのレジスタセットかを識別するのに用いられる。   In a state where the PES header write pointer (pointer indicating how far the PES header has been stored in the register 7a3 of the PES analysis unit. It is determined that the PES header has ended due to the end of the PES header length) has not ended. When the process ends (at the 188th byte), it is determined that the PES header has straddled the TS packet, and the continuation flag of the number hitting the filter is set. This continuation flag is used to identify which register set of a plurality of register sets provided in the PES analysis unit.

PESヘッダ解析部が持っている継続フラグは、PESヘッダ部をPES解析部のレジスタ7a3に格納終了すると、クリアされる。   The continuation flag possessed by the PES header analysis unit is cleared when the PES header unit is stored in the register 7a3 of the PES analysis unit.

PESヘッダ部以降のPESデータ自体は、PIDのみで分離識別可能であるため、PESの長さ情報は参照されない。その代わり、TSパケットヘッダ部にあるunit_start_indicatorでPESの先頭を識別し、PESデータの先頭から分離抽出が行われる。   Since the PES data itself after the PES header part can be separated and identified only by the PID, the PES length information is not referred to. Instead, the beginning of the PES is identified by unit_start_indicator in the TS packet header portion, and separation and extraction are performed from the beginning of the PES data.

以下、抽出分離結果を一時保持するためのSRAM(2面メモリ)3a〜3cについて説明する。   Hereinafter, SRAMs (two-plane memories) 3a to 3c for temporarily holding the extraction / separation results will be described.

188バイトの塊であるTSパケットから必要なデータがフィルタリングされ、分離抽出対象と判断されたデータが、SRAM3a〜3cに格納される。図20には、セクション/独立PES系に対して2面SRAM(188バイトのメモリ×2個)3a、オーディオ系に対して2面SRAM(188バイトのメモリ×2個)3b、ビデオ系に対して2面SRAM(188バイトのメモリ×2個)3cが設けられた構成が示されているが、後述の実施の形態3で説明する通り、本質的には188バイトのSRAMが2個あれば十分である。   Necessary data is filtered from the TS packet which is a lump of 188 bytes, and data determined to be separated and extracted are stored in the SRAMs 3a to 3c. FIG. 20 shows a two-sided SRAM (188 byte memory × 2) 3a for the section / independent PES system, a two-sided SRAM (188 byte memory × 2) 3b for the audio system, and a video system. However, as described in the third embodiment to be described later, if there are essentially two 188-byte SRAMs, a configuration is shown in which two-side SRAM (188-byte memory × 2) 3c is provided. It is enough.

(5)Wステージの処理
Wステージでは、Dステージの最終段にある188バイトの2面メモリ3a〜3cからSDRAM4へのデータの転送及び書き込みが行われる。Wステージも、1TSパケット期間のステージとなる。SRAM3a〜3cからSDRAM4へ書き込まれるデータには、セクション、独立PES、オーディオPES、及びビデオESがある。
(5) Processing of W stage In the W stage, data is transferred and written to the SDRAM 4 from the 188-byte two-plane memories 3a to 3c in the final stage of the D stage. The W stage is also a stage of 1 TS packet period. The data written from the SRAMs 3a to 3c to the SDRAM 4 includes a section, an independent PES, an audio PES, and a video ES.

セクションの書き込みでは、SDRAM4の複数領域への書き込みが発生する場合がある。マルチセクションにおいては、1TSパケット内に複数個の異なるセクションが格納されている場合があり、この場合はSDRAM4への書き込み領域がセクションごとに異なるためである。   In section writing, writing to a plurality of areas of the SDRAM 4 may occur. In the multi-section, a plurality of different sections may be stored in one TS packet, and in this case, the write area to the SDRAM 4 is different for each section.

独立PES、オーディオPES、及びビデオESの場合は、1TSパケット期間単位の動作において、SDRAM4への書き込み領域が異なる事態は発生しない。   In the case of an independent PES, an audio PES, and a video ES, a situation in which the write area to the SDRAM 4 is different does not occur in the operation in units of 1 TS packet period.

以上により、PESデータからPESヘッダ部を削除した後のESデータを抽出してSDRAM4に蓄えることができ、時刻管理を行いながらSDRAM4から必要なデータを読み出して、後段のビデオデコーダやオーディオデコーダにESを提供できるシステムデコーダ100bを構成することができる。   As described above, the ES data after the PES header portion is deleted from the PES data can be extracted and stored in the SDRAM 4, and the necessary data is read from the SDRAM 4 while performing time management, and the ES and the video decoder and the audio decoder in the subsequent stage are read out. Can be configured.

本実施の形態2に係るシステムデコーダ100bによると、TSパケット単位で処理が完結するパイプライン動作が可能であるため、PESデコーダ専用の大規模なメモリが不要となる。そのため、オンチップ又はオフチップでPESデコード用メモリを構成した場合と比較して、チップ製造コストを低減できる効果がある。また、PESデコーダ専用の大規模メモリが不要となるため、このメモリへのアクセスが削減できる。そのため、外部バスの帯域を他のアクセスへ割り振ることが可能となる。例えば、CPUがSDRAM4をワークメモリとして用いるためのアクセス帯域として割り振ることも可能となる。しかも、外部メモリアクセスが低減したので、外部アクセス周波数を下げることが可能となって消費電力が低減されるとともに、外部ピン数を削減できるためチップ製造コストを低減できる。   According to the system decoder 100b according to the second embodiment, since a pipeline operation that completes processing in units of TS packets is possible, a large-scale memory dedicated to the PES decoder is not necessary. Therefore, there is an effect that the chip manufacturing cost can be reduced as compared with the case where the PES decoding memory is configured on-chip or off-chip. Further, since a large-scale memory dedicated to the PES decoder is not necessary, access to this memory can be reduced. Therefore, it is possible to allocate the bandwidth of the external bus to other access. For example, it is possible to allocate an access band for the CPU to use the SDRAM 4 as a work memory. In addition, since the external memory access is reduced, the external access frequency can be lowered, the power consumption is reduced, and the number of external pins can be reduced, so that the chip manufacturing cost can be reduced.

しかも、図7に示した上記実施の形態1に係るシステムデコーダ100aから、デスクランブル部6及び2面メモリ2が省略されているため、システムデコーダ100aと比較して回路規模を削減することができる。   In addition, since the descrambling unit 6 and the two-plane memory 2 are omitted from the system decoder 100a according to the first embodiment shown in FIG. 7, the circuit scale can be reduced as compared with the system decoder 100a. .

実施の形態3.
(1)システムデコーダ100cの基本構成
図22は、本発明の実施の形態3に係るシステムデコーダ100cの前半処理部の構成を示すブロック図である。図22に示すように、システムデコーダ100cの前半処理部は、MPEG2−TS入力を受けて188バイトの同期をとるTS−IF部5と、TS−IF部5の出力を受けて暗号を解読するデスクランブル部6と、デスクランブル部6の出力を受けてDemux処理を行うDEMUX部7と、DEMUX部7から出力されたデータをSDRAM4に書き込むMediaI/F部8とを備えて構成されている。MediaI/F部8は、書き込み部8aとMediaBusI/F部8bとを有している。
Embodiment 3 FIG.
(1) Basic Configuration of System Decoder 100c FIG. 22 is a block diagram showing the configuration of the first half processing unit of the system decoder 100c according to Embodiment 3 of the present invention. As shown in FIG. 22, the first half processing unit of the system decoder 100c receives the MPEG2-TS input and synchronizes with the TS-IF unit 5 that synchronizes 188 bytes, and receives the output of the TS-IF unit 5 and decrypts the cipher. A descrambling unit 6, a DEMUX unit 7 that receives the output of the descrambling unit 6 and performs Demux processing, and a Media I / F unit 8 that writes data output from the DEMUX unit 7 to the SDRAM 4 are configured. The Media I / F unit 8 includes a writing unit 8a and a MediaBus I / F unit 8b.

まず、システムデコーダ100cにおけるTSパケット単位でのパイプライン構成を説明し、その後、PESデコーダまで含めたDemux処理を可能としているアーキテクチャについて説明する。   First, a pipeline configuration in units of TS packets in the system decoder 100c will be described, and then an architecture that enables Demux processing including the PES decoder will be described.

(2)システムデコーダ100cのパイプライン構成
システムデコーダ100cのTSパケット単位でのパイプライン動作としては、TS−IF部5の後段に片面188バイトの2面メモリ1を配備し、IFステージを構成している。
(2) Pipeline configuration of the system decoder 100c As a pipeline operation in units of TS packets of the system decoder 100c, a two-sided memory 1 of 188 bytes on one side is arranged at the rear stage of the TS-IF unit 5 to configure an IF stage. ing.

IFステージでは、以下の処理が行われる。   In the IF stage, the following processing is performed.

入力クロック(TSCLK)と共に送られてくるMPEG2−TSデータ(TSDATA)を、TSCLKで取り込む。この際、TSDATAと同時に送られてくるデータバリッド(TSVALID)を参照し、有効なデータである場合にのみ取り込みを行う。また、取り込み単位は、1バイト単位又は1ビット単位となり、選択が可能である。   MPEG2-TS data (TSDATA) sent together with the input clock (TSCLK) is captured by TSCLK. At this time, the data valid (TSVALID) sent simultaneously with TSDATA is referred to, and the data is taken in only when it is valid data. In addition, the capture unit can be selected in units of 1 byte or 1 bit.

MPEG2−TSパケットの先頭データである「47」コードを検索し、188バイト毎に「47」コードが存在することを確認し、同期捕捉を行う。   The “47” code which is the head data of the MPEG2-TS packet is searched, and it is confirmed that the “47” code exists every 188 bytes.

同期捕捉候補処理を高速化させるため、独立で動作する複数個のカウンタを搭載し、複数個の同期捕捉候補を扱う。いずれかの同期捕捉候補の同期捕捉が成立した段階で、他の同期捕捉候補をキャンセルする。   In order to speed up the synchronization acquisition candidate processing, a plurality of counters that operate independently are mounted to handle a plurality of synchronization acquisition candidates. When the synchronization acquisition of any one of the synchronization acquisition candidates is established, the other synchronization acquisition candidates are canceled.

同期捕捉が成立すると、MPEG2−TSパケットのデータを、先頭の「47」コードから順に、188バイトのメモリ1に格納し始める。   When synchronization acquisition is established, data of the MPEG2-TS packet starts to be stored in the 188-byte memory 1 in order from the first “47” code.

188バイトのメモリ1は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 1 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

デスクランブル部6の後段にも片面188バイトの2面メモリ2を配備し、Sステージを構成している。   A two-sided memory 2 of 188 bytes on one side is also arranged at the subsequent stage of the descramble unit 6 to constitute an S stage.

Sステージでは、以下の処理が行われる。   In the S stage, the following processing is performed.

IFステージの後段に設けられている188バイトの2面メモリ1のうち、書き込みが終了している面からMPEG2−TSデータを順次読み出す。   The MPEG2-TS data is sequentially read from the side where writing has been completed in the two-sided memory 1 of 188 bytes provided after the IF stage.

スクランブル解除指定のPIDを持っているMPEG2−TSパケットであるか否かの判定を実施する。   It is determined whether the packet is an MPEG2-TS packet having a descrambling designation PID.

スクランブル解除指定のPIDを持っているMPEG2−TSパケットであった場合は、MPEG2−TSパケットのPayloadに対して、スクランブル解除処理を実施する。   In the case of an MPEG2-TS packet having a PID for descrambling designation, a descrambling process is performed on the payload of the MPEG2-TS packet.

1バイト単位に複数クロックかけてデスクランブル処理を行うことにより、188バイトのデータのスクランブル解除処理を行う。   By performing descrambling over a plurality of clocks in units of 1 byte, descrambling of 188 bytes of data is performed.

スクランブル解除されたデータを、MPEG2−TSの先頭バイトから、188バイトのメモリ2に格納し始める。   The descrambled data starts to be stored in the 188-byte memory 2 from the first byte of MPEG2-TS.

188バイトのメモリ2は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 2 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

デスクランブル処理対象外のMPEG2−TSデータである場合は、スクランブル解除処理を実施しないで、188バイトのメモリ2へ書き込む。例えば、TSパケットのヘッダ情報や、PIDで指定されていないMPEG2−TSパケットの場合は、スクランブル解除処理を実施しないで、188バイトのメモリ2へ書き込まれる。   In the case of MPEG2-TS data that is not subject to descrambling processing, the descrambling processing is not performed and the data is written into the 188-byte memory 2. For example, header information of a TS packet or an MPEG2-TS packet not specified by PID is written to the 188-byte memory 2 without performing the descrambling process.

デスクランブル処理対象外のデータは、デスクランブル処理対象のデータと同じレイテンシとする。換言すれば、MPEG2−TSデータのデスクランブル部6を通過する時間は、デスクランブル処理を実施した場合も実施しなかった場合も、いずれも同じ所要時間となる。   The data not subject to descrambling processing has the same latency as the data subject to descrambling processing. In other words, the time required for the MPEG2-TS data to pass through the descrambling unit 6 is the same required time regardless of whether or not the descrambling process is performed.

さらに、DEMUX部7の後段にも片面188バイトの2面メモリ3aを配備し、Dステージを構成している。   Further, a two-sided memory 3a having a single side of 188 bytes is provided at the subsequent stage of the DEMUX unit 7 to constitute a D stage.

Dステージでは、以下の処理が行われる。   In the D stage, the following processing is performed.

デスクランブルステージの後段に設けられている188バイトの2面メモリ2のうち、書き込みが終了している面から、スクランブル解除されたMPEG2−TSデータを順次読み出す。   The scrambled MPEG2-TS data is sequentially read from the 188-byte two-sided memory 2 provided at the subsequent stage of the descrambling stage from the side where the writing has been completed.

読み出したMPEG2−TSパケットデータのうち、TSヘッダ部と、もし存在すればアダプテーション領域の制御データを、TS解析用レジスタ7a1に順次セットする。   Among the read MPEG2-TS packet data, the TS header portion and, if present, the control data of the adaptation area are sequentially set in the TS analysis register 7a1.

この読み出しアドレスは、MPEG2−TSパケットの188バイトのうち、どのバイトを読み出しているかの識別に用いられる。   This read address is used to identify which one of the 188 bytes of the MPEG2-TS packet is being read.

DステージでのMPEG2−TS解析、抽出分離のベースは、上記188バイトの2面メモリ2からの読み出しアドレスと、上記TS解析用レジスタ7a1の値とを参照し、MPEG2−TSパケットのデータ構造の解析が進められる。   The base of MPEG2-TS analysis and extraction / separation at the D stage refers to the read address from the 188-byte two-sided memory 2 and the value of the TS analysis register 7a1, and the data structure of the MPEG2-TS packet Analysis proceeds.

2面メモリ2からの読み出しアドレスが、PIDを読み出し終了時点まで進んだ段階で、抽出分離指定されているPIDであるかどうかの判定が行われる。   At the stage where the read address from the two-plane memory 2 has advanced to the end of reading the PID, it is determined whether or not the PID has been designated for extraction and separation.

このPID判定では、セクション系かPES系か、PES系である場合は、独立PES系か、オーディオ系か、ビデオ系かの判定が行われる。   In this PID determination, if it is a section system, a PES system, or a PES system, it is determined whether it is an independent PES system, an audio system, or a video system.

トランスポートスクランブルコントロール、アダプテーションフィールドコントロール、コンティニュティカウンター値を、TS解析用レジスタ7a1にセットする。   The transport scramble control, adaptation field control, and continuity counter value are set in the TS analysis register 7a1.

コンティニュティカウンター値とアダプテーションフィールドコントロール値とをチェックし、廃棄対象のペイロードを持ったMPEG2−TSパケットであるかどうかの判定と、アダプテーション領域の有無、ペイロードの有無が判断される。   The continuity counter value and the adaptation field control value are checked to determine whether the packet is an MPEG2-TS packet having a payload to be discarded, whether there is an adaptation area, and whether there is a payload.

次に、アダプテーションフィールドが存在する場合は、引き続きTS解析用レジスタ7a1にアダプテーション領域のデータをセットする。   Next, if there is an adaptation field, the data in the adaptation area is continuously set in the TS analysis register 7a1.

アダプテーション領域の先頭はアダプテーションレングスであり、このレングスをチェックして、その値が0でなければ、アダプテーションレングス値をアダプテーションレングスカウンタへセットし、ダウンカウントを開始する。アダプテーションレングスが0である場合は、次のバイトは、セクション系データの場合はポインタフィールドとなり、PES系データの場合はPESの先頭バイトであると判断する。   The beginning of the adaptation area is the adaptation length, and this length is checked. If the value is not 0, the adaptation length value is set in the adaptation length counter, and down-counting is started. When the adaptation length is 0, it is determined that the next byte is a pointer field in the case of section data, and the first byte of the PES in the case of PES data.

アダプテーションレングスが0でない場合は、次のバイトが、PCRフラグ(PCRを含んだMPEG2−TSパケットかどうかの識別子)とか、含んでいるPCRが不連続PCRであるかどうかの識別子であるディスコンティニュティインディケータを、TS解析用レジスタ7a1にセットする。   If the adaptation length is not 0, the next byte includes a PCR flag (identifier indicating whether the packet is an MPEG2-TS packet including PCR) or a discontinuity indicating whether the included PCR is a discontinuous PCR. The tee indicator is set in the TS analysis register 7a1.

PCRフラグで、PCRがあることが判明すれば、PCRの抽出を行う。この時、システムデコーダ100cの時計であるSTCへPCR値をロードするか否かは、PCRのロード制御レジスタ値によって制御される。   If the PCR flag indicates that there is a PCR, the PCR is extracted. At this time, whether or not to load the PCR value to the STC which is the clock of the system decoder 100c is controlled by the PCR load control register value.

ディスコンティニュティインディケータがセットされていれば、MPEG2−TSパケットに含まれているPCRが、不連続PCRであると判断する。不連続PCRのSTCへのロード制御は、PCRのロード制御レジスタ値によって制御される。   If the discontinuity indicator is set, it is determined that the PCR included in the MPEG2-TS packet is a discontinuous PCR. The load control of the discontinuous PCR to the STC is controlled by the PCR load control register value.

不連続PCRのSTCへのロードは、SDRAM4に既に蓄えられているビデオES、オーディオESのタイムスタンプ値との関係が不連続になることも意味しているので、既に蓄えられているAVフレームデータ(ビデオES/オーディオES)に対応したタイムスタンプのValidビットを無効化する。ここで、このValidビットは、タイムスタンプ値が有効か無効かの識別に用いられる。有効な場合は、システムデコーダ100cからフレームデータを出力すべき時刻まで待たせる処理を行う時に、STCとの比較に用いるタイムスタンプ値として利用される。無効な場合は、出力すべき時刻まで待たせる処理は行われない。   The loading of the discontinuous PCR into the STC also means that the relationship with the time stamp values of the video ES and audio ES already stored in the SDRAM 4 becomes discontinuous, so that the AV frame data already stored is stored. The valid bit of the time stamp corresponding to (video ES / audio ES) is invalidated. Here, the Valid bit is used for identifying whether the time stamp value is valid or invalid. When it is valid, it is used as a time stamp value used for comparison with the STC when performing processing for waiting until the time when the frame data is to be output from the system decoder 100c. If it is invalid, the process for waiting until the time to be output is not performed.

アダプテーションフィールドが終了すると、PIDフィルタリングの結果が、セクション系であるか、PES系であるかで、処理が分岐される。   When the adaptation field ends, the process branches depending on whether the PID filtering result is a section system or a PES system.

TSヘッダ部のユニットスタートインディケータがセットされている場合は、セクション系の場合はセクションの先頭データを含むため、ペイロードの前に1バイトのポインタフィールドがあると判断される。また、PES系の場合はペイロードの先頭からPESデータが格納されていると判断される。   When the unit start indicator of the TS header is set, it is determined that there is a 1-byte pointer field in front of the payload because the section head includes section start data. In the case of the PES system, it is determined that PES data is stored from the beginning of the payload.

セクション系の場合は、セクション解析用レジスタ7a2に、セクションヘッダ部がセットされる。   In the case of a section system, a section header part is set in the section analysis register 7a2.

セクションの先頭バイトはテーブルIDである。セクションのフィルタリングは、セクションヘッダ部が揃ってから実施されるが、テーブルIDでMPEG2−TSパケットが終了する場合もある。この場合は、PIDとテーブルIDとでのフィルタリングを実施し、継続フラグが立っているかどうかを確認した後、継続フラグがセットされていなければ、セクション用フィルタのどの番号のフィルタでMPEG2−TSパケットを跨いだセクションを受信したかを記憶しておくための継続フラグをセットする。   The first byte of the section is a table ID. Section filtering is performed after the section headers are aligned, but the MPEG2-TS packet may end with a table ID. In this case, filtering by PID and table ID is performed and it is confirmed whether or not the continuation flag is set. Sets a continuation flag for storing whether or not a section straddling has been received.

ここで、継続フラグは、全てのフィルタに対で装備される。   Here, the continuation flag is provided in pairs for all the filters.

継続フラグのクリアは、継続フラグがセットされているフィルタにヒットしたMPEG2−TSパケットに格納されている、TSヘッダ部のユニットスタートインディケータが1であった場合に実施する。このMPEG2−TSパケットで継続してきたセクションが終了し、新たなセクションが格納されていると判断し、継続フラグがクリアされる。   The continuation flag is cleared when the unit start indicator in the TS header portion stored in the MPEG2-TS packet that hits the filter for which the continuation flag is set is 1. The section continued in the MPEG2-TS packet ends, and it is determined that a new section is stored, and the continuation flag is cleared.

ここで、MPEG2−TSパケットが、セクションヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、セクション解析用レジスタ7a2は、レジスタセットとしてセクションフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the section header portion, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the section analysis register 7a2 is a section filter as a register set. Installed for a few minutes.

PES系の場合、PES解析用レジスタ7a3に、PESヘッダ部がセットされる。   In the case of the PES system, the PES header portion is set in the PES analysis register 7a3.

PESヘッダの先頭は、パケットスタートコードプリフィックスの固定コード「000001」となっている。PESヘッダの先頭から8バイト目がPTSDTSフラグ(PTS,DTSであるタイムスタンプを含んでいるか否かの識別子)であり、タイムスタンプを含んでいる場合は、抽出を行う予定とされる。   The head of the PES header is a fixed code “000001” of the packet start code prefix. The 8th byte from the beginning of the PES header is a PTSDTS flag (an identifier indicating whether or not a time stamp that is PTS or DTS is included). If the time stamp is included, extraction is scheduled to be performed.

次のバイトがPESヘッダ長であり、PESヘッダ長の値が0でない場合は、PESヘッダ長ダウンカウンタに値がセットされ、ダウンカウントが行われる。   When the next byte is the PES header length and the value of the PES header length is not 0, a value is set in the PES header length down counter, and down counting is performed.

PESヘッダ長のダウンカウントが終了した時点に、ESデータの先頭バイトが存在する。   At the time when the PES header length down-count is completed, the first byte of the ES data exists.

ESデータの抽出では、このPESヘッダ部の削除処理を実施することで、ES抽出が実現される。   In the extraction of ES data, the ES extraction is realized by performing the deletion process of the PES header part.

MPEG2−TSパケットが、PESヘッダ部の途中で終了した場合は、PESヘッダ部のどのバイトから再開すればよいかは、PESヘッダ長のダウンカウンタ値と、継続フラグとによって判別されることとなる。   When the MPEG2-TS packet ends in the middle of the PES header part, it is determined from the PES header length down counter value and the continuation flag which byte of the PES header part should be resumed. .

ここで、MPEG2−TSパケットが、PESヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、PESヘッダ解析用レジスタ7a3は、レジスタセットとして、PID設定できるPESフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the PES header part, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the PES header analysis register 7a3 is a register set. There are as many PES filters as PID setting.

セクション系、PES系いずれの場合も、188バイトのメモリ2からの読み出しアドレスで、MPEG2−TSパケットのどのバイトを処理しているか、MPEG2−TSの終了を認識し、継続フラグをセットするか否かの判定が行われる。   Whether the section system or the PES system is used, the 188-byte read address from the memory 2 indicates which byte of the MPEG2-TS packet is being processed, recognizes the end of the MPEG2-TS, and sets the continuation flag. Is determined.

その後、MediaI/F部8からSDRAM4への書き込みが、SDRAM書き込みステージ(Wステージ)となる。   Thereafter, the writing from the Media I / F unit 8 to the SDRAM 4 becomes the SDRAM writing stage (W stage).

Wステージでは、以下の処理が行われる。   In the W stage, the following processing is performed.

Dステージの後段に設けられている188バイトの2面メモリ3aのうち、書き込みが終了している面のデータが、SDRAM4へ書き込まれる。   Of the two-sided memory 3a of 188 bytes provided at the subsequent stage of the D stage, the data on the side where writing has been completed is written into the SDRAM 4.

書き込み単位は、セクション、PES、ESいずれも、MPEG2−TSパケットの188バイトから抽出分離したデータ単位となる。ここで、セクションの場合は、13バイトのものもあり、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、14個となる。PES系の場合、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、1個となる。これは、PES系の場合は一つのMPEG2−TSパケットに複数個のPESパケットが格納されていることがないためである。   The writing unit is a data unit extracted and separated from 188 bytes of the MPEG2-TS packet for all sections, PES, and ES. Here, some sections have 13 bytes, and the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is 14. In the case of the PES system, the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is one. This is because in the case of the PES system, a plurality of PES packets are not stored in one MPEG2-TS packet.

Wステージの期間内に、SDRAM4への書き込みが終了しない場合は、188バイトの2面メモリ3aが破綻するので、バスエラー割り込みが発生される。   If writing to the SDRAM 4 is not completed within the period of the W stage, the 188-byte dual memory 3a fails, and a bus error interrupt is generated.

これら各ステージに存在する2面メモリ1,2,3aで、TSパケット単位(188バイト単位)のパイプライン動作が区切られている。以上が、システムデコーダ100cの前半処理部となる。システムデコーダ100cの前半処理部の4段パイプライン動作は、図2に示した通りである。   Pipeline operations in units of TS packets (in units of 188 bytes) are divided by the two-plane memories 1, 2 and 3a existing in each stage. The above is the first half processing unit of the system decoder 100c. The four-stage pipeline operation of the first half processing unit of the system decoder 100c is as shown in FIG.

(3)システムデコーダ100cの後半処理部
システムデコーダ100cの後半処理部の基本構成は、図21に示したブロック図の通りである。システムデコーダ100cの後半処理部では、SDRAM4に書き込まれたデータが読み出され、AV同期をとって、システムデコーダ100cから出力される。ここで、SDRAM4からの読み出し以降の処理は、TSパケット単位のパイプライン動作とは無関係に動作する。
(3) Second Half Processing Unit of System Decoder 100c The basic configuration of the second half processing unit of the system decoder 100c is as shown in the block diagram of FIG. In the latter half processing section of the system decoder 100c, the data written in the SDRAM 4 is read out and output from the system decoder 100c with AV synchronization. Here, the processing after reading from the SDRAM 4 operates independently of the pipeline operation in units of TS packets.

(4)Demux処理
(4−1)DEMUX部7の構成
以下、主にPESデコーダからES抽出処理を含めたDemux処理について説明する。ここでは、DEMUX部7のDステージの動作説明を行う。Dステージには、PIDフィルタ動作部7b、TS解析部7a、Section解析部7a2、PES解析部7a3、及び分離結果を一時記憶しておくためのSRAM部3aがある。Dステージ及びWステージの動作を示すタイミングチャートは、図9に示した通りである。
(4) Demux Processing (4-1) Configuration of DEMUX Unit 7 Demux processing including mainly ES extraction processing from the PES decoder will be described below. Here, the operation of the D stage of the DEMUX unit 7 will be described. The D stage includes a PID filter operation unit 7b, a TS analysis unit 7a, a Section analysis unit 7a2, a PES analysis unit 7a3, and an SRAM unit 3a for temporarily storing a separation result. A timing chart showing the operations of the D stage and the W stage is as shown in FIG.

(4−2)DEMUX部7の処理
デスクランブル部6の後段に接続されている2面メモリ2から、TSパケットデータが1パケット分(0バイト目から187バイト目まで)読み出される。この読み出しのアドレスで、TSパケットの先頭から何番目のデータであるかが識別される。このTSパケットは、読み出しアドレス値に応じて、TS解析部7aに設けられているレジスタ7a1に格納される。TS解析部7aで格納対象とされているTSデータは、TSヘッダ部のデータと、アダプテーションに相当するデータの一部、及び、セクションの場合はポインタフィールドが保持される。
(4-2) Processing of DEMUX Unit 7 TS packet data for one packet (from the 0th byte to the 187th byte) is read from the two-plane memory 2 connected to the subsequent stage of the descrambling unit 6. This read address identifies the number of data from the beginning of the TS packet. The TS packet is stored in a register 7a1 provided in the TS analysis unit 7a according to the read address value. The TS data to be stored in the TS analysis unit 7a holds data in the TS header part, a part of data corresponding to adaptation, and a pointer field in the case of a section.

ここで、TS解析部7aのレジスタ7a1にPIDまでの情報が書き込まれた段階で、TSパケットの種別の大分類(セクションか、ビデオか、オーディオか、独立PESか)が行われる。この結果によって、セクション系かPES系(ビデオ、オーディオ、独立PES)かの識別が可能である。この結果を利用して、セクション解析部のレジスタ7a2を用いるのか、PES解析部のレジスタ7a3を用いるのかが判断される。   Here, when the information up to the PID is written in the register 7a1 of the TS analysis unit 7a, the classification of TS packet types (section, video, audio, or independent PES) is performed. Based on this result, it is possible to identify the section system or the PES system (video, audio, independent PES). Using this result, it is determined whether to use the register 7a2 of the section analysis unit or the register 7a3 of the PES analysis unit.

PES系であった場合、このPES解析部のレジスタ7a3に、PESヘッダに対応する情報のうち必要な部分(PES先頭から13バイトで、PESヘッダ長を含む)のみが格納される。ここで、アダプテーションのサイズによっては、PESのヘッダがTSパケットの単位(188バイト)よりも大きい場合があり得る。従って、PESデコードを行うフィルタ数分のレジスタ7a3が搭載されており、各レジスタ7a3は、書き込んだ位置を把握できるPESヘッダライトポインタを有している。TSパケットを跨いだ場合は、このPESヘッダライトポインタが停止される。ここで、TSパケットが終了するまでにPESヘッダ長のダウンカウンタ値が終了しなかった場合には、PESヘッダ部でTSパケットを跨ったことになる。一方、TSパケットが終了するまでにPESヘッダ長のダウンカウンタが終了した場合には、PESヘッダ部以降でTSパケットを跨いだことになる。PESヘッダ長のダウンカウンタ終了時点で、PESヘッダライトポインタはクリアされる。継続して受信再開する場合の動作は、PIDでのフィルタヒット判定と、PID別で管理しているPESヘッダライトポインタとを参照することで、PESヘッダの情報抽出を再開可能となる。なお、PESはPIDのみでフィルタリングが可能なため、特に継続フラグは必要ない。   In the case of the PES system, only the necessary portion (13 bytes from the beginning of the PES and including the PES header length) of the information corresponding to the PES header is stored in the register 7a3 of the PES analysis unit. Here, depending on the size of the adaptation, the PES header may be larger than the TS packet unit (188 bytes). Therefore, registers 7a3 corresponding to the number of filters for performing PES decoding are mounted, and each register 7a3 has a PES header write pointer that can grasp the written position. When straddling TS packets, this PES header write pointer is stopped. Here, when the down counter value of the PES header length does not end by the end of the TS packet, the TS packet is straddled by the PES header portion. On the other hand, when the PES header length down counter is completed before the TS packet is completed, the TS packet is straddled after the PES header part. At the end of the PES header length down counter, the PES header write pointer is cleared. In the case of continuous reception restart, the PES header information extraction can be restarted by referring to the filter hit determination by PID and the PES header write pointer managed for each PID. Since PES can be filtered only by PID, no continuation flag is required.

セクション系であった場合、セクション解析部のレジスタ7a2に、セクションヘッダに対応する情報のうち必要な部分(セクションの先頭から6バイト分。但しセクション長にも依存する)のみが格納される。ここで、アダプテーションのサイズに依存して、セクションヘッダ部に相当するデータをセクション解析部のレジスタ7a2に格納終了する前に、TSパケットが終了してしまうことがあり得る。そのため、セクション解析部でも、セクションヘッダをどこまで書き込んだかを把握できるように、セクションヘッダライトポインタを各々持つとともに、フィルタ番号毎に継続フラグが設けられている。セクションヘッダライトポインタ値と継続フラグとを参照することで、TSパケットを跨いだ後、暫くして後続のセクション部のデータを受信した場合であっても、セクションヘッダの情報抽出を再開可能となる。   In the case of a section system, only the necessary portion (for 6 bytes from the beginning of the section, depending on the section length) of the information corresponding to the section header is stored in the register 7a2 of the section analysis section. Here, depending on the size of the adaptation, the TS packet may end before the data corresponding to the section header section is stored in the register 7a2 of the section analysis section. For this reason, each section analysis unit has a section header write pointer and a continuation flag for each filter number so that the section analysis unit can grasp how much the section header has been written. By referring to the section header write pointer value and the continuation flag, the section header information extraction can be resumed even if the data of the subsequent section is received for a while after straddling the TS packet. .

次に、TSパケット単位を超えた場合の処理について説明する。   Next, processing when the TS packet unit is exceeded will be described.

セクション系の場合、受信したセクションデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、(a)セクションヘッダ部をセクション解析部のレジスタ7a2に格納終了できたかどうかの判断と、(b)セクションヘッダ部に存在するセクション長情報により、TSパケット終了時点(188バイト目)で、セクション長のダウンカウントが終了しているかどうかとの判断とによって行われる。TSパケットに納まっていないと判断された場合は、フィルタにヒットしている番号の継続フラグをセットするとともに、セクション長のダウンカウンタ値をクリアする。   In the case of the section system, the determination as to whether the received section data is data that can be contained in the TS packet or not can be made as follows: The determination is made based on the determination and (b) whether or not the section length down-count is completed at the end of the TS packet (at the 188th byte) based on the section length information existing in the section header section. If it is determined that it is not contained in the TS packet, the continuation flag of the number hitting the filter is set and the section length down counter value is cleared.

なお、継続フラグのクリアは、同一フィルタにヒットしたTSパケットの、TSヘッダ情報部にあるunit_start_indicatorの値が1である場合、このTSパケットで、継続してきたセクションが終了するとともに、新たなセクションが格納されていると判断する。ここで、新たなセクションの開始位置は、pointer_fieldで示される。   In addition, when the value of unit_start_indicator in the TS header information part of the TS packet that hits the same filter is 1, the continuation flag is cleared. Judge that stored. Here, the start position of the new section is indicated by pointer_field.

PES系の場合、受信したPESデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、PESヘッダ部についてのみ実施される。   In the case of the PES system, the determination as to whether the received PES data is data that fits in the TS packet or data that does not fit is performed only for the PES header part.

PESヘッダライトポインタ(PESヘッダをどこまでPES解析部のレジスタ7a3に格納できたかを示すポインタ。PESヘッダ長による終了で、PESヘッダ終了と判断される。)が終了していない状態で、TSパケットが終了(188バイト目)した場合、PESヘッダがTSパケットを跨ったと判断し、フィルタにヒットしている番号の継続フラグがセットされる。この継続フラグは、PES解析部で複数セット設けられているレジスタセットのうちのどのレジスタセットかを識別するのに用いられる。   In a state where the PES header write pointer (pointer indicating how far the PES header has been stored in the register 7a3 of the PES analysis unit. It is determined that the PES header has ended due to the end of the PES header length) has not ended. When the process ends (at the 188th byte), it is determined that the PES header has straddled the TS packet, and the continuation flag of the number hitting the filter is set. This continuation flag is used to identify which register set of a plurality of register sets provided in the PES analysis unit.

PESヘッダ解析部が持っている継続フラグは、PESヘッダ部をPES解析部のレジスタ7a3に格納終了すると、クリアされる。   The continuation flag possessed by the PES header analysis unit is cleared when the PES header unit is stored in the register 7a3 of the PES analysis unit.

PESヘッダ部以降のPESデータ自体は、PIDのみで分離識別可能であるため、PESの長さ情報は参照されない。その代わり、TSパケットヘッダ部にあるunit_start_indicatorでPESの先頭を識別し、PESデータの先頭から分離抽出が行われる。   Since the PES data itself after the PES header part can be separated and identified only by the PID, the PES length information is not referred to. Instead, the beginning of the PES is identified by unit_start_indicator in the TS packet header portion, and separation and extraction are performed from the beginning of the PES data.

セクション解析用レジスタ7a2周辺のブロック図を図10に示し、PES解析用レジスタ7a3周辺のブロック図を図11に示す。TSデータの解析から、セクションの分離(先頭セクションの抽出)までの動作は、図12に示したタイミングチャートの通りである。TSデータの解析から、マルチセクションの抽出分離動作は、図13に示したタイミングチャートの通りである。TSデータの解析から、セクションの分離抽出時、セクションヘッダ部においてTSパケット(188バイト)が終了した場合の動は、図14に示したタイミングチャートの通りである。TSデータの解析から、セクションの分離抽出時、セクションの途中でTSパケット(188バイト)が終了した場合の動作は、図15に示したタイミングチャートの通りである。TSデータの解析から、ポインタフィールドで示されるデータより手前のデータの抽出分離動作は、図16に示したタイミングチャートの通りである。セクションの抽出時、ポインタフィールドがない場合の動作は、図17に示したタイミングチャートの通りである。セクションを含むMPEG2−TSの例を図18に示し、PESヘッダ部の例を図19に示す。   A block diagram around the section analysis register 7a2 is shown in FIG. 10, and a block diagram around the PES analysis register 7a3 is shown in FIG. The operations from TS data analysis to section separation (leading section extraction) are as shown in the timing chart of FIG. From the analysis of TS data, the multi-section extraction / separation operation is as shown in the timing chart of FIG. From the analysis of TS data, when a section is separated and extracted, the operation when the TS packet (188 bytes) ends in the section header is as shown in the timing chart of FIG. From the analysis of TS data, the operation when the TS packet (188 bytes) ends in the middle of a section during section separation and extraction is as shown in the timing chart of FIG. From the analysis of the TS data, the data extraction / separation operation before the data indicated by the pointer field is as shown in the timing chart of FIG. The operation when there is no pointer field when extracting a section is as shown in the timing chart of FIG. An example of MPEG2-TS including a section is shown in FIG. 18, and an example of a PES header part is shown in FIG.

以下、抽出分離結果を一時保持するためのSRAM(2面メモリ)3aについて説明する。   Hereinafter, the SRAM (two-sided memory) 3a for temporarily holding the extraction / separation result will be described.

188バイトの塊であるTSパケットから必要なデータがフィルタリングされ、分離抽出対象と判断されたデータが、SRAM3aに格納される。本実施の形態3に係るシステムデコーダ100cでは、図22に示したように、セクション/独立PES系、オーディオ系、及びビデオ系に共通する2面SRAM(188バイトのメモリ×2個)3aが設けられている。   Necessary data is filtered from the TS packet which is a lump of 188 bytes, and the data determined to be separated and extracted is stored in the SRAM 3a. In the system decoder 100c according to the third embodiment, as shown in FIG. 22, a two-plane SRAM (188-byte memory × 2 pieces) 3a common to the section / independent PES system, the audio system, and the video system is provided. It has been.

(5)Wステージの処理
Wステージでは、Dステージの最終段にある188バイトの2面メモリ3aからSDRAM4へのデータの転送及び書き込みが行われる。Wステージも、1TSパケット期間のステージとなる。SRAM3aからSDRAM4へ書き込まれるデータには、セクション、独立PES、オーディオPES、及びビデオESがある。
(5) W Stage Processing In the W stage, data is transferred and written from the 188-byte two-plane memory 3a in the final stage of the D stage to the SDRAM 4. The W stage is also a stage of 1 TS packet period. The data written from the SRAM 3a to the SDRAM 4 includes a section, an independent PES, an audio PES, and a video ES.

セクションの書き込みでは、SDRAM4の複数領域への書き込みが発生する場合がある。マルチセクションにおいては、1TSパケット内に複数個の異なるセクションが格納されている場合があり、この場合はSDRAM4への書き込み領域がセクションごとに異なるためである。   In section writing, writing to a plurality of areas of the SDRAM 4 may occur. In the multi-section, a plurality of different sections may be stored in one TS packet, and in this case, the write area to the SDRAM 4 is different for each section.

独立PES、オーディオPES、及びビデオESの場合は、1TSパケット期間単位の動作において、SDRAM4への書き込み領域が異なる事態は発生しない。   In the case of an independent PES, an audio PES, and a video ES, a situation in which the write area to the SDRAM 4 is different does not occur in the operation in units of 1 TS packet period.

以上により、PESデータからPESヘッダ部を削除した後のESデータを抽出してSDRAM4に蓄えることができ、時刻管理を行いながらSDRAM4から必要なデータを読み出して、後段のビデオデコーダやオーディオデコーダにESを提供できるシステムデコーダ100cを構成することができる。   As described above, the ES data after the PES header portion is deleted from the PES data can be extracted and stored in the SDRAM 4, and necessary data is read from the SDRAM 4 while performing time management, and the ES or video decoder in the subsequent stage is read out. Can be configured.

本実施の形態3に係るシステムデコーダ100cによると、TSパケット単位で処理が完結するパイプライン動作が可能であるため、PESデコーダ専用の大規模なメモリが不要となる。そのため、オンチップ又はオフチップでPESデコード用メモリを構成した場合と比較して、チップ製造コストを低減できる効果がある。また、PESデコーダ専用の大規模メモリが不要となるため、このメモリへのアクセスが削減できる。そのため、外部バスの帯域を他のアクセスへ割り振ることが可能となる。例えば、CPUがSDRAM4をワークメモリとして用いるためのアクセス帯域として割り振ることも可能となる。しかも、外部メモリアクセスが低減したので、外部アクセス周波数を下げることが可能となって消費電力が低減されるとともに、外部ピン数を削減できるためチップ製造コストを低減できる。   According to the system decoder 100c according to the third embodiment, since a pipeline operation that completes processing in units of TS packets is possible, a large-scale memory dedicated to the PES decoder is not necessary. Therefore, there is an effect that the chip manufacturing cost can be reduced as compared with the case where the PES decoding memory is configured on-chip or off-chip. Further, since a large-scale memory dedicated to the PES decoder is not necessary, access to this memory can be reduced. Therefore, it is possible to allocate the bandwidth of the external bus to other access. For example, it is possible to allocate an access band for the CPU to use the SDRAM 4 as a work memory. In addition, since the external memory access is reduced, the external access frequency can be lowered, the power consumption is reduced, and the number of external pins can be reduced, so that the chip manufacturing cost can be reduced.

しかも、図7に示した上記実施の形態1に係るシステムデコーダ100aから、2面メモリ3b,3cが省略されているため、システムデコーダ100aと比較して回路規模を削減することができる。   Moreover, since the two-plane memories 3b and 3c are omitted from the system decoder 100a according to the first embodiment shown in FIG. 7, the circuit scale can be reduced as compared with the system decoder 100a.

実施の形態4.
(1)システムデコーダ100dの基本構成
図23は、本発明の実施の形態4に係るシステムデコーダ100dの前半処理部の構成を示すブロック図である。図23に示すように、システムデコーダ100dの前半処理部は、MPEG2−TS入力を受けて188バイトの同期をとるTS−IF部5と、TS−IF部5の出力を受けてDemux処理を行うDEMUX部7と、DEMUX部7から出力されたデータをSDRAM4に書き込むMediaI/F部8とを備えて構成されている。MediaI/F部8は、書き込み部8aとMediaBusI/F部8bとを有している。つまり、図22に示した上記実施の形態3に係るシステムデコーダ100cから、デスクランブル部6を省略したものが、本実施の形態4に係るシステムデコーダ100dに相当する。
Embodiment 4 FIG.
(1) Basic Configuration of System Decoder 100d FIG. 23 is a block diagram showing the configuration of the first half processing unit of the system decoder 100d according to Embodiment 4 of the present invention. As shown in FIG. 23, the first half processing unit of the system decoder 100d receives the MPEG2-TS input and performs the demux processing by receiving the TS-IF unit 5 that synchronizes 188 bytes and the output of the TS-IF unit 5. A DEMUX unit 7 and a Media I / F unit 8 that writes data output from the DEMUX unit 7 to the SDRAM 4 are configured. The Media I / F unit 8 includes a writing unit 8a and a MediaBus I / F unit 8b. That is, the system decoder 100d according to the fourth embodiment is obtained by omitting the descrambling unit 6 from the system decoder 100c according to the third embodiment shown in FIG.

まず、システムデコーダ100dにおけるTSパケット単位でのパイプライン構成を説明し、その後、PESデコーダまで含めたDemux処理を可能としているアーキテクチャについて説明する。   First, a pipeline configuration in units of TS packets in the system decoder 100d will be described, and then an architecture that enables Demux processing including the PES decoder will be described.

(2)システムデコーダ100dのパイプライン構成
システムデコーダ100dのTSパケット単位でのパイプライン動作としては、TS−IF部5の後段に片面188バイトの2面メモリ1を配備し、IFステージを構成している。
(2) Pipeline configuration of system decoder 100d As a pipeline operation in units of TS packets of the system decoder 100d, a two-sided memory 1 of 188 bytes on one side is arranged at the rear stage of the TS-IF unit 5 to configure an IF stage. ing.

IFステージでは、以下の処理が行われる。   In the IF stage, the following processing is performed.

入力クロック(TSCLK)と共に送られてくるMPEG2−TSデータ(TSDATA)を、TSCLKで取り込む。この際、TSDATAと同時に送られてくるデータバリッド(TSVALID)を参照し、有効なデータである場合にのみ取り込みを行う。また、取り込み単位は、1バイト単位又は1ビット単位となり、選択が可能である。   MPEG2-TS data (TSDATA) sent together with the input clock (TSCLK) is captured by TSCLK. At this time, the data valid (TSVALID) sent simultaneously with TSDATA is referred to, and the data is taken in only when it is valid data. In addition, the capture unit can be selected in units of 1 byte or 1 bit.

MPEG2−TSパケットの先頭データである「47」コードを検索し、188バイト毎に「47」コードが存在することを確認し、同期捕捉を行う。   The “47” code which is the head data of the MPEG2-TS packet is searched, and it is confirmed that the “47” code exists every 188 bytes.

同期捕捉候補処理を高速化させるため、独立で動作する複数個のカウンタを搭載し、複数個の同期捕捉候補を扱う。いずれかの同期捕捉候補の同期捕捉が成立した段階で、他の同期捕捉候補をキャンセルする。   In order to speed up the synchronization acquisition candidate processing, a plurality of counters that operate independently are mounted to handle a plurality of synchronization acquisition candidates. When the synchronization acquisition of any one of the synchronization acquisition candidates is established, the other synchronization acquisition candidates are canceled.

同期捕捉が成立すると、MPEG2−TSパケットのデータを、先頭の「47」コードから順に、188バイトのメモリ1に格納し始める。   When synchronization acquisition is established, data of the MPEG2-TS packet starts to be stored in the 188-byte memory 1 in order from the first “47” code.

188バイトのメモリ1は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 1 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

DEMUX部7の後段にも片面188バイトの2面メモリ3aを配備し、Dステージを構成している。   A two-sided memory 3a having one side of 188 bytes is also arranged after the DEMUX unit 7 to constitute a D stage.

Dステージでは、以下の処理が行われる。   In the D stage, the following processing is performed.

IFステージの後段に設けられている188バイトの2面メモリ1のうち、書き込みが終了している面から、MPEG2−TSデータを順次読み出す。   The MPEG2-TS data is sequentially read from the side where writing has been completed in the two-sided memory 1 of 188 bytes provided at the subsequent stage of the IF stage.

読み出したMPEG2−TSパケットデータのうち、TSヘッダ部と、もし存在すればアダプテーション領域の制御データを、TS解析用レジスタ7a1に順次セットする。   Among the read MPEG2-TS packet data, the TS header portion and, if present, the control data of the adaptation area are sequentially set in the TS analysis register 7a1.

この読み出しアドレスは、MPEG2−TSパケットの188バイトのうち、どのバイトを読み出しているかの識別に用いられる。   This read address is used to identify which one of the 188 bytes of the MPEG2-TS packet is being read.

DステージでのMPEG2−TS解析、抽出分離のベースは、上記188バイトの2面メモリ1からの読み出しアドレスと、上記TS解析用レジスタ7a1の値とを参照し、MPEG2−TSパケットのデータ構造の解析が進められる。   The base of MPEG2-TS analysis and extraction / separation in the D stage refers to the read address from the 188-byte two-sided memory 1 and the value of the TS analysis register 7a1, and the data structure of the MPEG2-TS packet Analysis proceeds.

2面メモリ1からの読み出しアドレスが、PIDを読み出し終了時点まで進んだ段階で、抽出分離指定されているPIDであるかどうかの判定が行われる。   At the stage where the read address from the two-plane memory 1 has advanced to the end of reading the PID, it is determined whether or not the PID has been designated for extraction and separation.

このPID判定では、セクション系かPES系か、PES系である場合は、独立PES系か、オーディオ系か、ビデオ系かの判定が行われる。   In this PID determination, if it is a section system, a PES system, or a PES system, it is determined whether it is an independent PES system, an audio system, or a video system.

トランスポートスクランブルコントロール、アダプテーションフィールドコントロール、コンティニュティカウンター値を、TS解析用レジスタ7a1にセットする。   The transport scramble control, adaptation field control, and continuity counter value are set in the TS analysis register 7a1.

コンティニュティカウンター値とアダプテーションフィールドコントロール値とをチェックし、廃棄対象のペイロードを持ったMPEG2−TSパケットであるかどうかの判定と、アダプテーション領域の有無、ペイロードの有無が判断される。   The continuity counter value and the adaptation field control value are checked to determine whether the packet is an MPEG2-TS packet having a payload to be discarded, whether there is an adaptation area, and whether there is a payload.

次に、アダプテーションフィールドが存在する場合は、引き続きTS解析用レジスタ7a1にアダプテーション領域のデータをセットする。   Next, if there is an adaptation field, the data in the adaptation area is continuously set in the TS analysis register 7a1.

アダプテーション領域の先頭はアダプテーションレングスであり、このレングスをチェックして、その値が0でなければ、アダプテーションレングス値をアダプテーションレングスカウンタへセットし、ダウンカウントを開始する。アダプテーションレングスが0である場合は、次のバイトは、セクション系データの場合はポインタフィールドとなり、PES系データの場合はPESの先頭バイトであると判断する。   The beginning of the adaptation area is the adaptation length, and this length is checked. If the value is not 0, the adaptation length value is set in the adaptation length counter, and down-counting is started. When the adaptation length is 0, it is determined that the next byte is a pointer field in the case of section data, and the first byte of the PES in the case of PES data.

アダプテーションレングスが0でない場合は、次のバイトが、PCRフラグ(PCRを含んだMPEG2−TSパケットかどうかの識別子)とか、含んでいるPCRが不連続PCRであるかどうかの識別子であるディスコンティニュティインディケータを、TS解析用レジスタ7a1にセットする。   If the adaptation length is not 0, the next byte includes a PCR flag (identifier indicating whether the packet is an MPEG2-TS packet including PCR) or a discontinuity indicating whether the included PCR is a discontinuous PCR. The tee indicator is set in the TS analysis register 7a1.

PCRフラグで、PCRがあることが判明すれば、PCRの抽出を行う。この時、システムデコーダ100dの時計であるSTCへPCR値をロードするか否かは、PCRのロード制御レジスタ値によって制御される。   If the PCR flag indicates that there is a PCR, the PCR is extracted. At this time, whether or not to load the PCR value to the STC which is the clock of the system decoder 100d is controlled by the PCR load control register value.

ディスコンティニュティインディケータがセットされていれば、MPEG2−TSパケットに含まれているPCRが、不連続PCRであると判断する。不連続PCRのSTCへのロード制御は、PCRのロード制御レジスタ値によって制御される。   If the discontinuity indicator is set, it is determined that the PCR included in the MPEG2-TS packet is a discontinuous PCR. The load control of the discontinuous PCR to the STC is controlled by the PCR load control register value.

不連続PCRのSTCへのロードは、SDRAM4に既に蓄えられているビデオES、オーディオESのタイムスタンプ値との関係が不連続になることも意味しているので、既に蓄えられているAVフレームデータ(ビデオES/オーディオES)に対応したタイムスタンプのValidビットを無効化する。ここで、このValidビットは、タイムスタンプ値が有効か無効かの識別に用いられる。有効な場合は、システムデコーダ100dからフレームデータを出力すべき時刻まで待たせる処理を行う時に、STCとの比較に用いるタイムスタンプ値として利用される。無効な場合は、出力すべき時刻まで待たせる処理は行われない。   The loading of the discontinuous PCR into the STC also means that the relationship with the time stamp values of the video ES and audio ES already stored in the SDRAM 4 becomes discontinuous, so that the AV frame data already stored is stored. The valid bit of the time stamp corresponding to (video ES / audio ES) is invalidated. Here, the Valid bit is used for identifying whether the time stamp value is valid or invalid. When it is valid, it is used as a time stamp value used for comparison with the STC when processing for waiting until the time when the frame data is to be output from the system decoder 100d is performed. If it is invalid, the process for waiting until the time to be output is not performed.

アダプテーションフィールドが終了すると、PIDフィルタリングの結果が、セクション系であるか、PES系であるかで、処理が分岐される。   When the adaptation field ends, the process branches depending on whether the PID filtering result is a section system or a PES system.

TSヘッダ部のユニットスタートインディケータがセットされている場合は、セクション系の場合はセクションの先頭データを含むため、ペイロードの前に1バイトのポインタフィールドがあると判断される。また、PES系の場合はペイロードの先頭からPESデータが格納されていると判断される。   When the unit start indicator of the TS header is set, it is determined that there is a 1-byte pointer field in front of the payload because the section head includes section start data. In the case of the PES system, it is determined that PES data is stored from the beginning of the payload.

セクション系の場合は、セクション解析用レジスタ7a2に、セクションヘッダ部がセットされる。   In the case of a section system, a section header part is set in the section analysis register 7a2.

セクションの先頭バイトはテーブルIDである。セクションのフィルタリングは、セクションヘッダ部が揃ってから実施されるが、テーブルIDでMPEG2−TSパケットが終了する場合もある。この場合は、PIDとテーブルIDとでのフィルタリングを実施し、継続フラグが立っているかどうかを確認した後、継続フラグがセットされていなければ、セクション用フィルタのどの番号のフィルタでMPEG2−TSパケットを跨いだセクションを受信したかを記憶しておくための継続フラグをセットする。   The first byte of the section is a table ID. Section filtering is performed after the section headers are aligned, but the MPEG2-TS packet may end with a table ID. In this case, filtering by PID and table ID is performed and it is confirmed whether or not the continuation flag is set. Sets a continuation flag for storing whether or not a section straddling has been received.

ここで、継続フラグは、全てのフィルタに対で装備される。   Here, the continuation flag is provided in pairs for all the filters.

継続フラグのクリアは、継続フラグがセットされているフィルタにヒットしたMPEG2−TSパケットに格納されている、TSヘッダ部のユニットスタートインディケータが1であった場合に実施する。このMPEG2−TSパケットで継続してきたセクションが終了し、新たなセクションが格納されていると判断し、継続フラグがクリアされる。   The continuation flag is cleared when the unit start indicator in the TS header portion stored in the MPEG2-TS packet that hits the filter for which the continuation flag is set is 1. The section continued in the MPEG2-TS packet ends, and it is determined that a new section is stored, and the continuation flag is cleared.

ここで、MPEG2−TSパケットが、セクションヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、セクション解析用レジスタ7a2は、レジスタセットとしてセクションフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the section header portion, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the section analysis register 7a2 is a section filter as a register set. Installed for a few minutes.

PES系の場合、PES解析用レジスタ7a3に、PESヘッダ部がセットされる。   In the case of the PES system, the PES header portion is set in the PES analysis register 7a3.

PESヘッダの先頭は、パケットスタートコードプリフィックスの固定コード「000001」となっている。PESヘッダの先頭から8バイト目がPTSDTSフラグ(PTS,DTSであるタイムスタンプを含んでいるか否かの識別子)であり、タイムスタンプを含んでいる場合は、抽出を行う予定とされる。   The head of the PES header is a fixed code “000001” of the packet start code prefix. The 8th byte from the beginning of the PES header is a PTSDTS flag (an identifier indicating whether or not a time stamp that is PTS or DTS is included). If the time stamp is included, extraction is scheduled to be performed.

次のバイトがPESヘッダ長であり、PESヘッダ長の値が0でない場合は、PESヘッダ長ダウンカウンタに値がセットされ、ダウンカウントが行われる。   When the next byte is the PES header length and the value of the PES header length is not 0, a value is set in the PES header length down counter, and down counting is performed.

PESヘッダ長のダウンカウントが終了した時点に、ESデータの先頭バイトが存在する。   At the time when the PES header length down-count is completed, the first byte of the ES data exists.

ESデータの抽出では、このPESヘッダ部の削除処理を実施することで、ES抽出が実現される。   In the extraction of ES data, the ES extraction is realized by performing the deletion process of the PES header part.

MPEG2−TSパケットが、PESヘッダ部の途中で終了した場合は、PESヘッダ部のどのバイトから再開すればよいかは、PESヘッダ長のダウンカウンタ値と、継続フラグとによって判別されることとなる。   When the MPEG2-TS packet ends in the middle of the PES header part, it is determined from the PES header length down counter value and the continuation flag which byte of the PES header part should be resumed. .

ここで、MPEG2−TSパケットが、PESヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、PESヘッダ解析用レジスタ7a3は、レジスタセットとして、PID設定できるPESフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the PES header part, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the PES header analysis register 7a3 is a register set. There are as many PES filters as PID setting.

セクション系、PES系いずれの場合も、188バイトのメモリ1からの読み出しアドレスで、MPEG2−TSパケットのどのバイトを処理しているか、MPEG2−TSの終了を認識し、継続フラグをセットするか否かの判定が行われる。   Whether the section system or the PES system is used, the 188-byte read address from the memory 1 is used to recognize which byte of the MPEG2-TS packet is processed, the end of the MPEG2-TS, and whether the continuation flag is set. Is determined.

その後、MediaI/F部8からSDRAM4への書き込みが、SDRAM書き込みステージ(Wステージ)となる。   Thereafter, the writing from the Media I / F unit 8 to the SDRAM 4 becomes the SDRAM writing stage (W stage).

Wステージでは、以下の処理が行われる。   In the W stage, the following processing is performed.

Dステージの後段に設けられている188バイトの2面メモリ3aのうち、書き込みが終了している面のデータが、SDRAM4へ書き込まれる。   Of the two-sided memory 3a of 188 bytes provided at the subsequent stage of the D stage, the data on the side where writing has been completed is written into the SDRAM 4.

書き込み単位は、セクション、PES、ESいずれも、MPEG2−TSパケットの188バイトから抽出分離したデータ単位となる。ここで、セクションの場合は、13バイトのものもあり、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、14個となる。PES系の場合、Wステージでの最大書き込み先(SDRAM4での書き込み先領域)数は、1個となる。これは、PES系の場合は一つのMPEG2−TSパケットに複数個のPESパケットが格納されていることがないためである。   The writing unit is a data unit extracted and separated from 188 bytes of the MPEG2-TS packet for all sections, PES, and ES. Here, some sections have 13 bytes, and the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is 14. In the case of the PES system, the maximum number of write destinations (write destination areas in the SDRAM 4) in the W stage is one. This is because in the case of the PES system, a plurality of PES packets are not stored in one MPEG2-TS packet.

Wステージの期間内に、SDRAM4への書き込みが終了しない場合は、188バイトの2面メモリ3aが破綻するので、バスエラー割り込みが発生される。   If writing to the SDRAM 4 is not completed within the period of the W stage, the 188-byte dual memory 3a fails, and a bus error interrupt is generated.

これら各ステージに存在する2面メモリ1,3aで、TSパケット単位(188バイト単位)のパイプライン動作が区切られている。以上が、システムデコーダ100dの前半処理部となる。システムデコーダ100dの前半処理部の3段パイプライン動作は、図4に示した通りである。   Pipeline operations in units of TS packets (in units of 188 bytes) are delimited by the two-plane memories 1 and 3a existing in each stage. The above is the first half processing unit of the system decoder 100d. The three-stage pipeline operation of the first half processing unit of the system decoder 100d is as shown in FIG.

(3)システムデコーダ100dの後半処理部
システムデコーダ100dの後半処理部の基本構成は、図21に示したブロック図の通りである。システムデコーダ100dの後半処理部では、SDRAM4に書き込まれたデータが読み出され、AV同期をとって、システムデコーダ100dから出力される。ここで、SDRAM4からの読み出し以降の処理は、TSパケット単位のパイプライン動作とは無関係に動作する。
(3) Second Half Processing Unit of System Decoder 100d The basic configuration of the second half processing unit of the system decoder 100d is as shown in the block diagram of FIG. In the latter half processing section of the system decoder 100d, the data written in the SDRAM 4 is read out and outputted from the system decoder 100d with AV synchronization. Here, the processing after reading from the SDRAM 4 operates independently of the pipeline operation in units of TS packets.

(4)Demux処理
(4−1)DEMUX部7の構成
以下、主にPESデコーダからES抽出処理を含めたDemux処理について説明する。ここでは、DEMUX部7のDステージの動作説明を行う。Dステージには、PIDフィルタ動作部7b、TS解析部7a、Section解析部7a2、PES解析部7a3、及び分離結果を一時記憶しておくためのSRAM部3aがある。Dステージ及びWステージの動作を示すタイミングチャートは、図9に示した通りである。
(4) Demux Processing (4-1) Configuration of DEMUX Unit 7 Demux processing including mainly ES extraction processing from the PES decoder will be described below. Here, the operation of the D stage of the DEMUX unit 7 will be described. The D stage includes a PID filter operation unit 7b, a TS analysis unit 7a, a Section analysis unit 7a2, a PES analysis unit 7a3, and an SRAM unit 3a for temporarily storing a separation result. A timing chart showing the operations of the D stage and the W stage is as shown in FIG.

(4−2)DEMUX部7の処理
TS−IF部5の後段に接続されている2面メモリ1から、TSパケットデータが1パケット分(0バイト目から187バイト目まで)読み出される。この読み出しのアドレスで、TSパケットの先頭から何番目のデータであるかが識別される。このTSパケットは、読み出しアドレス値に応じて、TS解析部7aに設けられているレジスタ7a1に格納される。TS解析部7aで格納対象とされているTSデータは、TSヘッダ部のデータと、アダプテーションに相当するデータの一部、及び、セクションの場合はポインタフィールドが保持される。
(4-2) Processing of DEMUX Unit 7 TS packet data for one packet (from the 0th byte to the 187th byte) is read from the two-plane memory 1 connected to the subsequent stage of the TS-IF unit 5. This read address identifies the number of data from the beginning of the TS packet. The TS packet is stored in a register 7a1 provided in the TS analysis unit 7a according to the read address value. The TS data to be stored in the TS analysis unit 7a holds data in the TS header part, a part of data corresponding to adaptation, and a pointer field in the case of a section.

ここで、TS解析部7aのレジスタ7a1にPIDまでの情報が書き込まれた段階で、TSパケットの種別の大分類(セクションか、ビデオか、オーディオか、独立PESか)が行われる。この結果によって、セクション系かPES系(ビデオ、オーディオ、独立PES)かの識別が可能である。この結果を利用して、セクション解析部のレジスタ7a2を用いるのか、PES解析部のレジスタ7a3を用いるのかが判断される。   Here, when the information up to the PID is written in the register 7a1 of the TS analysis unit 7a, the classification of TS packet types (section, video, audio, or independent PES) is performed. Based on this result, it is possible to identify the section system or the PES system (video, audio, independent PES). Using this result, it is determined whether to use the register 7a2 of the section analysis unit or the register 7a3 of the PES analysis unit.

PES系であった場合、このPES解析部のレジスタ7a3に、PESヘッダに対応する情報のうち必要な部分(PES先頭から13バイトで、PESヘッダ長を含む)のみが格納される。ここで、アダプテーションのサイズによっては、PESのヘッダがTSパケットの単位(188バイト)よりも大きい場合があり得る。従って、PESデコードを行うフィルタ数分のレジスタ7a3が搭載されており、各レジスタ7a3は、書き込んだ位置を把握できるPESヘッダライトポインタを有している。TSパケットを跨いだ場合は、このPESヘッダライトポインタが停止される。ここで、TSパケットが終了するまでにPESヘッダ長のダウンカウンタ値が終了しなかった場合には、PESヘッダ部でTSパケットを跨ったことになる。一方、TSパケットが終了するまでにPESヘッダ長のダウンカウンタが終了した場合には、PESヘッダ部以降でTSパケットを跨いだことになる。PESヘッダ長のダウンカウンタ終了時点で、PESヘッダライトポインタはクリアされる。継続して受信再開する場合の動作は、PIDでのフィルタヒット判定と、PID別で管理しているPESヘッダライトポインタとを参照することで、PESヘッダの情報抽出を再開可能となる。なお、PESはPIDのみでフィルタリングが可能なため、特に継続フラグは必要ない。   In the case of the PES system, only the necessary portion (13 bytes from the beginning of the PES and including the PES header length) of the information corresponding to the PES header is stored in the register 7a3 of the PES analysis unit. Here, depending on the size of the adaptation, the PES header may be larger than the TS packet unit (188 bytes). Therefore, registers 7a3 corresponding to the number of filters for performing PES decoding are mounted, and each register 7a3 has a PES header write pointer that can grasp the written position. When straddling TS packets, this PES header write pointer is stopped. Here, when the down counter value of the PES header length does not end by the end of the TS packet, the TS packet is straddled by the PES header portion. On the other hand, when the PES header length down counter is completed before the TS packet is completed, the TS packet is straddled after the PES header part. At the end of the PES header length down counter, the PES header write pointer is cleared. In the case of continuous reception restart, the PES header information extraction can be restarted by referring to the filter hit determination by PID and the PES header write pointer managed for each PID. Since PES can be filtered only by PID, no continuation flag is required.

セクション系であった場合、セクション解析部のレジスタ7a2に、セクションヘッダに対応する情報のうち必要な部分(セクションの先頭から6バイト分。但しセクション長にも依存する)のみが格納される。ここで、アダプテーションのサイズに依存して、セクションヘッダ部に相当するデータをセクション解析部のレジスタ7a2に格納終了する前に、TSパケットが終了してしまうことがあり得る。そのため、セクション解析部でも、セクションヘッダをどこまで書き込んだかを把握できるように、セクションヘッダライトポインタを各々持つとともに、フィルタ番号毎に継続フラグが設けられている。セクションヘッダライトポインタ値と継続フラグとを参照することで、TSパケットを跨いだ後、暫くして後続のセクション部のデータを受信した場合であっても、セクションヘッダの情報抽出を再開可能となる。   In the case of a section system, only the necessary portion (for 6 bytes from the beginning of the section, depending on the section length) of the information corresponding to the section header is stored in the register 7a2 of the section analysis section. Here, depending on the size of the adaptation, the TS packet may end before the data corresponding to the section header section is stored in the register 7a2 of the section analysis section. For this reason, each section analysis unit has a section header write pointer and a continuation flag for each filter number so that the section analysis unit can grasp how much the section header has been written. By referring to the section header write pointer value and the continuation flag, the section header information extraction can be resumed even if the data of the subsequent section is received for a while after straddling the TS packet. .

次に、TSパケット単位を超えた場合の処理について説明する。   Next, processing when the TS packet unit is exceeded will be described.

セクション系の場合、受信したセクションデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、(a)セクションヘッダ部をセクション解析部のレジスタ7a2に格納終了できたかどうかの判断と、(b)セクションヘッダ部に存在するセクション長情報により、TSパケット終了時点(188バイト目)で、セクション長のダウンカウントが終了しているかどうかとの判断とによって行われる。TSパケットに納まっていないと判断された場合は、フィルタにヒットしている番号の継続フラグをセットするとともに、セクション長のダウンカウンタ値をクリアする。   In the case of the section system, the determination as to whether the received section data is data that can be contained in the TS packet or not can be made as follows: The determination is made based on the determination and (b) whether or not the section length down-count is completed at the end of the TS packet (at the 188th byte) based on the section length information existing in the section header section. If it is determined that it is not contained in the TS packet, the continuation flag of the number hitting the filter is set and the section length down counter value is cleared.

なお、継続フラグのクリアは、同一フィルタにヒットしたTSパケットの、TSヘッダ情報部にあるunit_start_indicatorの値が1である場合、このTSパケットで、継続してきたセクションが終了するとともに、新たなセクションが格納されていると判断する。ここで、新たなセクションの開始位置は、pointer_fieldで示される。   In addition, when the value of unit_start_indicator in the TS header information part of the TS packet that hits the same filter is 1, the continuation flag is cleared. Judge that stored. Here, the start position of the new section is indicated by pointer_field.

PES系の場合、受信したPESデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、PESヘッダ部についてのみ実施される。   In the case of the PES system, the determination as to whether the received PES data is data that fits in the TS packet or data that does not fit is performed only for the PES header part.

PESヘッダライトポインタ(PESヘッダをどこまでPES解析部のレジスタ7a3に格納できたかを示すポインタ。PESヘッダ長による終了で、PESヘッダ終了と判断される。)が終了していない状態で、TSパケットが終了(188バイト目)した場合、PESヘッダがTSパケットを跨ったと判断し、フィルタにヒットしている番号の継続フラグがセットされる。この継続フラグは、PES解析部で複数セット設けられているレジスタセットのうちのどのレジスタセットかを識別するのに用いられる。   In a state where the PES header write pointer (pointer indicating how far the PES header has been stored in the register 7a3 of the PES analysis unit. It is determined that the PES header has ended due to the end of the PES header length) has not ended. When the process ends (at the 188th byte), it is determined that the PES header has straddled the TS packet, and the continuation flag of the number hitting the filter is set. This continuation flag is used to identify which register set of a plurality of register sets provided in the PES analysis unit.

PESヘッダ解析部が持っている継続フラグは、PESヘッダ部をPES解析部のレジスタ7a3に格納終了すると、クリアされる。   The continuation flag possessed by the PES header analysis unit is cleared when the PES header unit is stored in the register 7a3 of the PES analysis unit.

PESヘッダ部以降のPESデータ自体は、PIDのみで分離識別可能であるため、PESの長さ情報は参照されない。その代わり、TSパケットヘッダ部にあるunit_start_indicatorでPESの先頭を識別し、PESデータの先頭から分離抽出が行われる。   Since the PES data itself after the PES header part can be separated and identified only by the PID, the PES length information is not referred to. Instead, the beginning of the PES is identified by unit_start_indicator in the TS packet header portion, and separation and extraction are performed from the beginning of the PES data.

以下、抽出分離結果を一時保持するためのSRAM(2面メモリ)3aについて説明する。   Hereinafter, the SRAM (two-sided memory) 3a for temporarily holding the extraction / separation result will be described.

188バイトの塊であるTSパケットから必要なデータがフィルタリングされ、分離抽出対象と判断されたデータが、SRAM3aに格納される。本実施の形態4に係るシステムデコーダ100dでは、図23に示したように、セクション/独立PES系、オーディオ系、及びビデオ系に共通する2面SRAM(188バイトのメモリ×2個)3aが設けられている。   Necessary data is filtered from the TS packet which is a lump of 188 bytes, and the data determined to be separated and extracted is stored in the SRAM 3a. In the system decoder 100d according to the fourth embodiment, as shown in FIG. 23, a two-plane SRAM (188-byte memory × 2 pieces) 3a common to the section / independent PES system, the audio system, and the video system is provided. It has been.

(5)Wステージの処理
Wステージでは、Dステージの最終段にある188バイトの2面メモリ3aからSDRAM4へのデータの転送及び書き込みが行われる。Wステージも、1TSパケット期間のステージとなる。SRAM3aからSDRAM4へ書き込まれるデータには、セクション、独立PES、オーディオPES、及びビデオESがある。
(5) W Stage Processing In the W stage, data is transferred and written from the 188-byte two-plane memory 3a in the final stage of the D stage to the SDRAM 4. The W stage is also a stage of 1 TS packet period. The data written from the SRAM 3a to the SDRAM 4 includes a section, an independent PES, an audio PES, and a video ES.

セクションの書き込みでは、SDRAM4の複数領域への書き込みが発生する場合がある。マルチセクションにおいては、1TSパケット内に複数個の異なるセクションが格納されている場合があり、この場合はSDRAM4への書き込み領域がセクションごとに異なるためである。   In section writing, writing to a plurality of areas of the SDRAM 4 may occur. In the multi-section, a plurality of different sections may be stored in one TS packet, and in this case, the write area to the SDRAM 4 is different for each section.

独立PES、オーディオPES、及びビデオESの場合は、1TSパケット期間単位の動作において、SDRAM4への書き込み領域が異なる事態は発生しない。   In the case of an independent PES, an audio PES, and a video ES, a situation in which the write area to the SDRAM 4 is different does not occur in the operation in units of 1 TS packet period.

以上により、PESデータからPESヘッダ部を削除した後のESデータを抽出してSDRAM4に蓄えることができ、時刻管理を行いながらSDRAM4から必要なデータを読み出して、後段のビデオデコーダやオーディオデコーダにESを提供できるシステムデコーダ100dを構成することができる。   As described above, the ES data after the PES header portion is deleted from the PES data can be extracted and stored in the SDRAM 4, and the necessary data is read from the SDRAM 4 while performing time management, and the ES and the video decoder and the audio decoder in the subsequent stage are read out. Can be configured.

本実施の形態4に係るシステムデコーダ100dによると、TSパケット単位で処理が完結するパイプライン動作が可能であるため、PESデコーダ専用の大規模なメモリが不要となる。そのため、オンチップ又はオフチップでPESデコード用メモリを構成した場合と比較して、チップ製造コストを低減できる効果がある。また、PESデコーダ専用の大規模メモリが不要となるため、このメモリへのアクセスが削減できる。そのため、外部バスの帯域を他のアクセスへ割り振ることが可能となる。例えば、CPUがSDRAM4をワークメモリとして用いるためのアクセス帯域として割り振ることも可能となる。しかも、外部メモリアクセスが低減したので、外部アクセス周波数を下げることが可能となって消費電力が低減されるとともに、外部ピン数を削減できるためチップ製造コストを低減できる。   According to the system decoder 100d according to the fourth embodiment, since a pipeline operation that completes processing in units of TS packets is possible, a large-scale memory dedicated to the PES decoder is not necessary. Therefore, there is an effect that the chip manufacturing cost can be reduced as compared with the case where the PES decoding memory is configured on-chip or off-chip. Further, since a large-scale memory dedicated to the PES decoder is not necessary, access to this memory can be reduced. Therefore, it is possible to allocate the bandwidth of the external bus to other access. For example, it is possible to allocate an access band for the CPU to use the SDRAM 4 as a work memory. In addition, since the external memory access is reduced, the external access frequency can be lowered, the power consumption is reduced, and the number of external pins can be reduced, so that the chip manufacturing cost can be reduced.

しかも、図22に示した上記実施の形態3に係るシステムデコーダ100cから、デスクランブル部6及び2面メモリ2が省略されているため、システムデコーダ100cと比較して回路規模を削減することができる。   In addition, since the descrambling unit 6 and the two-plane memory 2 are omitted from the system decoder 100c according to the third embodiment shown in FIG. 22, the circuit scale can be reduced as compared with the system decoder 100c. .

実施の形態5.
(1)システムデコーダ100eの基本構成
図24は、本発明の実施の形態5に係るシステムデコーダ100eの前半処理部の構成を示すブロック図である。図24に示すように、システムデコーダ100eの前半処理部は、MPEG2−TS入力を受けて188バイトの同期をとるTS−IF部5と、TS−IF部5の出力を受けてDemux処理を行うDEMUX部7と、DEMUX部7から出力されたデータをSDRAM4に書き込むMediaI/F部8とを備えて構成されている。MediaI/F部8は、書き込み部8aとMediaBusI/F部8bとを有している。
Embodiment 5. FIG.
(1) Basic Configuration of System Decoder 100e FIG. 24 is a block diagram showing the configuration of the first half processing unit of the system decoder 100e according to Embodiment 5 of the present invention. As shown in FIG. 24, the first half processing unit of the system decoder 100e receives the MPEG2-TS input and performs the demux processing by receiving the TS-IF unit 5 that synchronizes 188 bytes and the output of the TS-IF unit 5. A DEMUX unit 7 and a Media I / F unit 8 that writes data output from the DEMUX unit 7 to the SDRAM 4 are configured. The Media I / F unit 8 includes a writing unit 8a and a MediaBus I / F unit 8b.

まず、システムデコーダ100eにおけるTSパケット単位でのパイプライン構成を説明し、その後、PESデコーダまで含めたDemux処理を可能としているアーキテクチャについて説明する。   First, a pipeline configuration in units of TS packets in the system decoder 100e will be described, and then an architecture that enables Demux processing including the PES decoder will be described.

(2)システムデコーダ100eのパイプライン構成
システムデコーダ100eのTSパケット単位でのパイプライン動作としては、TS−IF部5の後段に片面188バイトの2面メモリ1を配備し、IFステージを構成している。
(2) Pipeline configuration of system decoder 100e As a pipeline operation in units of TS packets of the system decoder 100e, a two-sided memory 1 of 188 bytes on one side is arranged at the rear stage of the TS-IF unit 5 to configure an IF stage. ing.

IFステージでは、以下の処理が行われる。   In the IF stage, the following processing is performed.

入力クロック(TSCLK)と共に送られてくるMPEG2−TSデータ(TSDATA)を、TSCLKで取り込む。この際、TSDATAと同時に送られてくるデータバリッド(TSVALID)を参照し、有効なデータである場合にのみ取り込みを行う。また、取り込み単位は、1バイト単位又は1ビット単位となり、選択が可能である。   MPEG2-TS data (TSDATA) sent together with the input clock (TSCLK) is captured by TSCLK. At this time, the data valid (TSVALID) sent simultaneously with TSDATA is referred to, and the data is taken in only when it is valid data. In addition, the capture unit can be selected in units of 1 byte or 1 bit.

MPEG2−TSパケットの先頭データである「47」コードを検索し、188バイト毎に「47」コードが存在することを確認し、同期捕捉を行う。   The “47” code which is the head data of the MPEG2-TS packet is searched, and it is confirmed that the “47” code exists every 188 bytes.

同期捕捉候補処理を高速化させるため、独立で動作する複数個のカウンタを搭載し、複数個の同期捕捉候補を扱う。いずれかの同期捕捉候補の同期捕捉が成立した段階で、他の同期捕捉候補をキャンセルする。   In order to speed up the synchronization acquisition candidate processing, a plurality of counters that operate independently are mounted to handle a plurality of synchronization acquisition candidates. When the synchronization acquisition of any one of the synchronization acquisition candidates is established, the other synchronization acquisition candidates are canceled.

同期捕捉が成立すると、MPEG2−TSパケットのデータを、先頭の「47」コードから順に、188バイトのメモリ1に格納し始める。   When synchronization acquisition is established, data of the MPEG2-TS packet starts to be stored in the 188-byte memory 1 in order from the first “47” code.

188バイトのメモリ1は2面あり、1面全ての書き込みが終了した面は、後段のパイプラインステージからの読み出し面に切り替わる。   The 188-byte memory 1 has two surfaces, and the surface on which writing on all the surfaces has been completed is switched to a reading surface from the subsequent pipeline stage.

DEMUX部7の後段にレジスタセット20を配備し、Dステージを構成している。   A register set 20 is provided at the subsequent stage of the DEMUX unit 7 to configure the D stage.

Dステージでは、以下の処理が行われる。   In the D stage, the following processing is performed.

IFステージの後段に設けられている188バイトの2面メモリ1のうち、書き込みが終了している面から、MPEG2−TSデータを順次読み出す。   The MPEG2-TS data is sequentially read from the side where writing has been completed in the two-sided memory 1 of 188 bytes provided at the subsequent stage of the IF stage.

読み出したMPEG2−TSパケットデータのうち、TSヘッダ部と、もし存在すればアダプテーション領域の制御データを、TS解析用レジスタ7a1に順次セットする。   Among the read MPEG2-TS packet data, the TS header portion and, if present, the control data of the adaptation area are sequentially set in the TS analysis register 7a1.

この読み出しアドレスは、MPEG2−TSパケットの188バイトのうち、どのバイトを読み出しているかの識別に用いられる。   This read address is used to identify which one of the 188 bytes of the MPEG2-TS packet is being read.

DステージでのMPEG2−TS解析、抽出分離のベースは、上記188バイトの2面メモリ1からの読み出しアドレスと、上記TS解析用レジスタ7a1の値とを参照し、MPEG2−TSパケットのデータ構造の解析が進められる。   The base of MPEG2-TS analysis and extraction / separation in the D stage refers to the read address from the 188-byte two-sided memory 1 and the value of the TS analysis register 7a1, and the data structure of the MPEG2-TS packet Analysis proceeds.

2面メモリ1からの読み出しアドレスが、PIDを読み出し終了時点まで進んだ段階で、抽出分離指定されているPIDであるかどうかの判定が行われる。   At the stage where the read address from the two-plane memory 1 has advanced to the end of reading the PID, it is determined whether or not the PID has been designated for extraction and separation.

このPID判定では、セクション系かPES系か、PES系である場合は、独立PES系か、オーディオ系か、ビデオ系かの判定が行われる。   In this PID determination, if it is a section system, a PES system, or a PES system, it is determined whether it is an independent PES system, an audio system, or a video system.

トランスポートスクランブルコントロール、アダプテーションフィールドコントロール、コンティニュティカウンター値を、TS解析用レジスタ7a1にセットする。   The transport scramble control, adaptation field control, and continuity counter value are set in the TS analysis register 7a1.

コンティニュティカウンター値とアダプテーションフィールドコントロール値とをチェックし、廃棄対象のペイロードを持ったMPEG2−TSパケットであるかどうかの判定と、アダプテーション領域の有無、ペイロードの有無が判断される。   The continuity counter value and the adaptation field control value are checked to determine whether the packet is an MPEG2-TS packet having a payload to be discarded, whether there is an adaptation area, and whether there is a payload.

次に、アダプテーションフィールドが存在する場合は、引き続きTS解析用レジスタ7a1にアダプテーション領域のデータをセットする。   Next, if there is an adaptation field, the data in the adaptation area is continuously set in the TS analysis register 7a1.

アダプテーション領域の先頭はアダプテーションレングスであり、このレングスをチェックして、その値が0でなければ、アダプテーションレングス値をアダプテーションレングスカウンタへセットし、ダウンカウントを開始する。アダプテーションレングスが0である場合は、次のバイトは、セクション系データの場合はポインタフィールドとなり、PES系データの場合はPESの先頭バイトであると判断する。   The beginning of the adaptation area is the adaptation length, and this length is checked. If the value is not 0, the adaptation length value is set in the adaptation length counter, and down-counting is started. When the adaptation length is 0, it is determined that the next byte is a pointer field in the case of section data, and the first byte of the PES in the case of PES data.

アダプテーションレングスが0でない場合は、次のバイトが、PCRフラグ(PCRを含んだMPEG2−TSパケットかどうかの識別子)とか、含んでいるPCRが不連続PCRであるかどうかの識別子であるディスコンティニュティインディケータを、TS解析用レジスタ7a1にセットする。   If the adaptation length is not 0, the next byte includes a PCR flag (identifier indicating whether the packet is an MPEG2-TS packet including PCR) or a discontinuity indicating whether the included PCR is a discontinuous PCR. The tee indicator is set in the TS analysis register 7a1.

PCRフラグで、PCRがあることが判明すれば、PCRの抽出を行う。この時、システムデコーダ100eの時計であるSTCへPCR値をロードするか否かは、PCRのロード制御レジスタ値によって制御される。   If the PCR flag indicates that there is a PCR, the PCR is extracted. At this time, whether or not to load the PCR value to the STC which is the clock of the system decoder 100e is controlled by the load control register value of the PCR.

ディスコンティニュティインディケータがセットされていれば、MPEG2−TSパケットに含まれているPCRが、不連続PCRであると判断する。不連続PCRのSTCへのロード制御は、PCRのロード制御レジスタ値によって制御される。   If the discontinuity indicator is set, it is determined that the PCR included in the MPEG2-TS packet is a discontinuous PCR. The load control of the discontinuous PCR to the STC is controlled by the PCR load control register value.

不連続PCRのSTCへのロードは、SDRAM4に既に蓄えられているビデオES、オーディオESのタイムスタンプ値との関係が不連続になることも意味しているので、既に蓄えられているAVフレームデータ(ビデオES/オーディオES)に対応したタイムスタンプのValidビットを無効化する。ここで、このValidビットは、タイムスタンプ値が有効か無効かの識別に用いられる。有効な場合は、システムデコーダ100eからフレームデータを出力すべき時刻まで待たせる処理を行う時に、STCとの比較に用いるタイムスタンプ値として利用される。無効な場合は、出力すべき時刻まで待たせる処理は行われない。   The loading of the discontinuous PCR into the STC also means that the relationship with the time stamp values of the video ES and audio ES already stored in the SDRAM 4 becomes discontinuous, so that the AV frame data already stored is stored. The valid bit of the time stamp corresponding to (video ES / audio ES) is invalidated. Here, the Valid bit is used for identifying whether the time stamp value is valid or invalid. When it is valid, it is used as a time stamp value used for comparison with the STC when performing processing for waiting until the time when the frame data is to be output from the system decoder 100e. If it is invalid, the process for waiting until the time to be output is not performed.

アダプテーションフィールドが終了すると、PIDフィルタリングの結果が、セクション系であるか、PES系であるかで、処理が分岐される。   When the adaptation field ends, the process branches depending on whether the PID filtering result is a section system or a PES system.

TSヘッダ部のユニットスタートインディケータがセットされている場合は、セクション系の場合はセクションの先頭データを含むため、ペイロードの前に1バイトのポインタフィールドがあると判断される。また、PES系の場合はペイロードの先頭からPESデータが格納されていると判断される。   When the unit start indicator of the TS header is set, it is determined that there is a 1-byte pointer field in front of the payload because the section head includes section start data. In the case of the PES system, it is determined that PES data is stored from the beginning of the payload.

セクション系の場合は、セクション解析用レジスタ7a2に、セクションヘッダ部がセットされる。   In the case of a section system, a section header part is set in the section analysis register 7a2.

セクションの先頭バイトはテーブルIDである。セクションのフィルタリングは、セクションヘッダ部が揃ってから実施されるが、テーブルIDでMPEG2−TSパケットが終了する場合もある。この場合は、PIDとテーブルIDとでのフィルタリングを実施し、継続フラグが立っているかどうかを確認した後、継続フラグがセットされていなければ、セクション用フィルタのどの番号のフィルタでMPEG2−TSパケットを跨いだセクションを受信したかを記憶しておくための継続フラグをセットする。   The first byte of the section is a table ID. Section filtering is performed after the section headers are aligned, but the MPEG2-TS packet may end with a table ID. In this case, filtering by PID and table ID is performed and it is confirmed whether or not the continuation flag is set. Sets a continuation flag for storing whether or not a section straddling has been received.

ここで、継続フラグは、全てのフィルタに対で装備される。   Here, the continuation flag is provided in pairs for all the filters.

継続フラグのクリアは、継続フラグがセットされているフィルタにヒットしたMPEG2−TSパケットに格納されている、TSヘッダ部のユニットスタートインディケータが1であった場合に実施する。このMPEG2−TSパケットで継続してきたセクションが終了し、新たなセクションが格納されていると判断し、継続フラグがクリアされる。   The continuation flag is cleared when the unit start indicator in the TS header portion stored in the MPEG2-TS packet that hits the filter for which the continuation flag is set is 1. The section continued in the MPEG2-TS packet ends, and it is determined that a new section is stored, and the continuation flag is cleared.

ここで、MPEG2−TSパケットが、セクションヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、セクション解析用レジスタ7a2は、レジスタセットとしてセクションフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the section header portion, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the section analysis register 7a2 is a section filter as a register set. Installed for a few minutes.

PES系の場合、PES解析用レジスタ7a3に、PESヘッダ部がセットされる。   In the case of the PES system, the PES header portion is set in the PES analysis register 7a3.

PESヘッダの先頭は、パケットスタートコードプリフィックスの固定コード「000001」となっている。PESヘッダの先頭から8バイト目がPTSDTSフラグ(PTS,DTSであるタイムスタンプを含んでいるか否かの識別子)であり、タイムスタンプを含んでいる場合は、抽出を行う予定とされる。   The head of the PES header is a fixed code “000001” of the packet start code prefix. The 8th byte from the beginning of the PES header is a PTSDTS flag (an identifier indicating whether or not a time stamp that is PTS or DTS is included). If the time stamp is included, extraction is scheduled to be performed.

次のバイトがPESヘッダ長であり、PESヘッダ長の値が0でない場合は、PESヘッダ長ダウンカウンタに値がセットされ、ダウンカウントが行われる。   When the next byte is the PES header length and the value of the PES header length is not 0, a value is set in the PES header length down counter, and down counting is performed.

PESヘッダ長のダウンカウントが終了した時点に、ESデータの先頭バイトが存在する。   At the time when the PES header length down-count is completed, the first byte of the ES data exists.

ESデータの抽出では、このPESヘッダ部の削除処理を実施することで、ES抽出が実現される。   In the extraction of ES data, the ES extraction is realized by performing the deletion process of the PES header part.

MPEG2−TSパケットが、PESヘッダ部の途中で終了した場合は、PESヘッダ部のどのバイトから再開すればよいかは、PESヘッダ長のダウンカウンタ値と、継続フラグとによって判別されることとなる。   When the MPEG2-TS packet ends in the middle of the PES header part, it is determined from the PES header length down counter value and the continuation flag which byte of the PES header part should be resumed. .

ここで、MPEG2−TSパケットが、PESヘッダ部の途中で終了する場合、次のMPEG2−TSパケットデータが、続きのパケットデータとは限らないため、PESヘッダ解析用レジスタ7a3は、レジスタセットとして、PID設定できるPESフィルタ数分搭載されている。   Here, when the MPEG2-TS packet ends in the middle of the PES header part, the next MPEG2-TS packet data is not necessarily the subsequent packet data, so the PES header analysis register 7a3 is a register set. There are as many PES filters as PID setting.

セクション系、PES系いずれの場合も、188バイトのメモリ2からの読み出しアドレスで、MPEG2−TSパケットのどのバイトを処理しているか、MPEG2−TSの終了を認識し、継続フラグをセットするか否かの判定が行われる。   Whether the section system or the PES system is used, the 188-byte read address from the memory 2 indicates which byte of the MPEG2-TS packet is being processed, recognizes the end of the MPEG2-TS, and sets the continuation flag. Is determined.

その後、MediaI/F部8からSDRAM4への書き込みが随時行われる。ここでは、以下の処理が行われる。   Thereafter, writing from the Media I / F unit 8 to the SDRAM 4 is performed as needed. Here, the following processing is performed.

Dステージの後段に設けられているレジスタセット20のうち、書き込みが終了しているレジスタのデータが、SDRAM4へ書き込まれる。ここで、レジスタセット20は2個のレジスタから成り、各レジスタの容量は、SDRAM4への書き込みトランザクション単位である。   Of the register set 20 provided after the D stage, the data of the register for which writing has been completed is written to the SDRAM 4. Here, the register set 20 is composed of two registers, and the capacity of each register is a write transaction unit to the SDRAM 4.

書き込み単位は、Storeトランザクションで発行可能なサイズとなる。セクション、PES、ESいずれも、MPEG2−TSパケットの188バイトから抽出分離した数バイト程度のデータ単位となる。   The write unit is a size that can be issued by a Store transaction. Each of the section, PES, and ES is a data unit of about several bytes extracted and separated from 188 bytes of the MPEG2-TS packet.

SDRAM4への書き込み処理はDステージで実行されるが、Dステージの期間内にSDRAM4への書き込みが終了しない場合は、バスエラー割り込みが発生される。   The writing process to the SDRAM 4 is executed at the D stage. If the writing to the SDRAM 4 is not completed within the period of the D stage, a bus error interrupt is generated.

IFステージの後段に接続されている2面メモリ1で、TSパケット単位(188バイト単位)のパイプライン動作が区切られている。以上が、システムデコーダ100eの前半処理部となる。システムデコーダ100eの前半処理部の2段パイプライン動作は、図6に示した通りである。   Pipeline operations in units of TS packets (in units of 188 bytes) are delimited in the two-plane memory 1 connected to the subsequent stage of the IF stage. The above is the first half processing unit of the system decoder 100e. The two-stage pipeline operation of the first half processing unit of the system decoder 100e is as shown in FIG.

(3)システムデコーダ100eの後半処理部
システムデコーダ100eの後半処理部の基本構成は、図21に示したブロック図の通りである。システムデコーダ100eの後半処理部では、SDRAM4に書き込まれたデータが読み出され、AV同期をとって、システムデコーダ100eから出力される。ここで、SDRAM4からの読み出し以降の処理は、TSパケット単位のパイプライン動作とは無関係に動作する。
(3) Second Half Processing Unit of System Decoder 100e The basic configuration of the second half processing unit of the system decoder 100e is as shown in the block diagram of FIG. In the latter half processing unit of the system decoder 100e, the data written in the SDRAM 4 is read out and output from the system decoder 100e with AV synchronization. Here, the processing after reading from the SDRAM 4 operates independently of the pipeline operation in units of TS packets.

(4)Demux処理
(4−1)DEMUX部7の構成
以下、主にPESデコーダからES抽出処理を含めたDemux処理について説明する。ここでは、DEMUX部7のDステージの動作説明を行う。Dステージには、PIDフィルタ動作部7b、TS解析部7a、Section解析部7a2、PES解析部7a3、及び分離結果を一時記憶しておくためのレジスタセット20がある。図25は、Dステージの動作を示すタイミングチャートである。
(4) Demux Processing (4-1) Configuration of DEMUX Unit 7 Demux processing including mainly ES extraction processing from the PES decoder will be described below. Here, the operation of the D stage of the DEMUX unit 7 will be described. The D stage includes a PID filter operation unit 7b, a TS analysis unit 7a, a Section analysis unit 7a2, a PES analysis unit 7a3, and a register set 20 for temporarily storing a separation result. FIG. 25 is a timing chart showing the operation of the D stage.

(4−2)DEMUX部7の処理
TS−IF部5の後段に接続されている2面メモリ1から、TSパケットデータが1パケット分(0バイト目から187バイト目まで)読み出される。この読み出しのアドレスで、TSパケットの先頭から何番目のデータであるかが識別される。このTSパケットは、読み出しアドレス値に応じて、TS解析部7aに設けられているレジスタ7a1に格納される。TS解析部7aで格納対象とされているTSデータは、TSヘッダ部のデータと、アダプテーションに相当するデータの一部、及び、セクションの場合はポインタフィールドが保持される。
(4-2) Processing of DEMUX Unit 7 TS packet data for one packet (from the 0th byte to the 187th byte) is read from the two-plane memory 1 connected to the subsequent stage of the TS-IF unit 5. This read address identifies the number of data from the beginning of the TS packet. The TS packet is stored in a register 7a1 provided in the TS analysis unit 7a according to the read address value. The TS data to be stored in the TS analysis unit 7a holds data in the TS header part, a part of data corresponding to adaptation, and a pointer field in the case of a section.

ここで、TS解析部7aのレジスタ7a1にPIDまでの情報が書き込まれた段階で、TSパケットの種別の大分類(セクションか、ビデオか、オーディオか、独立PESか)が行われる。この結果によって、セクション系かPES系(ビデオ、オーディオ、独立PES)かの識別が可能である。この結果を利用して、セクション解析部のレジスタ7a2を用いるのか、PES解析部のレジスタ7a3を用いるのかが判断される。   Here, when the information up to the PID is written in the register 7a1 of the TS analysis unit 7a, the classification of TS packet types (section, video, audio, or independent PES) is performed. Based on this result, it is possible to identify the section system or the PES system (video, audio, independent PES). Using this result, it is determined whether to use the register 7a2 of the section analysis unit or the register 7a3 of the PES analysis unit.

PES系であった場合、このPES解析部のレジスタ7a3に、PESヘッダに対応する情報のうち必要な部分(PES先頭から13バイトで、PESヘッダ長を含む)のみが格納される。ここで、アダプテーションのサイズによっては、PESのヘッダがTSパケットの単位(188バイト)よりも大きい場合があり得る。従って、PESデコードを行うフィルタ数分のレジスタ7a3が搭載されており、各レジスタ7a3は、書き込んだ位置を把握できるPESヘッダライトポインタを有している。TSパケットを跨いだ場合は、このPESヘッダライトポインタが停止される。ここで、TSパケットが終了するまでにPESヘッダ長のダウンカウンタ値が終了しなかった場合には、PESヘッダ部でTSパケットを跨ったことになる。一方、TSパケットが終了するまでにPESヘッダ長のダウンカウンタが終了した場合には、PESヘッダ部以降でTSパケットを跨いだことになる。PESヘッダ長のダウンカウンタ終了時点で、PESヘッダライトポインタはクリアされる。継続して受信再開する場合の動作は、PIDでのフィルタヒット判定と、PID別で管理しているPESヘッダライトポインタとを参照することで、PESヘッダの情報抽出を再開可能となる。なお、PESはPIDのみでフィルタリングが可能なため、特に継続フラグは必要ない。   In the case of the PES system, only the necessary portion (13 bytes from the beginning of the PES and including the PES header length) of the information corresponding to the PES header is stored in the register 7a3 of the PES analysis unit. Here, depending on the size of the adaptation, the PES header may be larger than the TS packet unit (188 bytes). Therefore, registers 7a3 corresponding to the number of filters for performing PES decoding are mounted, and each register 7a3 has a PES header write pointer that can grasp the written position. When straddling TS packets, this PES header write pointer is stopped. Here, when the down counter value of the PES header length does not end by the end of the TS packet, the TS packet is straddled by the PES header portion. On the other hand, when the PES header length down counter is completed before the TS packet is completed, the TS packet is straddled after the PES header part. At the end of the PES header length down counter, the PES header write pointer is cleared. In the case of continuous reception restart, the PES header information extraction can be restarted by referring to the filter hit determination by PID and the PES header write pointer managed for each PID. Since PES can be filtered only by PID, no continuation flag is required.

セクション系であった場合、セクション解析部のレジスタ7a2に、セクションヘッダに対応する情報のうち必要な部分(セクションの先頭から6バイト分。但しセクション長にも依存する)のみが格納される。ここで、アダプテーションのサイズに依存して、セクションヘッダ部に相当するデータをセクション解析部のレジスタ7a2に格納終了する前に、TSパケットが終了してしまうことがあり得る。そのため、セクション解析部でも、セクションヘッダをどこまで書き込んだかを把握できるように、セクションヘッダライトポインタを各々持つとともに、フィルタ番号毎に継続フラグが設けられている。セクションヘッダライトポインタ値と継続フラグとを参照することで、TSパケットを跨いだ後、暫くして後続のセクション部のデータを受信した場合であっても、セクションヘッダの情報抽出を再開可能となる。   In the case of a section system, only the necessary portion (for 6 bytes from the beginning of the section, depending on the section length) of the information corresponding to the section header is stored in the register 7a2 of the section analysis section. Here, depending on the size of the adaptation, the TS packet may end before the data corresponding to the section header section is stored in the register 7a2 of the section analysis section. For this reason, each section analysis unit has a section header write pointer and a continuation flag for each filter number so that the section analysis unit can grasp how much the section header has been written. By referring to the section header write pointer value and the continuation flag, the section header information extraction can be resumed even if the data of the subsequent section is received for a while after straddling the TS packet. .

次に、TSパケット単位を超えた場合の処理について説明する。   Next, processing when the TS packet unit is exceeded will be described.

セクション系の場合、受信したセクションデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、(a)セクションヘッダ部をセクション解析部のレジスタ7a2に格納終了できたかどうかの判断と、(b)セクションヘッダ部に存在するセクション長情報により、TSパケット終了時点(188バイト目)で、セクション長のダウンカウントが終了しているかどうかとの判断とによって行われる。TSパケットに納まっていないと判断された場合は、フィルタにヒットしている番号の継続フラグをセットするとともに、セクション長のダウンカウンタ値をクリアする。   In the case of the section system, the determination as to whether the received section data is data that can be contained in the TS packet or not can be made as follows: The determination is made based on the determination and (b) whether or not the section length down-count is completed at the end of the TS packet (at the 188th byte) based on the section length information existing in the section header section. If it is determined that it is not contained in the TS packet, the continuation flag of the number hitting the filter is set and the section length down counter value is cleared.

なお、継続フラグのクリアは、同一フィルタにヒットしたTSパケットの、TSヘッダ情報部にあるunit_start_indicatorの値が1である場合、このTSパケットで、継続してきたセクションが終了するとともに、新たなセクションが格納されていると判断する。ここで、新たなセクションの開始位置は、pointer_fieldで示される。   In addition, when the value of unit_start_indicator in the TS header information part of the TS packet that hits the same filter is 1, the continuation flag is cleared. Judge that stored. Here, the start position of the new section is indicated by pointer_field.

PES系の場合、受信したPESデータが、TSパケットに納まるデータであるか、納まらないデータであるかの判断は、PESヘッダ部についてのみ実施される。   In the case of the PES system, the determination as to whether the received PES data is data that fits in the TS packet or data that does not fit is performed only for the PES header part.

PESヘッダライトポインタ(PESヘッダをどこまでPES解析部のレジスタ7a3に格納できたかを示すポインタ。PESヘッダ長による終了で、PESヘッダ終了と判断される。)が終了していない状態で、TSパケットが終了(188バイト目)した場合、PESヘッダがTSパケットを跨ったと判断し、フィルタにヒットしている番号の継続フラグがセットされる。この継続フラグは、PES解析部で複数セット設けられているレジスタセットのうちのどのレジスタセットかを識別するのに用いられる。   In a state where the PES header write pointer (pointer indicating how far the PES header has been stored in the register 7a3 of the PES analysis unit. It is determined that the PES header has ended due to the end of the PES header length) has not ended. When the process ends (at the 188th byte), it is determined that the PES header has straddled the TS packet, and the continuation flag of the number hitting the filter is set. This continuation flag is used to identify which register set of a plurality of register sets provided in the PES analysis unit.

PESヘッダ解析部が持っている継続フラグは、PESヘッダ部をPES解析部のレジスタ7a3に格納終了すると、クリアされる。   The continuation flag possessed by the PES header analysis unit is cleared when the PES header unit is stored in the register 7a3 of the PES analysis unit.

PESヘッダ部以降のPESデータ自体は、PIDのみで分離識別可能であるため、PESの長さ情報は参照されない。その代わり、TSパケットヘッダ部にあるunit_start_indicatorでPESの先頭を識別し、PESデータの先頭から分離抽出が行われる。   Since the PES data itself after the PES header part can be separated and identified only by the PID, the PES length information is not referred to. Instead, the beginning of the PES is identified by unit_start_indicator in the TS packet header portion, and separation and extraction are performed from the beginning of the PES data.

以下、抽出分離結果を一時保持するためのレジスタセット20について説明する。   Hereinafter, the register set 20 for temporarily holding the extraction / separation result will be described.

188バイトの塊であるTSパケットから必要なデータがフィルタリングされ、分離抽出対象と判断されたデータが、Storeトランザクション単位でレジスタセット20に格納される。従って、各数バイト(一例として8バイト)程度の2個のレジスタによってレジスタセット20を構成すれば十分となる。   Necessary data is filtered from the TS packet that is a lump of 188 bytes, and the data determined to be separated and extracted is stored in the register set 20 in units of Store transactions. Accordingly, it is sufficient to configure the register set 20 with two registers each having a few bytes (eight bytes as an example).

(5)DステージのSDRAM書き込み処理
Dステージの最終段にある各8バイトの2面レジスタセット20からSDRAM4へのデータの転送及び書き込みが行われる。SDRAM4への書き込みは、Dステージの1TSパケット期間内に処理される。レジスタセット20からSDRAM4へ書き込まれるデータには、セクション、独立PES、オーディオPES、及びビデオESがある。
(5) D-stage SDRAM write processing Data is transferred and written from the 8-byte two-sided register set 20 in the final stage of the D stage to the SDRAM 4. Writing to the SDRAM 4 is processed within 1 TS packet period of the D stage. Data written from the register set 20 to the SDRAM 4 includes a section, an independent PES, an audio PES, and a video ES.

セクションの書き込みでは、SDRAM4の複数領域への書き込みが発生する場合がある。マルチセクションにおいては、1TSパケット内に複数個の異なるセクションが格納されている場合があり、この場合はSDRAM4への書き込み領域がセクションごとに異なるためである。   In section writing, writing to a plurality of areas of the SDRAM 4 may occur. In the multi-section, a plurality of different sections may be stored in one TS packet, and in this case, the write area to the SDRAM 4 is different for each section.

独立PES、オーディオPES、及びビデオESの場合は、1TSパケット期間単位の動作において、SDRAM4への書き込み領域が異なる事態は発生しない。   In the case of an independent PES, an audio PES, and a video ES, a situation in which the write area to the SDRAM 4 is different does not occur in the operation in units of 1 TS packet period.

以上により、PESデータからPESヘッダ部を削除した後のESデータを抽出してSDRAM4に蓄えることができ、時刻管理を行いながらSDRAM4から必要なデータを読み出して、後段のビデオデコーダやオーディオデコーダにESを提供できるシステムデコーダ100aを構成することができる。   As described above, the ES data after the PES header portion is deleted from the PES data can be extracted and stored in the SDRAM 4, and the necessary data is read from the SDRAM 4 while performing time management, and the ES and the video decoder and audio decoder in the subsequent stage are read out. The system decoder 100a can be configured.

本実施の形態5に係るシステムデコーダ100eによると、TSパケット単位で処理が完結するパイプライン動作が可能であるため、PESデコーダ専用の大規模なメモリが不要となる。そのため、オンチップ又はオフチップでPESデコード用メモリを構成した場合と比較して、チップ製造コストを低減できる効果がある。また、PESデコーダ専用の大規模メモリが不要となるため、このメモリへのアクセスが削減できる。そのため、外部バスの帯域を他のアクセスへ割り振ることが可能となる。例えば、CPUがSDRAM4をワークメモリとして用いるためのアクセス帯域として割り振ることも可能となる。しかも、外部メモリアクセスが低減したので、外部アクセス周波数を下げることが可能となって消費電力が低減されるとともに、外部ピン数を削減できるためチップ製造コストを低減できる。   According to the system decoder 100e according to the fifth embodiment, since a pipeline operation that completes processing in units of TS packets is possible, a large-scale memory dedicated to the PES decoder is not necessary. Therefore, there is an effect that the chip manufacturing cost can be reduced as compared with the case where the PES decoding memory is configured on-chip or off-chip. Further, since a large-scale memory dedicated to the PES decoder is not necessary, access to this memory can be reduced. Therefore, it is possible to allocate the bandwidth of the external bus to other access. For example, it is possible to allocate an access band for the CPU to use the SDRAM 4 as a work memory. In addition, since the external memory access is reduced, the external access frequency can be lowered, the power consumption is reduced, and the number of external pins can be reduced, so that the chip manufacturing cost can be reduced.

しかも、図7に示した上記実施の形態1に係るシステムデコーダ100aから、デスクランブル部6及び2面メモリ2,3a〜3cが省略されているため、システムデコーダ100aと比較して回路規模を大幅に削減することができる。   In addition, since the descrambling unit 6 and the two-plane memories 2 and 3a to 3c are omitted from the system decoder 100a according to the first embodiment shown in FIG. 7, the circuit scale is greatly increased as compared with the system decoder 100a. Can be reduced.

第1の発明に係るシステムデコーダの構成を概略的に示すブロック図である。It is a block diagram which shows roughly the structure of the system decoder based on 1st invention. 第1の発明に係るシステムデコーダのパイプライン処理を示すタイミングチャートである。It is a timing chart which shows the pipeline process of the system decoder which concerns on 1st invention. 第2の発明に係るシステムデコーダの構成を概略的に示すブロック図である。It is a block diagram which shows roughly the structure of the system decoder based on 2nd invention. 第2の発明に係るシステムデコーダのパイプライン処理を示すタイミングチャートである。It is a timing chart which shows the pipeline process of the system decoder which concerns on 2nd invention. 第3の発明に係るシステムデコーダの構成を概略的に示すブロック図である。It is a block diagram which shows roughly the structure of the system decoder based on 3rd invention. 第3の発明に係るシステムデコーダのパイプライン処理を示すタイミングチャートである。It is a timing chart which shows the pipeline process of the system decoder which concerns on 3rd invention. 本発明の実施の形態1に係るシステムデコーダの前半処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the first half process part of the system decoder which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るシステムデコーダの後半処理部の基本構成を示すブロック図である。It is a block diagram which shows the basic composition of the latter half process part of the system decoder which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るシステムデコーダに関して、Dステージ及びWステージの動作を示すタイミングチャートである。6 is a timing chart showing operations of a D stage and a W stage with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、セクション解析用レジスタ周辺の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration around a section analysis register in the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、PES解析用レジスタ周辺の構成を示すブロック図である。FIG. 2 is a block diagram showing a configuration around a PES analysis register in the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、TSデータの解析からセクションの分離までの動作を示すタイミングチャートである。4 is a timing chart showing operations from analysis of TS data to section separation with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、TSデータの解析からマルチセクションの抽出分離動作を示すタイミングチャートである。5 is a timing chart showing multi-section extraction / separation operation from analysis of TS data, with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、TSデータの解析から、セクションの分離抽出時、セクションヘッダ部においてTSパケットが終了した場合の動作を示すタイミングチャートである。FIG. 6 is a timing chart showing an operation when a TS packet is terminated in a section header at the time of section separation and extraction from analysis of TS data, with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、TSデータの解析から、セクションの分離抽出時、セクションの途中でTSパケットが終了した場合の動作を示すタイミングチャートである。5 is a timing chart showing an operation when a TS packet is terminated in the middle of a section from the analysis of TS data, when a section is separated and extracted, with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、TSデータの解析から、ポインタフィールドで示されるデータより手前のデータの抽出分離動作を示すタイミングチャートである。6 is a timing chart showing an operation of extracting and separating data before data indicated by a pointer field from analysis of TS data, with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、セクションの抽出時、ポインタフィールドがない場合の動作を示すタイミングチャートである。6 is a timing chart showing an operation when there is no pointer field when a section is extracted with respect to the system decoder according to the first embodiment of the present invention. 本発明の実施の形態1に係るシステムデコーダに関して、セクションを含むMPEG2−TSの例を示す図である。It is a figure which shows the example of MPEG2-TS containing a section regarding the system decoder which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るシステムデコーダに関して、PESヘッダ部の例を示す図である。It is a figure which shows the example of a PES header part regarding the system decoder which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係るシステムデコーダの前半処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the first half process part of the system decoder which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係るシステムデコーダの後半処理部の基本構成を示すブロック図である。It is a block diagram which shows the basic composition of the latter half process part of the system decoder which concerns on Embodiment 2 of this invention. 本発明の実施の形態3に係るシステムデコーダの前半処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the first half process part of the system decoder which concerns on Embodiment 3 of this invention. 本発明の実施の形態4に係るシステムデコーダの前半処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the first half process part of the system decoder which concerns on Embodiment 4 of this invention. 本発明の実施の形態5に係るシステムデコーダの前半処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the first half process part of the system decoder which concerns on Embodiment 5 of this invention. 本発明の実施の形態5に係るシステムデコーダに関して、Dステージの動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of D stage regarding the system decoder which concerns on Embodiment 5 of this invention.

符号の説明Explanation of symbols

1〜3,3a〜3c メモリ、4 外部記憶装置、5 TS−IF部、6 デスクランブル部、7 DEMUX部。
1-3, 3a-3c Memory, 4 External storage device, 5 TS-IF part, 6 Descramble part, 7 DEMUX part.

Claims (4)

TS(Transport Stream)データを同期捕捉する同期捕捉部と、
前記同期捕捉部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記同期捕捉部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第1の記憶部と、
前記第1の記憶部の後段に接続され、前記第1の記憶部から読み出したTSデータに対してスクランブル解除処理を行うデスクランブル部と、
前記デスクランブル部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記デスクランブル部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第2の記憶部と、
前記第2の記憶部の後段に接続され、前記第2の記憶部から読み出した複数のTSデータの中から必要なTSデータを抽出分離する抽出分離部と、
前記抽出分離部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記抽出分離部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第3の記憶部と、
前記第3の記憶部の後段に接続され、前記第3の記憶部から読み出したTSデータを外部メモリに書き込む書き込み部と
を備える、TSパケット単位での4段パイプライン構成のシステムデコーダ。
A synchronization acquisition unit that synchronously acquires TS (Transport Stream) data;
A memory set connected to the subsequent stage of the synchronization acquisition unit, each memory having a storage capacity corresponding to a data unit of TS data, and alternately performing a write operation and a read operation of TS data input from the synchronization acquisition unit Including a first storage unit,
A descrambling unit connected to a subsequent stage of the first storage unit and performing descrambling processing on the TS data read from the first storage unit;
A memory set connected to the subsequent stage of the descramble unit, each memory having a storage capacity corresponding to a data unit of TS data, and alternately performing a write operation and a read operation of the TS data input from the descramble unit A second storage unit including:
An extraction / separation unit that is connected to the subsequent stage of the second storage unit and extracts and separates necessary TS data from a plurality of TS data read from the second storage unit;
A memory set connected to the subsequent stage of the extraction / separation unit, each memory having a storage capacity corresponding to a data unit of TS data, and alternately performing a write operation and a read operation of the TS data input from the extraction / separation unit A third storage unit including:
A system decoder having a four-stage pipeline structure in units of TS packets, comprising a writing unit connected to a subsequent stage of the third storage unit and writing TS data read from the third storage unit to an external memory.
TS(Transport Stream)データを同期捕捉する同期捕捉部と、
前記同期捕捉部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記同期捕捉部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第1の記憶部と、
前記第1の記憶部の後段に接続され、前記第1の記憶部から読み出した複数のTSデータの中から必要なTSデータを抽出分離する抽出分離部と、
前記抽出分離部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記抽出分離部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第2の記憶部と、
前記第2の記憶部の後段に接続され、前記第2の記憶部から読み出したTSデータを外部メモリに書き込む書き込み部と
を備える、TSパケット単位での3段パイプライン構成のシステムデコーダ。
A synchronization acquisition unit that synchronously acquires TS (Transport Stream) data;
A memory set connected to the subsequent stage of the synchronization acquisition unit, each memory having a storage capacity corresponding to a data unit of TS data, and alternately performing a write operation and a read operation of TS data input from the synchronization acquisition unit Including a first storage unit,
An extraction / separation unit connected to a subsequent stage of the first storage unit, for extracting and separating necessary TS data from a plurality of TS data read from the first storage unit;
A memory set connected to the subsequent stage of the extraction / separation unit, each memory having a storage capacity corresponding to a data unit of TS data, and alternately performing a write operation and a read operation of the TS data input from the extraction / separation unit A second storage unit including:
A system decoder having a three-stage pipeline structure in units of TS packets, the system decoder including a writing unit connected to a subsequent stage of the second storage unit and writing TS data read from the second storage unit to an external memory.
TS(Transport Stream)データを同期捕捉する同期捕捉部と、
前記同期捕捉部の後段に接続され、各々のメモリがTSデータのデータ単位相当の記憶容量を有し、前記同期捕捉部から入力されたTSデータの書き込み動作と読み出し動作とを交互に行うメモリセットを含む、第1の記憶部と、
前記第1の記憶部の後段に接続され、前記第1の記憶部から読み出した複数のTSデータの中から必要なTSデータを抽出分離する抽出分離部と、
前記抽出分離部の後段に接続され、前記抽出分離部から入力されたTSデータを外部メモリに書き込む書き込み部と
を備える、TSパケット単位での2段パイプライン構成のシステムデコーダ。
A synchronization acquisition unit that synchronously acquires TS (Transport Stream) data;
A memory set connected to the subsequent stage of the synchronization acquisition unit, each memory having a storage capacity corresponding to a data unit of TS data, and alternately performing a write operation and a read operation of TS data input from the synchronization acquisition unit Including a first storage unit,
An extraction / separation unit connected to a subsequent stage of the first storage unit, for extracting and separating necessary TS data from a plurality of TS data read from the first storage unit;
A system decoder having a two-stage pipeline structure in units of TS packets, comprising a writing unit connected to a subsequent stage of the extraction / separation unit and writing TS data input from the extraction / separation unit to an external memory.
前記抽出分離部は、抽出分離したTSデータのPCR(Program Clock Reference)が不連続である場合には、そのTSデータに付加されているタイムスタンプを無効化させる、請求項1〜3のいずれか一つに記載のシステムデコーダ。
The extraction / separation unit invalidates a time stamp added to the TS data when PCR (Program Clock Reference) of the extracted and separated TS data is discontinuous. The system decoder according to one.
JP2005067028A 2005-03-10 2005-03-10 System decoder Pending JP2006254039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005067028A JP2006254039A (en) 2005-03-10 2005-03-10 System decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005067028A JP2006254039A (en) 2005-03-10 2005-03-10 System decoder

Publications (1)

Publication Number Publication Date
JP2006254039A true JP2006254039A (en) 2006-09-21

Family

ID=37094053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005067028A Pending JP2006254039A (en) 2005-03-10 2005-03-10 System decoder

Country Status (1)

Country Link
JP (1) JP2006254039A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1198098A (en) * 1995-11-30 1999-04-09 Hitachi Ltd Data separation device
JP2003101765A (en) * 2001-09-25 2003-04-04 Ricoh Co Ltd Image processing device
JP2004289240A (en) * 2003-03-19 2004-10-14 Matsushita Electric Ind Co Ltd Packet data processing device
JP2006128907A (en) * 2004-10-27 2006-05-18 Nec Micro Systems Ltd Packet processor, packet processing method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1198098A (en) * 1995-11-30 1999-04-09 Hitachi Ltd Data separation device
JP2003101765A (en) * 2001-09-25 2003-04-04 Ricoh Co Ltd Image processing device
JP2004289240A (en) * 2003-03-19 2004-10-14 Matsushita Electric Ind Co Ltd Packet data processing device
JP2006128907A (en) * 2004-10-27 2006-05-18 Nec Micro Systems Ltd Packet processor, packet processing method, and program

Similar Documents

Publication Publication Date Title
JP3883637B2 (en) Method for operating the reception of program counter criteria, and apparatus and method for operating the reception of discontinuity indicators
JP3641336B2 (en) Data separator
US7889864B2 (en) Data processing system and method
US6278838B1 (en) Peak-ahead FIFO for DVD system stream parsing
EP1335604A2 (en) MPEG error concealment
JP2001069106A (en) Stream demultiplexer
US7149230B2 (en) Transport processor for processing multiple transport streams
US7817721B2 (en) Posting status data in digital transport stream processing
US6831931B2 (en) System and method for remultiplexing of a filtered transport stream
US8358312B2 (en) Multi-pass system and method supporting multiple streams of video
US7054959B2 (en) Isochronous data transfer control method including packet configuration of thus-read isochronous header and data
US7697537B2 (en) System and method for using generic comparators with firmware interface to assist video/audio decoders in achieving frame sync
KR100810288B1 (en) Information processing apparatus and method and recording medium
JP2004179854A (en) Format conversion circuit
US6625218B1 (en) Audio/video separator including a user data start address register
JP2006254039A (en) System decoder
US8571053B2 (en) Method and system for architecture of a fast programmable transport demultiplexer using double buffered approach
CN100388776C (en) digital video storage device and method for storing digital video data
US6341198B1 (en) System for byte packing multiple data channels in an MPEG/DVD system
Fujii et al. Implementation of MPEG transport demultiplexer with a RISC-based microcontroller
US7773863B2 (en) Data decoding device, data decoding method, semiconductor integrated circuit and data decoding system, using tag added to data pack
Zheng et al. Design and implementation of twin transport stream demultiplexor in HDTV decoder
US8094712B2 (en) Apparatus for processing a data stream having a hierarchical layer structure and including encoded data sets and raw data sets and method thereof
JP2003163900A (en) Transport stream decoder and transport stream decoding method
KR20060098017A (en) Method and apparatus for filtering section data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071122

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071122

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100524

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100927

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101005

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101203

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101221