JP3556777B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3556777B2
JP3556777B2 JP25386596A JP25386596A JP3556777B2 JP 3556777 B2 JP3556777 B2 JP 3556777B2 JP 25386596 A JP25386596 A JP 25386596A JP 25386596 A JP25386596 A JP 25386596A JP 3556777 B2 JP3556777 B2 JP 3556777B2
Authority
JP
Japan
Prior art keywords
image
image data
data
unit
decompressed
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 - Fee Related
Application number
JP25386596A
Other languages
Japanese (ja)
Other versions
JPH1078769A (en
Inventor
雅一 鈴置
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Interactive Entertainment Inc
Original Assignee
Sony Computer Entertainment Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Computer Entertainment Inc filed Critical Sony Computer Entertainment Inc
Priority to JP25386596A priority Critical patent/JP3556777B2/en
Publication of JPH1078769A publication Critical patent/JPH1078769A/en
Application granted granted Critical
Publication of JP3556777B2 publication Critical patent/JP3556777B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、例えば、ビデオゲーム機やパーソナルコンピュータのように、高い精度は求められないものの、限られたハードウェア資源の中で、ユーザの入力や演算結果に応じてリアルタイムに3次元物体を表示することが求められる装置として好適な画像処理装置に関する。
【0002】
【従来の技術】
家庭用TVゲーム機やパーソナルコンピュータあるいはグラフィックコンピュータなどにおいて、TV受像機やモニタ受像機などに出力して表示する画像データを生成するための画像処理装置は、バスを通じて互いに接続される、汎用メモリ、CPUやその他の演算LSIが組み合わされて構成され、描画用の画像データの流れとして、CPUとフレームバッファの間に専用の描画装置を設けることにより、高速処理を可能にしている。
【0003】
すなわち、上記画像処理装置においては、CPU側では、画像を生成する際に、直接、表示画面に対応する表示メモリとしてのフレームバッファにアクセスするのではなく、座標変換やクリッピング、光源計算等のジオメトリ処理を行ない、3角形・4角形などの基本的な単位図形(ポリゴン)の組合せとして3次元モデルを定義して3次元画像を描画するための描画命令を作成する。そして、CPUは、その描画命令を外部バスを介して描画装置に送る。
【0004】
描画命令には、描画しようとするポリゴンの形、位置、向き、色、模様などの情報が含まれる。ポリゴンの形、位置、向きは、その頂点の座標で決まる。
【0005】
上記画像生成装置において、例えば、3次元のオブジェクトを表示する場合は、当該オブジェクトを複数のポリゴンに分解して、各ポリゴンに対応する描画命令をCPUが生成し、その生成した描画命令をバスを通じて描画装置に転送する。描画装置は、当該描画命令を実行して、フレームバッファに表示データを書き込み、目的の3次元オブジェクトを表示する。
【0006】
この際に、オブジェクトをより実際に近く表現するために、所定の画像パターンを用意してその画像パターンによりポリゴン内部を修飾するテクスチャマッピングやミップマッピングと呼ばれる手法が採用されている。
【0007】
さらに、色変換データを記録したCLUT(Color Look Up Table)を介して画像の色データを変換することにより、表示色を変化させる手法も広く知られている。
【0008】
【発明が解決しようとする課題】
ところで、家庭用TVゲーム機や、パーソナルコンピュータを構成する演算LSIは、コストの上昇なしに、その動作周波数の高速化、回路規模の縮小などの性能向上が計られているが、コスト上昇なしで使用できる汎用メモリの容量はさして増加していない。このため、家庭用TVゲーム機や、パーソナルコンピュータでは、メモリ容量がいわゆるボトルネックとなっている。
【0009】
特に、前もって高性能のワークステーションで作成された高品質の画像(プリレンダリングパターン)をテクスチャパターンとしてテクスチャマッピングをする場合、一連の動画の切片を構成するパターンをすべてメモリに保持しておく必要があるが、テクスチャパターンの解像度が上がれば、それに伴いメモリ容量が圧迫されることになる。
【0010】
そのため、テクスチャパターンをデータ圧縮してメモリに保持するようにすると共に、圧縮されたテクスチャパターンのデータを使用の都度、メモリから読み出し、専用の画像伸長装置(圧縮を解凍する装置)を用いて、伸長デコードして使用する方法がとられている。
【0011】
この場合に、一般に、伸長デコードの時間の方が、描画装置のフレームバッファへの表示画像データの転送時間よりも圧倒的に長いので、画像伸長装置は、描画装置とは同期して動作できない。そのため、画像伸長装置と描画装置とが非同期に動作できるように、伸長された画像は、いわゆるメインメモリか、双方の装置の間に置かれたFIFOなどのバッファメモリに一旦蓄積されるが、ここに蓄積されたデータは圧縮されていたデータを解凍した後のデータであるため、メモリ容量を非常に圧迫する。
【0012】
また、現在の回路技術では、LSI内部は非常に高速に信号を伝達できるが、LSI間では信号転送速度を上げることが難しい。特に、家庭用機器では、基板上での転送クロックの周波数を上げることができない。そのために、LSI内部で高速に処理を行なっても、他のLSIヘ結果を伝達するためのバス上の転送速度がボトルネックになることが多い。そして、上述したように、解凍した画像データは一旦メインメモリに蓄えて、再び描画装置へ転送しなければならないが、この場合は、すべてバスを介したLSI間のデータのやりとりになるため、ここの段階での処理速度がシステム全体の処理速度の上でボトルネックになることが多かった。
【0013】
この発明は、以上の点にかんがみ、バスを通じたLSI間の見掛上の転送速度を上げることができると共に、メモリの利用効率の向上が図れる画像処理装置を提供することを目的とする。
【0014】
【課題を解決するための手段】
上記課題を解決するために、この発明による画像処理装置は、
メモリと、画像伸長デコード部と、描画処理部とを備え、圧縮された画像データが前記画像伸長デコード部で解凍されて伸長され、伸長された画像データが、バスを通じて前記メモリに転送され、このメモリに蓄えられた前記伸長された画像データが、前記バスを通じて前記描画処理部に転送され、この描画処理部により表示画像データが生成される画像処理装置であって、
前記画像伸長デコード部の前記伸長された画像データの出力端と前記バスとの間に、前記伸長された画像データを瞬時圧縮する瞬時圧縮部を設けると共に、
前記描画処理部の入力部と前記バスとの間に、前記瞬時圧縮された画像データの圧縮を解凍する解凍部を設けたことを特徴とするものである。
【0015】
上記の構成の画像処理装置においては、画像伸長デコード部で伸長された画像データは、瞬時圧縮部により瞬時圧縮された後、バスを通じてメモリに転送される。そして、メモリから描画処理部への転送の際には、描画処理部の入力部の前段に設けられている解凍部において瞬時圧縮された伸長画像データが解凍され、この解凍されて得られた伸長画像データが描画処理部に供給されて、描画処理が実行される。
【0016】
バスを通じて転送される伸長画像データは、瞬時圧縮されたデータであるので、メモリ、画像伸長デコード部、描画処理部などのLSIから見たときの見掛上の転送速度を、例えば2倍以上の高速にすることができる。また、メモリに蓄えられる画像データは圧縮されているので、メモリの利用効率が上がる。
【0017】
【発明の実施の形態】
以下、この発明による画像処理装置の一実施の形態を、テレビゲーム機の場合について、図を参照しながら説明する。
【0018】
図2は、この発明の一実施の形態のテレビゲーム機の構成例を示すもので、この例は3次元グラフィックス機能と、動画再生機能とを備えるゲーム機の場合の例である。
【0019】
図3は、この例のゲーム機の外観を示すもので、この例のゲーム機は、ゲーム機本体1と、ユーザの操作入力部を構成するコントロールパッド2とからなる。コントロールパッド2は、このコントロールパッド2に接続されているケーブル3の先端に取り付けられているコネクタプラグ4を、ゲーム機本体1のコネクタジャック5Aに結合させることにより、ゲーム機本体1に接続される。この例では、いわゆる対戦ゲーム等のために、2個のコントロールパッド2がゲーム機本体1に対して接続することができるように、2個のコネクタジャック5A,5Bがゲーム機本体1に設けられている。
【0020】
この例のゲーム機は、ゲームプログラムや画像データが書き込まれた補助記憶手段としての、例えばCD−ROMディスク6をゲーム機本体1に装填することにより、ゲームを楽しむことができる。
【0021】
次に、図2を参照しながら、この例のゲーム機の構成について説明する。この例のゲーム機は、メインバス10と、サブバス20とからなる2つのシステムバスを備える構成を有している。これらメインバス10と、サブバス20との間のデータのやり取りは、バスコントローラ30により制御される。
【0022】
そして、メインバス10には、メインCPU11と、メインメモリ12と、画像伸長デコード部13と、前処理部14と、描画処理部15と、メインのDMAコントローラ16が接続されている。描画処理部15には、処理用メモリ17が接続されていると共に、この描画処理部15は表示データ用のフレームバッファ(フレームメモリ)と、D/A変換回路を含み、この描画処理部15からのアナログビデオ信号がビデオ出力端子18に出力される。図示しないが、このビデオ出力端子18は、表示装置としての例えばCRTディスプレイに接続される。
【0023】
サブバス20には、サブCPU21と、サブメモリ22と、ブートROM23と、サブのDMAコントローラ24と、音声処理用プロセッサ25と、入力部26と、補助記憶装置部27と、拡張用の通信インターフェース部28とが接続される。補助記憶装置部27は、この例ではCD−ROMデコーダ41とCD−ROMドライバ42を備える。ブートROM23には、ゲーム機としての立ち上げを行うためのプログラムが格納されている。また、音声処理用プロセッサ25に対しては、音声処理用メモリ25Mが接続されている。そして、この音声処理用プロセッサ25はD/A変換回路を備え、これよりはアナログ音声信号を音声出力端子29に出力する。
【0024】
そして、補助記憶装置部27は、CD−ROMドライバ42に装填されたCD−ROMディスク6に記録されているアプリケーションプログラム(例えばゲームのプログラム)やデータをデコードする。CD−ROMディスク6には、例えば離散コサイン変換(DCT)を用いたMPEG2方式により画像圧縮された動画や静止画の画像データや、ポリゴンを修飾するためのテクスチャ画像の画像データも記録されている。また、CD−ROMディスク6のアプリケーションプログラムには、ポリゴン描画命令が含まれている。
【0025】
入力部26は、前述した操作入力手段としてのコントロールパッド2と、ビデオ信号の入力端子と、音声信号の入力端子を備えるものである。
【0026】
メインCPU11は、メインバス10側の各部の管理および制御を行なう。また、このメインCPU11は、物体を多数のポリゴンの集まりとして描画する場合の処理の一部を行う。メインCPU11は、後述もするように、1画面分の描画画像を生成するための描画命令列をメインメモリ12上に作成する。メインCPU11とメインバス10とのデータのやり取りは、データをパケット形式にしてパケット単位に行い、バースト転送を可能にしている。
【0027】
メインメモリ12は、動画や静止画の画像データに対しては、圧縮された画像データのメモリ領域と、伸長デコード処理された伸長画像データのメモリ領域とを備えている。また、メインメモリ12は、描画命令列などのグラフィックスデータのメモリ領域(これをパケットバッファという)を備える。このパケットバッファは、メインCPU11による描画命令列の設定と、描画命令列の描画処理部への転送とに使用される。
【0028】
画像伸長デコード部13は、CD−ROMディスク6から再生され、メインメモリに転送された圧縮動画データやメインメモリ12上の圧縮されたテクスチャパターンデータの伸長処理を行なうもので、この例では、MPEG2の画像圧縮方式を採用するので、後述もするように、それに対応したデコーダの構成を有している。
【0029】
そして、後述するように、この画像伸長デコード部13の出力段には、瞬時の、つまりほぼリアルタイムでの可逆圧縮/伸長が可能で、圧縮率が例えば1/4〜1/2程度の瞬時圧縮部50が設けられている。また、この例の画像伸長デコード部13は、その出力画像データの出力形式として、画像データの各画素の値を再量子化して出力する第1の出力データ形式(以下、この第1の出力データ形式をダイレクトカラー形式という)と、前記各画素を、予め定められた限定された数の再現色の中の、当該画素の色が近似する色を示すインデックスデータに変換して出力する第2の出力データ形式(以下、この第2の出力データ形式をインデックスカラー形式という)とを、描画処理部15での処理に適合させて選択可能としている。
【0030】
描画処理部15は、メインメモリ12から転送されてくる描画命令を実行して、その結果をフレームメモリに書き込む。フレームメモリから読み出された画像データは、D/A変換器を介してビデオ出力端子18に出力され、画像モニター装置の画面に表示される。
【0031】
なお、描画処理部15は、メインメモリ12から受け取る画像データの出力形式がインデックスカラー形式の場合にあっては、各画素データをインデックスデータから対応する代表色データに変換する処理を行う。このために、描画処理部15は、インデックスデータと代表色データとの変換テーブルであるCLUT(Color Look Up Table)を内蔵している。
【0032】
前処理部14は、CPUを備えるプロセッサの構成とされるもので、メインCPU11の処理の一部を分担することができるようにするものである。例えばポリゴンデータを、表示のための2次元座標データに変換する処理も、この前処理部14が行う場合がある。
【0033】
そして、この例では、前処理部14とメインバスとの間に、瞬時圧縮部50による瞬時圧縮を解凍する瞬時解凍部60が設けられる。
【0034】
次に、このゲーム機の基本的な処理について以下に、簡単に説明する。
【0035】
[補助記憶装置部27からのデータの取り込み]
図2の例のゲーム機に電源が投入され、ゲーム機本体1にCD−ROMディスク6が装填されると、ブートROM23の、ゲームを実行するためのいわゆる初期化処理をするためのプログラムが、サブCPU21により実行される。すると、CD−ROMディスク6の記録データが次のようにして取り込まれる。
【0036】
すなわち、補助記憶装置部27においては、CD−ROMディスク6から、圧縮画像データ、描画命令及びメインCPU11が実行するプログラムが、CD−ROMドライバ42、CD−ROMデコーダ41を介して読み出され、サブDMAコントローラ24によってサブメモリ22に一旦ロードされる。
【0037】
そして、このサブメモリ22に取り込まれたデータは、サブDMAコントローラおよびバスコントローラ30、さらにはメインDMAコントローラ16によってメインメモリ12に転送される。なお、サブCPU21は、描画処理部15のフレームに対して直接的にアクセスできるように構成されており、このサブCPU21によっても表示画像内容の変更が、描画処理部15の制御とは離れて可能とされている。
【0038】
[圧縮画像データの伸長及び転送]
図1は、図2のブロック図において、画像データの流れを主体として、より詳細に説明するためのブロック図である。図1において、点線の矢線が画像データの流れを表している。
【0039】
図1に示すように、画像伸長デコード部13は、この例では、DMAコントローラ131と、FIFOメモリ132と、MPEGのデコーダ(以下、MDECという)133と、パッカー134と、FIFOメモリ135と、瞬時圧縮部50を備える。瞬時圧縮部50は、瞬時圧縮を行うための変換テーブル52と、DMAコントローラ51とからなる。
【0040】
DMAコントローラ131および51は、メインバス10のアービトレーションを行い、メインバス10が空いている時間を縫って圧縮画像データおよび伸長画像データ(瞬時圧縮されている)を、メインメモリ12と、この画像伸長デコード13との間でDMA転送するためのものである。FIFOメモリ132およびFIFOメモリ135は、複数のバス要求が衝突してもデータが失われないようにするための、最低限の段数のバッファである。
【0041】
MDEC133は、MPEG2方式の圧縮が施されたデータを伸長デコードする。テクスチャパターンのデータの場合を例にとって、この伸長デコード処理を説明する。
【0042】
伸長デコードについて説明する前に、テクスチャパターンのデータがどのように圧縮されているかについて説明する。
【0043】
この例では、テクスチャパターンのデータは、画素データが、赤(R)、緑(G)、青(B)の成分のそれぞれが8ビットからなる2次元画像である。このとき(R,G,B)=(0,0,0)に割り当てられた画素は、透明色と解釈される。
【0044】
まず、テクスチャパターンは、図4に示すような16画素×16画素の矩形領域に分割される。この矩形領域はマクロブロックと呼ばれる。以降、テクスチャパターンは、このマクロブロック単位で処理される。マクロブロックの中で、画素値がすべて透明色なものは、あらかじめ除去されてパックされる。同時に、マクロブロックの位置情報を示すテーブルが、付加情報であるヘッダに記録される。
【0045】
マクロブロックは、図4に示すように、3原色信号表現から、輝度信号と色差信号とからなる表現に変換される。これを、以下、CSC(Color Space Converion)と呼ぶことにする。輝度成分からなるマクロブロックは、図4に示すように、4分割されて、それぞれ8画素×8画素の領域からなる4個の輝度ブロックY0,Y1,Y2,Y3により構成される。また、色差信号成分からなるマクロブロックは、それぞれ隣り合う4画素がまとめられて、8画素×8画素のブロックにまとめられた2つの色差信号ブロックから構成される。こうして、マクロブロックは、合計6個のブロックに分けられる。
【0046】
このマクロブロックに対して、DCT(Discrte Cosine Transformation)がかけられる。DCTは、一般的には直交変換と呼ばれる相似変換の一種で、ブロックの各輝度値を成分とする8画素×8画素の行列Xを考えると、DCT行列P、その逆行列Piを用いて、
Y=P・X・Pi
の形で定義される変換を指す。上記DCT行列Pの係数は、図5に示す表1の通りである。
【0047】
DCT変換されたブロックは成分ごとに異なる分解能で量子化される。成分ごとの量子化の幅(ステップ)を指定するテーブルを量子化テーブル(Qテーブル)と呼ぶ。その量子化テーブルの例を図6の表2に示す。
【0048】
実際の量子化は成分ごとに対応するQテーブルの値に、全体の量子化ステップを決める値QUANTの積で割ることによって行なわれる。
【0049】
ここで、全体の量子化ステップQUANTの値を大きくするとデコ−ド後の画質は劣化するが、ブロック内の0成分の個数が多くなるため、圧縮率を向上することができる。
【0050】
量子化されたブロックはジグザグオーダーと呼ばれる順序で1次元に番号づけされた後、ハフマン符号化による可変長符号化が行われる。これと同時に、この例では、マクロブロックごとに、透明色に対応するビットが1になる、16×16×1ビットのαパターン(マスクパターン)が用意される。
【0051】
以上の結果をマクロブロック単位にまとめたものが、最終的な圧縮画像の形式となり、これをビットストリームと呼ぶ。すなわち、マクロブロック単位のデータとマスクパターンとの組みの連続が、64画素×64画素分のテクスチャパターンのデータとされ、これがCD−ROM6に記録されている。CD−ROMには、さらに、前述したマクロブロックの位置情報を示すテーブルも、当該テクスチャパターンのデータとして、前述したようにヘッダに記録される。
【0052】
画像伸長デコードの手順は、上記の画像圧縮の手順の逆を辿ることで行なわれる。この場合の圧縮は非可逆であるので、伸長したマクロブロックの透明色画素が正しく復号されるように、画素値の圧縮データにインターリーブされて記録されている、マスクパターンを使用して、復号後の画素で対応するマスクパターンのビットが1のものは、復号結果の画素値に関わらず強制的に透明色に変更される。
【0053】
MDEC133は、以下の処理により構成される。
(1)CD−ROM6には、圧縮画像および付加情報(ジオメトリ情報など)がインターリーブして記録されている。これらの情報は、CD−ROMドライバ42およびCD−ROMデコーダ41により、連続的に読み出され、前述したように、一旦、メインメモリ12に格納された後に、圧縮された画像情報のみが切り出されて、画像伸長デコード部13に転送されてくる。なお、付加情報は、CPU11において処理されて、これにより解凍画像がテクスチャとして使用されるオブジェクトの位置情報が計算される。
(2)MDEC133は、可変長復号化器を備え、ハフマン符号化されたブロックを復号する。このときのハフマンの木は固定であるが、対応する符号の値は変更できる。
(3)MDEC133は、また、逆量子化器を備える。この逆量子化器は、復号されたブロックに逆量子化をかけ、前述したジグザグオーダーに対応してブロック順序を変換する。逆量子化はブロックの各係数単位に異なるステップで行なわれる。
(4)MDEC133が備える逆DCT変換器は、8×8画素の逆直交変換を行なう。
(5)MDEC133は、さらにCSC処理部を備え、輝度信号・色差信号で表現されたマクロブロック画像を3原色信号R、G、Bで表現されたものに変換する。変換の例を、図7の表3に示す。
【0054】
以上のようにして、補助記憶装置部27からメインメモリ12に転送された入力データのうち、圧縮画像データは、DMAコントローラ131によりメインメモリ12から画像伸長デコード部13に転送され、MDEC133で、MPEG2に対応したデコード処理が行われて、圧縮された画像データが解凍され、各画素が上述のような3原色信号R,G,Bからなるダイレクトカラー形式の画像データとしてデコードされる。
【0055】
この画像データは、パッカー134に供給される。このパッカー134は、伸長デコードされた画像データを、その画素単位で描画処理部15に適合する形式に梱包するものである。すなわち、前述したように、この例においては、描画処理部15に送る画像データの出力形式をダイレクトカラー形式と、インデックスカラー形式とのいずれかにすることができるが、この出力形式の変換をパッカー134は行う。
【0056】
このパッカー134は、図8に示すような構成を有する。すなわち、パッカー134は、ディザマトリクステーブル72に基づいてディザ処理を行うディザ処理部71と、インデックスカラー形式に変換するために、画素データをCLUT74に用意される代表色に纏めるようにするベクトル量子化器73と、パック処理部75とからなる。
【0057】
ダイレクトカラー形式で出力する場合であって、入力画素のビット数と、出力画素のビット数が等しいときには、ディザ処理部71およびベクトル量子化器73はバイパスされ、復号データがパック処理部75において画素単位にパッキングされて出力される。
【0058】
ダイレクトカラー形式で出力する場合であっても、入力画素のビット数よりも、出力画素のビット数Nが小さいときには、ディザ処理部71において適当な丸め処理が行われる。この例の場合、MDEC133からは16ビットの符号付き固定小数点形式で復号データが得られるもので、丸め処理は、以下のうちのいずれかとされる。
a)入力画素がNビットの範囲に収まるようにクリップ処理がされた後、入力画素値の整数部の下位Nビットが出力される。
b)入力画素の上位N+1ビットが四捨五入され、その上位Nビットが出力される。
c)入力画素に固定のディザマトリクステーブル72のオーダードディザが掛けられた後に、上位N+1ビットが四捨五入され、その上位Nビットが出力される。
【0059】
次に、インデックスカラー形式で出力する場合には、予めCLUT74に設定された画素値(画素の色のデータ)を代表点としたベクトル量子化が、ベクトル量子化器73において行われ、各画素値の代わりに、対応する代表点のインデックスのデータが出力される。
【0060】
すなわち、図9は、CLUT74の一例を示すもので、これは、代表色が256個の場合の例である。すなわち、画像が取り得る色として、予め256個の色データ0〜色データ255が選択されて、CLUT74として登録されており、各色データの色番号としてインデックスが与えられている。
【0061】
ベクトル量子化の手法としては、例えば、伸長デコード後の画素値(3原色R,G,Bのそれぞれの色成分について、例えば8ビットからなる色データ)と、CLUT74として与えられた16〜256種類の代表色データ(3原色R,G,Bのそれぞれの色成分について、例えば8ビットからなる)とを比較して、CLUT74中で、最も、色が近い色データのインデックスを画素値の代わりに出力する。
【0062】
この場合、2つの色(R1,G1,B1)と(R2,G2,B2)との近さ(距離)dは、例えば以下の式で計算される。
【0063】
d=(R1−R2)*(R1−R2)+(G1−G2)*(G1−G2)+(B1−B2)*(B1−B2) …(Q1)
この式(Q1)で、*は、掛け算を示している。
【0064】
このようにして、インデックスカラー方式では、伸長デコード後の24ビットの画素値を、8ビットのインデックスのデータに圧縮変換して出力する。
【0065】
以上のようにして、パッカー134で梱包された画素データは、FIFOメモリ135を通じて瞬時圧縮部50に送られ、画像データが瞬時圧縮される。ここでの瞬時圧縮は、MPEG2のような高能率圧縮とは異なり、1/4〜1/2と圧縮率は低いが、ハードウエア規模が小さな圧縮/復号回路で高速に可逆的に圧縮/復号ができるものが使用される。
【0066】
この例の場合には、圧縮にはランレングス符号化とハフマン符号化が同時に行なわれる。この圧縮のための辞書としてのコードブックである変換テーブル52が、瞬時圧縮部50に設けられる。このコードブックである変換テーブル52の生成は、予め行われて、保持されている。
【0067】
図示のように、瞬時圧縮部50は、機能的にDMAコントローラ51を備え、変換テーブル52を用いて、ランレングス符号化とハフマン符号化が同時に行って瞬時圧縮しながら、MPEG伸長デコードされた画像データを、メインメモリ12に転送する。以上が、画像伸長デコード部13の動作である。
【0068】
なお、動き補償を行なう場合は、瞬時圧縮部50での瞬時可逆圧縮を行なわない。この場合、画像伸長デコード部13はビットストリームを読み込む際に、同時にメインメモリ12上に展開された前フレームの画像データを同時に読み込んで処理を行なう。
【0069】
メインCPU11は、伸長された画像データのマクロブロックと呼ばれる単位データが一定量、メインメモリ12に蓄積された時点で、当該伸長データを、メインバス10を通じ、瞬時解凍部60および前処理部14を介して描画処理部15のフレームバッファに転送するようにする。この際に、伸長画像データがフレームバッファの画像メモリ領域に転送されれば、そのまま背景動画像として画像モニター装置で表示されることになる。また、フレームバッファのテクスチャ領域に転送されれば、このテクスチャ領域の画像データは、テクスチャ画像として、ポリゴンの修飾に使用される。
【0070】
瞬時解凍部60は、機能ブロックとしてのDMAコントローラ61と、瞬時圧縮部50の変換テーブル52とは逆変換を行うための変換テーブル62とからなり、メインメモリ12からの瞬時圧縮されている画像データを、変換テーブル62を用いて解凍し、MPEG伸長デコードされた画像データとし、前処理部14を通じて描画処理部15に送る。
【0071】
この例の場合、出力形式がダイレクトカラー形式の場合には、前処理部14から、各画素のデータが指定された所定のビット数のR,G,Bの3原色信号からなる画像データが描画処理部15に供給されて、描画処理が実行される。
【0072】
一方、インデックスカラー形式の場合には、描画処理部15には、前述したようなインデックスデータが供給される。前述したように、描画処理部15は、前述のCLUT74と同様のCLUTを備えており、インデックスカラー形式の画像データを、対応する代表色データに変換する処理を行い、画像データを復元する。そして、この復元した画像データを用いて描画処理を実行する。
【0073】
[描画命令列についての処理と転送]
物体の面を構成するポリゴンは、3次元的な奥行きの情報であるZデータに従って奥行き方向の深い位置にあるポリゴンから順に描画することにより、2次元画像表示面に立体的に画像を表示することができる。メインCPU11は、このように奥行き方向の深い位置にあるポリゴンから順に、描画処理部15で描画が行われるようにするための描画命令列をメインメモリ12上に作成する。
【0074】
メインCPU11は、入力部26のコントロールパッドからのユーザーの操作入力に基づいて、物体や視点の動きを計算し、メインメモリ12上にポリゴン描画命令列を作成する。
【0075】
この描画命令列が完成すると、メインDMAC16は、前処理部14を通じて、描画命令毎に、メインメモリ12から描画処理部15に転送する。
【0076】
描画処理部15では、送られてきたデータを順次実行して、その結果を、フレームメモリの描画領域に格納する。このポリゴン描画の際、データは、描画処理部15の勾配計算ユニットに送られ、勾配計算が行なわれる。勾配計算は、ポリゴン描画で多角形の内側をマッピングデータで埋めていく際、マッピングデータの平面の傾きを求める計算である。テクスチャーの場合はテクスチャー画像データでポリゴンが埋められ、また、グーローシェーディングの場合は輝度値でポリゴンが埋められる。
【0077】
更に、動画のテクスチャーが可能である。つまり、動画テクスチャーの場合には、前述したように、CD−ROMディスク6からの圧縮された動画データは、一旦、メインメモリ12に読み込まれる。そして、この圧縮画像データは、画像伸長デコード部13に送られる。画像伸長デコード部13で、画像データが伸長される。
【0078】
そして、前述したようにして、伸長された動画データは描画処理部15のフレームメモリ上のテクスチャー領域に送られる。テクスチャー領域は、この描画処理部15のフレームバッファ内に設けられているので、テクスチャーパターン自身も、フレーム毎に書き換えることが可能である。このように、テクスチャー領域に動画を送ると、テクスチャーが1フレーム毎に動的に書き換えられて変化する。このテクスチャー領域の動画により、ポリゴンへのテクスチャーマッピングを行えば、動画のテクスチャーが実現される。
【0079】
以上のようにして、この実施の形態によれば、伸長画像データは、瞬時圧縮されてメインバス10を通じてメインメモリに転送される。したがって、圧縮されている分だけ、メモリの利用効率が向上する。しかも、伸長画像データの出力形式としてインデックスカラー形式とした場合には、画素データがインデックスのデータで構成されるために、データ量が少なくなり、その分だけ、メインメモリの利用効率がよくなる。
【0080】
また、メインバス10を通じて画像伸長デコード部13からメインメモリ12に転送される伸長画像データおよび、メインメモリ12からメインバス10を通じて描画処理部15に転送される伸長画像データは、それぞれ瞬時圧縮されているデータであり、データ量が少ないので、バスの転送速度が向上する。
【0081】
また、この実施の形態では、入力圧縮画像データの形式が1種類であっても、画像伸長デコード部13からの出力データの出力形式をダイレクトカラー形式とインデックスカラー形式とのいずれかを選択することが可能であり、別々の出力形式を得るために、入力画像データを別途用意する必要がないので、その点でも、メインメモリの利用効率が向上する。
【0082】
また、ダイレクトカラー形式の場合においても、ディザ処理により、描画処理部15での処理に適合したビット数に丸めることができるので、所望のビット数の出力データを容易に得ることができる。
【0083】
なお、以上の例は、この発明による画像処理装置をゲーム機に適用した場合であるが、この発明による画像処理装置は、種々の用途に使用できることはいうまでもない。
【0084】
【発明の効果】
以上説明したように、この発明によれば、バス上を転送される伸長画像データの見掛上の転送速度が向上すると共に、メモリに蓄積される伸長画像データ量を少なくすることができるためメモリ効率が向上する。
【0085】
また、伸長画像データの複数通りの出力形式にかかわらず、圧縮画像データが1種類で済むので、複数通りの出力形式用の複数個の圧縮画像データをメモリに蓄積する必要がなく、この点でもメモリ効率が向上するという効果もある。
【図面の簡単な説明】
【図1】この発明による画像処理装置の一実施の形態における画像データの処理部分の例を示すブロック図である。
【図2】この発明による画像処理装置の一実施の形態としてのゲーム機の構成例を示すブロック図である。
【図3】図2の例のゲーム機の外観例を示す図である。
【図4】この発明の一実施の形態における圧縮画像データの処理単位を説明するための図である。
【図5】この発明の一実施の形態における圧縮画像データの圧縮方式を説明するための図である。
【図6】この発明の一実施の形態における圧縮画像データの圧縮方式を説明するための図である。
【図7】この発明の一実施の形態における圧縮画像データの圧縮方式を説明するための図である。
【図8】図1の一部のブロックの詳細例を示すブロック図である。
【図9】インデックスカラー形式を説明するための図である。
【符号の説明】
10…メインバス、11…メインCPU、12…メインメモリ、13…画像伸長デコード部、14…前処理部、15…描画処理部、16…メインDMAコントローラ、50…瞬時圧縮部、51…瞬時圧縮用の変換テーブル、60…瞬時解凍部、61…圧縮解凍用の変換テーブル、71…ディザ処理部、72…ディザマトリクステーブル、73…ベクトル量子化器、74…CLUT、75…パック処理部、132および135…FIFOメモリ、133…MPEGのデコーダ、134…パッカー
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention, for example, displays a three-dimensional object in real time according to a user's input and a calculation result in limited hardware resources, although high accuracy is not required unlike a video game machine or a personal computer. The present invention relates to an image processing apparatus suitable as an apparatus required to perform the processing.
[0002]
[Prior art]
In a home TV game machine, a personal computer, a graphic computer, or the like, an image processing apparatus for generating image data to be output to a TV receiver, a monitor receiver, or the like for display is provided by a general-purpose memory, A high-speed processing is enabled by providing a dedicated drawing device between the CPU and the frame buffer as a flow of the drawing image data by combining a CPU and other arithmetic LSIs.
[0003]
That is, in the above image processing apparatus, when generating an image, the CPU does not directly access a frame buffer as a display memory corresponding to a display screen, but instead executes geometry conversion such as coordinate conversion, clipping, and light source calculation. Processing is performed to define a three-dimensional model as a combination of basic unit figures (polygons) such as a triangle and a quadrangle, and create a drawing command for drawing a three-dimensional image. Then, the CPU sends the drawing command to the drawing device via the external bus.
[0004]
The drawing command includes information such as the shape, position, orientation, color, and pattern of the polygon to be drawn. The shape, position, and orientation of a polygon are determined by the coordinates of its vertices.
[0005]
In the above-described image generating apparatus, for example, when displaying a three-dimensional object, the object is decomposed into a plurality of polygons, a drawing instruction corresponding to each polygon is generated by the CPU, and the generated drawing instruction is transmitted through a bus. Transfer to drawing device. The drawing device executes the drawing command, writes display data into the frame buffer, and displays a target three-dimensional object.
[0006]
At this time, in order to represent the object more practically, a method called texture mapping or mip mapping is used in which a predetermined image pattern is prepared and the inside of the polygon is modified by the image pattern.
[0007]
Further, a method of changing a display color by converting color data of an image through a color look up table (CLUT) in which color conversion data is recorded is widely known.
[0008]
[Problems to be solved by the invention]
By the way, the performance improvement such as the increase of the operating frequency and the reduction of the circuit scale of the operation LSI constituting the home TV game machine and the personal computer without increasing the cost is measured. The available general-purpose memory capacity has not increased much. For this reason, in home TV game machines and personal computers, the memory capacity is a so-called bottleneck.
[0009]
In particular, when performing texture mapping using a high-quality image (pre-rendering pattern) created in advance on a high-performance workstation as a texture pattern, it is necessary to store all patterns constituting a series of moving image segments in a memory. However, as the resolution of the texture pattern increases, the memory capacity is reduced accordingly.
[0010]
Therefore, the texture pattern is compressed and held in the memory, and the compressed texture pattern data is read from the memory each time it is used, and a dedicated image decompression device (a device for decompressing) is used. A method of expanding and decoding the data is used.
[0011]
In this case, in general, the decompression decoding time is much longer than the transfer time of the display image data to the frame buffer of the drawing device, so that the image decompression device cannot operate in synchronization with the drawing device. Therefore, the decompressed image is temporarily stored in a so-called main memory or a buffer memory such as a FIFO placed between the two devices so that the image decompression device and the drawing device can operate asynchronously. Since the data stored in the memory is data obtained by decompressing the compressed data, the memory capacity is greatly reduced.
[0012]
Also, with current circuit technology, signals can be transmitted at very high speed inside the LSI, but it is difficult to increase the signal transfer speed between the LSIs. In particular, in household equipment, the frequency of the transfer clock on the board cannot be increased. For this reason, even if processing is performed at high speed inside the LSI, the transfer speed on the bus for transmitting the result to another LSI often becomes a bottleneck. As described above, the decompressed image data must be temporarily stored in the main memory and transferred to the drawing device again. In this case, since all data is exchanged between the LSIs via the bus, In many cases, the processing speed at the stage becomes a bottleneck on the processing speed of the entire system.
[0013]
SUMMARY OF THE INVENTION In view of the above, it is an object of the present invention to provide an image processing apparatus which can increase the apparent transfer speed between LSIs via a bus and can improve the use efficiency of a memory.
[0014]
[Means for Solving the Problems]
In order to solve the above-described problems, an image processing device according to the present invention includes:
A memory, an image expansion decoding unit, and a drawing processing unit, wherein the compressed image data is decompressed and expanded by the image expansion decoding unit, and the expanded image data is transferred to the memory via a bus; An image processing apparatus, wherein the decompressed image data stored in a memory is transferred to the drawing processing unit via the bus, and display image data is generated by the drawing processing unit.
An instantaneous compression unit that instantaneously compresses the expanded image data is provided between the output end of the expanded image data of the image expansion decoding unit and the bus,
A decompression unit for decompressing the instantaneously compressed image data is provided between the input unit of the drawing processing unit and the bus.
[0015]
In the image processing device having the above configuration, the image data expanded by the image expansion decoding unit is instantaneously compressed by the instantaneous compression unit, and then transferred to the memory via the bus. At the time of transfer from the memory to the drawing processing unit, the decompressed image data that has been instantaneously compressed is decompressed in a decompression unit provided before the input unit of the drawing processing unit, and the decompressed image data obtained by the decompression is obtained. The image data is supplied to the drawing processing unit, and the drawing processing is executed.
[0016]
Since the decompressed image data transferred through the bus is data that is instantaneously compressed, the apparent transfer speed when viewed from an LSI such as a memory, an image decompression decoding unit, or a drawing processing unit is, for example, twice or more. Can be faster. Further, since the image data stored in the memory is compressed, the use efficiency of the memory increases.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of an image processing apparatus according to the present invention will be described with reference to the drawings for a case of a video game machine.
[0018]
FIG. 2 shows a configuration example of a video game machine according to an embodiment of the present invention, which is an example of a game machine having a three-dimensional graphics function and a moving image reproduction function.
[0019]
FIG. 3 shows the appearance of the game machine of this example. The game machine of this example includes a game machine main body 1 and a control pad 2 constituting a user operation input unit. The control pad 2 is connected to the game machine main body 1 by coupling a connector plug 4 attached to a tip of a cable 3 connected to the control pad 2 to a connector jack 5A of the game machine main body 1. . In this example, two connector jacks 5A and 5B are provided in the game machine main body 1 so that two control pads 2 can be connected to the game machine main body 1 for a so-called battle game or the like. ing.
[0020]
The game machine of this example can enjoy the game by loading, for example, a CD-ROM disk 6 into the game machine body 1 as an auxiliary storage means in which a game program and image data are written.
[0021]
Next, the configuration of the game machine of this example will be described with reference to FIG. The game machine of this example has a configuration including two system buses including a main bus 10 and a sub bus 20. Data exchange between the main bus 10 and the sub bus 20 is controlled by the bus controller 30.
[0022]
The main bus 10 is connected to a main CPU 11, a main memory 12, an image decompression decoding unit 13, a preprocessing unit 14, a drawing processing unit 15, and a main DMA controller 16. A processing memory 17 is connected to the drawing processing unit 15, and the drawing processing unit 15 includes a frame buffer (frame memory) for display data and a D / A conversion circuit. Is output to the video output terminal 18. Although not shown, the video output terminal 18 is connected to, for example, a CRT display as a display device.
[0023]
The sub bus 20 includes a sub CPU 21, a sub memory 22, a boot ROM 23, a sub DMA controller 24, an audio processor 25, an input unit 26, an auxiliary storage unit 27, and a communication interface unit for expansion. 28 are connected. The auxiliary storage unit 27 includes a CD-ROM decoder 41 and a CD-ROM driver 42 in this example. The boot ROM 23 stores a program for starting up the game machine. The audio processing processor 25 is connected to an audio processing memory 25M. The audio processor 25 includes a D / A conversion circuit, and outputs an analog audio signal to an audio output terminal 29.
[0024]
The auxiliary storage unit 27 decodes application programs (for example, game programs) and data recorded on the CD-ROM disc 6 loaded in the CD-ROM driver 42. On the CD-ROM disk 6, for example, image data of moving images and still images compressed by the MPEG2 method using discrete cosine transform (DCT) and image data of a texture image for modifying polygons are also recorded. . The application program on the CD-ROM disk 6 includes a polygon drawing command.
[0025]
The input section 26 includes the control pad 2 as the operation input means described above, a video signal input terminal, and an audio signal input terminal.
[0026]
The main CPU 11 manages and controls each unit on the main bus 10 side. Further, the main CPU 11 performs a part of a process for drawing an object as a group of a large number of polygons. The main CPU 11 creates, on the main memory 12, a drawing instruction sequence for generating a drawing image for one screen, as will be described later. Data exchange between the main CPU 11 and the main bus 10 is performed in packet units by converting data into a packet format, thereby enabling burst transfer.
[0027]
The main memory 12 includes a memory area for compressed image data and a memory area for decompressed image data subjected to decompression processing for moving image and still image data. The main memory 12 has a memory area for graphics data such as a drawing instruction sequence (this is called a packet buffer). This packet buffer is used by the main CPU 11 for setting a drawing command sequence and transferring the drawing command sequence to the drawing processing unit.
[0028]
The image decompression decoding unit 13 decompresses the compressed moving image data reproduced from the CD-ROM disk 6 and transferred to the main memory and the compressed texture pattern data on the main memory 12. Since the image compression method described above is employed, a decoder structure corresponding to the image compression method is provided as described later.
[0029]
As will be described later, the output stage of the image decompression decoding unit 13 can perform instantaneous, that is, almost real-time, reversible compression / expansion, and has an instantaneous compression rate of, for example, about 1/4 to 1/2. A unit 50 is provided. In addition, the image decompression decoding unit 13 of this example uses a first output data format (hereinafter, this first output data) for requantizing and outputting the value of each pixel of the image data as an output format of the output image data. Format is referred to as a direct color format), and converts each pixel into index data indicating a color similar to the color of the pixel out of a predetermined limited number of reproduced colors, and outputs the converted data. An output data format (hereinafter, this second output data format is referred to as an index color format) can be selected in conformity with the processing in the drawing processing unit 15.
[0030]
The drawing processing unit 15 executes the drawing command transferred from the main memory 12, and writes the result to the frame memory. The image data read from the frame memory is output to the video output terminal 18 via the D / A converter and displayed on the screen of the image monitor.
[0031]
When the output format of the image data received from the main memory 12 is the index color format, the drawing processing unit 15 performs a process of converting each pixel data from the index data to the corresponding representative color data. For this purpose, the rendering processing unit 15 has a built-in CLUT (Color Look Up Table) which is a conversion table between index data and representative color data.
[0032]
The pre-processing unit 14 has a configuration of a processor including a CPU, and can share a part of the processing of the main CPU 11. For example, the pre-processing unit 14 may also perform a process of converting polygon data into two-dimensional coordinate data for display.
[0033]
In this example, an instantaneous decompression unit 60 that decompresses the instantaneous compression by the instantaneous compression unit 50 is provided between the preprocessing unit 14 and the main bus.
[0034]
Next, the basic processing of this game machine will be briefly described below.
[0035]
[Fetching of data from auxiliary storage unit 27]
When the power of the game machine in the example of FIG. 2 is turned on and the CD-ROM disk 6 is loaded in the game machine main body 1, a program for performing a so-called initialization process for executing the game in the boot ROM 23 is This is executed by the sub CPU 21. Then, the recording data of the CD-ROM disk 6 is taken in as follows.
[0036]
That is, in the auxiliary storage unit 27, the compressed image data, the drawing command, and the program executed by the main CPU 11 are read from the CD-ROM disk 6 via the CD-ROM driver 42 and the CD-ROM decoder 41, The data is temporarily loaded into the sub memory 22 by the sub DMA controller 24.
[0037]
The data fetched into the sub memory 22 is transferred to the main memory 12 by the sub DMA controller and the bus controller 30, and further by the main DMA controller 16. The sub CPU 21 is configured to directly access the frame of the drawing processing unit 15, and the sub CPU 21 can also change the display image content separately from the control of the drawing processing unit 15. It has been.
[0038]
[Decompression and transfer of compressed image data]
FIG. 1 is a block diagram for explaining in more detail mainly the flow of image data in the block diagram of FIG. In FIG. 1, dotted arrows indicate the flow of image data.
[0039]
As shown in FIG. 1, in this example, the image decompression decoding unit 13 includes a DMA controller 131, a FIFO memory 132, an MPEG decoder (hereinafter, referred to as MDEC) 133, a packer 134, a FIFO memory 135, A compression unit 50 is provided. The instantaneous compression section 50 includes a conversion table 52 for performing instantaneous compression, and a DMA controller 51.
[0040]
The DMA controllers 131 and 51 perform arbitration of the main bus 10 and divide the compressed image data and the decompressed image data (instantaneously compressed) into the main memory 12 and the image decompression device while the main bus 10 is idle. This is for DMA transfer with the decode 13. The FIFO memory 132 and the FIFO memory 135 are buffers with a minimum number of stages for preventing data from being lost even if a plurality of bus requests collide.
[0041]
The MDEC 133 decompresses and decodes data compressed according to the MPEG2 system. The decompression decoding process will be described by taking the case of texture pattern data as an example.
[0042]
Before explaining the decompression decoding, how the data of the texture pattern is compressed will be described.
[0043]
In this example, the texture pattern data is a two-dimensional image in which pixel data is composed of eight bits each of red (R), green (G), and blue (B) components. At this time, the pixel assigned to (R, G, B) = (0, 0, 0) is interpreted as a transparent color.
[0044]
First, the texture pattern is divided into a rectangular area of 16 pixels × 16 pixels as shown in FIG. This rectangular area is called a macro block. Thereafter, the texture pattern is processed on a macroblock basis. Macroblocks whose pixel values are all transparent are removed and packed in advance. At the same time, a table indicating the position information of the macroblock is recorded in the header that is the additional information.
[0045]
As shown in FIG. 4, the macroblock is converted from a three-primary-color signal expression into an expression composed of a luminance signal and a color difference signal. This is hereinafter referred to as CSC (Color Space Cover). s Ion). As shown in FIG. 4, the macro block composed of the luminance components is divided into four parts, and is composed of four luminance blocks Y0, Y1, Y2, and Y3 each having an area of 8 × 8 pixels. In addition, the macroblock composed of the color difference signal components is composed of two color difference signal blocks in which four adjacent pixels are grouped into a block of 8 pixels × 8 pixels. Thus, the macroblock is divided into a total of six blocks.
[0046]
For this macro block, DCT (Discr e te Cosine Transformation). DCT is a kind of similarity transformation generally called orthogonal transformation. Considering a matrix X of 8 × 8 pixels having each luminance value of a block as a component, using a DCT matrix P and its inverse matrix Pi,
Y = P ・ X ・ Pi
Refers to a transformation defined in the form The coefficients of the DCT matrix P are as shown in Table 1 shown in FIG.
[0047]
The DCT-transformed block is quantized at a different resolution for each component. A table that specifies the quantization width (step) for each component is called a quantization table (Q table). An example of the quantization table is shown in Table 2 of FIG.
[0048]
The actual quantization is performed by dividing the value of the Q table corresponding to each component by the product of the value QUANT that determines the overall quantization step.
[0049]
Here, if the value of the whole quantization step QUANT is increased, the image quality after decoding is degraded, but the number of 0 components in the block increases, so that the compression ratio can be improved.
[0050]
After the quantized blocks are numbered one-dimensionally in an order called zigzag order, variable-length coding by Huffman coding is performed. At the same time, in this example, a 16 × 16 × 1 bit α pattern (mask pattern) in which the bit corresponding to the transparent color becomes 1 for each macroblock.
[0051]
The result obtained in a macroblock unit is the final compressed image format, which is called a bit stream. That is, the continuation of a set of data and a mask pattern in units of macroblocks is data of a texture pattern of 64 × 64 pixels, which is recorded on the CD-ROM 6. Further, in the CD-ROM, a table indicating the above-described macroblock position information is also recorded in the header as the texture pattern data as described above.
[0052]
The procedure of image expansion decoding is performed by following the reverse of the above-described image compression procedure. Since the compression in this case is irreversible, the decoding is performed using a mask pattern that is interleaved and recorded in the pixel value compressed data so that the transparent color pixels of the decompressed macroblock are correctly decoded. The pixel of which the bit of the corresponding mask pattern is 1 is forcibly changed to a transparent color regardless of the pixel value of the decoding result.
[0053]
The MDEC 133 is configured by the following processing.
(1) The compressed image and additional information (geometry information and the like) are interleaved and recorded on the CD-ROM 6. These pieces of information are continuously read out by the CD-ROM driver 42 and the CD-ROM decoder 41, and once stored in the main memory 12 as described above, only the compressed image information is cut out. Then, it is transferred to the image decompression decoding unit 13. The additional information is processed in the CPU 11, whereby the position information of the object whose decompressed image is used as the texture is calculated.
(2) The MDEC 133 includes a variable length decoder, and decodes the Huffman-encoded block. The Huffman tree at this time is fixed, but the value of the corresponding code can be changed.
(3) The MDEC 133 also includes an inverse quantizer. The inverse quantizer performs inverse quantization on the decoded block, and converts the block order according to the above-described zigzag order. The inverse quantization is performed in different steps for each coefficient unit of the block.
(4) The inverse DCT converter included in the MDEC 133 performs an inverse orthogonal transform of 8 × 8 pixels.
(5) The MDEC 133 further includes a CSC processing unit, and converts a macroblock image represented by a luminance signal / color difference signal into an image represented by three primary color signals R, G, and B. An example of the conversion is shown in Table 3 in FIG.
[0054]
As described above, of the input data transferred from the auxiliary storage unit 27 to the main memory 12, the compressed image data is transferred from the main memory 12 to the image decompression decoding unit 13 by the DMA controller 131, and the MDEC 133 Is performed, the compressed image data is decompressed, and each pixel is decoded as direct color image data composed of the three primary color signals R, G, and B as described above.
[0055]
This image data is supplied to the packer 134. The packer 134 packs the decompressed and decoded image data into a format suitable for the drawing processing unit 15 on a pixel-by-pixel basis. That is, as described above, in this example, the output format of the image data to be sent to the drawing processing unit 15 can be either a direct color format or an index color format. 134 is performed.
[0056]
This packer 134 has a configuration as shown in FIG. That is, the packer 134 performs dither processing based on the dither matrix table 72, and vector quantization for converting pixel data into a representative color prepared in the CLUT 74 in order to convert the pixel data into the index color format. And a pack processing unit 75.
[0057]
When outputting in the direct color format and the number of bits of the input pixel is equal to the number of bits of the output pixel, the dither processing unit 71 and the vector quantizer 73 are bypassed, and the decoded data It is packed and output in units.
[0058]
Even in the case of outputting in the direct color format, when the bit number N of the output pixel is smaller than the bit number of the input pixel, the dither processing unit 71 performs an appropriate rounding process. In the case of this example, decoded data is obtained from the MDEC 133 in a 16-bit signed fixed-point format, and the rounding process is one of the following.
a) After the clipping process is performed so that the input pixel falls within the range of N bits, the lower N bits of the integer part of the input pixel value are output.
b) The upper N + 1 bits of the input pixel are rounded off and the upper N bits are output.
c) After the input pixel is multiplied by the ordered dither of the fixed dither matrix table 72, the upper N + 1 bits are rounded off and the upper N bits are output.
[0059]
Next, when outputting in the index color format, vector quantization using a pixel value (pixel color data) preset in the CLUT 74 as a representative point is performed in the vector quantizer 73, and each pixel value is output. Instead, the data of the index of the corresponding representative point is output.
[0060]
That is, FIG. 9 shows an example of the CLUT 74, which is an example in a case where there are 256 representative colors. That is, 256 color data 0 to color data 255 are selected in advance as possible colors of an image, registered as the CLUT 74, and an index is given as a color number of each color data.
[0061]
As a method of vector quantization, for example, pixel values after decompression decoding (for example, 8-bit color data for each color component of the three primary colors R, G, and B) and 16 to 256 types given as the CLUT 74 are used. (For each color component of the three primary colors R, G, and B, for example, consisting of 8 bits), and in the CLUT 74, the index of the color data having the closest color is used instead of the pixel value. Output.
[0062]
In this case, the proximity (distance) d between the two colors (R1, G1, B1) and (R2, G2, B2) is calculated by the following formula, for example.
[0063]
d = (R1-R2) * (R1-R2) + (G1-G2) * (G1-G2) + (B1-B2) * (B1-B2) (Q1)
In this formula (Q1), * indicates multiplication.
[0064]
As described above, in the index color method, the 24-bit pixel value after decompression decoding is compression-converted into 8-bit index data and output.
[0065]
As described above, the pixel data packed by the packer 134 is sent to the instantaneous compression unit 50 through the FIFO memory 135, and the image data is instantaneously compressed. The instantaneous compression here differs from high-efficiency compression such as MPEG2 in that the compression ratio is low at 1/4 to 1/2, but is reversibly compressed / decoded at high speed by a compression / decoding circuit with a small hardware scale. What can be used is used.
[0066]
In this example, run-length coding and Huffman coding are performed simultaneously for compression. A conversion table 52 which is a codebook as a dictionary for this compression is provided in the instantaneous compression unit 50. The conversion table 52, which is a codebook, is generated and held in advance.
[0067]
As shown in the figure, the instantaneous compression unit 50 functionally includes a DMA controller 51 and uses a conversion table 52 to simultaneously execute run-length encoding and Huffman encoding to instantaneously compress an image that has been MPEG expanded and decoded. The data is transferred to the main memory 12. The above is the operation of the image expansion decoding unit 13.
[0068]
When performing motion compensation, the instantaneous lossless compression in the instantaneous compression unit 50 is not performed. In this case, when reading the bit stream, the image decompression decoding unit 13 simultaneously reads and processes the image data of the previous frame expanded on the main memory 12.
[0069]
When a certain amount of unit data called macroblocks of the decompressed image data is stored in the main memory 12, the main CPU 11 transmits the decompressed data to the instantaneous decompression unit 60 and the preprocessing unit 14 through the main bus 10. Then, the image data is transferred to the frame buffer of the drawing processing unit 15 via the CPU. At this time, if the decompressed image data is transferred to the image memory area of the frame buffer, it will be displayed as it is on the image monitor device as a background moving image. If the image data is transferred to the texture area of the frame buffer, the image data of this texture area is used as a texture image for modifying the polygon.
[0070]
The instantaneous decompression unit 60 includes a DMA controller 61 as a functional block, and a conversion table 62 for performing an inverse conversion of the conversion table 52 of the instantaneous compression unit 50. Is decompressed using the conversion table 62, and is converted into MPEG-decompressed decoded image data, which is sent to the drawing processing unit 15 through the preprocessing unit 14.
[0071]
In the case of this example, when the output format is the direct color format, the pre-processing unit 14 renders image data consisting of R, G, and B primary color signals of a predetermined number of bits designated by each pixel data. The image data is supplied to the processing unit 15 and the drawing processing is executed.
[0072]
On the other hand, in the case of the index color format, the drawing processing unit 15 is supplied with the above-described index data. As described above, the drawing processing unit 15 includes a CLUT similar to the above-described CLUT 74, performs processing of converting image data in index color format into corresponding representative color data, and restores the image data. Then, a drawing process is executed using the restored image data.
[0073]
[Processing and transfer of drawing instruction sequence]
The three-dimensional image is displayed on the two-dimensional image display surface by drawing the polygons constituting the surface of the object in order from the polygon at the deep position in the depth direction according to the Z data which is the three-dimensional depth information. Can be. The main CPU 11 creates, on the main memory 12, a drawing command sequence for causing the drawing processing unit 15 to perform drawing in order from the polygon located at a deep position in the depth direction.
[0074]
The main CPU 11 calculates the movement of an object or a viewpoint based on a user's operation input from the control pad of the input unit 26, and creates a polygon drawing command sequence on the main memory 12.
[0075]
When the drawing command sequence is completed, the main DMAC 16 transfers the drawing command from the main memory 12 to the drawing processing unit 15 for each drawing command through the preprocessing unit 14.
[0076]
The drawing processing unit 15 sequentially executes the transmitted data and stores the result in a drawing area of the frame memory. At the time of this polygon drawing, the data is sent to the gradient calculation unit of the drawing processing unit 15 and the gradient calculation is performed. The gradient calculation is a calculation for obtaining the inclination of the plane of the mapping data when filling the inside of the polygon with the mapping data by polygon drawing. In the case of texture, polygons are filled with texture image data, and in the case of Gouraud shading, polygons are filled with luminance values.
[0077]
In addition, animation textures are possible. That is, in the case of the moving image texture, the compressed moving image data from the CD-ROM disk 6 is once read into the main memory 12 as described above. Then, the compressed image data is sent to the image expansion decoding unit 13. The image data is expanded by the image expansion decoding unit 13.
[0078]
Then, as described above, the expanded moving image data is sent to the texture area on the frame memory of the drawing processing unit 15. Since the texture area is provided in the frame buffer of the drawing processing unit 15, the texture pattern itself can be rewritten for each frame. As described above, when a moving image is sent to the texture area, the texture is dynamically rewritten and changed every frame. If texture mapping to polygons is performed using the moving image in the texture area, the texture of the moving image is realized.
[0079]
As described above, according to this embodiment, the decompressed image data is instantaneously compressed and transferred to the main memory via the main bus 10. Therefore, the use efficiency of the memory is improved by the amount of compression. Further, when the output format of the decompressed image data is the index color format, the pixel data is composed of index data, so that the data amount is reduced, and the use efficiency of the main memory is improved accordingly.
[0080]
The decompressed image data transferred from the image decompression decoding unit 13 to the main memory 12 via the main bus 10 and the decompressed image data transferred from the main memory 12 to the drawing processing unit 15 via the main bus 10 are respectively instantaneously compressed. Data, and the amount of data is small, so that the transfer speed of the bus is improved.
[0081]
Further, in this embodiment, even if the format of the input compressed image data is one type, the output format of the output data from the image decompression decoding unit 13 is selected from the direct color format and the index color format. Since it is not necessary to separately prepare input image data in order to obtain different output formats, the use efficiency of the main memory is improved in this respect as well.
[0082]
Even in the case of the direct color format, the number of bits suitable for the processing in the drawing processing unit 15 can be rounded by dither processing, so that output data of a desired number of bits can be easily obtained.
[0083]
Although the above example is a case where the image processing apparatus according to the present invention is applied to a game machine, it goes without saying that the image processing apparatus according to the present invention can be used for various purposes.
[0084]
【The invention's effect】
As described above, according to the present invention, the apparent transfer speed of decompressed image data transferred on the bus is improved, and the amount of decompressed image data stored in the memory can be reduced. Efficiency is improved.
[0085]
In addition, since only one type of compressed image data is required regardless of a plurality of output formats of decompressed image data, there is no need to store a plurality of compressed image data for a plurality of output formats in a memory. There is also an effect that the memory efficiency is improved.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of a processing portion of image data in an embodiment of an image processing apparatus according to the present invention.
FIG. 2 is a block diagram illustrating a configuration example of a game machine as an embodiment of the image processing device according to the present invention.
FIG. 3 is a diagram showing an example of an appearance of the game machine in the example of FIG. 2;
FIG. 4 is a diagram for explaining a processing unit of compressed image data according to the embodiment of the present invention;
FIG. 5 is a diagram for explaining a compression method of compressed image data according to the embodiment of the present invention.
FIG. 6 is a diagram for explaining a compression method of compressed image data according to an embodiment of the present invention.
FIG. 7 is a diagram for explaining a compression method of compressed image data according to an embodiment of the present invention.
FIG. 8 is a block diagram showing a detailed example of some blocks in FIG. 1;
FIG. 9 is a diagram for explaining an index color format.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Main bus, 11 ... Main CPU, 12 ... Main memory, 13 ... Image decompression decoding part, 14 ... Preprocessing part, 15 ... Drawing processing part, 16 ... Main DMA controller, 50 ... Instantaneous compression part, 51 ... Instantaneous compression Conversion table, 60: instantaneous decompression unit, 61: conversion table for compression / decompression, 71: dither processing unit, 72: dither matrix table, 73: vector quantizer, 74: CLUT, 75: pack processing unit, 132 And 135 ... FIFO memory, 133 ... MPEG decoder, 134 ... Packer

Claims (4)

メモリと、画像伸長デコード部と、描画処理部と、データ転送制御部とを備え、圧縮された画像データが前記画像伸長デコード部で解凍されて伸長され、伸長された画像データが、前記データ転送制御部の制御によりバスを通じて前記メモリに転送され、このメモリに蓄えられた前記伸長された画像データが、前記バスを通じて前記描画処理部に転送され、この描画処理部により表示画像データが生成される画像処理装置であって、
前記画像伸長デコード部の前記伸長された画像データの出力端と前記バスとの間に、前記伸長された画像データをほぼリアルタイムで圧縮する圧縮部を設けると共に、
前記描画処理部の入力部と前記バスとの間に、前記圧縮された画像データの圧縮を解凍する解凍部を設け、
前記画像伸長デコード部は、前記伸長された画像データを前記メモリに転送するに当たって、前記伸長された画像データの各画素の値を再量子化して出力する第1の出力データ形式、および前記各画素を、予め定められた限定された数の再現色の中の、当該画素の色が近似する色を示すインデックスデータに変換して出力する第2の出力データ形式のいずれかを選択することが可能であること
を特徴とする画像処理装置。
A memory, an image decompression decoding unit, a drawing processing unit, and a data transfer control unit, wherein the compressed image data is decompressed and decompressed by the image decompression decoding unit, and the decompressed image data is transferred to the data transfer unit. Transferred to the memory through a bus under the control of the control unit, the decompressed image data stored in the memory is transferred to the drawing processing unit via the bus, and display image data is generated by the drawing processing unit. An image processing device,
A compression unit that compresses the decompressed image data almost in real time is provided between the output terminal of the decompressed image data of the image decompression decoding unit and the bus,
A decompression unit that decompresses the compressed image data is provided between the input unit of the drawing processing unit and the bus,
A first output data format for requantizing and outputting a value of each pixel of the expanded image data when transferring the expanded image data to the memory; and Can be selected from among a predetermined limited number of reproduction colors into index data indicating a color similar to the color of the pixel and outputting the index data. the image processing apparatus according to claim <br/> that is.
メモリと、画像伸長デコード部と、描画処理部と、データ転送制御部とを備え、圧縮された画像データが前記画像伸長デコード部で解凍されて伸長され、伸長された画像データが、前記データ転送制御部の制御によりバスを通じて前記メモリに転送され、このメモリに蓄えられた前記伸長された画像データが、前記バスを通じて前記描画処理部に転送され、この描画処理部により表示画像データが生成される画像処理装置であって、  A memory, an image decompression decoding unit, a rendering processing unit, and a data transfer control unit, wherein the compressed image data is decompressed and decompressed by the image decompression decoding unit, and the decompressed image data is transferred to the data transfer unit. Transferred to the memory via a bus under the control of the control unit, the decompressed image data stored in the memory is transferred to the drawing processing unit via the bus, and display image data is generated by the drawing processing unit An image processing device,
前記画像伸長デコード部の前記伸長された画像データの出力端と前記バスとの間に、前記伸長された画像データをほぼリアルタイムで圧縮する圧縮部を有し、  A compression unit that compresses the decompressed image data almost in real time between the output end of the decompressed image data of the image decompression decoding unit and the bus;
前記画像伸長デコード部は、前記伸長された画像データを前記メモリに転送するに当たって、前記伸長された画像データの各画素の値を再量子化して出力する第1の出力データ形式、および前記各画素を、予め定められた限定された数の再現色の中の、当該画素の色が近似する色を示すインデックスデータに変換して出力する第2の出力データ形式のいずれかを選択することが可能であって、  A first output data format for requantizing and outputting a value of each pixel of the expanded image data when transferring the expanded image data to the memory; and Can be selected from among a predetermined limited number of reproduced colors into a second output data format that converts and outputs index data indicating a color similar to the color of the pixel. And
前記圧縮部は、表示画像の動き補償を行なう場合、前記伸長された画像データの圧縮を行わないこと  The compression unit does not compress the decompressed image data when performing motion compensation on a display image.
を特徴とする画像処理装置。An image processing apparatus characterized by the above-mentioned.
請求項1または2に記載の画像処理装置において、
前記第1の出力データ形式が選択されたときに、ディザ法を用いて前記伸長された画像データの各画素の値を再量子化する量子化手段が前記画像伸長デコード部の出力側に設けられたこと
を特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
When the first output data format is selected, quantization means for requantizing the value of each pixel of the decompressed image data using a dither method is provided on the output side of the image decompression decoding unit. An image processing apparatus characterized in that:
請求項1または2に記載の画像処理装置において、
前記第2の出力データ形式が選択されたときに、前記伸長された画像データを、前記予め定められた数の再現色に合わせてベクトル量子化する量子化手段が前記画像伸長デコード部の出力側に設けられたこと
を特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
When the second output data format is selected, quantization means for vector-quantizing the decompressed image data in accordance with the predetermined number of reproduction colors is provided on the output side of the image decompression decoding unit. An image processing apparatus, comprising:
JP25386596A 1996-09-04 1996-09-04 Image processing device Expired - Fee Related JP3556777B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25386596A JP3556777B2 (en) 1996-09-04 1996-09-04 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25386596A JP3556777B2 (en) 1996-09-04 1996-09-04 Image processing device

