JP3660136B2 - Encoding / decoding device - Google Patents
Encoding / decoding device Download PDFInfo
- Publication number
- JP3660136B2 JP3660136B2 JP22970598A JP22970598A JP3660136B2 JP 3660136 B2 JP3660136 B2 JP 3660136B2 JP 22970598 A JP22970598 A JP 22970598A JP 22970598 A JP22970598 A JP 22970598A JP 3660136 B2 JP3660136 B2 JP 3660136B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- processing
- unit
- encoding
- storage unit
- 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
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、画像データなどの圧縮/伸長のための符号化復号化装置に係り、特に、ウェーブレット変換を利用する符号化復号化装置に関する。
【0002】
【従来の技術】
データ圧縮は、大量のデータの蓄積や伝送のために非常に有用なツールである。例えば、文書のファクシミリ伝送、ワールドワイドウェブのような画像の伝送に要する時間は、圧縮を使って画像の再生に必要とされるビット数を減らすと、飛躍的に短縮される。
【0003】
従来より、多くの様々なデータ圧縮手法が存在している。最も広く普及している圧縮方式としてJPEG(Joint Photographic Experts Group)がある。JPEGにおいては、入力シンボル又は輝度データは量子化されてから出力符号語へ変換される。量子化は、データの重要な情報を保存する一方、重要でない情報を除去することを目的としている。量子化に先立ちエネルギー集中をするために変換が用いられるが、JPEGでは、この変換としてDCT(Discrete Cosine
Transform)が用いられる。ところが、DCTを用いるJPEGに対し様々な欠点が指摘されている。例えば、ブロックノイズやモスキートノイズ(蚊が飛んでいるように見えるところから、そのように呼ばれる)である。画像信号処理において、それらの欠点を解消できる、効率的かつ高精度のデータ圧縮符号化方式を追求することに関心が集中している。そのような方式の一つが、ウェーブレット(wavelet)ピラミッド処理方式である。
【0004】
画像データのような2次元信号にウェーブレット変換を適用する場合には、入力信号を、水平方向低域通過型フィルタHL(Horizontal Low)及び水平方向高域通過型フィルタHH(Horizontal High)を使用して水平方向低域信号(S(smooth)係数)及び水平方向高域信号(D(detail)係数)に分離し、さらにS係数及びD係数に対して垂直方向低域通過型フィルタVL(Vertical Low)及び垂直方向高域通過型フィルタVH(Vertical High)をそれぞれ使用して水平方向低域−垂直方向低域信号(SS係数)、水平方向低域−垂直方向高域信号(SD係数)、水平方向高域−垂直方向低域信号(DS係数)、及び水平方向高域−垂直方向高域信号(DD係数)に分離する。以上の一連の処理をレベルと呼び、1回の水平処理と垂直処理を行った出力をレベル1の出力と呼ぶ。さらに、以上の4種類の信号を周波数帯信号と呼ぶ。レベル2以上の出力を希望するときは、この処理がSS係数に対して再帰的に行われる。レベル2の出力では、SS係数と、1SD係数及び2SD係数、1DS係数及び2DS係数、1DD係数及び2DD係数、の7つの周波数帯信号が得られる。以上の説明では、まず水平方向にフィルタを適用し、次に垂直方向にフィルタを適用したが、その順序は逆でもよい。
【0005】
以上の過程を経て得られた各周波数帯信号が符号化部で符号化される。符号化は、周波数帯信号毎にビット単位で行われる。ある周波数帯信号の、一番最初の画素の最上位ビット(MSB)が処理の対象となる。この画素自身の状態と、周辺の画素の状態及び1つ上のレベルの状態が参照され、出力が決定される。次に2番目の画素のMSBが処理の対象となるのであるが、この際は一番最初に処理された画素の状態も参照される。以下、符号化されるべき領域に対して一連の処理が終了すると、一番最初の画素のMSBの次位のビット(MSB−1)が処理の対象となる。この際は、同じビット深さの周辺画素の状態に加えMSBの状態も参照される。このようにして、符号化されるべき状態に対し最下位ビット(LSB)まで符号化が行われる。符号化データに対する復号化も、ほぼ同じ手順を経て行われる。
【0006】
図14に、レベル4までの処理を行う場合の従来の構成を示した。図中、1000はウェーブレット変換部、1001はインターフェース、1002はフレームメモリ、1003は符号化復号化部である。
【0007】
ウェーブレット変換部1000において、filter1H,filter2H,filter3H,filter4Hは、水平方向低域通過型フィルタHL及び水平方向高域通過型フィルタHHを含む水平方向フィルタである。これらのフィルタ名中の数字1〜4はレベルを表し、Hは水平方向フィルタであることを意味する。同様に、filter1V1とfilter1V2、filter2V1とfilter2V2、filter3V1とfilter3V2、filter4V1とfilter4V2は、垂直方向低域通過型フィルタVL及び垂直方向高域通過型フィルタVHを含む垂直方向フィルタである。これらのフィルタ名中のVは垂直方向フィルタであることを意味し、Vの前の数字1〜4はレベルを表し、Vの後の数字1は水平方向低域信号(S係数)を入力とするフィルタであることを示し、Vの後の数字2は水平方向高域信号(D係数)を入力とするフィルタであることを示す。以上のフィルタはどのような構成のものでもよいが、以下の説明では、水平方向低域通過型フィルタHL及び垂直方向低域通過型フィルタVLとして、2組のデータを用いて演算を行う2タップのフィルタを使用するものとする。また、水平方向高域通過型フィルタHH及び垂直方向高域通過型フィルタVHとして、低域通過形フィルタHLまたはVLの出力であるS係数又はD係数のうち、現在の位置と、1つ前及び1つ後の合計3組のデータを用いて演算を行う6タップのフィルタを使用するものとする。
【0008】
符号化復号化部1003は、図15に示すように、処理部1010、記憶部1011、制御部1012から構成される。記憶部1011は、対象となる周波数帯信号を保持する記憶要素B1014、対象となる周波数帯信号に対する、1つ上のレベルの周波数帯信号を保持する記憶要素A1013、及び、これら記憶要素に対するアドレス生成部1015から構成される。記憶要素A1013と記憶要素B1014は、nビットの深さを持ち、高速処理が必要であればビット単位での読み出し又は書き込みが可能なような構成となっており、高速処理が必要でなければ、ワード単位で読み出しを行い、対象となるビットを書き込み、再びワード単位で書き込みが行われるような構成となっている。
【0009】
前述のフィルタを用いた場合のウェーブレット変換部1000での処理の例を図16に示す。但し、この図におけるデータのマッピングは演算の方法を説明するためのものであり、実際のメモリへのマッピングは例えば図18から図21に示すようになることに注意されたい。
【0010】
図16の(a)は水平方向フィルタの処理を説明するもので、[00]は0ライン目の0画素目のデータを意味し、[12]は1ライン目の2画素目のデータを意味する(このようにライン、画素とも0番目から数えるものとする)。水平方向低域通過型フィルタHLの0画素目の出力[S00]は、データ[00]及びデータ[01]から求められ、また、1画素目の出力[S01]はデータ[02]及びデータ[03]から求められる。これに対し、水平方向高域通過型フィルタHHの0画素目の出力[D00]は、データ[00]の2つ前及び1つ前のデータ(実在しない)と、データ[00]と、データ[01]と、データ[02]と、データ[03]とから求められる。ここで、実在しないデータ[00]の2つ前と1つ前のデータを得るため、ミラーと呼ばれる処理を施す。具体的には、データを鏡像関係で折り返す処理を行う。これにより、2つ前と1つ前のデータはデータ[01]とデータ[00]となる。このようにして、[D00]は6画素のデータから計算される。
【0011】
図16の(b)は垂直方向フィルタの処理を説明している。この処理は、水平方向フィルタ処理によるS係数及びD係数を用いて垂直方向に行われる。実在しない係数は、水平方向フィルタの処理の場合と同様にミラー処理が施される。
【0012】
図17はフレームメモリ1002にラスタ順に格納されたイメージデータを示す。図18乃至図21に、ウェーブレット処理のレベル2までの演算結果の格納方法を例示する。ウェーブレット変換部1000は、最初に、図17に示すように格納されたイメージデータをフレームメモリ1002から読み出して水平処理を行い、その結果を再びフレームメモリ1002に書き込む。この書き込みの際に、未処理のデータに上書きしてしまわないように、図18に示すようなマッピングでS係数及びD係数を書き込んでいく。図18において、[1S00]はレベル1のアドレス00のS係数を意味する。図19垂直処理を行った後の各係数を書き込む際のマッピングの例を示す。ここまでがレベル1の各係数の格納方法である。図20はレベル2の水平方向の各係数の格納方法の例を示す。レベル2の処理は1SS係数に対してのみ行われるため、網掛けされた部分のデータは用いられないことに注意されたい。ついで、図21に示すようなマッピングで、レベル2の各係数が格納され、レベル2の処理が終了する。以上の処理がレベル4まで繰り返される。
【0013】
図22は、図14に示す構成でのタイミングチャートである。ただし、このタイミングチャートは処理手順の説明のために用いるものであり、横軸(時間軸)のスケールはリニアでないことに注意されたい。また、以下の説明では、画素数もしくはライン数を0画素目もしくは0ライン目、というように0から数える。入力されるイメージデータ(ラスタデータ)は32画素×32ライン(0画素目から31画素まで、0ライン目から31ライン目)であり、1つのデータの区切り(×=×)が1ラインに相当するものとする。
【0014】
時刻t0から、0ライン目のデータが0画素目から順次入力され、1画素目が入力されるとfilter1Hより0画素目のデータ[1S00]が出力される。ついでデータ[1S01]が出力されると、D係数の計算に必要となる3組のS係数([1S00],[1S00],[1S01])が揃い(1つ前のデータはミラー処理により得られる)、D係数[1D00]が出力される。これが1ライン分、繰り返される。なお、タイミングチャート上では1ラインの時間単位で示されているが、拡大すれば画素単位でのずれが生じていることに注意されたい。
【0015】
時刻t1から1ライン目のデータの入力が始まり、filter1Hより[1S10]、[1D10]、とS係数及びD係数が順次出力される。[1S10]が出力された時点で垂直方向フィルタのfilter1V1より[1SS00]が、filter1V2より[1DS00]が出力される。次に、[1S11]が出力された時点でfilter1V1及びfilter1V2においてD係数の計算に必要な3組のデータが揃う。すなわち、filter1V1においては[1S10],[1S10],[1S11]、filter1V2においては[1D10],[1D10],[1D11]が揃い(1つ前のデータはミラー処理により得られる)、レベル1の出力データ[1SS00],[1SD00],[1DS00],[1DD00]が得られる。これが1ライン分繰り返される。
【0016】
時刻t2で、2Vの1ライン目の入力が開始されて2Vの処理が始まる。以下、同様のタイミング関係で時刻t9まで処理が繰り返され、レベル4までの各周波数帯信号が出力される。これら各データはフレームメモリ1002に書き込まれる。
【0017】
フレームメモリ1002に書き込まれた各周波数帯信号は、符号化復号化部1003によって符号化される。符号化復号化部1003では、画像信号の隣接画素の相関、特に同一ビットプレーン内での相関が高いという特性を活かして圧縮率を上げている。このため、符号化の際には、あるまとまった領域のデータをビット単位(ある画素のデータの、任意の1ビット)のデータを扱う必要がある。画像データのサイズは通常、非常に大きい(数MBに及ぶ場合がある)ので、ウェーブレット処理終了後のデータは一旦フレームメモリ1002に書き込む必要がある。ところが、フレームメモリ1002ではビット単位での読み出し又は書き込みは不可能である。そこで、符号化復号化部1003は、内部に用意されたビット単位での処理が可能な記憶要素1013,1014にフレームメモリ1002からデータをロードして符号化処理を行い、符号化データcodeを出力する。復号化は以上に述べた動作のほぼ逆順の動作で行われる。
【0018】
次に、ウェーブレット変換のための処理時間について説明する。ここでは、ウェーブレット変換部1000により生成される各周波数帯信号のストレージ、すなわち図14中のフレームメモリ1002として、一般的な半導体メモリが用いられるものとする。
【0019】
図22のタイミングチャートを用いて説明したように、各周波数帯信号は同時刻にパラレルに出力されるため、外部メモリへの書き込みもパラレルに行われなければならないが、通常用いられる半導体メモリでは1時刻に読み出しまたは書き込みをすることができるのは1データだけである。図22の左下のrangeは、時刻t0からt9に対応する、1H,1V,...,4Vの各処理が占める処理時間の範囲を←→で示したものである。rangeの下のr/w cyclesは、range内(←→)の範囲での書き込み/読み出しの合計数であるが、異なるレベルが同時に処理されている範囲での回数は、それら各レベルに関する回数の合計で示されている。図22の右側に示した数値は、各レベルの水平処理もしくは垂直処理に要するメモリアクセスの回数(書き込みと読み出しの合計数)である。この数値はウェーブレット逆変換時も同じである。さて、メモリアクセスの回数についてであるが、各レベルにおいて、水平処理、垂直処理のいずれも必ず全データが1回読み出され、全データがフィルタ出力データで書き換えられるから、全画素数の2倍の書き込み/書き込み回数が必要となる。
【0020】
以上に述べたような、本発明に関連する符号化復号化装置と、ウェーブレット変換装置あるいはウェーブレット変換フィルタに関する、より詳細な情報は、特開平8−139935号公報などを参照されたい。また、符号化部については、特開平9−121168号公報などを参照されたい。さらに、類似のウェーブレット変換不に関する従来技術については、特開平3−27687号公報、特開平5−167997号公報、あるいは特開平5−183386号公報などを参照されたい。
【0021】
【発明が解決しようとする課題】
前述のように、ウェーブレット変換の出力はストレージに一旦貯える必要があり、データを単に入力するのに要する時間に比べ数倍の処理時間がかかるという問題があった。前述の従来技術の場合、入力されるイメージデータのサイズを32画素×32ライン、レベル数を4とした場合、イメージデータの入力に必要なサイクル数が1024=32×32であるのに対し、必要な処理時間は5倍以上の5440サイクルとなる。入力データのサイズが増加すれば、処理時間はさらに大幅に増大することは明かである。例えば、64画素×64ラインの場合は、図22に点線で示すように、1Hの処理が時刻t10まで行われる結果、パラレルに出力される区間が増加するため、処理時間は大幅に増大する。レベル数が増えた場合も同様に処理時間が大幅に増大する。
【0022】
また、各レベルの各周波数帯信号が同じ時刻に出力されるので、パイプライン処理が必要であった。すなわち、フィルタ毎にデータが入力されるタイミングが異なっているため、各フィルタに、それが使用される場所に応じ個別的に設計したコントローラを内蔵させる必要があった。また、これらのコントローラはただ一つの条件の画素数とレベルの組合せにしか対応させることができず、画素数またはレベルの一方又は両方が変更された場合に対応が困難であるという問題があった。
【0023】
また、ウェーブレット変換部にその処理のための記憶部を、符号化復号化部にその処理のための記憶部を、それぞれ別々に備えているため、符号化復号化装置をワンチップ化する場合、記憶部の占めるチップ面積が大きくなってしまうという問題があった。
【0024】
本発明は、前述の問題点に鑑みなされたものであり、その主たる目的は、パイプライン処理を必要とせずに高速処理の可能な符号化復号化装置を提供することにある。本発明のもう一つの目的は、記憶部の占めるチップ面積が少なくてすむ高速処理が可能な符号化復号化装置を提供することにある。
【0026】
【課題を解決するための手段】
請求項1の符号化復号化装置は、ウェーブレット変換による周波数帯信号の符号化又はその符号化データの復号化のための符号化復号化部と、それぞれが独立した記憶要素からなる記憶部と、該記憶部への書き込みデータの一部を一時的に保存するためのラインメモリと、該記憶部に対する行方向へのアクセスを制御するための行方向アドレスデコード/データ選択部と、該記憶部に対する列方向へのアクセスを制御するための列方向アドレスデコード/データ選択部と、該行方向アドレスデコード/データ選択部を介して入力されるデータに対しウェーブレット変換又は逆ウェーブレット変換の水平処理を施すための行方向フィルタ部と、該列方向アドレスデコード/データ選択部を介し入力されるデータに対しウェーブレット変換又は逆ウェーブレット変換の垂直処理を施すための列方向フィルタ部と、該行方向アドレスデコード/データ選択部及び該列方向アドレスデコード/データ選択部を介して該記憶部に対するデータの書き込み及び読み出しと該行方向フィルタ部及び該列方向フィルタ部に対するデータの入出力を制御し、該符号化復号化部に対するデータの入出力、該ラインメモリに対するデータの書き込み及び読み出し、並びに外部メモリに対するデータの書き込み及び読み出しとを制御する主制御部とを具備し、該記憶部が、ウェーブレット変換処理又は逆ウェーブレット変換処理のためのバッファ領域及び符号化処理又は復号化処理のためのバッファ領域として共用される構成とされる。
【0027】
請求項2の符号化復号化装置の特徴は、請求項1の符号化復号化装置の構成において、該外部メモリからのデータ入力と並行してウェーブレット変換の水平処理が実行されることである。
【0028】
請求項3の符号化復号化装置の特徴は、請求項1又は2の符号化復号化装置の構成において、該ラインメモリに書き込まれるデータが処理の中間データであることである。
【0029】
請求項4の符号化復号化装置の特徴は、請求項1又は2の符号化復号化装置の構成において、該記憶部のオーバーラップ領域に処理の中間データが書き込まれることである。
【0030】
請求項5の符号化復号化装置の特徴は、請求項1乃至4の各項の符号化復号化装置の構成において、該記憶部が、要求される最大レベルまでの全レベルのウェーブレット変換の処理を内部で連続して実行するために必要な記憶容量を持つことである。
【0031】
【発明の実施の形態】
図1は、本発明の第1の実施例を示すブロック図である。本実施例の符号化復号化装置は、主制御部100、ウエーブレット変換又は逆ウェーブレット変換のためのウェーブレット変換部101、ウェーブレット変換による周波数帯信号の符号化又はその符号化データの復号化のための符号化復号化部109、記憶部102、ラインメモリ104、行方向制御部106及び列方向制御部108からなる。110は本符号化復号化装置と接続される外部のフレームメモリである。行方向制御部106は記憶部102に対する行方向(x方向)へのアクセスを制御し、列方向制御部108は記憶部102に対する列方向(y方向)へのアクセスを制御するものである。主制御部100は、行方向制御部106及び列方向制御部108を介し記憶部102に対するデータの書き込み及び読み出しを制御し、ラインメモリ104に対するデータの書き込み及び読み出しを制御し、フレームメモリ110に対するデータの書き込み及び読み出しを制御し、また、ウェーブレット変換部101及び符号化復号化部109に対するデータの入力及び出力を制御する。
【0032】
記憶部102は、ウェーブレット変換部101及び符号化復号化部109の処理のためのバッファ領域として共用されるものである。したがって、ウェーブレット変換部101及び符号化復号化部109の内部には、従来のような記憶部を設ける必要はない。本実施例においては、記憶部102は、行方向(x方向)及び列方向(y方向)へのデータシフトが可能なシフトレジスタからなるものである。ここでは、記憶部102の大きさは20行×20列(20画素×20ライン)であるとする。図2に、記憶部102の記憶セルの構成を示す。各記憶セルはnビットのビット深さを有する。
【0033】
以下、図1、図2、図3乃至図8を参照し、本実施例について詳細に説明する。なお、図3は記憶部102に対するデータの書き込み方の一例を示し、図4は記憶部102における水平処理後のデータの書き込み方の一例を示す。図5はフレームメモリ110に対する記憶部102及びラインメモリ104の割り当て方(タイリング)の一例を示し、図6は記憶部102及びラインメモリ104に関係したデータの移動や複写などを説明するための図である。図7は、レベル2まで終了した時点の記憶部102におけるマッピングの一例を示す図である。図8は、1ブロックに対するレベル2までの変換処理動作のタイミングチャートである。なお、各図の内容は例示であって、本発明の主旨から逸脱しない限り、さまざまな形態をとり得ることに注意されたい。
【0034】
図2において、点線で囲んだ各部分が記憶部102の1つの記憶セルを表す。図示のように、記憶部102の各記憶セルは、nビットのビット深さを有するシフトレジスタSRとマルチプレクサMUXからなる。各記憶セルのシフトレジスタSRのデータ入力には、マルチプレクサMUXを介して、行方向の前段(右側)の記憶セルの出力データ又は列方向の前段(下側)の記憶セルの出力データが入力される。この入力データの切り替え、すなわち行方向へのデータシフトか列方向のデータシフトかの切り替えは、マルチプレクサMUXへの制御入力hvb(horizontal/vertical bar)によって制御される。ここまでの説明から明らかなように、行方向(x方向)のデータシフトは右から左への向きに、列方向(y方向)のデータシフトは下から上への向きに、それぞれ行われることになる。
【0035】
ウェーブレット変換を行う場合、まず、フレームメモリ110に記憶されているイメージデータの0ライン目のデータが主制御部100の制御によって読み出され、これが行方向制御部106を介して記憶部102の一番下の第j行(図4参照)の最前段(右端)に入力され左方向へ順次シフトされる。ただし、0画素目と1画素目に対してはミラー処理が必要となるため、記憶部102にも最初からその順で書き込まれる。図3中の網掛け部分は、ミラー処理された画素のデータを示す。このようにして図3(b)に示すように0ライン目のデータが全て書き込まれると、このデータは一つ上の行へシフトされる。次に、1ライン目のデータが同様にフレームメモリ100から読み出され、行方向制御部106により記憶部102の一番下の行に入力され順次左へシフトされる。また、データ入力と並行してウェーブレット変換部101により水平処理が実行され、0ライン目のデータに対して計算されたS係数、D係数が、行方向制御部106を介し、記憶部102の0ライン目データが書き込まれている行に入力され順次左へシフトされる。図3(c)は、このような0ライン目の水平処理と1ライン目のデータの入力処理の途中の状態を示す。同様のイメージデータの入力と水平処理が並行して繰り返し実行されることにより、最終的に、水平処理の結果が記憶部102に図4に示すようにマッピングされる。なお、ラインメモリ104に対するデータの書き込み又は読み出しも行われるが、これについては後述する。
【0036】
図4において、記憶部102の第0行と第1行には、第3行と第2行と同じデータが書き込まれていることに注意されたい。これは垂直方向のミラー処理であり、具体的には、第j行まで処理が終わった段階で、行方向制御部106の制御により第3行のデータが第0行に書き込まれ、また第2行のデータが第1行に書き込まれる。また、各行の第i列と第j列には第g列と第h列と同じデータが書き込まれていることに注意されたい。これは、水平処理の過程で行方向制御部106の制御によって行われるが、その理由については後述する。
【0037】
さて、図4のようにマッピングされた記憶部102上のS係数、D係数に対して、垂直処理が施される。ただし、第0列と第1列は処理の対象外であることに注意されたい。垂直処理の場合、列方向制御部108の制御により、第2列のデータが列方向(上向き)へ順次シフトされ、シフトアウトされたデータが主制御部100を経由してウェーブレット変換部101へ入力されてSS係数、SD係数が計算され、それら係数が列方向制御部108の制御により記憶部102の第2列に順次入力されシフトされていく。第3列のデータも同様に列方向にシフトされ、シフトアウトされたデータがウェーブレット変換部101に入力されてDS係数、DD係数が計算され、これが第3列に入力されシフトされる。同様の処理が第h列まで繰り返されることにより、レベル1のウェーブレット変換が終わる。
【0038】
レベル2のウェーブレット変換は、記憶部102上のレベル1のSS係数(1SS)のみを対象として行われる。すなわち、行方向制御部106の制御により各行のデータが行方向にシフトされ、シフトアウトされた1SS係数がウェーブレット変換部101へ送られて2S係数,2D係数が計算され、この係数は、シフトアウトされたレベル1のデータ(1SD係数、1DS係数、1DD係数)とともに、図20に示したようなマッピングとなるような順番で当該行に入力され順次シフトされる。この繰り返しによりレベル2の水平処理が終わる。なお、第0行と第1行は処理の対象外である。また、各行の第i列と第j列のデータも処理の対象外である。次にレベル2の垂直処理が行われる。第2列から第g列までの各列について、列方向制御部108の制御によりデータが列方向に順次シフトされ、シフトアウトされた2S係数又は2D係数がウェーブレット変換部101に入力されて2SS係数と2SD係数、又は、2DS係数と2DD係数が計算され、これら係数はシフトアウトされたデータとともに、図21に示したようなマッピングとなるような順番で当該列に入力され順次シフトされる。この処理が繰り返され、レベル2の処理が終わる。かくして、レベル2までのウェーブレット変換の結果は記憶部102上に図7に示すようにマッピングされる。この16画素×16ラインのデータはフレームメモリ110へ書き出される。レベル3以上の変換を行う場合には、フレームメモリ110上のSS3係数だけが記憶部102に読み込まれ、同様の処理が行われる。
【0039】
図5は、フレームメモリ110のサイズが記憶部102のサイズより大きい場合のタイリング方法を示している。B00はブロック(水平0、垂直0)を意味する。ここでは、記憶部102のサイズは20画素×20ラインとしているので、図5中のx0は15画素目、2x0は31画素目であり(0から数えている)、y0は15ライン目、2y0は31ライン目である(x0=y0=15、0から数えている)。したがって、32画素×32ライン(0画素目から31画素目まで、0ライン目から31ライン目まで)のイメージを処理する場合、図示のようにB00,B01,B10,B11の4つのブロックに分割して処理する必要がある(この図は従来技術との比較を行うための図である)。次に、図6を参照して、各ブロックの処理について説明する。
<ブロックB00の処理:図6(a)>
このブロックB00については、0画素目から17画素目まで、0ライン目から17ライン目までの18画素×18ラインのイメージデータが記憶部102に読み込まれる。図6(a)に示す▲1▼の部分はデータが実在しないので、そのデータはミラー処理によって補われる。下隣りのブロックB10の処理で必要であるがブロックB00の変換データによって上書きされてしまう▲2▼の部分(図4の第g行、第h行に対応)のデータは、予めラインメモリ104にコピーされる。また、ブロックB00の変換データによって上書きされてしまう▲3▼の部分(図4の第g列、第h列に対応)のデータは、下隣りのブロックB01の処理の際に使用できるようにするため記憶部102の右端(図4の第i列と第j列)に予めコピーされる。ブロックB00に対する変換が行われ、その変換データ(図7に示す16画素×16ラインのデータ)がフレームメモリ110の0画素目から15画素目まで、0ライン目から15ライン目までの領域に書き込まれる。次にブロックB01が処理される。
<ブロックB01の処理:図6(b)>
このブロックB01については、16画素目から33画素目まで、0ライン目から17ライン目までの18画素×18ラインのイメージデータが記憶部102に読み込まれる。この際、記憶部102の右端にあった▲3▼の部分のデータは左端(図4の第0列、第1列)に移動させられる。データが存在しない▲1▼の部分のデータはミラー処理により補われる。下隣りのブロックB11の処理で必要であるがブロックB01の変換データで上書きされてしまう▲4▼の部分(図4の第g行、第h行に対応)のデータは、ラインメモリ104に予めコピーされる。ブロックB01に対する変換データは、フレームメモリ110の16画素目から31画素目まで、0ライン目から15ライン目までの領域に書き込まれる。ブロックB10の処理に進む。
<ブロックB10:図6(c)>
このブロックB10については、0画素目から17画素目まで、16ライン目から33ライン目までのイメージデータが記憶部102に読み込まれる。データが存在しない▲1▼の部分のデータはミラー処理によって補われる。▲2▼の部分は上隣りのブロックB00の変換データで上書きされているので、ラインメモリ104にセーブされていた、その部分のデータが書き込まれる。▲6▼の部分のデータは右隣りのブロックB11の処理で使用できるようにするため記憶部102の右端にコピーされる。ブロックB10の変換データで上書きされる▲5▼の部分のデータは、ラインメモリ104にコピーされる。このブロックB10の変換データはフレームメモリ110の0画素目から15画素目まで、16ライン目から31ライン目までの領域に書き込まれる。次にブロックB11の処理に進む。
<ブロックB11の処理:図6(d)>
フレームメモリ110の16画素目から33画素目まで、16ライン目から33ライン目までのイメージデータが記憶部102に書き込まれる。この際、記憶部102の右端にあった▲6▼の部分のデータは左端に移動させられる。▲4▼の部部にはラインメモリ104にセーブされていたデータが書き込まれる。▲7▼の部分のデータはラインメモリ104にコピーされる。このブロックB11に対する変換データは、フレームメモリ110の16画素目から31画素目まで、16ライン目から31ライン目までの領域に書き込まれる。
【0040】
図8は、上に述べた各ブロックに対し、レベル2までのウェーブレット変換を行う場合のタイミングチャートである。時刻t0から時刻t1までがフレームメモリ110から記憶部102へのデータの読み込みとレベル1の水平処理が行われる期間であり、時刻t1から時刻t4までが内部でレベル1の垂直処理からレベル2の垂直処理までが行われる期間であり、時刻t4から時刻t5までが変換データをフレームメモリ110に書き出す期間である。フレームメモリ110に対するデータの読み出しと書き込みのサイクル数は、それぞれ400サイクル
(=20×20)と256サイクル(=16×16)である。フレームメモリ110のアクセスを伴わない内部動作はフレームメモリ・アクセスに比べ遥かに高速化できるが、ここでは内部動作をフレームメモリ・アクセスと同じ動作速度であると仮定して時刻t1〜時刻t4までの期間のサイクル数を計算すると800サイクルとなる。したがって、時刻t0から時刻t5までの総サイクル数は1456サイクルとなる。
【0041】
同じ処理がB00,B01,B10,B11の4ブロックに対して繰り返され、レベル2の変換データが得られる。レベル4の変換データを得る場合には、B00〜B11の4ブロックに含まれるSS係数(2SS)を集め1つのブロックとして処理される。この処理では9画素、9ライン(0から数えて)となるので、サイクル数はブロックB00の処理の4分の1、すなわち364サイクルとなる。したがって、レベル4までのウェーブレット変換処理にかかる総時間は
(400+256+800)*(4+1/4)=6188
となる。しかし、これは内部動作の速度をフレームメモリ・アクセスと同じと仮定した数値であって、実際には内部動作をフレームメモリ・アクセスに比べ数倍高速化することは容易であるから、総時間はさらに短縮可能である。例えば、内部動作の速度をフレームメモリ・アクセスの2倍と仮定すると、総時間は
(400+256+800/2)*(4+1/4)=4488
サイクルまで減少する。内部動作の速度をフレームメモリ・アクセスの4倍と仮定すると、総時間は
(400+256+800/4)*(4+1/4)=3638
サイクルまで減少する。このように、本発明によれば、従来技術において同様の処理を行う場合の総時間5440サイクルより、総時間を短縮できることは明かである。
【0042】
以上のようして1フレームの全体(又は一部)のウェーブレット変換が終了すると、フレームメモリ110上の周波数帯信号データが主記憶部100の制御により読み出され、行方向制御部106及び列方向制御部108を介して記憶部102に書き込まれる。そして、符号化復号化部109は、記憶部102上の周波数帯信号データに対する符号化処理を行い、符号化データcodeを出力する。すなわち、この時には記憶部102は符号化処理のためのバッファ領域として利用され、符号化復号化部109と記憶部102との間のデータ入出力は主制御部100と行,列方向制御部106,107によって制御される。
【0043】
符号化について、より詳しく説明すれば、SS係数を除いた各レベルの各種類の周波数帯信号毎に、例えば、4DS,4SD,4DD,...毎に、ビットプレーン(同じビット深さの一の2次元のビット平面)単位で、そのMSB(最上位ビット)から下位ビットへと順に処理される。符号化の処理は、ビットプレーンの2(x方向)×8(y方向)画素の単位(これは2×8の大きさのデータが存在する場合。それより小さい場合は、その大きさの単位)で行われる。実際に処理されるのは上述の大きさの単位毎であるが、その周辺も参照するため、周辺を含めた領域のデータ、例えば4×10画素のデータがフレームメモリ110から記憶部102に読み込まれる。さらに、同じ種類の1つ上のレベルの周波数帯信号が存在する場合場合は、それも参照されるので、同様にフレームメモリ110から読み込まれる。最上位のビットプレーンの処理が終了すると、1つ下位のビットプレーンが同様に処理される。これを繰り返すことにより、1つのレベルの1種類の周波数帯信号の処理が終了する。これが全レベルの全種類の周波数帯信号に対して行われ、符号化を終了する。
【0044】
以上は符号化の場合の説明であったが、復号化は符号化と逆の手順によって行われる。すなわち、外部より入力する符号化データcodeは符号化復号化部109によって復号化され、周波数帯信号データが記憶部102上に復元される。この時には、記憶部102が復号化処理のためのバッファ領域として使用されるわけである。復元された周波数帯信号データはフレームメモリ110に書き出される。
【0045】
復号化をより詳しく説明すれば、符号化データcodeから、あるレベルのある種類の周波数帯信号、例えば4DD係数が、MSBからビット単位で復号化され、ビットプレーンが再生される。復号化もビットプレーンの2(x方向)×8(y方向)画素の単位で(2×8の大きさのデータが存在する場合。それより小さい場合は、その大きさの単位で)行われる。同じ種類の1つ上のレベルの周波数帯信号が存在する場合は、それも参照される。当該ビットプレーンの処理が終了すると、1つ下位のビット深さのビットプレーンが処理される。同様の処理が全レベルの全種類の周波数帯信号に対して行われる。
【0046】
このようにして、1フレーム全体(又は一部)の周波数帯信号データがフレームメモリ110上に復元されると、周波数帯信号データが1タイル分、記憶部102へ読み込まれ、ウェーブレット変換部101を利用して逆ウェーブレット変換処理が行われる。逆ウェーブレット変換処理はレベル4から行われ、また、各レベルの垂直処理、水平処理がこの順で行われる。最初にSS係数と4SD,4DS,4DDの各係数から3SS係数が再生され、これがSS係数と4SD,4DS,4DDの各係数に上書きされる。再生された3SS係数と3SD,3DS,3DDの各係数から2SS係数が再生され、これが3SS,3SD,3DS,3DDの各係数に上書きされる。同様にウェーブレット変換とは逆の手順が繰り返され、最終的にイメージデータが復元され、これがフレームメモリ110に書き出され、当該タイルの周波数帯信号データに上書きされる。
【0047】
なお、外部のフレームメモリ110を除き、符号化復号化装置をワンチップ化する場合、記憶要素の占めるチップ面積の増加を押さえることが重要である。本実施例によれば、記憶部202をウェーブレット変換部101と符号化復号化部109のバッファ領域として共用するため、それぞれに別々の記憶部を用意する構成に比べ、記憶要素の占めるチップ面積を減らし、かつ、前述のように高速処理が可能となる。
【0048】
図9は、本発明の第2の実施例を示すブロック図である。本実施例の符号化復号化装置は、主制御部200、記憶部202、ラインメモリ204、ウェーブレット変換又は逆ウェーブレット変換の水平処理のための行方向フィルタ部206、垂直処理のための列方向フィルタ部207、行方向アドレスデコード/データ選択部208、列方向アドレスデコード/データ選択部209、及び、符号化復号化部211からなる。210は本符号化復号化装置に接続される外部のフレームメモリである。行方向アドレスデコード/データ選択部208は記憶部202に対する行方向へのアクセスを制御するものであり、列方向アドレスデコード/データ選択部209は記憶部202に対する列方向へのアクセスを制御するためのものである。主制御部200は、行方向アドレスデコード/データ選択部208及び列方向アドレスデコード/データ選択部209を介し記憶部200をアクセスし、記憶部202に対するデータの書き込み及び読み出しとフィルタ部206,207に対するデータの入出力を制御し、また、ラインメモリ204に対するデータの書き込み及び読み出し、符号化復号化部211に対するデータの入出力を制御し、さらに、フレームメモリ210に対するデータの書き込み及び読み出しを制御する。ラインメモリ204は、前記第1実施例におけるラインメモリ104と同じ目的に利用されるものである。図10に、記憶部202中の1つの記憶セルを示す。各記憶セルはnビットのビット深さを持つシフトレジスタSRとマルチプレクサMUXから構成され、それぞれが互いに独立している。
【0049】
本実施例の符号化復号化装置においては、前述の如く、ウェーブレット変換又は逆ウェーブレット変換のためのフィルタ部が、水平処理のための行方向フィルタ部206と垂直処理のための列方向フィルタ部207とに分離されている。水平処理時にはフィルタ演算に必要なデータが行方向アドレスデコード/データ選択部208を介して行方向フィルタ部206に入力され、その演算結果が行方向アドレスデコード/データ選択部208を介して記憶部202に書き込まれる。垂直処理時には、フィルタ演算に必要なデータが列方向アドレスデコード/データ選択部209を介して列方向フィルタ部207に入力され、その演算結果が列方向アドレスデコード/データ選択部209を介して記憶部202に書き込まれる。このようなフィルタ部に関連した構成を除けば、本実施例の符号化復号化装置の全体的な動作は基本的に前記第1実施例の場合と同様であり、ラインメモリ204の利用方法も同様である。
【0050】
しかし、記憶部202は、その各記憶セルが図10に示すように完全に独立しおり、主制御部200から発行されるアドレスを行方向アドレスデコード/データ選択部206及び列方向アドレスデコード/データ選択部209でデコードすることにより、任意の記憶セルに対し直接的に書き込み/読み込みを行うことができる。したがって、フレームメモリ210から記憶部202へのデータ転送の終了直後、数サイクルで全ての行方向の処理(水平処理)を終了させることができ、また、水平処理の終了直後、数サイクルで列方向の処理(垂直処理)を終了させることができる。すなわち、前記第1実施例に比べ、内部処理の動作をはるかに高速化することができる。
【0051】
図11は、前記第1実施例の場合と同じタイリングにおける、本実施例の符号化復号化装置のウェーブレット変換処理のタイミングチャートである。図11において、時刻t0から時刻t1までがフレームメモリ210からのデータ読み込みとレベル1の水平処理の期間であり、時刻t1〜時刻t4までが内部でのレベル1の垂直処理、レベル2の水平処理と垂直処理の期間である。時刻t4から時刻t5までがフレームメモリ210へのデータ書き出しの期間である。フレームメモリ210に対するデータの読み出しと書き込みはそれぞれ400サイクルと256サイクルである。前述のように、内部処理の時刻t1〜時刻t4までの期間は、内部動作がフレームメモリ210へのアクセスに比べ高速であれば殆ど無視できるが、ここでは100サイクルと仮定しサイクル数を計算すると、時刻t0から時刻t5までの総サイクル数は756サイクルとなる。この処理が4つのブロックB00,B01,B10,B11(図5参照)に対し繰り返されてレベル2の変換データが得られる。レベル4の変換データを得る場合には、B00〜B11の4ブロックに含まれるSS係数(2SS)を集め1つのブロックとして処理される。この処理では9画素、9ライン(0から数えて)となるので、サイクル数はブロックB00の処理の4分の1、すなわち189サイクルとなる。したがって、レベル4までのウェーブレット変換処理にかかる総時間は
(400+256+100)*(4+1/4)=3213
サイクルとなる。また、内部処理を50サイクルと仮定すれば、総時間は
(400+256+50)*(4+1/4)=3000
サイクルまで減少する。
【0052】
このように、本実施例によれば、ウェーブレット変換処理の総時間を従来技術での5440に比べ大幅に短縮できることは明かであり、さらに、前記第1実施例と比較しても更なる高速処理が可能であることが理解されよう。
【0053】
符号化復号化部211による符号化処理と復号化処理は、前記第1実施例と同様であるので説明を省略するが、記憶部202がウェーブレット変換処理のためのバッファ領域として、また符号化/復号化処理のためのバッファ領域としても共用されるため、それぞれのための記憶部を別々に用意する構成にくらべ、記憶部の占めるチップ面積を増大させることなく、高速処理を実現できる。
【0054】
前記第1実施例又は第2実施例においては、前述のようにラインメモリ(104,204)に、外部から入力された元データがそのまま書き込まれたが、本発明の第3の実施例によれば、同様の構成の符号化復号化装置装置において、ウェーブレット変換のフィルタの特性を活用し、ラインメモリに対し処理の中間データ(本発明では低域通過型フィルタの出力)が書き込まれる。これにより、他の条件が前記各実施例と同じならば、図12に示すように、ラインメモリ(104,204)の行方向のサイズXは前記各実施例の場合と同様にフレームメモリ
(110,210)の行方向サイズと同じであるが、列方向のサイズYは前記各実施例の場合の2から1へと半減させることができる。このようなラインメモリの容量削減の効果は、フレームメモリの行方向サイズが大きいほど、また、高域通過型フィルタのタップ数が大きいほど顕著である。
【0055】
本発明の第4の実施例によれば、前記第1実施例、第2実施例又は第3実施例と同様の構成において、図13に示すように、記憶部(102,204)のサイズを2行、2列だけ小さくすることができる。これは、本実施例では、記憶部のオーバーラップ領域(図13の斜線領域)に対し、フィルタの特性を活用し、処理の中間データ(本発明では低域通過型フィルタの出力)が書き込まれるからである(前記各実施例では、オーバーラップ領域に外部から入力された元データがそのまま書き込まれる)。本実施例による記憶部の容量削減効果は、高域通過型フィルタのタップ数が大きいほど顕著である。
【0056】
前記各実施例においては、一度に処理できる画像のサイズが記憶部(102,202)のサイズによって制限され、したがって、要求されるウェーブレットレベルの数が増えた場合は、あるレベルまでの結果をフレームメモリ(110,210)へ一旦書き出し、そのSS係数を再び読み込んで処理するという再帰的な処理方法で対処する必要がある。
【0057】
本発明の第5の実施例によれば、前記各実施例と同様の構成において、予め要求されるウェーブレット変換の最大レベルが分かっている場合に、その最大レベルまでの全レベルのウェーブレット変換の処理を内部で連続して実行するために必要な記憶容量を、記憶部(102,202)に持たせる。例えば、レベル6までのウェーブレット変換が要求される場合には、記憶部(102,204)の大きさは(64行×64列+オーバーラップ領域)に決定される。このような大きさに設定するならば、上に述べたような再帰的な処理を行うことなく、読み込んだデータに対し内部処理でレベル1からレベル6までの全レベルのウェーブレット変換を行い、その結果をフレームメモリに書き出すことができるため、内部処理に比べ速度の遅いフレームメモリに対する読み出し及び書き込みの回数が少なくなる分、処理の一層の高速化が可能となる。
【0058】
【発明の効果】
以上の説明から明らかな如く、本発明の符号化復号化装置は、従来技術のようなウェーブレット変換又は逆ウェーブレット変換にパイプライン処理を必要としない構成であり、ウェーブレット変換の処理画素数やレベル数の変更に容易に対応でき、また、ウェーブレット変換又は逆ウェーブレット変換のためのバッファ領域と符号化又は復号化のためのバッファ領域として同じ記憶部を共用する構成であるため、記憶部のためのチップ面積を増大させることなく高速の処理が可能である。ここで、請求項1の符号化復号化装置は、記憶部が任意にアクセス可能な独立した記憶セルからなるため、さらなる高速処理が可能である。請求項2の符号化復号化装置は、外部からのデータ入力とウェーブレット変換の水平処理との並行化により、一層の高速化が可能である。請求項3又は4の符号化復号化装置は、ラインメモリ及び/又は記憶部のためのチップ面積をさらに減らすことができる。請求項5の符号化復号化装置は、要求される最大レベルまでの全レベルのウェーブレット変換を内部で連続して実行できるため、より一層の高速処理が可能である。
【図面の簡単な説明】
【図1】本発明の第1実施例を示すブロック図である。
【図2】第1実施例による記憶部の記憶セルの構成を示すブロック図である。
【図3】記憶部の行方向のデータフローの説明図である。
【図4】レベル1の水平処理終了段階での記憶部のマッピングを示す図である。
【図5】フレームメモリに対する記憶部とラインメモリの割り当て方を例示する図である。
【図6】各ブロック処理時の記憶部とラインメモリに関するデータフローを説明する図である。
【図7】レベル2までのウェーブレット変換を終了した時点での記憶部のマッピングを示す図である。
【図8】第1実施例において1ブロックに対しレベル2までのウェーブレット変換を行う場合のタイミングチャートである。
【図9】本発明の第2の実施例を示すブロック図である。
【図10】第2実施例における記憶部の1つの記憶セルを示す図である。
【図11】第2実施例において1ブロックに対しレベル2までのウェーブレット変換を行う場合のタイミングチャートである。
【図12】本発明の第3実施例を説明するための図である。
【図13】本発明の第4実施例を説明するための図である。
【図14】従来例を示すブロック図である。
【図15】従来例における符号化復号化部のブロック図である。
【図16】ウェーブレット変換の水平処理及び垂直処理の演算方法の説明図である。
【図17】イメージデータのメモリマップを示す図である。
【図18】レベル1のS係数及びD係数のメモリマップを示す図である。
【図19】レベル1のSS係数、SD係数、DS係数及びDD係数のメモリマップを示す図である。
【図20】レベル2のS係数及びD係数のメモリマップを示す図である。
【図21】レベル2のSS係数、SD係数、DS係数及びDD係数のメモリマップを示す図である。
【図22】従来例のタイミングチャートである。
【符号の説明】
100 主制御部
101 ウェーブレット変換部
102 記憶部
104 ラインメモリ
106 行方向制御部
108 列方向制御部
109 符号化復号化部
110 外部のフレームメモリ
200 主制御部
202 記憶部
204 ラインメモリ
206 行方向フィルタ部
207 列方向フィルタ部
208 行方向アドレスデコード/データ選択部
209 列方向アドレスデコード/データ選択部
210 外部のフレームメモリ
211 符号化復号化部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an encoding / decoding apparatus for compressing / decompressing image data and the like, and more particularly to an encoding / decoding apparatus using wavelet transform.
[0002]
[Prior art]
Data compression is a very useful tool for storing and transmitting large amounts of data. For example, the time required for facsimile transmission of a document and transmission of an image such as the World Wide Web can be drastically shortened by reducing the number of bits required for image reproduction using compression.
[0003]
Conventionally, many different data compression methods exist. The most widely used compression method is JPEG (Joint Photographic Experts Group). In JPEG, input symbols or luminance data are quantized and then converted to output codewords. Quantization aims to remove important information while preserving important information in the data. A transformation is used to concentrate energy prior to quantization. In JPEG, DCT (Discrete Cosine) is used as this transformation.
Transform) is used. However, various disadvantages have been pointed out with respect to JPEG using DCT. For example, block noise and mosquito noise (so called because mosquitoes appear to fly). In image signal processing, there is a focus on pursuing an efficient and highly accurate data compression encoding method that can eliminate these drawbacks. One such scheme is the wavelet pyramid processing scheme.
[0004]
When applying wavelet transform to two-dimensional signals such as image data, the horizontal direction low-pass filter HL (Horizontal Low) and the horizontal direction high-pass filter HH (Horizontal High) are used for the input signal. Are separated into a horizontal low-frequency signal (S (smooth) coefficient) and a horizontal high-frequency signal (D (detail) coefficient), and a vertical low-pass filter VL (Vertical Low) with respect to the S coefficient and D coefficient. ) And vertical high-pass filter VH (Vertical High), respectively, horizontal low-vertical low-frequency signal (SS coefficient), horizontal low-vertical high-frequency signal (SD coefficient), horizontal The direction high band-vertical low band signal (DS coefficient) and the horizontal high band-vertical high band signal (DD coefficient) are separated. The series of processes described above is called a level, and an output obtained by performing one horizontal process and vertical process is called a
[0005]
Each frequency band signal obtained through the above process is encoded by the encoding unit. Encoding is performed in units of bits for each frequency band signal. The most significant bit (MSB) of the first pixel of a certain frequency band signal is processed. The output of the pixel itself is determined by referring to the state of the pixel itself, the state of the surrounding pixels, and the state one level higher. Next, the MSB of the second pixel is to be processed. At this time, the state of the pixel processed first is also referred to. Hereinafter, when a series of processing is completed for the region to be encoded, the MSB next bit (MSB-1) of the first pixel becomes the processing target. At this time, the state of the MSB is also referred to in addition to the state of the peripheral pixels having the same bit depth. In this way, encoding is performed up to the least significant bit (LSB) for the state to be encoded. Decoding of the encoded data is also performed through almost the same procedure.
[0006]
FIG. 14 shows a conventional configuration when processing up to
[0007]
In the wavelet transform unit 1000, filter1H, filter2H, filter3H, and filter4H are horizontal filters including a horizontal low-pass filter HL and a horizontal high-pass filter HH.
[0008]
As shown in FIG. 15, the encoding / decoding unit 1003 includes a
[0009]
An example of processing in the wavelet transform unit 1000 when the above-described filter is used is shown in FIG. However, it should be noted that the data mapping in this figure is for explaining the calculation method, and the actual mapping to the memory is as shown in FIGS.
[0010]
(A) of FIG. 16 explains the processing of the horizontal filter, [00] means the 0th pixel data of the 0th line, and [12] means the 2nd pixel data of the 1st line. (In this way, both lines and pixels are counted from 0). The output [S00] of the 0th pixel of the horizontal low-pass filter HL is obtained from the data [00] and the data [01], and the output [S01] of the first pixel is the data [02] and the data [01]. 03]. On the other hand, the output [D00] of the 0th pixel of the horizontal high-pass filter HH is the data (00), data [00], the data two times before and one before the data [00] (not existing). It is obtained from [01], data [02] and data [03]. Here, in order to obtain data before and after data [00] that does not exist, a process called mirror is performed. Specifically, a process of turning back the data in a mirror image relationship is performed. As a result, the previous data and the previous data become data [01] and data [00]. In this way, [D00] is calculated from the data of 6 pixels.
[0011]
FIG. 16B illustrates the vertical filter processing. This process is performed in the vertical direction using the S coefficient and the D coefficient by the horizontal filter process. The non-existent coefficient is subjected to mirror processing as in the case of the horizontal filter processing.
[0012]
FIG. 17 shows image data stored in the
[0013]
FIG. 22 is a timing chart in the configuration shown in FIG. However, it should be noted that this timing chart is used for explaining the processing procedure, and the scale of the horizontal axis (time axis) is not linear. In the following description, the number of pixels or the number of lines is counted from 0, such as 0th pixel or 0th line. The input image data (raster data) is 32 pixels × 32 lines (from the 0th pixel to the 31st pixel, from the 0th line to the 31st line), and one data delimiter (× = ×) corresponds to one line. It shall be.
[0014]
From time t0, the 0th line data is sequentially input from the 0th pixel, and when the 1st pixel is input, the 0th pixel data [1S00] is output from the filter 1H. Next, when the data [1S01] is output, three sets of S coefficients ([1S00], [1S00], [1S01]) necessary for calculating the D coefficient are prepared (the previous data is obtained by mirror processing). D coefficient [1D00] is output. This is repeated for one line. In the timing chart, it is shown in units of time of one line, but it should be noted that if it is enlarged, a deviation in units of pixels occurs.
[0015]
Input of data on the first line starts from time t1, and [1S10], [1D10], and S and D coefficients are sequentially output from filter 1H. When [1S10] is output, [1SS00] is output from filter1V1 of the vertical filter, and [1DS00] is output from filter1V2. Next, when [1S11] is output, three sets of data necessary for calculation of the D coefficient are prepared in filter1V1 and filter1V2. That is, [1S10], [1S10], [1S11] in filter1V1, and [1D10], [1D10], [1D11] are aligned in filter1V2 (the previous data is obtained by mirror processing), and
[0016]
At time t2, input of the first line of 2V is started and 2V processing is started. Thereafter, the processing is repeated until time t9 with the same timing relationship, and each frequency band signal up to
[0017]
Each frequency band signal written in the
[0018]
Next, processing time for wavelet transform will be described. Here, it is assumed that a general semiconductor memory is used as the storage of each frequency band signal generated by the wavelet transform unit 1000, that is, the
[0019]
As described with reference to the timing chart of FIG. 22, since each frequency band signal is output in parallel at the same time, writing to the external memory must also be performed in parallel. Only one data can be read or written at a time. The range in the lower left of FIG. 22 corresponds to 1H, 1V,. . . , 4V represents the range of processing time occupied by ← →. The r / w cycles below the range is the total number of writing / reading within the range (← →) within the range, but the number of times in the range where different levels are processed simultaneously is the number of times for each level. Shown in total. The numerical value shown on the right side of FIG. 22 is the number of memory accesses (total number of writing and reading) required for horizontal processing or vertical processing at each level. This value is the same during inverse wavelet transformation. Now, regarding the number of memory accesses, at each level, both horizontal processing and vertical processing always read out all data once, and all data is rewritten with filter output data. Writing / writing times is required.
[0020]
For more detailed information on the encoding / decoding apparatus and the wavelet transform apparatus or wavelet transform filter related to the present invention as described above, refer to Japanese Patent Laid-Open No. 8-139935. For the encoding unit, refer to JP-A-9-121168. Further, regarding conventional techniques relating to similar wavelet transform failure, refer to Japanese Patent Laid-Open Nos. 3-27687, 5-167997, or 5-183386.
[0021]
[Problems to be solved by the invention]
As described above, the output of the wavelet transform needs to be temporarily stored in the storage, and there is a problem that the processing time is several times longer than the time required to simply input data. In the case of the above-described prior art, when the size of the input image data is 32 pixels × 32 lines and the number of levels is 4, the number of cycles required to input the image data is 1024 = 32 × 32, The required processing time is 5440 cycles, which is five times or more. Obviously, if the size of the input data increases, the processing time will increase significantly. For example, in the case of 64 pixels × 64 lines, as shown by a dotted line in FIG. 22, as a result of the 1H processing being performed until time t10, the number of sections output in parallel increases, so the processing time increases significantly. Similarly, when the number of levels increases, the processing time increases significantly.
[0022]
Moreover, since each frequency band signal of each level is output at the same time, pipeline processing is necessary. That is, since the timing at which data is input differs for each filter, it is necessary to incorporate a controller that is individually designed in accordance with the location where each filter is used. In addition, these controllers can deal with only a combination of the number of pixels and the level of one condition, and there is a problem that it is difficult to deal with when one or both of the number of pixels or the level is changed. .
[0023]
In addition, since the storage unit for the processing is separately provided in the wavelet transform unit, and the storage unit for the processing is separately provided in the encoding / decoding unit, when the encoding / decoding device is made into one chip, There is a problem that the chip area occupied by the storage unit becomes large.
[0024]
The present invention has been made in view of the above-described problems, and a main object thereof is to provide an encoding / decoding device capable of high-speed processing without requiring pipeline processing. Another object of the present invention is to provide an encoding / decoding device capable of high-speed processing which requires less chip area occupied by a storage unit.
[0026]
[Means for Solving the Problems]
[0027]
[0028]
Of
[0029]
[0030]
Of
[0031]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a first embodiment of the present invention. The encoding / decoding apparatus of the present embodiment includes a
[0032]
The storage unit 102 is shared as a buffer area for processing of the
[0033]
Hereinafter, the present embodiment will be described in detail with reference to FIGS. 1, 2, 3 to 8. 3 shows an example of how to write data to the storage unit 102, and FIG. 4 shows an example of how to write data after horizontal processing in the storage unit 102. FIG. 5 shows an example of how the storage unit 102 and the
[0034]
In FIG. 2, each part surrounded by a dotted line represents one storage cell of the storage unit 102. As illustrated, each storage cell of the storage unit 102 includes a shift register SR having a bit depth of n bits and a multiplexer MUX. To the data input of the shift register SR of each memory cell, the output data of the memory cell in the previous stage (right side) in the row direction or the output data of the memory cell in the previous stage (lower side) in the column direction is input via the multiplexer MUX. The This switching of input data, that is, switching between data shift in the row direction or data shift in the column direction is controlled by a control input hvb (horizontal / vertical bar) to the multiplexer MUX. As is apparent from the above description, the data shift in the row direction (x direction) is performed from right to left, and the data shift in the column direction (y direction) is performed from bottom to top. become.
[0035]
When performing wavelet transform, first, the data of the 0th line of the image data stored in the frame memory 110 is read out under the control of the
[0036]
In FIG. 4, it should be noted that the same data as the third and second rows is written in the 0th and 1st rows of the storage unit 102. This is mirror processing in the vertical direction. Specifically, at the stage where the processing up to the j-th row is completed, the data of the third row is written into the 0-th row under the control of the row
[0037]
Now, vertical processing is performed on the S coefficient and D coefficient on the storage unit 102 mapped as shown in FIG. However, it should be noted that the 0th column and the 1st column are not subject to processing. In the case of vertical processing, the data in the second column is sequentially shifted in the column direction (upward) under the control of the column
[0038]
The
[0039]
FIG. 5 shows a tiling method when the size of the frame memory 110 is larger than the size of the storage unit 102. B00 means a block (horizontal 0, vertical 0). Here, since the size of the storage unit 102 is 20 pixels × 20 lines, x0 in FIG. 5 is the 15th pixel, 2x0 is the 31st pixel (counting from 0), and y0 is the 15th line, 2y0. Is the 31st line (x0 = y0 = 15, counting from 0). Therefore, when processing an image of 32 pixels × 32 lines (from the 0th pixel to the 31st pixel, from the 0th line to the 31st line), it is divided into four blocks B00, B01, B10, and B11 as shown in the figure. (This figure is for comparison with the prior art). Next, processing of each block will be described with reference to FIG.
<Process of block B00: FIG. 6 (a)>
For the block B00, image data of 18 pixels × 18 lines from the 0th pixel to the 17th pixel and from the 0th line to the 17th line is read into the storage unit 102. Since data (1) shown in FIG. 6 (a) does not actually exist, the data is supplemented by mirror processing. The data of the portion (2) (corresponding to the g-th and h-th rows in FIG. 4) necessary for the processing of the lower adjacent block B10 but overwritten by the conversion data of the block B00 is stored in the
<Process of block B01: FIG. 6B>
For the block B01, image data of 18 pixels × 18 lines from the 16th pixel to the 33rd pixel and from the 0th line to the 17th line is read into the storage unit 102. At this time, the data of the portion {circle around (3)} at the right end of the storage unit 102 is moved to the left end (0th column and 1st column in FIG. 4). The data of (1) where no data exists is supplemented by mirror processing. The data of the portion (4) (corresponding to the g-th and h-th rows in FIG. 4) necessary for the processing of the lower adjacent block B11 but overwritten with the conversion data of the block B01 is stored in the
<Block B10: FIG. 6C>
For the block B10, image data from the 0th pixel to the 17th pixel and from the 16th line to the 33rd line are read into the storage unit 102. The data of (1) where no data exists is supplemented by mirror processing. Since the portion {circle around (2)} is overwritten with the conversion data of the upper adjacent block B00, the portion of data saved in the
<Process of block B11: FIG. 6 (d)>
Image data from the 16th pixel to the 33rd pixel in the frame memory 110 and from the 16th line to the 33rd line are written in the storage unit 102. At this time, the data of the part (6) at the right end of the storage unit 102 is moved to the left end. The data saved in the
[0040]
FIG. 8 is a timing chart when performing wavelet transform up to
(= 20 × 20) and 256 cycles (= 16 × 16). Although the internal operation without access to the frame memory 110 can be much faster than the frame memory access, it is assumed here that the internal operation is at the same operation speed as the frame memory access. When the number of cycles in the period is calculated, it becomes 800 cycles. Therefore, the total number of cycles from time t0 to time t5 is 1456 cycles.
[0041]
The same processing is repeated for the four blocks B00, B01, B10, and B11, and
(400 + 256 + 800) * (4 + 1/4) = 6188
It becomes. However, this is a value assuming that the internal operation speed is the same as that of frame memory access. Actually, it is easy to make internal operation several times faster than frame memory access. Further shortening is possible. For example, assuming the speed of internal operations is twice that of frame memory access, the total time is
(400 + 256 + 800/2) * (4 + 1/4) = 4488
Decreases to cycle. Assuming that the speed of internal operations is four times the frame memory access, the total time is
(400 + 256 + 800/4) * (4 + 1/4) = 3638
Decreases to cycle. Thus, according to the present invention, it is apparent that the total time can be shortened from the total time of 5440 cycles in the case where similar processing is performed in the prior art.
[0042]
When the entire (or part) wavelet transform of one frame is completed as described above, the frequency band signal data on the frame memory 110 is read out under the control of the
[0043]
The encoding will be described in more detail. For example, 4DS, 4SD, 4DD,. . . Each time, the MSB (most significant bit) is processed in order from the lower bit in units of bit planes (one two-dimensional bit plane having the same bit depth). The encoding process is performed in units of 2 (x direction) × 8 (y direction) pixels of the bit plane (when there is data of 2 × 8 size. ). What is actually processed is each unit of the above-mentioned size, but since the periphery is also referred to, the data of the area including the periphery, for example, 4 × 10 pixel data is read from the frame memory 110 to the storage unit 102. It is. Further, when there is a frequency band signal of the same type and one level above, it is also referred to, and is read from the frame memory 110 in the same manner. When the processing of the highest-order bit plane is completed, the next lower bit plane is processed in the same manner. By repeating this, processing of one type of frequency band signal of one level is completed. This is performed for all types of frequency band signals at all levels, and the encoding ends.
[0044]
The above is the description in the case of encoding, but decoding is performed by the reverse procedure of encoding. That is, encoded data code input from the outside is decoded by the encoding /
[0045]
Described in more detail, a certain type of frequency band signal, for example, a 4DD coefficient, is decoded from the MSB in bit units from the encoded data code, and a bit plane is reproduced. Decoding is also performed in units of 2 (x direction) × 8 (y direction) pixels of the bit plane (when data of 2 × 8 size exists. If smaller, in units of that size) . If there is a higher level frequency band signal of the same type, it is also referred to. When the processing of the bit plane is completed, a bit plane having a bit depth one level lower is processed. Similar processing is performed for all types of frequency band signals at all levels.
[0046]
In this way, when the frequency band signal data of the entire frame (or a part) is restored on the frame memory 110, the frequency band signal data for one tile is read into the storage unit 102, and the
[0047]
Note that, when the coding / decoding device is made into one chip except for the external frame memory 110, it is important to suppress the increase in the chip area occupied by the storage elements. According to the present embodiment, since the
[0048]
FIG. 9 is a block diagram showing a second embodiment of the present invention. The encoding / decoding apparatus according to the present embodiment includes a
[0049]
In the encoding / decoding apparatus of the present embodiment, as described above, the filter unit for wavelet transform or inverse wavelet transform includes a row
[0050]
However, in the
[0051]
FIG. 11 is a timing chart of the wavelet transform process of the encoding / decoding apparatus according to the present embodiment in the same tiling as in the first embodiment. In FIG. 11, the period from time t0 to time t1 is a period of data reading from the
(400 + 256 + 100) * (4 + 1/4) = 3213
It becomes a cycle. If the internal processing is assumed to be 50 cycles, the total time is
(400 + 256 + 50) * (4 + 1/4) = 3000
Decreases to cycle.
[0052]
As described above, according to the present embodiment, it is clear that the total time of the wavelet transform processing can be significantly reduced as compared with 5440 in the prior art, and further, even higher speed processing than the first embodiment. It will be understood that this is possible.
[0053]
Since the encoding process and the decoding process by the encoding / decoding unit 211 are the same as those in the first embodiment, the description thereof will be omitted. However, the
[0054]
In the first embodiment or the second embodiment, as described above, the original data input from the outside is directly written in the line memories (104, 204). However, according to the third embodiment of the present invention. For example, in an encoding / decoding device having the same configuration, the processing intermediate data (in the present invention, the output of the low-pass filter) is written into the line memory using the characteristics of the wavelet transform filter. As a result, if other conditions are the same as those in each of the embodiments, as shown in FIG. 12, the size X in the row direction of the line memory (104, 204) is the same as that in each of the embodiments.
Although it is the same as the size in the row direction of (110, 210), the size Y in the column direction can be halved from 2 to 1 in the above embodiments. Such an effect of reducing the capacity of the line memory is more remarkable as the size of the frame memory in the row direction is larger and as the number of taps of the high-pass filter is larger.
[0055]
According to the fourth embodiment of the present invention, in the same configuration as the first embodiment, the second embodiment, or the third embodiment, the size of the storage unit (102, 204) is set as shown in FIG. It can be reduced by 2 rows and 2 columns. This is because, in the present embodiment, the intermediate data of the processing (in the present invention, the output of the low-pass filter) is written in the overlap area (shaded area in FIG. 13) of the storage unit by utilizing the characteristics of the filter. (In each of the above embodiments, the original data input from the outside is directly written in the overlap area). The capacity reduction effect of the storage unit according to the present embodiment is more remarkable as the number of taps of the high-pass filter is larger.
[0056]
In each of the embodiments described above, the size of an image that can be processed at one time is limited by the size of the storage unit (102, 202). Therefore, when the number of wavelet levels required increases, the results up to a certain level are framed. It is necessary to cope with a recursive processing method of once writing to the memory (110, 210) and reading the SS coefficient again to process it.
[0057]
According to the fifth embodiment of the present invention, when the maximum level of wavelet transformation required in advance is known in the same configuration as each of the embodiments, the wavelet transformation processing of all levels up to the maximum level is known. Is stored in the storage units (102, 202). For example, when wavelet transform up to
[0058]
【The invention's effect】
As is clear from the above explanation, Of the present invention The encoding / decoding apparatus has a configuration that does not require pipeline processing for wavelet transformation or inverse wavelet transformation as in the prior art, and can easily cope with changes in the number of processing pixels and the number of levels of wavelet transformation. Since the same storage unit is shared as a buffer area for transform or inverse wavelet transform and a buffer area for encoding or decoding, high-speed processing is possible without increasing the chip area for the storage unit. It is. Here, in
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of a memory cell of the memory unit according to the first embodiment.
FIG. 3 is an explanatory diagram of a data flow in a row direction of a storage unit.
FIG. 4 is a diagram illustrating mapping of storage units at the end of
FIG. 5 is a diagram exemplifying how a storage unit and a line memory are allocated to a frame memory.
FIG. 6 is a diagram illustrating a data flow regarding a storage unit and a line memory at the time of each block processing.
FIG. 7 is a diagram illustrating mapping of a storage unit at the time when wavelet transformation up to
FIG. 8 is a timing chart when performing wavelet transform up to
FIG. 9 is a block diagram showing a second embodiment of the present invention.
FIG. 10 is a diagram showing one storage cell of a storage unit in the second embodiment.
FIG. 11 is a timing chart when wavelet transform up to
FIG. 12 is a diagram for explaining a third embodiment of the present invention.
FIG. 13 is a diagram for explaining a fourth embodiment of the present invention.
FIG. 14 is a block diagram showing a conventional example.
FIG. 15 is a block diagram of an encoding / decoding unit in a conventional example.
FIG. 16 is an explanatory diagram of a calculation method of horizontal processing and vertical processing of wavelet transform.
FIG. 17 is a diagram illustrating a memory map of image data.
FIG. 18 is a diagram showing a memory map of level 1 S coefficients and D coefficients;
FIG. 19 is a diagram showing a memory map of
FIG. 20 is a diagram showing a memory map of level 2 S coefficients and D coefficients;
FIG. 21 is a diagram showing a memory map of SS coefficients, SD coefficients, DS coefficients, and DD coefficients at
FIG. 22 is a timing chart of a conventional example.
[Explanation of symbols]
100 Main control unit
101 Wavelet transform unit
102 storage unit
104 line memory
106 Row direction control unit
108 Column direction controller
109 Coding / decoding unit
110 External frame memory
200 Main control unit
202 storage unit
204 line memory
206 Row direction filter
207 Column direction filter
208 Row direction address decoding / data selection part
209 Column direction address decoding / data selection unit
210 External frame memory
211 Coding / decoding unit
Claims (5)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22970598A JP3660136B2 (en) | 1998-08-14 | 1998-08-14 | Encoding / decoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22970598A JP3660136B2 (en) | 1998-08-14 | 1998-08-14 | Encoding / decoding device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2000059228A JP2000059228A (en) | 2000-02-25 |
| JP3660136B2 true JP3660136B2 (en) | 2005-06-15 |
Family
ID=16896415
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP22970598A Expired - Fee Related JP3660136B2 (en) | 1998-08-14 | 1998-08-14 | Encoding / decoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3660136B2 (en) |
-
1998
- 1998-08-14 JP JP22970598A patent/JP3660136B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2000059228A (en) | 2000-02-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4356028B2 (en) | Information processing apparatus and method | |
| JP5253312B2 (en) | Moving image processing apparatus and operation method thereof | |
| US8204331B2 (en) | Information processing apparatus and method to reduce delay in image decoding | |
| US8594427B2 (en) | Method and apparatus for reducing memory capacity in encoding image data | |
| JPH069061B2 (en) | Smoothing method for image data | |
| JP4209631B2 (en) | Encoding device, decoding device, and compression / decompression system | |
| JP2000341689A (en) | Wavelet inverse transform apparatus and method, and wavelet decoding apparatus and method | |
| US7929777B2 (en) | Variable length decoding device, variable length decoding method and image capturing system | |
| JP4245123B2 (en) | Wavelet processing apparatus and wavelet processing method | |
| JP4768728B2 (en) | Method and apparatus for encoding a block of values | |
| JP4097108B2 (en) | Wavelet transform device and encoding / decoding device | |
| JP3660136B2 (en) | Encoding / decoding device | |
| JP2000059781A (en) | Wavelet transform device | |
| JP2738136B2 (en) | Blocking device | |
| JP2002204356A (en) | Data processing device, processor, and control method therefor | |
| CN101754017B (en) | Information processing apparatus and method | |
| JP3655088B2 (en) | Wavelet transform device and encoding / decoding device | |
| JP3719699B2 (en) | Encoding device and decoding device | |
| JP4117866B2 (en) | Wavelet transform device and encoding / decoding device | |
| KR100723043B1 (en) | Discrete wavelet transform method and apparatus for image data | |
| JP3934687B2 (en) | Image data decoding method and apparatus | |
| JP2934425B1 (en) | Image data compression device and image data decompression device | |
| JP3893281B2 (en) | Image encoding apparatus, image encoding method, program, and storage medium | |
| JP5194762B2 (en) | Data compression device and data decompression device | |
| JP2019110405A (en) | Image coding device, control method of the same, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20041224 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050104 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050301 |
|
| 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: 20050315 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050316 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090325 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100325 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110325 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |