JP3589565B2 - Video and audio processing device - Google Patents
Video and audio processing device Download PDFInfo
- Publication number
- JP3589565B2 JP3589565B2 JP09344798A JP9344798A JP3589565B2 JP 3589565 B2 JP3589565 B2 JP 3589565B2 JP 09344798 A JP09344798 A JP 09344798A JP 9344798 A JP9344798 A JP 9344798A JP 3589565 B2 JP3589565 B2 JP 3589565B2
- Authority
- JP
- Japan
- Prior art keywords
- unit
- data
- address
- video
- processing
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Television Systems (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、デジタル信号処理の技術分野に属するものであって、圧縮された映像及び音声データの伸長、映像及び音声データの圧縮、グラフィックス処理などを行う画像処理装置に関する。
【0002】
【従来の技術】
近年、ディジタル動画データの圧縮/伸長技術が確立されてきたことや、LSI技術が向上してきたこととがあいまって、圧縮映像及び音声データを伸長するデコーダ、映像及び音声データを圧縮するエンコーダ、グラフィックス処理を行うグラフィックス処理などの種々の映像音声処理装置が重要視されている。
【0003】
第1の従来技術として、MPEG(Moving Picture Experts Group)規格の圧縮映像及び音声データを伸長する映像音声デコーダ(特開平8−1116429)がある。この映像音声デコーダは、1つの信号処理ユニットを用いて映像デコードと音声デコードの両方を行う。
図1に、この映像音声デコーダによるデコード処理の説明図を示す。同図の縦軸は時間を、横軸は演算量を表している。
【0004】
縦軸に沿って大きく見ると、映像デコードと音声デコードとが交互に処理される。これは、共通のハードウェアで映像、音声の両者をデコードするためである。同図のように映像デコードは、逐次処理とブロック処理とに分けられる。逐次処理は、ブロック以外のデコード、つまりMPEGストリームのヘッダ解析など多岐にわたる条件判断を必要とする処理であり、その演算量は少ない。ブロックデコードは、MPEGストリームの可変長符号を復号しさらにブロック単位に逆量子化、逆DCT(離散余弦変換)を行う処理であり、その演算量は大きい。同図のように音声デコードも、多岐にわたる条件判断を必要とする上記と同様の逐次処理と、音声データ本体のデコード処理とに分けられる。音声データ本体のデコード処理は、画像データよりも高い精度が要求され、かつ限られた時間内に処理しなければならないので、精度よく高速に処理する必要があり、その演算量は大きい。
【0005】
このように、第1の従来技術は、1チップ化を可能にし、1チップという少ないハードウェアで効率的な音声映像デコードを実現している。
第2の従来技術として、2チップ構成のデコーダがある。1チップは映像デコーダ、他の1チップは音声デコーダとして用いられる。図2に2チップ構成のデコーダによるデコード処理の説明図を示す。映像デコーダ、音声デコーダともにヘッダ解析等の条件判断を多数含む逐次処理と、データ本体のデコードを主とするブロックデコード処理とを行う。映像デコーダ、音声デコーダともに、独立に処理するので第1の従来技術と比べて個々のチップの能力は低くてよい。
【0006】
【発明が解決しようとする課題】
しかしながら上記従来技術によれば、次のような問題があった。
第1の従来技術によれば、信号処理ユニットが映像も音声もデコードしなねればならないので、高い処理能力が要求される。つまり100MHz以上の高速クロックを用いて動作させる必要があり、民生用の半導体としてはコストが高いという問題がある。また、高速クロックを用いずに処理能力を高めるために、VLIW(Very Long Instruction Word)プロセッサなどを用いることも考えられなくはないが、VLIWプロセッサそのもののコストが高いうえに、別途逐次処理を行うプロセッサを用いなければ全体の処理としては非効率になるという問題がある。
【0007】
第2の従来技術によれば、2つのプロセッサを用いるのでコストが高いという問題があった。つまり、映像用プロセッサも音声用プロセッサも、処理能力の低い汎用の安価なプロセッサをそのまま使用することはできない。なぜなら映像用のプロセッサは、大量の画像データをリアルタイムに処理する能力が要求されるからである。また音声用のプロセッサは、映像用プロセッサほど多くの演算量を要求されないけれども、音声データの方が画像データよりも高い精度を要求されるからである。それゆえ、安価なあるいは処理能力の低いプロセッサでは、映像用としても音声用としても、要求される処理能力を満たさない。
【0008】
さらに、ディジタル(衛星)放送用チューナー(STB(Set Top Box)と呼ばれる)やDVD(Digital Versatile/Video Disc)再生装置などに用いられるAVデコーダ中に上記映像音声処理装置が用いられる場合には、放送波から受信されたあるいはディスクから読み出されたMPEGストリームを入力し、そのMPEGストリームをデコードし、最終的にディスプレイ、スピーカなどへ映像信号出力及び音声信号出力をするまでに必要とされる一連の処理量は膨大なものとなる。最近では、このような一連の膨大な処理を効率良く実行する映像音声処理装置に対する要求が高まっている。
【0009】
本発明は、圧縮画像及び圧縮音声データを表すストリームデータの入力、デコード、出力という一連の処理を行い、高い周波数で動作させなくても高い処理能力を有し、製造コストを低減させることができる映像音声処理装置を提供することを目的とする。
また本発明の他の目的は、圧縮映像データのデコード、映像データのエンコード、グラフィックス処理を低コストで実現する映像音声処理装置を提供することにある。
【0010】
【課題を解決するための手段】
上記の課題を解決するため本発明の映像音声処理装置は、圧縮音声データと圧縮映像データとを含むデータストリームを外部から入力、デコードし、デコードしたデータを出力装置に出力する装置であって、外部要因により非同期に発生する入出力処理を行う入出力処理手段と、前記入出力処理と並行して、メモリに格納されたデータストリームのデコードを主とするデコード処理を行うデコード処理手段とを備え、前記デコード処理手段によりデコードされた映像データ、デコードされた音声データはメモリに格納され、前記入出力処理は、外部から非同期に入力される前記データストリームを入力し、さらにメモリに格納することと、メモリに格納されたデータストリームをデコード処理手段に供給することと、外部の表示装置、音声出力装置それぞれの出力レートに合わせてメモリから読み出し、それらに出力することとを入出力処理として行うように構成されている。
【0011】
この構成によれば、入出力処理手段とデコード処理手段とがパイプライン的に並列動作することに加えて、非同期処理とデコード処理とを入出力処理手段とデコード処理手段とに分担させるので、デコード処理手段は非同期に発生する処理から解放されてデコード処理に専従することができる。その結果、本映像音声処理装置は、ストリームデータ入力、デコード、出力という一連の処理を効率良く実行するので、ストリームデータのフルデコード(フレーム落ちなし)を高速な動作クロックを用いなくても可能にしている。
【0012】
【発明の実施の形態】
本発明の映像音声処理装置について、その実施の形態を次のように項分けして記載する。
1 第1の実施形態
1.1 映像音声処理装置の概略構成
1.1.1 入出力処理部
1.1.2 デコード処理部
1.1.2.1 逐次処理部
1.1.2.2 定型処理部
1.2 映像音声処理装置の構成
1.2.1 入出力処理部の構成
1.2.2 デコード処理部
1.2.2.1 逐次処理部
1.2.2.2 定型処理部
1.3 各部の詳細構成
1.3.1 プロセッサ7(逐次処理部)
1.3.2 定型処理部
1.3.2.1 コード変換部
1.3.2.2 画素演算部
1.3.2.3 画素読み書き部
1.3.3 入出力処理部
1.3.3.1 IOプロセッサ
1.3.3.1.1 命令読出回路
1.3.3.1.2 タスク管理部
1.4 動作説明
2 第2の実施形態
2.1 映像音声処理装置の構成
2.1.1 画素演算部
<1. 第1の実施形態>
本実施形態における映像音声処理装置は、衛星放送受信装置(STB:Set Top Boxと呼ばれる)、DVD(Digital Versatile Disc)再生装置、DVD−RAM記録再生装置などに備えられ、圧縮映像/音声データとして衛星放送から又はDVDからのMPEGストリームを入力し、伸長処理(以下単にデコードと呼ぶ)を行って、映像信号及び音声信号を外部の出力装置に出力する。
<1.1 映像音声処理装置の概略構成>
図3は、本発明の第1の実施形態における映像音声処理装置の概略構成を示すブロック図である。
【0013】
映像音声処理装置1000は、入出力処理部1001、デコード処理部1002、メモリコントローラ6を備え、入出力処理とデコード処理とを分離して並行して行うように構成されている。また、外部メモリ3は、MPEGストリームやデコード後の音声データを一時的に記憶する作業用メモリ、デコード後の映像データを記憶するフレームメモリとして利用される。
<1.1.1 入出力処理部>
入出力処理部1001は、映像音声処理装置1000の内部動作とは非同期に発生する入出力処理を行う。この入出力処理は、(a)外部から非同期に入力されるMPEGストリームを入力して外部メモリ3に一時的に格納すること、(b)外部メモリ3に格納されたMPEGストリームをデコード処理部1002に供給すること、(c)デコードされた映像データ、音声データを外部メモリ3から読み出し、外部の表示装置、音声出力装置(図外)それぞれの出力レートに合わせて出力することを内容とする。
<1.1.2 デコード処理部>
デコード処理部1002は、入出力処理部1001の動作とは独立に並行して、入出力処理部1001によって供給されるMPEGストリームのデコードし、デコード後の映像データ及び音声データを外部メモリ3に格納する。MPEGストリームのデコード処理は演算量が多く処理内容も多岐にわたるため、デコード処理部1002は、逐次処理部1003、定型処理部1004とを備え、多岐に亘る条件判断を主とする逐次処理と、定型的な大量の演算を主としかつ並列演算に適した定型処理とを分離して並行して実行するように構成されている。ここで、逐次処理は、MPEGストリームのヘッダ解析などであり、ヘッダの検出及びヘッダ内容の判定等の多数の条件判断含む。また定型処理は、所定数の画素からなるブロック単位に各種演算を施す必要があるので、パイプライン的な並列処理に適していて、かつ、異なるデータ(画素)に対して全く同じ演算を施すというベクトル演算のような並列処理に適している。
<1.1.2.1 逐次処理部>
逐次処理部1003は、入出力処理部1001から供給される圧縮音声データ及び圧縮映像データのヘッダ解析と、定型処理部1004をマクロブロック毎に起動する制御と、圧縮音声データのデコード処理とを上記逐次処理として行う。ヘッダ解析は、MPEGストリームにおけるマクロブロックヘッダの解析と、動きベクトルの復号を含む。ここでブロックとは、8*8画素からなる画像を表す。マクロブロックとは、4つの輝度ブロックと2つの色差ブロックからなる。動きベクトルとは、参照フレーム中の8*8画素の矩形領域を指すベクトルであり、当該ブロックが参照フレーム中のどの矩形領域との差分がとられたかを指し示す。
<1.1.2.2 定型処理部>
定型処理部1004は、逐次処理部1003からマクロブロック毎にデコードの起動指示を受けて逐次処理部1003の音声デコード処理と並行して、マクロブロックのデコード処理を上記定型処理として行う。このデコード処理は、可変長符号の復号(VLD:Variable Length code Decoding)、逆量子化(IQ:Inverse Quantization)、逆離散余弦変換(IDCT:Inverse Discrete Cosine Transform)、動き補償(MC:Motion Compensation)を同順に施すことを内容とする。定型処理部1004は、動き補償において、復号後のブロックをフレームメモリとしての外部メモリ3にメモリコントローラ6を介して格納する。
<1.2 映像音声処理装置の構成>
図4は、映像音声処理装置1000のより詳細な構成を示すブロック図である。
<1.2.1 入出力処理部の構成>
同図において入出力処理部1001は、ストリーム入力部1、バッファメモリ2、入出力プロセッサ5(以下IOプロセッサ5と略す)、DMAC(Direct Memory Access Controller)5a、ビデオ出力部12、音声出力部13、ホストI/F部14とを備える。
【0014】
ストリーム入力部1は、外部からシリアルに入力されるMPEGデータストリームをパラレルデータ(以降、MPEGデータと呼ぶ)に変換する。その際、ストリーム入力部1は、MPEGデータストリームからGOP(Group Of Picture:Iピクチャを1つ含み、約0.5秒分の動画に相当するMPEGデータストリーム)のスタートコードを検出し、その旨をIOプロセッサ5に通知する。この通知により変換後のMPEGデータは、IOプロセッサ5の制御によりバッファメモリ2に転送される。
【0015】
バッファメモリ2は、ストリーム入力部1から転送されたMPEGデータを一時的に保持する緩衝用メモリである。バッファメモリ2に保持されたMPEGデータは、さらに入出力プロセッサ5の制御の下でメモリコントローラ6を介して外部メモリ3に転送される。
外部メモリ3は、SDRAM(Synchronous Dynamic Random Access Memory)チップにより構成され、バッファメモリ2からメモリコントローラ6を介して転送されたMPEGデータを一時的に保持する。さらに、外部メモリ3は復号後の映像データ(以降、フレームデータとも呼ぶ)および復号後の音声データも保持する。
【0016】
入出力プロセッサ5は、ストリーム入力部1、バッファメモリ2、外部メモリ3(メモリコントローラ6が介在する)、FIFOメモリ4の間のデータ入出力を制御する。すなわち以下の(1)〜(4)に示す経路のデータ転送(DMA転送)を制御する。
(1)ストリーム入力部1→バッファメモリ2→メモリコントローラ6→外部メモリ3
(2)外部メモリ3→メモリコントローラ6→FIFOメモリ4
(3)外部メモリ3→メモリコントローラ6→バッファメモリ2→ビデオ出力部12
(4)外部メモリ3→メモリコントローラ6→バッファメモリ2→音声出力部13
これらの径路では入出力プロセッサ5は、MPEGデータ中の映像データと音声データとを独立にそれぞれの転送を制御する。また、(1)、(2)は復号前のMPEGデータの転送経路である。(1)、(2)の転送経路において入出力プロセッサ5は、圧縮映像データと圧縮音声データとを別個に転送する。(3)、(4)はそれぞれ、復号後の映像、音声データの転送経路である。復号後の映像、音声データは、外部の表示装置(図外)、音声出力装置(図外)それぞれの出力レートに合わせて転送される。
【0017】
DMAC5aは、ストリーム入力部1、ビデオ出力部12、音声出力部13とバッファメモリ2との間のDMA転送、バッファメモリ2と外部メモリ3との間のDMA転送、外部メモリ3とFIFOメモリ4の間のDMA転送をIOプロセッサ5の制御に従って実行する。
ビデオ出力部12は、外部の表示装置(CRT等)の出力レート(たとえば水平同期信号Hsyncの周期)に合せて入出力プロセッサ5にデータ要求を出し、入出力プロセッサ5により上記(3)の転送経路により入力される映像データをその表示装置に出力する。
【0018】
音声出力部13は、外部の音声出力装置の出力レートに合せて入出力プロセッサ5にデータ要求を出し、入出力プロセッサ5により上記(4)の転送経路により入力される音声データを音声出力装置(D/Aコンバータ、音声アンプ、スピーカの組み合わせ等)に出力する。
ホストI/F部14は、外部のホストプロセッサ、たとえばDVD再生装置の場合にはその制御全般を行うプロセッサとの通信を行うためのインターフェースである。この通信では、ホストプロセッサからMPEGストリームのデコード開始、停止、早送り再生、逆再生等の指示などが送られる。
<1.2.2 デコード処理部>
図4のデコード処理部1002は、FIFOメモリ4、逐次処理部1003、定型処理部1004と備え、入出力処理部1001からFIFOメモリ4を介して供給されるMPEGデータのデコード処理を行う。また、逐次処理部1003は、プロセッサ7と内部メモリ8とを備える。定型処理部1004は、コード変換部9、画素演算部10、画素読み書き部11、バッファ200、バッファ201を備える。
【0019】
FIFOメモリ4は、2つのFIFO(以下映像FIFO、音声FIFOと呼ぶ)からなり、入出力プロセッサ5の制御の下で外部メモリ3から転送された圧縮映像データ、圧縮音声データをそれぞれ先入れ先出し式に記憶する。
<1.2.2.1 逐次処理部>
プロセッサ7は、FIFOメモリ4の圧縮映像データ及び圧縮音声データの読み出しを制御するとともに、圧縮映像データに対する一部のデコード処理と、圧縮音声データに対する全デコード処理とを行う。圧縮映像データの一部のデコード処理とは、MPEGデータ中のヘッダ情報の解析と動きベクトルの計算と圧縮映像デコード処理の制御とを含む。これは、圧縮映像データの全デコード処理を、プロセッサ7と、定型処理部1004とで分担して行うためである。つまりプロセッサ7は多岐にわたる条件判断を必要とする逐次処理を分担し、定型処理部1004は、大量の定型的な演算処理を分担する。これに対し音声デコードは、映像デコードに比べて演算量が少ないのでプロセッサ7が全部を担当している。
【0020】
プロセッサ7の機能を図5を用いて具体的に説明する。図5はMPEGストリームを階層的に示とともに映像音声処理装置各部の動作タイミングを示している。同図において横軸は時間軸である。第1階層はMPEGストリームの流れを示す。第2階層のように1秒間のMPEGストリームは、複数のフレーム(I、P、Bピクチャ)を含む。第3階層のように1フレームは、ピクチャヘッダと複数のスライスを含む。第4階層のように1スライスは、スライスヘッダと複数のマクロブロックを含む。第5階層のように1マクロブロックは、マクロブロックヘッダと6つのブロックを含む。
【0021】
同図に示す第1〜第5階層のデータ構成は、公知文献、例えば株式会社アスキー「ポイント図解式最新MPEG教科書」に詳しく説明されている。
プロセッサ7は、同図の第5階層以下に示すように、MPEGストリーム中のマクロブロック層までのヘッダ解析と圧縮音声データの復号とを行う。その際、プロセッサ7は、マクロブロック単位のヘッダ解析結果に従って、コード変換部9、画素演算部10及び画素読み書き部11に対してマクロブロックのデコードを開始を指示し、コード変換部9、画素演算部10及び画素読み書き部11によってマクロブロックのデコードがなされている間、FIFOメモリ4から圧縮音声データの読み出してデコードする。コード変換部9、画素演算部10及び画素読み書き部11によりマクロブロックのデコードが終了したと、プロセッサ7は、割込み信号によりその旨の通知を受け、圧縮音声データのデコードを中断して、次のマクロブロックのヘッダ解析を開始する。
【0022】
内部メモリ8は、プロセッサ7のワークメモリであり、復号された音声データを一時的に保持する。保持された音声データは、入出力プロセッサ5により上記(4)の経路で外部メモリ3に転送される。
<1.2.2.2 定型処理部>
コード変換部9は、FIFOメモリ4から読み出された圧縮映像データを可変長復号(VLD)する。図5に示すように、コード変換部9は、復号後のデータのうち、ヘッダ情報及び動きベクトルに関する情報(図中の破線区間)をプロセッサ7に転送し、マクロブロック(輝度ブロックY0〜Y3と色差ブロックCb、Crとからなる6ブロック)のデータ(図中の実線区間)をバッファ200を介して画素演算部10に転送する。コード変換部9による復号後のマクロブロックのデータは空間周波数成分を表すデータである。
【0023】
バッファ200は、コード変換部9により書き込まれる1ブロック(8×8画素分)分の空間周波数成分を表すデータを保持する。
画素演算部10は、コード変換部9からバッファ200を介して転送されたブロックデータに対して、逆量子化処理(IQ)及び逆離散余弦変換(IDCT)をブロック単位に行う。画素演算部10による処理結果は、輝度ブロックであれば画素の輝度値又はその差分を表すデータであり、色差ブロックであれば画素の色差又はその差分を表すデータであり、バッファ201を介して画素読み書き部11に転送される。
【0024】
バッファ201は、1ブロック(8×8画素分)分の画素データを保持する。
画素読み書き部11は、画素演算部10の処理結果に対して、ブロック単位に動き補償を行う。すなわち、Pピクチャ、Bピクチャについては、外部メモリ3内の復号済みの参照フレームから動きベクトルが示す矩形領域をメモリコントローラ6を介して切り出して、画素演算部10の処理結果のブロックと合成することにより、元のブロック画像に復号する。画素読み書き部11による復号結果は、メモリコントローラ6を介して外部メモリ3に格納される。
【0025】
上記の動き補償、IQ、IDCTの各内容については公知技術なので詳しい説明は省略する(上記文献参照)。
<1.3 各部の詳細構成>
次に、映像音声処理装置1000の主要な各部の詳細な構成について説明する。
<1.3.1 プロセッサ7(逐次処理部)>
図6は、プロセッサ7によるマクロブロックヘッダの解析と、他の各部への制御内容とを示す図である。まず同図に略語で示してあるマクロブロックヘッダ中の各データは上記文献等に説明されているのでここでは説明を省略する。
【0026】
同図のようにプロセッサ7は、コード変換部9にコマンドを発行して可変長復号されたヘッダ部分のデータを逐次取得し、その内容に従ってコード変換部9、画素演算部10、画素読み書き部11に対してマクロブロックのデコードに必要なデータを設定する。
具体的には、まずプロセッサ7は、コード変換部9にMBAI(Macro Block Address Increment)を取得するためのコマンドを発行して(S101)、コード変換部9からMBAIを取得する。このMBAIに基づき当該マクロブロックデータがスキップマクロブロックであれば(今デコードしようとしているマクロブロックが前回と同じであれば)、マクロブロックデータが省略されているのでS117に進み、スキップマクロブロックでなければヘッダ解析を続ける(S102、103)。
【0027】
次いで、プロセッサ7はMBT(Macro Block Type)を取得するためのコマンドを発行して、コード変換部9からMBTを取得する。このMBTからブロックのスキャンタイプがジグザグスキャンかオールタネートスキャンかを判断し、画素演算部10にバッファ200の読み出し順序を指示する(S104)。
さらに、プロセッサ7は既に取得したヘッダデータからSTWC(Spartial Temporal Weight Code)が存在するか否かを判定し(S105)、存在する場合にはコマンドを発行して取得する(S106)。
【0028】
同様にしてプロセッサ7は、FrMT(Frame Motion Type)、FiMT(Field Motion Type)、DT(DCT type)、QSC(Quantizer Scale Code)、MV(Motion Vector)、CBP(Coded Block Pattern)を取得する(S107〜116)。その際、プロセッサ7は、FrMT、FiMT、DTの解析結果を画素読み書き部11に通知し、QSCの解析結果を画素演算部10に通知し、CBPの解析結果をコード変換部9に通知する。これによりIQ、IDCT、動き補償に必要が情報が、コード変換部9、画素演算部10、画素読み書き部11に設定される。
【0029】
また2プロセッサ構成では、多岐にわたる条件判断を必要とする上記の逐次処理を各プロセッサが個別に行うため冗長な構成になっていた。
次いで、プロセッサ7はコード変換部9に対してマクロブロックのデコード開始指示を発行する(S117)。これによりコード変換部9は、マクロブロック内の各ブロックについてVLDを開始し、VLDの結果をバッファ200を介して画素演算部10に出力する。さらにプロセッサ7は、MVデータに基づいて動きベクトルを計算し(S118)、その計算結果を画素読み書き部11に通知する(S119)。
【0030】
上記処理において、動きベクトルに関しては、動きベクトルのデータ(MV)取得(S113)し、動きベクトルの計算(S118)し、動きベクトルを画素読み書き部11に設定する(S119)という一連の処理が必要である。この点、プロセッサ7は、動きベクトルデータ(MV)を取得(S113)した直後に動きベクトルの計算及び設定(S118、119)しないで、定型処理部1004へのデコード開始指示を発行してから動きベクトルを計算及び設定を行うようにしている。これにより、プロセッサ7の動きベクトル計算および設定処理と、定型処理部1004へのデコード処理とが並列に処理されるようになる。つまり定型処理部1004のデコード開始タイミングを早くしている。
【0031】
以上のようにしてマクロブロック1つ分の圧縮映像データのヘッダ解析が完了するので、プロセッサ7は、FIFOメモリ4から圧縮音声データを取得して、音声デコード処理を開始する(S120)。音声デコード処理は、コード変換部9からマクロブロックのデコード完了を示す割り込み信号が入力されるまで続けられる。この割り込み信号によりプロセッサ7は次のマクロブロックに対して上記ヘッダ解析を開始する。
<1.3.2 定型処理部>
次に、定型処理部1004は、マクロブロック内の6つのブロックをコード変換部9、画素演算部10、画素読み書き部11を並列に(パイプライン的に)に動作させることによりデコード処理を行っている。ここでは、画素演算部10、画素読み書き部11、コード変換部9の順にそれらの構成をより詳細に説明する。
<1.3.2.1 コード変換部9>
図19は、コード変換部9の構成を示すブロック図である。
【0032】
同図のコード変換部9は、VLD部901、カウンタ902、インクリメンタ903、セレクタ904、スキャンテーブル905、スキャンテーブル906、フリップフロップ(以下FFと略す)907、セレクタ908とを備え、可変長復号(VLD)した結果をブロック単位に、ジグザグスキャン又はオルタネートスキャンの順に配列するようにバッファ200に書き込むよう構成されている。
【0033】
VLD部901は、FIFOメモリ4から読み出された圧縮映像データを可変長復号(VLD)し、復号後のデータのうち、ヘッダ情報及び動きベクトルに関する情報(図5中の破線区間)をプロセッサ7に転送し、マクロブロック(輝度ブロックY0〜Y3と色差ブロックCb、Crとからなる6ブロック)のデータ(図5中の実線区間)をブロック(64個の空間周波数データ)単位にバッファ200に出力する。
【0034】
カウンタ902、インクリメンタ903、セレクタ904からなる回路部分は、VLD部901からの空間周波数データの出力に同期して、0から63までを繰り返しカウントする。
スキャンテーブル905は、バッファ200のブロック記憶領域のアドレスをジグザグスキャンの順に記憶しているテーブルであり、カウンタ902の出力値(0〜63)が順に入力され、順次そのアドレスを出力する。図20にバッファ200中の8×8個の空間周波数データを記憶するブロック記憶領域と、ジグザグスキャンの順路を示す。スキャンテーブル905は、同図の順路における画素アドレスを順次出力する。
【0035】
スキャンテーブル906は、バッファ200のブロック記憶領域のアドレスをオルタネートスキャンの順に記憶しているテーブルであり、カウンタ902の出力値(0〜63)が順に入力され、順次そのアドレスを出力する。図21にバッファ200中の8×8個の空間周波数データを記憶するブロック記憶領域と、オルタネートスキャンの順路を示す。スキャンテーブル905は、同図の順路における画素アドレスを順次出力する。
【0036】
FF907は、スキャンタイプ(ジグザグスキャンかオルタネートスキャンか)を示すフラグを保持する。このフラグは、プロセッサ7により設定される。
セレクタ908は、FF907のフラグに応じてスキャンテーブル905とスキャンテーブル906とから出力されるアドレスを選択し、バッファ200に書き込みアドレスとして出力する。
<1.3.2.2 画素演算部>
図7は、画素演算部10の構成を示すブロック図である。
【0037】
同図のように画素演算部10は、乗算器502と加減算器503からなる実行部501と、第1プログラムカウンタ(以降、第1PCと略す)504と、第2プログラムカウンタ(以降、第2PCと略す)505と、第1命令メモリ506と、第2命令メモリ507と、セレクタ508とを有し、IQとIDCTの一部とをオーバラップさせて並列に実行できるように構成されている。。
【0038】
実行部501は、第1命令メモリ506、第2命令メモリ507から順次出力されるマイクロ命令に従って、バッファ200、201のアクセス及び演算を実行する。
第1命令メモリ506、第2命令メモリ507は、バッファ200に保持されたブロック(周波数成分)に対して、IQ、IDCTを実現するためのマイクロプログラムを記憶する制御記憶である。図8に、第1命令メモリ506及び第2命令メモリ507に記憶されたマイクロプログラムの一例を示す。
【0039】
同図において、第1命令メモリ506はIDCT1Aマイクロプログラムと、IQマイクロプログラムとを記憶し、第1PC504によって読み出しアドレスが指定される。IQマイクロプグラムは、バッファ200の読み出しと、乗算とを主体とする演算処理であり、加減算器503を用いない。
第2命令メモリ507はIDCT1Bマイクロプログラムと、IDCT2マイクロプログラムとを記憶し、セレクタ508を介して第1PC504又は第2PC505により読出アドレスが指定される。ここで、IDCT1は、乗算及び加減算を主とするIDCTの前半部分の処理を意味し、IDCT1AマイクロプログラムとIDCT1Bマイクロプログラムとが同時に読み出されることにより実行部501全体を使って実行される。また、IDCT2は、加減算を主とするIDCTの後半部分の処理とバッファ201への書き出し処理を意味し、第2命令メモリ507のIDCT2マイクロプログラムが読み出されることによって加減算器503を使って実行される。
【0040】
IQは乗算器502により、IDCT2は加減算器503により処理されるので、これらは並列動作可能になっている。図9に、画素演算部10によるIQ、IDCT1、IDCT2の動作タイミング図を示す。
図9において、コード変換部9はバッファ200に輝度ブロックY0のデータを書き込むと(タイミングt0)、その旨を制御信号102にて画素演算部10に通知する。画素演算部10は、プロセッサ7のヘッダ解析時に設定されたQS(Quantizer Scale)値を用いて、第1PC504のアドレス指定に従って第1命令メモリ506のIQマイクロプログラムを読み出すことによってバッファ200のデータに対してIQを行う。このとき、セレクタ508は第1PC504を選択する(タイミングt1)。
【0041】
さらに、画素演算部10は、第1PC504のアドレス指定に従ってIDCT1A及びIDCT1Bマイクロプログラムを読み出すことによってバッファ200のデータに対してIDCT1を行う。このとき、セレクタ508は第1PC504を選択するので、第1命令メモリ506、第2命令メモリ507の双方に第1PC504からのアドレスが指定される(タイミングt2)。
【0042】
次に、画素演算部10は、上記QS(Quantizer Scale)値を用いて、第1PC504のアドレス指定に従って第1命令メモリ506のIQマイクロプログラムを読み出すことによってバッファ200のブロックY1のデータに対してIQを行い、同時に、第2PC505のアドレス指定に従って第2命令メモリ507のIDCT2マイクロプログラムを読み出すことによってブロックY0に対してIDCT処理の後半部分を処理する。このときセレクタ508は第2PC505を選択する。第1PC504と第2PC505とは独立にアドレスを指定することになる(タイミングt3)。
【0043】
この後も同様に画素演算部10はブロック単位に処理を続ける(タイミングt4以降)。
<1.3.2.3 画素読み書き部>
図10は、画素読み書き部11の詳細な構成を示すブロック図である。
同図のように画素読み書き部11は、バッファ71〜74(以下、バッファA〜Dと呼ぶ)と、ハーフぺル補間部75と、合成部76と、セレクタ77、78と、読み書き制御部79とからなる。
【0044】
読み書き制御部79は、バッファ201を介して入力されるブロックデータに対して、バッファA〜Dを用いて動き補償を行い、最終的な復号画像を2ブロック単位で外部メモリ3に転送する。より具体的には、プロセッサ7のヘッダ解析時に設定された動きベクトルに従って、外部メモリ3中の参照フレームから2ブロック分に相当する矩形領域を読み出すようメモリコントローラ6を制御する。その結果、バッファA又はバッファBに動きベクトルが指し示す2ブロック分の矩形領域のデータが格納される。その後、ピクチャの種類(IかPかBピクチャか)に応じて2ブロック分の矩形領域のハーフペル補間を合成部76にて行う。さらにバッファ201を介して入力されるブロックデータと、ハーフペル補間後の矩形領域とを合成(加算)することにより、当該ブロックの画素値を算出し、バッファBに格納する。こうしてバッファBに格納された最終的な復号ブロックはメモリコントローラ6を介して外部メモリ3に転送される。
<1.3.3 入出力処理部>
入出力処理部1001は、上記のように多数のデータ入出力(データ転送)を実行するために、種々のデータ転送を分担する複数のタスクをオーバーヘッドなく切り替え、しかもデータ入出力要求に対して応答遅延を生じさせないように構成されている。ここでいうオーバーヘッドは、タスクスイッチ時に発生するコンテキストの退避及び復帰である。つまり入出力プロセッサ5は、プログラムカウンタの命令アドレスやレジスタデータをメモリ(スタック領域)に退避及び復帰することにより生ずるオーバーヘッドを解消するように構成されている。ここでは、その詳細な構成について説明する。
<1.3.3.1 IOプロセッサ>
図11は、IOプロセッサ5の構成を示すブロック図である。同図において、IOプロセッサ5は、状態監視レジスタ51、命令メモリ52、命令読出回路53、命令レジスタ54、デコーダ55、演算実行部56、汎用レジスタセット群57、タスク管理部58を備え、非同期に発生する複数のイベントに対応するために、極めて短い周期(例えば4命令サイクル)毎にタスクを切り替えながら実行するよう構成されている。
【0045】
状態監視レジスタ51は、レジスタCR1〜CR3からなり、IOプロセッサ5が種々の入出力状態を監視するための種々の状態データ(フラグなど)を保持する。例えば、状態監視レジスタ51は、ストリーム入力部1の状態(MPEGストリームにおけるスタートコード検出フラグ)、ビデオ出力部12の状態(水平ブランキング期間を示すフラグ、フレームデータの転送完了フラグ)、音声出力部13の状態(音声フレームデータの転送完了フラグ)や、それらとバッファメモリ2、外部メモリ3及びFIFOメモリ4との間でのデータ転送の状態(データ転送数、FIFOメモリ4へのデータ要求フラグ)などを示す状態データを保持する。
【0046】
より具体的には、以下のフラグ等を含む。
・スタートコード検出フラグ(以下フラグ1とも呼ぶ)
このフラグは、ストリーム入力部1によってMPEGストリームにおけるスタートコードが検出されたとき設定される。
・水平ブランキングフラグ(フラグ2)
このフラグは、水平ブランキング期間を示すフラグであり、ビデオ出力部12により設定される。約60マイクロ秒周期で設定される。
・映像フレームデータの転送完了フラグ(フラグ3)
このフラグは、外部メモリ3からビデオ出力部12へ1フレーム分の復号された画像データが転送されたときDMAC5aによって設定される。
・音声フレームデータの転送完了フラグ(フラグ4)
このフラグは、外部メモリ3から音声出力部13へ1フレーム分の復号された音声データが転送されたときDMAC5aによって設定される。
・データ転送完了フラグ(フラグ5)
このフラグは、ストリーム入力部1からバッファメモリ2へIOプロセッサ5により指定されたデータ数の圧縮画像データがDMAC5aによりDMA転送されたとき(ターミナルカウントになったとき)に設定される。
・DMA要求フラグ(フラグ6)
このフラグは、バッファメモリ2の圧縮画像データ又は圧縮音声データを外部メモリ3へDMA転送すべきデータがあることを示すフラグであり、IOプロセッサ5により設定される(後述するタスク1からタスク2への要求)。
・映像FIFOへのデータ要求フラグ(フラグ7)
このフラグは、外部メモリ3からFIFOメモリ4中の映像FIFOへのデータ転送を要求するフラグであり、映像FIFOの圧縮映像データが所定量以下になったとき設定される。このフラグは、約5〜40マイクロ秒周期で設定される。
・音声FIFOへのデータ要求フラグ(フラグ8)
このフラグは、外部メモリ3からFIFOメモリ4中の音声FIFOへのデータ転送を要求するフラグであり、音声FIFOの圧縮音声データが所定量以下になったときに設定される。このフラグは、約15〜60マイクロ秒周期で設定される。
・デコーダ通信要求フラグ(フラグ9)
このフラグは、デコード処理部1002から入出力処理部1001へ通信を要求するフラグである。
・ホスト通信要求フラグ(フラグ10)
このフラグは、ホストプロセッサから入出力処理部1001へ通信を要求するフラグである。
【0047】
上記のフラグ類は、IOプロセッサ5により実行される各タスクにより、割り込みではなく、定常的に監視される。
命令メモリ52は、多数のデータ入出力(データ転送)制御を分担する複数のタスクプログラムを記憶する。本実施例では、タスク0〜5の6つのタスクプログラムを記憶する。
・タスク0(ホストI/Fタスク)
本タスクは、上記フラグ10が設定されたとき、ホストコンピュ−タとの通信、つまりホストI/F部14を介したホストコンピュ−タとの通信処理を行うためのタスクである。例えば、ホストプロセッサからのMPEGストリームのデコード開始、停止、早送り再生、逆再生等の受け付けと、デコード状況(エラー等)の通知などが行われる。この処理は、上記フラグ10をトリガーとする。
・タスク1(パージングタスク)
本タスクは、ストリーム入力部1によりスタートコードが検出されたとき(上記フラグ1)、ストリーム入力部1から入力されるMPEGデータを解析(パージング)して、個々のエレメンタリストリームを抽出して、抽出されたエレメンタリストリームを、DMA転送(上記転送経路(1)の前半部分)によりバッファメモリ2に転送するプログラムである。ここで抽出されるエレメンタリストリームの種類は、圧縮映像データ(ビデオエレメンタリーストリームとも呼ぶ)、圧縮音声データ(オーディオエレメンタリーストリームとも呼ぶ)、プライベートデータなどがある。エレメンタリストリームをバッファメモリ2に格納したときに、上記フラグ6が設定される。
・タスク2(ストリーム転送/オーディオタスク)
本タスクは、次の(a)〜(c)の転送を制御するプログラムである。
【0048】
(a)バッファメモリ2から外部メモリ3へ個々のエレメンタリーストリームのDMA転送(上記転送経路(1)の後半部分)。この転送は、上記フラグ1、3をトリガーとする。
(b)オーディオFIFOに保持されている圧縮音声データのデータサイズ(残量)に応じて、外部メモリ3からFIFOメモリ4のオーディオFIFOへの圧縮音声データのDMA転送(上記転送経路(2)におけるオーディオFIFOへの転送)。このデータ転送は、オーディオFIFOに保持されている圧縮音声データのデータサイズが一定量よりも少なくなった場合になされる。この転送は、上記フラグ8をトリガーとする。
【0049】
(c)外部メモリ3からバッファメモリ2へ、さらにバッファメモリ2から音声出力部13へ復号後のオーディオデータのDMA転送(上記転送経路(4))。この転送は、上記フラグ2をトリガーとする。
・タスク3(映像供給タスク)
本タスクは、映像FIFOに保持されている圧縮映像データのデータサイズ(残量)に応じて、外部メモリ3からFIFOメモリ4の映像FIFOへの圧縮映像データのDMA転送(上記転送経路(2)における映像FIFOへの転送)を処理するプログラムである。このデータ転送は、映像FIFOに保持されている圧縮映像データのデータサイズが一定量よりも少なくなった場合になされる。この転送は、上記フラグ7をトリガーとする。
・タスク4(ビデオ出力タスク)
本タスクは、外部メモリ3からバッファメモリ2へ、さらにバッファメモリ2からビデオ出力部12へ復号後の映像データのDMA転送(上記転送経路(4))を処理するプログラムである。この転送は、上記フラグ2をトリガーとする。
・タスク5(デコーダI/Fタスク)
本タスクは、デコード処理部1002からIOプロセッサ5に向けてのコマンドを処理するプログラムである。コマンドには、「getAPTS」、「getVPTS」、「getSTC」などがある。getVPTS(Video Presentation Time Stamp)は、デコード処理部1002がIOプロセッサ5に対して圧縮映像データに付与されているVPTSの取得を要求するコマンドである。getAPTS(Audio Presentation Time Stamp)は、デコード処理部1002がIOプロセッサ5に対して圧縮音声データに付与されているAPTSの取得を要求するコマンドである。getSTC(System Time Clock)は、デコード処理部1002がIOプロセッサ5に対してSTCの取得を要求するコマンドである。これらのコマンドを受けたIOプロセッサ5は、デコード処理部1002にSTC、VPTS、APTSをそれぞれ通知する。STC、VPTS、APTSは、デコード処理部1002において音声と映像とのデコードを同期させたり、フレーム単位でデコードの進度を調整するために用いられる。この処理は、上記フラグ9をトリガーとする。
【0050】
命令読出回路53は、命令フェッチアドレスを指すプログラムカウンタ(以下PCと略す)を複数個備え、タスク管理部58により指定されたPCを用いて命令メモリ52から命令を読み出して命令レジスタ54に格納する。具体的には、命令読出回路53は、上記タスク0〜5に対応するPC0〜5を有し、タスク管理部58によるPCの指定が変更されたとき
、ハードウェアにより高速にPCを切り替えるように構成されている。この構成によりIOプロセッサ5は、タスクスイッチに際して現在のタスクのPC値をメモリに退避し、メモリから次のタスクのPC値を復帰する処理から解放されている。
【0051】
デコーダ55は、命令メモリ52から読み出されて命令レジスタ54に格納された命令を解読し、当該命令を実行するように演算実行部56を制御する。加えて、デコーダ55は、IOプロセッサ5全体を、命令読出回路53の命令読み出しステージ、デコーダ55の解読ステージ、演算実行部56の実行ステージの少なくとも3段からなるパイプライン制御を行う。
【0052】
演算実行部56は、ALU(Arithmetic Logical Unit)、乗算器、BS(Barrel Shifter)などを有し、デコーダ55の制御に従って、命令で指定された演算を実行する。
汎用レジスタセット群57は、タスク0〜タスク5に対応する6つのレジスタセット(1レジスタセットは4本の32ビットレジスタと4本の16ビットレジスタ)を備えている。全部で24本の32ビットレジスタと24本の16ビットレジスタとを有し、実行中のタスクに対応するレジスタセットが使用される。これによりIOプロセッサ5は、タスクスイッチに際して現在の全レジスタデータをメモリに退避し、メモリから次のタスクのレジスタデータを復帰する処理から解放されている。
【0053】
タスク管理部58は、所定数の命令サイクル数毎に、命令読出回路53のPC及び汎用レジスタセット群57のレジスタセットを切り替えることによりタスク切替えを行う。本実施例では上記所定数は4である。またIOプロセッサ5は1命令を1命令サイクルでパイプライン処理するので、タスク管理部58は、上記オーバーヘッドを生じることなしに4命令毎にタスクを切り替えることになる。これにより非同期に発生する各種の入出力要求に対して応答遅延を抑えている。つまり入出力要求に対する応答遅延は、最大でもわずか24命令サイクルしか生じない。
<1.3.3.1.1 命令読出回路>
図12は、命令読出回路53の詳細な構成例を示すブロック図である。
【0054】
同図において命令読出回路53は、タスク別PC格納部53a、現IFAR(Instruction Fetch Address Register)53b、インクリメンタ53c、次IFAR53d、セレクタ53e、セレクタ53f、DECAR(DECode Address Register)53gを備え、タスク切替えに際してオーバーヘッドなしに命令読み出しアドレスを切り替えるように構成されている。
【0055】
タスク別PC格納部53aは、タスク0〜5に対応する6本のアドレスレジスタを有し、タスク毎にプログラムカウント値を保持する。各プログラムカウント値は、対応するタスクの再開アドレスである。タスク切替えに際して、タスク管理部58及びデコーダ55の制御の下で、次に実行すべきタスクに対応するアドレスレジスタからプログラムカウント値が読み出され、現に実行しているタスクに対応するアドレスレジスタのプログラムカウント値が新たな再開アドレスに更新される。このとき、次に実行すべきタスク、現タスクは、それぞれタスク管理部58により”nexttaskid(rd addr)”信号(以下タスクIDとも呼ぶ)、”taskid(wr addr)”信号により指定される。
【0056】
タスク0、1、2に対応するプログラムカウント値を図13のPC0、1、2に示す。同図において、(0−0)はタスク0の命令0を、(1−4)はタスク1の命令4を表す。例えば、PC0は、タスク0の再開に際して読み出され(命令サイクルt0)、次のタスクへの切替に際して、命令(0−4)のアドレスに更新される(命令サイクルt4)。
【0057】
インクリメンタ53c、次IFAR53d、セレクタ53eからなるループ回路は、セレクタ53eにより選択された命令読み出しアドレスを更新する回路である。セレクタ53eから出力されるアドレスを図13のIF1に示す。同図において、例えばタスク0からタスク1への切替えに際して、セレクタ53eは、サイクルt4においてタスク別PC格納部53aから読み出された命令(1−0)アドレスを選択し、サイクルt5〜t7において次IFAR53dからのインクリメントされた命令アドレスを選択する。
【0058】
現IFAR53bは、セレクタ53eの選択出力IF1を1サイクル遅れて保持し、命令メモリ52に命令読み出しアドレスとして出力する。言い換えれば、現在アクティブなタスクの命令読み出しアドレスを保持する。現IFAR53bの命令読み出しアドレスを、図13のIF2に示す。同図に示すように、IF2は4命令サイクル毎に異なるタスクの命令アドレスを指している。
【0059】
DECAR53gは、命令レジスタ54に保持されている命令のアドレスを保持する。つまり、デコード中の命令を指す。図13中のDECに、DECAR53gに保持されたアドレスを示す。また、図13中のEXは、実行中の命令アドレスを示す。
セレクタ53fは、分岐命令実行時や割込み発生時に分岐アドレスを選択し、それ以外は次IFAR53dのアドレスを選択する。
【0060】
このような命令読出回路53を備えることにより、IOプロセッサ5は、図13に示すように4段(IF1、IF2、DEC、EX)のパイプライン処理を行っている。このうちIF1ステージは、複数プログラムカウント値の選択及び更新を行うステージである。IF2ステージは、命令を読み出すステージである。<1.3.3.1.2 タスク管理部>
図14は、タスク管理部58の詳細な構成を示すブロック図である。同図においてタスク管理部58は、タスクの切替えタイミングを管理するスロットマネージャと、タスクの順序を管理するスケジューラとに大別される。
【0061】
スロットマネージャは、カウンタ58a、ラッチ58b、比較器58c、ラッチユニット58dを有し、4命令サイクル毎にタスク切替えを指示するタスク切替信号(chgtaskex)を命令読出回路53へ出力する。
具体的には、ラッチ58bは、カウンタ58aの出力の下位2ビットを保持する2個のFF(Flip Flop)回路である。カウンタ58aは、命令サイクルを示すクロック毎にラッチ58bの2ビットの出力値を+1インクリメントした3ビットを出力する。その結果、カウンタ58aは、1、2、3、4を繰り返し出力することになる。比較器58cは、カウンタ58aの出力値が定数4と一致したときにタスク切替信号(chgtaskex)を命令読出回路53とスケジューラとに出力する。
【0062】
スケジューラは、タスクラウンド管理部58e、プライオリティエンコーダ58f、ラッチ58gを備え、タスク切替信号(chgtaskex)が出力されるごとに、タスクidを更新し、現在のタスクidと次に実行すべきタスクidとを命令読出回路53に出力する。
具体的には、ラッチユニット58d、ラッチ58gは、ともに現在のタスクidをエンコードされた形式(3ビット)で保持する。エンコードされた形式は、その値がタスクidを表す。
【0063】
タスクラウンド管理部58eは、タスク切替信号(chgtaskex)が入力されたとき、ラッチユニット58dを参照して、次に実行すべきタスクidを、デコードされた形式(6ビット)で出力する。デコードされた形式(6ビット)は、1ビットが1タスクに対応し、ビット位置がタスクidを表す。
プライオリティエンコーダ58fは、タスクラウンド管理部58eから出力されるタスクidを、デコードされた形式からエンコードされた形式に変換する。上記ラッチユニット58d、ラッチ58gは、ともにエンコードされたタスクidを1サイクル遅れて保持する。
【0064】
この構成により、タスクラウンド管理部58eは、比較器58cからタスク切替信号(chgtaskex)が出力されたとき、プライオリティエンコーダ58fから次に実行すべきタスクのidを”nexttaskid(rd addr)”信号として、ラッチ58eから現タスクidを”taskid(wr addr)”信号として出力する。
<1.4 動作説明>
以上のように構成された第1の実施形態における映像音声処理装置1000について、その動作を説明する。
【0065】
入出力処理部1001において、ストリーム入力部1から非同期に入力されるMPEGストリームは、入出力プロセッサ5の制御によって、バッファメモリ2、メモリコントローラ6を介して一旦外部メモリ3に格納され、さらに、メモリコントローラ6を介してFIFOメモリ4に保持される。このときFIFOメモリ4に対して、IOプロセッサ5は、上記タスク2(b)、タスク3を実行することによりその残量に応じて、圧縮動画データ、圧縮音声データを供給する。これにより、FIFOメモリ4には過不足なく一定量の圧縮動画データ、圧縮音声データが供給されるので、デコード処理部1002は、非同期の入出力とは切り離されて、デコード処理に専従することができる。ここまでの処理は、上記入出力処理部1001により、デコード処理部1002とは独立に並行してなされる。
【0066】
一方、デコード処理部1002において、FIFOメモリ4に保持されたMPEGストリームデータは、以降プロセッサ7、コード変換部9、画素演算部10、画素読み書き部11により復号される。FIFOメモリ4以降の復号動作を示す説明図を図15に示す。
同図では、横軸を時間軸としておおよそ1マクロブロック分のヘッダ解析及び各ブロック毎のデコードの様子を示している。また縦方向はデコード処理部1002の各部においてブロック毎のデコードがパイプライン的に実行される様子を示している。
【0067】
同図に示すように、プロセッサ7は、圧縮映像データのヘッダ解析と、圧縮音声データに対するデコード処理とを時分割で繰り返す。すなわち、プロセッサ7は、1マクロブロック分のヘッダ解析を行い、解析結果をコード変換部9、画素演算部10、画素読み書き部11に通知した後、コード変換部9に対してマクロブロックのデコード開始を指示する。その後プロセッサ7は、コード変換部9からの割込み信号が通知されるまで、圧縮音声データのデコード処理を行う。デコード後の音声データは内部メモリ8に一旦保持され、さらにメモリコントローラ6により外部メモリ3にDMA転送される。
【0068】
また、コード変換部9は、プロセッサ7からマクロブロックのデコード開始指示を受けて、マクロブロック内の各ブロック毎にバッファ200に格納する。このときコード変換部9は、プロセッサ7のヘッダ解析時に通知されたブロックのスキャンタイプに応じてバッファ200への書き込みアドレスの順番を変更する。つまりジグザグスキャンの場合と、オルタネートスキャンの場合とで書き込みアドレスの順番を変更する。これにより画素演算部10は、読み出しアドレスの順番を変更しなくてもよく、スキャンタイプに拘らず常に同じに読み出しアドレスの順番にて読み出すことができる。コード変換部9は、マクロブロック内の6つのブロックをVLD処理をし終えるまで上記動作を繰り返してバッファ200に書き出す。6ブロックのVLDを終えるとプロセッサ7に割込みを発生する。この割込み信号は、マクロブロックデコード終了信号End Of Macro Block(EOMB)である。コード変換部9は6つ目のブロックのブロック終了信号End Of Block(EOB)を検出することによりEOMBを生成している。
【0069】
画素演算部10は、コード変換部9と並行して、図9に示したようにバッファ200に格納されたブロックデータをブロック単位にIQ、IDCTを施し、その処理結果をバッファ201に格納する。
画素読み書き部11は、画素演算部10と並行して、バッファ201のブロックデータと、プロセッサ7によるヘッダ解析により通知された動きベクトルとに基づいて、図15に示すように外部メモリ3の参照フレームからの矩形領域の切り出しと、ブロック合成とを行う。ブロック合成結果は、FIFOメモリ4を介して外部メモリ3に格納される。
【0070】
上記は、スキップマクロブロックではない場合の動作であるが、スキップマクロブロックの場合にはコード変換部9及び画素演算部10は動作せず、画素読み書き部11のみが動作する。スキップマクロブロックがある場合には、参照フレーム中の矩形領域と同じ画像なので、画素読み書き部11により、その画像が復号画像として外部メモリ3にコピーされることになる。
【0071】
この場合、コード変換部9からプロセッサ7への割込み信号は次のようにして生成される。すなわち、プロセッサ7が画素読み書き部11に対して動き補償動作の開始の制御信号を送付したことを示す信号と、画素読み書き部11が動き補償動作が可能であることを示す信号と、スキップマクロブロックであることを示す信号との論理積を取り、さらにこの論理積と上記のEOMB信号との論理和として割込み信号がプロセッサ7に入力される。
【0072】
以上説明してきたように本発明の第1実施形態の映像音声処理装置によれば、記憶媒体や通信媒体からのMPEGストリーム入力処理と、表示装置及び音声出力装置への表示画像データ及び音声データの出力処理と、デコード処理部1002へストリームを供給する処理とを入出力処理部1001が分担し、圧縮映像データ及び圧縮音声データのデコード処理をデコード処理部1002が分担するように構成されている。これにより、デコード処理部1002は、非同期に発生する処理から解放されてデコード処理に専従することができる。その結果、MPEGストリーム入力、デコード、出力という一連の処理を効率良く実行するので、高速な動作クロックを用いなくてもMPEGストリームのフルデコード(フレーム落ちなし)を実現することができる。
【0073】
また、本映像音声処理装置は、1チップにLSI化することが望ましい。この場合、100MHz以下の動作クロック(実際には54MHz)で上記フルデコードが可能である。この点、動作クロックが100MHzさらには200MHzを越える近年の高性能CPUは、画像サイズが小さければ上記フルデコードを可能にしているが、その反面製造コストが高価である。これに対して、本映像音声処理装置は、製造コストの点とフルデコードの点で優れている。
【0074】
さらに、本映像音声処理装置のデコード処理部1002は、次のように役割分担している。
つまり、プロセッサ7が圧縮映像データに対しても圧縮音声データに対しても多岐にわたる条件判断を必要とするヘッダ解析を担当するとともに音声圧縮データのデコードも担当する。圧縮映像データのブロックデータに対しては、定型的な大量の演算量が要求されるので、コード変換部9、画素演算部10、画素読み書き部11という専用のハードウェア(ファームウェア)が、デコード処理を担当する。図15に示したようにコード変換部9、画素演算部10、画素読み書き部11は、パイプライン化されている。画素演算部10は、IQとIDCTとが並列処理が可能になっている。画素読み書き部11は2ブロック単位の参照フレームのアクセスを実現している。これらにより圧縮音声デコード処理の効率化が達成されているので、映像デコード専用のハードウェア部分は高速クロックを用いなくとも、高い処理能力を得ることができる。具体的には100MHzを越える高速クロックを用いずに50〜60MHz程度のクロックで従来と同程度以上の処理能力が得られた。従って、高速素子を用いる必要がなく製造コストを押さえることができる。
【0075】
また、映像デコードの基本単位をプロセッサ7においてマクロブロック単位、コード変換部9および画素演算部10においてブロック、画素読み書き部11において2ブロックとしているので、映像デコードにおける緩衝バッファの容量を最小限に抑えることが可能となる。
<2 第2の実施形態>
本実施形態の映像音声処理装置は、圧縮ストリームデータのデコード機能に加えて、さらに、圧縮機能(以降、エンコード処理と呼ぶ)とグラフィックス機能を果たすように構成されている。
<2.1 映像音声処理装置の構成>
図16は、本発明の第2の実施形態における映像音声処理装置の構成を示すブロック図である。
【0076】
この映像音声処理装置2000は、ストリーム入出力部21、バッファメモリ22、FIFOメモリ24、入出力プロセッサ25、メモリコントローラ26、プロセッサ27、内部メモリ28、コード変換部29、画素演算部30、画素読み書き部31、ビデオ出力部12、音声出力部13、バッファ200、バッファ201とからなる。映像音声処理装置2000は、図4に示した映像音声処理装置1000の機能に加えて、次の機能が付加されている。すなわち、映像データと音声データの圧縮機能と、ポリゴンデータを描画するグラフィックス機能とが付加されている。
【0077】
そのため、映像音声処理装置2000において、図4と同名称の構成要素は全く同じ機能を有し、さらに、圧縮機能とグラフィックス機能を果たす機能が付加されている。以下図4と同じ点は説明を省略し、異なる点を中心に説明する。
ストリーム入出力部21は、双方向になっている点が異なる。つまり、入出力プロセッサ25の制御によりバッファメモリ22からMPEGデータを転送されると、転送されたパラレルデータをシリアルデータに変換して、MPEGデータストリームとして外部に出力する。
【0078】
バッファメモリ22、FIFOメモリ24も双方向になった点が異なる。
入出力プロセッサ25は、第1実施形態に示した(1)〜(4)に示すの経路のデータ転送を制御することに加えて、(5)〜(8)の径路の転送をも制御する。
(1)ストリーム入出力部21→バッファメモリ22→メモリコントローラ26→外部メモリ3
(2)外部メモリ3→メモリコントローラ26→FIFOメモリ24
(3)外部メモリ3→メモリコントローラ26→バッファメモリ22→ビデオ出力部12
(4)外部メモリ3→メモリコントローラ26→バッファメモリ22→音声出力部13
(5)外部メモリ3→メモリコントローラ26→内部メモリ28
(6)外部メモリ3→メモリコントローラ26→画素読み書き部31
(7)FIFOメモリ24→メモリコントローラ26→外部メモリ3
(8)外部メモリ3→メモリコントローラ26→バッファメモリ22→ストリーム入出力部21
(5)(6)の径路は、映像データ、音声データのエンコード処理を行う場合の元のデータの径路であり、(7)(8)は、圧縮後のMPEGストリームの径路を示す。
【0079】
まず、エンコード処理について説明する。エンコードすべきデータは外部メモリ3に格納されているものとする。外部メモリ3の映像データは、メモリコントローラ26を画素読み書き部31が制御することにより画素読み書き部31に転送される。
画素読み書き部31は映像データを第2のバッファ201に書き込む処理と差分画像生成処理を行なう。差分画像生成処理は、ブロック単位の動き検出(動きベクトルの算出)と差分画像の生成とからなる。そのため、画素読み書き部31は、符号化対象ブロックと類似する矩形領域と参照フレーム内で探索することにより動きベクトルを検出する動き検出回路を内部に有している。なお動き検出回路の代わりに、隣接するフレームの既に計算済みのブロックの動きベクトルを利用して符号化対象の動きベクトルを見積もる動き見積回路を備えるようにしてもよい。
【0080】
画素演算部25は、ブロック単位に差分画像データを受け取り、DCT、IDCT、量子化処理(以降、Q処理)、IQを行なう。こうして量子化された映像データはバッファ200に格納される。
コード変換部29は、バッファ200から量子化データを受け取り可変長符号処理(VLC)を行なう。可変長符号化されたデータは先入れ先出しメモリ24に格納され、メモリコントローラ26を通して外部メモリ3に格納されるとともに、プロセッサ27によりマクロブロック毎にヘッダ情報が付加される。
【0081】
また、外部メモリ3の映像データは、メモリコントローラ26を介して内部メモリ28に転送される。プロセッサ27は、マクロブロック毎にヘッダ情報を付加する処理と時分割で、内部メモリ28の音声データの圧縮処理を行う。
以上のように、エンコード処理は、第1の実施形態と逆の径路で処理されることになる。
【0082】
次に、グラフィックス処理について説明する。グラフィックス処理は、ポリゴンと呼ばれる矩形型図形の組合せによって行なわれる三次元画像生成処理である。本装置においてはポリゴンの頂点座標における画素データからポリゴン内部の画素データを生成する処理を行う。
最初にポリゴンの頂点データは外部メモリ3に格納されている。
【0083】
頂点データは、プロセッサ27がメモリコントローラ26を制御することにより内部メモリ28に格納される。プロセッサ27は内部メモリ28より頂点データを読みだしDDA(Digital Difference Analyze)の前処理を行ないFIFOメモリ24に書き込む。
コード変換部29は、画素演算部30の指示に従ってFIFOメモリ24から頂点データを読みだし画素演算部30に転送する。
【0084】
画素演算部30は、DDA処理を行ない画素読み書き部31に送信する。画素読み書き部31は、プロセッサ27の指示に従い、Zバッファ処理あるいはαブレンディング処理を行ないメモリコントローラ26を介して外部メモリ3に画像データを書き出す。
<2.1.1 画素演算部>
図17は、画素演算部30の構成を示すブロック図である。
【0085】
同図は、図7に示した画素演算部10と同じ構成要素には同じ番号を付与し、説明を省略し、以下異なる点を中心に説明する。
異なる点は、同図のように画素演算部30は、図7に示した画素演算部10に対して実行部が3面(501a〜501c)になっている点と、命令ポインタ保持部308と命令レジスタ309と分配部310とが追加された点とである。
【0086】
実行部501a〜501cが3面になっているのは、演算性能を向上させるためである。具体的には、グラフィックス処理においてはカラー画像RGBを独立に並列演算する。IQおよびQ処理では、乗算器502を3つ用いて高速化を図っている。IDCTにおいては乗算器502および加減算器503を複数用いることによって時間短縮を図っている。IDCTにおいてはバタフライ演算と呼ばれる演算が存在し、これは演算の元となる全てのデータ間で依存関係があるので、実行部501a〜501cのユニット間通信を行なうデータ線103を設けている。
【0087】
第1命令メモリ506、第2命令メモリ507は、IDCT、IQに加えてDCT、Q処理、DDA用のマイクロプログラムが格納されている。図18に、第1命令メモリ506、第2命令メモリ507の記憶内容の一例を示す。図8に比べてQ処理マイクロプログラムと、DCTマイクロプログラムと、DDAマイクロプログラムとが追加されている。
【0088】
命令ポインタ保持部308a〜308cは、実行部501a〜501cに対応して設けられ、それぞれ第1プログラムカウンタから入力されるアドレスを変換して命令レジスタ部309に出力する変換テーブルを有する。変換後のアドレスは、命令レジスタ部309のレジスタ番号を意味する。さらに、命令ポインタ保持部308a〜308cは、それぞれ後述するモディファイフラグを保持し命令実行部501a〜501cに出力する。
【0089】
変換テーブルについては命令ポインタ保持部308a、308b、308cは、例えば入力アドレスが1,2,3,4,5,6,7,8,9,10,11,12である場合に、それぞれ次のような変換後アドレスを出力する。
命令ポインタ保持部308a:1,2,3,4,5,6,7,8,9,10,11,12
命令ポインタ保持部308b:2,1,4,3,6,5,8,7,10,9,12,11
命令ポインタ保持部308c:4,3,2,1,8,7,6,5,12,11,10,9
命令レジスタ部309は、図23に示すように、マイクロ命令を保持する複数のレジスタ3つのセレクタと3つの出力ポートとからなる。3つのセレクタは、命令ポインタ部308a、308b、308cから入力される変換アドレス(レジスタ番号)に指定されるレジスタのマイクロ命令を選択する。3つの出力ポートは、セレクタに対応して設けられ、それぞれセレクタに選択されたマイクロ命令を分配部310を介して実行部501a〜501cに出力する。3つのセレクタ及び出力ポートが設けられているのは、3つの加減算器503(又は3つの乗算器502)に同時に異なるマイクロ命令を供給するためである。本実施例では3つの出力ポートは、分配部310を介して3つの加減算器503と3つの乗算器502の何れかに選択的に供給するものとする。
【0090】
例えば、命令レジスタ部309はレジスタR1〜R16(レジスタ番号1〜16)を備えている。レジスタR1〜R16に格納されているマイクロプログラムは、DCT及びIDCTにおいて必要な行列演算処理を表し、上記の3つのレジスタ番号順のいずれによっても同一処理を行うように格納されている。つまり、上記3つの実行順をもつマイクロプログラムは、実行順序が可換な一部のマイクロ命令の順序が入れ換えられている。これは、実行部501a〜501cが並列にマイクロプログラムを実行するので、実行部501a〜501c間でレジスタ(図外)アクセスの競合など資源干渉を回避するためである。また、上記行列演算処理は、8×8行列の乗算、転置、転送をその内容とする。
【0091】
次に、命令レジスタ部309の各レジスタに格納されるマイクロ命令はニーモニック形式では、
「op Ri,Rj,dest,(モディファイフラグ)」
と表記される。ただし命令レジスタ部309のマイクロ命令は、「opとRi,Rjと(モディファイフラグ)」の部分だけである。「dest」の部分は命令メモリ506、507から指定される。「(モディファイフラグ)」の部分命令ポインタ保持部308a〜308cから指定される。
【0092】
ここで、”op”は乗算命令、加減算命令、転送命令などを示すオペレーションコード、”Ri,Rj”はオペランドである。乗算命令は、3つの実行部501a〜c中の各乗算器502に実行される命令であり、加算命令及び転送命令は、3つの実行部501a〜c中の各乗算器502に実行される命令である。
”dest”は演算結果の格納先を示す。この”dest”は命令レジスタ部309のレジスタではなく、命令メモリ506(乗算命令の場合)又は命令メモリ507(加減算命令や転送命令の場合)から指定される。これは、命令レジスタ部309のマイクロプログラムを実行部501a〜501cに共通化するためである。もし転送先をレジスタにより指定すれば実行部501a〜501cそれぞれに個別のマイクロプログラムを用意する必要があり、マイクロプログラムの容量が数倍に膨らむことになる。
【0093】
”モディファイフラグ”は、加減算命令において、加算であるか減算であるかを示すフラグである。この”モディファイフラグ”は、命令レジスタ部309のレジスタからではなく、命令ポインタ保持部308a〜cから別途指定される。これは、DCT、IDCTでの行列演算に用いられる定数行列中に全要素が”1”の行(又は列)と全要素が”−1”行(又は列)とが含まれるので、命令ポインタ308a〜cから”モディファイフラグ”を指定することにより、命令レジスタ部309の同一マイクロプログラムを共用することを可能にしている。
【0094】
分配部310は、命令レジスタ部309から入力される3つのマイクロ命令が加減算命令である場合には、それらの「opとRi,Rj」の部分と、命令メモリ506から入力される「dest」の部分と、命令ポインタ部308a〜cから入力される「モディファイフラグ」とを3つの加減算器503に分配し、同時に命令メモリ506のマイクロ命令を3つの乗算器502に分配する。また、分配部310は、命令レジスタ部309から入力される3つのマイクロ命令が乗算命令である場合には、それらの「opとRi,Rj」の部分とを命令メモリ506から入力される「dest」の部分とを3つの乗算器502に分配し、、命令メモリ507のマイクロ命令を3つの加減算器503に分配する。言い換えれば、分配部310により、3つの加減算器503に供給されるマイクロ命令は、3つの加減算器503に共通する命令については命令メモリ507から1つのマイクロ命令がそれぞれに供給され、3つの加減算器503で異なる加減算命令については命令レジスタ部309からの3つのマイクロ命令がそれぞれに供給される。同様に、3つの乗算器502に供給されるマイクロ命令は、3つの乗算器502に共通する命令については命令メモリ506からマイクロ命令が供給され、3つの乗算器502で異なる乗算算命令については命令レジスタ部309からのマイクロ命令がそれぞれに供給される。
【0095】
画素演算部30のこのような構成によれば、命令メモリ506、命令メモリ507の記憶容量を削減することができる。
もし、画素演算部30が命令ポインタ保持部308a〜c、命令レジスタ部309、分配部310を備えていないと仮定すると、命令メモリ506、命令メモリ507はいずれも、3つの実行部501a〜cに対して異なるマイクロ命令を供給するには、3つのマイクロ命令を並列に記憶しなければならない。
【0096】
図22に命令ポインタ保持部308a〜c、命令レジスタ部309、分配部310を備えていない場合の命令メモリ506及び命令メモリ507の記憶内容の一例を示す。同図では、16ステップのマイクロプログラムが記憶され、1つのマイクロ命令は16ビット長としている。この場合、命令メモリ506と命令メモリ507は、3つのマイクロ命令を並列に記録することから、合計1536ビット(16ステップ×16ビット×3×2)の記憶容量を必要とする。
【0097】
これに対して、本実施例の画素演算部30における、命令ポインタ保持部308a〜c、命令レジスタ部309の記憶内容の一例を図23に示す。同図でも16ステップのマイクロプログラムが記憶され、1マイクロ命令は16ビットとしている。同図において、命令ポインタ保持部308a〜cは、それぞれ16個のレジスタ番号(4ビット長)を記憶し、命令レジスタ部309は16個のマイクロ命令を記憶する。この場合、命令ポインタ保持部308a〜cと命令レジスタ部309との記憶容量は448ビット(16ステップ×(12+16))でよい。このように画素演算部30では、マイクロプログラムの記憶容量を大幅に削減することができる。実際には、「dest」「モディファイフラグ」が別途発行されるようにしているので、その分の記録容量又は回路が必要である。また、命令メモリ506、507はマイクロ命令中の「dest」を指定し、また、実行部501a〜cに共通する乗算命令、加減算命令を発行するようにしているので、命令メモリ506、507を完全に削除することまではしていない。もし、命令レジスタ部309に6つの出力ポートを設ければ、命令メモリ506と命令メモリ507とを削除することも可能になる。
【0098】
なお、図23では、命令ポインタ保持部308a〜308cは、第1プログラムカウンタの値が0〜15の場合に、変換アドレス(レジスタ番号)を出力しているが、これに限らない。例えば第1プログラムカウンタの値が32〜47の場合に変換アドレスを出力するようにしてもよい。この場合、第1プログラムカウンタの値に適切なオフセット値を加える構成とすればよい。これにより、第1プログラムカウンタが示す任意のアドレス列を変換アドレスに変換することができる。
【0099】
以上の構成により、本実施形態では圧縮映像データと圧縮音声データのデコード処理だけでなく、映像および音声データのエンコード処理と、ポリゴンデータに基づくグラフィックス処理とが可能となっている。また、複数の実行部の並列動作により処理効率が向上している。しかも、命令レジスタ部308a〜308cにおいて一部のマイクロ命令の順序を入れ換えたことにより、複数の実行部間の資源干渉を回避することができるので、さらに処理効率を向上させている。
【0100】
なお、上記実施形態では3つの実行部を有する構成を示しているのは、RGBカラーのそれぞれを独立に演算できる点で有利だからである。さらに実行部の数は、3つ以上あればいくつでもよい。
また、上記実施形態において映像音声処理装置1000、2000は、それぞれ1チップLSI化することが望ましい。さらに外部メモリ3は、チップ外部であるものとして説明したが、1チップ内に内臓する構成としてもよい。
【0101】
また、上記実施形態では外部メモリに対してストリーム入出力部1(あるいはストリーム入出力部21)が、MPEGストリーム(あるいは映像音声データ)を格納していたが、ホストプロセッサが直接外部メモリ3に格納するように構成してもよい。
さらに、上記実施形態においてIOプロセッサ5は、4命令サイクル毎にタスク切替えを行っているが、4命令サイクル以外の複数命令サイクル毎であってもよい。また、タスク切替えの命令サイクル数は、タスク毎に予め重み付けをして異なる命令サイクル数にしておいてもよい。また優先度・緊急度に応じてタスク毎の命令サイクル数に重み付けを行ってもよい。
【0102】
【発明の効果】
本発明の映像音声処理装置は、圧縮音声データと圧縮映像データとを含むデータストリームを外部から入力、デコードし、デコードしたデータを出力装置に出力する映像音声処理装置であって、外部要因により非同期に発生する入出力処理を行う入出力処理手段と、前記入出力処理と並行して、メモリに格納されたデータストリームのデコードを主とするデコード処理を行うデコード処理手段とを備え、前記デコード処理手段によりデコードされた映像データ、デコードされた音声データはメモリに格納され、前記入出力処理は、外部から非同期に入力される前記データストリームを入力し、さらにメモリに格納することと、メモリに格納されたデータストリームをデコード処理手段に供給することと、外部の表示装置、音声出力装置それぞれの出力レートに合わせてメモリから読み出し、それらに出力することとを入出力処理として行うように構成されている。
【0103】
この構成によれば、入出力処理手段とデコード処理手段とがパイプライン的に並列動作することに加えて、非同期処理とデコード処理とを入出力処理手段とデコード処理手段とに分担させるので、デコード処理手段は非同期に発生する処理から解放されてデコード処理に専従することができる。その結果、本映像音声処理装置は、ストリームデータ入力、デコード、出力という一連の処理を効率良く実行するので、ストリームデータのフルデコード(フレーム落ちなし)を高速な動作クロックを用いなくても可能にしている。
【0104】
また、前記デコード処理手段は、データストリームに対して、条件判断を主とする逐次処理であって、圧縮音声データ及び圧縮映像データのヘッダ解析と、圧縮音声データのデコードとを含む逐次処理を行なう逐次処理手段と、前記逐次処理と並行して、定型処理を行う。定型処理は、圧縮映像データのヘッダ解析を除く圧縮映像データのデコードである定型処理手段とを備える構成としてもよい。
【0105】
この構成によれば、処理特性の異なる逐次処理と並列処理に適した定型処理とを1つのユニットに併存させることを解消することにより、処理効率を大幅に向上させることができる。特に、定型処理手段の処理効率を向上させることができる。なぜなら本映像音声処理装置において、定型処理手段は上記の非同期処理及び逐次処理から解放されたことから、圧縮映像データのデコードに要求される定型的な種々演算のみに専従できるるからである。その結果、高速な動作クロックを用いなくても高い処理能力を得ることができる。
【0106】
さらに、前記入出力処理手段は、外部から非同期データストリームを入力する入力手段と、外部の表示装置にデコードされた映像データを出力する映像出力手段と、外部の音声出力装置にデコードされた音声データを出力する音声出力手段と、命令メモリに格納された第1から第4のタスクを切替えながら実行するプロセッサとを有し、前記第1タスクは入力部から前記メモリにデータストリームを転送するプログラムであり、前記第2タスクは前記メモリからデコード処理手段にデータストリームを供給するプログラムであり、前記第3タスクは前記メモリから映像出力部にデコードされた映像データを出力するプログラムであり、前記第4タスクは前記メモリから音声出力部にデコードされた音声データを出力するプログラムであると構成してもよい。
【0107】
ここで、前記プロセッサは、前記第1から第4タスクに対応する少なくとも4つのプログラムカウンタを有するプログラムカウンタ部と、1つのプログラムカウンタが指す命令アドレスを用いて、各タスクプログラムを記憶する命令メモリから命令を取り出す命令フェッチ部と、命令取出部に取出された命令を実行する命令実行部と、所定数の命令サイクルが経過する毎に、命令フェッチ部に対してプログラムカウンタを順次切替えるように制御するタスク制御部とを有する構成としてもよい。
【0108】
この構成によれば、外部装置により定まるストリームデータの入力レート及び入力周期、外部表示装置、外部音声出力装置により定まる映像データ、音声データそれぞれの出力レート及び出力周期がどのような範囲であっても、入出力要求に対する応答遅延が極めて小さいという効果がある。
また、本発明の映像音声処理装置は、圧縮音声データと圧縮映像データとを含むデータストリームを入力する入力手段と、データストリームに対して、条件判断を主とする逐次処理であって、データストリーム中の所定ブロック単位に付加されたヘッダ情報の解析と、データストリーム中の圧縮音声データの復号とを行なう逐次処理手段と、定型演算を主とする定型処理であって、ヘッダ解析の結果を用いてデータストリーム中の圧縮映像データを、前記逐次処理と並行して、所定ブロック単位に復号する定型処理手段とを備え、前記逐次処理手段は前記所定ブロックのヘッダ解析が終了したとき、定型処理手段に当該所定ブロックのデコード開始を指示し、定型処理手段から所定ブロックのデコード終了通知を受けたとき、次の所定ブロックのヘッダ解析を開始するように構成してもよい。
【0109】
この構成によれば、逐次処理手段が圧縮映像データに対しても圧縮音声データに対しても多岐にわたる条件判断を必要とするヘッダ解析を担当するとともに音声圧縮データのデコードも担当する。一方、定型処理手段は、圧縮映像データのブロックデータに対する、定型的な大量の演算量を担当する。このような役割分担により、また逐次処理手段は映像デコードに比較して演算量が少ない音声デコード全般と、圧縮映像データのヘッダ解析と、定型処理手段の制御とを行う。その制御の下で、定型処理手段は、専ら定型的な演算を行うので、無駄のない効率的な処理を実現できる。それゆえ高い周波数で動作させなくても処理能力を得ることができ、製造コストを低減させることができる。また、逐次処理手段は、音声デコード全般と、圧縮映像データのヘッダ解析と、定型処理手段の制御とを順次行うので、1プロセッサにて構成できる。
【0110】
また、前記定型処理手段は、逐次処理手段の指示に従ってデータストリーム中の圧縮映像データを可変長復号するデータ変換手段と、可変長復号により得られた映像ブロックに対して、所定の演算を施すことにより逆量子化および逆離散余弦変換を行う演算手段と、逆離散余弦変換後の映像ブロックと復号済みのブロックを合成することにより動き補償処理を行って映像データを復元する合成手段とを有し、
前記逐次処理手段は、データ変換手段により可変長復号されたヘッダ情報を取得する取得手段と、取得されたヘッダ情報を解析する解析手段と、解析結果として得られるパラメータを定型処理手段に通知する通知手段と、入力手段により入力されたデータストリーム中の圧縮音声データを復号する音声復号手段と、前記定型処理手段から所定ブロックのデコード完了を通知する割込み信号を受けたとき、音声復号手段の動作を停止するとともに取得手段を起動し、前記通知手段が前記通知をしたとき、前記データ変換手段に映像ブロックの可変長復号の開始を指示する制御手段とを有するように構成してもよい。
【0111】
この構成によれば、マクロブロックなど所定ブロック単位に逐次処理手段は、ヘッダ解析を行った後音声デコードを行い、定型処理手段により所定ブロックのデコードが完了したとき次のブロックのヘッダ解析を開始する。このように逐次処理手段は時分割でヘッダ解析と音声デコードとを繰り返すので1個のプロセッサにて低コストで実現することができる。また、定型処理手段は多岐にわたる条件判断処理をする必要がないので、低コストで専用ハードウェア(或はハードウェアとファームウェア)化することができる。
【0112】
ここで、前記演算手段は、さらに1ブロックに相当する記憶領域を有する第1バッファを有し、前記データ変換手段は、データストリーム中の圧縮映像データを可変長復号する可変長復号手段と、第1バッファの記憶領域のアドレスをジグザグスキャン順に並べた第1アドレス列を記憶する第1アドレステーブル手段と、第1バッファの記憶領域のアドレスをオルタネートスキャン順に並べた第2アドレス列を記憶する第2アドレステーブル手段と、第1アドレス列と第2アドレス列の一方に従って、可変長復号手段の可変長復号により得られるブロックデータを第1バッファに書き込む書き込み手段とを有する構成としてもよい。
【0113】
この構成によれば、書込み手段は、ジグザグスキャンとオルタネートスキャンのどちらにも対応して、第1バッファの記憶領域にブロックデータを書き込むことができる。従って演算手段は、第1バッファの記憶領域からブロックデータ読み出すときに、読み出しアドレスの順番を変更しなくてもよく、スキャンタイプに拘らず常に同じに読み出しアドレスの順番にて読み出すことができる。
【0114】
さらに、前記解析手段は、ヘッダ情報に基づいて量子化スケールと動きベクトルとを算出し、前記通知手段は、量子化スケールを演算手段に、動きベクトルを合成手段に通知するように構成してもよい。
この構成によれば、動きベクトルの算出を逐次処理手段に担当させることができ、合成手段は算出された動きベクトルを用いて定型的に動き補償処理を行うことができる。。
【0115】
また、前記演算手段は、それぞれマイクロプログラムを記憶する第1、第2の制御記憶部と、第1制御記憶部に第1読出アドレスを指定する第1プログラムカウンタと、第2読出アドレスを指定する第2プログラムカウンタと、第1読出アドレスと第2読出アドレスとの一方を選択して第2制御記憶部に出力するセレクタと、乗算器と加算器とを有し、第1、第2制御記憶部によるマイクロプログラム制御によりブロック単位の逆量子化と逆離散余弦変換とを実行する実行部と
を有する構成としてもよい。
【0116】
この構成によれば、マイクロプログラム(ファームウェア)は多岐にわたる条件判断処理を行う必要がなく、定型的な処理を実現するだけなのでプログラムサイズが小さくかつ作成が容易であり、低コスト化に適している。しかも、2つのプログラムカウンタを使用して乗算器と加算器とを独立して並列に動作させることができる。
【0117】
さらに、前記実行部は、セレクタにより第2読出アドレスが選択されたとき、乗算器を用いた処理と加算器を用いた処理とを独立並行して行い、セレクタにより第1読出アドレスが選択されたとき、乗算器を用いた処理と加算器を用いた処理とを連動させて行うよう構成してもよい。
この構成によれば、乗算器及び加算器の遊び時間を減らして処理効率を向上させることができる。
【0118】
ここで、前記演算手段は、さらに、データ変換手段からの映像ブロックを保持する第1バッファと、実行部により逆離散余弦変換されたブロックを保持する第2バッファとを有し、前記第1制御記憶部は、逆量子化処理するマイクロプログラムと、逆離散余弦変換するマイクロプログラムとを記憶し、前記第2制御記憶部は、逆離散余弦変換するマイクロプログラムと、逆離散余弦変換された映像ブロックを第2バッファに転送するマイクロプログラムとを記憶し、前記実行手段は、逆離散余弦変換された映像ブロックを第2バッファに転送する処理と、次の映像ブロックを逆量子化する処理とを並列に実行し、逆量子化された当該映像ブロックを逆離散余弦変換する処理を乗算器と加算器とを連動させて実行するように構成してもよい。
【0119】
この構成によれば、逆量子化処理と第2バッファへの転送処理とを並列実行するので処理効率を向上させることができる。
また、前記入力手段は、さらにポリゴンデータを入力し、前記逐次処理手段は、さらにポリゴンデータを解析してポリゴンの頂点座標とエッジの傾きとを算出し、前記定型処理手段は、さらに算出された頂点座標と傾きと従って、前記ポリゴンの画像データを生成するように構成してもよい。
【0120】
この構成によれば、逐次処理手段はポリゴンデータの解析を担当し、定型処理手段は定型的な画像データ生成処理を担当する。本映像音声処理装置は、効率よくポリゴンデータから画像データを生成するグラフィックス処理を行うことができる。
ここで、前記第1、第2制御記憶部は、さらにDDAアルゴリズムによる走査変換を行うマイクロブログラムを記憶し、前記実行部は、さらに逐次処理手段により算出された頂点座標と傾きとに基づいてマイクロプログラム制御により走査変換を行うように構成してもよい。
【0121】
この構成によれば、画像データの生成は前記第1、第2制御記憶部に走査変換マイクロプログラムにより簡単に実現することができる。
また、前記合成手段はさらに圧縮すべき映像データから差分画像を表す差分ブロックを生成し、前記第2バッファはさらに生成された差分画像を保持し、第1制御記憶部はさらに離散余弦変換するマイクロプログラムと量子化処理するマイクロプログラムとを記憶し、第2制御記憶部はさらに離散余弦変換するマイクロプログラムと離散余弦変換された映像ブロックを第1バッファに転送するマイクロプログラムとを記憶し、前記実行手段はさらに第2バッファに保持された差分ブロックに対して離散余弦変換と量子化を実行して第1バッファに転送し、前記データ変換手段はさらに第1バッファのブロックに対して可変長符号化を行い、前記逐次処理手段はさらにデータ変換手段により可変長符号化された所定のブロックに対してヘッダ情報を付加するように構成してもよい。
【0122】
この構成によれば、定型処理手段は定型的な処理として量子化と離散余弦変換を担当し、逐次処理手段は条件判断を要する処理(ヘッダ情報の付加)を担当する。この場合、本映像音声処理装置は、高速クロックを用いなくても画像データから圧縮映像データへのエンコード処理を効率よく実行することができる。
また、前記演算手段は、それぞれマイクロプログラムを記憶する第1、第2の制御記憶部と、第1制御記憶部に第1読出アドレスを指定する第1プログラムカウンタと、第2読出アドレスを指定する第2プログラムカウンタと、第1読出アドレスと第2読出アドレスとの一方を選択して第2制御記憶部に出力するセレクタと、乗算器と加算器とをそれぞれ有し、第1、第2制御記憶部によるマイクロプログラム制御によりブロック単位の逆量子化と逆離散余弦変換とを実行する複数の実行部とを備え、各実行部は、ブロックを分割した部分ブロックを分担して処理するように構成してもよい。
【0123】
この構成によれば、複数の実行部が並列に演算命令を実行するので、定型的な大量の演算を画素レベルで並列化して効率よく実行することができる。
また、前記演算手段は、さらに、各実行部に対応して設けられ、各変換テーブルは所定のアドレス列に対応して部分的にアドレス順序を入れ換えた変換アドレス保持する複数のアドレス変換テーブルと、所定の演算を実現するマイクロプログラムを構成する個々のマイクロ命令を変換アドレスに対応させて記憶する複数レジスタからなる命令レジスタ群と、第1及び第2制御記憶部と複数の実行部との間に設けられ、第1制御記憶部又はセレクタから各実行部に出力されるマイクロ命令を、命令レジスタのマイクロ命令に切り替えて複数の実行部に出力する切り替え部とを備え、前記第1読出アドレス又は第2読出アドレスが前記所定のアドレス列の中のアドレスである場合、そのアドレスは前記各アドレス変換テーブルによって変換アドレスに変換される。前記命令レジスタ群は、変換テーブルから出力された各変換アドレスに対応するマイクロ命令を出力するように構成してもよい。
【0124】
この構成によれば、複数の実行部が並列にマイクロプログラムを実行する間、実行部間でアクセスの競合など資源干渉を回避して、さらに効率よく処理することができる。
ここで、前記各変換テーブルは、さらに第1プログラムカウンタが前記所定のアドレス列中の第1読出アドレスを出力する間、前記レジスタ中の加減算を示すマイクロ命令出力に伴って、加算すべきか減算すべきかを示すフラグを前記複数の実行部に出力し、前記各実行部は、前記フラグに従って加減算を実行し、前記フラグは、前記第2制御記憶部のマイクロ命令に従って設定されるように構成してもよい。
【0125】
この構成によれば、マイクロ命令により加算を行うか減算を行うかを変換テーブルが指定するので、同じマイクロプログラムを2通りに共用できるので、さらに、マイクロプログラムの全容量を低減させることができ、ハードウェア規模の低減、ひいては低コスト化を実現できる。
また、前記第2制御記憶部は、さらに第1プログラムカウンタが前記所定のアドレス列中の第1読出アドレスを出力する間、前記レジスタ中のマイクロ命令出力に伴って、マイクロ命令実行結果の格納先を示す情報を前記複数の実行部に出力し、前記各実行部は、格納先情報に従って実行結果を格納するように構成してもよい。
【0126】
この構成によれば、格納先情報は、命令レジスタ群中のマイクロプログラムと別個に指定できるので、当該マイクロプロラムを異なる処理例えば行列演算の部分的な処理において共用することができる。その結果、さらに、マイクロプログラムの全容量を低減させることができ、ハードウェア規模の低減、ひいては低コスト化を実現できる。
【図面の簡単な説明】
【図1】第1の従来技術における映像音声デコーダによるデコード処理の説明図を示す。
【図2】第2の従来技術における2チップ構成のデコーダによるデコード処理の説明図を示す。
【図3】本発明の第1の実施形態における画像処理装置の概略構成を示すブロック図である。
【図4】本発明の第1の実施形態における画像処理装置の構成を示すブロック図である。
【図5】MPEGストリームを階層的に示すとともに画像処理装置各部の動作タイミングを示す図である。
【図6】プロセッサ7によるマクロブロックヘッダの解析と、他の各部への制御内容とを示す図である。
【図7】画素演算部10の構成を示すブロック図である。
【図8】第1命令メモリ506及び第2命令メモリ507に記憶されたマイクロプログラムの一例を示す。
【図9】画素演算部10の動作タイミングを示す図である。
【図10】画素読み書き部11の詳細な構成を示すブロック図である。
【図11】IOプロセッサ5の構成を示すブロック図である。
【図12】命令読出回路53の詳細な構成例を示すブロック図である。
【図13】IOプロセッサ5の動作タイミングを示すタイムチャートである。
【図14】タスク管理部の構成を示すブロック図である。
【図15】FIFOメモリ4以降の復号動作を示す説明図である。
【図16】本発明の第2の実施形態のおける画像処理装置の構成を示すブロック図である。
【図17】画素演算部30の構成を示すブロック図である。
【図18】第1命令メモリ506、第2命令メモリ507の記憶内容の一例を示す。
【図19】コード変換部9の構成を示すブロック図である。
【図20】8×8個の空間周波数データを記憶するブロック記憶領域と、ジグザグスキャンの順路を示す。
【図21】8×8個の空間周波数データを記憶するブロック記憶領域と、オルタネートスキャンの順路を示す。
【図22】命令ポインタ保持部308a〜c、命令レジスタ部309、分配部310を備えていない場合の命令メモリ506及び命令メモリ507の記憶内容の一例を示す。
【図23】命令ポインタ保持部308a〜c、命令レジスタ部309の記憶内容の一例を示す。
【符号の説明】
1 ストリーム入力部
2 バッファメモリ
3 外部メモリ
4 FIFOメモリ
5 入出力プロセッサ
5a DMAC
6 メモリコントローラ
7 プロセッサ
8 内部メモリ
9 コード変換部
10 画素演算部
12 ビデオ出力部
13 音声出力部
14 ホストI/F部
1000 映像音声処理装置
1001 入出力処理部
1002 デコード処理部
1003 逐次処理部
1004 定型処理部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention belongs to the technical field of digital signal processing, and relates to an image processing apparatus that performs expansion of compressed video and audio data, compression of video and audio data, and graphics processing.
[0002]
[Prior art]
In recent years, combined with the establishment of digital video data compression / decompression technology and the improvement of LSI technology, a decoder for expanding compressed video and audio data, an encoder for compressing video and audio data, and a graphic Various types of video / audio processing devices such as graphics processing for performing image processing are regarded as important.
[0003]
As a first prior art, there is a video / audio decoder (JP-A-8-116429) for expanding compressed video and audio data of the Moving Picture Experts Group (MPEG) standard. This video / audio decoder performs both video decoding and audio decoding using one signal processing unit.
FIG. 1 is an explanatory diagram of a decoding process by the video / audio decoder. In the figure, the vertical axis represents time, and the horizontal axis represents the amount of calculation.
[0004]
When viewed along the vertical axis, video decoding and audio decoding are alternately performed. This is for decoding both video and audio with common hardware. As shown in the figure, video decoding is divided into sequential processing and block processing. The sequential processing is processing that requires a wide variety of condition determinations, such as decoding other than blocks, that is, analysis of the header of an MPEG stream, and the amount of calculation is small. The block decoding is a process of decoding a variable-length code of an MPEG stream and performing inverse quantization and inverse DCT (discrete cosine transform) on a block-by-block basis, and the amount of calculation is large. As shown in the figure, audio decoding is also divided into sequential processing similar to the above, which requires a wide variety of condition judgments, and decoding processing of the audio data itself. The decoding process of the audio data itself requires higher accuracy than the image data and must be processed within a limited time. Therefore, it is necessary to perform the processing with high accuracy and high speed, and the amount of calculation is large.
[0005]
As described above, the first conventional technology enables one-chip integration and realizes efficient audio-video decoding with hardware as small as one chip.
As a second conventional technique, there is a decoder having a two-chip configuration. One chip is used as a video decoder, and the other chip is used as an audio decoder. FIG. 2 is an explanatory diagram of a decoding process by a two-chip decoder. Both the video decoder and the audio decoder perform sequential processing including a large number of condition determinations such as header analysis, and block decoding processing mainly for decoding the data body. Since both the video decoder and the audio decoder process independently, the performance of each chip may be lower than in the first prior art.
[0006]
[Problems to be solved by the invention]
However, according to the above prior art, there are the following problems.
According to the first prior art, the signal processing unit must decode both video and audio, so that high processing performance is required. That is, it is necessary to operate using a high-speed clock of 100 MHz or more, and there is a problem that the cost is high as a semiconductor for consumer use. In order to increase the processing capacity without using a high-speed clock, it is conceivable to use a VLIW (Very Long Instruction Word) processor or the like. However, the cost of the VLIW processor itself is high and separate sequential processing is performed. Unless a processor is used, there is a problem that the entire processing becomes inefficient.
[0007]
According to the second conventional technique, there is a problem that the cost is high because two processors are used. In other words, neither a video processor nor an audio processor can use a general-purpose inexpensive processor with low processing capability. This is because a video processor is required to be capable of processing a large amount of image data in real time. Also, although the processor for audio does not require as much computational complexity as the processor for video, the audio data is required to have higher accuracy than the image data. Therefore, an inexpensive or low-performance processor does not satisfy the required processing capability for both video and audio.
[0008]
Further, when the video / audio processing device is used in an AV decoder used in a digital (satellite) broadcast tuner (called STB (Set Top Box)) or a DVD (Digital Versatile / Video Disc) reproducing device, An MPEG stream received from a broadcast wave or read from a disc is input, the MPEG stream is decoded, and a series of video signals and audio signals are finally output to a display, a speaker, and the like. Would be enormous. Recently, there has been an increasing demand for a video and audio processing device that efficiently executes such a series of enormous processes.
[0009]
The present invention performs a series of processing of inputting, decoding, and outputting stream data representing compressed image and compressed audio data, has high processing capability without operating at high frequency, and can reduce manufacturing cost. It is an object to provide a video and audio processing device.
It is another object of the present invention to provide a video / audio processing apparatus which realizes decoding of compressed video data, encoding of video data, and graphics processing at low cost.
[0010]
[Means for Solving the Problems]
In order to solve the above problems, the video and audio processing apparatus of the present invention is an apparatus that externally inputs and decodes a data stream including compressed audio data and compressed video data, and outputs the decoded data to an output device. Input / output processing means for performing input / output processing asynchronously generated by an external factor; and decoding processing means for performing decoding processing mainly for decoding a data stream stored in a memory in parallel with the input / output processing. The video data decoded by the decoding processing means and the decoded audio data are stored in a memory, and the input / output processing receives the data stream asynchronously input from the outside, and further stores the data stream in a memory. Supplying the data stream stored in the memory to the decoding processing means, and providing an external display device and audio output. Device read from the memory in accordance with the respective output rates, and is configured to perform and outputting them as input and output processing.
[0011]
According to this configuration, in addition to the input / output processing means and the decoding processing means operating in parallel in a pipeline, the asynchronous processing and the decoding processing are shared between the input / output processing means and the decoding processing means. The processing means can be released from the processing that occurs asynchronously and can exclusively use the decoding processing. As a result, the video and audio processing apparatus efficiently executes a series of processing of stream data input, decode, and output, thereby enabling full decoding of stream data (without dropping frames) without using a high-speed operation clock. ing.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiments of the video and audio processing apparatus of the present invention will be described in the following sections.
1. First Embodiment
1.1 Schematic configuration of video and audio processing device
1.1.1 Input / output processing unit
1.1.2 Decoding processing unit
1.1.2.1 sequential processing unit
1.1.2.2 Standard processing unit
1.2 Configuration of video and audio processing device
1.2.1 Configuration of input / output processing unit
1.2.2 Decoding processing unit
1.2.2.1 sequential processing unit
1.2.2.2 Standard processing unit
1.3 Detailed configuration of each part
1.3.1 Processor 7 (sequential processing unit)
1.3.2 Standard processing unit
1.3.2.1 Code conversion unit
1.3.2.2 Pixel operation unit
1.3.2.3 Pixel read / write unit
1.3.3 Input / output processing unit
1.3.3.1 IO processor
1.3.3.1.1 Instruction reading circuit
1.3.2.1.2 Task management unit
1.4 Description of operation
2 Second embodiment
2.1 Configuration of video and audio processing device
2.1.1 Pixel operation unit
<1. First Embodiment>
The video / audio processing device according to the present embodiment is provided in a satellite broadcast receiving device (STB: Set Top Box), a DVD (Digital Versatile Disc) reproducing device, a DVD-RAM recording / reproducing device, and the like, and serves as compressed video / audio data. An MPEG stream from a satellite broadcast or a DVD is input, decompressed (hereinafter, simply referred to as decoding), and a video signal and an audio signal are output to an external output device.
<1.1 Schematic Configuration of Video / Audio Processing Device>
FIG. 3 is a block diagram illustrating a schematic configuration of the video and audio processing device according to the first embodiment of the present invention.
[0013]
The video /
<1.1.1 Input / output processing unit>
The input /
<1.1.2 Decoding processing unit>
The
<1.1.2.1 Sequential processing unit>
The
<1.1.2.2 Standard processing unit>
The
<1.2 Configuration of Video / Audio Processing Device>
FIG. 4 is a block diagram showing a more detailed configuration of the video and
<1.2.1 Configuration of input / output processing unit>
In the figure, an input /
[0014]
The
[0015]
The
The
[0016]
The input / output processor 5 controls data input / output between the
(1)
(2)
(3)
(4)
In these paths, the input / output processor 5 controls the transfer of video data and audio data in the MPEG data independently. (1) and (2) are transfer paths of MPEG data before decoding. In the transfer paths (1) and (2), the input / output processor 5 transfers the compressed video data and the compressed audio data separately. (3) and (4) are transfer paths of the decoded video and audio data, respectively. The decoded video and audio data are transferred according to the respective output rates of an external display device (not shown) and an audio output device (not shown).
[0017]
The DMAC 5a includes a DMA transfer between the
The
[0018]
The
The host I /
<1.2.2 Decoding processing unit>
4 includes a
[0019]
The
<1.2.2.1 Sequential processing unit>
The
[0020]
The function of the
[0021]
The data structure of the first to fifth layers shown in the figure is described in detail in a known document, for example, ASCII "Point Illustrated Latest MPEG Textbook".
The
[0022]
The
<1.2.2.2 Routine processing unit>
The
[0023]
The
The
[0024]
The
The pixel read /
[0025]
Since the contents of the motion compensation, IQ, and IDCT are well-known technologies, detailed descriptions thereof are omitted (see the above-mentioned document).
<1.3 Detailed configuration of each part>
Next, a detailed configuration of main components of the video and
<1.3.1 Processor 7 (sequential processing unit)>
FIG. 6 is a diagram showing the analysis of the macroblock header by the
[0026]
As shown in the figure, the
Specifically, first, the
[0027]
Next, the
Further, the
[0028]
In the same manner, the
[0029]
Further, the two-processor configuration has a redundant configuration because each processor individually performs the above-described sequential processing that requires various condition judgments.
Next, the
[0030]
In the above processing, regarding the motion vector, a series of processing of obtaining the motion vector data (MV) (S113), calculating the motion vector (S118), and setting the motion vector in the pixel read / write unit 11 (S119) is necessary. It is. In this regard, the
[0031]
Since the header analysis of the compressed video data for one macroblock is completed as described above, the
<1.3.2 Standard processing unit>
Next, the
<1.3.2.1
FIG. 19 is a block diagram showing a configuration of the
[0032]
The
[0033]
The
[0034]
The circuit portion including the counter 902, the
The scan table 905 is a table that stores the addresses of the block storage areas of the
[0035]
The scan table 906 is a table that stores the addresses of the block storage areas of the
[0036]
The
The
<1.3.2.2 Pixel operation unit>
FIG. 7 is a block diagram illustrating a configuration of the
[0037]
As shown in the drawing, the
[0038]
The
The
[0039]
In the figure, a
The
[0040]
Since IQ is processed by the
9, when the
[0041]
Further, the
[0042]
Next, the
[0043]
Thereafter, similarly, the
<1.3.2.3 Pixel read / write unit>
FIG. 10 is a block diagram illustrating a detailed configuration of the pixel read /
As shown in the figure, the pixel read /
[0044]
The read /
<1.3.3 Input / output processing unit>
The input /
<1.3.3.1 IO processor>
FIG. 11 is a block diagram illustrating a configuration of the IO processor 5. In the figure, the IO processor 5 includes a
[0045]
The
[0046]
More specifically, it includes the following flags and the like.
-Start code detection flag (hereinafter also referred to as flag 1)
This flag is set when the
-Horizontal blanking flag (flag 2)
This flag indicates a horizontal blanking period, and is set by the
• Transfer completion flag of video frame data (flag 3)
This flag is set by the DMAC 5a when one frame of decoded image data is transferred from the
• Transfer completion flag of audio frame data (flag 4)
This flag is set by the DMAC 5a when one frame of decoded audio data is transferred from the
• Data transfer completion flag (flag 5)
This flag is set when the number of compressed image data designated by the IO processor 5 from the
• DMA request flag (flag 6)
This flag is a flag indicating that there is data to be subjected to DMA transfer of the compressed image data or compressed audio data in the
-Data request flag to video FIFO (flag 7)
This flag is a flag for requesting data transfer from the
• Data request flag to audio FIFO (flag 8)
This flag is a flag for requesting data transfer from the
• Decoder communication request flag (flag 9)
This flag is a flag for requesting communication from the
-Host communication request flag (flag 10)
This flag is a flag for requesting communication from the host processor to the input /
[0047]
The above-mentioned flags are constantly monitored, not interrupted, by each task executed by the IO processor 5.
The
・ Task 0 (Host I / F task)
This task is a task for performing communication with the host computer, that is, communication processing with the host computer via the host I /
・ Task 1 (purging task)
When a start code is detected by the stream input unit 1 (the flag 1), the task analyzes (parsing) the MPEG data input from the
・ Task 2 (stream transfer / audio task)
This task is a program that controls the following transfers (a) to (c).
[0048]
(A) DMA transfer of each elementary stream from the
(B) DMA transfer of the compressed audio data from the
[0049]
(C) DMA transfer of the decoded audio data from the
・ Task 3 (Video supply task)
This task performs DMA transfer of the compressed video data from the
・ Task 4 (video output task)
This task is a program for processing the DMA transfer (the transfer path (4)) of decoded video data from the
・ Task 5 (Decoder I / F task)
This task is a program that processes a command from the
[0050]
The
It is configured to switch the PC at high speed by hardware. With this configuration, the IO processor 5 saves the PC value of the current task in the memory at the time of the task switch and is released from the process of restoring the PC value of the next task from the memory.
[0051]
The decoder 55 decodes the instruction read from the
[0052]
The
The general-purpose register set
[0053]
The
<1.3.1.1.1 Instruction reading circuit>
FIG. 12 is a block diagram showing a detailed configuration example of the
[0054]
In the figure, the
[0055]
The task-specific PC storage unit 53a has six address registers corresponding to
[0056]
The program count values corresponding to
[0057]
The loop circuit including the
[0058]
The
[0059]
The
The
[0060]
With the provision of such an
FIG. 14 is a block diagram showing a detailed configuration of the
[0061]
The slot manager has a
Specifically, the
[0062]
The scheduler includes a task
Specifically, both the
[0063]
When the task switching signal (chgtaskex) is input, the task round
The priority encoder 58f converts the task id output from the task round
[0064]
With this configuration, when the task switching signal (chgtaskex) is output from the
<1.4 Description of operation>
The operation of the video /
[0065]
In the input /
[0066]
On the other hand, in the
In the figure, the horizontal axis represents the time axis, and the header analysis of approximately one macroblock and the decoding of each block are shown. The vertical direction indicates that the decoding of each block is executed in a pipeline manner in each unit of the
[0067]
As shown in the figure, the
[0068]
Further, the
[0069]
The
The pixel read /
[0070]
The above is the operation when the block is not a skip macro block. In the case of a skip macro block, the
[0071]
In this case, an interrupt signal from the
[0072]
As described above, according to the video / audio processing device of the first embodiment of the present invention, the MPEG stream input processing from the storage medium or the communication medium, and the display image data and the audio data to the display device and the audio output device are performed. The input /
[0073]
Further, it is desirable that the present video / audio processing device be integrated into an LSI on one chip. In this case, the full decoding can be performed with an operation clock of 100 MHz or less (actually, 54 MHz). In this regard, recent high-performance CPUs whose operation clocks exceed 100 MHz or 200 MHz enable the full decoding as long as the image size is small, but on the other hand, the manufacturing cost is high. On the other hand, the present video / audio processing apparatus is superior in terms of manufacturing cost and full decoding.
[0074]
Furthermore, the
In other words, the
[0075]
Further, since the basic unit of video decoding is a macroblock unit in the
<2 Second Embodiment>
The video and audio processing apparatus according to the present embodiment is configured to perform a compression function (hereinafter, referred to as an encoding process) and a graphics function in addition to a decoding function of the compressed stream data.
<2.1 Configuration of video and audio processing device>
FIG. 16 is a block diagram illustrating a configuration of a video and audio processing device according to the second embodiment of the present invention.
[0076]
The video /
[0077]
Therefore, in the video /
The stream input /
[0078]
The difference is that the
The input /
(1) Stream input /
(2)
(3)
(4)
(5)
(6)
(7)
(8)
The paths (5) and (6) are the paths of the original data when the video data and the audio data are encoded, and (7) and (8) show the paths of the MPEG stream after compression.
[0079]
First, the encoding process will be described. It is assumed that data to be encoded is stored in the
The pixel read /
[0080]
The
The
[0081]
The video data in the
As described above, the encoding process is performed in a path reverse to that of the first embodiment.
[0082]
Next, the graphics processing will be described. The graphics processing is a three-dimensional image generation processing performed by a combination of rectangular figures called polygons. In this apparatus, processing for generating pixel data inside the polygon from pixel data at the vertex coordinates of the polygon is performed.
First, the vertex data of the polygon is stored in the
[0083]
The vertex data is stored in the
The
[0084]
The
<2.1.1 Pixel operation unit>
FIG. 17 is a block diagram illustrating a configuration of the
[0085]
In the figure, the same components as those of the
The difference is that the
[0086]
The reason why the
[0087]
The
[0088]
The instruction
[0089]
Regarding the conversion table, the instruction
Instruction
Instruction
Instruction
As shown in FIG. 23, the
[0090]
For example, the
[0091]
Next, the microinstruction stored in each register of the
"Op Ri, Rj, dest, (modify flag)"
Is written. However, the microinstruction of the
[0092]
Here, “op” is an operation code indicating a multiplication instruction, an addition / subtraction instruction, a transfer instruction, and the like, and “Ri, Rj” is an operand. The multiplication instruction is an instruction executed by each of the
“Dest” indicates the storage location of the operation result. This “dest” is specified not from the register of the
[0093]
The "modify flag" is a flag indicating whether addition or subtraction is performed in an addition / subtraction instruction. The "modify flag" is separately specified not from the register of the
[0094]
When the three micro-instructions input from the
[0095]
According to such a configuration of the
Assuming that the
[0096]
FIG. 22 shows an example of the contents stored in the
[0097]
On the other hand, FIG. 23 shows an example of the storage contents of the instruction
[0098]
In FIG. 23, the instruction
[0099]
With the above configuration, in the present embodiment, not only decoding processing of compressed video data and compressed audio data, but also encoding processing of video and audio data and graphics processing based on polygon data are possible. Further, the processing efficiency is improved by the parallel operation of the plurality of execution units. In addition, by changing the order of some of the micro-instructions in the
[0100]
In the above embodiment, the configuration having three execution units is shown because it is advantageous in that each of the RGB colors can be calculated independently. Furthermore, the number of execution units may be any number as long as it is three or more.
Further, in the above embodiment, it is desirable that each of the video and
[0101]
In the above embodiment, the stream input / output unit 1 (or the stream input / output unit 21) stores the MPEG stream (or the video / audio data) in the external memory. May be configured.
Furthermore, in the above embodiment, the IO processor 5 performs the task switching every four instruction cycles, but may perform the task switching every plural instruction cycles other than the four instruction cycles. Also, the number of instruction cycles for task switching may be weighted in advance for each task and set to a different number of instruction cycles. Also, the number of instruction cycles for each task may be weighted according to the priority and the urgency.
[0102]
【The invention's effect】
A video and audio processing apparatus according to the present invention is a video and audio processing apparatus that externally inputs and decodes a data stream including compressed audio data and compressed video data, and outputs the decoded data to an output device. Input / output processing means for performing input / output processing occurring in the memory; and decoding processing means for performing decoding processing mainly for decoding a data stream stored in a memory in parallel with the input / output processing; The video data decoded by the means and the decoded audio data are stored in a memory, and the input / output processing includes inputting the data stream asynchronously input from the outside, storing the data stream in a memory, and storing the data stream in a memory. Supplying the decoded data stream to the decoding processing means, an external display device and an audio output device, respectively. To match the output rate from the memory, and is configured to perform and outputting them as input and output processing.
[0103]
According to this configuration, in addition to the input / output processing means and the decoding processing means operating in parallel in a pipeline, the asynchronous processing and the decoding processing are shared between the input / output processing means and the decoding processing means. The processing means can be released from the processing that occurs asynchronously and can exclusively use the decoding processing. As a result, the video and audio processing apparatus efficiently executes a series of processing of stream data input, decode, and output, thereby enabling full decoding of stream data (without dropping frames) without using a high-speed operation clock. ing.
[0104]
Further, the decoding processing means performs a sequential processing mainly on a condition determination on the data stream, including a header analysis of the compressed audio data and the compressed video data and a decoding of the compressed audio data. The sequential processing means performs a standard processing in parallel with the sequential processing. The routine processing may include a routine processing means for decoding the compressed video data excluding the header analysis of the compressed video data.
[0105]
According to this configuration, the processing efficiency can be greatly improved by eliminating the coexistence of the sequential processing having different processing characteristics and the routine processing suitable for the parallel processing in one unit. In particular, the processing efficiency of the routine processing means can be improved. This is because, in the present video / audio processing apparatus, since the standard processing means is released from the asynchronous processing and the sequential processing described above, it can exclusively use various standard operations required for decoding the compressed video data. As a result, high processing performance can be obtained without using a high-speed operation clock.
[0106]
Further, the input / output processing means includes an input means for inputting an asynchronous data stream from outside, a video output means for outputting decoded video data to an external display device, and an audio data decoded to an external audio output device. And a processor for executing the first to fourth tasks stored in the instruction memory while switching, wherein the first task is a program for transferring a data stream from an input unit to the memory. The second task is a program for supplying a data stream from the memory to the decoding processing means; the third task is a program for outputting decoded video data from the memory to a video output unit; The task is a program that outputs decoded audio data from the memory to an audio output unit. It may be.
[0107]
Here, the processor includes a program counter unit having at least four program counters corresponding to the first to fourth tasks, and an instruction memory for storing each task program using an instruction address indicated by one program counter. An instruction fetch unit that fetches an instruction, an instruction execution unit that executes the instruction fetched by the instruction fetch unit, and controls the instruction fetch unit to sequentially switch the program counter every time a predetermined number of instruction cycles elapse. It may be configured to have a task control unit.
[0108]
According to this configuration, regardless of the range of the input rate and the input cycle of the stream data determined by the external device, and the output rate and the output cycle of the video data and the audio data determined by the external display device and the external audio output device, respectively. In addition, there is an effect that a response delay to an input / output request is extremely small.
Further, the video and audio processing apparatus of the present invention includes: an input unit for inputting a data stream including compressed audio data and compressed video data; and a sequential processing mainly based on condition determination for the data stream. A sequential processing means for analyzing header information added to a predetermined block unit in the inside and decoding compressed audio data in a data stream; and a routine processing mainly including routine operations, using a result of the header analysis. Routine processing means for decoding the compressed video data in the data stream in units of predetermined blocks in parallel with the sequential processing, wherein the sequential processing unit performs routine processing when header analysis of the predetermined block is completed. To start decoding of the predetermined block, and when receiving a notification of the end of decoding of the predetermined block from the routine processing means, the next predetermined block is notified. It may be configured to start the header analysis.
[0109]
According to this configuration, the sequential processing means is responsible for header analysis which requires a wide variety of condition judgments for both compressed video data and compressed audio data, and is also responsible for decoding audio compressed data. On the other hand, the routine processing means is responsible for a large amount of routine operation on block data of the compressed video data. Due to such role sharing, the sequential processing means performs overall audio decoding, which requires a smaller amount of computation than video decoding, analyzes the header of compressed video data, and controls the routine processing means. Under the control, the routine processing unit performs a routine operation exclusively, so that efficient processing without waste can be realized. Therefore, the processing capability can be obtained without operating at a high frequency, and the manufacturing cost can be reduced. In addition, the sequential processing means sequentially performs overall audio decoding, header analysis of the compressed video data, and control of the standard processing means, so that it can be constituted by one processor.
[0110]
Further, the routine processing means performs a variable length decoding of the compressed video data in the data stream in accordance with an instruction of the sequential processing means, and performs a predetermined operation on the video block obtained by the variable length decoding. Computing means for performing inverse quantization and inverse discrete cosine transform, and synthesizing means for restoring video data by performing motion compensation processing by synthesizing a video block after inverse discrete cosine transform and a decoded block. ,
The sequential processing unit includes an obtaining unit that obtains header information that has been subjected to variable-length decoding by the data conversion unit, an analyzing unit that analyzes the obtained header information, and a notification that notifies a parameter obtained as an analysis result to the standard processing unit. Means, an audio decoding means for decoding the compressed audio data in the data stream inputted by the input means, and an operation of the audio decoding means when receiving an interrupt signal notifying the completion of decoding of the predetermined block from the routine processing means. The information processing apparatus may be configured to include: a control unit that instructs the data conversion unit to start variable-length decoding of the video block when the acquisition unit is stopped and the acquisition unit is activated and the notification unit notifies the notification.
[0111]
According to this configuration, the sequential processing unit performs header decoding after performing header analysis on a predetermined block basis such as a macroblock, and starts decoding the header of the next block when decoding of the predetermined block is completed by the standard processing unit. . As described above, the sequential processing means repeats the header analysis and the audio decoding in a time-division manner, so that it can be realized at low cost by one processor. Further, since the routine processing means does not need to perform a wide variety of condition judgment processing, it can be made into dedicated hardware (or hardware and firmware) at low cost.
[0112]
Here, the arithmetic unit further includes a first buffer having a storage area corresponding to one block, and the data conversion unit includes a variable length decoding unit that performs variable length decoding of compressed video data in a data stream; First address table means for storing a first address sequence in which addresses of storage areas of one buffer are arranged in zigzag scan order; and second address storing means for storing a second address sequence in which addresses of storage areas of the first buffer are arranged in alternate scan order. The configuration may include an address table unit and a writing unit that writes block data obtained by variable length decoding of the variable length decoding unit into the first buffer according to one of the first address sequence and the second address sequence.
[0113]
According to this configuration, the writing unit can write the block data in the storage area of the first buffer in response to both the zigzag scan and the alternate scan. Therefore, when reading the block data from the storage area of the first buffer, the arithmetic means does not need to change the order of the read addresses, and can always read in the same order of the read addresses regardless of the scan type.
[0114]
Further, the analysis unit may calculate a quantization scale and a motion vector based on the header information, and the notifying unit may notify the calculation unit of the quantization scale and notify the synthesis vector of the motion vector. Good.
According to this configuration, the calculation of the motion vector can be assigned to the sequential processing means, and the synthesizing means can routinely perform the motion compensation processing using the calculated motion vector. .
[0115]
Further, the arithmetic means designates a first and a second control storage section for storing a microprogram, a first program counter for designating a first read address in the first control storage section, and a second read address, respectively. A first program counter, a selector for selecting one of the first read address and the second read address and outputting the selected read address to the second control storage unit, a multiplier and an adder; An execution unit for performing inverse quantization and inverse discrete cosine transform in block units by microprogram control by the unit;
May be provided.
[0116]
According to this configuration, the microprogram (firmware) does not need to perform a wide variety of condition determination processing, and only realizes routine processing, so that the program size is small and easy to create, which is suitable for cost reduction. . Moreover, the multiplier and the adder can be operated independently and in parallel using two program counters.
[0117]
Further, when the second read address is selected by the selector, the execution unit performs the processing using the multiplier and the processing using the adder independently and in parallel, and the first read address is selected by the selector. At this time, the processing using the multiplier and the processing using the adder may be performed in conjunction with each other.
According to this configuration, the idle time of the multiplier and the adder can be reduced, and the processing efficiency can be improved.
[0118]
Here, the arithmetic unit further includes a first buffer for storing the video block from the data conversion unit, and a second buffer for storing the block subjected to the inverse discrete cosine transform by the execution unit, and The storage unit stores a microprogram for performing an inverse quantization process and a microprogram for performing an inverse discrete cosine transform, and the second control storage unit includes a microprogram for performing an inverse discrete cosine transform, and a video block subjected to an inverse discrete cosine transform. Is transferred to the second buffer, and the execution means executes processing for transferring the inverse discrete cosine transformed video block to the second buffer and processing for inversely quantizing the next video block in parallel. And the process of performing inverse discrete cosine transform of the inversely quantized video block may be performed in conjunction with the multiplier and the adder.
[0119]
According to this configuration, since the inverse quantization process and the transfer process to the second buffer are performed in parallel, the processing efficiency can be improved.
The input means further inputs polygon data, the sequential processing means further analyzes the polygon data to calculate the vertex coordinates of the polygon and the inclination of the edge, and the routine processing means further calculates the polygon data. The image data of the polygon may be generated according to the vertex coordinates and the inclination.
[0120]
According to this configuration, the sequential processing unit is in charge of analyzing the polygon data, and the standard processing unit is in charge of the standard image data generation processing. The video / audio processing apparatus can perform graphics processing for efficiently generating image data from polygon data.
Here, the first and second control storage units further store a microprogram for performing scan conversion by the DDA algorithm, and the execution unit further performs the above based on the vertex coordinates and the inclination calculated by the sequential processing means. The scan conversion may be performed by microprogram control.
[0121]
According to this configuration, the generation of the image data can be easily realized by the scan conversion microprogram in the first and second control storage units.
Further, the synthesizing means generates a differential block representing a differential image from the video data to be further compressed, the second buffer holds the further generated differential image, and the first control storage unit further performs a discrete cosine transform. The second control storage unit further stores a microprogram for performing discrete cosine transform and a microprogram for transferring the video block subjected to discrete cosine transform to the first buffer. The means further performs discrete cosine transform and quantization on the difference block held in the second buffer and transfers the result to the first buffer. The data conversion means further performs variable length coding on the block in the first buffer. And the sequential processing means further performs header information on the predetermined block which has been variable-length coded by the data conversion means. The may be configured to add.
[0122]
According to this configuration, the routine processing unit is responsible for quantization and discrete cosine transform as routine processing, and the sequential processing unit is responsible for processing that requires a condition determination (addition of header information). In this case, the present video / audio processing apparatus can efficiently execute the encoding process from image data to compressed video data without using a high-speed clock.
Further, the arithmetic means designates a first and a second control storage section for storing a microprogram, a first program counter for designating a first read address in the first control storage section, and a second read address, respectively. A first program counter, a selector for selecting one of the first read address and the second read address and outputting the selected one to the second control storage unit, a multiplier and an adder; A plurality of execution units for performing inverse quantization and inverse discrete cosine transform in block units by microprogram control by a storage unit are provided, and each execution unit is configured to share and process partial blocks obtained by dividing blocks. May be.
[0123]
According to this configuration, since a plurality of execution units execute the operation instructions in parallel, a large amount of routine operations can be efficiently executed in parallel at the pixel level.
Further, the arithmetic means is further provided corresponding to each execution unit, each conversion table is a plurality of address conversion table holding a conversion address partially changed the address order corresponding to a predetermined address sequence, An instruction register group consisting of a plurality of registers for storing individual microinstructions constituting a microprogram for realizing a predetermined operation in association with a translation address; and a first and second control storage units and a plurality of execution units. A switching unit that switches a microinstruction output from the first control storage unit or selector to each execution unit to a microinstruction in an instruction register and outputs the microinstruction to a plurality of execution units. (2) If the read address is an address in the predetermined address string, the address is converted according to each of the address conversion tables. It is converted to. The instruction register group may be configured to output a micro instruction corresponding to each translation address output from the translation table.
[0124]
According to this configuration, while the plurality of execution units execute the microprogram in parallel, resource interference such as access competition between the execution units can be avoided, and the processing can be performed more efficiently.
Here, each of the conversion tables should be added or subtracted in accordance with a microinstruction output indicating addition and subtraction in the register while the first program counter outputs the first read address in the predetermined address string. Outputting a flag indicating a perception to the plurality of execution units, wherein each execution unit performs addition and subtraction according to the flag, and the flag is set according to a microinstruction of the second control storage unit. Is also good.
[0125]
According to this configuration, since the conversion table specifies whether to perform addition or subtraction by a microinstruction, the same microprogram can be shared in two ways, so that the total capacity of the microprogram can be further reduced, The hardware scale can be reduced, and the cost can be reduced.
The second control storage unit further stores a micro instruction execution result storage location along with the micro instruction output in the register while the first program counter outputs the first read address in the predetermined address sequence. May be output to the plurality of execution units, and each execution unit may store the execution result according to the storage location information.
[0126]
According to this configuration, since the storage destination information can be specified separately from the microprogram in the instruction register group, the microprogram can be shared in different processing, for example, partial processing of matrix operation. As a result, the total capacity of the microprogram can be further reduced, and the hardware scale can be reduced, and the cost can be reduced.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram of a decoding process by a video / audio decoder according to a first conventional technique.
FIG. 2 is an explanatory diagram of a decoding process by a two-chip decoder according to a second conventional technique.
FIG. 3 is a block diagram illustrating a schematic configuration of an image processing apparatus according to the first embodiment of the present invention.
FIG. 4 is a block diagram illustrating a configuration of an image processing apparatus according to the first embodiment of the present invention.
FIG. 5 is a diagram showing an MPEG stream in a hierarchical manner and showing operation timing of each section of the image processing apparatus.
FIG. 6 is a diagram illustrating an analysis of a macroblock header by a
FIG. 7 is a block diagram illustrating a configuration of a
FIG. 8 shows an example of a microprogram stored in a
FIG. 9 is a diagram showing operation timings of the
FIG. 10 is a block diagram showing a detailed configuration of a pixel read /
FIG. 11 is a block diagram showing a configuration of an IO processor 5.
FIG. 12 is a block diagram showing a detailed configuration example of an
FIG. 13 is a time chart showing the operation timing of the IO processor 5;
FIG. 14 is a block diagram illustrating a configuration of a task management unit.
FIG. 15 is an explanatory diagram showing a decoding operation after the
FIG. 16 is a block diagram illustrating a configuration of an image processing apparatus according to a second embodiment of the present invention.
FIG. 17 is a block diagram illustrating a configuration of a
FIG. 18 shows an example of contents stored in a
FIG. 19 is a block diagram illustrating a configuration of a
FIG. 20 shows a block storage area for storing 8 × 8 spatial frequency data and a zigzag scan route.
FIG. 21 shows a block storage area for storing 8 × 8 spatial frequency data and a route of an alternate scan.
FIG. 22 shows an example of the contents stored in the
FIG. 23 shows an example of storage contents of the instruction
[Explanation of symbols]
1 Stream input section
2 Buffer memory
3 External memory
4 FIFO memory
5 I / O processor
5a DMAC
6 Memory controller
7 processor
8 Internal memory
9 Code converter
10. Pixel operation unit
12 Video output section
13 Audio output unit
14 Host I / F section
1000 video / audio processing device
1001 Input / output processing unit
1002 decode processing unit
1003 sequential processing unit
1004 Standard processing unit
Claims (31)
前記データストリームを外部から入力する処理と、生成された映像データを含むデータを外部へ出力する処理とを含む、外部要因から影響を受ける入出力処理を行うプロセッサと、
前記プロセッサとは独立に並行して、前記プロセッサから供給されるデータストリームをデコードすることにより映像データを含むデータを生成するデコード処理手段とを有し、
前記プロセッサは、
前記入出力処理の内容を表わす複数のタスクプログラムを記憶する命令メモリと、
前記複数のタスクプログラムそれぞれに対応するプログラムカウンタを有するプログラムカウンタ部と、
1つのプログラムカウンタが示す命令アドレスに基づき、前記命令メモリから命令を取り出す命令フェッチ部と、
前記命令フェッチ部により取り出された命令を実行する命令実行部と、
所定数の命令サイクルが経過する毎に、前記命令フェッチ部に対して、使用するプログラムカウンタを順次切替えるように制御するタスク制御部とを備え、
前記プロセッサは、前記複数のタスクプログラム、及び、レジスタセットを切替えながら実行し、
前記プロセッサは、さらに、MPEGデータを解析するタスクプログラムを実行することにより、個々のエレメンタリーストリームを抽出し、
前記デコード処理手段は、
定型演算を主とする定型処理であって、データストリーム中のブロック単位に付加されたヘッダ情報及びデータストリーム中の圧縮映像データの可変長復号処理と、可変長復号された圧縮映像データをブロック単位に復号する処理とを行なう定型処理手段と、
条件判断を主とする逐次処理であって、可変長復号処理されたヘッダ情報の解析処理と、データストリーム中の圧縮音声データの復号処理とを時分割で行なう逐次処理手段とを備え、
抽出された個々のエレメンタリーストリームをデコードすること
を特徴とする映像処理装置。A video processing apparatus that outputs data including video data generated by decoding a data stream including compressed video data input from the outside to the outside,
A processor that performs an input / output process that is affected by external factors, including a process of externally inputting the data stream and a process of outputting data including the generated video data to the outside,
Independently of the processor, in parallel with decoding processing means for generating data including video data by decoding a data stream supplied from the processor,
The processor comprises:
An instruction memory for storing a plurality of task programs representing the contents of the input / output processing;
A program counter unit having a program counter corresponding to each of the plurality of task programs;
An instruction fetch unit that fetches an instruction from the instruction memory based on an instruction address indicated by one program counter;
An instruction execution unit that executes the instruction fetched by the instruction fetch unit;
A task control unit that controls the instruction fetch unit to sequentially switch a program counter to be used every time a predetermined number of instruction cycles elapses,
The processor executes the plurality of task programs and a register set while switching the set,
The processor further executes a task program for analyzing the MPEG data to extract individual elementary streams,
The decoding processing means,
Routine processing mainly including routine operations, in which variable length decoding of header information added to each block in the data stream and compressed video data in the data stream, and compression of the variable length decoded video data in block units are performed. A standard processing means for performing a process of decoding
It is a sequential processing mainly based on a condition judgment, and comprises a sequential processing means for performing a time-divisional analysis processing of header information subjected to variable length decoding processing and a decoding processing of compressed audio data in a data stream,
A video processing device for decoding each of the extracted elementary streams.
前記デコード処理手段は、生成した映像データを含むデータを前記メモリに格納し、
前記プロセッサは前記メモリに格納された映像データを外部へ出力すること
を特徴とする請求項1に記載の映像処理装置。The processor inputs the data stream from the outside, stores the data stream in the memory, reads the data stream stored in the memory, and supplies the data stream to the decoding processing unit according to the progress of the decoding operation of the decoding processing unit,
The decoding processing means stores data including the generated video data in the memory,
The video processing device according to claim 1, wherein the processor outputs the video data stored in the memory to the outside.
前記逐次処理手段は、解析すべきヘッダ情報が可変長符号化されているときには、前記定型処理手段にそのヘッダ情報の可変長復号処理を指示し、可変長復号されたヘッダ情報を取得するとこれを解析し、ブロックのヘッダ情報の取得が終了後に、前記定型処理手段に対して前記ブロックの圧縮映像データの可変長復号処理を開始し、前記解析されたヘッダ情報を用いて前記可変長復号後の圧縮映像データを復号するように指示すること
を特徴とする請求項2に記載の映像処理装置。The routine processing means performs a variable length decoding process on the header information and the compressed video data, and after the variable length decoding process on the block of the compressed video data ends, analyzes the header information of the next block to the sequential processing unit. To start,
When the header information to be analyzed is variable-length coded, the sequential processing means instructs the fixed-form processing means to perform variable-length decoding of the header information, and obtains the variable-length-decoded header information. After the analysis and the acquisition of the header information of the block are completed, the fixed-length processing unit starts variable-length decoding of the compressed video data of the block, and uses the analyzed header information to perform the variable-length decoding. The video processing apparatus according to claim 2 , wherein an instruction is given to decode the compressed video data.
前記逐次処理手段の指示に従ってデータストリーム中の圧縮映像データを可変長復号するデータ変換手段と、
可変長復号により得られたブロックデータに対して、所定の演算を施すことにより逆量子化および逆離散余弦変換を行う演算手段と、
逆離散余弦変換後のブロックデータと、メモリに格納された復号済みフレームの矩形画像とを合成することによりブロックに相当する映像データを復元する合成手段とを備えること
を特徴とする請求項3に記載の映像処理装置。The routine processing means,
Data conversion means for performing variable length decoding of the compressed video data in the data stream according to the instruction of the sequential processing means,
Arithmetic means for performing inverse quantization and inverse discrete cosine transform by performing a predetermined operation on block data obtained by variable-length decoding,
4. The image processing apparatus according to claim 3 , further comprising: synthesizing means for synthesizing the block data after the inverse discrete cosine transform and the rectangular image of the decoded frame stored in the memory to restore video data corresponding to the block. The video processing device according to the above.
前記データ変換手段は、
データストリーム中の圧縮映像データを可変長復号する可変長復号手段と、
前記第1バッファの記憶領域のアドレスをジグザグスキャン順に並べた第1アドレス列を記憶する第1アドレステーブル手段と、
前記第1バッファの記憶領域のアドレスをオルタネートスキャン順に並べた第2アドレス列を記憶する第2アドレステーブル手段と、
第1アドレス列と第2アドレス列の一方に従って、前記可変長復号手段の可変長復号により得られるブロックデータを前記第1バッファに書き込む書き込み手段とを有すること
を特徴とする請求項4に記載の映像処理装置。The arithmetic unit further includes a first buffer having a storage area corresponding to one block,
The data conversion means,
A variable-length decoding unit for performing variable-length decoding of the compressed video data in the data stream;
First address table means for storing a first address sequence in which addresses of the storage area of the first buffer are arranged in zigzag scan order;
Second address table means for storing a second address sequence in which addresses of the storage area of the first buffer are arranged in an alternate scan order;
5. The writing device according to claim 4 , further comprising a writing unit that writes block data obtained by the variable length decoding of the variable length decoding unit to the first buffer according to one of the first address sequence and the second address sequence. 6. Video processing device.
前記第1アドレステーブル手段及び前記第2アドレステーブル手段に対するテーブルアドレスを順次発生するテーブルアドレス発生手段と、
テーブルアドレスが入力された第1テーブル手段、第2テーブル手段からそれぞれ出力される第1アドレス列のアドレス、第2アドレス列のアドレスのうち、
一方を選択するアドレス選択手段と、
選択されたアドレスを前記第1バッファに出力するアドレス出力手段とを有すること
を特徴とする請求項5に記載の映像処理装置。The writing means,
Table address generating means for sequentially generating table addresses for the first address table means and the second address table means;
Of the addresses of the first address string and the second address string respectively output from the first table means and the second table means to which the table address is input,
Address selection means for selecting one,
6. The video processing apparatus according to claim 5 , further comprising address output means for outputting the selected address to said first buffer.
外部から非同期データストリームを入力する入力手段と、
外部の表示装置にデコードされた映像データを出力する映像出力手段と、
外部の音声出力装置にデコードされた音声データを出力する音声出力手段と、
前記命令メモリに格納された第1から第4のタスクを切替えながら実行するプロセッサとを有し、
前記第1タスクは入力部から前記メモリにデータストリームを転送するプログラムであり、
前記第2タスクは前記メモリからデコード処理手段にデータストリームを供給するプログラムであり、
前記第3タスクは前記メモリから映像出力部にデコードされた映像データを出力するプログラムであり、
前記第4タスクは前記メモリから音声出力部にデコードされた音声データを出力するプログラムであること
を特徴とする請求項2に記載の映像処理装置。The processor comprises:
An input means for inputting an asynchronous data stream from outside;
Video output means for outputting decoded video data to an external display device,
Audio output means for outputting decoded audio data to an external audio output device;
A processor that executes the first to fourth tasks stored in the instruction memory while switching the tasks,
The first task is a program for transferring a data stream from an input unit to the memory,
The second task is a program for supplying a data stream from the memory to a decoding processing unit,
The third task is a program that outputs decoded video data from the memory to a video output unit,
3. The video processing device according to claim 2, wherein the fourth task is a program that outputs decoded audio data from the memory to an audio output unit.
を特徴とする請求項7に記載の映像処理装置。The video processing device according to claim 7 , wherein the program counter unit has at least four program counters corresponding to the first to fourth tasks.
前記第1から第4タスクに対応する少なくとも4つのレジスタセットを有するレジスタ部を有し、
前記タスク制御部は、プログラムカウンタの切替えと同時に、前記命令実行部が使用すべきレジスタセットを切り替えること
を特徴とする請求項8に記載の映像処理装置。The processor further includes:
A register unit having at least four register sets corresponding to the first to fourth tasks,
9. The video processing device according to claim 8 , wherein the task control unit switches a register set to be used by the instruction execution unit simultaneously with switching of a program counter.
プログラムカウンタが切替えられる毎に、クロック信号に従って命令サイクル数をカウントするカウンタと、
前記カウンタにおけるカウント値が前記所定数に達したとき、前記命令フェッチ部に対してプログラムカウンタを切替えるように制御する切替え指示部とを有すること
を特徴とする請求項9に記載の映像処理装置。The task control unit includes:
A counter for counting the number of instruction cycles according to a clock signal each time the program counter is switched;
10. The video processing device according to claim 9 , further comprising: a switching instruction unit configured to control the instruction fetch unit to switch a program counter when the count value of the counter reaches the predetermined number.
外部要因により非同期に入力されるデータストリームをメモリに格納する入出力処理を行うプロセッサと、
定型演算を主とする定型処理であって、メモリに格納されたデータストリーム中のブロック単位に付加されたヘッダ情報及びデータストリーム中の圧縮映像データの可変長復号処理と、可変長復号された圧縮映像データをブロック単位に復号する処理とを行なう定型処理手段と、
条件判断を主とする逐次処理であって、可変長復号処理されたヘッダ情報の解析処理と、メモリに格納されたデータストリーム中の圧縮音声データの復号処理とを時分割で行なう逐次処理手段とを備え、
前記逐次処理手段によりデコードされた音声データ、及び、前記定型処理手段によりデコードされた映像データは前記メモリに格納され、
前記入出力処理は、さらにデコードされた音声データ、映像データをそれぞれメモリから読み出し、外部の表示装置、音声出力装置のそれぞれの出力レートに合わせた出力処理を含み、
前記プロセッサは、
前記入出力処理の内容を表わす複数のタスクプログラムを記憶する命令メモリと、
前記タスクプログラムそれぞれに対応するプログラムカウンタを有するプログラムカウンタ部と、
1つのプログラムカウンタが示す命令アドレスに基づき、前記命令メモリから命令を取り出す命令フェッチ部と、
前記命令フェッチ部により取り出された命令を実行する命令実行部と、
所定数の命令サイクルが経過する毎に、前記命令フェッチ部に対して、使用するプログラムカウンタを順次切替えるように制御するタスク制御部とを備え、
前記プロセッサは、前記複数のタスクプログラム、及び、レジスタセットを切替えながら実行し、
前記プロセッサは、さらに、MPEGデータを解析するタスクプログラムを実行することにより、個々のエレメンタリーストリームを抽出し、
前記デコード処理手段は、抽出された個々のエレメンタリーストリームをデコードすること
を特徴とする映像音声処理装置。A video and audio processing device that inputs, decodes, and outputs a data stream including compressed audio data and compressed video data,
A processor that performs input / output processing for storing a data stream that is asynchronously input due to external factors in a memory,
A fixed-length process mainly including a fixed-size operation, the variable-length decoding process of the header information added to the block unit in the data stream stored in the memory and the compressed video data in the data stream, and the variable-length decoded compression Standard processing means for performing processing of decoding video data in block units;
Sequential processing means for performing sequential processing mainly on condition determination, and performing time-divisional analysis processing of header information subjected to variable-length decoding processing and decoding processing of compressed audio data in a data stream stored in a memory; With
The audio data decoded by the sequential processing means, and the video data decoded by the standard processing means are stored in the memory,
The output processing is further decoded audio data, reads the video data from the memory, respectively, include an external display device, the output process tailored to each output rate of the audio output device,
The processor comprises:
An instruction memory for storing a plurality of task programs representing the contents of the input / output processing;
A program counter unit having a program counter corresponding to each of the task programs,
An instruction fetch unit that fetches an instruction from the instruction memory based on an instruction address indicated by one program counter;
An instruction execution unit that executes the instruction fetched by the instruction fetch unit;
A task control unit that controls the instruction fetch unit to sequentially switch a program counter to be used every time a predetermined number of instruction cycles elapses,
The processor executes the plurality of task programs and a register set while switching the set,
The processor further executes a task program for analyzing the MPEG data to extract individual elementary streams,
The video / audio processing apparatus, wherein the decoding processing means decodes each of the extracted elementary streams.
前記逐次処理手段は、解析すべきヘッダ情報が可変長符号化されているときには、前記定型処理手段にそのヘッダ情報の可変長復号処理を指示し、可変長復号されたヘッダ情報を取得するとこれを解析し、ブロックのヘッダ情報の取得が終了後に、前記定型処理手段に対して前記ブロックの圧縮映像データの可変長復号処理を開始し、前記解析されたヘッダ情報を用いて前記可変長復号後の圧縮映像データを復号するように指示すること
を特徴とする請求項11に記載の映像音声処理装置。The routine processing means performs a variable length decoding process on the header information and the compressed video data, and after the variable length decoding process on the block of the compressed video data ends, analyzes the header information of the next block to the sequential processing unit. To start,
When the header information to be analyzed is variable-length coded, the sequential processing means instructs the fixed-form processing means to perform variable-length decoding of the header information, and obtains the variable-length-decoded header information. After the analysis and the acquisition of the header information of the block are completed, the fixed-length processing unit starts variable-length decoding of the compressed video data of the block, and uses the analyzed header information to perform the variable-length decoding. The video / audio processing apparatus according to claim 11 , wherein an instruction is given to decode the compressed video data.
前記逐次処理手段の指示に従ってデータストリーム中の圧縮映像データを可変長復号するデータ変換手段と、
可変長復号により得られたブロックデータに対して、所定の演算を施すことにより逆量子化および逆離散余弦変換を行う演算手段と、
逆離散余弦変換後のブロックデータと、メモリに格納された復号済みフレームの矩形画像とを合成することによりブロックに相当する映像データを復元する合成手段とを備えること
を特徴とする請求項12に記載の映像音声処理装置。The routine processing means,
Data conversion means for performing variable length decoding of the compressed video data in the data stream according to the instruction of the sequential processing means,
Arithmetic means for performing inverse quantization and inverse discrete cosine transform by performing a predetermined operation on block data obtained by variable-length decoding,
13. The image processing apparatus according to claim 12 , further comprising: synthesizing means for restoring video data corresponding to the block by synthesizing the block data after the inverse discrete cosine transform and the rectangular image of the decoded frame stored in the memory. The video / audio processing apparatus according to the above.
前記データ変換手段は、
データストリーム中の圧縮映像データを可変長復号する可変長復号手段と、
前記第1バッファの記憶領域のアドレスをジグザグスキャン順に並べた第1アドレス列を記憶する第1アドレステーブル手段と、
前記第1バッファの記憶領域のアドレスをオルタネートスキャン順に並べた第2アドレス列を記憶する第2アドレステーブル手段と、
第1アドレス列と第2アドレス列の一方に従って、前記可変長復号手段の可変長復号により得られるブロックデータを前記第1バッファに書き込む書き込み手段とを有すること
を特徴とする請求項13に記載の映像音声処理装置。The arithmetic means further includes a first buffer having a storage area corresponding to one block,
The data conversion means,
A variable-length decoding unit for performing variable-length decoding of the compressed video data in the data stream;
First address table means for storing a first address sequence in which addresses of the storage area of the first buffer are arranged in zigzag scan order;
Second address table means for storing a second address sequence in which addresses of the storage area of the first buffer are arranged in an alternate scan order;
14. The writing device according to claim 13 , further comprising: a writing unit that writes block data obtained by variable length decoding of the variable length decoding unit into the first buffer according to one of a first address sequence and a second address sequence. Video and audio processing device.
前記第1アドレステーブル手段及び前記第2アドレステーブル手段に対するテーブルアドレスを順次発生するテーブルアドレス発生手段と、
テーブルアドレスが入力された第1テーブル手段、第2テーブル手段からそれぞれ出力される第1アドレス列のアドレス、第2アドレス列のアドレスのうち、一方を選択するアドレス選択手段と、
選択されたアドレスを前記第1バッファに出力するアドレス出力手段とを有すること
を特徴とする請求項14に記載の映像音声処理装置。The writing means,
Table address generating means for sequentially generating table addresses for the first address table means and the second address table means;
Address selecting means for selecting one of an address of the first address string and an address of the second address string output from the first table means and the second table means to which the table address is input, respectively;
15. The video / audio processing apparatus according to claim 14 , further comprising address output means for outputting the selected address to said first buffer.
外部から非同期データストリームを入力する入力手段と、
外部の表示装置にデコードされた映像データを出力する映像出力手段と、
外部の音声出力装置にデコードされた音声データを出力する音声出力手段と、
前記命令メモリに格納された第1から第4のタスクを切替えながら実行するプロセッサとを有し、
前記第1タスクは入力部から前記メモリにデータストリームを転送するプログラムであり、
前記第2タスクは前記メモリから前記デコード処理手段にデータストリームを供給するプログラムであり、
前記第3タスクは前記メモリから映像出力部にデコードされた映像データを出力するプログラムであり、
前記第4タスクは前記メモリから音声出力部にデコードされた音声データを出力するプログラムであること
を特徴とする請求項11に記載の映像音声処理装置。The processor comprises:
An input means for inputting an asynchronous data stream from outside;
Video output means for outputting decoded video data to an external display device,
Audio output means for outputting decoded audio data to an external audio output device;
A processor that executes the first to fourth tasks stored in the instruction memory while switching the tasks,
The first task is a program for transferring a data stream from an input unit to the memory,
The second task is a program for supplying a data stream from the memory to the decoding processing means,
The third task is a program that outputs decoded video data from the memory to a video output unit,
12. The video / audio processing apparatus according to claim 11 , wherein the fourth task is a program for outputting decoded audio data from the memory to an audio output unit.
を特徴とする請求項16に記載の映像音声処理装置。17. The video and audio processing device according to claim 16 , wherein the program counter unit has at least four program counters corresponding to the first to fourth tasks.
前記第1から第4タスクに対応する少なくとも4つのレジスタセットを有するレジスタ部を有し、
前記タスク制御部は、プログラムカウンタの切替えと同時に、前記命令実行部が使用すべきレジスタセットを切り替えること
を特徴とする請求項17に記載の映像音声処理装置。The processor further includes a register unit having at least four register sets corresponding to the first to fourth tasks,
18. The video / audio processing apparatus according to claim 17 , wherein the task control unit switches a register set to be used by the instruction execution unit simultaneously with switching of a program counter.
プログラムカウンタが切替えられる毎に、クロック信号に従って命令サイクル数をカウントするカウンタと、
前記カウンタにおけるカウント値が前記所定数に達したとき、前記命令フェッチ部に対してプログラムカウンタを切替えるように制御する切替え指示部とを有すること
を特徴とする請求項18に記載の映像音声処理装置。The task control unit includes:
A counter for counting the number of instruction cycles according to a clock signal each time the program counter is switched;
19. The video / audio processing apparatus according to claim 18 , further comprising: a switching instruction unit configured to control the instruction fetch unit to switch a program counter when a count value of the counter reaches the predetermined number. .
前記逐次処理手段の指示に従ってデータストリーム中の圧縮映像データを可変長復号するデータ変換手段と、
可変長復号により得られたブロックデータに対して、所定の演算を施すことにより逆量子化および逆離散余弦変換を行う演算手段と、
逆離散余弦変換後のブロックデータと、メモリに格納された復号済みフレームの矩形画像とを合成することによりブロックに相当する映像データを復元する合成手段とを備えること
を特徴とする請求項18に記載の映像音声処理装置。The routine processing means,
Data conversion means for performing variable length decoding of the compressed video data in the data stream according to the instruction of the sequential processing means,
Arithmetic means for performing inverse quantization and inverse discrete cosine transform by performing a predetermined operation on block data obtained by variable-length decoding,
19. The image processing apparatus according to claim 18 , further comprising: synthesizing means for synthesizing the block data after the inverse discrete cosine transform and a rectangular image of the decoded frame stored in the memory to restore video data corresponding to the block. The video / audio processing apparatus according to the above.
前記データ変換手段は、
データストリーム中の圧縮映像データを可変長復号する可変長復号手段と、
前記第1バッファの記憶領域のアドレスをジグザグスキャン順に並べた第1アドレス列を記憶する第1アドレステーブル手段と、
前記第1バッファの記憶領域のアドレスをオルタネートスキャン順に並べた第2アドレス列を記憶する第2アドレステーブル手段と、
第1アドレス列と第2アドレス列の一方に従って、前記可変長復号手段の可変長復号により得られるブロックデータを前記第1バッファに書き込む書き込み手段とを有すること
を特徴とする請求項20に記載の映像音声処理装置。The arithmetic means further includes a first buffer having a storage area corresponding to one block,
The data conversion means,
A variable-length decoding unit for performing variable-length decoding of the compressed video data in the data stream;
First address table means for storing a first address sequence in which addresses of the storage area of the first buffer are arranged in zigzag scan order;
Second address table means for storing a second address sequence in which addresses of the storage area of the first buffer are arranged in an alternate scan order;
21. The writing device according to claim 20 , further comprising: a writing unit that writes block data obtained by variable-length decoding of the variable-length decoding unit into the first buffer according to one of a first address sequence and a second address sequence. Video and audio processing device.
前記第1アドレステーブル手段及び前記第2アドレステーブル手段に対するテーブルアドレスを順次発生するテーブルアドレス発生手段と、
テーブルアドレスが入力された第1テーブル手段、第2テーブル手段からそれぞれ出力される第1アドレス列のアドレス、第2アドレス列のアドレスのうち、一方を選択するアドレス選択手段と、
選択されたアドレスを前記第1バッファに出力するアドレス出力手段とを有すること
を特徴とする請求項21に記載の映像音声処理装置。The writing means,
Table address generating means for sequentially generating table addresses for the first address table means and the second address table means;
Address selecting means for selecting one of an address of the first address string and an address of the second address string output from the first table means and the second table means to which the table address is input, respectively;
22. The video / audio processing apparatus according to claim 21 , further comprising address output means for outputting the selected address to said first buffer.
前記通知手段は、量子化スケールを前記演算手段に、動きベクトルを前記合成手段に通知すること
を特徴とする請求項20に記載の映像音声処理装置。The analysis means calculates a quantization scale and a motion vector based on the header information,
21. The video and audio processing apparatus according to claim 20 , wherein the notifying unit notifies the calculating unit of a quantization scale and the synthesizing unit of a motion vector.
それぞれマイクロプログラムを記憶する第1制御記憶部及び第2制御記憶部と、
前記第1制御記憶部に第1読出アドレスを指定する第1プログラムカウンタと、
第2読出アドレスを指定する第2プログラムカウンタと、
第1読出アドレスと第2読出アドレスとの一方を選択して前記第2制御記憶部に出力するセレクタと、
乗算器と加算器とを有し、前記第1制御記憶部及び前記第2制御記憶部によるマイクロプログラム制御によりブロック単位の逆量子化と逆離散余弦変換とを実行する実行部とを有すること
を特徴とする請求項23に記載の映像音声処理装置。The calculating means includes:
A first control storage unit and a second control storage unit each storing a microprogram;
A first program counter for designating a first read address in the first control storage unit;
A second program counter for designating a second read address;
A selector for selecting one of a first read address and a second read address and outputting the selected one to the second control storage unit;
An execution unit having a multiplier and an adder, and having a block unit for performing inverse quantization and inverse discrete cosine transform by microprogram control by the first control storage unit and the second control storage unit. 24. The video / audio processing apparatus according to claim 23 , wherein:
を特徴とする請求項24に記載の映像音声処理装置。When the second read address is selected by the selector, the execution unit performs processing using a multiplier and processing using an adder independently and in parallel, and the first read address is selected by the selector. 25. The video / audio processing apparatus according to claim 24 , wherein the processing using the multiplier and the processing using the adder are performed in conjunction with each other.
前記データ変換手段からの映像ブロックを保持する第1バッファと、
前記実行部により逆離散余弦変換されたブロックを保持する第2バッファとを有し、
前記第1制御記憶部は、逆量子化処理するマイクロプログラムと、逆離散余弦変換するマイクロプログラムとを記憶し、
前記第2制御記憶部は、逆離散余弦変換するマイクロプログラムと、逆離散余弦変換された映像ブロックを前記第2バッファに転送するマイクロプログラムとを記憶し、
前記実行手段は、逆離散余弦変換された映像ブロックを前記第2バッファに転送する処理と、次の映像ブロックを逆量子化する処理とを並列に実行し、逆量子化された当該映像ブロックを逆離散余弦変換する処理を乗算器と加算器とを連動させて実行すること
を特徴とする請求項25に記載の映像音声処理装置。The calculating means further comprises:
A first buffer for holding a video block from the data conversion means,
A second buffer for holding the block subjected to the inverse discrete cosine transform by the execution unit,
The first control storage unit stores a microprogram for performing an inverse quantization process and a microprogram for performing an inverse discrete cosine transform,
The second control storage unit stores a microprogram for performing inverse discrete cosine transform and a microprogram for transferring the video block subjected to inverse discrete cosine transform to the second buffer,
The execution means executes a process of transferring the inverse discrete cosine transformed video block to the second buffer and a process of inversely quantizing a next video block in parallel, and executes the inversely quantized video block. 26. The video / audio processing apparatus according to claim 25 , wherein the process of performing the inverse discrete cosine transform is performed in conjunction with the multiplier and the adder.
前記第2バッファは、さらに生成された差分画像を保持し、
前記第1制御記憶部は、さらに、離散余弦変換するマイクロプログラムと、量子化処理するマイクロプログラムとを記憶し、
前記第2制御記憶部は、さらに、離散余弦変換するマイクロプログラムと、離散余弦変換された映像ブロックを前記第1バッファに転送するマイクロプログラムとを記憶し、
前記実行手段は、さらに、前記第2バッファに保持された差分ブロックに対して離散余弦変換と量子化を実行して第1バッファに転送し、
前記データ変換手段は、さらに、前記第1バッファのブロックに対して可変長符号化を行い、
前記逐次処理手段は、さらに、前記データ変換手段により可変長符号化された所定のブロックに対してヘッダ情報を付加すること
を特徴とする請求項26に記載の映像音声処理装置。The synthesizing unit further generates a difference block representing a difference image from the video data to be compressed,
The second buffer holds a further generated difference image,
The first control storage unit further stores a microprogram for performing a discrete cosine transform and a microprogram for performing a quantization process,
The second control storage unit further stores a microprogram for performing discrete cosine conversion and a microprogram for transferring the video block subjected to discrete cosine conversion to the first buffer,
The execution means further executes discrete cosine transform and quantization on the difference block held in the second buffer, and transfers the result to the first buffer.
The data conversion unit further performs variable length coding on the block of the first buffer,
27. The video / audio processing apparatus according to claim 26 , wherein the sequential processing unit further adds header information to a predetermined block that has been subjected to variable-length coding by the data conversion unit.
それぞれマイクロプログラムを記憶する前記第1制御記憶部及び前記第2制御記憶部と、
前記第1制御記憶部に第1読出アドレスを指定する第1プログラムカウンタと、
第2読出アドレスを指定する第2プログラムカウンタと、
第1読出アドレスと第2読出アドレスとの一方を選択して前記第2制御記憶部に出力するセレクタと、
乗算器と加算器とをそれぞれ有し、前記第1制御記憶部及び前記第2制御記憶部によるマイクロプログラム制御によりブロック単位の逆量子化と逆離散余弦変換とを実行する複数の実行部とを備え、
前記複数の実行部はそれぞれ、ブロックを分割した部分ブロックを分担して処理すること
を特徴とする請求項23に記載の映像音声処理装置。The calculating means includes:
A first control storage unit and a second control storage unit each storing a microprogram;
A first program counter for designating a first read address in the first control storage unit;
A second program counter for designating a second read address;
A selector for selecting one of a first read address and a second read address and outputting the selected one to the second control storage unit;
A plurality of execution units each including a multiplier and an adder, and performing inverse quantization and inverse discrete cosine transform in block units by microprogram control by the first control storage unit and the second control storage unit; Prepare,
24. The video / audio processing apparatus according to claim 23 , wherein each of the plurality of execution units shares and processes a partial block obtained by dividing the block.
前記複数の実行部のそれぞれに対応して設けられ、各変換テーブルは所定のアドレス列に対応して部分的にアドレス順序を入れ換えた変換アドレス保持する複数のアドレス変換テーブルと、
所定の演算を実現するマイクロプログラムを構成する個々のマイクロ命令を変換アドレスに対応させて記憶する複数レジスタからなる命令レジスタ群と、
前記第1制御記憶部及び前記第2制御記憶部と前記複数の実行部との間に設けられ、当該第1制御記憶部又は前記セレクタから当該複数の実行部のそれぞれに出力されるマイクロ命令を、命令レジスタのマイクロ命令に切り替えて当該複数の実行部に出力する切り替え部と
を備え、
前記第1読出アドレス又は第2読出アドレスが前記所定のアドレス列の中のアドレスである場合、そのアドレスは前記複数のアドレス変換テーブルのそれぞれによって変換アドレスに変換され、前記命令レジスタ群は、変換テーブルから出力された各変換アドレスに対応するマイクロ命令を出力する
ことを特徴とする請求項28に記載の映像音声処理装置。The calculating means further comprises:
A plurality of address conversion tables provided corresponding to each of the plurality of execution units, each conversion table holding a conversion address in which the address order is partially changed corresponding to a predetermined address sequence;
An instruction register group consisting of a plurality of registers for storing individual microinstructions constituting a microprogram for realizing a predetermined operation in association with a translation address;
A microinstruction provided between the first control storage unit and the second control storage unit and the plurality of execution units, and output from the first control storage unit or the selector to each of the plurality of execution units. A switching unit that switches to a microinstruction in an instruction register and outputs the microinstruction to the plurality of execution units,
When the first read address or the second read address is an address in the predetermined address string, the address is converted into a conversion address by each of the plurality of address conversion tables, and the instruction register group is a conversion table. 29. The video / audio processing apparatus according to claim 28 , wherein micro-instructions corresponding to the respective conversion addresses output from are output.
前記複数の実行部のそれぞれは、前記フラグに従って加減算を実行し、
前記フラグは、前記第2制御記憶部のマイクロ命令に従って設定される ことを特徴とする請求項29に記載の映像音声処理装置。Each of the conversion tables may further include whether to add or subtract while the first program counter outputs the first read address in the predetermined address string, with a microinstruction output indicating addition and subtraction in the register. Is output to the plurality of execution units,
Each of the plurality of execution units performs addition and subtraction according to the flag,
The video / audio processing apparatus according to claim 29 , wherein the flag is set in accordance with a micro instruction of the second control storage unit.
前記複数の実行部のそれぞれは、格納先情報に従って実行結果を格納する ことを特徴とする請求項29に記載の映像音声処理装置。The second control storage unit is further configured to store a microinstruction execution result in accordance with a microinstruction output in the register while the first program counter outputs a first read address in the predetermined address string. Output to the plurality of execution units,
30. The video / audio processing apparatus according to claim 29 , wherein each of the plurality of execution units stores an execution result according to storage destination information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP09344798A JP3589565B2 (en) | 1997-04-07 | 1998-04-06 | Video and audio processing device |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9-88523 | 1997-04-07 | ||
JP8852397 | 1997-04-07 | ||
JP09344798A JP3589565B2 (en) | 1997-04-07 | 1998-04-06 | Video and audio processing device |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001182648A Division JP3380236B2 (en) | 1997-04-07 | 2001-06-15 | Video and audio processing device |
JP2001321186A Division JP2002245448A (en) | 1997-04-07 | 2001-10-18 | Arithmetic unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH10341422A JPH10341422A (en) | 1998-12-22 |
JP3589565B2 true JP3589565B2 (en) | 2004-11-17 |
Family
ID=26429887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP09344798A Expired - Lifetime JP3589565B2 (en) | 1997-04-07 | 1998-04-06 | Video and audio processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3589565B2 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6687305B1 (en) | 1999-11-08 | 2004-02-03 | Hitachi, Ltd. | Receiver, CPU and decoder for digital broadcast |
JP4622848B2 (en) * | 1999-11-08 | 2011-02-02 | 株式会社日立製作所 | Digital broadcast receiver |
US6847687B2 (en) | 2000-03-08 | 2005-01-25 | Matsushita Electric Industrial Co., Ltd. | Audio and video processing apparatus |
KR100755825B1 (en) * | 2000-07-07 | 2007-09-07 | 엘지전자 주식회사 | Apparatus and Method of Recording and Reproducing Data on Optical Disc Using Zig-Zag Scan and Recordable Media |
KR100463764B1 (en) | 2000-07-21 | 2004-12-29 | 마츠시타 덴끼 산교 가부시키가이샤 | Signal transmission system |
KR100833880B1 (en) * | 2001-11-06 | 2008-06-02 | 엘지전자 주식회사 | Apparatus and method for recording and reproducing data optical disc using U-pattern scan |
JP3813930B2 (en) | 2002-01-09 | 2006-08-23 | 松下電器産業株式会社 | Processor and program execution method |
JP4750350B2 (en) | 2003-03-13 | 2011-08-17 | パナソニック株式会社 | Task switching device, method and program |
EP1775961B1 (en) * | 2004-08-04 | 2017-06-14 | Panasonic Intellectual Property Management Co., Ltd. | Video decoding device and method for motion compensation with sequential transfer of reference pictures |
US8548061B2 (en) | 2008-08-05 | 2013-10-01 | Panasonic Corporation | Image decoding apparatus and image decoding method |
-
1998
- 1998-04-06 JP JP09344798A patent/JP3589565B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH10341422A (en) | 1998-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100502586B1 (en) | Video Audio Processing Equipment with High Processing Efficiency | |
USRE48845E1 (en) | Video decoding system supporting multiple standards | |
KR100562116B1 (en) | Media processing apparatus that operates at high efficiency | |
US5812791A (en) | Multiple sequence MPEG decoder | |
US5909224A (en) | Apparatus and method for managing a frame buffer for MPEG video decoding in a PC environment | |
US5774206A (en) | Process for controlling an MPEG decoder | |
EP1446953B1 (en) | Multiple channel video transcoding | |
US6542541B1 (en) | Method and apparatus for decoding MPEG video signals using multiple data transfer units | |
TWI482117B (en) | Filtering for vpu | |
US7885336B2 (en) | Programmable shader-based motion compensation apparatus and method | |
JPH05268590A (en) | Moving picture coding decoding circuit | |
JP3589565B2 (en) | Video and audio processing device | |
JP3123496B2 (en) | Motion compensation processing method and system, and recording medium recording the processing program | |
US6850568B1 (en) | Method and apparatus for decoding mpeg video signals | |
JP2002245448A (en) | Arithmetic unit | |
JP3380236B2 (en) | Video and audio processing device | |
JP3410669B2 (en) | Video and audio processing device | |
JPH1155668A (en) | Image coder | |
Li et al. | An efficient video decoder design for MPEG-2 MP@ ML | |
JP2008299475A (en) | Information processor and information processing method, and computer program | |
JPH1084287A (en) | Module changeover type image compression and reproduction device | |
JP2002051337A (en) | Video/audio processing apparatus | |
JP2001251625A (en) | Image decoder and image coder | |
JPH066785A (en) | Moving image decoding circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040709 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040817 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070827 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080827 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080827 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090827 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090827 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100827 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110827 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110827 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120827 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130827 Year of fee payment: 9 |
|
EXPY | Cancellation because of completion of term |