Publications (2)

Publication Number Publication Date
JPH1078769A JPH1078769A (en) 1998-03-24
JP3556777B2 true JP3556777B2 (en) 2004-08-25

Family

ID=17257214

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25386596A Expired - Fee Related JP3556777B2 (en) 1996-09-04 1996-09-04 Image processing device

Country Status (1)

Country Link
JP (1) JP3556777B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005142699A (en) 2003-11-05 2005-06-02 Mega Chips Corp Image companding apparatus
US7529416B2 (en) * 2006-08-18 2009-05-05 Terayon Communication Systems, Inc. Method and apparatus for transferring digital data between circuits

Also Published As

Publication number Publication date
JPH1078769A (en) 1998-03-24

Similar Documents

Publication Publication Date Title
JP3886184B2 (en) Image data processing method and image processing apparatus
JP3578498B2 (en) Image information processing device
US5949409A (en) Image processing in which the image is divided into image areas with specific color lookup tables for enhanced color resolution
US6275239B1 (en) Media coprocessor with graphics video and audio tasks partitioned by time division multiplexing
US5933148A (en) Method and apparatus for mapping texture
US5784070A (en) Method and apparatus for producing a polygonal image representation through operation of plotting commands on image data
JP3492761B2 (en) Image generation method and apparatus
KR100363504B1 (en) Image processing device
JP2006014341A (en) Method and apparatus for storing image data using mcu buffer
CA2146606C (en) Method and apparatus for generating images
US7796823B1 (en) Texture compression
JPH1196345A (en) Method for compressing and inversely compressing graphics image
JPH10124688A (en) Image generating method and device therefor, recording medium and pseudorandom number generator
JP3556777B2 (en) Image processing device
JPH08163560A (en) Picture information generation method, picture information processing method and recording medium
JP3548642B2 (en) Image information generating apparatus and method, image information processing apparatus and method, and recording medium
JP2023152589A (en) Method and apparatus for animation rendering, electronic device, and storage medium
JP3547236B2 (en) Image information generating apparatus and method, and image information processing apparatus and method
JP3238567B2 (en) Image generation method and apparatus
JP3698747B2 (en) Image data generation method and image processing system
JP3479184B2 (en) Image generation method and image generation device
JPH09292927A (en) Function generator
JPH11149570A (en) Game device and recording medium used for the device
JPH06342468A (en) Computer graphic image compressing and encoding system
JP2004170998A (en) Picture processor

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040511

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040513

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090521

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090521

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100521

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110521

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110521

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120521

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130521

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees