JP3673529B2 - Image data compression / decompression method and apparatus therefor - Google Patents

Image data compression / decompression method and apparatus therefor Download PDF

Info

Publication number
JP3673529B2
JP3673529B2 JP26581293A JP26581293A JP3673529B2 JP 3673529 B2 JP3673529 B2 JP 3673529B2 JP 26581293 A JP26581293 A JP 26581293A JP 26581293 A JP26581293 A JP 26581293A JP 3673529 B2 JP3673529 B2 JP 3673529B2
Authority
JP
Japan
Prior art keywords
coefficient
image data
data
compressed image
code
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
JP26581293A
Other languages
Japanese (ja)
Other versions
JPH07123413A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP26581293A priority Critical patent/JP3673529B2/en
Publication of JPH07123413A publication Critical patent/JPH07123413A/en
Application granted granted Critical
Publication of JP3673529B2 publication Critical patent/JP3673529B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)

Description

【0001】
【産業上の利用分野】
この発明は、画像データを圧縮・伸長する方法およびそのための装置に関する。
【0002】
【従来の技術】
図31は、従来の画像データの圧縮/伸長装置の構成を示すブロック図である。画像データ圧縮装置540は、直交変換部542において原画像データをM×N画素のブロック毎に直交変換した後、量子化部544において量子化を行ない、さらに、エントロピー符号化部546において符号化を行なって圧縮画像データを作成する。一方、画像データ伸長装置550は、まずエントロピー復号化部556において圧縮画像データを復号化し、逆量子化部554で逆量子化した後に、逆直交変換部552によって画像データを復元する。なお、量子化部544と逆量子化部554は同一の量子化テーブル562を使用し、また、エントロピー符号化部546とエントロピー復号化部556も同一の符号テーブル564を使用する。
【0003】
【発明が解決しようとする課題】
ところで、1つの画像内に、高画質で復元したい第1の部分と低画質で復元してもよい第2の部分とを含む場合がある。このような場合には、第1の部分に対しては量子化レベルの小さな量子化テーブルを用いて量子化を行ない、第2の部分に対しては量子化レベルの大きな量子化テーブルを用いて量子化を行なえば良い。量子化テーブルは、画像データの画素ブロックと同じサイズの行列、すなわちM行N列の行列である。従来の画像データ圧縮/伸長装置では、1つの画像内において複数の量子化テーブルを使用する場合には、M行N列の複数の量子化テーブルを圧縮装置540から伸長装置550に転送しなければならず、圧縮画像データのデータ量を増大させるという問題があった。
【0004】
また、画像の中に一様な色を有する画素ブロックが連続するような単純な画像部分についても、それらの画素ブロックに対するM行N列の直交変換係数をすべてエントロピー符号化する。従って、このような単純な画像部分を表わす圧縮画像データも、かなりのデータ量になるという問題があった。
【0005】
この発明は、従来技術における上述の課題を解決するためになされたものであり、圧縮画像データのデータ量を従来に比べて低減することのできる技術を提供することを目的とする。
【0006】
【課題を解決するための手段および作用】
上述の課題を解決するため、この発明による圧縮画像データ伸長方法は、
(A)複数の画素ブロックに対する符号データと、前記複数の画素ブロックの先頭に位置する第1の画素ブロックに対して割り当てられた第1の係数コードと、前記複数の画素ブロックの配列の中の任意の位置に配置された第2の画素ブロックに対して割り当てられた第2の係数コードとを含む圧縮画像データを受け取る工程と、
(B)前記符号データをエントロピー復号化することによって、量子化された変換係数を生成するとともに、前記第1と第2の係数コードをエントロピー復号化することによって第1と第2の係数を生成する工程と、
(C)前記第1と第2の係数のそれぞれと、所定の基本量子化テーブルの基本量子化レベルとを乗ずることによって、第1と第2の量子化テーブルを作成する工程と、
(D)前記第1の画素ブロックから前記第2の画素ブロックの直前の画素ブロックまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第1の量子化テーブルで逆量子化し、前記第2の画素ブロックから次の係数コードが割り当てられた画素ブロックが現れるまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第2の量子化テーブルで逆量子化することによって、逆量子化された変換係数を求める工程と、
(E)前記逆量子化された変換係数を逆直交変換することによって、伸長された画像データを求める工程と、を備える。
【0007】
この伸長方法によれば、第1と第2の係数を与えるだけで量子化レベルの異なる第1と第2の量子化テーブルを作成できるので、2つの量子化テーブルを圧縮画像データに含める場合に比べて圧縮画像データのデータ量を低減することができる。また、第2の係数が現われるまでの複数の画素ブロックに対して第1の係数が適用されるので、これらの複数の画素ブロックのそれぞれの符号データの前に第1の係数を含めておく必要がない。
【0008】
前記符号データは、個々の画素ブロックの圧縮画像データであるブロックデータと前記基本量子化テーブルに乗じられる係数を表す係数コードとをそれぞれ1データユニットとして前記複数の画素ブロックの配列順序に従って配列された複数のデータユニットを含むとともに、前記第1の画素ブロックに対する第1のデータユニットの直前に前記第1の係数コードが配置され、前記第2の画素ブロックに対する第2のデータユニットの直前に前記第2の係数コードが配置されているようにしてもよい。
【0009】
こうすれば、第1と第2の係数を第1と第2の画素ブロックにそれぞれ容易に対応づけられる。
【0010】
また、前記第1と第2の係数コードは、前記第1と第2の係数をそれぞれ示すエントロピー符号語であり、前記変換係数の直流成分に対するエントロピー符号語を含む符号テーブルに含まれていることが好ましい。
【0011】
こうすれば、第1と第2の係数を一意にかつ瞬時に復号することができる。
【0014】
前記工程(C)は、前記第1と第2の係数のそれぞれと前記基本量子化テーブルに含まれている量子化レベルとの乗算結果が所定の最大値を超える場合には、前記乗算結果が前記最大値を超えた量子化レベルの値を前記最大値に等しく設定する工程、を含むようにしてもよい。
【0015】
こうすれば、量子化レベルのビット数を一定値以下に保つことができる。
【0016】
前記工程(C)は、前記基本量子化テーブル内の所定位置の基本量子化レベルをそのまま前記第1と第2の逆量子化テーブルの所定位置の量子化レベルとして使用する工程、を含むようにしてもよい。
【0017】
こうすれば、所定の位置の変換係数を逆量子化する際に発生する誤差を低減することができる。
【0018】
前記所定の基本量子化レベルは、前記変換係数の直流成分に関する量子化レベルであるようにするのが好ましい。
【0019】
変換係数の直流成分に対する量子化レベルを変えないようにすれば、直流成分の逆量子化にともなう誤差を低減することができる。
【0020】
前記圧縮画像データは、さらに、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の画素ブロックの個数を示す同一パターンブロックデータを含み、
さらに、前記工程(B)は、
前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって作成する工程、、を有するようにしてもよい。
【0021】
こうすれば、各画素ブロック内の画像が互いに同一である連続した複数の画素ブロックを比較的少ないデータで表わすことができる。
【0022】
前記所定の成分は直流成分であることが好ましい。
【0023】
こうすれば、連続した複数の画素ブロックを同一の色で塗ることができる。
【0024】
前記工程(D)は、前記同一パターンブロックデータから復号化された前記変換係数については前記逆量子化を省略する工程、を含むようにしてもよい。
【0025】
こうすれば、逆量子化による誤差の発生を防止することができる。
【0026】
この発明による他の圧縮画像データ伸長方法は、
(A)複数の第1の画素ブロックに対する符号データと、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の第2の画素ブロックの個数を示す同一パターンブロックデータとを含む圧縮画像データを受け取る工程と、
(B)前記符号データをエントロピー復号化することによって前記複数の第1の画素ブロックに対する第1の量子化された変換係数を作成し、また、前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって前記第2の量子化された変換係数を作成する工程と、
(C)前記第1と第2の量子化された変換係数を量子化テーブルを用いて逆量子化することによって、第1と第2の逆量子化された変換係数を求める工程と、
(D)前記第1と第2の逆量子化された変換係数を逆直交変換することによって、伸長された画像データを作成する工程と、
を備える。
【0027】
この方法では、各画素ブロック内の画像が互いに同一である連続した複数の画素ブロックを比較的少ないデータで表わすことができる。
【0028】
この発明による圧縮画像データ伸長装置は、
複数の画素ブロックに対する符号データと、前記複数の画素ブロックの先頭に位置する第1の画素ブロックに対して割り当てられた第1の係数コードと、前記複数の画素ブロックの配列の中の任意の位置に配置された第2の画素ブロックに対して割り当てられた第2の係数コードとを含む圧縮画像データを記憶する記憶手段と、
前記符号データをエントロピー復号化することによって、量子化された変換係数を生成するとともに、前記第1と第2の係数コードをエントロピー復号化することによって第1と第2の係数を生成するエントロピー復号化手段と、
前記第1と第2の係数のそれぞれと、所定の基本量子化テーブルの基本量子化レベルとを乗ずることによって、第1と第2の量子化テーブルを作成する逆量子化テーブル作成手段と、
前記第1の画素ブロックから前記第2の画素ブロックの直前の画素ブロックまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第1の量子化テーブルで逆量子化し、前記第2の画素ブロックから次の係数コードが割り当てられた画素ブロックが現れるまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第2の量子化テーブルで逆量子化することによって、逆量子化された変換係数を求める逆量子化手段と、
前記逆量子化された変換係数を逆直交変換することによって、伸長された画像データを求める逆直交変換手段と、
を備える。
【0029】
また、この発明による他の圧縮画像データ伸長装置は、
複数の第1の画素ブロックに対する符号データと、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の第2の画素ブロックの個数を示す同一パターンブロックデータとを含む圧縮画像データを記憶する第1の記憶手段と、
前記複数の第2の画素ブロックに関する変換係数の所定の成分に対する指定値を記憶する第2の記憶手段と、
前記符号データをエントロピー復号化することによって前記複数の第1の画素ブロックに対する第1の量子化された変換係数を作成し、また、前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって前記第2の量子化された変換係数を作成するエントロピー復号化手段と、
前記第1と第2の量子化された変換係数を量子化テーブルを用いて逆量子化することによって、第1と第2の逆量子化された変換係数を求める逆量子化手段と、
前記第1と第2の逆量子化された変換係数を逆直交変換することによって、伸長された画像データを作成する逆直交変換手段と、
を備える。
【0030】
この発明による画像データの圧縮方法は、
(A)画像データを画像内の複数の画素ブロック毎に直交変換して変換係数を求める工程と、
(B)前記複数の画素ブロックの先頭に位置する第1の画素ブロックに対する第1の係数と、前記複数の画素ブロックの配列の中の任意の位置に配置された第2の画素ブロックに対する第2の係数とを指定する工程と、
(C)前記第1と第2の係数のそれぞれと所定の基本量子化テーブルの基本量子化レベルとを乗ずることによって、第1と第2の量子化テーブルを作成する工程と、
(D)前記第1の画素ブロックから前記第2の画素ブロックの直前の画素ブロックまでの一連の画素ブロックに対しては前記変換係数を前記第1の量子化テーブルで量子化し、前記第2の画素ブロックから次の係数コードが割り当てられた画素ブロックが現れるまでの一連の画素ブロックに対しては前記変換係数を前記第2の量子化テーブルで量子化することによって、量子化された変換係数を求める工程と、
(E)前記量子化された変換係数をエントロピー符号化することによって符号データを作成するとともに、前記第1と第2の係数をエントロピー符号化することによって第1と第2の係数コードを作成する工程と、
(F)前記符号データと前記第1と第2の係数コードとを含む圧縮画像データを作成する工程と、
を備える。
【0031】
第1と第2の係数を与えるだけで量子化レベルの異なる第1と第2の量子化テーブルを作成できるので、2つの量子化テーブルを圧縮画像データに含める場合に比べて圧縮画像データのデータ量を低減することができる。
【0036】
【実施例】
以下では、次の各項目について順次説明を行なう。
A.圧縮/伸長装置の全体構成と基本動作;
B.量子化レベル係数QCxによる量子化テーブルQTの調整;
C.ハフマン符号化と圧縮データの構成;
D.逆量子化テーブル作成部の詳細構成;
E.ヌルランデータの復号化
【0037】
A.圧縮/伸長装置の構成と動作:
図1は、この発明の一実施例を適用した画像データの圧縮装置100と伸長装置200の機能を示すブロック図である。
【0038】
画像データ圧縮装置100は、原画像データf(x,y)に対してディスクリートコサイン変換を行なうDCT部110と、DCT変換で得られた変換係数F(u,v)を量子化する量子化部120と、量子化された変換係数QF(u,v)をハフマン符号化して圧縮画像データZZを作成するハフマン符号化部130と、量子化テーブル作成部140と、ハフマン符号テーブルメモリ150とを備えている。量子化テーブル作成部140は、後述するように、基本量子化テーブルBQTと量子化レベル係数QCxとに基づいて量子化テーブルQTを作成する。圧縮画像データZZは、CD−ROMなどの記憶媒体に記憶されて、画像データ圧縮装置100から画像データ伸長装置200に供給される。
【0039】
画像データ伸長装置200は、圧縮画像データZZをハフマン復号化するハフマン復号化部210と、復号された量子化後の変換係数QF(u,v)を逆量子化する逆量子化部220と、逆量子化された変換係数FF(u,v)にディスクリートコサイン逆変換を行なって画像データff(x,y)を得るIDCT部230と、ハフマン符号テーブルメモリ240と、逆量子化テーブル作成部250とを備えている。逆量子化テーブル作成部250は、圧縮画像データZZから復号された基本量子化テーブルBQTと量子化レベル係数QCxとをハフマン復号化部210から受取り、これらに基づいて量子化テーブルQTを作成する。この量子化テーブルQTは、圧縮装置100で用いられた量子化テーブルQTと同じである。また、ハフマン符号テーブルメモリ240に記憶されているハフマン符号テーブルHTも圧縮装置100のハフマン符号テーブルメモリ150に記憶されているものと同じである。
【0040】
図2は、画像データ圧縮装置100の具体的な構成を示すブロック図である。この画像データ圧縮装置100は、CPU101と、メインメモリ102と、キーボード103と、マウス104と、磁気ディスク装置105と、光磁気ディスク装置106とを備えている。図1に示す画像データ圧縮装置100の各処理部110〜140は、メインメモリ102に記憶されたソフトウェアプログラムによって実現されている。また、基本量子化テーブルBQTとハフマン符号テーブルHTは、磁気ディスク装置105に記憶されている。この画像データ圧縮装置100は、ビデオゲームを作成するためのワークステーションであり、画像データ圧縮のためのソフトウェアプログラムの他に、ビデオゲームを作成するための各種のプログラムがCPU101により実行される。完成したゲームプログラムは、圧縮画像データとともに光磁気ディスク装置106に格納される。そして、この光磁気ディスクを用いて、ビデオゲームのプログラムと圧縮画像データを含むCD−ROMが製作される。
【0041】
図3は、画像データ伸長装置200を含むビデオゲーム装置20の構成を示すブロック図である。このビデオゲーム装置20は、SCSIバス36を介して接続されたCD−ROMドライブ32の他、画像処理とこれに関する総ての処理を統括的に司るマイクロプロセッサ(以下、MPUという)40と、このMPU40に直接接続されたメインメモリ(以下、M−RAMと呼ぶ)41と、同じくBIOSプログラムを記憶したROM42と、MPU40のバス(M−BUS)43に接続された各種ユニット、即ち画像信号コントロールユニット45、画像データ伸長ユニット200、特定の画像信号を出力するVDPユニット49、ビデオ信号の合成と出力を行なうビデオエンコーダユニット50、音声データを扱う音声データ出力ユニット52とを備える。
【0042】
また、このビデオゲーム装置20内には、画像信号コントロールユニット45のローカルバス(K−BUS)54に接続されたメモリ(以下、K−RAMと呼ぶ)55、画像データ伸長ユニット200のローカルバスに接続されたメモリ(以下、R−RAMと呼ぶ)251、VDPユニット49のローカルバスに接続されたビデオメモリ(以下、V−RAMと呼ぶ)59、ビデオエンコーダユニット50からの出力信号を通常の映像信号(NTSC)に変換し、カラーテレビ28に出力するNTSCコンバータ60が備えられている。
【0043】
画像信号コントロールユニット45,画像データ伸長ユニット200,ビデオエンコーダユニット50および音声データ出力ユニット52は、それぞれロジック回路により構成されている。
【0044】
図4(A)は、ゲームの背景画像となる原画像の一例を示す平面図である。この原画像は、一様な色で塗られた背景BGに火山の自然画がはめ込まれた画像である。図4(B)は、1つの画素ブロックPBを含む原画像の一部を拡大して示している。一般に、画素ブロックPBは、M×N個の画素PXを含むように設定できる。2つの整数M,Nの値としては8または16が好ましく、この実施例では、M=N=8である。なお、整数MとNを異なる値に設定しても良い。後述するように、圧縮画像データZZの中で背景BGを表わすデータ部分は、一様色の画素ブロックPBが連続することを示す特別なデータ形式(ヌルランデータ)を有している。
【0045】
画像データ圧縮装置100のDCT部110は、次の数式1に従って、各画素ブロックPB毎に2次元DCT変換を行なう。
【数1】

Figure 0003673529
ここで、f(x,y)は1つの画素ブロックPBに含まれる8×8個の画像データの配列、x,yは各画素ブロックPB内の各画素の位置を示す座標、F(u,v)は変換係数の配列、u,vは周波数空間の座標である。
【0046】
図5は、変換係数F(u,v)の配列を示す説明図である。変換係数F(u,v)は画素ブロックPBと同じ8×8の配列である。左上端の変換係数F(0,0)はDC成分(またはDC係数)と呼ばれており、その他の変換係数はAC成分(またはAC係数)と呼ばれている。DC成分は、画素ブロックPBにおける画像データの平均値を示している。また、AC成分は、画素ブロックPB内における画像データの変化を示している。隣接する画素の画像データにはある程度の相関があるので、AC係数の中で低周波成分の値は比較的大きく、高周波成分の値は比較的小さい。また、高周波成分が画質に与える影響は比較的小さい。
【0047】
図6は、画像データ圧縮装置100と画像データ伸長装置200の基本動作を示す説明図である。DCT部110は、図6(a)に示すDCT係数F(u,v)を作成する。
【0048】
量子化テーブル作成部140は、次の数式2に示すように、基本量子化テーブルBQT(図6(c))と量子化レベル係数QCxとを乗ずることによって量子化テーブルQT(図6(d))を作成する。
【数2】
Figure 0003673529
【0049】
図6の例ではQCx=1なので、量子化テーブルQTは基本量子化テーブルBQTと同一である。
【0050】
量子化部120は、DCT係数F(u,v)を量子化テーブルQTで線形量子化することによって、図6(b)に示す量子化されたDCT係数QF(u,v)を求める。線形量子化とは、除算を行なって、その除算結果を整数に丸める処理である。
【0051】
ハフマン符号化部130は、このDCT係数QF(u,v)をハフマン符号化することによって圧縮画像データZZ(図6(e))を作成する。なお、ハフマン符号化の方法については更に後述する。圧縮画像データZZは、後述するように、基本量子化テーブルBQTを表わす第1のデータと、量子化レベル係数QCxと変換係数QF(u,v)を表わす第2のデータとを含んでいる。
【0052】
圧縮画像データZZが画像データ伸長装置200に与えられると、ハフマン復号化部210が圧縮画像データZZを復号化してDCT係数QF(u,v)(図6(f))を求める。ハフマン符号化は可逆符号化なので、このDCT係数QF(u,v)は、画像データ圧縮装置100の量子化部120によって求められた量子化後のDCT係数QF(u,v)(図6(b))と同一である。なお、ハフマン復号化部210は、DCT係数QF(u,v)の他に、圧縮画像データZZに含まれている基本量子化テーブルBQT(図6(c))と量子化レベル係数QCxも復号化して逆量子化テーブル作成部250に与える。
【0053】
逆量子化テーブル作成部250は、基本量子化テーブルBQTと量子化レベル係数QCxとを乗算することによって量子化テーブルQT(図6(d))を作成する。逆量子化部220は、この量子化テーブルQTとDCT係数QF(u,v)とを乗算し、図6(g)に示す復号されたDCT係数FF(u,v)を求める。
【0054】
IDCT部230は、このDCT係数FF(u,v)に対して次の数式3に示す2次元DCT逆変換を行ない、復元された画像データff(x,y)を作成する。
【数3】
Figure 0003673529
【0055】
B.量子化レベル係数QCxによる量子化テーブルQTの調整:
量子化テーブルQTは、前記数式2に従って基本量子化テーブルBQTと量子化レベル係数QCxとを乗算することによって作成されるので、量子化レベル係数QCxの値を大きくすれば量子化テーブルQT内の各量子化レベルを大きくすることができる。量子化レベル係数QCxの値は、画像データ圧縮装置100において画像データを圧縮する際に、予め定められた複数の値(0〜15)の中からオペレータが選択する。
【0056】
図7は、量子化レベル係数QCxを4に指定した場合の圧縮/伸長動作を示す説明図である。量子化テーブル作成部140と逆量子化テーブル作成部250は、上記の数式2に従って、図7(d)に示す量子化テーブルQTを作成する。但し、この実施例では量子化レベルの最大値が15に制限されており、乗算の結果が15以上になる量子化レベルの値はすべて強制的に15に設定される。
【0057】
図7(d)に示す量子化テーブルQTを用いて図7(a)のDCT係数F(u,v)を線形量子化すると、図7(b)に示すように、DC成分が1であり、AC成分がすべて0であるDCT係数QF(u,v)が得られる。このように、量子化レベル係数QCxの値を大きくすると、量子化されたDCT係数QF(u,v)における0の数が増加するので、データ圧縮率を高めることができる。但し、図7(g)に示す復号されたDCT係数FF(u,v)は、図7(a)に示す元のDCT係数F(u,v)とかなり異なる値を示しているので、量子化レベル係数QCxが1に等しい場合(図6)よりも画質の劣化は大きい。
【0058】
ところで、DCT係数のDC成分は画素ブロックPB内における画像データの平均値を示しているので、画質に対する影響がかなり大きい。従って、量子化レベル係数QCxの値に係わらずに、DC成分用の量子化レベルを基本量子化テーブルBQTにおける値と同じに保つようにするのが好ましい。図8は、このような場合の処理を示す説明図であり、DC成分用の量子化レベルQT(0,0)が強制的に1に保たれている。QT(0,0)=1の場合には、図8(g)に示す復号されたDCT係数FF(u,v)のDC成分が、図8(a)に示す元のDCT係数F(u,v)のDC成分と同じ値に保たれるので、図7の場合と同程度の圧縮率で画質の劣化を比較的小さく抑えることができる。なお、DC成分用の量子化レベルQT(0,0)は必ずしも1にする必要はなく、他の任意の値を設定しておいてもよい。
【0059】
量子化レベル係数QCxとしては0を選択することも可能である。QCx=0の場合には、図9に示すように、量子化テーブルQT内のすべての量子化レベルが1に設定される。量子化されたDCT係数QF(u,v)は元のDCT係数F(u,v)と同じであるので、圧縮率は小さいが高画質で圧縮/伸長を行なうことができる。
【0060】
以上をまとめると、量子化テーブル作成部140と逆量子化テーブル作成部250は、次のような特徴を有している。
(1)基本量子化テーブルBQTと量子化レベル係数QCxとを、数式2に従って乗算することによって量子化テーブルQTを作成する。
(2)乗算の結果が量子化レベルの最大値(=15)以上のものは、最大値に等しく設定する(図6〜図8)。
(3)DC成分用の量子化レベルQT(0,0)は、量子化レベル係数QCxの値に係わらず基本量子化テーブルBQTにおける値と同一に保つ(図8)。
(4)量子化レベル係数QCxが0の場合には、すべての量子化レベルを1に設定する(図9)。
【0061】
量子化テーブルQTを求める上述の演算は、画像データ圧縮装置100においてはソフトウエアプログラムによって行なわれ、画像データ伸長装置200においては専用のハードウエアで構成された逆量子化テーブル作成部250によって行なわれる。逆量子化テーブル作成部250の具体的な回路構成については更に後述する。
【0062】
なお、量子化レベル係数QCxは、画像データ圧縮装置100で画像データを圧縮する際に、キーボード103やマウス104を用いて画素ブロックPBごとに異なる値を指定することができる。
【0063】
C.ハフマン符号化と圧縮データの構成;
画像データ圧縮装置100のハフマン符号化部130(図1)は、DC係数符号化部とAC係数符号化部とで構成されている。図10(A)は、DC係数符号化部の機能を示すブロック図である。ブロック遅延部131と加算器132は、図10(B)に示すように、各画素ブロックPBのDC係数DCi と1つ前の画素ブロックPBのDC係数DCi-1 との差分△DCを算出する。
【0064】
カテゴリ化処理部133は、図11に示すカテゴリ化テーブルに従って、DC係数の差分△DCに対応するカテゴリSSSSと識別データIDとを求める。カテゴリSSSSは、DC係数の差分△DCの範囲を示す番号である。識別データIDは、カテゴリSSSSで指定される複数の差分△DCの中の小さい方から何番目の値であるかを示すデータである。
【0065】
カテゴリSSSSは、さらに1次元ハフマン符号化部134(図10)においてDC係数用のハフマン符号語HFDCに変換される。図12は、1次元ハフマン符号化部134によって使用されるハフマン符号テーブルHTDCの一例を示す説明図である。この実施例では、原画像データf(x,y)がYUV信号(輝度信号Yと2つの色差信号U,V)で表現されているものとする。U信号/V信号共用のDC係数用ハフマン符号テーブルは、0〜9のカテゴリSSSSの符号語を含むだけである。一方、Y信号用のDC係数用ハフマン符号テーブルは、0〜9のカテゴリSSSSの符号語の他に、15〜31のカテゴリSSSSの符号語を含んでいる。SSSS=15のハフマン符号語は、後述するヌルランデータであることを示している。ヌルランデータは、一様色の画素ブロックPBが連続することを示すデータである。また、SSSS=16〜31のハフマン符号語は、量子化レベル係数QCxの値を示す符号である。例えば、SSSS=16に対するハフマン符号語「 111110000」はQCx=0を示しており、SSSS=31に対するハフマン符号語「 111111111」はQCx=15を示している。なお、図12のハフマン符号語は、カテゴリSSSS=1〜9、および15〜31のすべてに関して一意復号可能で、かつ、瞬時復号可能である。
【0066】
図13は、ハフマン符号化部130内のAC係数符号化部の機能を示すブロック図である。AC係数の配列F(u,v)(u=v=0を除く)は、まずジグザグスキャン部135によって1次元に並び直される。図14は、ジグザグスキャンの順路を示す説明図である。
【0067】
判定部136は、1次元に並び直されたAC係数の値が0か否かを判定する。AC係数の値が0であれば、ランレングスカウンタ137が、連続する0のAC係数をゼロラン長NNNNに変換する。AC係数が0でなければ、そのAC係数の値がカテゴリ化部138によってカテゴリSSSSと識別データIDに変換される。この際、図11に示すカテゴリ化テーブルが参照される。
【0068】
ゼロラン長NNNNとカテゴリSSSSとは、2次元ハフマン符号化部139においてAC係数用のハフマン符号語HFACに変換される。図15は、AC係数用の2次元ハフマン符号テーブルHTACを示す説明図である。また、図16は、ハフマン符号テーブルHTACの中で、NNNN=0とNNNN=1の部分(図15における最上部2行)のハフマン符号語の一例を示している。なお、NNNN/SSSS=0/0のハフマン符号語「 11111」は、1つの画素ブロックに対する符号データの終了を示している。
【0069】
図17は、ハフマン符号化の一例を示す説明図である。図17(B)は、DC係数の符号化を示している。1つ前の画素ブロックにおけるDC係数の値を0と仮定すると、△DC=F(0,0)=12である。図11のカテゴリ化テーブルによれば△DC=12のカテゴリSSSSは4であり、識別データIDは「1100」である。また、図12のDC係数用ハフマン符号テーブルによれば、カテゴリSSSS=4のハフマン符号語HFDCは「 011」である。なお、ここではY信号用のハフマン符号テーブルを使用する。DC係数に対するハフマン符号(HF+ID)は、図17(B)に示すように「 0111100」となる。
【0070】
図17(C)はAC係数の符号化を示している。まず、ジグザグスキャンによって、AC係数が一次元の配列に並べられる。この配列は、ゼロラン長NNNNと、ゼロでない値のカテゴリSSSS(図11参照)とに変換される。ゼロラン長NNNNとカテゴリSSSSの組み合わせは、図15および図16に示すAC係数用ハフマン符号テーブルによってハフマン符号語HFACに変換され、ゼロでないAC係数の識別データIDと組み合わされて、図17(C)に示すようにハフマン符号(HFAC+ID)が作成される。
【0071】
図18は、圧縮データの構成を示す説明図である。圧縮データの全体は、図18(A)に示すように、ヘッダ部と圧縮データ部とダミー部とで構成されている。ヘッダ部は、それぞれ1バイトの4つのデータDFH,DFL,DLH,DLLを有している。最初の2つのデータDFH,DFLは、圧縮データ部に含まれるデータの種類を示している。圧縮データ部のデータには、基本量子化テーブルBQTのデータ、フルカラー自然画像圧縮データ、ランレングス画像圧縮データなどの種類がある。ヘッダの後部16ビットのデータ(DLH+DLL)は、圧縮データ部とダミー部の合計のデータ長を示している。圧縮データ部はハフマン符号を含む可変長のデータなので、ダミー部との合計のデータ長が、ワード(=2バイト)の整数倍の長さになるように調整されている。
【0072】
図18(B)は、基本量子化テーブルBQTを表わす圧縮データの構成を示している。この1セットの圧縮データは、Y信号用の基本量子化テーブルBQTを表わすデータと、U信号/V信号共用の基本量子化テーブルBQTを表わすデータとを含んでいる。なお、基本量子化テーブルBQTを表わすデータはハフマン符号化しておかなくてもよい。
【0073】
図18(C)は、フルカラー自然画像の圧縮データの構成を示している。圧縮データ部には、量子化レベル係数QCxを表わす符号データ(図12におけるカテゴリSSSS=16〜31の符号語)と、各画素ブロックの符号データであるブロックデータと、一様色の複数の画素ブロックを示すヌルランデータとを含んでいる。
【0074】
図18(D)に示すように、1ユニットのブロックデータは4組のY信号用データと、1組のU信号データと、1組のV信号用データとで構成されている。図19は、YUVの各信号のブロックの関係を示す説明図である。図19(A)に示すように、この実施例における1画面は、256画素×240走査線の大きさを有している。Y信号に関しては、間引きをせずに、8×8画素の画素ブロック毎にDCT変換が行なわれる。一方、U信号とV信号に関しては、図19(B)に示すように、横方向と縦方向に1/2に間引き(サブサンプリング)されて、間引き後の8×8画素のブロックに対してDCT変換が行なわれる。従って、図19(C)に示すように、Y信号の4つの画素ブロックY1〜Y4の領域がU信号とV信号の1つの画素ブロックの領域に対応している。なお、Y信号を間引きせずにU信号とV信号を間引きするのは、人間の目が輝度の変化(Y信号の変化)には比較的敏感であるが、色の変化(U信号とV信号の変化)には比較的鈍感だからである。U信号とV信号のみを間引くことによって、画質を過度に劣化させずに圧縮率を高めることができる。なお、図18(D)に示す1ユニットのブロックデータは、図19(C)に示す各領域のハフマン符号データを順に並べたものである。
【0075】
ブロックデータ内の1つの画素ブロックに対する符号データは、図18(F)に示すように、DC係数の1つのハフマン符号データと、AC係数の複数のハフマン符号データとで構成されている。DC係数のハフマン符号データは、前述したように、カテゴリSSSSのハフマン符号語HFDCと識別データIDとで構成される(図18(G))。また、AC係数のハフマン符号データは、ゼロラン長NNNNとカテゴリSSSSとの組み合わせに対するハフマン符号語HFACと、識別データIDとで構成される(図18(H))。
【0076】
量子化レベル係数QCxの符号データは、圧縮データ部の先頭と、量子化レベル係数QCxの値を変更したい画素ブロックのブロックデータの直前に挿入されている。2番目の量子化レベル係数QCxが挿入される前の複数の画素ブロックに対しては、先頭の量子化レベル係数QCxが共通に使用される。また、3番目の量子化レベル係数QCx(図示せず)が挿入される前の複数のブロックに対しては、2番目の量子化レベル係数QCxが共通に使用される。
【0077】
なお、圧縮データ部の先頭に量子化レベル係数QCxの符号語が含まれていない場合には、QCx=1であると見なされる。従って、圧縮データ部の先頭に量子化レベル係数QCxが挿入されておらず、途中に量子化レベル係数QCxが1回だけ挿入されている場合にも、量子化レベル係数QCxが2つ指定されていることと等価である。
【0078】
量子化レベル係数QCxを表わすハフマン符号は、ブロックデータの間に挿入されているので、新たな量子化レベル係数QCxが復号化された時点の次のブロックデータに対してこの新たな量子化レベル係数QCxを容易に適用することができる。また、図12に示すように、量子化レベル係数QCxの符号データはDC係数用のハフマン符号語で表わされているので、これがブロックデータの間に挿入されていても、この符号データがブロックY1用のDC係数の符号データであるか、量子化レベル係数QCxの符号データであるかを直ちに判断することが可能である。
【0079】
圧縮データ部に含まれているヌルランデータは、図18(E)に示すように、ヌルランデータであることを示すDC係数用符号語「NRL」と、ブロック数と、識別データIDとで構成されている。
【0080】
図20は、ヌルランデータによって表わされる画像を示す説明図である。図20(A)の原画像の背景BGは一様色で塗られている。図20(A)の楕円の部分は、図20(B)に示すようにすべての画素が同じ画像データ値(f(x,y)=12)を有する画素ブロックが18個連続しているものと仮定する。図20(C)は、これらの画素ブロックを表わすヌルランデータを示している。このヌルランデータは、16画素ブロック分の第1のヌルランデータNRD1と、2画素ブロック分の第2のヌルランデータNRD2を含んでいる。
【0081】
各ヌルランデータNRD1,NRD2の先頭には、ヌルランデータであることを示すDC係数用符号語「NRL」(図12のカテゴリSSSS=15の符号語「 1111011」)を有している。図18(F)に示すように、通常のブロックデータの先頭にはDC係数のハフマン符号が配置されているので、先頭にあるDC係数用符号語を復号化することによって、ヌルランデータと、ブロックデータと、量子化レベル係数QCxの符号データとを一意にかつ瞬時に識別することができる。
【0082】
図20(C)に示すように、ブロック数は、AC係数用ハフマン符号語で表わされている。図21は、AC係数用ハフマン符号テーブル(図15)のうちでヌルランデータに使用される部分を示す図である。ヌルランデータに使用される場合には、ゼロラン長NNNNは([ブロック数]−1)に等しいと設定される。また、AC係数の値は1であるとして、カテゴリSSSS=1のハフマン符号語が使用される。図20(C)に示す第1のヌルランデータNRD1におけるブロック数のデータ(NNNN/SSSS=15/1)は一様色の画素ブロックが16個連続していることを示している。また、第2のヌルランデータNRD2におけるブロック数のデータ(NNNN/SSSS=1/1)は一様色の画素ブロックが2個連続していることを示している。
【0083】
各ヌルランデータNRD1,NRD2の後端には、識別データIDが付加されている。この実施例では、ID=1に固定されている。
【0084】
ヌルランデータは、このように、20ビット程度のデータによって連続した複数の画素ブロックが一様色であることを表わすことが可能である。一方、通常のブロックデータによって一様色の1セットのブロック(図19に示すY信号を4画素ブロック、U信号,V信号を各1画素ブロック含む)を表わすには、約300〜約400ビット必要である。しかも、複数セットの画素ブロックが一様色であることを示す場合にも、各セットについて約300〜約400ビット必要である。従って、ヌルランデータを使用すれば、連続する一様色の多数の画素ブロックを表わす圧縮データのデータ量をかなり低減することが可能である。
【0085】
なお、ヌルランデータで表わされる一様色の画素ブロックの輝度信号Yや色差信号U,Vの値は、圧縮データには含まれておらず、ビデオゲームを記述するソフトウェアプログラムの中において指定されている。オペレータは、ビデオゲーム用のソフトウェアプログラムを作成する際に、一様色の画素ブロックの領域(図20(A)では背景BG)の範囲をマウス104で指定するとともに、これらのブロックの輝度や色調をキーボード103やマウス104を用いて指定する。こうすれば、例えばビデオゲーム装置20(図3)を用いてゲームを実行している途中に特定のイベントが発生した場合に、背景BGの色を時間的に変化させるなどの特殊な視覚的効果を生じさせることができる。なお、ヌルランデータを復号化する具体的な回路構成については更に後述する。
【0086】
D.逆量子化テーブル作成部の詳細構成:
図22は、図1に示す逆量子化テーブル作成部250の内部構成を示すブロック図である。逆量子化テーブル作成部250は、基本量子化テーブルBQTを記憶するRAM251と、RAM251のアドレスを生成するアドレス生成回路252と、量子化レベル係数QCxを保持するラッチ回路253と、量子化レベル係数QCxと基本量子化テーブルBQTとを乗算して量子化テーブルQTを生成する乗算ユニット254とを備えている。乗算ユニット254よって作成された量子化テーブルQTは、逆量子化部220に供給される。
【0087】
まず、CD−ROMに収納されている圧縮画像データZZがハフマン復号化部210に与えられると、基本量子化テーブルBQTの符号データが最初に復号化されてRAM251に供給される。この基本量子化テーブルBQTは、アドレス生成回路252から与えられるライトアドレスに従ってRAM251に記憶される。RAM251に記憶された基本量子化テーブルBQTは、すべての画素ブロックに対して使用される。
【0088】
アドレス生成回路252は、ハフマン復号化部210から出力されるDCT係数データQF(u,v)と同期してリードアドレスを発生し、このリードアドレスに応じてRAM251から基本量子化テーブルBQTが読み出される。一方、ハフマン復号化部210で復号化された量子化レベル係数QCxは、ラッチ回路253でラッチされて、次の量子化レベル係数QCxが与えられるまでラッチ回路253に保存される。従って、量子化レベル係数QCxが新たに供給されるまでは、複数の画素ブロックに対して同じ量子化レベル係数QCxが共通に使用される。
【0089】
図23は、逆量子化テーブル作成部250(図22)に含まれているラッチ回路253と乗算ユニット254の内部構成を示すブロック図である。ラッチ回路253は、2つのラッチ402,404で構成されている。乗算ユニット254は、同期クロック作成回路412と、AND回路414と、U信号スタート検出回路416と、V信号スタート検出回路418と、NAND回路420と、セレクタ422と、乗算器424と、クリッピング回路426と、ゼロ値修正回路428とを有している。
【0090】
図24は、図23に示す回路の動作を示すタイミングチャートである。ハフマン復号化部210(図1)で量子化レベル係数QCxが復号化されると、量子化レベル係数QCxのデータがイネーブル信号QENとともにラッチ回路253に与えられる(図24(a),(b))。第1のラッチ402はイネーブル信号QENの立ち上がりエッジで量子化レベル係数QCxをラッチして出力Q1を第2のラッチ404に供給する(図24(c))。
【0091】
図24(d)に示すように、RAM251(図22)からはY信号用の基本量子化テーブルBQTが4回読出された後に、U信号/V信号共用の基本量子化テーブルBQTが2回読出される。
【0092】
同期クロック作成回路412(図23)には、RAM251から読出される基本量子化テーブルBQTに同期して、Y信号の期間でLレベルとなり、U信号とV信号の期間ではHレベルとなるブロック識別信号UV/Yがアドレス生成回路252から与えられる(図24(e))。また、この際、イネーブル信号ENも同期クロック作成回路412に与えられる。同期クロック作成回路412は、ブロック識別信号UV/Yを反転して同期クロック信号SCK(図24(f))を生成し、これを第2のラッチ404のクロック入力端子に供給する。第2のラッチ404は、この同期クロック信号SCKの立ち上がりエッジで第1のラッチ402の出力Q1をラッチして、その出力Q2(図24(g))をセレクタ422のデータ入力端子に供給する。なお、セレクタ422の他のデータ入力端子には、固定値「1」が与えられている。
【0093】
U信号スタート検出回路416は、ブロック識別信号UV/Yと10MHzの基本クロック信号CLKとに基づいて、U信号用の基本量子化テーブルBQTのスタート時刻を示すUスタート信号USTRT(図24(h))を生成する。このUスタート信号USTRTは、ブロック識別信号UV/Yの立ち上がりエッジから100ナノ秒だけLレベルになる信号である。
【0094】
AND回路414には、6つのブロックY1〜Y4,U,Vの各期間でレベルが交互に切り替わるブロック切替信号SWTCH(図24(i))と、ブロック識別信号UV/Yとが与えられている。V信号スタート検出回路418は、AND回路414の出力と10MHzの基本クロック信号CLKとに基づいて、V信号用の基本量子化テーブルBQTのスタート時刻を示すVスタート信号VSTRT(図24(j))を生成する。このVスタート信号VSTRTは、ブロック識別信号UV/YがHレベルの期間において、ブロック切替信号SWTCHの立ち上がりエッジから100ナノ秒だけLレベルになる信号である。
【0095】
図25は、U信号スタート検出回路416とV信号スタート検出回路418の内部構成を示すブロック図である。これらの回路416,418は、どちらもDフリップフロップとNAND回路とで構成されている。U信号スタート検出回路416のDフリップフロップ432のD入力端子にはブロック識別信号UV/Yが供給されており、そのクロック入力端子には10MHzの基本クロック信号CLKが入力されている。NAND回路434の入力端子には、ブロック識別信号UV/YとDフリップフロップ432の反転出力とが与えられている。なお、ブロック識別信号UV/Yは基本クロック信号CLKに同期している。
【0096】
ブロック識別信号UV/YがLレベルの間は、Dフリップフロップ432の反転出力がHレベルなので、NAND回路434の出力USTRTはHレベルに保たれる(図24(h)参照)。ブロック識別信号UV/YがLレベルからHレベルに切り替わった直後は、NAND回路434の出力(Uスタート信号USTRT)がLレベルになり、100ナノ秒後に基本クロック信号CLKのエッジでDフリップフロップ432が入力をラッチすると、NAND回路434の出力USTRTは再びHレベルに戻る。
【0097】
V信号スタート検出回路418の動作も、U信号スタート検出回路416の動作と同じである。ただし、Dフリップフロップ436のD入力端子には、ブロック識別信号UV/Yとブロック切替信号SWTCHの論理積が与えられているので、ブロック識別信号UV/YがHレベルの期間において、ブロック切替信号SWTCHの立ち上がりエッジから100ナノ秒だけVスタート信号VSTRTがLレベルになる。
【0098】
NAND回路420(図23)には、Uスタート信号USTRTとVスタート信号VSTRTとが入力されており、その出力(選択信号SEL)はセレクタ422のセレクト入力端子に供給されている。選択信号SEL(図24(k))は、U信号用の期間の始めとV信号用の期間の始めに100ナノ秒だけHレベルになる。セレクタ422は、選択信号SELがLレベルの場合にはラッチ回路253から与えられた出力Q2をそのまま出力し、一方、選択信号SELがHレベルの場合には固定値「1」を出力する。セレクタ422の出力Q3は、乗算器424によって基本量子化テーブルBQTと乗算される。
【0099】
図24(l)に示すように、U信号用の期間の始めとV信号用の期間の始めには、セレクタ422の出力Q3は量子化レベル係数QCxの値に係わらずに必ず「1」になる。U信号用とV信号用の期間の始めの100ナノ秒の期間は、DC係数用の量子化レベルを算出するための期間である。従って、図23の回路を使用すれば、U信号とV信号に使用するDC係数用の量子化レベルと、指定された量子化レベル係数QCxとの乗算を実質的に行なわないようにすることができる。換言すれば、図23に示す回路は、図8(c),(d)に示す演算を実現する回路である。
【0100】
図23に示すように、乗算器424の出力はクリッピング回路426とゼロ値修正回路428によって修正されて最終的な量子化テーブルQTとなる。図26は、これらの2つの回路426,428の内部構成を示すブロック図である。
【0101】
クリッピング回路426は、4入力OR回路450と、8個の2入力OR回路452とで構成されている。これらの回路は、量子化レベルを9ビット(最上位ビットは符号ビット)で表現する場合の回路である。4入力OR回路450には、乗算器424(図23)から出力された14ビットのデータのうちで符号ビットD13を除く上位4ビットD9〜D12が入力されている。8個の2入力OR回路452の一方の入力端子には、4入力OR回路450の出力が与えられており、他方の入力端子には乗算器424の出力の下位8ビットD1〜D8が与えられている。上位4ビットD9〜D12の少なくとも1つの値が「1」の場合には、8つの2入力OR回路452の出力がすべて「1」になる。従って、乗算器424の出力が十進数で255以上の場合には、クリッピング回路426の出力が255に設定される。
【0102】
ゼロ値修正回路428では、クリッピング回路426内の7つのビットD2〜D8用の7つの2入力OR回路452の出力がそのまま出力される。また、これらの7つの2入力OR回路452の出力と符号ビットD13とが、8つのインバータ460にそれぞれ与えられている。8つのインバータ460の出力は8入力AND回路462に与えられており、このAND回路462の出力は2入力OR回路464に供給されている。この2入力OR回路464には、最下位ビットD1用の2入力OR回路452の出力が与えられている。この結果、乗算器424の出力の13ビットD1〜D13の値がすべて「0」の場合には、ゼロ値修正回路428は、最下位ビットの値のみが「1」で他の8ビットの値が「0」の量子化レベルQTを出力する。換言すれば、ゼロ値修正回路420は、図9(c),(d)に示す演算を実現している。
【0103】
E.ヌルランデータの復号化:
図27は、画像データ伸長装置200におけるハフマン復号化部210(図1)の内部構成を示すブロック図である。ハフマン復号化部210は、圧縮画像データZZをハフマン復号化する復号化部470と、制御部472と、セレクタ474と、DC係数レジスタ476とを備えている。
【0104】
復号化部470は、与えられた圧縮データの種類が基本量子化テーブルBQT、量子化レベル係数QCx、ブロックデータ、ヌルランデータのいずれであるかを判断し、圧縮データの種類を示す状態信号SSを制御部472に供給する。制御部472は、この状態信号SSに応じて制御信号CTL1,CTL2,CTL3を復号化部470と、セレクタ474と、ビデオゲーム装置のMPU40(図3)とにそれぞれ供給する。復号化された基本量子化テーブルBQTと量子化レベル係数QCxは、復号化部470から逆量子化テーブル作成部250に供給される。復号後の量子化されたDCT係数QF(u,v)は、復号化部470からセレクタ474に供給される。
【0105】
セレクタ474のデータ入力端子には、復号化部470から与えられたDCT係数QF(u,v)の他に、ゼロデータと、DC係数レジスタ476に登録されたDC係数QF(0,0)とが与えられている。DC係数レジスタ476には、ゲームのソフトウェアプログラムにおいて記述されている一様色の画素ブロックのDC係数QF(0,0)の値が、ビデオゲーム装置のMPU40によって書き込まれる。なお、DC係数QF(0,0)は、YUV信号に対してそれぞれ異なる値が登録される。
【0106】
ここで、図20(C)に示す2つのヌルランデータNRD1,NRD2を復号化する場合を考える。第1のヌルランデータNRD1の先頭のデータNRLが復号化部470によって検出されると、ヌルランデータであることを知らせる状態信号SSが復号化部470から制御部472に出力される。制御部472は、状態信号SSに応じて直ちに復号化部470とMPU40に制御信号CTL1,CTL2をそれぞれ出力して復号化動作を止めるように制御する。また、制御部472は、セレクタ474に制御信号CTL3を供給し、最初のブロックのDC係数として、DC係数レジスタ476に登録されているDC係数QF(0,0)を選択させる。図20(B)に示すように、原画像データf(x,y)の値が12の場合には、QF(0,0)=12がDC係数レジスタ476に登録されている。制御部472は、さらに、63個のAC係数として、すべてゼロデータを選択するようにセレクタ474を制御する。図28は、こうして作成されたDCT係数QF(u,v)を示している。
【0107】
第1のヌルランデータNRD1は、一様色のブロックが16個連続していることを示しているので、16個の画素ブロックのそれぞれについて、図28に示すDCT係数QF(u,v)が作成される。第2のヌルランデータNRD2についても同様に、2つのブロックのそれぞれについて、図28に示すDCT係数QF(u,v)が作成される。
【0108】
ヌルランデータの処理が終了すると、制御部472が復号化部470とMPU40に対して制御信号CTL1,CTL2を出力し、復号化動作を再開するよう制御する。ヌルランデータによって一様色であることが指定されている画素ブロックの輝度信号Yや色差信号U,Vの値は、MPU40からDC係数レジスタ476に書き込むDC係数の値を変更することによって容易に変更することができる。言い換えれば、ヌルランデータを利用すれば、一様色の画像領域の色を圧縮画像データ以外のデータに応じて所望の色に変更することができる。この実施例では、一様色のブロックの輝度信号Yや色差信号U,Vの値は、ビデオゲームを記述するソフトウェアプログラムの中で指定されている。
【0109】
図29は、ハフマン復号化部の他の構成を示すブロック図である。このハフマン復号化部210aでは、復号化部470から出力されたDCT係数QF(u,v)がセレクタ474をバイパスして逆量子化部220に直接与えられている。セレクタ474は、DC係数レジスタ476から与えられるDC係数QF(0,0)とゼロデータの一方を選択し、逆量子化部220をバイパスしてIDCT部230に直接供給している。制御部478は、図27と同様の3つの制御信号CTL1〜CTL3の他に、第4の制御信号CTL4をIDCT部230に出力している。
【0110】
制御部478は、圧縮データの種類を示す状態信号SSに応じて復号化部470と、MPU40と、IDCT部230とに、制御信号CTRL1,CTL2,CTL4をそれぞれ出力する。復号化部470で通常のブロックデータが復号されると、復号化されたDCT係数QF(u,v)が逆量子化部220に供給される。
【0111】
図20(C)に示す第1のヌルランデータNDR1の先頭のデータNRLが復号化部470によって検出されると、ヌルランデータであることを知らせる状態信号SSが復号化部470から制御部478に出力される。制御部478は、状態信号SSに応じて直ちに復号化部470とMPU40に制御信号CTL1,CTL2をそれぞれ出力して復号化動作を止めるように制御する。また制御部478は、セレクタ474に与える制御信号CTL3のレベルを切換えて、DC係数レジスタ476に登録されているDC係数QF(0,0)を選択させる。制御部478は、さらに、63個のAC係数として、すべてゼロデータを選択するようにセレクタ474を制御する。制御部478は、同時にIDCT部230に対して制御信号CTL4を出力し、セレクタ474の出力を選択して逆変換するように制御する。
【0112】
ヌルランデータの処理が終了すると、制御部478から復号化部470とMPU40に制御信号CTL1,CTL2が出力され、復号動作を再開するよう制御する。
【0113】
このように、図29に示す回路では、ヌルランデータの処理の際には、セレクタ474から出力されるDCT係数QF(u,v)が逆量子化部220をバイパスしてIDCT部230に直接供給されるので、逆量子化による演算誤差が生じないという利点がある。例えば、特定の色の部分を検出し透明色にするクロマキ−処理をビデオエンコーダユニット50(図3)によって行う時に、量子化による演算誤差が最小に押さえられるので、所望の色の画素ブロックを確実に透明色にすることが可能である。
【0114】
上記の実施例においては、ヌルランデータによってDC係数のみを任意に設定できるようにしたが、AC係数の所定の部分(例えばQF(1,0)とQF(0,1))に対して所望の値を設定できるようにすることも可能である。この場合には、ヌルランデータは同一の画像パターンを有する一連の画素ブロックの個数を表わす。
【0115】
F.変形例:
なお、この発明は上記実施例に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
【0116】
(1)上記実施例では直交変換として2次元DCT変換を取り上げたが、本発明には任意の直交変換(例えばK−L変換やアダマール変換)が利用可能である。また、エントロピー符号化としては、ハフマン符号化以外の任意の符号化(例えば算術符号化やMEL符号化)を利用することができる。
【0117】
(2)画像データ圧縮装置100はハードウェアで実現してもよく、また、画像データ伸長装置200をソフトウェアで実現してもよい。図30は、ソフトウェアによって図18に示す圧縮データを伸長する処理の手順を示すフローチャートである。ステップS1では、ヘッダ部の値から圧縮データの内容を判断する。圧縮データが基本量子化テーブルBQTを表わしている場合には、ステップS2において基本量子化テーブルBQTをメモリに記憶し、ステップS1に戻る。
【0118】
圧縮データが画像を表わしている場合には、ステップS3において圧縮データ部内に含まれている各データユニットの先頭データの種類が判断される。ここで、データユニットとは、図18(C)に示す量子化レベル係数QCxの符号データ、ブロックデータ、ヌルランデータのそれぞれを意味している。図18(C),(D),(E),(F)に示すように、データユニットの先頭データとしては、量子化レベル係数QCxを表わすハフマン符号語と、ブロックデータのDC係数△DCのハフマン符号語と、ヌルランを表わすハフマン符号語NRLの3種類がある。
【0119】
先頭データが量子化レベル係数QCxのハフマン符号語である場合には、ステップS4において、この量子化レベル係数QCxと基本量子化テーブルBQTを乗ずることによって量子化テーブルQTを作成する。なお、この乗算の際に、前述した特徴、すなわち、(1)乗算結果が最大値以上の量子化レベルを最大値に設定すること、(2)DC係数は量子化しないこと、(3)量子化レベル係数QCxの値が0の時にはすべての量子化レベルを1に設定すること、が実現される。ステップS4において量子化テーブルQTが作成されると、ステップS3に戻る。
【0120】
ステップS3において先頭データがDC係数△DCのハフマン符号語であると判断された場合には、ステップS5において1画素ブロック分のデータが復号化されてDCT係数QF(u,v)が得られる。ステップS6では逆量子化が行なわれ、ステップS7では、2次元DCT逆変換が行なわれる。1セットのブロックデータ(図18(D))に含まれるすべての画素ブロックについてステップS5〜S7の処理が繰り返されると、ステップS8からステップS3に戻る。
【0121】
ステップS3において、先頭データがヌルランデータであることを示すハフマン符号語NRLであると判断された場合には、ステップS9において、1画素ブロックのDC成分が予め指定された値に設定されるとともに、63個のAC成分がすべて0に設定される。ステップS10では、こうして作成されたDCT係数に対して2次元DCT逆変換が行なわれる。ヌルランデータで指定されたブロック数だけステップS9,S10の処理が繰り返されると、ステップS11からステップS3に戻る。こうして、ステップS3〜S11の処理を圧縮データ部のすべてに亘って実行することによって画像データff(x,y)が復元される。
【0122】
(3)上記実施例では、本発明をビデオゲーム装置に適用した例を示したが、本発明はあらゆる種類の画像処理装置に適用することが可能である。
【0123】
(4)上記実施例では、量子化レベル係数QCxや量子化テーブルQT内の各量子化レベルを整数としたが、これらは小数を含む数でもよい。
【0124】
【発明の効果】
以上説明したように、請求項1,11および21に記載した発明によれば、第1と第2の係数を与えるだけで量子化レベルの異なる第1と第2の量子化テーブルを作成できるので、2つの量子化テーブルを圧縮画像データに含める場合に比べて圧縮画像データのデータ量を低減することができるという効果がある。また、第2の係数が現われるまでの複数の画素ブロックに対して第1の係数が適用されるので、これらの複数の画素ブロックのそれぞれの符号データの前に第1の係数を含めておく必要がなく、従って、圧縮画像データのデータ量を低減することができるという効果がある。
【0125】
請求項2,12および22に記載した発明によれば、第1と第2の係数を第1と第2の画素ブロックにそれぞれ容易に対応づけられるという効果がある。
【0126】
請求項3,13および22に記載した発明によれば、第1と第2の係数を一意にかつ瞬時に復号することができるという効果がある。
【0128】
請求項4および14に記載した発明によれば、量子化レベルのビット数を一定値以下に保つことができるという効果がある。
【0129】
請求項5および15に記載した発明によれば、所定の位置の変換係数を逆量子化するさいに発生する誤差を低減することができるという効果がある。
【0130】
請求項6および16に記載した発明によれば、変換係数の直流成分に対する量子化レベルを変えないようにすれば、直流成分の逆量子化にともなう誤差を低減することができるという効果がある。
【0131】
請求項7および17に記載した発明によれば、各画素ブロック内の画像が互いに同一である連続した複数の画素ブロックを比較的少ないデータで表わすことができるという効果がある。
【0132】
請求項8および18に記載した発明によれば、連続した複数の画素ブロックを同一の色で塗ることができるという効果がある。
【0133】
請求項9および19に記載した発明によれば、逆量子化による誤差の発生を防止することができるという効果がある。
【0134】
請求項10に記載した発明によれば、各画素ブロック内の画像が互いに同一である連続した複数の画素ブロックを比較的少ないデータで表わすことができるという効果がある。
【0135】
請求項24に記載した発明によれば、各画素ブロック内の画像が互いに同一である連続した複数の画素ブロックを比較的少ないデータで表わすことができるという効果がある。
【図面の簡単な説明】
【図1】この発明の一実施例を適用した画像データの圧縮装置と伸長装置の機能を示すブロック図。
【図2】画像データ圧縮装置100の具体的な構成を示すブロック図。
【図3】画像データ伸長装置200の具体的な構成を示すブロック図。
【図4】原画像を示す平面図。
【図5】DCT係数F(u,v)の配列を示す説明図。
【図6】圧縮/伸長の基本動作を示す説明図。
【図7】量子化レベル係数QCxが4の場合の圧縮/伸長動作を示す説明図。
【図8】量子化においてDC成分を変更しない場合の動作を示す説明図。
【図9】量子化レベル係数QCxが0の場合の圧縮/伸長動作を示す説明図。
【図10】DC係数符号化部の機能を示すブロック図。
【図11】ハフマン符号化におけるカテゴリ化テーブルを示す図。
【図12】DC係数用のハフマン符号テーブルHTDCの一例を示す説明図。
【図13】AC係数符号化部の機能を示すブロック図。
【図14】AC係数のジグザグスキャンの順路を示す説明図。
【図15】AC係数用の2次元ハフマン符号テーブルを示す説明図。
【図16】ハフマン符号テーブルの内容を示す図。
【図17】ハフマン符号化の一例を示す説明図。
【図18】圧縮データの構成を示す説明図。
【図19】YUVの各信号のブロックの関係を示す説明図。
【図20】ヌルランデータによって表わされる画像を示す説明図。
【図21】AC係数用のハフマン符号テーブルの他の部分を示す図。
【図22】逆量子化テーブル作成部250の内部構成を示すブロック図。
【図23】ラッチ回路253と乗算ユニット254の内部構成を示すブロック図。
【図24】図23に示す回路の動作を示すタイミングチャート。
【図25】U信号スタート検出回路416とV信号スタート検出回路418の内部構成を示すブロック図。
【図26】クリッピング回路426とゼロ値修正回路428の内部構成を示すブロック図。
【図27】ハフマン復号化部210の内部構成を示すブロック図。
【図28】ヌルランデータを復号化して得られたDCT係数を示す図。
【図29】ハフマン復号化部の他の構成を示すブロック図。
【図30】ソフトウェアによって圧縮データを復号する処理の手順を示すフローチャート。
【図31】従来の画像データ圧縮装置と伸長装置を示すブロック図。
【符号の説明】
20…ビデオゲーム装置
21…ROM
24,26…ゲームパッド
28…カラーテレビ
30…ビデオ信号ケーブル
32…CD−ROMドライブ
34…スピーカ
36…SCSIバス
38…スピーカ
40…MPU
40a…演算部
40b…コントローラ
41…メインメモリ
42…ROM
43…M−BUS
45…画像信号コントロールユニット
45a…MPUI/F
45b…SCSIコントローラ
45c…AFFINコンバータ
45d…グラフィックコントローラ
45e…サウンドコントローラ
49…VDPユニット
50…ビデオエンコーダユニット
50a…ルックアップテーブル
50b…優先順位設定部
50c…ミキサー
50c…画像データ合成部
50d…スーパーインポーズ部
50e…DAC
52…音声出力ユニット
52a…ADPCM部
55…RAM
59…RAM
60…NTSCコンバータ
100…画像データ圧縮装置
101…CPU
102…メインメモリ
103…キーボード
104…マウス
105…磁気ディスク装置
106…光磁気ディスク装置
110…DCT部
120…量子化部
130…ハフマン符号化部
131…ブロック遅延部
132…加算器
133…カテゴリ化処理部
134…1次元ハフマン符号化部
135…ジグザグスキャン部
136…判定部
137…ランレングスカウンタ
138…カテゴリ化部
140…量子化テーブル作成部
150…ハフマン符号テーブルメモリ
200…画像データ伸長装置
210…ハフマン復号化部
220…逆量子化部
230…IDCT部
240…ハフマン符号テーブルメモリ
250…逆量子化テーブル作成部
251…RAM
252…アドレス生成回路
253…ラッチ回路
254…乗算ユニット
402,404…ラッチ
412…同期クロック作成回路
414…AND回路
416…U信号スタート検出回路
418…V信号スタート検出回路
420…NAND回路
422…セレクタ
424…乗算器
426…クリッピング回路
428…ゼロ値修正回路
432,436…Dフリップフロップ
434,438…NAND回路
450…4入力OR回路
452…2入力OR回路
460…インバータ
462…AND回路
464…OR回路
470…復号化部
472…制御部
474…セレクタ
476…DC係数レジスタ
478…制御部
540…画像データ圧縮装置
542…直交変換部
544…量子化部
546…エントロピー符号化部
550…画像データ伸長装置
550…伸長装置
552…逆直交変換部
554…逆量子化部
556…エントロピー復号化部
562…量子化テーブル
564…符号テーブル
BG…背景
BQT…基本量子化テーブル
CLK…基本クロック信号
D1〜D13…乗算器424の出力
D13…符号ビット
EN…イネーブル信号
f(x,y)…原画像データ
ff(x,y)…復号された画像データ
F(u,v)…元のDCT係数
FF(u,v)…復号されたDCT係数
HFAC…AC係数用ハフマン符号語
HFDC…DC係数用ハフマン符号語
HTAC…AC係数用ハフマン符号テーブル
HTDC…DC係数用ハフマン符号テーブル
HT…ハフマン符号テーブル
ID…識別データ
NNNN…ゼロラン長
NRL…ヌルランデータ
PB…画素ブロック
PX…画素
QCx…量子化レベル係数
QEN…イネーブル信号
QF…量子化されたDCT係数
QT…量子化テーブル
SCK…同期クロック信号
SEL…選択信号
SS…状態信号
SSSS…カテゴリ
SWTCH…ブロック切替信号
U,V…色差信号
USTRT…Uスタート信号
VSTRT…Vスタート信号
Y…輝度信号
ZZ…圧縮画像データ[0001]
[Industrial application fields]
The present invention relates to a method and apparatus for compressing / decompressing image data.
[0002]
[Prior art]
FIG. 31 is a block diagram showing a configuration of a conventional image data compression / decompression apparatus. The image data compression device 540 orthogonally transforms original image data for each block of M × N pixels in the orthogonal transform unit 542, then performs quantization in the quantization unit 544, and further performs encoding in the entropy coding unit 546. To create compressed image data. On the other hand, the image data decompression device 550 first decodes the compressed image data in the entropy decoding unit 556, dequantizes it in the inverse quantization unit 554, and then restores the image data in the inverse orthogonal transform unit 552. Note that the quantization unit 544 and the inverse quantization unit 554 use the same quantization table 562, and the entropy encoding unit 546 and the entropy decoding unit 556 also use the same code table 564.
[0003]
[Problems to be solved by the invention]
By the way, there is a case where one image includes a first portion that is to be restored with high image quality and a second portion that may be restored with low image quality. In such a case, the first portion is quantized using a quantization table with a small quantization level, and the second portion is quantized with a quantization table having a large quantization level. What is necessary is just to perform quantization. The quantization table is a matrix having the same size as the pixel block of image data, that is, a matrix having M rows and N columns. In the conventional image data compression / decompression apparatus, when a plurality of quantization tables are used in one image, a plurality of M rows and N columns quantization tables must be transferred from the compression apparatus 540 to the expansion apparatus 550. In other words, there is a problem of increasing the amount of compressed image data.
[0004]
Also, for simple image portions in which pixel blocks having a uniform color are continuous in the image, all M rows and N columns of orthogonal transform coefficients for these pixel blocks are entropy encoded. Therefore, there is a problem that the compressed image data representing such a simple image portion also has a considerable amount of data.
[0005]
The present invention has been made to solve the above-described problems in the prior art, and an object of the present invention is to provide a technique capable of reducing the amount of compressed image data as compared with the prior art.
[0006]
[Means and Actions for Solving the Problems]
In order to solve the above-described problem, a compressed image data decompression method according to the present invention includes:
(A) A pair of code data for a plurality of pixel blocks and a first pixel block located at the head of the plurality of pixel blocks.AssignedA first coefficient code;Arranged at an arbitrary position in the array of the plurality of pixel blocksPair with second pixel blockAssignedCompressed image data including the second coefficient codereceiveProcess,
(B) Quantized transform coefficients are generated by entropy decoding the code data, and first and second coefficients are generated by entropy decoding the first and second coefficient codes. And a process of
(C) creating the first and second quantization tables by multiplying each of the first and second coefficients by a basic quantization level of a predetermined basic quantization table;
(D) the first pixel blockTo a series of pixel blocks from 1 to the pixel block immediately before the second pixel blockInverse quantization of the quantized transform coefficient with the first quantization tableFor a series of pixel blocks from the second pixel block until a pixel block to which the next coefficient code is assigned appears.Dequantizing the quantized transform coefficient with the second quantization table to obtain a dequantized transform coefficient;
(E) obtaining the decompressed image data by performing inverse orthogonal transform on the inversely quantized transform coefficient.
[0007]
According to this stretching method,Since the first and second quantization tables having different quantization levels can be created simply by giving the first and second coefficients, the data of the compressed image data is compared with the case where the two quantization tables are included in the compressed image data. The amount can be reduced.In addition, since the first coefficient is applied to a plurality of pixel blocks until the second coefficient appears, it is necessary to include the first coefficient before the code data of each of the plurality of pixel blocks. There is no.
[0008]
The code data isBlock data which is compressed image data of each pixel block and a coefficient code representing a coefficient to be multiplied by the basic quantization table are each used as one data unit.The second pixel includes a plurality of data units arranged according to an arrangement order of the plurality of pixel blocks, and the first coefficient code is arranged immediately before the first data unit for the first pixel block. The second coefficient code may be arranged immediately before the second data unit for the block.
[0009]
In this way, the first and second coefficients can be easily associated with the first and second pixel blocks, respectively.
[0010]
The first and second coefficient codes are:Entropy codewords respectively indicating the first and second coefficients;DC component of the conversion coefficientContains an entropy codeword forCode tableIncluded inIt is preferable.
[0011]
In this way, the first and second coefficients can be decoded uniquely and instantaneously.
[0014]
In the step (C), when the multiplication result of each of the first and second coefficients and the quantization level included in the basic quantization table exceeds a predetermined maximum value, the multiplication result is A step of setting a quantization level value exceeding the maximum value equal to the maximum value may be included.
[0015]
In this way, the number of bits of the quantization level can be kept below a certain value.
[0016]
The step (C) includes a step in the basic quantization table.In placeBasic quantization levelAs it isThe first and second inverse quantization tables;In placeQuantization levelUsed asThe process of performing may be included.
[0017]
By doing so, it is possible to reduce errors that occur when the transform coefficient at a predetermined position is inversely quantized.
[0018]
Preferably, the predetermined basic quantization level is a quantization level related to a direct current component of the transform coefficient.
[0019]
If the quantization level for the DC component of the transform coefficient is not changed, the error due to the inverse quantization of the DC component can be reduced.
[0020]
The compressed image data further includes:Images in each pixel block are the same and are continuously arrangedIncluding the same pattern block data indicating the number of a plurality of pixel blocks,
Furthermore, the step (B)
With the same pattern block dataThe specified number of said consecutivePaired with multiple pixel blocksAs a commonly applied conversion factorWhen creating the quantized transform coefficient, the predetermined component of the transform coefficient is set to a predetermined value, and the value of the component of the transform coefficient other than the predetermined component is set to zero. May be provided.
[0021]
This wayThe image in each pixel blockIdentical to each otherIsA plurality of continuous pixel blocks can be represented with relatively little data.
[0022]
The predetermined component is preferably a direct current component.
[0023]
In this way, a plurality of continuous pixel blocks can be painted with the same color.
[0024]
The step (D) may include a step of omitting the inverse quantization for the transform coefficient decoded from the same pattern block data.
[0025]
By so doing, it is possible to prevent the occurrence of errors due to inverse quantization.
[0026]
Another compressed image data decompression method according to the present invention is as follows:
(A) Code data for a plurality of first pixel blocks;Images in each pixel block are the same and are continuously arrangedCompressed image data including the same pattern block data indicating the number of a plurality of second pixel blocksreceiveProcess,
(B) generating first quantized transform coefficients for the plurality of first pixel blocks by entropy decoding the code dataAnd again, With the same pattern block dataThe specified number of said consecutivePaired with multiple pixel blocksAs a commonly applied conversion factorWhen creating the quantized transform coefficient, the predetermined component of the transform coefficient is set to a predetermined value, and the value of the component of the transform coefficient other than the predetermined component is set to zero. Creating the second quantized transform coefficient by:
(C) obtaining first and second dequantized transform coefficients by dequantizing the first and second quantized transform coefficients using a quantization table;
(D) creating decompressed image data by inverse orthogonal transforming the first and second inverse quantized transform coefficients;
Is provided.
[0027]
in this way,The image in each pixel blockIdentical to each otherIsA plurality of continuous pixel blocks can be represented with relatively little data.
[0028]
The compressed image data decompression apparatus according to the present invention
Code data for a plurality of pixel blocks and a first pixel block located at the head of the plurality of pixel blocksAssignedA first coefficient code;Arranged at an arbitrary position in the array of the plurality of pixel blocksPair with second pixel blockAssignedStorage means for storing compressed image data including a second coefficient code;
Entropy decoding for generating quantized transform coefficients by entropy decoding the code data, and generating first and second coefficients by entropy decoding the first and second coefficient codes And
Inverse quantization table creating means for creating the first and second quantization tables by multiplying each of the first and second coefficients by a basic quantization level of a predetermined basic quantization table;
The first pixel blockTo a series of pixel blocks from 1 to the pixel block immediately before the second pixel blockInverse quantization of the quantized transform coefficient with the first quantization tableFor a series of pixel blocks from the second pixel block until a pixel block to which the next coefficient code is assigned appears.An inverse quantization means for obtaining an inversely quantized transform coefficient by inversely quantizing the quantized transform coefficient with the second quantization table;
Inverse orthogonal transform means for obtaining decompressed image data by performing inverse orthogonal transform on the inversely quantized transform coefficient;
Is provided.
[0029]
Another compressed image data decompression apparatus according to the present invention is
Code data for a plurality of first pixel blocks;Images in each pixel block are the same and are continuously arrangedFirst storage means for storing compressed image data including the same pattern block data indicating the number of a plurality of second pixel blocks;
Second storage means for storing a specified value for a predetermined component of the transform coefficient for the plurality of second pixel blocks;
Creating first quantized transform coefficients for the plurality of first pixel blocks by entropy decoding the code dataAnd again, With the same pattern block dataThe specified number of said consecutivePaired with multiple pixel blocksAs a commonly applied conversion factorWhen creating the quantized transform coefficient, the predetermined component of the transform coefficient is set to a predetermined value, and the value of the component of the transform coefficient other than the predetermined component is set to zero. Entropy decoding means for generating the second quantized transform coefficient by:
Inverse quantization means for obtaining first and second inverse quantized transform coefficients by inversely quantizing the first and second quantized transform coefficients using a quantization table;
Inverse orthogonal transform means for creating decompressed image data by performing inverse orthogonal transform on the first and second inverse quantized transform coefficients;
Is provided.
[0030]
The image data compression method according to the present invention comprises:
(A) A step of orthogonally transforming image data for each of a plurality of pixel blocks in an image to obtain a transform coefficient;
(B) a first coefficient for a first pixel block located at the beginning of the plurality of pixel blocks;Arranged at an arbitrary position in the array of the plurality of pixel blocksDesignating a second coefficient for the second pixel block;
(C) creating first and second quantization tables by multiplying each of the first and second coefficients by a basic quantization level of a predetermined basic quantization table;
(D)For a series of pixel blocks from the first pixel block to the pixel block immediately before the second pixel block, the transform coefficient is quantized by the first quantization table, and the second pixel block For a series of pixel blocks until a pixel block to which the next coefficient code is assigned appears, the transform coefficient is quantized with the second quantization table.Obtaining a quantized transform coefficient;
(E) Code data is created by entropy coding the quantized transform coefficients, and first and second coefficient codes are created by entropy coding the first and second coefficients. Process,
(F) creating compressed image data including the code data and the first and second coefficient codes;
Is provided.
[0031]
Since the first and second quantization tables having different quantization levels can be created simply by giving the first and second coefficients, the data of the compressed image data is compared with the case where the two quantization tables are included in the compressed image data. The amount can be reduced.
[0036]
【Example】
Hereinafter, the following items will be described in order.
A. Overall configuration and basic operation of the compression / decompression device;
B. Adjustment of the quantization table QT by the quantization level coefficient QCx;
C. Huffman coding and compressed data structure;
D. Detailed configuration of the inverse quantization table creation unit;
E. Decoding null run data
[0037]
A. Configuration and operation of compression / decompression device:
FIG. 1 is a block diagram showing functions of an image data compression apparatus 100 and decompression apparatus 200 to which an embodiment of the present invention is applied.
[0038]
The image data compression apparatus 100 includes a DCT unit 110 that performs discrete cosine transform on original image data f (x, y), and a quantization unit that quantizes a transform coefficient F (u, v) obtained by the DCT transform. 120, a Huffman encoding unit 130 that generates the compressed image data ZZ by Huffman encoding the quantized transform coefficient QF (u, v), a quantization table generating unit 140, and a Huffman code table memory 150. ing. As will be described later, the quantization table creating unit 140 creates the quantization table QT based on the basic quantization table BQT and the quantization level coefficient QCx. The compressed image data ZZ is stored in a storage medium such as a CD-ROM and supplied from the image data compression apparatus 100 to the image data expansion apparatus 200.
[0039]
The image data decompression apparatus 200 includes a Huffman decoding unit 210 that performs Huffman decoding on the compressed image data ZZ, an inverse quantization unit 220 that inversely quantizes the decoded transform coefficient QF (u, v), An IDCT unit 230 that performs discrete cosine inverse transform on the inversely quantized transform coefficient FF (u, v) to obtain image data ff (x, y), a Huffman code table memory 240, and an inverse quantization table creation unit 250 And. The inverse quantization table creating unit 250 receives the basic quantization table BQT and the quantization level coefficient QCx decoded from the compressed image data ZZ from the Huffman decoding unit 210, and creates the quantization table QT based on these. This quantization table QT is the same as the quantization table QT used in the compression apparatus 100. Further, the Huffman code table HT stored in the Huffman code table memory 240 is the same as that stored in the Huffman code table memory 150 of the compression apparatus 100.
[0040]
FIG. 2 is a block diagram showing a specific configuration of the image data compression apparatus 100. The image data compression device 100 includes a CPU 101, a main memory 102, a keyboard 103, a mouse 104, a magnetic disk device 105, and a magneto-optical disk device 106. Each processing unit 110 to 140 of the image data compression apparatus 100 shown in FIG. 1 is realized by a software program stored in the main memory 102. The basic quantization table BQT and the Huffman code table HT are stored in the magnetic disk device 105. The image data compression apparatus 100 is a workstation for creating a video game, and various programs for creating a video game are executed by the CPU 101 in addition to a software program for image data compression. The completed game program is stored in the magneto-optical disk device 106 together with the compressed image data. Then, a CD-ROM including a video game program and compressed image data is manufactured using this magneto-optical disk.
[0041]
FIG. 3 is a block diagram showing a configuration of the video game apparatus 20 including the image data decompression apparatus 200. The video game apparatus 20 includes a CD-ROM drive 32 connected via a SCSI bus 36, a microprocessor (hereinafter referred to as an MPU) 40 that supervises image processing and all processing related thereto, A main memory (hereinafter referred to as M-RAM) 41 directly connected to the MPU 40, a ROM 42 storing the BIOS program, and various units connected to the bus (M-BUS) 43 of the MPU 40, that is, an image signal control unit. 45, an image data decompression unit 200, a VDP unit 49 that outputs a specific image signal, a video encoder unit 50 that synthesizes and outputs a video signal, and an audio data output unit 52 that handles audio data.
[0042]
In the video game apparatus 20, a memory (hereinafter referred to as K-RAM) 55 connected to a local bus (K-BUS) 54 of the image signal control unit 45 and a local bus of the image data decompression unit 200 are provided. Output signals from a connected memory (hereinafter referred to as R-RAM) 251, a video memory (hereinafter referred to as V-RAM) 59 connected to the local bus of the VDP unit 49, and a video encoder unit 50 are used as normal images. An NTSC converter 60 that converts the signal (NTSC) and outputs it to the color television 28 is provided.
[0043]
The image signal control unit 45, the image data decompression unit 200, the video encoder unit 50, and the audio data output unit 52 are each configured by a logic circuit.
[0044]
FIG. 4A is a plan view showing an example of an original image that becomes a background image of the game. This original image is an image in which a natural image of a volcano is embedded in a background BG painted in a uniform color. FIG. 4B shows an enlarged part of the original image including one pixel block PB. In general, the pixel block PB can be set to include M × N pixels PX. The values of the two integers M and N are preferably 8 or 16, and in this embodiment, M = N = 8. The integers M and N may be set to different values. As will be described later, the data portion representing the background BG in the compressed image data ZZ has a special data format (null run data) indicating that pixel blocks PB of uniform color are continuous.
[0045]
The DCT unit 110 of the image data compression apparatus 100 performs two-dimensional DCT conversion for each pixel block PB according to the following formula 1.
[Expression 1]
Figure 0003673529
Here, f (x, y) is an array of 8 × 8 image data included in one pixel block PB, x and y are coordinates indicating the position of each pixel in each pixel block PB, and F (u, v) is an array of transform coefficients, and u and v are coordinates in the frequency space.
[0046]
FIG. 5 is an explanatory diagram showing an array of transform coefficients F (u, v). The conversion coefficients F (u, v) are the same 8 × 8 array as the pixel block PB. The transformation coefficient F (0, 0) at the upper left corner is called a DC component (or DC coefficient), and the other transformation coefficients are called AC components (or AC coefficients). The DC component indicates the average value of the image data in the pixel block PB. An AC component indicates a change in image data in the pixel block PB. Since there is a certain degree of correlation between the image data of adjacent pixels, the value of the low frequency component is relatively large and the value of the high frequency component is relatively small in the AC coefficient. Also, the influence of high frequency components on image quality is relatively small.
[0047]
FIG. 6 is an explanatory diagram showing basic operations of the image data compression device 100 and the image data decompression device 200. The DCT unit 110 creates a DCT coefficient F (u, v) shown in FIG.
[0048]
The quantization table creation unit 140 multiplies the basic quantization table BQT (FIG. 6C) and the quantization level coefficient QCx as shown in Equation 2 below, thereby obtaining the quantization table QT (FIG. 6D). ).
[Expression 2]
Figure 0003673529
[0049]
Since QCx = 1 in the example of FIG. 6, the quantization table QT is the same as the basic quantization table BQT.
[0050]
The quantization unit 120 linearly quantizes the DCT coefficient F (u, v) with the quantization table QT, thereby obtaining the quantized DCT coefficient QF (u, v) shown in FIG. 6B. Linear quantization is a process of performing division and rounding the division result to an integer.
[0051]
The Huffman encoding unit 130 generates compressed image data ZZ (FIG. 6 (e)) by Huffman encoding the DCT coefficient QF (u, v). The Huffman coding method will be further described later. As will be described later, the compressed image data ZZ includes first data representing the basic quantization table BQT, and second data representing the quantization level coefficient QCx and the transform coefficient QF (u, v).
[0052]
When the compressed image data ZZ is given to the image data decompression apparatus 200, the Huffman decoding unit 210 decodes the compressed image data ZZ to obtain DCT coefficients QF (u, v) (FIG. 6 (f)). Since the Huffman coding is lossless coding, the DCT coefficient QF (u, v) is a quantized DCT coefficient QF (u, v) obtained by the quantization unit 120 of the image data compression apparatus 100 (FIG. 6 ( b)). The Huffman decoding unit 210 also decodes the basic quantization table BQT (FIG. 6C) and the quantization level coefficient QCx included in the compressed image data ZZ, in addition to the DCT coefficient QF (u, v). And is provided to the inverse quantization table creation unit 250.
[0053]
The inverse quantization table creation unit 250 creates the quantization table QT (FIG. 6D) by multiplying the basic quantization table BQT and the quantization level coefficient QCx. The inverse quantization unit 220 multiplies the quantization table QT and the DCT coefficient QF (u, v) to obtain the decoded DCT coefficient FF (u, v) shown in FIG.
[0054]
The IDCT unit 230 performs the two-dimensional DCT inverse transform shown in the following Equation 3 on the DCT coefficient FF (u, v) to create restored image data ff (x, y).
[Equation 3]
Figure 0003673529
[0055]
B. Adjustment of quantization table QT by quantization level coefficient QCx:
Since the quantization table QT is created by multiplying the basic quantization table BQT and the quantization level coefficient QCx according to the equation 2, each value in the quantization table QT can be increased by increasing the value of the quantization level coefficient QCx. The quantization level can be increased. The value of the quantization level coefficient QCx is selected by the operator from a plurality of predetermined values (0 to 15) when the image data compression apparatus 100 compresses the image data.
[0056]
FIG. 7 is an explanatory diagram showing the compression / decompression operation when the quantization level coefficient QCx is designated as 4. In FIG. The quantization table creation unit 140 and the inverse quantization table creation unit 250 create the quantization table QT shown in FIG. However, in this embodiment, the maximum value of the quantization level is limited to 15, and all quantization level values at which the multiplication result is 15 or more are forcibly set to 15.
[0057]
When the DCT coefficient F (u, v) in FIG. 7A is linearly quantized using the quantization table QT shown in FIG. 7D, the DC component is 1 as shown in FIG. , DCT coefficient QF (u, v) in which all AC components are 0 is obtained. As described above, when the value of the quantization level coefficient QCx is increased, the number of zeros in the quantized DCT coefficient QF (u, v) is increased, so that the data compression rate can be increased. However, the decoded DCT coefficient FF (u, v) shown in FIG. 7 (g) shows a considerably different value from the original DCT coefficient F (u, v) shown in FIG. The deterioration in image quality is greater than when the conversion level coefficient QCx is equal to 1 (FIG. 6).
[0058]
Incidentally, since the DC component of the DCT coefficient indicates the average value of the image data in the pixel block PB, the influence on the image quality is considerably large. Therefore, it is preferable to keep the DC component quantization level the same as the value in the basic quantization table BQT regardless of the value of the quantization level coefficient QCx. FIG. 8 is an explanatory diagram showing processing in such a case, and the quantization level QT (0, 0) for the DC component is forcibly maintained at 1. When QT (0,0) = 1, the DC component of the decoded DCT coefficient FF (u, v) shown in FIG. 8 (g) becomes the original DCT coefficient F (u) shown in FIG. 8 (a). , V) is maintained at the same value as the DC component, so that the degradation of image quality can be suppressed to a relatively low level with a compression rate similar to that in the case of FIG. Note that the quantization level QT (0, 0) for the DC component is not necessarily set to 1, and any other value may be set.
[0059]
It is also possible to select 0 as the quantization level coefficient QCx. In the case of QCx = 0, as shown in FIG. 9, all quantization levels in the quantization table QT are set to 1. Since the quantized DCT coefficient QF (u, v) is the same as the original DCT coefficient F (u, v), compression / decompression can be performed with high image quality although the compression rate is small.
[0060]
In summary, the quantization table creation unit 140 and the inverse quantization table creation unit 250 have the following characteristics.
(1) The quantization table QT is created by multiplying the basic quantization table BQT and the quantization level coefficient QCx according to Equation 2.
(2) When the result of multiplication is equal to or greater than the maximum value (= 15) of the quantization level, it is set equal to the maximum value (FIGS. 6 to 8).
(3) The quantization level QT (0, 0) for the DC component is kept the same as the value in the basic quantization table BQT regardless of the value of the quantization level coefficient QCx (FIG. 8).
(4) When the quantization level coefficient QCx is 0, all quantization levels are set to 1 (FIG. 9).
[0061]
The above-described calculation for obtaining the quantization table QT is performed by a software program in the image data compression apparatus 100, and is performed by the inverse quantization table creation unit 250 configured by dedicated hardware in the image data expansion apparatus 200. . A specific circuit configuration of the inverse quantization table creation unit 250 will be further described later.
[0062]
The quantization level coefficient QCx can specify a different value for each pixel block PB using the keyboard 103 or the mouse 104 when the image data compression apparatus 100 compresses the image data.
[0063]
C. Huffman coding and compressed data structure;
The Huffman encoding unit 130 (FIG. 1) of the image data compression apparatus 100 includes a DC coefficient encoding unit and an AC coefficient encoding unit. FIG. 10A is a block diagram illustrating functions of the DC coefficient encoding unit. As shown in FIG. 10B, the block delay unit 131 and the adder 132 calculate a difference ΔDC between the DC coefficient DCi of each pixel block PB and the DC coefficient DCi−1 of the previous pixel block PB. .
[0064]
The categorization processing unit 133 obtains the category SSSS and the identification data ID corresponding to the DC coefficient difference ΔDC according to the categorization table shown in FIG. The category SSSS is a number indicating the range of DC coefficient difference ΔDC. The identification data ID is data indicating the order of the smallest value among a plurality of differences ΔDC specified by the category SSSS.
[0065]
The category SSSS is further converted into a DC coefficient Huffman code word HFDC in the one-dimensional Huffman encoding unit 134 (FIG. 10). FIG. 12 is an explanatory diagram showing an example of the Huffman code table HTDC used by the one-dimensional Huffman encoding unit 134. In this embodiment, it is assumed that original image data f (x, y) is expressed by a YUV signal (luminance signal Y and two color difference signals U and V). The Huffman code table for the DC coefficient shared by the U signal / V signal only includes code words of categories SSSS of 0 to 9. On the other hand, the DC coefficient Huffman code table for the Y signal includes code words of 15 to 31 categories SSSS in addition to 0 to 9 category SSSS code words. A Huffman codeword of SSSS = 15 indicates null run data to be described later. Null run data is data indicating that pixel blocks PB of a uniform color are continuous. The Huffman codeword of SSSS = 16 to 31 is a code indicating the value of the quantization level coefficient QCx. For example, the Huffman codeword “111110000” for SSSS = 16 indicates QCx = 0, and the Huffman codeword “111111111” for SSSS = 31 indicates QCx = 15. Note that the Huffman codeword in FIG. 12 can be uniquely decoded and instantaneously decoded for all of the categories SSSS = 1 to 9 and 15 to 31.
[0066]
FIG. 13 is a block diagram illustrating the function of the AC coefficient encoding unit in the Huffman encoding unit 130. The array of AC coefficients F (u, v) (except for u = v = 0) is first rearranged in a one-dimensional manner by the zigzag scanning unit 135. FIG. 14 is an explanatory diagram showing the route of zigzag scanning.
[0067]
The determination unit 136 determines whether or not the value of the AC coefficient rearranged in one dimension is zero. If the value of the AC coefficient is 0, the run length counter 137 converts the continuous AC coefficient of 0 to the zero run length NNNN. If the AC coefficient is not 0, the value of the AC coefficient is converted into the category SSSS and the identification data ID by the categorizing unit 138. At this time, the categorization table shown in FIG. 11 is referred to.
[0068]
The zero-run length NNNN and the category SSSS are converted into a Huffman codeword HFAC for AC coefficient by the two-dimensional Huffman encoding unit 139. FIG. 15 is an explanatory diagram showing a two-dimensional Huffman code table HTAC for AC coefficients. FIG. 16 shows an example of the Huffman code word of the part of NNNN = 0 and NNNN = 1 (the uppermost two lines in FIG. 15) in the Huffman code table HTAC. The Huffman code word “11111” of NNNN / SSSS = 0/0 indicates the end of code data for one pixel block.
[0069]
FIG. 17 is an explanatory diagram illustrating an example of Huffman coding. FIG. 17B shows encoding of the DC coefficient. Assuming that the value of the DC coefficient in the previous pixel block is 0, ΔDC = F (0,0) = 12. According to the categorization table of FIG. 11, the category SSSS of ΔDC = 12 is 4, and the identification data ID is “1100”. Further, according to the DC coefficient Huffman code table of FIG. 12, the Huffman code word HFDC of the category SSSS = 4 is “011”. Here, a Huffman code table for the Y signal is used. The Huffman code (HF + ID) for the DC coefficient is “0111100” as shown in FIG.
[0070]
FIG. 17C shows AC coefficient encoding. First, AC coefficients are arranged in a one-dimensional array by zigzag scanning. This array is converted into a zero run length NNNN and a non-zero value category SSSS (see FIG. 11). The combination of the zero run length NNNN and the category SSSS is converted into the Huffman code word HFAC by the AC coefficient Huffman code table shown in FIG. 15 and FIG. A Huffman code (HFAC + ID) is created as shown in FIG.
[0071]
FIG. 18 is an explanatory diagram showing the structure of compressed data. As shown in FIG. 18A, the entire compressed data includes a header portion, a compressed data portion, and a dummy portion. The header part has four data DFH, DFL, DLH, and DLL each having 1 byte. The first two data DFH and DFL indicate the types of data included in the compressed data portion. The data in the compressed data portion includes types such as basic quantization table BQT data, full-color natural image compressed data, and run-length image compressed data. The rear 16-bit data (DLH + DLL) of the header indicates the total data length of the compressed data portion and the dummy portion. Since the compressed data portion is variable length data including a Huffman code, the total data length with the dummy portion is adjusted to be an integral multiple of a word (= 2 bytes).
[0072]
FIG. 18B shows the structure of compressed data representing the basic quantization table BQT. This one set of compressed data includes data representing the basic quantization table BQT for the Y signal and data representing the basic quantization table BQT for sharing the U signal / V signal. Note that the data representing the basic quantization table BQT may not be Huffman encoded.
[0073]
FIG. 18C shows a configuration of compressed data of a full color natural image. The compressed data portion includes code data representing the quantization level coefficient QCx (code word of category SSSS = 16 to 31 in FIG. 12), block data that is code data of each pixel block, and a plurality of pixels of uniform color And null run data indicating a block.
[0074]
As shown in FIG. 18D, one unit of block data is composed of four sets of Y signal data, one set of U signal data, and one set of V signal data. FIG. 19 is an explanatory diagram showing the relationship between the blocks of each YUV signal. As shown in FIG. 19A, one screen in this embodiment has a size of 256 pixels × 240 scanning lines. With respect to the Y signal, DCT conversion is performed for each pixel block of 8 × 8 pixels without thinning out. On the other hand, as shown in FIG. 19B, the U signal and the V signal are thinned (subsampled) by half in the horizontal direction and the vertical direction, and the thinned 8 × 8 pixel block is obtained. DCT conversion is performed. Accordingly, as shown in FIG. 19C, the area of the four pixel blocks Y1 to Y4 of the Y signal corresponds to the area of one pixel block of the U signal and the V signal. Note that thinning the U signal and the V signal without thinning the Y signal is relatively sensitive to changes in luminance (changes in the Y signal) by the human eye, but changes in colors (the U signal and the V signal). This is because it is relatively insensitive to signal changes. By thinning out only the U signal and the V signal, the compression rate can be increased without excessively degrading the image quality. Note that one unit of block data shown in FIG. 18D is obtained by sequentially arranging the Huffman code data of each region shown in FIG.
[0075]
The code data for one pixel block in the block data is composed of one Huffman code data of a DC coefficient and a plurality of Huffman code data of an AC coefficient, as shown in FIG. As described above, the DC coefficient Huffman code data includes the category SSSS Huffman code word HFDC and the identification data ID (FIG. 18G). The AC coefficient Huffman code data is composed of the Huffman code word HFAC for the combination of the zero-run length NNNN and the category SSSS, and the identification data ID (FIG. 18H).
[0076]
The code data of the quantization level coefficient QCx is inserted immediately before the head of the compressed data portion and the block data of the pixel block whose value of the quantization level coefficient QCx is to be changed. The first quantization level coefficient QCx is commonly used for a plurality of pixel blocks before the second quantization level coefficient QCx is inserted. In addition, the second quantization level coefficient QCx is commonly used for a plurality of blocks before the third quantization level coefficient QCx (not shown) is inserted.
[0077]
Note that if the code word of the quantization level coefficient QCx is not included at the head of the compressed data portion, it is considered that QCx = 1. Therefore, even when the quantization level coefficient QCx is not inserted at the head of the compressed data portion and the quantization level coefficient QCx is inserted only once in the middle, two quantization level coefficients QCx are designated. Is equivalent to
[0078]
Since the Huffman code representing the quantization level coefficient QCx is inserted between the block data, the new quantization level coefficient for the next block data at the time when the new quantization level coefficient QCx is decoded. QCx can be easily applied. Also, as shown in FIG. 12, since the code data of the quantization level coefficient QCx is represented by a Huffman code word for the DC coefficient, even if this is inserted between block data, this code data is a block. It is possible to immediately determine whether the data is the code data of the DC coefficient for Y1 or the code data of the quantization level coefficient QCx.
[0079]
As shown in FIG. 18 (E), the null run data included in the compressed data portion includes a DC coefficient code word “NRL” indicating null run data, the number of blocks, and an identification data ID. It is configured.
[0080]
FIG. 20 is an explanatory diagram showing an image represented by null run data. The background BG of the original image in FIG. 20A is painted with a uniform color. The elliptical part in FIG. 20A is a series of 18 pixel blocks in which all pixels have the same image data value (f (x, y) = 12) as shown in FIG. 20B. Assume that FIG. 20C shows null run data representing these pixel blocks. This null run data includes first null run data NRD1 for 16 pixel blocks and second null run data NRD2 for 2 pixel blocks.
[0081]
Each null run data NRD1, NRD2 has a DC coefficient code word “NRL” (code word “1111011” of category SSSS = 15 in FIG. 12) indicating null run data at the head. As shown in FIG. 18 (F), since the Huffman code of the DC coefficient is arranged at the head of the normal block data, by decoding the code word for the DC coefficient at the head, null run data, Block data and code data of the quantization level coefficient QCx can be uniquely and instantaneously identified.
[0082]
As shown in FIG. 20C, the number of blocks is represented by an AC coefficient Huffman codeword. FIG. 21 is a diagram showing a portion used for null run data in the AC coefficient Huffman code table (FIG. 15). When used for null run data, the zero run length NNNN is set equal to ([number of blocks] -1). Further, assuming that the value of the AC coefficient is 1, a Huffman codeword of category SSSS = 1 is used. The number-of-blocks data (NNNN / SSSS = 15/1) in the first null run data NRD1 shown in FIG. 20C indicates that 16 uniform color pixel blocks are continuous. Further, the data of the number of blocks in the second null run data NRD2 (NNNN / SSSS = 1/1) indicates that two uniform color pixel blocks are continuous.
[0083]
Identification data ID is added to the rear end of each null run data NRD1, NRD2. In this embodiment, ID = 1 is fixed.
[0084]
In this way, the null run data can represent that a plurality of continuous pixel blocks have a uniform color by data of about 20 bits. On the other hand, in order to represent one set of blocks of uniform color (including 4 pixel blocks for Y signal, 1 pixel block for each of U signal and V signal) shown in FIG. is necessary. Moreover, even when a plurality of sets of pixel blocks are shown to have a uniform color, about 300 to about 400 bits are required for each set. Therefore, if null-run data is used, it is possible to considerably reduce the amount of compressed data representing a large number of continuous pixel blocks of uniform color.
[0085]
The values of the luminance signal Y and the color difference signals U and V of the pixel block of uniform color represented by the null run data are not included in the compressed data and are specified in the software program describing the video game. ing. When creating a video game software program, the operator designates the range of pixel blocks of uniform color (background BG in FIG. 20A) with the mouse 104, and the luminance and color tone of these blocks. Is specified using the keyboard 103 or the mouse 104. In this way, for example, when a specific event occurs during the execution of the game using the video game device 20 (FIG. 3), a special visual effect such as temporally changing the color of the background BG. Can be generated. A specific circuit configuration for decoding null run data will be described later.
[0086]
D. Detailed configuration of the inverse quantization table creation unit:
FIG. 22 is a block diagram showing an internal configuration of the inverse quantization table creation unit 250 shown in FIG. The inverse quantization table creation unit 250 includes a RAM 251 that stores a basic quantization table BQT, an address generation circuit 252 that generates an address of the RAM 251, a latch circuit 253 that holds a quantization level coefficient QCx, and a quantization level coefficient QCx And a basic quantization table BQT, and a multiplication unit 254 that generates a quantization table QT. The quantization table QT created by the multiplication unit 254 is supplied to the inverse quantization unit 220.
[0087]
First, when the compressed image data ZZ stored in the CD-ROM is given to the Huffman decoding unit 210, the code data of the basic quantization table BQT is first decoded and supplied to the RAM 251. The basic quantization table BQT is stored in the RAM 251 in accordance with the write address given from the address generation circuit 252. The basic quantization table BQT stored in the RAM 251 is used for all pixel blocks.
[0088]
The address generation circuit 252 generates a read address in synchronization with the DCT coefficient data QF (u, v) output from the Huffman decoding unit 210, and the basic quantization table BQT is read from the RAM 251 in accordance with the read address. . On the other hand, the quantization level coefficient QCx decoded by the Huffman decoding unit 210 is latched by the latch circuit 253 and stored in the latch circuit 253 until the next quantization level coefficient QCx is given. Therefore, until the quantization level coefficient QCx is newly supplied, the same quantization level coefficient QCx is commonly used for a plurality of pixel blocks.
[0089]
FIG. 23 is a block diagram showing the internal configuration of the latch circuit 253 and the multiplication unit 254 included in the inverse quantization table creation unit 250 (FIG. 22). The latch circuit 253 is composed of two latches 402 and 404. The multiplication unit 254 includes a synchronous clock generation circuit 412, an AND circuit 414, a U signal start detection circuit 416, a V signal start detection circuit 418, a NAND circuit 420, a selector 422, a multiplier 424, and a clipping circuit 426. And a zero value correction circuit 428.
[0090]
FIG. 24 is a timing chart showing the operation of the circuit shown in FIG. When the quantization level coefficient QCx is decoded by the Huffman decoding unit 210 (FIG. 1), the data of the quantization level coefficient QCx is supplied to the latch circuit 253 together with the enable signal QEN (FIGS. 24A and 24B). ). The first latch 402 latches the quantization level coefficient QCx at the rising edge of the enable signal QEN and supplies the output Q1 to the second latch 404 (FIG. 24C).
[0091]
As shown in FIG. 24D, after the basic quantization table BQT for the Y signal is read four times from the RAM 251 (FIG. 22), the basic quantization table BQT for sharing the U signal / V signal is read twice. Is done.
[0092]
In the synchronous clock generating circuit 412 (FIG. 23), in synchronization with the basic quantization table BQT read from the RAM 251, a block identification which becomes L level during the Y signal period and becomes H level during the U signal and V signal periods. The signal UV / Y is given from the address generation circuit 252 (FIG. 24 (e)). At this time, the enable signal EN is also given to the synchronous clock generating circuit 412. The synchronous clock generation circuit 412 inverts the block identification signal UV / Y to generate a synchronous clock signal SCK (FIG. 24 (f)), and supplies this to the clock input terminal of the second latch 404. The second latch 404 latches the output Q1 of the first latch 402 at the rising edge of the synchronous clock signal SCK, and supplies the output Q2 (FIG. 24 (g)) to the data input terminal of the selector 422. The other data input terminal of the selector 422 is given a fixed value “1”.
[0093]
The U signal start detection circuit 416, based on the block identification signal UV / Y and the basic clock signal CLK of 10 MHz, indicates the U start signal USTRT (FIG. 24 (h)) indicating the start time of the basic quantization table BQT for U signal. ) Is generated. The U start signal USTRT is a signal that becomes L level for 100 nanoseconds from the rising edge of the block identification signal UV / Y.
[0094]
The AND circuit 414 is supplied with a block switching signal SWTCH (FIG. 24 (i)) in which the level is alternately switched in each period of the six blocks Y1 to Y4, U, and V, and a block identification signal UV / Y. . Based on the output of the AND circuit 414 and the basic clock signal CLK of 10 MHz, the V signal start detection circuit 418 indicates a V start signal VSTRT indicating the start time of the basic quantization table BQT for V signal (FIG. 24 (j)). Is generated. The V start signal VSTRT is a signal that becomes L level for 100 nanoseconds from the rising edge of the block switching signal SWTCH during the period in which the block identification signal UV / Y is at H level.
[0095]
FIG. 25 is a block diagram showing the internal configuration of the U signal start detection circuit 416 and the V signal start detection circuit 418. Each of these circuits 416 and 418 is composed of a D flip-flop and a NAND circuit. The block identification signal UV / Y is supplied to the D input terminal of the D flip-flop 432 of the U signal start detection circuit 416, and the basic clock signal CLK of 10 MHz is input to the clock input terminal. The block identification signal UV / Y and the inverted output of the D flip-flop 432 are given to the input terminal of the NAND circuit 434. The block identification signal UV / Y is synchronized with the basic clock signal CLK.
[0096]
While the block identification signal UV / Y is at the L level, the inverted output of the D flip-flop 432 is at the H level, so that the output USTRT of the NAND circuit 434 is kept at the H level (see FIG. 24 (h)). Immediately after the block identification signal UV / Y switches from the L level to the H level, the output of the NAND circuit 434 (U start signal USTRT) becomes the L level, and after 100 nanoseconds, the D flip-flop 432 is detected at the edge of the basic clock signal CLK. Latches the input, the output USTRT of the NAND circuit 434 returns to the H level again.
[0097]
The operation of the V signal start detection circuit 418 is the same as the operation of the U signal start detection circuit 416. However, since the logical product of the block identification signal UV / Y and the block switching signal SWTCH is given to the D input terminal of the D flip-flop 436, the block switching signal is output during the period when the block identification signal UV / Y is at the H level. The V start signal VSTRT becomes L level for 100 nanoseconds from the rising edge of SWTCH.
[0098]
The NAND circuit 420 (FIG. 23) receives a U start signal USTRT and a V start signal VSTRT, and outputs (selection signal SEL) are supplied to the select input terminal of the selector 422. The selection signal SEL (FIG. 24 (k)) becomes H level for 100 nanoseconds at the beginning of the period for the U signal and the beginning of the period for the V signal. The selector 422 outputs the output Q2 supplied from the latch circuit 253 as it is when the selection signal SEL is at the L level, and outputs a fixed value “1” when the selection signal SEL is at the H level. The output Q3 of the selector 422 is multiplied by the basic quantization table BQT by the multiplier 424.
[0099]
As shown in FIG. 24 (l), the output Q3 of the selector 422 is always set to "1" regardless of the value of the quantization level coefficient QCx at the beginning of the U signal period and the V signal period. Become. A period of 100 nanoseconds at the beginning of the period for the U signal and the V signal is a period for calculating the quantization level for the DC coefficient. Therefore, if the circuit of FIG. 23 is used, the multiplication of the quantization level for the DC coefficient used for the U signal and the V signal and the designated quantization level coefficient QCx may be substantially prevented. it can. In other words, the circuit shown in FIG. 23 is a circuit that realizes the operations shown in FIGS.
[0100]
As shown in FIG. 23, the output of the multiplier 424 is corrected by a clipping circuit 426 and a zero value correction circuit 428 to become a final quantization table QT. FIG. 26 is a block diagram showing the internal configuration of these two circuits 426 and 428.
[0101]
The clipping circuit 426 includes a 4-input OR circuit 450 and eight 2-input OR circuits 452. These circuits are circuits when the quantization level is expressed by 9 bits (the most significant bit is a sign bit). The 4-input OR circuit 450 receives the upper 4 bits D9 to D12 excluding the sign bit D13 among the 14-bit data output from the multiplier 424 (FIG. 23). The output of the 4-input OR circuit 450 is given to one input terminal of the eight 2-input OR circuits 452, and the lower 8 bits D1 to D8 of the output of the multiplier 424 are given to the other input terminal. ing. When at least one value of the upper 4 bits D9 to D12 is “1”, the outputs of the eight 2-input OR circuits 452 are all “1”. Accordingly, when the output of the multiplier 424 is a decimal number of 255 or more, the output of the clipping circuit 426 is set to 255.
[0102]
In the zero value correction circuit 428, the outputs of the seven 2-input OR circuits 452 for the seven bits D2 to D8 in the clipping circuit 426 are output as they are. The outputs of these seven two-input OR circuits 452 and the sign bit D13 are supplied to eight inverters 460, respectively. The outputs of the eight inverters 460 are given to an 8-input AND circuit 462, and the outputs of the AND circuit 462 are supplied to a 2-input OR circuit 464. This 2-input OR circuit 464 is supplied with the output of the 2-input OR circuit 452 for the least significant bit D1. As a result, when the values of the 13 bits D1 to D13 of the output of the multiplier 424 are all “0”, the zero value correction circuit 428 has only the value of the least significant bit “1” and the value of the other 8 bits. Outputs a quantization level QT of “0”. In other words, the zero value correction circuit 420 realizes the operations shown in FIGS. 9 (c) and 9 (d).
[0103]
E. Decoding null run data:
FIG. 27 is a block diagram showing an internal configuration of the Huffman decoding unit 210 (FIG. 1) in the image data decompressing apparatus 200. The Huffman decoding unit 210 includes a decoding unit 470 that performs Huffman decoding of the compressed image data ZZ, a control unit 472, a selector 474, and a DC coefficient register 476.
[0104]
The decoding unit 470 determines whether the type of the given compressed data is a basic quantization table BQT, a quantization level coefficient QCx, block data, or null run data, and a status signal SS indicating the type of compressed data Is supplied to the control unit 472. The control unit 472 supplies the control signals CTL1, CTL2, and CTL3 to the decoding unit 470, the selector 474, and the MPU 40 (FIG. 3) of the video game device according to the state signal SS. The decoded basic quantization table BQT and quantization level coefficient QCx are supplied from the decoding unit 470 to the inverse quantization table creating unit 250. The quantized DCT coefficient QF (u, v) after decoding is supplied from the decoding unit 470 to the selector 474.
[0105]
In addition to the DCT coefficient QF (u, v) given from the decoding unit 470, zero data and the DC coefficient QF (0, 0) registered in the DC coefficient register 476 are input to the data input terminal of the selector 474. Is given. In the DC coefficient register 476, the value of the DC coefficient QF (0, 0) of the pixel block of uniform color described in the game software program is written by the MPU 40 of the video game apparatus. The DC coefficient QF (0, 0) is registered with a different value for each YUV signal.
[0106]
Here, consider a case where the two null run data NRD1 and NRD2 shown in FIG. When the first data NRL of the first null run data NRD1 is detected by the decoding unit 470, a status signal SS informing that the data is null run data is output from the decoding unit 470 to the control unit 472. The control unit 472 controls to stop the decoding operation by outputting the control signals CTL1 and CTL2 to the decoding unit 470 and the MPU 40 immediately according to the status signal SS. Further, the control unit 472 supplies the control signal CTL3 to the selector 474, and selects the DC coefficient QF (0, 0) registered in the DC coefficient register 476 as the DC coefficient of the first block. As shown in FIG. 20B, when the value of the original image data f (x, y) is 12, QF (0, 0) = 12 is registered in the DC coefficient register 476. The control unit 472 further controls the selector 474 so as to select all zero data as 63 AC coefficients. FIG. 28 shows the DCT coefficient QF (u, v) created in this way.
[0107]
Since the first null run data NRD1 indicates that 16 blocks of uniform color are continuous, the DCT coefficient QF (u, v) shown in FIG. 28 is obtained for each of the 16 pixel blocks. Created. Similarly, for the second null run data NRD2, the DCT coefficient QF (u, v) shown in FIG. 28 is created for each of the two blocks.
[0108]
When the processing of the null run data ends, the control unit 472 outputs control signals CTL1 and CTL2 to the decoding unit 470 and the MPU 40, and controls to restart the decoding operation. The values of the luminance signal Y and the color difference signals U and V of the pixel block designated as uniform color by the null run data can be easily changed by changing the value of the DC coefficient written from the MPU 40 to the DC coefficient register 476. Can be changed. In other words, if the null run data is used, the color of the uniform color image area can be changed to a desired color according to data other than the compressed image data. In this embodiment, the values of the luminance signal Y and the color difference signals U and V of the block of uniform color are specified in the software program describing the video game.
[0109]
FIG. 29 is a block diagram showing another configuration of the Huffman decoding unit. In the Huffman decoding unit 210 a, the DCT coefficient QF (u, v) output from the decoding unit 470 is directly given to the inverse quantization unit 220 bypassing the selector 474. The selector 474 selects one of the DC coefficient QF (0, 0) and zero data given from the DC coefficient register 476, bypasses the inverse quantization unit 220, and supplies it directly to the IDCT unit 230. The control unit 478 outputs a fourth control signal CTL4 to the IDCT unit 230 in addition to the three control signals CTL1 to CTL3 similar to those in FIG.
[0110]
The control unit 478 outputs control signals CTRL1, CTL2, and CTL4 to the decoding unit 470, the MPU 40, and the IDCT unit 230 in response to the state signal SS indicating the type of compressed data. When normal block data is decoded by the decoding unit 470, the decoded DCT coefficient QF (u, v) is supplied to the inverse quantization unit 220.
[0111]
When the first data NRL of the first null run data NDR1 shown in FIG. 20C is detected by the decoding unit 470, a status signal SS informing that the data is null run data is sent from the decoding unit 470 to the control unit 478. Is output. The control unit 478 controls the decoding unit 470 and the MPU 40 to output the control signals CTL1 and CTL2 immediately according to the status signal SS to stop the decoding operation. The control unit 478 switches the level of the control signal CTL3 given to the selector 474, and selects the DC coefficient QF (0, 0) registered in the DC coefficient register 476. The control unit 478 further controls the selector 474 so as to select all zero data as 63 AC coefficients. At the same time, the control unit 478 outputs a control signal CTL4 to the IDCT unit 230, and controls the output of the selector 474 to be selected and inversely converted.
[0112]
When the processing of the null run data ends, control signals CTL1 and CTL2 are output from the control unit 478 to the decoding unit 470 and the MPU 40, and control is performed so that the decoding operation is resumed.
[0113]
In this way, in the circuit shown in FIG. 29, when processing the null run data, the DCT coefficient QF (u, v) output from the selector 474 bypasses the inverse quantization unit 220 and directly passes to the IDCT unit 230. Since it is supplied, there is an advantage that an operation error due to inverse quantization does not occur. For example, when a chroma key process for detecting a specific color portion and making it transparent is performed by the video encoder unit 50 (FIG. 3), the calculation error due to quantization is minimized, so that a pixel block of a desired color can be reliably obtained. It is possible to make it transparent.
[0114]
In the above embodiment, only the DC coefficient can be arbitrarily set by the null run data. However, a desired part of the AC coefficient (for example, QF (1, 0) and QF (0, 1)) is desired. It is also possible to set the value of. In this case, the null run data represents the number of a series of pixel blocks having the same image pattern.
[0115]
F. Variation:
The present invention is not limited to the above embodiment, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.
[0116]
(1) Although the two-dimensional DCT transformation is taken up as the orthogonal transformation in the above embodiment, any orthogonal transformation (for example, KL transformation or Hadamard transformation) can be used in the present invention. As the entropy coding, any coding other than Huffman coding (for example, arithmetic coding or MEL coding) can be used.
[0117]
(2) The image data compression apparatus 100 may be realized by hardware, and the image data expansion apparatus 200 may be realized by software. FIG. 30 is a flowchart showing a procedure of processing for decompressing the compressed data shown in FIG. 18 by software. In step S1, the content of the compressed data is determined from the value of the header part. If the compressed data represents the basic quantization table BQT, the basic quantization table BQT is stored in the memory in step S2, and the process returns to step S1.
[0118]
If the compressed data represents an image, the type of head data of each data unit included in the compressed data portion is determined in step S3. Here, the data unit means each of code data, block data, and null run data of the quantization level coefficient QCx shown in FIG. As shown in FIGS. 18C, 18D, 18E, and 18F, the head data of the data unit includes a Huffman code word representing the quantization level coefficient QCx and the DC coefficient ΔDC of the block data. There are three types: a Huffman codeword and a Huffman codeword NRL representing null run.
[0119]
If the head data is a Huffman codeword of the quantization level coefficient QCx, the quantization table QT is created by multiplying the quantization level coefficient QCx and the basic quantization table BQT in step S4. In this multiplication, the above-described features, that is, (1) the quantization level at which the multiplication result is not less than the maximum value is set to the maximum value, (2) the DC coefficient is not quantized, and (3) the quantum When the value of the quantization level coefficient QCx is 0, all the quantization levels are set to 1. When the quantization table QT is created in step S4, the process returns to step S3.
[0120]
If it is determined in step S3 that the head data is a Huffman code word having a DC coefficient ΔDC, data for one pixel block is decoded in step S5 to obtain a DCT coefficient QF (u, v). In step S6, inverse quantization is performed, and in step S7, two-dimensional DCT inverse transform is performed. When the processes in steps S5 to S7 are repeated for all the pixel blocks included in one set of block data (FIG. 18D), the process returns from step S8 to step S3.
[0121]
If it is determined in step S3 that the head data is a Huffman codeword NRL indicating null run data, the DC component of one pixel block is set to a predesignated value in step S9. , 63 AC components are all set to zero. In step S10, the two-dimensional DCT inverse transform is performed on the DCT coefficient thus created. When the processes in steps S9 and S10 are repeated for the number of blocks specified by the null run data, the process returns from step S11 to step S3. In this way, the image data ff (x, y) is restored by executing the processing of steps S3 to S11 over the entire compressed data portion.
[0122]
(3) In the above embodiment, an example in which the present invention is applied to a video game apparatus has been described. However, the present invention can be applied to any kind of image processing apparatus.
[0123]
(4) In the above embodiment, the quantization level coefficient QCx and each quantization level in the quantization table QT are integers, but these may be numbers including decimals.
[0124]
【The invention's effect】
As explained above, claims 1 and11 and 21According to the invention described above, since the first and second quantization tables having different quantization levels can be created simply by giving the first and second coefficients, the two quantization tables are included in the compressed image data. Compared to the above, there is an effect that the amount of compressed image data can be reduced.In addition, since the first coefficient is applied to a plurality of pixel blocks until the second coefficient appears, it is necessary to include the first coefficient before the code data of each of the plurality of pixel blocks. Therefore, the amount of compressed image data can be reduced.
[0125]
Claim 2,12 and 22According to the invention described in (1), there is an effect that the first and second coefficients can be easily associated with the first and second pixel blocks, respectively.
[0126]
Claim 3,13 and 22According to the invention described in (1), there is an effect that the first and second coefficients can be uniquely and instantaneously decoded.
[0128]
Claim4 and 14According to the invention described in (4), there is an effect that the number of bits of the quantization level can be kept below a certain value.
[0129]
Claim5 and 15According to the invention described in (4), there is an effect that it is possible to reduce an error that occurs when the transform coefficient at a predetermined position is inversely quantized.
[0130]
Claim6 and 16According to the invention described in (4), if the quantization level for the DC component of the transform coefficient is not changed, an error due to the inverse quantization of the DC component can be reduced.
[0131]
Claim7 and 17According to the invention described inThe image in each pixel blockIdentical to each otherIsThere is an effect that a plurality of continuous pixel blocks can be represented by relatively little data.
[0132]
Claim8 and 18According to the invention described in, there is an effect that a plurality of continuous pixel blocks can be painted with the same color.
[0133]
Claim9 and 19According to the invention described in (4), it is possible to prevent the occurrence of errors due to inverse quantization.
[0134]
Claim10According to the invention described inThe image in each pixel blockIdentical to each otherIsThere is an effect that a plurality of continuous pixel blocks can be represented by relatively little data.
[0135]
Claim24According to the described invention,The image in each pixel blockIdentical to each otherIsThere is an effect that a plurality of continuous pixel blocks can be represented by relatively little data.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating functions of an image data compression apparatus and decompression apparatus to which an embodiment of the present invention is applied.
FIG. 2 is a block diagram showing a specific configuration of the image data compression apparatus 100. FIG.
FIG. 3 is a block diagram showing a specific configuration of the image data decompression apparatus 200.
FIG. 4 is a plan view showing an original image.
FIG. 5 is an explanatory diagram showing an array of DCT coefficients F (u, v).
FIG. 6 is an explanatory diagram showing a basic operation of compression / decompression.
FIG. 7 is an explanatory diagram showing a compression / decompression operation when the quantization level coefficient QCx is 4.
FIG. 8 is an explanatory diagram showing an operation when a DC component is not changed in quantization.
FIG. 9 is an explanatory diagram showing a compression / decompression operation when a quantization level coefficient QCx is zero.
FIG. 10 is a block diagram illustrating functions of a DC coefficient encoding unit.
FIG. 11 is a diagram showing a categorization table in Huffman coding.
FIG. 12 is an explanatory diagram showing an example of a Huffman code table HTDC for DC coefficients.
FIG. 13 is a block diagram showing the function of an AC coefficient encoding unit.
FIG. 14 is an explanatory diagram showing a normal path of a zigzag scan of AC coefficients.
FIG. 15 is an explanatory diagram showing a two-dimensional Huffman code table for AC coefficients.
FIG. 16 is a view showing the contents of a Huffman code table.
FIG. 17 is an explanatory diagram illustrating an example of Huffman coding.
FIG. 18 is an explanatory diagram showing a configuration of compressed data.
FIG. 19 is an explanatory diagram showing a relationship between blocks of YUV signals.
FIG. 20 is an explanatory diagram showing an image represented by null run data.
FIG. 21 is a diagram showing another part of the Huffman code table for AC coefficients.
22 is a block diagram showing an internal configuration of an inverse quantization table creation unit 250. FIG.
23 is a block diagram showing the internal configuration of a latch circuit 253 and a multiplication unit 254. FIG.
24 is a timing chart showing the operation of the circuit shown in FIG.
25 is a block diagram showing the internal configuration of a U signal start detection circuit 416 and a V signal start detection circuit 418. FIG.
26 is a block diagram showing the internal configuration of a clipping circuit 426 and a zero value correction circuit 428. FIG.
27 is a block diagram showing an internal configuration of a Huffman decoding unit 210. FIG.
FIG. 28 is a diagram showing DCT coefficients obtained by decoding null run data.
FIG. 29 is a block diagram showing another configuration of the Huffman decoding unit.
FIG. 30 is a flowchart showing a procedure of processing for decoding compressed data by software.
FIG. 31 is a block diagram showing a conventional image data compression device and decompression device.
[Explanation of symbols]
20. Video game device
21 ... ROM
24, 26 ... Gamepad
28 ... Color TV
30 ... Video signal cable
32 ... CD-ROM drive
34 ... Speaker
36 ... SCSI bus
38 ... Speaker
40 ... MPU
40a ... Calculation unit
40b ... Controller
41 ... Main memory
42 ... ROM
43 ... M-BUS
45. Image signal control unit
45a ... MPUI / F
45b SCSI controller
45c ... AFFIN converter
45d: Graphic controller
45e ... Sound controller
49 ... VDP unit
50 ... Video encoder unit
50a ... Look-up table
50b: Priority setting unit
50c ... Mixer
50c: Image data synthesis unit
50d ... Superimpose section
50e ... DAC
52 ... Audio output unit
52a ... ADPCM part
55 ... RAM
59 ... RAM
60 ... NTSC converter
100: Image data compression apparatus
101 ... CPU
102 ... Main memory
103 ... Keyboard
104 ... Mouse
105: Magnetic disk device
106: magneto-optical disk device
110 ... DCT section
120: Quantization unit
130: Huffman encoding unit
131: Block delay unit
132 ... Adder
133 ... Categorization processing unit
134 ... 1-dimensional Huffman encoding unit
135 ... Zigzag scan section
136 ... determination part
137 ... Run-length counter
138 ... Categorizing section
140 ... Quantization table creation unit
150 ... Huffman code table memory
200: Image data decompression device
210 ... Huffman decoding unit
220: Inverse quantization unit
230 ... IDCT section
240 ... Huffman code table memory
250: Inverse quantization table creation unit
251 ... RAM
252 ... Address generation circuit
253 ... Latch circuit
254 ... Multiplication unit
402, 404 ... latch
412: Synchronous clock generation circuit
414 ... AND circuit
416 ... U signal start detection circuit
418 ... V signal start detection circuit
420 ... NAND circuit
422 ... Selector
424 ... multiplier
426 ... Clipping circuit
428 ... Zero value correction circuit
432, 436 ... D flip-flop
434, 438 ... NAND circuit
450 ... 4 input OR circuit
452 ... 2-input OR circuit
460 ... Inverter
462 ... AND circuit
464 ... OR circuit
470: Decoding unit
472 ... Control unit
474 ... Selector
476 ... DC coefficient register
478 ... Control unit
540 ... Image data compression device
542 ... Orthogonal transformation unit
544: Quantization unit
546 ... Entropy encoding unit
550 ... Image data decompression device
550 ... Extension device
552 ... Inverse orthogonal transform unit
554 ... Inverse quantization unit
556 ... Entropy decoding unit
562 ... Quantization table
564 ... Code table
BG ... Background
BQT ... Basic quantization table
CLK: Basic clock signal
D1 to D13: Output of the multiplier 424
D13: Sign bit
EN: Enable signal
f (x, y) ... Original image data
ff (x, y): Decoded image data
F (u, v): Original DCT coefficient
FF (u, v): Decoded DCT coefficient
HFAC ... Huffman codeword for AC coefficient
HFDC ... Huffman codeword for DC coefficient
HTAC ... Huffman code table for AC coefficients
HTDC ... Huffman code table for DC coefficient
HT ... Huffman code table
ID: Identification data
NNNN ... Zero run length
NRL ... Null run data
PB ... Pixel block
PX ... pixel
QCx: Quantization level coefficient
QEN: Enable signal
QF: Quantized DCT coefficient
QT ... Quantization table
SCK: Synchronous clock signal
SEL ... Selection signal
SS: Status signal
SSSS ... Category
SWTCH: Block switching signal
U, V ... Color difference signal
USTRT ... U start signal
VSTRT ... V start signal
Y: Luminance signal
ZZ ... Compressed image data

Claims (18)

画像データを直交変換し、量子化し、さらにエントロピー符号化して得られた符号データを含む圧縮画像データを伸長する方法であって、
(A)複数の画素ブロックに対する符号データと、前記複数の画素ブロックの先頭に位置する第1の画素ブロックに対して割り当てられた第1の係数コードと、前記複数の画素ブロックの配列の中の任意の位置に配置された第2の画素ブロックに対して割り当てられた第2の係数コードとを含む圧縮画像データを受け取る工程と、
(B)前記符号データをエントロピー復号化することによって、量子化された変換係数を生成するとともに、前記第1と第2の係数コードをエントロピー復号化することによって第1と第2の係数を生成する工程と、
(C)前記第1と第2の係数のそれぞれと、所定の基本量子化テーブルの基本量子化レベルとを乗ずることによって、第1と第2の量子化テーブルを作成する工程と、
(D)前記第1の画素ブロックから前記第2の画素ブロックの直前の画素ブロックまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第1の量子化テーブルで逆量子化し、前記第2の画素ブロックから次の係数コードが割り当てられた画素ブロックが現れるまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第2の量子化テーブルで逆量子化することによって、逆量子化された変換係数を求める工程と、
(E)前記逆量子化された変換係数を逆直交変換することによって、伸長された画像データを求める工程と、
を備え
前記符号データは、個々の画素ブロックの圧縮画像データであるブロックデータと前記基本量子化テーブルに乗じられる係数を表す係数コードとをそれぞれ1データユニットとして前記複数の画素ブロックの配列順序に従って配列された複数のデータユニットを含むとともに、前記第1の画素ブロックに対する第1のデータユニットの直前に前記第1の係数コードが配置され、前記第2の画素ブロックに対する第2のデータユニットの直前に前記第2の係数コードが配置されており、
前記第1と第2の係数コードは、前記第1と第2の係数をそれぞれ示すエントロピー符号語であり、前記変換係数の直流成分に対する一意復号可能でかつ瞬時復号可能なエントロピー符号語を含む符号テーブルに含まれている、圧縮画像データの伸長方法。
A method of decompressing compressed image data including code data obtained by orthogonally transforming, quantizing, and entropy-coding image data,
(A) Code data for a plurality of pixel blocks, a first coefficient code assigned to a first pixel block located at the head of the plurality of pixel blocks, and an array of the plurality of pixel blocks Receiving compressed image data including a second coefficient code assigned to a second pixel block arranged at an arbitrary position;
(B) Quantized transform coefficients are generated by entropy decoding the code data, and first and second coefficients are generated by entropy decoding the first and second coefficient codes. And a process of
(C) creating the first and second quantization tables by multiplying each of the first and second coefficients by a basic quantization level of a predetermined basic quantization table;
(D) For a series of pixel blocks from the first pixel block to the pixel block immediately before the second pixel block, the quantized transform coefficient is inversely quantized by the first quantization table. For the series of pixel blocks from the second pixel block until a pixel block to which the next coefficient code is assigned appears, the quantized transform coefficients are inversely quantized using the second quantization table. To obtain a dequantized transform coefficient,
(E) obtaining decompressed image data by performing inverse orthogonal transform on the inversely quantized transform coefficient;
Equipped with a,
The code data is arranged in accordance with the arrangement order of the plurality of pixel blocks, each of which is block data which is compressed image data of each pixel block and a coefficient code representing a coefficient to be multiplied by the basic quantization table as one data unit. The first coefficient code is disposed immediately before the first data unit for the first pixel block, and includes a plurality of data units, and the second coefficient unit is immediately before the second data unit for the second pixel block. 2 coefficient codes are arranged,
The first and second coefficient codes are entropy codewords indicating the first and second coefficients, respectively, and are codes including entropy codewords that can be uniquely decoded and instantaneously decoded with respect to the DC component of the transform coefficient. A method for decompressing compressed image data included in a table .
請求項1記載の圧縮画像データの伸長方法であって、前記工程(C)は、
前記第1と第2の係数のそれぞれと前記基本量子化テーブルに含まれている量子化レベルとの乗算結果が所定の最大値を超える場合には、前記乗算結果が前記最大値を超えた量子化レベルの値を前記最大値に等しく設定する工程、
を含む圧縮画像データの伸長方法。
The compressed image data decompression method according to claim 1, wherein the step (C) includes:
When the multiplication result of each of the first and second coefficients and the quantization level included in the basic quantization table exceeds a predetermined maximum value, the quantum whose multiplication result exceeds the maximum value Setting the activation level value equal to the maximum value;
A method for decompressing compressed image data.
請求項1記載の圧縮画像データの伸長方法であって、前記工程(C)は、
前記基本量子化テーブル内の所定位置の基本量子化レベルをそのまま前記第1と第2の逆量子化テーブルの所定位置の量子化レベルとして使用する工程、
を含む圧縮画像データの伸長方法。
The compressed image data decompression method according to claim 1, wherein the step (C) includes:
Using a basic quantization level at a predetermined position in the basic quantization table as it is as a quantization level at a predetermined position in the first and second inverse quantization tables;
A method for decompressing compressed image data.
請求項3記載の圧縮画像データの伸長方法であって、
前記所定の基本量子化レベルは、前記変換係数の直流成分に関する量子化レベルである、圧縮画像データの伸長方法。
A decompression method for compressed image data according to claim 3,
The method for decompressing compressed image data, wherein the predetermined basic quantization level is a quantization level related to a DC component of the transform coefficient.
請求項1記載の圧縮画像データの伸長方法であって、
前記圧縮画像データは、さらに、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の画素ブロックの個数を示す同一パターンブロックデータを含み、
さらに、前記工程(B)は、
前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって作成する工程、
を有する圧縮画像データの伸長方法。
A decompression method of compressed image data according to claim 1,
The compressed image data further includes the same pattern block data indicating the number of a plurality of pixel blocks that are continuously arranged in the same image in each pixel block,
Furthermore, the step (B)
A predetermined component of the transform coefficient when the quantized transform coefficient is created as a transform coefficient that is commonly applied to the plurality of consecutive pixel blocks specified by the same pattern block data Creating a value specified in advance by setting the value of the component of the transform coefficient other than the predetermined component to zero,
A method for decompressing compressed image data.
請求項5記載の圧縮画像データの伸長方法であって、
前記所定の成分は直流成分である、圧縮画像データの伸長方法。
A method for decompressing compressed image data according to claim 5,
The method for decompressing compressed image data, wherein the predetermined component is a direct current component.
請求項5記載の圧縮画像データの伸長方法であって、
前記工程(D)は、前記同一パターンブロックデータから復号化された前記変換係数については前記逆量子化を省略する工程、
を含む圧縮画像データの伸長方法。
A method for decompressing compressed image data according to claim 5,
The step (D) omits the inverse quantization for the transform coefficient decoded from the same pattern block data.
A method for decompressing compressed image data.
画像データを直交変換し、量子化し、さらにエントロピー符号化して得られた符号データを含む圧縮画像データを伸長する方法であって、
(A)複数の第1の画素ブロックに対する符号データと、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の第2の画素ブロックの個数を示す同一パターンブロックデータとを含む圧縮画像データを受け取る工程と、
(B)前記符号データをエントロピー復号化することによって前記複数の第1の画素ブロックに対する第1の量子化された変換係数を作成し、また、前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって前記第2の量子化された変換係数を作成する工程と、
(C)前記第1と第2の量子化された変換係数を量子化テーブルを用いて逆量子化することによって、第1と第2の逆量子化された変換係数を求める工程と、
(D)前記第1と第2の逆量子化された変換係数を逆直交変換することによって、伸長された画像データを作成する工程と、
を備えることを特徴とする圧縮画像データの伸長方法。
A method of decompressing compressed image data including code data obtained by orthogonally transforming, quantizing, and entropy-coding image data,
(A) Code data for a plurality of first pixel blocks, and the same pattern block data indicating the number of a plurality of second pixel blocks in which the images in each pixel block are the same and are continuously arranged Receiving compressed image data including;
(B) A first quantized transform coefficient for the plurality of first pixel blocks is created by entropy decoding the code data, and the number of the consecutive numbers specified by the same pattern block data When creating the quantized transform coefficient as a transform coefficient that is commonly applied to the plurality of pixel blocks, a predetermined component of the transform coefficient is set to a predetermined value, and the predetermined Creating the second quantized transform coefficient by setting the value of the component of the transform coefficient other than the component of zero to zero;
(C) obtaining first and second dequantized transform coefficients by dequantizing the first and second quantized transform coefficients using a quantization table;
(D) creating decompressed image data by inverse orthogonal transforming the first and second inverse quantized transform coefficients;
A method for decompressing compressed image data, comprising:
画像データを直交変換し、量子化し、さらにエントロピー符号化して得られた符号データを含む圧縮画像データを伸長する装置であって、
複数の画素ブロックに対する符号データと、前記複数の画素ブロックの先頭に位置する第1の画素ブロックに対して割り当てられた第1の係数コードと、前記複数の画素ブロックの配列の中の任意の位置に配置された第2の画素ブロックに対して割り当てられた第2の係数コードとを含む圧縮画像データを記憶する記憶手段と、
前記符号データをエントロピー復号化することによって、量子化された変換係数を生成するとともに、前記第1と第2の係数コードをエントロピー復号化することによって第1と第2の係数を生成するエントロピー復号化手段と、
前記第1と第2の係数のそれぞれと、所定の基本量子化テーブルの基本量子化レベルとを乗ずることによって、第1と第2の量子化テーブルを作成する逆量子化テーブル作成手段と、
前記第1の画素ブロックから前記第2の画素ブロックの直前の画素ブロックまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第1の量子化テーブルで逆量子化し、前記第2の画素ブロックから次の係数コードが割り当てられた画素ブロックが現れるまでの一連の画素ブロックに対しては前記量子化された変換係数を前記第2の量子化テーブルで逆量子化することによって、逆量子化された変換係数を求める逆量子化手段と、
前記逆量子化された変換係数を逆直交変換することによって、伸長された画像データを求める逆直交変換手段と、
を備え
前記符号データは、個々の画素ブロックの圧縮画像データであるブロックデータと前記基本量子化テーブルに乗じられる係数を表す係数コードとをそれぞれ1データユニットとして前記複数の画素ブロックの配列順序に従って配列された複数のデータユニットを含むとともに、前記第1の画素ブロックに対する第1のデータユニットの直前に前記第1の係数コードが配置され、前記第2の画素ブロックに対する第2のデータユニットの直前に前 記第2の係数コードが配置されており、
前記第1と第2の係数コードは、前記第1と第2の係数をそれぞれ示すエントロピー符号語であり、前記変換係数の直流成分に対する一意復号可能でかつ瞬時復号可能なエントロピー符号語を含む符号テーブルに含まれている、圧縮画像データの伸長装置。
An apparatus for orthogonally transforming image data, quantizing, and further decompressing compressed image data including code data obtained by entropy coding,
Code data for a plurality of pixel blocks, a first coefficient code assigned to a first pixel block located at the beginning of the plurality of pixel blocks, and an arbitrary position in the array of the plurality of pixel blocks Storage means for storing compressed image data including a second coefficient code assigned to the second pixel block arranged in
Entropy decoding for generating quantized transform coefficients by entropy decoding the code data, and generating first and second coefficients by entropy decoding the first and second coefficient codes And
Inverse quantization table creating means for creating the first and second quantization tables by multiplying each of the first and second coefficients by a basic quantization level of a predetermined basic quantization table;
For a series of pixel blocks from the first pixel block to a pixel block immediately before the second pixel block, the quantized transform coefficient is inversely quantized with the first quantization table, and the first For a series of pixel blocks from the second pixel block until the next pixel block to which the next coefficient code is assigned appears, the quantized transform coefficient is inversely quantized using the second quantization table, An inverse quantization means for obtaining an inversely quantized transform coefficient;
Inverse orthogonal transform means for obtaining decompressed image data by performing inverse orthogonal transform on the inversely quantized transform coefficient;
Equipped with a,
The code data is arranged in accordance with the arrangement order of the plurality of pixel blocks, each of which is block data which is compressed image data of each pixel block and a coefficient code representing a coefficient to be multiplied by the basic quantization table as one data unit. together comprising a plurality of data units, wherein the first coefficient code just before the first data unit for the first pixel block is located, before SL just before the second data units for said second pixel blocks A second coefficient code is arranged,
The first and second coefficient codes are entropy codewords indicating the first and second coefficients, respectively, and are codes including entropy codewords that can be uniquely decoded and instantaneously decoded with respect to the DC component of the transform coefficient. An apparatus for decompressing compressed image data included in a table .
請求項9記載の圧縮画像データの伸長装置であって、前記逆量子化テーブル作成手段は、
前記第1と第2の係数のそれぞれと前記基本量子化テーブルに含まれている量子化レベルとの乗算結果が所定の最大値を超える場合には、前記乗算結果が前記最大値を超えた量子化レベルの値を前記最大値に等しく設定するクリッピング手段、
を含む圧縮画像データの伸長装置。
The compressed image data decompression apparatus according to claim 9, wherein the inverse quantization table creating means includes:
When the multiplication result of each of the first and second coefficients and the quantization level included in the basic quantization table exceeds a predetermined maximum value, the quantum whose multiplication result exceeds the maximum value Clipping means for setting the value of the activation level equal to the maximum value;
An apparatus for decompressing compressed image data.
請求項9記載の圧縮画像データの伸長装置であって、前記逆量子化テーブル作成手段は、
前記基本量子化テーブル内の所定位置の基本量子化レベルをそのまま前記第1と第2の逆量子化テーブルの所定位置の量子化レベルとして使用する手段、
を含む圧縮画像データの伸長装置。
The compressed image data decompression apparatus according to claim 9, wherein the inverse quantization table creating means includes:
Means for directly using a basic quantization level at a predetermined position in the basic quantization table as a quantization level at a predetermined position in the first and second inverse quantization tables;
An apparatus for decompressing compressed image data.
請求項11記載の圧縮画像データの伸長装置であって、
前記所定の基本量子化レベルは、前記変換係数の直流成分に関する量子化レベルである、圧縮画像データの伸長装置。
A decompression device for compressed image data according to claim 11,
The apparatus for decompressing compressed image data, wherein the predetermined basic quantization level is a quantization level related to a DC component of the transform coefficient.
請求項9記載の圧縮画像データの伸長装置であって、
前記圧縮画像データは、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の画素ブロックの個数を示す同一パターンブロックデータを含み、
さらに、前記エントロピー復号化手段は、
前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって作成する手段、
を有する圧縮画像データの伸長装置。
An apparatus for decompressing compressed image data according to claim 9,
The compressed image data includes the same pattern block data indicating the number of a plurality of pixel blocks that are continuously arranged in the same image in each pixel block,
Further, the entropy decoding means includes
A predetermined component of the transform coefficient when the quantized transform coefficient is created as a transform coefficient that is commonly applied to the plurality of consecutive pixel blocks specified by the same pattern block data Means for setting by setting the value of the component of the transform coefficient other than the predetermined component to zero,
An apparatus for decompressing compressed image data.
請求項13記載の圧縮画像データの伸長装置であって、
前記所定の成分は直流成分である、圧縮画像データの伸長装置。
An apparatus for decompressing compressed image data according to claim 13,
An apparatus for decompressing compressed image data, wherein the predetermined component is a direct current component.
請求項13記載の圧縮画像データの伸長装置であって、
前記エントロピー復号化手段は、前記同一パターンブロックデータから復号化された前記変換係数を、前記逆量子化手段をバイパスして前記逆直交変換手段に供給する手段、
を含む圧縮画像データの伸長装置。
An apparatus for decompressing compressed image data according to claim 13,
The entropy decoding means supplies the transform coefficient decoded from the same pattern block data to the inverse orthogonal transform means, bypassing the inverse quantization means;
An apparatus for decompressing compressed image data.
画像データを直交変換し、量子化し、さらにエントロピー符号化して得られた符号データを含む圧縮画像データを伸長する装置であって、
複数の第1の画素ブロックに対する符号データと、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の第2の画素ブロックの個数を示す同一パターンブロックデータとを含む圧縮画像データを記憶する第1の記憶手段と、
前記複数の第2の画素ブロックに関する変換係数の所定の成分に対する指定値を記憶する第2の記憶手段と、
前記符号データをエントロピー復号化することによって前記複数の第1の画素ブロックに対する第1の量子化された変換係数を作成し、また、前記同一パターンブロックデータで指定された個数の前記連続した複数の画素ブロックに対して共通して適用される変換係数として前記量子化された変換係数を作成する際に、前記変換係数の所定の成分を予め指定された値に設定するとともに、前記所定の成分以外の前記変換係数の成分の値をゼロに設定することによって前記第2の量子化された変換係数を作成するエントロピー復号化手段と、
前記第1と第2の量子化された変換係数を量子化テーブルを用いて逆量子化することによって、第1と第2の逆量子化された変換係数を求める逆量子化手段と、
前記第1と第2の逆量子化された変換係数を逆直交変換することによって、伸長された画像データを作成する逆直交変換手段と、
を備えることを特徴とする圧縮画像データの伸長装置。
An apparatus for orthogonally transforming image data, quantizing, and further decompressing compressed image data including code data obtained by entropy coding,
Compressed image including code data for a plurality of first pixel blocks and the same pattern block data indicating the number of a plurality of second pixel blocks in which the images in each pixel block are the same and are continuously arranged First storage means for storing data;
Second storage means for storing a specified value for a predetermined component of the transform coefficient for the plurality of second pixel blocks;
A first quantized transform coefficient for the plurality of first pixel blocks is generated by entropy decoding the code data, and the number of the plurality of consecutive plurality specified by the same pattern block data When creating the quantized transform coefficient as a transform coefficient that is commonly applied to pixel blocks, a predetermined component of the transform coefficient is set to a predetermined value, and other than the predetermined component Entropy decoding means for creating the second quantized transform coefficient by setting the value of the component of the transform coefficient to zero,
Inverse quantization means for obtaining first and second inverse quantized transform coefficients by inversely quantizing the first and second quantized transform coefficients using a quantization table;
Inverse orthogonal transform means for creating decompressed image data by performing inverse orthogonal transform on the first and second inverse quantized transform coefficients;
An apparatus for decompressing compressed image data, comprising:
画像データの圧縮方法であって、
(A)画像データを画像内の複数の画素ブロック毎に直交変換して変換係数を求める工程と、
(B)前記複数の画素ブロックの先頭に位置する第1の画素ブロックに対する第1の係数と、前記複数の画素ブロックの配列の中の任意の位置に配置された第2の画素ブロックに対する第2の係数とを指定する工程と、
(C)前記第1と第2の係数のそれぞれと所定の基本量子化テーブルの基本量子化レベルとを乗ずることによって、第1と第2の量子化テーブルを作成する工程と、
(D)前記第1の画素ブロックから前記第2の画素ブロックの直前の画素ブロックまでの一連の画素ブロックに対しては前記変換係数を前記第1の量子化テーブルで量子化し、前記第2の画素ブロックから次の係数コードが割り当てられた画素ブロックが現れるまでの一連の画素ブロックに対しては前記変換係数を前記第2の量子化テーブルで量子化することによって、量子化された変換係数を求める工程と、
(E)前記量子化された変換係数をエントロピー符号化することによって符号データを作成するとともに、前記第1と第2の係数をエントロピー符号化することによって第1と第2の係数コードを作成する工程と、
(F)前記符号データと前記第1と第2の係数コードとを含む圧縮画像データを作成する工程と、
を備え
前記符号データは、個々の画素ブロックの圧縮画像データであるブロックデータと前記基本量子化テーブルに乗じられる係数を表す係数コードとをそれぞれ1データユニットとして前記複数の画素ブロックの配列順序に従って配列された複数のデータユニットを含むとともに、前記第1の画素ブロックに対する第1のデータユニットの直前に前記第1の係数コードを含み、前記第2の画素ブロックに対する第2のデータユニットの直前に前記第2の係数コードを含み、
前記工程(E)は、
前記第1の係数と前記第2の係数と前記変換係数の直流成分とに対する一意復号可能でかつ瞬時復号可能なエントロピー符号語をそれぞれ含む符号テーブルを用いて、前記第1と第2の係数をエントロピー符号化する工程を含む、画像データの圧縮方法。
A method for compressing image data,
(A) A step of orthogonally transforming image data for each of a plurality of pixel blocks in an image to obtain a transform coefficient;
(B) a first coefficient for the first pixel block located at the head of the plurality of pixel blocks, and a second coefficient for the second pixel block arranged at an arbitrary position in the array of the plurality of pixel blocks. Specifying a coefficient of
(C) creating first and second quantization tables by multiplying each of the first and second coefficients by a basic quantization level of a predetermined basic quantization table;
(D) For a series of pixel blocks from the first pixel block to a pixel block immediately before the second pixel block, the transform coefficient is quantized by the first quantization table, and the second For a series of pixel blocks from the pixel block until the next pixel block to which the next coefficient code is assigned appears, the quantized transform coefficient is obtained by quantizing the transform coefficient with the second quantization table. The desired process;
(E) Code data is created by entropy coding the quantized transform coefficients, and first and second coefficient codes are created by entropy coding the first and second coefficients. Process,
(F) creating compressed image data including the code data and the first and second coefficient codes;
Equipped with a,
The code data is arranged in accordance with the arrangement order of the plurality of pixel blocks, each of which is block data, which is compressed image data of each pixel block, and a coefficient code representing a coefficient to be multiplied by the basic quantization table. A plurality of data units, including the first coefficient code immediately before the first data unit for the first pixel block, and the second data unit immediately before the second data unit for the second pixel block. Including the coefficient code
The step (E)
Using the code table including entropy codewords that can be uniquely decoded and instantaneously decoded for the first coefficient, the second coefficient, and the DC component of the transform coefficient, the first and second coefficients are A method for compressing image data, including a step of entropy encoding .
請求項17記載の画像データの圧縮方法であって、前記工程(E)は、各画素ブロック内の画像が同一であるとともに連続して配列されている複数の画素ブロックの個数を示す同一パターンブロックデータを作成する工程を含み、
前記工程(F)は、前記符号データおよび前記第1と第2の係数コードとともに、前記同一パターンブロックデータを含む圧縮画像データを作成する工程を含む画像データの圧縮方法。
18. The image data compression method according to claim 17, wherein the step (E) includes the same pattern block indicating the number of a plurality of pixel blocks in which the images in each pixel block are the same and are continuously arranged. Including the process of creating data,
The method (F) includes a step of creating compressed image data including the same pattern block data together with the code data and the first and second coefficient codes.
JP26581293A 1992-09-28 1993-09-28 Image data compression / decompression method and apparatus therefor Expired - Fee Related JP3673529B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26581293A JP3673529B2 (en) 1992-09-28 1993-09-28 Image data compression / decompression method and apparatus therefor

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP25839892 1992-09-28
JP4-258398 1992-09-28
JP6683193 1993-03-25
JP5-66831 1993-03-25
JP26581293A JP3673529B2 (en) 1992-09-28 1993-09-28 Image data compression / decompression method and apparatus therefor

Publications (2)

Publication Number Publication Date
JPH07123413A JPH07123413A (en) 1995-05-12
JP3673529B2 true JP3673529B2 (en) 2005-07-20

Family

ID=27299273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26581293A Expired - Fee Related JP3673529B2 (en) 1992-09-28 1993-09-28 Image data compression / decompression method and apparatus therefor

Country Status (1)

Country Link
JP (1) JP3673529B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3475985B2 (en) * 1995-11-10 2003-12-10 ソニー株式会社 Information encoding apparatus and method, information decoding apparatus and method
US7483581B2 (en) 2001-07-02 2009-01-27 Qualcomm Incorporated Apparatus and method for encoding digital image data in a lossless manner
US6650784B2 (en) * 2001-07-02 2003-11-18 Qualcomm, Incorporated Lossless intraframe encoding using Golomb-Rice
US7630563B2 (en) * 2001-07-19 2009-12-08 Qualcomm Incorporated System and method for decoding digital image and audio data in a lossless manner
JP4236489B2 (en) 2003-03-14 2009-03-11 三洋電機株式会社 Image processing device
EP2779646A4 (en) * 2011-11-07 2015-08-19 Samsung Electronics Co Ltd Inverse transformation method for clipping data of inverse quantization, inverse transformation during video decoding step, and device therefor

Also Published As

Publication number Publication date
JPH07123413A (en) 1995-05-12

Similar Documents

Publication Publication Date Title
KR100287624B1 (en) Image data compression, decompression method and device
US6333951B1 (en) Image processing system
US6643408B2 (en) Image coding and decoding apparatus, method of image coding and decoding, and recording medium for recording program for image coding and decoding
JP2646169B2 (en) Video compression and decompression methods
JP3830009B2 (en) Data processing system and color conversion method
JPH06326615A (en) Method and equipment for decoding code stream comprising variable-length codes
JPH06326996A (en) Method and equipment for decoding compressed video data
JPH1146363A (en) Symbol-decoding method and device thereof
JP3189031B2 (en) Data rate conversion method and apparatus
KR100944928B1 (en) Apparatus and method for encoding and computing a discrete cosine transform using a butterfly processor
JPH06237386A (en) Picture processing unit
KR100329874B1 (en) Image Processing
JP3673529B2 (en) Image data compression / decompression method and apparatus therefor
US20210250575A1 (en) Image processing device
US6370193B1 (en) MPEG data compression and decompression using adjacent data value differencing
US5784011A (en) Multiplier circuit for performing inverse quantization arithmetic
JPH1175183A (en) Image signal processing method and device and storage medium
JP2001145106A (en) Device and method for compressing image
JPH06225213A (en) Method and device or processing picture
US20070154102A1 (en) Image decompression system, method and program
JP3260925B2 (en) Image processing device
JP3110255B2 (en) Character data compression processing apparatus and character data compression method
JPH077732A (en) Picture processor
JP3132171B2 (en) Decoded image decoding device
JP2735728B2 (en) Variable length code decoding circuit

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040303

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20040309

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: 20050329

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050425

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees