Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4117866B2 - Wavelet transform device and encoding / decoding device - Google Patents
[go: Go Back, main page]

JP4117866B2 - Wavelet transform device and encoding / decoding device - Google Patents

Wavelet transform device and encoding / decoding device Download PDF

Info

Publication number
JP4117866B2
JP4117866B2 JP24827699A JP24827699A JP4117866B2 JP 4117866 B2 JP4117866 B2 JP 4117866B2 JP 24827699 A JP24827699 A JP 24827699A JP 24827699 A JP24827699 A JP 24827699A JP 4117866 B2 JP4117866 B2 JP 4117866B2
Authority
JP
Japan
Prior art keywords
data
wavelet transform
level
memory
frame memory
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
JP24827699A
Other languages
Japanese (ja)
Other versions
JP2001078189A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP24827699A priority Critical patent/JP4117866B2/en
Publication of JP2001078189A publication Critical patent/JP2001078189A/en
Application granted granted Critical
Publication of JP4117866B2 publication Critical patent/JP4117866B2/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)

Description

【0001】
【発明の属する技術分野】
本発明は、一般的にはウェーブレット変換を利用するシステム全般に係り、特に、画像データ等の圧縮・伸長システムに用いられるウェーブレット変換装置と符号化復号化装置に関する。
【0002】
【従来の技術】
ウェーブレット変換は、周波数領域と時間領域を同時に表現できるという、フーリエ変換等には無い特長を有することで注目され、近年応用分野が広がりつつある。特に、データ圧縮ヘの応用は、大量のデータの蓄積及び伝送のために非常に有用である。例えば、文書のファクシミリ伝送、あるいはワールドワイドウエブのような画像の伝送に要する時間は、圧縮を使ってその画像の再生に必要とされるビット数を滅らすと、飛躍的に短縮される。
【0003】
従来より、多くの様々なデ−タ圧縮手法が存在している。最も広く普及している圧縮方式としてJPEG(Joint Photographic Experts Group)がある。JPEGにおいては、入力シンボルまたは輝度データは量子化されてから出力符号語ヘ変換される。量子化は、データの重要な特徴量を保存する一方、重要でない特徴量を除去することを目的としている。量子化に先立ち、エネルギー集中のために変換が用いられるが、この変換として採用されているのがDCT(Discrete Cosine Transform)である。ところが、このDCTを用いているJPEGに対して、さまざまな欠点が指摘されている。例えば、ブロックノイズやモスキートノイズが発生する問題である。画像信号処理の応用においては、これらの欠点を解消できる、効率的かつ高精度のデータ圧縮符号化方式を追求することに関心が集中している。その方式の中に、ウェーブレット(wavelet)処理方式がある。
【0004】
2次元信号にウェーブレット変換を適用する場合には、水平方向低域通過型フィルタHL(Horizontal Low)及び水平方向高域通過型フィルタHH(Horizon−tal 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が処理の対象となるのであるが、この際に一番最初に処理された画素の状態も参照される。以下、符号化されるべき領域に対しての一達の処理が終了すると、一番最初の画素の1つ下位の(MSB―1)ビットが処理の対象となる。この際は同じビット深さの周辺画素の状態に加えて、MSBの状態も参照される。このようにして、符号化されるべき領域に対してLSBまで符号化が行われる。復号化もほぼ同じ手順を経て行われる。
【0006】
図37は、従来のウェーブレット変換装置の一般的な構成であり、フレームメモリ400、制御部401及びフィルタ402から構成される。フィルタ402にはどのような構成のものを用いてもよいが、ここでは低域通過型フィルタとしては2組のデータを用いて演算を行う2タップのフィルタを使用するものとする。高域通過型フィルタとしては、低域通過型フィルタの出力であるS係数のうち、現在の位置と1つ前及び1つ後の合計3組のデータを用いて演算を行う、6タップのフィルタを使用するものとする。
【0007】
図38に、上記フィルタを用いた場合のウェーブレット変換の処理の例を示す。(a)が水平方向の処理を示し、(b)が垂直方向の処理を示す。同図(a)において、例えば00は0ライン目の0画素目のデータを意味し、12は1ライン目の2画素目のデ−タを意味する(ライン、画素とも0番目から数えるものとする)。水平処理においては、同図(a)に示すように、水平方向低域通通型フィルタHLの0画素目の出力S00は、データ00と01から求められ、1画素目の出力S01はデータ02と08から求められる。また、水平方向高城通通型フィルタHHの0画素目の出力H00は、データ00の2つ前と1つ前のデータ(実在しない)、デ−タ00と01、デ‐タ02と03から求められる。また、垂直処理においては、同図(b)に示すように、垂直方向低域通過型フィルタVLの出力SS00は、データS00とS10から求められる。垂直方向高域通過型フィルタVHの出力SD00は、データS00の2つ前と1つ前のデータ(実在しない)、データS00とS10、データS20とS30から求められる。
【0008】
図39はウェーブレット変換が施される前のフレームメモリ上のデータを示している。このデータに対し、初めに水平方向の処理が施され、得られたS係数及びD係数が図40のようなマッピングでフレームメモリに書き込まれる。図40中、例えば1S00はレべル1のアドレス00のS係数を意味する。図41は垂直処理を行った後の各係数を書き込む際のマッピングの例である。ここまでがレべル1の各係数の格納方法である。図42はレべル2の水平方向の各係数の格納方法の例である。レべル2の処理は1SS係数に対してのみ行われるため、斜線で示した部分のデ‐タは用いられないことに注意されたい。次いで図43に示すようなマッピングでレべル2の各係数が格納され、レべル2の処理が終了する。以下、所望のレべルの周波数帯信号が得られるまで順次処理が施される。
【0009】
図44に、従来の一般的なウェーブレット変換装置のタイミングチャートを示す。データのサイズを、画素方向サイズXが1024、ライン方向サイズYが1024、トー夕ル1MBとし、レべル4までの処理を行う場合の処理時間について説明する。
【0010】
時刻t0からt1で、フレームメモリの全データに対してレべル1の処理を行い、時刻t1からt2でレべル2の処理を行い、時刻t2からt3でレべル3の処理を行い、時刻t3からt4でレべル4の処理を行う。処理時間は、X=Y=1024であるから、レべル1で1024×1024×4(4の内訳:画素方向の読み出し、画素方向の書き込み、ライン方向の読み出し、及びライン方向の書き込み)、レべル2で512×512×4、レべル3で256×256×4、そしてレべル4で128×128×4であり、トータルでは5440kクロック(1k=1024)となる。
【0011】
ただし、この数値は、フレームメモリに対するライン方向の読み出し/書き込みのレイテンシが0の場合の最小の時間である。SDRAM等の最近のメモリではバースト転送が行われるのが普通であり、画素方向のデータ転送は高速で行えるが、ライン方向のデータ転送はセンスアンプヘのプリチャージが必要となるためレイテンシ(遅れ)が発生する。これを回避するためにバンク切り替え等の手法が用いられることがあるが、ウェーブレット変換のように続けてライン方向のアクセスが発生するような場合には効果は期待できない。仮にレイテンシが2であった場合、処理時間は10880kクロックに増加する。このレイテンシは前述の理由から回避するのは非常に困難であった。
【0012】
符号化復号化装置においては、ウェーブレット変換の終了後、フレームメモリに書込まれた各周波数帯信号が符号化復号化器によって符号化される。画像信号は、隣接画素の相関、特に同一ビットプレーン内での相関が高いという特性を活かして圧縮率を上げている。このため、符号化の際には、あるまとまった領域のデータをビット単位(ある画素のデ‐タの、任意の1ビット)で扱っている。復号化は以上述べた動作のほぼ逆順で得られる。
【0013】
なお、本発明に関連する符号化復号化装置、ウェーブレット変換装置、ウェーブレット変換のためのフィル夕に関するより詳細な情報は、特開平8−139935号公報などに見られる。また、符号化復号化器については、特開平9‐121168号公報に詳しい。更に、類似のウェーブレット変換装置に関する公知文献としては、特開平3‐27687号公報、特開平5‐167997号公報、特開平5−183886号公報などがある。
【0014】
【発明が解決しようとする課題】
従来、フレームメモリを介してウェーブレット変換を行う場合、前述のように、画素(水平)方向の処理は比較的高速に行うことができるが、ライン(垂直)方向の処理はフレームメモリのアクセス時にレイテンシが発生し、トータルの処理時間が非常に大きくなってしまうという問題があった。また、処理がレべル順で行われるため、高レべルの周波数帯信号が得られるまで時間がかかり、それまで符号化復号化処理を開始できないという問題があった。
【0015】
よって、本発明の目的は、フレームメモリにSDRAMのようなメモリが使用された場合にも、レイテンシの問題を解決し高速なウェーブレット変換処理が可能なウェーブレット変換装置を提供することにある。本発明のもう一つの目的は、全レベルの周波数帯信号をほぼ同時刻に得られる高速なウェーブレット変換装置を提供することにある。本発明の他の目的は、ウェーブレット変換を利用する高速な符号化復号化装置を提供することにある。
【0016】
【課題を解決するための手段】
請求項1の発明は、フレームメモリからブロック単位でデータを読み込み、nレベル(nは3以上の整数)のウェーブレット変換処理を行い、得られたnレベルのウェーブレット変換係数の周波数帯信号を前記フレームメモリに書き戻すウェーブレット変換装置であって、前記フレームメモリから読み込まれたデータを一時的に記憶するメモリと、少なくとも一つの第1演算要素及び複数の第2演算要素からなる演算部とを具備し、前記複数の第2演算要素は、前記フレームメモリから読み込まれた注目ブロックの周囲のブロックのデータからそれぞれレベル(n−1)のウェーブレット変換係数中の低周波数帯信号を計算し、前記第1演算要素は、前記フレームメモリから読み込まれた前記注目ブロックのデータに対するnレベルのウェーブレット変換処理を実行し、その際にレベルnのウェーブレット変換処理は、該第1演算要素で得られたレベル(n−1)の低周波数帯信号と前記複数の第2演算要素によって計算されたレベル(n−1)の低周波数帯信号とを用いて行って、nレベルのウェーブレット変換係数の全周波数帯信号を計算し、前記第1演算要素のウェーブレット変換処理で得られたnレベルの全周波数帯信号がブロック単位で前記フレームメモリに書き戻されることを特徴とする。
【0017】
請求項2の発明は、請求項1記載のウェーブレット変換装置において、前記第1演算要素が各レベル対応のワークメモリを2面ずつ具備し、前記第2演算要素がワークメモリを2面具備し、前記フレームメモリの隣接する2ブロックのデータに対するウェーブレット変換処理が連続的に実行され、かつ、ウェーブレット変換処理と前記フレームメモリからのデータの読み込み及び前記フレームメモリへの周波数帯信号の書き戻が並行して行われることを特徴とする。
【0018】
請求項3の発明は、請求項2記載のウェーブレット変換装置において、前記第1演算要素が、レベル1のウェーブレット変換処理に使用される第1フィルタとレベル2〜nのウェーブレット変換処理に使用される第2フィルタを具備するとともに各レベルの低周波数帯信号を計算するための手段を具備し、前記第1演算要素において、注目ブロックのデータに対するレベル1のウェーブレット変換処理とレベル2〜nのウェーブレット変換処理が並行して実行されることを特徴とする。
【0019】
請求項4の発明は、請求項2記載のウェーブレット変換装置において、前記第1演算要素の各レベル対応のワークメモリが独立にアクセス可能な4個のメモリに分割されるとともに、前記第1演算要素がレベル1のウェーブレット変換処理に使用される第1フィルタとレベル2〜nのウェーブレット変換処理に使用される第2フィルタを具備し、ウェーブレット変換処理が前記2個のフィルタを使用して並列処理により実行されることを特徴とする。
【0020】
請求項5の発明は、請求項1、2又は3記載のウェーブレット変換装置において、前記第1演算要素のウェーブレット変換処理によって得られた周波数帯信号の一部を一時的に記憶するためのバッファメモリをさらに具備し、このバッファメモリは外部からアクセス可能であることを特徴とする。
【0021】
請求項6の発明は、フレームメモリと、このフレームメモリにアクセス可能な請求項1、2、3又は4記載のウェーブレット変換装置と、前記フレームメモリにアクセス可能な符号化復号化器とを具備する符号化復号化装置を特徴とする。
【0022】
請求項7の発明は、フレームメモリと、このフレームメモリにアクセス可能な請求項5記載のウェーブレット変換装置と、前記フレームメモリ及び前記ウェーブレット変換装置のバッファメモリにアクセス可能な符号化復号化器とを具備する符号化復号化装置を特徴とする。
【0023】
【発明の実施の形態】
以下、添付図面を参照し本発明の実施の形態について説明するが、説明を簡略にするため、添付図面中の複数の図面において同一部分又は対応部分には同一又は同様の参照番号を用いる。
【0024】
なお、ウェーブレット変換の水平処理及び垂直処理のためのフィルタとして、2タップの低域通過型フィルタと、6タップの高域通過型フィルタをそれぞれ用いるものとする。また、ウェーブレット変換はレベル4まで行うものとする。すなわち、n=4とする。もちろん、レベル数はn=3以上いくつに設定しても構わない。本発明は、レベル数が増えるほど大きな効果を発揮する。
【0025】
図1は、本発明による符号化復号化装置の全体構成の一例を示す。符号化時には、フレームメモリ100に外部からデータdataが書き込まれる。データがブロック単位で本発明によるウェーブレット変換装置101に読み込まれてブロック単位でウェーブレット変換処理が施され、得られた全ウェーブレット・レベルの周波数帯信号がブロック単位でフレームメモリ100に書き戻される。この周波数帯信号を符号化復号化器102により符号化し、コードストリームcodeとして外部に出力する。復号化時には、外部から入力されるコードストリームcodeを符号化復号化器102で復号化して、ウェーブレット変換の各周波数帯信号をフレームメモリ100上に復元する。これら周波数帯信号に対しウェーブレット変換装置101によって逆ウェーブレット変換が施され、元データがフレームメモリ100上に復元され、それがdataとして外部に出力される。
【0026】
本発明によるウェーブレット変換装置101は、ブロック単位でウェーブレット変換処理を行い、ブロック単位で全ウェーブレット・レベルの周波数帯信号をフレームメモリ100に書き戻す。したがって、符号化復号化器102は、ウェーブレット変換処理を開始後すぐに符号化処理を開始し、ウェーブレット変換処理と並行して符号化処理を実行することができ、従来のように最高レベルの周波数帯信号が得られるまで符号化処理の開始を待たされることはない。したがって、後述のように本発明によるウェーブレット変換装置101が高速であることと相俟って、本発明の符号化復号化装置は従来よりはるかに高速な動作が可能である。
【0027】
本発明による第1の実施例によれば、ウェーブレット変換装置101は図2に示すような内部構成を有する。このウェーブレット変換装置101は、演算部200と、フレームメモリ100から読み込まれたデータを一時的に記憶するためのカレントメモリ202及びキャッシュメモリ(CM1,CM2,CM3,CM4)203,204,205,206、装置全体のタイミング制御や装置内部及び外部とのデータ転送の制御などを行う主制御部207で構成される。演算部200は、3×3個の演算要素(A,B,C,D,E,F,G,H,I)201a,201b,201c,201d,201e,201f,201g,201h,201iからなる。
【0028】
本発明の第1の実施例によれば、演算要素(E)201eは図3に示すような構成とされる。図3に見られるように、演算要素(E)201eは、SS計算部210を含む制御部211、レベル1の水平処理及び垂直処理に使用されるフィルタ(1)213、レベル2,3,4の水平処理及び垂直処理に使用されるフィルタ(2)214を具備し、さらに、各レベルに対応したワークメモリを2面ずつ具備する。すなわち、レベル1対応のワークメモリとして、第0面のワークメモリ(L1_0)216と第1面のワークメモリ(L1_1)217、レベル2対応のワークメモリとして、第0面のワークメモリ(L2_0)218と第1面のワークメモリ(L2_1219)、レベル3対応のワークメモリとして、第0面のワークメモリ(L3_0)220と第1面のワークメモリ(L3_1)221、レベル4対応のワークメモリとして、第0面のワークメモリ(L4_0)222と第1面のワークメモリ(L4_1)223を備えている。制御部211は、演算要素(E)201eの内部のデータの転送、SS計算部210の動作タイミングの制御、主制御部207との間でデータの受け渡し等を行う部分である。SS計算部210は、レベル1,2,3のSSデータの計算を行う部分である。
【0029】
本発明の第1の実施例によれば、レベル1対応のワークメモリ(L1_0,L1_1)216,217、キャッシュメモリ(CM1,CM3,CM4)203,205,206は、図4に示すように、a(画素方向)×a(ライン方向)のサイズを持つメモリである。キャッシュメモリ(CM2)204は図5に示すようなサイズのメモリである。レベル2対応のワ―クメモリ(L2_0,L2_1)218,219は、図6に示すように、a/2×a/2のサイズを持つメモリである。レベル3対応のワークメモリ(L3_0、L3_1)220,221は、図7に示すように、a/4×a/4のサイズである。レベル4対応のワークメモリ(L4_0、L4_1)222,223のサイズは、図8に示すように、画素方向、ライン方向共にa/8である。図9はフレームメモリ100のサイズを表す図であり、画素方向のサイズがX、ライン方向のサイズがYである。図10はカレントメモリ202のサイズを表す図であり、画素方向のサイズがX、ライン方向のサイズがaである。
【0030】
本発明の第1の実施例によれば、演算要素(E)201e以外の演算要素(A〜D,F〜I)201a〜201d,201f〜201iはそれぞれ図11に示すように、SS計算部230を含む制御部231と、a/8×a/8のサイズの2面のワークメモリ、すなわち第0面のワークメモリ(L4_0)233及び第1面のワークメモリ(L4_1)234から構成される。SS計算部230は、ウェーブレット・レベル3のSSデータの計算を行う部分である。制御部231は、演算要素内部のデータ転送の制御、SS計算部230の動作タイミングの制御、主制御部207との間でデータの受け渡し等を行う部分である。SS計算部230によって計算されたSSデータはワークメモリ(l4_0,L4_1)233,234に格納される。
【0031】
このような構成の本発明によるウェーブレット変換装置101は、a×aのサイズのブロックを単位として処理を行う。この基本サイズの“a”はウェーブレット変換に用いるフィルタのタップ数と所望するウェーブレット・レべル数に基づいて決定される。aが小さいほど、ウェーブレット変換装置101内部の各メモリのサイズを小さくすることができるというメリットがあるが、aを決定する際には処理速度も考慮しなければならない。具体的には、以下で述べるような考え方で決定するのが良いであろう。
【0032】
所望する最高のウェーブレット・レべルが4であり、かつ高域通過型フィルタが6タップであることから、レべル3のSSデータが6個あれば、レべル4のSS、SD、DS、DDデータを1個ずつ得られる。このための元データの最小サイズは48×48(16×16のサイズのブロックが3×3個)となる。すなわち、a=16が最小サイズである。以下、a=16として説明する。なお、仮に高域通過型フィルタが10タップ、所望する最高レべルが5であれば、元データの最小サイズは160×160(32×32のサイズのブロックが5×5個)となり、a=32となる。
【0033】
さて、a=16とした場合、X=Y=1024であると、ウェーブレット変換装置101内部のメモリのワード数(ビット深さはフィルタの構成により異なる)は、次の通りである。まず、演算要素(E)201eにおいては、
ワークメモリ(L1_0,L1_1)で16×16×2=512ワード
ワークメモリ(L2_0,L2_1)で8×8×2=128ワード
ワークメモリ(L3_0,L3_1)で4×4×2=32ワード
ワークメモリ(L4_0,L4_1)で2×2×2=8ワード
となる。それ以外の演算要素(A〜D,F〜I)201a〜201d,201f〜201iのそれぞれにおいては、ワークメモリ(L4_0,L4_1)で2×2×2=8ワードである。したがって、全演算部のワークメモリの合計ワード数は744ワードとなる。キャッシュメモリ(CM1,CM3,CM4)203,205,206で16×16×8=768ワード、キャッシュメモリ(CM2)204で32×64−(16×16)=1792ワード、したがってキャッシュメモリ全体で2560ワードとなる。カレントメモリ202は1024×16=16384ワードである。よって、ウェーブレット変換装置101内部のトータルのメモリ・ワード数は19688ワードとなり、1k=1024とすると19kワード強と非常に小さいメモリ量で済む。また、この数値はフレームメモリ100のライン方向のサイズとは無関係で、画素方向のサイズのみに依存する。
【0034】
このウェーブレット変換装置101の動作の概略は次の通りである。フレームメモリ100上のデータを16×16(a×a)のサイズのブロックに分割し、3×3個のブロック中の中央ブロックに対するウェーブレット変換処理を演算要素(E)201eで実行するとともに、周囲の8個のブロックに対するレベル3のSSデータの計算を演算要素(A〜D,F〜I)201a〜201d,201f〜201iで行う。演算要素(E)201eは、レベル3までは対応ブロックの元データのみを用いてウェーブレット変換処理を行うことができるが、元データのサイズは16×16であるため、レベル3では2×2個のSSデータしか得られない(図12に、16×16のサイズのブロック1個あたりのレベル3までの周波数帯信号のマッピングの一例を示した。この中に、SSデータが2×2個含まれているのが解る)。6タップの高域通過型フィルタを用いる関係から、レベル4の変換のためにはレベル3のSSデータを少なくとも6×6個必要とする。演算要素(E)201eは、その不足したレベル3のSSデータとして、演算要素(A〜D,F〜I)201a〜201d,201f〜201iの内部のワークメモリ(L4_0又はL4_1)233又は234に得られたSSデータを用いることにより、レベル4の変換処理を実行する。このようにして演算要素(E)201eの内部のワークメモリに得らる1ブロック分のレベル1からベル4までの周波数帯信号は、フレームメモリ100の対応領域に書き戻される。
【0035】
本実施例においては、このような演算要素(E)201eによるレベル4までのウェーブレット変換処理を、横方向に隣接した2ブロックに対して連続的に実行できるようにするため、前述のように、演算要素(E)201eは各レベル対応のワークメモリを2面ずつ持ち、それ以外の各演算要素も2×2のサイズのワークメモリを2面備えている。また、演算要素(E)201eは、レベル1の変換と他のレベルの変換を並列処理によって高速に実行するため、かつ、レベル2からレベル4の各レベルの変換を任意の順序で実行できるようにするため、前述のように、水平処理及び垂直処理用の2つの独立して動作するフィルタ213,214を備えるとともに、レベル1,2,3のSSデータの計算を行うSS計算部210を備えている。
【0036】
演算要素(E)201eの内部のワークメモリに得られた変換データは逐次、ブロック単位でフレームメモリ100に書き戻されるので、他のブロックの処理のために各演算要素が必要とする一部の元データが書き換えられてしまう。このような書き換えられてしまう元データの一時記憶、及び、読み込んだデータの再読込みを回避するため、前述のようなカレントメモリ202とキャッシュメモリ(CM1〜CM4)203〜206が利用される。主制御部207は、3×3ブロック分の元データを(実在しないデータについてはミラーリングにより)常に準備するように動作し、また、それらメモリ及びフレームメモリ100のデータを演算要素201a〜201iに対し振り分ける働きをする。この振り分け方は、以下に述べるように、フレームメモリ100のどのブロックのデータを処理するかによって異なる。
【0037】
図13乃至図21は、処理の進行の様子を説明するための図である。前述のように、演算要素(E)201eにはレベル対応のワークメモリが2面ずつ、その他の演算要素(A〜D,F〜I)201a〜201d,201f〜201iの内部にはワークメモリが2面用意されている。図13乃至図21中の3×3の実線の格子は、第0面側のワークメモリを使用した処理に関連する演算要素(A〜I)201a〜201iに対応した3×3個のブロックの位置を示し、3×3の点線の格子は、第1面側のワークメモリを使用した処理の際の演算要素(A〜I)201a〜201iに対応したブロックの位置を示している。また、図13乃至図21において、0_0,1_0などはブロック名であり、ブロック名の前側の数字はライン方向(縦方向)のブロック・アドレス、後側の数字は画素方向(横方向)のブロック・アドレスを示している。
【0038】
図22は、演算要素(A〜I)201a〜201iに必要な元データのキャッシュのためにキャッシュメモリ(CM1〜CM4)203〜206がどのようにの割り当てられるかを示している。なお、A0〜I0は演算要素(A〜I)201a〜201iが第0面のワークメモリを使用する場合に必要となるデータを意味し、A1〜I1は演算要素(A〜I)201a〜201iが第1面のワークメモリを使用する場合に必要なデータを意味する。
【0039】
図23乃至図25は、ウェーブレット変換装置101のタイミングチャートである。図23乃至図25において、例えば0_0などのブロック名のみが記してある部分あるいはRが記してある部分はフレームメモリ100、カレントメモリ202又はキャッシュメモリ203〜206からの読み込み(READ)を表し、ブロック名の上にWが記して部分は書き込み(WRITE)を表し、OWが記してある部分は上書き(OVERWRITE)を表している。以下、図13乃至図21とタイミングチャートを参照しながら順を追って動作を説明する。
【0040】
《図13》 最初のブロック行の左端の2ブロックの処理である。図23の時刻t0からt2の間に、フレームメモリ100から0_0ブロックのデータが読み込まれて演算要素(E,D)201e,201dに送られ、かつカレントメモリ202に書き込まれる。演算要素(E)201eにおいては、その0−0ブロックのデータをワークメモリ(L1_0)216に読み込む。演算要素(D)201dにおいては、SS計算部230で0−0ブロックのデータを用いてレベル3のSSデータを計算し、得られた2×2のSSデータをワークメモリ(4L_1)234に格納する。なお、タイミングチャートにおいて、「A0〜I0」は元データが演算要素の第0面のワークメモリに書き込まれるか、計算したSSデータが第0面のワークメモリに書き込まれるタイミングを表し、「A1〜I1」は元データが演算要素の第1面のワークメモリに書き込まれるか、計算したSSデータが第1面のワークメモリに書き込まれるタイミングを表している。
【0041】
次に、フレームメモリから0_1ブロックのデータが読み込まれ、演算要素
(F)201f及び演算要素(E)201eへ送られ、かつ、カレントメモリ202及びキャッシュメモリ(CM2)204に書き込まれる。演算要素(E)201eでは、そのデータをワークメモリ(L1_1)217に読み込む。演算要素(F)201fでは、SS計算部230で0_1データからレベル3のSSデータを計算し、それをワークメモリ(L4_0)233に記憶する。
【0042】
次に、フレームメモリ100から1_0ブロックのデータが読み込まれ、演算要素(G)201g及び演算要素(H)201hに送られる。演算要素(G)201gではレベル3のSSデータを計算してワークメモリ(L4_1)234に格納し、演算要素(H)201hではレベル3のデータを計算してワークメモリ(L4_0)233に格納する。
【0043】
次に、フレームメモリ100から1_1ブロックのデータが読み込まれ、演算要素(I)201iと演算要素(H)201hへ送られ、かつ、キャッシュメモリ(CM2)204に書き込まれる。演算要素(I)201iではレベル3のSSデータを計算してワークメモリ(L4_0)233に格納し、また演算要素(H)201hではSSデータを計算してワークメモリ(L1_1)234に格納する。
【0044】
タイミングチャートには明示されていないが、以上の4ブロックのデータの読み込みと並行して、主制御部207の制御により、演算要素(A〜D,G)201a〜201d,201gの第0面のワークメモリ(L1_0)233と、演算要素(A,B)201a,201bの第1面のワークメモリ(L1_1)234に、実在しない対応ブロックのミラーリング・データが書き込まれる。
【0045】
このようにして、0_0ブロック及び0_1ブロックの処理のためのデータの用意が完了すると、まず演算要素(E)201eが第0面のワークメモリを使用して0_0ブロックに対するウェーブレット変換処理を開始する。図23における「Cal_0」がそのタイミングを表しているが処理の詳細は後述する。
【0046】
0_0ブロックのウェーブレット変換が終了すると、演算要素(E)201eの第0面のワークメモリ(L1_0,L2_0,L3_0,L4_0)216,218,220,222に得られたデータが直ちにフレームメモリ100に書き戻される。それらワークメモリと、他の演算要素(A〜D,F〜I)201a〜201d,201f〜201i内の第0面のワークメモリ(L4_0)233のデータは破棄される。
【0047】
0_0ブロックのウェーブレット変換と並行して、フレームメモリ100から0_2ブロックのデー夕が読み込まれ、演算要素(F)201fへ送られるとともに、カレントメモリ202及びキャッシュメモリ(CM2)204に書き込まれる。演算要素(F)201fでは、SSデータを計算してワークメモリ(L4_1)234に格納する。
【0048】
続いて、フレームメモリ100から1_2ブロックのデータが読み込まれ、演算要素(I)201iへ送られ、同演算要素(I)201iでSSデータが計算されてそのワークメモリ(L4_1)234に書き込まれ、同時に、1_2ブロックのデータはキャッシュメモリ(CM2)204に書込まれる。図示されていなが、0_2ブロックの読み込み時に、演算要素(C)201cに対応する実在しないブロックのミラーリング・データが、同演算要素に与えられてSSデータが計算され、その第1面のワークメモリ(L4_1)234に格納される。
【0049】
そして、0_0ブロックに対するウェーブレット変換が終了した時点で、演算要素(E)201eは第1面のワークメモリ(L1_1,L2_1,L3_1,L4_1)217,219,221,223を使用し、0_1ブロックに対するウェーブレット変換を開始する。図23中の「Cal_1」がそのタイミングを示している。0_1ブロックのウェーブレット変換が終了した時点で、演算要素(E)201eの第1面のワークメモリ(L1_1,L2_1,L3_1,L4_1)217,219,221,223に得られたデータが直ちにフレームメモリ100に書き戻される。他の演算要素(A〜D,F〜I)201a〜201d,201f〜201i内の第1面のワークメモリ(L4_1)234のデータは破棄される。
【0050】
また、0_1ブロックのウェーブレット変換と並行して、次の0_2ブロックのウェーブレット変換のために、0_1ブロックと1_1ブロックのデータがキャッシュメモリ(CM2)204より読み出されて、演算要素(D,G)201d,201gへそれぞれ転送され、また、0_1ブロックのミラーリング・データが演算要素(A)201aへ転送される。演算要素(D)201dは0_1ブロックのデータからレベル3のSSデータを計算して内部のワークメモリ(L4_0)234に格納し、演算要素(G)201gは1_1ブロックのデータからSSデータを計算して内部のワークメモリ(L4_0)234に格納する。演算要素(A)201aはミラーリング・データのレベル3のSSデータを計算して、そのワークメモリL4_0)234に格納する。
【0051】
0_1ブロックのウェーブレット変換が終了すると、0_2ブロック及び0_3ブロックのウェーブレット変換のために、0_2ブロックと1_2ブロックのデータがキャッシュメモリ(CM2)204より読み出されて演算要素(E,D)201e,201dと演算要素(H,G)201h,201gへそれぞれ転送される。また、0_2ブロックのミラーリング・データが演算要素(A,B)201a,201bへ転送される。演算要素(E)201eは0_2ブロックのデータをワークメモリ(L1_0)216に読み込み、演算要素(D)201dは0_2ブロックのデータからSSデータを計算してワークメモリ(L4_1)234に格納し、演算要素(H)201hは1_2ブロックのデータからSSデータを計算してワークメモリ(L4_0)233に格納し、演算要素(G)201gは1_2ブロックのSSデータを計算してワークメモリ(L4_1)234に格納する。演算要素(B)201bはミラーリング・データのSSデータを計算してワークメモリ(L4_0)233に格納し、また、演算要素(A)201aはミラーリング・データのSSデータを計算してワークメモリ(L4_1)234に格納する。ここまでが時刻t3の処理であり、フレームメモリ100上に0_0ブロックと0_1ブロックのレベル4までのウェーブレット変換データが得られた。
【0052】
《図14》 2ブロック右の0_2ブロック、0_3ブロックの処理である。既に処理が終了し、フレームメモリ100のデータが書き換えられているブロックは図14中に網掛けして示されている(図15乃至図21においても同様である)。
【0053】
時刻t3から、フレームメモリ100より0_3ブロックのデータが読み出され、演算要素(E,F)201e,201fへ転送されるとともに、キャッシュメモリ(CM2)204及びカレントメモリ202に書き込まれる。0_3ブロックのミラーリング・データも演算要素(B,C)201b,201cへ転送される。演算要素(C,F)201c,201fは入力データから計算したSSデータをワークメモリ(L4_0)233に格納し、演算要素(E)201eは入力データをワークメモリ(L1_1)217に格納し、演算要素(B)201bは入力データから計算したSSデータをワークメモリ(L4_1)234に格納する。続いて、1_3ブロックのデータがフレームメモリ100より読み込まれ、演算要素(H,I)h,iへ転送されるとともにキャッシュメモリ(CM2)204に書き込まれる。演算要素(H)201hは計算したSSデータをワークメモリ(L4_1)234に格納し、演算要素(I)201iは計算したSSデータをワークメモリ(L4_0)233に格納する。
【0054】
この時点で、0_2ブロックのウェーブレット変換が開始する。それと並行して、フレームメモリ100から0_4ブロックと1_4ブロックのデータが読み込まれ、また、0_4ブロックのミラーリング・データの演算要素(C)201cへの転送も行われる。
【0055】
0_2ブロックのウェーブレット変換が終了すると、0_3ブロックのウェーブレット変換が開始し、また0_2ブロックの変換データがフレームメモリ100に書き戻される。0_3ブロックの処理と並行して、次のブロックの処理のために、0_1ブロックの処理の場合と同様なデータ転送が行われる。時刻t4までに0_3ブロックの変換データのフレームメモリ100への書き戻しが終了する。時刻t4からt5の間に、0_4ブロックと0_5ブロックが同様に処理される。
【0056】
《図15》 最初のブロック行の右端の2ブロックの処理である。動作は図13及び図14とほぼ同様であるので、詳細は省略する。ただし、図24に示すタイミングチャートの時刻t7からt8に示すように、0_63ブロックの処理のための演算要素(F,I)201f,201iに対応したデータは実在せず、そのミラー処理が行われるので、フレームメモリ100から読み込まれるデータは少ない。
【0057】
《図16》 次のブロック行の先頭の2ブロックの処理である。これは図24のタイミングチャートでは時刻t8からt9の期間に対応する。フレームメモリ100から1_0ブロックのデータが読み込まれ、演算要素(E)201eのワークメモリ(L1_0)216及びキャッシュメモリ(CM3)205に書き込まれ、また、演算要素(D)201dへも送られてSSデータが計算され、そのワークメモリ(L4_0)233に格納される。これと並行して、カレントメモリ202から0_0ブロックのデータが読み出されて演算要素(A,B)201a,201bへ送られてSSデータが計算され、演算要素(A)201aはSSデータをワークメモリ(L4_1)234に格納し、演算要素(B)201bはSSデータをワークメモリ(L4_0)233に格納する。また、0_0ブロックのミラーリング・データも演算要素(A)201aへ送られてSSデータが計算され、そのワークメモリ(L4_0)233に格納される。
【0058】
次に、フレームメモリ100より1_1ブロックのデータが読み込まれて演算要素(E,F)201e,201fへ送られるとともに、キャッシュメモリ(CM2,CM4)204,206へ書き込まれる。演算要素(E)201eはそのデータをワークメモリ(L1_1)217に格納し、演算要素(F)201fはそのデータのSSデータを計算してワークメモリ(L4_0)233に格納する。これと並行して、カレントメモリ202より0_1ブロックのデータが読み出されてキャッシュメモリ(CM2)204に書き込まれ、かつ、演算要素(B,C)201b,201cへ送られる。演算要素(B)201bはSSデータを計算してワークメモリ(L4_1)234に格納し、演算要素(C)201cはSSデータを計算してワークメモリ(L4_0)233に格納する。
【0059】
次に、フレームメモリ100より2_0ブロックのデータが読み出されて演算要素(G,H)201g,201hへ送られるとともにキャッシュメモリ(CM2)204に書き込まれ、また、カレントメモリ202より0_2ブロックのデータが読み出されて演算要素(C)201cへ送られるとともにキャッシュメモリ(CM2)204に書き込まれる。演算要素(C,G)201c,201gはそれぞれ入力データのSSデータを計算してワークメモリ(L4_1)234に格納し、演算要素(H)201hは入力データのSSデータを計算してワークメモリ(L4_0)233に格納する。演算要素(G)201gには2_0ブロックのミラーリング・データも送られ、そのSSデータがワークメモリ(L4_0)233に格納される。
【0060】
次に、フレームメモリ100より2_1ブロックのデータが読み込まれ、キャッシュメモリ(CM2)204に書き込まれるとともに、演算要素(H,I)201h,201iへ送られる。また、キャッシュメモリ(CM3)205より1_0ブロックのデータが読み出されてカレントメモリ202に上書きされるとともに、そのミラーリング・データが演算要素(D)201dへ送られる。演算要素(D,I)201d,201iはそれぞれの入力データのSSデータを計算してワークメモリ(L4_0)233に格納し、演算要素(H)201hはその入力データのSSデータを計算しワークメモリ(L4_1)234に格納する。
【0061】
この時点から、演算要素(E)201eは、第0面のワークメモリ(L1_0,L2_0,L3_0,L4_0)216,218,220,222を使用して1_0ブロックのウェーブレット変換を開始する。これと並行して、フレームメモリ100より1_2ブロックのデータが読み込まれてキャッシュメモリ(CM2)204及びカレントメモリ202に書き込まれるともに、演算要素(F)201fへ送られる。演算要素(F)201fは計算したSSデータをワークメモリ(L4_1)234に格納する。続いて、フレームメモリ100より2_2ブロックのデータが読み込まれてキャッシュメモリ(CM2)204に書き込まれるとともに演算要素(I)201iへ送られ、また、キャッシュメモリ(CM4)206より1_1ブロックのデータが読み出されてカレントメモリ202に上書きされる。演算要素(I)201iは入力データのSSデータを計算してワークメモリ(L4_1)234に格納する。
【0062】
1_0ブロックのウェーブレット変換が終了すると、その変換データがフレームメモリ100へ書き戻されるとともに、演算要素(E)201eで第1面のワークメモリ(L1_1,L2_1,L3_1,L4_1)217,219,221,223を使用して1_1ブロックのウェーブレット変換を開始する。この変換処理と並行して、次の1_2ブロックのための準備が行われる。すなわち、キャッシュメモリ(CM2)204より0_1ブロック,1_1ブロック,2_1ブロックが順次読み出され、演算要素(A,D,G)201a,201d,201gへそれぞれ送られる。これら演算要素は、それぞれの入力データのてSSデータを計算してワークメモリ(L4_0)233に格納する。そして、1_1ブロックの変換データがフレームメモリ100に書き戻されることにより、1_0ブロックと1_1ブロックに対する処理が完了する。
【0063】
《図17》 図16の位置から2ブロック分右側に移動した位置で処理である。これは図25のタイミングテャートでは時刻t9からt10に相当する。この処理パターンが全体の処理の大部分(約88%)を占める。
【0064】
まず、キャッシュメモリ(CM2)204より0_2ブロックのデータが読み出されて演算要素(B,A)201b,201aへ送られ、演算要素(B)201bでは計算したSSデータをワークメモリ(L4_0)233に格納し、演算要素(A)201aでは計算したSSデータをワークメモリ(L4_1)234に格納する。次に、キャッシュメモリ(CM2)204より1_2ブロックのデータが読み出され、演算要素(E)201eのワークメモリ(L1_0)216に書き込まれるとともに、演算要素(D)201dへ送られる。この演算要素(D)201dでは計算したSSデータをワークメモリ(L4_1)234に格納する。次に、キャッシュメモリ(CM2)204より2_2ブロックのデータが読み出されて、演算要素(G,H)201g,201hへ送られ、演算要素(H)201hでは計算したSSデータをワークメモリ(L4_0)233に格納し、演算要素(G)201gでは計算したSSデータをワークメモリ(L4_1)234に格納する。次に、カレントメモリ202より0_3ブロックのデータが読み出され、キャッシュメモリ(CM2)204に書き込まれるとともに演算要素(B,C)201b,201cに送られ、演算要素(B)201bでは計算したSSデータをワークメモリ(L4_1)234に格納し、演算要素(C)201cでは計算したSSデータをワークメモリ(L4_0)233に格納する。
【0065】
次に、フレームメモリ100より1_3ブロックのデータが読み込まれ、カレントメモリ202、キャッシュメモリ(CM2)204及び演算要素(E)201eのワークメモリ(L1_1)217に書き込まれるとともに、演算要素(F)201fへ送られる。演算要素(F)201fでは計算したSSデータをワークメモリ(L4_1)234に格納する。
【0066】
次にフレームメモリ100より2_3ブロックが読み込まれて、キャッシュメモリ(CM2)204に書き込まれるとともに演算要素(H,I)201h,201iへ送られる。演算要素(I)201iでは計算したSSデータをワークメモリ(L4_0)233に格納し、演算要素(H)201hでは計算したSSデータをワークメモリ(L4_1)234に格納する。
【0067】
このような処理が終わった時点から、演算要素(E)201eは第0面のワークメモリ(L1_0,L2_0,L3_0,L4_0)216,218,220,222を使用し、1_2ブロックのウェーブレット変換を開始する。このウェーブレット変換と並行して、フレームメモリ100より1_4ブロックのデータが読み出され、キャッシュメモリ(CM2,CM3)204,205に書き込まれるとともに、演算要素(F)201fへ送られてSSデータが計算され、そのワークメモリ(L4_1)234に格納される。次にフレームメモリ100より2_4ブロックのデータが読み込まれ、演算要素(I)201iへ送られるとともにキャッシュメモリ(CM2)204に書き込まれる。演算要素(I)201iでは計算したSSデータをワークメモリ(L4_1)234に格納する。
【0068】
そして、1_2ブロックに対するウェーブレット変換が終了し、その変換データがフレームメモリ100に書き戻されるが、これと並行して、カレントメモリ202より0_4ブロックのデータが読み出され、キャッシュメモリ(CM2)204に書き込まれるとともに演算要素(C)201cへ送られ、そのSSデータが計算されてワークメモリ(L4_1)234に格納される。続いて、キャッシュメモリ(CM3)205より1_4データが読み出されてカレントメモリ202に書き込まれる。
【0069】
演算要素(E)201eが第1面のワークメモリ(L1_1,L2_1,L3_1,L4_1)217,219,221,223を使用して1_3ブロックに対するウェーブレット変換を開始するが、この変換処理と並行して次の1_4ブロックに対する処理の準備のための操作が行われる。すなわち、キャッシュメモリ(CM2)204より0_3ブロック、1_3ブロック、2_3ブロックのデータが順次読み出され、演算要素(A,D,G)201a,201d,201gへそれぞれ送られてSSデータが計算される。計算されたSSデータは演算要素(A,D,G)201a,201d,201gのワークメモリ(L4_0)233にそれぞれ格納される。そして、1_3ブロックに対するウェーブレット変換処理が終了し、その変換データがフレームメモリ100に書き戻される。
【0070】
《図18》 2番目のブロック行の右端の2ブロックに対する処理である。この場合の動作は、ここまでの説明から明らかであろうから、説明を割愛する。
【0071】
以上の図16乃至図18に対応した処理が、最終ブロック行の1つ前のブロック行まで繰り返される。
【0072】
《図19》 最終ブロック行の左端の2ブロックに対する処理である。この場合の動作は図13の場合とほぼ同じであるので、その説明及びタイミングチャートは割愛する。
【0073】
《図20》 次の2ブロックに対する処理の様子を示している。この場合の動作は図14の場合とほぼ同じであるので、その説明及びタイミングチャートは割愛する。
【0074】
《図21》 右端の2ブロックに対する処理であるが、この場合の動作は図15の場合とほぼ同じであるので、その説明とタイミングチャートは割愛する。
【0075】
図26は、演算要素(E)201eにおけるウェーブレット変換処理のタイミングチャートである。時刻t0からt1の期間に、フィルタ(1)213を利用して、ワークメモリ(L1_0又はL1_1)216又は217に書き込まれたデータに対するレべル1の水平処理が行われる。この水平処理と並行して、SS計算部210を利用してレベル1,2,3のSSデータが計算され、得られたレベル1,2,3のSSデータはワークメモリ(L2_0又はL2_1)218又は219,ワークメモリ(L3_0又はL3_1)220又は221,ワークメモリ(L4_0又はL4_1)222又は223にそれぞれ書き込まれる。
【0076】
レベル1のSSデータは、水平方向に隣接する2個の元データの平均値を計算してSデータを求め、次に垂直方向に隣接する2個のSデータの平均値を計算することによって得られる。すなわち、2×2個の元データの平均値を計算することになる。レベル2のSSデータは、水平方向に隣接する2個のレベル1のSSデータの平均値を計算してSデータを求め、次に、垂直方向に隣接する2個のSデータの平均値を計算することによって得られる。すなわち、4×4個の元データの平均値を計算することになる。レベル3のSSデータは、水平方向に隣接する2個のレベル2のSSデータの平均値を計算してSデータを求め、次に、垂直方向に隣接する2個のSデータの平均値を計算することによって得られる。すなわち、8×8個の元データの平均値を計算することになる。16×16のサイズのブロックの場合、レベル3のSSデータが2×2個得られる。
【0077】
レベル1の水平及び垂直処理のためのフィルタ(1)213とは別に、レベル2,3,4の水平及び垂直処理のためのフィルタ(2)214が用意されているため、レベル2,3,4の変換は、そのためのSSデータが用意できた時点から、任意の順番で、レベル1の変換と並行して行うことができる。
【0078】
図26のタイミングチャートでは、時刻t1から、レベル1の垂直処理が開始し、同時にレベル2の水平処理が開始する。レベル2の水平処理は、フィルタ(2)214を使用して、ワークメモリ(L2_0又はL2_1)218又は219にあるレベル1のSSデータに対して実行される。得られたSデータ及びDデータはワークメモリ(L2_0又はL2_1)218又は219に書き戻される。次に、このSデータ及びDデータに対し、フィルタ(2)214を用いて垂直処理が実行され、レベル2の変換データがワークメモリ(L2_0又はL2_1)218又は219に得られる。
【0079】
時刻t2から、フィルタ(2)214を利用して、ワークメモリ(L3_0又はL3_1)220又は221にあるレベル2のSSデータに対する水平処理、垂直処理が順に実行され、レベル3の変換データがワークメモリ(L3_0又はL3_1)220又は221に得られる。時刻t3から、演算要素(E)201eの内部のワークメモリ(L4_0又はL4_1)222又は223にあるレベル3のSSデータと、他の演算要素(A〜D,F〜I)201a〜201d,201f〜201iの内部の(L4_0又はL4_1)233又は234に得られているSSデータ(全体で6×6個のSSデータ)に対し、フィルタ(2)214を用いて水平処理と垂直処理が順次実行され、レベル4の変換データが演算要素(E)201eのワークメモリ(L4_0又はL4_1)222又は223に得られる。
【0080】
レベル1はデータ数が多いため、レベル2,3,4の処理に要する時間を合計しても、レベル1の水平処理もしくは垂直処理に要する時間より少ないため、レベル1の垂直処理が終了する時刻t5より前の時刻t4でレベル2,3,4の変換は完了する。
【0081】
図27は、フレームメモリ100を処理の内容が同じ部分毎に分割し、それぞれの部分に1から15の識別番号を付けたものである。図13乃至25を用いて説明したように、フレームメモリ100に対する読み出し/書き込みに関しては、1と13の部分、2と14の部分、3と15の部分でほぼ同様の処理が行われる。同様に、4、7、10の部分、5、8、11の部分、6、9、12の部分もほぼ同様の処理が行われる。一方、ウェーブレット変換はこれとは異なり、処理されるブロック数が各部分で異なる。1、3、13、15の部分では、演算要素の第0面(又は第1面)のワークメモリを利用して処理されるブロック数が2×2ブロックで、第1面(又は第0面)を利用して処理されるブロック数は3×2ブロックとなる。2、14の部分では、いずれも処理されるブロック数は3×2ブロックである。4、7、10、6、9、12の部分では、第0面(又は第1面)のワークメモリを利用して処理されるブロック数が2×3ブロックで、第1面(又は第0面)のワークメモリを利用して処理されるブロック数が3×3ブロックとなる。5、8、11の部分では処理されるブロック数はいずれも3×3ブロックとなる。
【0082】
そこで、簡単のため、またタイミングチャートとの比較を容易にするため、16×16のサイズのブロックを時間単位として処理時間を計算する。ウェーブレット変換は、図13乃至図21に示す3×3の実線格子又は点線格子の中央のブロックのデータを対象にして行われるため、対象外のブロックに対しては各メモリはフリーとなり、ウェーブレット変換と並行してデータをフレームメモリに書込む、あるいは予め読み出しておくことができる。以上を考慮して、図27における1から15の各部分での処理時間を求めると、1の部分は10ブロック、2の部分は12ブロック、3の部分は8ブロック、4の部分は10ブロック、5の部分は20ブロック、6の部分は8ブロック、7の部分は10ブロック、8の部分は20ブロック、9の部分は8ブロック、10の部分は10ブロック、11の部分は20ブロック、12の部分は8ブロック、13の部分は10ブロック、14の部分は12ブロック、15の部分は8ブロックとなる。処理時間の合計は(X=Y=1024としたとき)、最上段と最下段のブロックでは10+12×30+8=378ブロック、それ以外では(10+20×30+8)×62=38316ブロックとなり、合計で39072ブロックとなる。
【0083】
これをクロック数に換算すると、1ブロックのサイズが16×16であるから、9768kクロック(1k=1024)となる。このクロック数は、ウェーブレット変換とフレームメモリに対する読み出し/書き込みのスピードを同一とした場合であり、通常は内部動作は容易に高速化が可能であるから、この数値はワーストケースである。例えば、ウェーブレット変換に最も長い時間を要する5、8、11の部分(8の部分が全体の88%を占める)のウェーブレット変換に要する時間が半分になったとすると、処理時間は(20−9)+9/2=15.5ブロックとなり、全体での処理時間は30702ブロックとなる。これはクロック数に換算すると7675.5kクロックとなり、ワーストケースに比較して約79%の時間で全ての処理を終了することができる。
【0084】
従来技術で問題となっていたライン方向のメモリアクセス時に生じるレイテンシは、本発明ではブロック単位でデータを転送をすることで回避することができる。具体的には、読み出し/書き込みは全て画素方向のデータ転送となり、画素方向のデータ転送時にメモリのセンスアンプをプリチャージする時間を充分確保することができる。すなわち、バンク切り替え等の手法を用いてレイテンシの問題を解決できるようになる。
【0085】
さて、演算要素(E)201eの内部の各ワークメモリには、各レベルのSS,DS,SD,DDのデータが図28のようなマッピングで記憶される。xはレベルを示す数字を意味する。ただし、レベル1、2,3のSSデータは、その上位レベルのデータで置き換えられるため意味を持たない。このような各レベルのデータは、従来と同様に、図45に示すようなマッピングでフレームメモリ100に書き戻すことも可能である。しかし、符号化復号化器102においては、重要度の高いレベル及び周波数帯信号からビットプレーン単位で符号化又は復号化を行うため、その処理順序を考慮して、周波数帯信号の配列を予めソートした形でフレームメモリ100に書き戻すのが有利である。以下、これについて説明する。
【0086】
図29は、ウェーブレット変換により得られた各レべルの各周波数帯信号が重要度により並べ替えらる「アライメント(alignment)」と呼ばれる概念を表している。図29において、1つの長方形が、あるレべルのある周波数帯信号を示し、その長さがビット深さを表している。ビット深さは、使用するフィルタの構成により異なってくるが、ここではSD係数及びDS係数が同じビット深さを有し、DD係数はSD係数及ぴDS係数より1ビットだけビット深さが深いものとして描かれている。符号化復号化器102においては、例えば画像を扱うような場合は、圧縮率を上げるためにデータの切り捨てを行う場合がある。アライメントは、その切り捨て方を決めるための1つの手段として用いられ、重要度の低いビットのデータが切り捨てられる。
【0087】
図30はビットプレーンという概念を説明する図である。データが例えば画像データであれば、ある画素(pixel)は(x、y)で表されるアドレス空間と、ビット深さを持っている。図中、斜線で示した部分(例えば、MSBの部分)をビットプレーンと呼ぶ。符号化復号化器102では、処理はビットプレーン単位で、何画素かの塊で行われる。画像データは、ある画素に着目した場合、その周辺の画素との相関が高いことを利用して圧縮率を高めるためである。
【0088】
符号化又は復号化は、ビットプレーン単位で重要度の高い方の、左から右に向かって実行されていく(ただし、SS係数は除外)。図29のようなアライメントの場合、レベル4のSD係数の最上位ビット(MSB)、DS係数の最上位ビット、DD係数の最上位ビット、SD係数の1つ下位の(MSB−1)ビット、...という順になる。したがって、図45に示すようなマッピングで周波数帯信号がフレームメモリ100に書き戻された場合には、符号化復号化器102でフレームメモリ100に対し飛び飛びのアドレッシングが必要になることは明白であり、フレームメモリ100がSDRAMのようなバースト転送を行うメモリであるとレイテンシの関係から処理速度が上がらない。
【0089】
これを回避するために、本実施例においては、レベル毎及び周波数帯毎に連続してアクセスすることが可能な配列となるように、周波数帯信号をその重要度の高い順に予めソートしてからフレームメモリ100に書き戻す。すなわち、図29のようなアライメントの場合、16×16の領域のデータを、図46に示すように、フレームメモリ100の左上から4SS,4SD,4DS,4DD,次に、3DS×2,3SD×2,3DD×2,...というような重要度の高い順で書き戻し、最後にレベル1のデータ(1DS,1SD,1DD)を書き戻す(レベル1のデータが領域の4分の3を占める)。このような周波数帯信号のソーティングは、例えば、制御部211において各ワークメモリから周波数帯信号を読み出す順序を制御することによって行われる。
【0090】
このようにソートされた状態で書き戻されたならば、符号化復号化部器102において、切り捨てを行う場合にも行わない場合にも、フレームメモリ100に対するアドレッシングが容易になり、かつ、レイテンシが発生しにくいので、符号化復号化器102からのフレームメモリ100に対する読み出し/書き込みを高速化することができる。
【0091】
本発明の第2の実施例によれば、図2に示した全体構成のウェーブレット変換装置101において、演算要素(E)201eの構成が図31に示すように一部変更される。すなわち、各ワークメモリ216〜223が、SS,SD,DS,DDの各データに割り当てられる、独立した4つのメモリ(SSメモリ,SDメモリ,DSメモリ,DDメモリと呼ぶことがある)に分割された構成とされる。制御部211はSS計算部210を具備しない。また、フィルタ(1)213とフィルタ(2)214は、特定のレベルの処理専用に割り当てられるものではなく、各レベルの水平処理時と垂直処理時に制御部211によって入出力を切り替えて使用される。
【0092】
本実施例のウェーブレット変換装置101の全体的動作は前記第1実施例と同様であり、演算要素(E)201eに関する動作のみが前記第1実施例と一部相違する。以下、演算要素(E)201eの動作を、図32のメモリマップ、図33及び図34の接続図、図35のタイミングチャートを参照して説明する。
【0093】
フレームメモリ100のデータが演算要素(E)201eのワークメモリ(L1_0又はL1_1)216又は217に転送される際に、制御部211により、データは図32のメモリマップに示すような規則に従って、同ワークメモリを構成するSSメモリ,SDメモリ,DSメモリ,DDメモリに振り分けて書き込まれる。この振り分けの規則は次の通りである。SSメモリの0ライン目の0画素目にはフレームメモリ100のブロックの0ライン目の0画素目のデータが格納され、SDメモリの0ライン目の0画素目にはブロックの0ライン目の1画素目のデータが格納される。また、DSメモリの0ライン目の0画素目にはブロックの1ライン目の0画素目のデータが格納され、DDメモリの0ライン目の0画素目にはブロックの1ライン目の1画素目が格納される。すなわち、偶数ライン目(0ライン目も偶数ライン目と数える)の偶数画素目(0画素目も偶数画素目と数える)がSSメモリに格納され、偶数ライン目の奇数画素目がSDメモリに格納され、奇数ライン目の偶数画素目がDSメモリに格納され、奇数ライン目の奇数画素目がDDメモリに格納されるのである。
【0094】
図35のタイミングチャートの時刻t0までに、上に述べたような形でワークメモリ(L1_0又はL1_0)216又は217にデータが格納されると、レベル1の水平処理が開始する。この時には、フィルタ(1)213及びフィルタ(2)214の入出力は、図33に示すように、ワークメモリ(L1_0又はL1_0)216又は217のSSメモリ,SDメモリ,DSメモリ,DDメモリと接続される。これら4つのメモリは独立しているため、同時刻に読み出し/書き込みを行うことができる。すなわち、偶数ライン目をフィルタ(1)213で、奇数ライン目をフィルタ(2)214で、並列に処理し、その結果を同時に書き込むのである。この水平処理が終わると、次にレベル1の垂直処理が開始する。この時には、フィルタ(1)213及びフィルタ(2)214の入出力は、図34のように接続が変更される。すなわち、偶数画素目をフィルタ(1)213で、奇数画素目をフィルタ(2)214で、並列に処理し、結果を同時に書き込むのである。垂直処理で得られるレベル1のSSデータは、SSメモリに書き込まれるとともに、制御部211により図32に関連して説明した規則と同様の規則に従ってワークメモリ(L2_0又はL2_1)218又は219を構成する4つのメモリに振り分けて書き込まれる。
【0095】
そして、時刻t1からレベル2の処理が開始する。まず、フィルタ(1,2)213,214の入出力が、図33に示すように、ワークメモリ(L2_0又はL2_1)218又は219を構成する4つのメモリに接続され、水平処理が実行される。水平処理が終わると、フィルタ(1,2)213,214の入出力が、図34に示すような接続に切り替えられ、垂直処理が実行される。得られたレベル2のSSデータは、図32に関連して説明したと同様の規則に従って、ワークメモリ(L3_0又はL3_1)220又は221を構成する4つのメモリに振り分けて書き込まれる。ここまでが時刻t2である。以下、同様にしてレベル4まで処理が実行され、時刻t4で処理が完了する。ただし、レベル4の処理の際には、他の演算要素で得られたレベル3のSSデータも利用されることは前記第1実施例の場合と同様である。
【0096】
このように、本実施例においては、レベル1,2,3,4の処理をシーケンシャルに実行するが、各レベルの処理に要する時間は、前記第1実施例に比べて4分の1で済む。これは、各ワークメモリを構成する4つのメモリを同時にアクセスすることが可能であるためである。
【0097】
本実施例における処理時間は次の通りである。図27における1から15の各部分での処理時間をブロツク単位で求めると、1の部分は4.65625ブロック、2の部分は3.984375ブロック、3の部分は2.65625ブロック、4の部分は4.65625ブロック、5の部分は7.9765625ブロック、6の部分は2.65625ブロック、7の部分は4.65625ブロック、8の部分は7.9765625ブロック、9の部分は2.65625ブロック、10の部分は4.65625ブロック、11の部分は7.9765625ブロック、12の部分は2.65625ブロック、13の部分は4.65625ブロック、14の部分は7.9765625ブロック、15の部分は2.65625ブロックとなる。図35に示したように、ウェ‐ブレット変換の時間はブロックを単位とすると、レべル1では0.25×2ブロック、レべル2では0.0625×2ブロック、レべル3では0.015625×2ブロック、そしてレべル4では0.0O390625×2ブロック、というように小数点以下の数が発生するが、ここでは省略せず計算を行っている。処理時間の合計は(X=Y=1024としたとき)、最上段及び最下段のブロックでは4.65625+3.984375×30+2.65625=126.84375ブロック、それ以外では(4.65625+7.9765625×30+2.65625)×60=14796.5625ブロックとなり、合計で15050.25ブロックとなる。クロック数に換算すると、1ブロックが16×16であるから、3762.5625kクロック(1k=1024)となる。このクロック数は、ウェーレット変換とフレームメモリに対する読み出し/書き込みのスピードを同一とした場合である。この処理速度は、前記第1実施例の7675.5kクロックに比べても49%の処理時間で済み、従来技術と比べるとレイテンシが2の場合では35%の処理時間で済むから、非常に高速な処理が可能であることが理解されよう。
【0098】
さて、前述のように、符号化復号化器102ではビット単位で処理が行われるため、ウェーブレット変換に比べて数倍から10数倍の処理時間がかかることは明らかである。データの読み出し/書き込みをフレームメモリ100に対して行えば、その処理時間はさらに長くなる。また、前述のように、符号化復号化は重要度が高い周波数帯信号から順に行われるが、一般に高いレベルの周波数帯信号ほど重要度が高い。しかるに、従来はウェーブレット変換がレベル1から順次高いレベルへと行われたため、高レベルの周波数帯信号を得るにはウェーブレット変換の終了を待たなければならなかった。これに対し、本発明では、ウェーブレット変換が小さなブロックの単位で行われ、しかもブロックの全レベルの周波数帯信号がほぼ同時に得られる。
【0099】
このような本発明のウェーブレット変換装置の特質に鑑み、本発明の第3の実施例によれば、ウェーブレット変換と符号化復号化処理との処理時間の差を吸収するために、図36に簡略化して示すように、フレームメモリ100のキャッシュメモリとして動作するバッファメモリ250が、前記第1実施例又は第2実施例と同様な構成のウェーブレット変換装置101内の主制御部207に付加される。このバッファメモリ250は符号化復号化器102によってアクセス可能とされる。本実施例のウェーブレット変換装置101では、ブロック単位のウェーブレット変換を実行して一部の周波数帯信号データ(例えば高レベルの周波数帯信号データ)をバッファメモリ250に書き込む。このウェーブレット変換と並行して、符号化復号化器102ではバッファメモリ250から取得できるデータはバッファメモリ250から読み込み、それ以外のデータはフレームメモリ100から読み込みながら、符号化復号化処理を実行する。
【0100】
例えば、フレームメモリ100のサイズをX=Y=1024とし、バッファメモリ250にレべル3とレべル4のデータを全て書込むとものとする。この場合、バッファメモリ250の必要サイズは、[128×128(レべル3分)+64×64(レべル4分)]×3(SS係数は符号化復号化されないため、除かれる)=60kB(1k=1024)にすぎない。
【0101】
この場合の処理時間について述べる。従来技術ではウェーブレット変換に10880kクロック(レイテンシ2の場合)かかり、符号化復号化器で処理するデータ数が1024k−16k(SSデータ分)=1008kであるので、1データの符号化復号化に要する時間を10クロックとすると、符号化復号化器での処理時間は10080kクロックとなる。したがって、ウェーブレット変換と符号化復号化処理のトータル時間は20960kクロックとなる。
【0102】
これに対し、本実施例においては、ウェーブレット変換装置101が前記第2実施例の構成であるとすると、ウェーブレット変換の処理時間は3762.5625kクロックとなる。前述のように、レべル3及びレべル4のサイズに対応したバッファメモリ250を用意した場合、そのデータ数は240kBであるので、その符号化復号化処理にかかる時間は2400kクロックとなるが、符号化復号化処理はウェーブレット変換と並列に行われるから、この2400kクロックはウェーブレット変換のための時間に包含される。レべル1及びレべル2で処理すべきデータ数は960kBであるので、その符号化復号化処理にかかる時間は9600kクロックとなる。したがって、トータルの処理時間は、この9600kクロックにウェーブレット変換の処理時間3762.5625kクロックを加えた13362.5625kクロックとなり、従来技術に比べて約64%まで短縮される。このように、処理全体を大幅に高速化できる。
【0103】
【発明の効果】
請求項1乃至5の各項記載の発明によるウェーブレット変換装置は、複数の演算要素を利用してブロック単位で所望レベルまでのウェーブレット変換処理を高速に行うことができるとともに、フレームメモリからのデータの読み込みもフレームメモリへの周波数帯信号の書き戻しもブロック単位で行うためレイテンシの影響を回避することができるため、フレームメモリに対するメモリアクセスも含めた処理全体を従来より大幅に高速化することができ、またブロック単位で全ウェーブレット・レベルの周波数帯信号がほぼ同時に得られる。請求項2記載の発明によるウェーブレット変換装置は、2つの隣接ブロックを連続的に処理しながらフレームメモリに対する読み書きを並行して行うことにより、処理速度をさらに高速化することができる。請求項3又は4記載の発明によるウェーブレット変換装置は、第1演算要素におけるウェーブレット変換処理を高速化することができるため、処理速度の一層の高速化が可能である。請求項6又は7記載の発明による符号化復号化装置は、ウェーブレット変換処理が高速化されるとともに、ブロック単位で全ウェーブレット・レベルの周波数帯信号が同時にフレームメモリ上に得られるため、符号化処理をウェーブレット変換処理の開始後すぐに開始しウェーブレット変換処理と並行して実行可能であり、したがって従来よりもはるかに高速な動作が可能である。特に、ウェーブレット変換装置によって周波数帯信号が重要度順にソートされた状態でフレームメモリに書き戻される場合には、符号化復号化器のフレームメモリへのアクセスを高速化できるため、非常に高速な処理が可能である。また、請求項7記載の発明による符号化復号化装置は、バッファメモリより取得可能なデータについてはフレームメモリをアクセスする必要がなくなるため、さらに高速な動作が可能である、等々の効果を得られる。
【図面の簡単な説明】
【図1】本発明による符号化復号化装置の全体構成の一例を示す図である。
【図2】本発明の第1の実施例によるウェーブレット変換装置の内部構成を示すブロック図である。
【図3】本発明の第1の実施例による演算要素(E)の内部構成を示すブロック図である。
【図4】ワークメモリ(L1_0,L1_1)、キャッシュメモリ(CM1,CM3,CM4)のサイズの説明図である。
【図5】キャッシュメモリ(CM2)のサイズの説明図である。
【図6】ワークメモリ(L2_0,L2_1)のサイズの説明図である。
【図7】ワークメモリ(L3_0,L3_1)のサイズの説明図である。
【図8】ワークメモリ(L4_0,L4_1)のサイズの説明図である。
【図9】フレームメモリのサイズの説明図である。
【図10】カレントメモリのサイズの説明図である。
【図11】本発明の第1の実施例による演算要素(A〜D,F〜I)の内部構成を示すブロック図である。
【図12】16×16サイズのブロック1個あたりのレベル3までの周波数帯信号のマッピングの一例を示す図である。
【図13】最初のブロック行の左端の2ブロックの処理を説明するための図である。
【図14】最初のブロック行の次の2ブロックの処理を説明するための図である。
【図15】最初のブロック行の右端の2ブロックの処理を説明するための図である。
【図16】2番目のブロック行の左端の2ブロックの処理を説明するための図である。
【図17】2番目のブロック行の次の2ブロックの処理を説明するための図である。
【図18】2番目のブロック行の右端の2ブロックの処理を説明するための図である。
【図19】最後のブロック行の左端の2ブロックの処理を説明するための図である。
【図20】最後のブロック行の次の2ブロックの処理を説明するための図である。
【図21】最後のブロック行の右端の2ブロックの処理を説明するための図である。
【図22】キャッシュメモリ(CM1〜CM4)によるデータのキャッシュを説明するための図である。
【図23】ウェーブレット変換装置のタイミングチャートである。
【図24】ウェーブレット変換装置のタイミングチャートである。
【図25】ウェーブレット変換装置のタイミングチャートである。
【図26】本発明の第1の実施例における演算要素(E)のタイミングチャートである。
【図27】処理時間を説明するためにフレームメモリを複数の部分に分割した図である。
【図28】演算要素(E)の各ワークメモリに得られる周波数帯信号のマッピングを示す図である。
【図29】周波数帯信号のアライメントの説明図である。
【図30】ビットプレーンの説明図である。
【図31】本発明の第2の実施例における演算要素(E)の内部構成を示すブロック図である。
【図32】本発明の第2の実施例における演算要素(E)内のワークメモリを構成するSS,DS,SD,DDメモリへのデータの振り分け方を示す図である。
【図33】水平処理時のフィルタの入出力の接続方法を示す図である。
【図34】垂直処理時のフィルタの入出力の接続方法を示す図である。
【図35】本発明の第2の実施例における演算要素(E)のタイミングチャートである。
【図36】本発明の第3の実施例による符号化復号化装置及びウェーブレット変換装置の構成を示す図である。
【図37】従来のウェーブレット変換装置の一般的構成を示す図である。
【図38】ウェーブレット変換の水平処理及び垂直処理のためのフィルタ演算の説明図である。
【図39】ウェーブレット変換前のイメージデータのメモリマップの一例を示す図である。
【図40】1S係数及び1D係数のためのメモリマップの一例を示す図である。
【図41】1SS係数、1SD係数、1DS係数及び1DD係数のためのメモリマップの一例を示す図である。
【図42】2S係数及び2D係数のためのメモリマップの一例を示す図である。
【図43】2SS係数、2SD係数、2DS係数及び2DD係数のためのメモリマップの一例を示す図である。
【図44】従来の一般的なウェーブレット変換装置のタイミングチャートである。
【図45】レベル4までの周波数帯信号の一般的なメモリマップを示す図である。
【図46】レベル4までの周波数帯信号を重要度の高い順に書き戻した場合のメモリマップの一例を示す図である。
【符号の説明】
100 フレームメモリ
101 ウェーブレット変換装置
102 符号化復号化器
200 演算部
201a〜201i 演算要素(A〜I)
202 カレントメモリ
203 キャッシュメモリ(CM1)
204 キャッシュメモリ(CM2)
205 キャッシュメモリ(CM3)
206 キャッシュメモリ(CM4)
207 主制御部
210 SS計算部
211 制御部
213 フィルタ(1)
214 フィルタ(2)
216 ワークメモリ(L1_0)
217 ワークメモリ(L1_1)
218 ワークメモリ(L2_0)
219 ワークメモリ(L2_1)
220 ワークメモリ(L3_0)
221 ワークメモリ(L3_1)
222 ワークメモリ(L4_0)
223 ワークメモリ(L4_1)
230 SS計算部
231 制御部
233 ワークメモリ(L4_0)
234 ワークメモリ(L4_1)
250 バッファメモリ
[0001]
BACKGROUND OF THE INVENTION
The present invention generally relates to systems in general that use wavelet transform, and more particularly to a wavelet transform device and an encoding / decoding device used in a compression / decompression system for image data and the like.
[0002]
[Prior art]
The wavelet transform is attracting attention because it has a feature that the frequency domain and the time domain can be expressed at the same time. In particular, data compression applications are very useful for storing and transmitting large amounts of data. For example, the time required for facsimile transmission of a document or transmission of an image such as the World Wide Web can be drastically shortened if the number of bits required for reproduction of the image is lost 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 into output codewords. Quantization aims to remove important feature quantities while preserving important feature quantities of data. Prior to quantization, transformation is used for energy concentration, and DCT (Discrete Cosine Transform) is adopted as this transformation. However, various disadvantages have been pointed out with respect to JPEG using DCT. For example, there is a problem that block noise or mosquito noise occurs. In the application of image signal processing, there is a focus on pursuing an efficient and highly accurate data compression encoding method that can eliminate these drawbacks. Among these methods, there is a wavelet processing method.
[0004]
When wavelet transform is applied to a two-dimensional signal, a horizontal low-pass signal (horizontal low) and a horizontal high-pass filter HH (horizontal high) are used. S (Smooth) coefficient) and a horizontal high-frequency signal (D (Detail) coefficient), and a vertical low-pass filter VL (Vertical Low) and a vertical high for each S coefficient and D coefficient. Using a low-pass filter VH (Vertical High), the horizontal low range-vertical low range signal (SS coefficient), horizontal low range-vertical high range signal (SD coefficient), horizontal high range-vertical direction The signal is separated into a low frequency code (DS coefficient) and a horizontal high frequency-vertical high frequency signal (DD coefficient). An output obtained by performing horizontal processing and vertical processing once is referred to as level 1 output. The above four types of signals are called frequency band signals. If output of level 2 or higher is desired, this process may be performed recursively on the SS coefficient. In level 2, seven frequency band signals of SS coefficient, 1SD coefficient and 2SD coefficient, 1DS coefficient and 2DS coefficient, 1DD coefficient and 2DD coefficient are obtained. Although the case of using the filter in the horizontal direction first and then using the filter in the vertical direction has been described, this order may be reversed.
[0005]
In an encoding / decoding device using wavelet transform, each frequency band signal obtained through the above process is compressed by an encoding / decoding unit. Compression is performed in units of bits for each frequency band signal. The MSB of the first pixel of a certain frequency band signal is the object of processing. The output is determined by referring to the state of the pixel itself, the state of the surrounding pixels, and the state of the next higher level. Next, the MSB of the second pixel is to be processed, but the state of the pixel processed first is also referred to at this time. Hereinafter, when the process for the region to be encoded is completed, the lowermost (MSB-1) bit of the first pixel is processed. At this time, in addition to the state of the peripheral pixels having the same bit depth, the state of the MSB is also referred to. In this way, encoding is performed up to LSB for the region to be encoded. Decoding is performed through almost the same procedure.
[0006]
FIG. 37 shows a general configuration of a conventional wavelet transform apparatus, which includes a frame memory 400, a control unit 401, and a filter 402. The filter 402 may have any configuration, but here, as the low-pass filter, a 2-tap filter that performs an operation using two sets of data is used. The high-pass filter is a 6-tap filter that uses the current position and the previous and next three sets of data among the S coefficients that are the output of the low-pass filter. Shall be used.
[0007]
FIG. 38 shows an example of wavelet transform processing when the filter is used. (A) shows processing in the horizontal direction, and (b) shows processing in the vertical direction. In FIG. 9A, for example, 00 means the data of the 0th pixel of the 0th line, and 12 means the data of the 2nd pixel of the 1st line (both line and pixel are counted from 0th). To do). In the horizontal processing, the output S00 of the 0th pixel of the horizontal low-pass filter HL is obtained from the data 00 and 01, and the output S01 of the first pixel is the data 02, as shown in FIG. It is obtained from 08. In addition, the output H00 of the 0th pixel of the horizontal Takagi filter HH is obtained from the data before and after data 00 (not existing), data 00 and 01, and data 02 and 03. It is done. In the vertical processing, as shown in FIG. 5B, the output SS00 of the vertical low-pass filter VL is obtained from the data S00 and S10. The output SD00 of the vertical high-pass filter VH is obtained from the data two previous and one previous data S00 (not existing), data S00 and S10, and data S20 and S30.
[0008]
FIG. 39 shows data on the frame memory before the wavelet transform is performed. This data is first processed in the horizontal direction, and the obtained S coefficient and D coefficient are written into the frame memory by mapping as shown in FIG. In FIG. 40, for example, 1S00 means the S coefficient of address 00 of level 1. FIG. 41 shows an example of mapping when writing each coefficient after performing vertical processing. This is the method for storing the coefficients of level 1. FIG. 42 shows an example of a method for storing each coefficient of the level 2 in the horizontal direction. Note that since the level 2 processing is performed only on the 1SS coefficient, the data in the hatched portion is not used. Next, each coefficient of level 2 is stored by mapping as shown in FIG. 43, and the processing of level 2 ends. Thereafter, processing is sequentially performed until a frequency band signal of a desired level is obtained.
[0009]
FIG. 44 shows a timing chart of a conventional general wavelet transform device. The processing time when processing up to level 4 will be described assuming that the data size is 1024 in the pixel direction size X, 1024 in the line direction size Y, and 1 MB in the tour bar.
[0010]
From time t0 to t1, level 1 processing is performed on all data in the frame memory, level 2 processing is performed from time t1 to t2, and level 3 processing is performed from time t2 to t3. Then, level 4 is processed from time t3 to time t4. Since the processing time is X = Y = 1024, 1024 × 1024 × 4 at level 1 (4 breakdown: pixel direction reading, pixel direction writing, line direction reading, and line direction writing), The level 2 is 512 × 512 × 4, the level 3 is 256 × 256 × 4, and the level 4 is 128 × 128 × 4. The total is 5440k clocks (1k = 1024).
[0011]
However, this numerical value is the minimum time when the read / write latency in the line direction with respect to the frame memory is zero. In recent memories such as SDRAM, burst transfer is normally performed, and data transfer in the pixel direction can be performed at high speed, but data transfer in the line direction requires precharge to the sense amplifier, so that latency (delay) is required. Will occur. In order to avoid this, a technique such as bank switching may be used. However, such an effect cannot be expected when access in the line direction occurs continuously like wavelet transform. If the latency is 2, the processing time increases to 10880k clocks. This latency is very difficult to avoid for the reasons described above.
[0012]
In the encoding / decoding device, after the wavelet transform is completed, each frequency band signal written in the frame memory is encoded by the encoding / decoding device. The image signal is increased in compression rate by utilizing the characteristic that the correlation between adjacent pixels, particularly the correlation within the same bit plane is high. For this reason, at the time of encoding, data in a certain area is handled in bit units (any one bit of data of a certain pixel). Decoding is obtained in almost the reverse order of the operations described above.
[0013]
More detailed information regarding the encoding / decoding device, wavelet transform device, and fill-up for wavelet transform related to the present invention can be found in Japanese Patent Laid-Open No. 8-139935. An encoding / decoding device is described in detail in JP-A-9-121168. Further, as publicly known documents concerning similar wavelet transform apparatuses, there are JP-A-3-27687, JP-A-5-167997, JP-A-5-183886, and the like.
[0014]
[Problems to be solved by the invention]
Conventionally, when wavelet transform is performed via a frame memory, as described above, processing in the pixel (horizontal) direction can be performed at a relatively high speed, but processing in the line (vertical) direction can be performed at the time of frame memory access. Occurs, and the total processing time becomes very long. In addition, since processing is performed in order of level, it takes time until a high-level frequency band signal is obtained, and there has been a problem that encoding / decoding processing cannot be started until then.
[0015]
Therefore, an object of the present invention is to provide a wavelet transform apparatus that can solve the latency problem and can perform high-speed wavelet transform processing even when a memory such as an SDRAM is used as the frame memory. Another object of the present invention is to provide a high-speed wavelet transform apparatus capable of obtaining frequency band signals of all levels at substantially the same time. Another object of the present invention is to provide a high-speed encoding / decoding device using wavelet transform.
[0016]
[Means for Solving the Problems]
  According to the first aspect of the present invention, data is read in units of blocks from a frame memory, wavelet transform processing of n levels (n is an integer of 3 or more) is performed, and the obtained frequency band signal of wavelet transform coefficients of n levels is the frame. A wavelet transform device for writing back to a memory, comprising: a memory for temporarily storing data read from the frame memory; and a computing unit comprising at least one first computing element and a plurality of second computing elements. The plurality of second calculation elements calculate low frequency band signals in wavelet transform coefficients of level (n−1), respectively, from data of blocks around the target block read from the frame memory, and The arithmetic element is an n-level way for the data of the block of interest read from the frame memory. The level n wavelet transform process is calculated by the level (n-1) low frequency band signal obtained by the first computation element and the plurality of second computation elements. And the total frequency band signal of the n-level wavelet transform coefficient is calculated using the low-frequency band signal of level (n-1), and all the n-level signals obtained by the wavelet transform processing of the first calculation element are calculated. The frequency band signal is written back to the frame memory in units of blocks.
[0017]
  The invention according to claim 2 is the wavelet transform device according to claim 1, wherein the first calculation element includes two work memories corresponding to each level, and the second calculation element includes two work memories. Wavelet transform processing is continuously performed on two adjacent blocks of data in the frame memory, and wavelet transform processing, data reading from the frame memory, and frequency band signal writing back to the frame memory are performed in parallel. It is characterized by being performed.
[0018]
  According to a third aspect of the present invention, in the wavelet transform device according to the second aspect, the first calculation element is used for a first filter used for a level 1 wavelet transform process and a level 2 to n wavelet transform process. A second filter and means for calculating a low frequency band signal at each level, wherein in the first computing element, a level 1 wavelet transform process and a level 2 to n wavelet transform for the data of the block of interest The processes are executed in parallel.
[0019]
  According to a fourth aspect of the present invention, in the wavelet transform device according to the second aspect, the work memory corresponding to each level of the first arithmetic element is divided into four memories that can be accessed independently, and the first arithmetic element Includes a first filter used for level 1 wavelet transform processing and a second filter used for level 2 to n wavelet transform processing, and the wavelet transform processing is performed in parallel using the two filters. It is executed.
[0020]
  A fifth aspect of the present invention is the wavelet transform apparatus according to the first, second, or third aspect, wherein the buffer memory temporarily stores a part of the frequency band signal obtained by the wavelet transform process of the first arithmetic element. The buffer memory is accessible from the outside.
[0021]
  The invention of claim 65. A coding / decoding device comprising: a frame memory; the wavelet transform device according to claim 1, 2, 3, or 4 that can access the frame memory; and the coding / decoding device that can access the frame memory. And
[0022]
  According to a seventh aspect of the present invention, there is provided a frame memory, the wavelet transform apparatus according to the fifth aspect capable of accessing the frame memory, and an encoding / decoder capable of accessing the frame memory and a buffer memory of the wavelet transform apparatus. The encoding / decoding device is provided.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. For simplicity, the same or similar reference numerals are used for the same or corresponding parts in a plurality of drawings in the accompanying drawings.
[0024]
  Note that a 2-tap low-pass filter and a 6-tap high-pass filter are respectively used as filters for horizontal processing and vertical processing of wavelet transform. Wavelet transformation is performed up to level 4.That is, n = 4.Of course, the number of levels isn = 3 or moreYou can set any number. The present invention is more effective as the number of levels increases.
[0025]
FIG. 1 shows an example of the overall configuration of an encoding / decoding device according to the present invention. At the time of encoding, data data is written to the frame memory 100 from the outside. Data is read into the wavelet transform apparatus 101 according to the present invention in units of blocks, wavelet transform processing is performed in units of blocks, and the obtained frequency band signals of all wavelet levels are written back to the frame memory 100 in units of blocks. This frequency band signal is encoded by the encoder / decoder 102 and output to the outside as a code stream code. At the time of decoding, the code stream code input from the outside is decoded by the encoder / decoder 102, and each frequency band signal of the wavelet transform is restored on the frame memory 100. These waveband signals are subjected to inverse wavelet transform by the wavelet transform device 101, the original data is restored on the frame memory 100, and is output to the outside as data.
[0026]
The wavelet transform apparatus 101 according to the present invention performs wavelet transform processing in units of blocks, and writes back frequency band signals of all wavelet levels to the frame memory 100 in units of blocks. Therefore, the encoder / decoder 102 can start the encoding process immediately after starting the wavelet transform process, and can execute the encoding process in parallel with the wavelet transform process. The start of the encoding process is not waited until the band signal is obtained. Therefore, as described later, coupled with the fact that the wavelet transform apparatus 101 according to the present invention is high-speed, the encoding / decoding apparatus according to the present invention can operate at a much higher speed than before.
[0027]
According to the first embodiment of the present invention, the wavelet transform apparatus 101 has an internal configuration as shown in FIG. The wavelet transform device 101 includes an arithmetic unit 200, a current memory 202 for temporarily storing data read from the frame memory 100, and cache memories (CM1, CM2, CM3, CM4) 203, 204, 205, 206. The main control unit 207 performs timing control of the entire apparatus and data transfer control inside and outside the apparatus. The arithmetic unit 200 includes 3 × 3 arithmetic elements (A, B, C, D, E, F, G, H, and I) 201a, 201b, 201c, 201d, 201e, 201f, 201g, 201h, and 201i. .
[0028]
According to the first embodiment of the present invention, the calculation element (E) 201e is configured as shown in FIG. As shown in FIG. 3, the calculation element (E) 201e includes a control unit 211 including an SS calculation unit 210, a filter (1) 213 used for level 1 horizontal processing and vertical processing, and levels 2, 3, and 4. The filter (2) 214 used for horizontal processing and vertical processing is provided, and two work memories corresponding to each level are provided. That is, the work memory (L1_0) 216 on the 0th surface and the work memory (L1_1) 217 on the 1st surface as the work memory corresponding to the level 1, and the work memory (L2_0) 218 on the 0th surface as the work memory corresponding to the level 2 Work memory (L2_1219) on the first side, level 3 compatible work memory, work memory (L3_0) 220 on the 0th side, work memory (L3_1) 221 on the first side, level 4 compatible work memory, A work memory (L4_1) 222 on the 0th surface and a work memory (L4_1) 223 on the first surface are provided. The control unit 211 is a part that transfers data inside the computing element (E) 201e, controls the operation timing of the SS calculation unit 210, and exchanges data with the main control unit 207. The SS calculation unit 210 is a part that calculates SS data of levels 1, 2, and 3.
[0029]
According to the first embodiment of the present invention, the work memories (L1_0, L1_1) 216, 217 and the cache memories (CM1, CM3, CM4) 203, 205, 206 corresponding to level 1 are as shown in FIG. This is a memory having a size of a (pixel direction) × a (line direction). The cache memory (CM2) 204 is a memory having a size as shown in FIG. The work memories (L2_0, L2_1) 218 and 219 corresponding to level 2 are memories having a size of a / 2 × a / 2 as shown in FIG. The work memories (L3_0, L3_1) 220 and 221 corresponding to the level 3 have a / 4 × a / 4 size as shown in FIG. As shown in FIG. 8, the size of the work memory (L4_0, L4_1) 222, 223 corresponding to level 4 is a / 8 in both the pixel direction and the line direction. FIG. 9 is a diagram showing the size of the frame memory 100, where the size in the pixel direction is X and the size in the line direction is Y. FIG. 10 is a diagram showing the size of the current memory 202, where the size in the pixel direction is X and the size in the line direction is a.
[0030]
According to the first embodiment of the present invention, calculation elements (A to D, F to I) 201a to 201d and 201f to 201i other than the calculation element (E) 201e are respectively SS calculation units as shown in FIG. 230, and a two-sided work memory of a / 8 × a / 8 size, that is, a zeroth-side work memory (L4_0) 233 and a first-side work memory (L4_1) 234. . The SS calculation unit 230 is a part that calculates wavelet level 3 SS data. The control unit 231 is a part that controls data transfer inside the computation element, controls the operation timing of the SS calculation unit 230, and exchanges data with the main control unit 207. The SS data calculated by the SS calculation unit 230 is stored in the work memory (l4_0, L4_1) 233, 234.
[0031]
The wavelet transform apparatus 101 according to the present invention having such a configuration performs processing in units of blocks of size a × a. The basic size “a” is determined based on the number of taps of the filter used for the wavelet transform and the desired number of wavelets and levels. There is a merit that the smaller a is, the smaller the size of each memory in the wavelet transform apparatus 101 is. However, when a is determined, the processing speed must also be taken into consideration. Specifically, it may be better to make a decision based on the concept described below.
[0032]
Since the best wavelet level desired is 4 and the high-pass filter is 6 taps, if there are 6 SS data for level 3, SS, SD, One DS and one DD data can be obtained. The minimum size of the original data for this is 48 × 48 (3 × 3 blocks of 16 × 16 size). That is, a = 16 is the minimum size. Hereinafter, description will be made assuming that a = 16. If the high-pass filter has 10 taps and the desired maximum level is 5, the minimum size of the original data is 160 × 160 (5 × 5 blocks of 32 × 32 size), and a = 32.
[0033]
When a = 16 and X = Y = 1024, the number of words in the memory inside the wavelet transform device 101 (bit depth varies depending on the filter configuration) is as follows. First, in the calculation element (E) 201e,
16 × 16 × 2 = 512 words in work memory (L1_0, L1_1)
8 × 8 × 2 = 128 words in work memory (L2_0, L2_1)
4 × 4 × 2 = 32 words in work memory (L3_0, L3_1)
2 × 2 × 2 = 8 words in work memory (L4_0, L4_1)
It becomes. In each of the other calculation elements (A to D, F to I) 201a to 201d and 201f to 201i, 2 × 2 × 2 = 8 words in the work memory (L4_0, L4_1). Therefore, the total number of words in the work memory of all arithmetic units is 744 words. 16 × 16 × 8 = 768 words in the cache memories (CM1, CM3, CM4) 203, 205, and 206, 32 × 64− (16 × 16) = 1792 words in the cache memory (CM2) 204, and therefore 2560 in the entire cache memory Become a word. The current memory 202 is 1024 × 16 = 16384 words. Therefore, the total number of memory words in the wavelet transform apparatus 101 is 19688 words, and if 1k = 1024, a very small memory amount of just over 19k words is sufficient. This numerical value is independent of the size of the frame memory 100 in the line direction and depends only on the size of the pixel direction.
[0034]
The outline of the operation of the wavelet transform apparatus 101 is as follows. The data on the frame memory 100 is divided into blocks of 16 × 16 (a × a) size, and the wavelet transform processing for the central block in the 3 × 3 blocks is executed by the arithmetic element (E) 201e and the surroundings The calculation of level 3 SS data for the eight blocks is performed by the arithmetic elements (A to D, F to I) 201a to 201d and 201f to 201i. The computation element (E) 201e can perform wavelet transform processing using only the original data of the corresponding block up to level 3, but since the size of the original data is 16 × 16, 2 × 2 in level 3 (FIG. 12 shows an example of mapping of frequency band signals up to level 3 per block of 16 × 16 size. This includes 2 × 2 SS data. It is understood that) Due to the relationship of using a 6-tap high-pass filter, at least 6 × 6 level 3 SS data are required for level 4 conversion. The computation element (E) 201e is stored in the work memory (L4_0 or L4_1) 233 or 234 inside the computation elements (A to D, F to I) 201a to 201d and 201f to 201i as the insufficient level 3 SS data. By using the obtained SS data, level 4 conversion processing is executed. Thus, the frequency band signals from level 1 to bell 4 for one block obtained in the work memory inside the arithmetic element (E) 201e are written back to the corresponding area of the frame memory 100.
[0035]
In the present embodiment, in order to continuously execute the wavelet transform processing up to level 4 by such an arithmetic element (E) 201e on two blocks adjacent in the horizontal direction, as described above, The calculation element (E) 201e has two work memories corresponding to each level, and each of the other calculation elements also has two work memory of 2 × 2 size. In addition, the computation element (E) 201e can perform level 1 conversion and other level conversion at high speed by parallel processing, and can perform level 2 to level 4 conversion in any order. In order to achieve this, as described above, two independent filters 213 and 214 for horizontal processing and vertical processing are provided, and an SS calculation unit 210 that calculates SS data of levels 1, 2, and 3 is provided. ing.
[0036]
Since the conversion data obtained in the work memory inside the calculation element (E) 201e is sequentially written back to the frame memory 100 in units of blocks, some of the calculation elements required for processing of other blocks The original data is overwritten. The current memory 202 and the cache memories (CM1 to CM4) 203 to 206 as described above are used in order to avoid such temporary storage of the original data that is rewritten and rereading of the read data. The main control unit 207 operates so as to always prepare original data for 3 × 3 blocks (by mirroring for nonexistent data), and the data in the memory and the frame memory 100 are sent to the arithmetic elements 201a to 201i. It works to distribute. This distribution method differs depending on which block data in the frame memory 100 is processed, as described below.
[0037]
13 to 21 are diagrams for explaining the progress of the processing. As described above, the calculation element (E) 201e has two levels of work memory corresponding to each level, and the other calculation elements (A to D, F to I) 201a to 201d and 201f to 201i have work memories. Two are available. The grids of 3 × 3 solid lines in FIG. 13 to FIG. 21 represent 3 × 3 blocks corresponding to the computation elements (A to I) 201a to 201i related to the processing using the work memory on the 0th plane side. The 3 × 3 dotted grid indicates the positions of the blocks corresponding to the calculation elements (A to I) 201a to 201i in the processing using the work memory on the first surface side. In FIG. 13 to FIG. 21, 0_0, 1_0, etc. are block names, the number on the front side of the block name is the block address in the line direction (vertical direction), and the number on the back side is the block in the pixel direction (horizontal direction). -Indicates an address.
[0038]
FIG. 22 shows how the cache memories (CM1 to CM4) 203 to 206 are allocated for caching the original data necessary for the arithmetic elements (A to I) 201a to 201i. A0 to I0 mean data required when the arithmetic elements (A to I) 201a to 201i use the work memory on the 0th plane, and A1 to I1 denote arithmetic elements (A to I) 201a to 201i. Means data required when the work memory of the first surface is used.
[0039]
23 to 25 are timing charts of the wavelet transform device 101. FIG. In FIG. 23 to FIG. 25, for example, a portion in which only a block name such as 0_0 is written or a portion in which R is written represents reading (READ) from the frame memory 100, the current memory 202, or the cache memories 203 to 206. The part with W on the name indicates writing (WRITE), and the part with OW indicates overwriting (OVERWRITE). Hereinafter, the operation will be described in order with reference to FIGS. 13 to 21 and the timing chart.
[0040]
<FIG. 13> This is processing of the two leftmost blocks in the first block row. 23, data of the 0_0 block is read from the frame memory 100, sent to the computation elements (E, D) 201e and 201d, and written to the current memory 202. In the arithmetic element (E) 201e, the 0-0 block data is read into the work memory (L1_0) 216. In the arithmetic element (D) 201d, the SS calculation unit 230 calculates the level 3 SS data using the 0-0 block data, and stores the obtained 2 × 2 SS data in the work memory (4L_1) 234. To do. In the timing chart, “A0 to I0” represents the timing at which the original data is written to the work memory on the 0th surface of the calculation element or the calculated SS data is written to the work memory on the 0th surface. “I1” represents the timing at which the original data is written into the work memory on the first surface of the computing element or the calculated SS data is written into the work memory on the first surface.
[0041]
Next, 0_1 block data is read from the frame memory and
(F) sent to 201 f and computing element (E) 201 e and written to current memory 202 and cache memory (CM 2) 204. The arithmetic element (E) 201e reads the data into the work memory (L1_1) 217. In the calculation element (F) 201f, the SS calculation unit 230 calculates SS data of level 3 from 0_1 data, and stores it in the work memory (L4_0) 233.
[0042]
Next, 1_0 block data is read from the frame memory 100 and sent to the computation element (G) 201g and the computation element (H) 201h. The arithmetic element (G) 201g calculates level 3 SS data and stores it in the work memory (L4_1) 234, and the arithmetic element (H) 201h calculates level 3 data and stores it in the work memory (L4_0) 233. .
[0043]
Next, 1_1 block data is read from the frame memory 100, sent to the computation element (I) 201i and the computation element (H) 201h, and written to the cache memory (CM2) 204. The arithmetic element (I) 201i calculates level 3 SS data and stores it in the work memory (L4_0) 233, and the arithmetic element (H) 201h calculates SS data and stores it in the work memory (L1_1) 234.
[0044]
Although not clearly shown in the timing chart, in parallel with the reading of the above four blocks of data, the main control unit 207 controls the 0th surface of the calculation elements (A to D, G) 201a to 201d and 201g. The mirroring data of the corresponding block that does not actually exist is written into the work memory (L1_0) 233 and the work memory (L1_1) 234 on the first surface of the arithmetic elements (A, B) 201a and 201b.
[0045]
In this way, when preparation of data for the processing of the 0_0 block and the 0_1 block is completed, the arithmetic element (E) 201e first starts wavelet transform processing for the 0_0 block using the work memory on the 0th plane. “Cal — 0” in FIG. 23 represents the timing, and details of the processing will be described later.
[0046]
When the wavelet transform of the 0_0 block is completed, the data obtained in the work memory (L1_0, L2_0, L3_0, L4_0) 216, 218, 220, 222 on the 0th surface of the computation element (E) 201e is immediately written to the frame memory 100. Returned. The data of the work memory (L4_0) 233 on the 0th plane in these work memories and the other calculation elements (A to D, F to I) 201a to 201d and 201f to 201i are discarded.
[0047]
In parallel with the wavelet transform of the 0_0 block, the data of the 0_2 block is read from the frame memory 100, sent to the computing element (F) 201f, and written to the current memory 202 and the cache memory (CM2) 204. In the calculation element (F) 201f, SS data is calculated and stored in the work memory (L4_1) 234.
[0048]
Subsequently, 1_2 block data is read from the frame memory 100, sent to the computation element (I) 201i, SS data is calculated by the computation element (I) 201i, and written to the work memory (L4_1) 234, At the same time, 1_2 blocks of data are written into the cache memory (CM2) 204. Although not shown in the figure, when the 0_2 block is read, the mirroring data of the nonexistent block corresponding to the calculation element (C) 201c is given to the calculation element, and the SS data is calculated. (L4_1) 234 is stored.
[0049]
When the wavelet transform for the 0_0 block is completed, the computation element (E) 201e uses the work memory (L1_1, L2_1, L3_1, L4_1) 217, 219, 221, 223 on the first surface, and the wavelet for the 0_1 block. Start conversion. “Cal — 1” in FIG. 23 indicates the timing. When the wavelet transform of the 0_1 block is completed, the data obtained in the work memory (L1_1, L2_1, L3_1, L4_1) 217, 219, 221, 223 of the first surface of the computation element (E) 201e is immediately stored in the frame memory 100. Will be written back. Data in the work memory (L4_1) 234 on the first surface in the other arithmetic elements (A to D, F to I) 201a to 201d and 201f to 201i is discarded.
[0050]
In parallel with the wavelet transform of the 0_1 block, the data of the 0_1 block and the 1_1 block are read from the cache memory (CM2) 204 for the next wavelet transform of the 0_2 block, and the calculation elements (D, G) The data is transferred to 201d and 201g, respectively, and the mirroring data of 0_1 block is transferred to the arithmetic element (A) 201a. The computation element (D) 201d calculates the level 3 SS data from the 0_1 block data and stores it in the internal work memory (L4_0) 234, and the computation element (G) 201g calculates the SS data from the 1_1 block data. And stored in the internal work memory (L4_0) 234. The arithmetic element (A) 201a calculates the level 3 SS data of the mirroring data and stores it in the work memory L4_0) 234.
[0051]
When the wavelet transform of the 0_1 block is completed, the data of the 0_2 block and the 1_2 block are read from the cache memory (CM2) 204 for the wavelet transform of the 0_2 block and the 0_3 block, and the calculation elements (E, D) 201e, 201d And arithmetic elements (H, G) 201h and 201g, respectively. Also, the 0_2 block mirroring data is transferred to the arithmetic elements (A, B) 201a and 201b. The calculation element (E) 201e reads the data of the 0_2 block into the work memory (L1_0) 216, and the calculation element (D) 201d calculates the SS data from the data of the 0_2 block and stores it in the work memory (L4_1) 234. The element (H) 201h calculates SS data from the data of the 1_2 block and stores it in the work memory (L4_0) 233, and the calculation element (G) 201g calculates SS data of the 1_2 block and stores it in the work memory (L4_1) 234. Store. The arithmetic element (B) 201b calculates the SS data of the mirroring data and stores it in the work memory (L4_0) 233, and the arithmetic element (A) 201a calculates the SS data of the mirroring data and calculates the work memory (L4_1). ) 234. The processing up to this point is time t3, and wavelet transform data up to level 4 of the 0_0 block and the 0_1 block is obtained on the frame memory 100.
[0052]
<FIG. 14> This is processing of the 0_2 block and the 0_3 block on the right of the two blocks. Blocks in which processing has already been completed and data in the frame memory 100 has been rewritten are shown in FIG. 14 by shading (the same applies to FIGS. 15 to 21).
[0053]
From time t3, 0_3 block data is read from the frame memory 100, transferred to the computation elements (E, F) 201e, 201f, and written to the cache memory (CM2) 204 and the current memory 202. The 0_3 block mirroring data is also transferred to the computation elements (B, C) 201b and 201c. The calculation elements (C, F) 201c and 201f store SS data calculated from the input data in the work memory (L4_0) 233, and the calculation element (E) 201e stores the input data in the work memory (L1_1) 217 and perform the calculation. The element (B) 201b stores the SS data calculated from the input data in the work memory (L4_1) 234. Subsequently, 1_3 block data is read from the frame memory 100, transferred to the arithmetic elements (H, I) h, i, and written to the cache memory (CM 2) 204. The arithmetic element (H) 201h stores the calculated SS data in the work memory (L4_1) 234, and the arithmetic element (I) 201i stores the calculated SS data in the work memory (L4_0) 233.
[0054]
At this point, wavelet transform of the 0_2 block starts. At the same time, the data of the 0_4 block and the 1_4 block are read from the frame memory 100, and the mirroring data of the 0_4 block is transferred to the calculation element (C) 201c.
[0055]
When the wavelet transform of the 0_2 block is completed, the wavelet transform of the 0_3 block is started, and the converted data of the 0_2 block is written back to the frame memory 100. In parallel with the 0_3 block processing, the same data transfer as in the 0_1 block processing is performed for the next block processing. By time t4, writing back of the converted data of the 0_3 block to the frame memory 100 is completed. Between time t4 and t5, the 0_4 block and the 0_5 block are processed in the same way.
[0056]
<FIG. 15> This is processing of two blocks at the right end of the first block row. Since the operation is almost the same as in FIGS. 13 and 14, the details are omitted. However, as shown from time t7 to time t8 in the timing chart shown in FIG. 24, data corresponding to the calculation elements (F, I) 201f and 201i for the processing of the 0_63 block does not actually exist, and the mirror processing is performed. Therefore, the data read from the frame memory 100 is small.
[0057]
<< FIG. 16 >> Processing of the first two blocks in the next block row. This corresponds to the period from time t8 to t9 in the timing chart of FIG. 1_0 block data is read from the frame memory 100, written to the work memory (L1_0) 216 and the cache memory (CM3) 205 of the computation element (E) 201e, and also sent to the computation element (D) 201d to be SS. Data is calculated and stored in the work memory (L4_0) 233. In parallel with this, 0_0 block data is read from the current memory 202 and sent to the calculation elements (A, B) 201a and 201b to calculate SS data. The calculation element (A) 201a converts the SS data into the work data. The calculation element (B) 201b stores the SS data in the work memory (L4_0) 233. Further, the mirroring data of the 0_0 block is also sent to the arithmetic element (A) 201a, SS data is calculated, and stored in the work memory (L4_0) 233.
[0058]
Next, 1_1 block data is read from the frame memory 100 and sent to the arithmetic elements (E, F) 201e and 201f, and also written to the cache memories (CM2, CM4) 204 and 206. The calculation element (E) 201e stores the data in the work memory (L1_1) 217, and the calculation element (F) 201f calculates the SS data of the data and stores it in the work memory (L4_0) 233. In parallel with this, 0_1 block data is read from the current memory 202, written to the cache memory (CM2) 204, and sent to the computing elements (B, C) 201b, 201c. The computing element (B) 201b calculates SS data and stores it in the work memory (L4_1) 234, and the computing element (C) 201c calculates SS data and stores it in the work memory (L4_0) 233.
[0059]
Next, 2_0 block data is read from the frame memory 100, sent to the computation elements (G, H) 201g and 201h, and written to the cache memory (CM2) 204, and the 0_2 block data from the current memory 202. Is read and sent to the computing element (C) 201 c and written to the cache memory (CM 2) 204. The calculation elements (C, G) 201c and 201g calculate the SS data of the input data and store it in the work memory (L4_1) 234, respectively, and the calculation element (H) 201h calculates the SS data of the input data and calculates the work memory ( L4_0) 233. The 2_0 block mirroring data is also sent to the computing element (G) 201g, and the SS data is stored in the work memory (L4_0) 233.
[0060]
Next, 2_1 blocks of data are read from the frame memory 100, written to the cache memory (CM2) 204, and sent to the arithmetic elements (H, I) 201h and 201i. Also, 1_0 block data is read from the cache memory (CM3) 205 and overwritten in the current memory 202, and the mirroring data is sent to the computing element (D) 201d. The calculation elements (D, I) 201d and 201i calculate the SS data of the respective input data and store them in the work memory (L4_0) 233, and the calculation element (H) 201h calculates the SS data of the input data and calculates the work memory. Store in (L4_1) 234.
[0061]
From this time point, the computing element (E) 201e starts wavelet transform of the 1_0 block using the work memory (L1_0, L2_0, L3_0, L4_0) 216, 218, 220, 222 on the 0th surface. In parallel with this, 1_2 blocks of data are read from the frame memory 100 and written to the cache memory (CM2) 204 and the current memory 202, and sent to the computing element (F) 201f. The calculation element (F) 201f stores the calculated SS data in the work memory (L4_1) 234. Subsequently, 2_2 blocks of data are read from the frame memory 100, written to the cache memory (CM2) 204 and sent to the arithmetic element (I) 201i, and 1_1 blocks of data are read from the cache memory (CM4) 206. The current memory 202 is overwritten. The arithmetic element (I) 201i calculates the SS data of the input data and stores it in the work memory (L4_1) 234.
[0062]
When the wavelet transform of the 1_0 block is completed, the converted data is written back to the frame memory 100, and the work memory (L1_1, L2_1, L3_1, L4_1) 217, 219, 221 on the first surface is calculated by the computation element (E) 201e. 223 is used to start the wavelet transform of the 1_1 block. In parallel with this conversion processing, preparation for the next 1_2 block is performed. That is, the 0_1 block, the 1_1 block, and the 2_1 block are sequentially read from the cache memory (CM2) 204 and are sent to the calculation elements (A, D, G) 201a, 201d, and 201g, respectively. These calculation elements calculate SS data for each input data and store them in the work memory (L4_0) 233. Then, the conversion data of the 1_1 block is written back to the frame memory 100, whereby the processing for the 1_0 block and the 1_1 block is completed.
[0063]
<FIG. 17> Processing is performed at a position moved to the right by two blocks from the position shown in FIG. This corresponds to the time t9 to t10 in the timing chart of FIG. This processing pattern occupies most of the entire processing (about 88%).
[0064]
First, 0_2 block data is read from the cache memory (CM2) 204 and sent to the computation elements (B, A) 201b and 201a. The computation element (B) 201b sends the calculated SS data to the work memory (L4_0) 233. In the arithmetic element (A) 201a, the calculated SS data is stored in the work memory (L4_1) 234. Next, 1_2 blocks of data are read from the cache memory (CM2) 204, written to the work memory (L1_0) 216 of the computing element (E) 201e, and sent to the computing element (D) 201d. The computing element (D) 201d stores the calculated SS data in the work memory (L4_1) 234. Next, 2_2 blocks of data are read from the cache memory (CM2) 204 and sent to the calculation elements (G, H) 201g and 201h. The calculation element (H) 201h stores the calculated SS data in the work memory (L4_0). ) And the calculated SS data is stored in the work memory (L4_1) 234 in the calculation element (G) 201g. Next, 0_3 block data is read from the current memory 202, written to the cache memory (CM2) 204 and sent to the computation elements (B, C) 201b and 201c, and the computation element (B) 201b calculates the calculated SS. Data is stored in the work memory (L4_1) 234, and the computing element (C) 201c stores the calculated SS data in the work memory (L4_0) 233.
[0065]
Next, 1_3 block data is read from the frame memory 100 and written to the current memory 202, the cache memory (CM2) 204, and the work memory (L1_1) 217 of the calculation element (E) 201e, and the calculation element (F) 201f. Sent to. The computing element (F) 201f stores the calculated SS data in the work memory (L4_1) 234.
[0066]
Next, the 2_3 block is read from the frame memory 100, written to the cache memory (CM2) 204, and sent to the arithmetic elements (H, I) 201h and 201i. The computing element (I) 201i stores the calculated SS data in the work memory (L4_0) 233, and the computing element (H) 201h stores the calculated SS data in the work memory (L4_1) 234.
[0067]
When such processing is completed, the calculation element (E) 201e uses the work memory (L1_0, L2_0, L3_0, L4_0) 216, 218, 220, and 222 on the 0th plane and starts wavelet transform of the 1_2 block. To do. In parallel with this wavelet transform, 1_4 block data is read from the frame memory 100, written to the cache memories (CM2, CM3) 204, 205, and sent to the calculation element (F) 201f to calculate SS data. And stored in the work memory (L4_1) 234. Next, 2_4 blocks of data are read from the frame memory 100, sent to the arithmetic element (I) 201i, and written to the cache memory (CM2) 204. The computing element (I) 201i stores the calculated SS data in the work memory (L4_1) 234.
[0068]
Then, the wavelet transform for the 1_2 block is completed, and the converted data is written back to the frame memory 100. At the same time, the 0_4 block data is read from the current memory 202 and stored in the cache memory (CM2) 204. The SS data is written and sent to the arithmetic element (C) 201c, and the SS data is calculated and stored in the work memory (L4_1) 234. Subsequently, 1_4 data is read from the cache memory (CM 3) 205 and written to the current memory 202.
[0069]
The computing element (E) 201e starts wavelet transform for the 1_3 block using the work memory (L1_1, L2_1, L3_1, L4_1) 217, 219, 221, and 223 on the first surface. An operation for preparing a process for the next 1_4 block is performed. That is, data of the 0_3 block, 1_3 block, and 2_3 block are sequentially read from the cache memory (CM2) 204 and sent to the calculation elements (A, D, G) 201a, 201d, and 201g, respectively, and SS data is calculated. . The calculated SS data is stored in the work memory (L4_0) 233 of the computation elements (A, D, G) 201a, 201d, 201g, respectively. Then, the wavelet transform process for the 1_3 block is completed, and the converted data is written back to the frame memory 100.
[0070]
FIG. 18 is a process for the rightmost two blocks of the second block row. Since the operation in this case will be clear from the above description, the description is omitted.
[0071]
The processes corresponding to FIGS. 16 to 18 are repeated up to the block row immediately before the last block row.
[0072]
<FIG. 19> This is processing for the two leftmost blocks in the last block row. Since the operation in this case is almost the same as the case of FIG. 13, the description and timing chart are omitted.
[0073]
<< FIG. 20 >> The process for the next two blocks is shown. Since the operation in this case is almost the same as that in FIG. 14, the description and the timing chart are omitted.
[0074]
<FIG. 21> This is processing for the two blocks at the right end, but the operation in this case is almost the same as in FIG. 15, so the description and timing chart are omitted.
[0075]
FIG. 26 is a timing chart of wavelet transform processing in the calculation element (E) 201e. During the period from time t0 to t1, level 1 horizontal processing is performed on the data written in the work memory (L1_0 or L1_1) 216 or 217 using the filter (1) 213. In parallel with this horizontal processing, SS data of levels 1, 2, and 3 is calculated using the SS calculation unit 210, and the obtained SS data of levels 1, 2, and 3 is the work memory (L2_0 or L2_1) 218. Or 219, work memory (L3_0 or L3_1) 220 or 221, and work memory (L4_0 or L4_1) 222 or 223, respectively.
[0076]
Level 1 SS data is obtained by calculating the average value of two original data adjacent in the horizontal direction to obtain S data, and then calculating the average value of two adjacent S data in the vertical direction. It is done. That is, an average value of 2 × 2 original data is calculated. For level 2 SS data, the average value of two level 1 SS data adjacent in the horizontal direction is calculated to obtain S data, and then the average value of two adjacent S data in the vertical direction is calculated. It is obtained by doing. That is, an average value of 4 × 4 original data is calculated. For level 3 SS data, calculate the average value of two level 2 SS data adjacent in the horizontal direction to obtain S data, and then calculate the average value of two adjacent S data in the vertical direction. It is obtained by doing. That is, the average value of 8 × 8 original data is calculated. In the case of a 16 × 16 size block, 2 × 2 pieces of level 3 SS data are obtained.
[0077]
In addition to the filter (1) 213 for level 1 horizontal and vertical processing, a filter (2) 214 for level 2, 3 and 4 horizontal and vertical processing is provided. The conversion of 4 can be performed in parallel with the conversion of level 1 in an arbitrary order from the time when SS data for that purpose is prepared.
[0078]
In the timing chart of FIG. 26, level 1 vertical processing starts from time t1, and level 2 horizontal processing starts simultaneously. Level 2 horizontal processing is performed on level 1 SS data in work memory (L2_0 or L2_1) 218 or 219 using filter (2) 214. The obtained S data and D data are written back to the work memory (L2_0 or L2_1) 218 or 219. Next, vertical processing is performed on the S data and D data using the filter (2) 214, and level 2 conversion data is obtained in the work memory (L2_0 or L2_1) 218 or 219.
[0079]
From time t2, using the filter (2) 214, horizontal processing and vertical processing for level 2 SS data in the work memory (L3_0 or L3_1) 220 or 221 are executed in order, and level 3 conversion data is stored in the work memory. (L3_0 or L3_1) 220 or 221 is obtained. From time t3, level 3 SS data in the work memory (L4_0 or L4_1) 222 or 223 inside the computation element (E) 201e and the other computation elements (A to D, F to I) 201a to 201d, 201f Horizontal processing and vertical processing are sequentially executed using the filter (2) 214 for SS data (6 × 6 SS data in total) obtained in (L4_0 or L4_1) 233 or 234 inside ~ 201i Then, the level 4 conversion data is obtained in the work memory (L4_0 or L4_1) 222 or 223 of the calculation element (E) 201e.
[0080]
Since level 1 has a large amount of data, the time required for level 2, 3, and 4 processing is less than the time required for level 1 horizontal processing or vertical processing, so the time at which level 1 vertical processing ends The conversion of levels 2, 3, and 4 is completed at time t4 before t5.
[0081]
In FIG. 27, the frame memory 100 is divided into parts having the same processing contents, and identification numbers 1 to 15 are assigned to the respective parts. As described with reference to FIGS. 13 to 25, regarding the reading / writing with respect to the frame memory 100, substantially the same processing is performed in the parts 1 and 13, the parts 2 and 14, and the parts 3 and 15. Similarly, substantially the same processing is performed on the parts 4, 7, 10, 5, 8, 11, and 6, 9, 12. On the other hand, in the wavelet transform, the number of blocks to be processed is different in each part. In the parts 1, 3, 13, and 15, the number of blocks processed using the work memory on the 0th plane (or the 1st plane) of the calculation element is 2 × 2 blocks, and the 1st plane (or 0th plane) ) Is processed by 3 × 2 blocks. In the parts 2 and 14, the number of blocks to be processed is 3 × 2 blocks. In the parts 4, 7, 10, 6, 9, and 12, the number of blocks processed using the work memory on the 0th plane (or the 1st plane) is 2 × 3 blocks, and the 1st plane (or the 0th plane) is processed. The number of blocks processed using the work memory of 3) is 3 × 3 blocks. In the portions of 5, 8, and 11, all blocks processed are 3 × 3 blocks.
[0082]
Therefore, for the sake of simplicity and easy comparison with the timing chart, the processing time is calculated using a block of 16 × 16 size as a time unit. Since the wavelet transform is performed on the data in the center block of the 3 × 3 solid line grid or the dotted line grid shown in FIGS. 13 to 21, each memory is free for the non-target block, and the wavelet transform is performed. In parallel, the data can be written into the frame memory or read out in advance. In consideration of the above, the processing time in each of the parts 1 to 15 in FIG. 27 is calculated. The 1 part is 10 blocks, the 2 part is 12 blocks, the 3 part is 8 blocks, and the 4 part is 10 blocks. 5 part is 20 blocks, 6 part is 8 blocks, 7 part is 10 blocks, 8 part is 20 blocks, 9 part is 8 blocks, 10 part is 10 blocks, 11 part is 20 blocks, The 12 part is 8 blocks, the 13 part is 10 blocks, the 14 part is 12 blocks, and the 15 part is 8 blocks. The total processing time (when X = Y = 1024) is 10 + 12 × 30 + 8 = 378 blocks in the uppermost block and the lowermost block, and (10 + 20 × 30 + 8) × 62 = 38316 blocks in other blocks, for a total of 39072 blocks It becomes.
[0083]
When this is converted into the number of clocks, since the size of one block is 16 × 16, 9768k clocks (1k = 1024) are obtained. This number of clocks is the case where the wavelet transform and the reading / writing speed with respect to the frame memory are the same. Usually, the internal operation can be easily speeded up, so this numerical value is the worst case. For example, if the time required for the wavelet transform of the parts 5, 8, and 11 that require the longest time for the wavelet transform (8 parts occupy 88% of the total) is halved, the processing time is (20-9). + 9/2 = 15.5 blocks, and the total processing time is 30702 blocks. This is 7675.5k clocks in terms of the number of clocks, and all processes can be completed in about 79% of the time compared to the worst case.
[0084]
In the present invention, the latency that occurs during memory access in the line direction, which is a problem in the prior art, can be avoided by transferring data in units of blocks. Specifically, all reading / writing is data transfer in the pixel direction, and a sufficient time for precharging the sense amplifier of the memory at the time of data transfer in the pixel direction can be secured. That is, the latency problem can be solved by using a method such as bank switching.
[0085]
Now, SS, DS, SD, DD data of each level is stored in each work memory inside the calculation element (E) 201e by mapping as shown in FIG. x means a number indicating a level. However, the SS data at levels 1, 2, and 3 are meaningless because they are replaced with the higher-level data. Such levels of data can be written back to the frame memory 100 by mapping as shown in FIG. However, since the encoding / decoding unit 102 performs encoding or decoding on a bit plane basis from a highly important level and frequency band signal, the arrangement of frequency band signals is pre-sorted in consideration of the processing order. It is advantageous to write back to the frame memory 100 in this manner. This will be described below.
[0086]
FIG. 29 shows a concept called “alignment” in which each frequency band signal of each level obtained by wavelet transform is rearranged according to importance. In FIG. 29, one rectangle represents a certain frequency band signal at a certain level, and its length represents the bit depth. The bit depth varies depending on the configuration of the filter used. Here, the SD coefficient and the DS coefficient have the same bit depth, and the DD coefficient is one bit deeper than the SD coefficient and the DS coefficient. It is drawn as a thing. In the encoder / decoder 102, for example, when an image is handled, the data may be truncated to increase the compression rate. Alignment is used as one means for determining how to cut off, and bits of less important bits are cut off.
[0087]
FIG. 30 is a diagram for explaining the concept of a bit plane. For example, if the data is image data, a certain pixel has an address space represented by (x, y) and a bit depth. In the drawing, the shaded portion (for example, the MSB portion) is called a bit plane. In the coder / decoder 102, processing is performed in units of bit planes in blocks of several pixels. This is because when image data focuses on a certain pixel, the compression ratio is increased by utilizing the fact that the correlation with the surrounding pixels is high.
[0088]
Encoding or decoding is performed from left to right, which is more important in bit plane units (however, SS coefficients are excluded). In the case of the alignment as shown in FIG. 29, the most significant bit (MSB) of the level 4 SD coefficient, the most significant bit of the DS coefficient, the most significant bit of the DD coefficient, the one least significant (MSB-1) bit of the SD coefficient, . . . It becomes the order. Therefore, when the frequency band signal is written back to the frame memory 100 by mapping as shown in FIG. 45, it is clear that the encoding / decoding device 102 needs to perform addressing with respect to the frame memory 100. If the frame memory 100 is a memory that performs burst transfer such as SDRAM, the processing speed does not increase due to latency.
[0089]
In order to avoid this, in this embodiment, the frequency band signals are pre-sorted in descending order of importance so as to be an array that can be accessed continuously for each level and each frequency band. Write back to the frame memory 100. That is, in the case of the alignment as shown in FIG. 29, the data of the 16 × 16 area is converted into 4SS, 4SD, 4DS, 4DD, and then 3DS × 2, 3SD × from the upper left of the frame memory 100 as shown in FIG. 2,3DD × 2,. . . The level 1 data (1DS, 1SD, 1DD) is finally written back in the order of importance, and the level 1 data occupies three-quarters of the area. Such sorting of frequency band signals is performed, for example, by controlling the order of reading the frequency band signals from each work memory in the control unit 211.
[0090]
If the data is written back in such a sorted state, the encoding / decoding unit 102 can easily address the frame memory 100 with or without performing the truncation. Since it does not occur easily, reading / writing from / to the frame memory 100 from the encoder / decoder 102 can be accelerated.
[0091]
According to the second embodiment of the present invention, in the wavelet transform apparatus 101 having the overall configuration shown in FIG. 2, the configuration of the calculation element (E) 201e is partially changed as shown in FIG. That is, each of the work memories 216 to 223 is divided into four independent memories (sometimes referred to as SS memory, SD memory, DS memory, and DD memory) that are assigned to SS, SD, DS, and DD data. The configuration is The control unit 211 does not include the SS calculation unit 210. Further, the filter (1) 213 and the filter (2) 214 are not assigned exclusively for processing at a specific level, and are used by switching the input / output by the control unit 211 during horizontal processing and vertical processing of each level. .
[0092]
The overall operation of the wavelet transform apparatus 101 of this embodiment is the same as that of the first embodiment, and only the operation relating to the arithmetic element (E) 201e is partially different from that of the first embodiment. Hereinafter, the operation of the calculation element (E) 201e will be described with reference to the memory map of FIG. 32, the connection diagrams of FIGS. 33 and 34, and the timing chart of FIG.
[0093]
When the data in the frame memory 100 is transferred to the work memory (L1_0 or L1_1) 216 or 217 of the computing element (E) 201e, the data is processed by the control unit 211 according to the rules shown in the memory map of FIG. The data is written to the SS memory, SD memory, DS memory, and DD memory constituting the work memory. The rules for this distribution are as follows. The 0th pixel of the 0th line of the block of the frame memory 100 is stored in the 0th pixel of the 0th line of the SS memory, and the 1st pixel of the 0th line of the block is stored in the 0th pixel of the 0th line of the SD memory. The pixel data is stored. The 0th pixel of the first line of the block is stored in the 0th pixel of the 0th line of the DS memory, and the 0th pixel of the 0th line of the DD memory is stored in the first pixel of the first line of the block. Is stored. That is, the even-numbered pixel (the 0th line is counted as the even-numbered line) is stored in the SS memory, and the odd-numbered pixel in the even-numbered line is stored in the SD memory. Then, the even-numbered pixels on the odd-numbered lines are stored in the DS memory, and the odd-numbered pixels on the odd-numbered lines are stored in the DD memory.
[0094]
When data is stored in the work memory (L1_0 or L1_0) 216 or 217 in the manner described above by time t0 in the timing chart of FIG. 35, level 1 horizontal processing starts. At this time, the input / output of the filter (1) 213 and the filter (2) 214 is connected to the SS memory, SD memory, DS memory, and DD memory of the work memory (L1_0 or L1_0) 216 or 217 as shown in FIG. Is done. Since these four memories are independent, reading / writing can be performed at the same time. That is, the even lines are processed in parallel by the filter (1) 213 and the odd lines by the filter (2) 214, and the results are simultaneously written. When this horizontal processing is finished, level 1 vertical processing starts next. At this time, the input and output of the filter (1) 213 and the filter (2) 214 are changed as shown in FIG. That is, the even pixels are processed in parallel by the filter (1) 213 and the odd pixels are processed in parallel by the filter (2) 214, and the results are written simultaneously. Level 1 SS data obtained by the vertical processing is written to the SS memory, and the work memory (L2_0 or L2_1) 218 or 219 is configured by the control unit 211 according to the same rules as those described with reference to FIG. It is distributed and written to four memories.
[0095]
Then, level 2 processing starts from time t1. First, as shown in FIG. 33, the inputs and outputs of the filters (1, 2) 213 and 214 are connected to four memories constituting the work memory (L2_0 or L2_1) 218 or 219, and horizontal processing is executed. When the horizontal processing ends, the input and output of the filters (1, 2) 213 and 214 are switched to the connection as shown in FIG. 34, and the vertical processing is executed. The obtained level 2 SS data is distributed and written in the four memories constituting the work memory (L3_0 or L3_1) 220 or 221 in accordance with the same rules as described with reference to FIG. This is the time t2. Thereafter, the processing is similarly executed up to level 4, and the processing is completed at time t4. However, in the case of the level 4 processing, the level 3 SS data obtained by other calculation elements are also used as in the case of the first embodiment.
[0096]
As described above, in this embodiment, the processing of levels 1, 2, 3, and 4 is executed sequentially, but the time required for the processing of each level is one-fourth that of the first embodiment. . This is because the four memories constituting each work memory can be accessed simultaneously.
[0097]
The processing time in the present embodiment is as follows. When the processing time in each part 1 to 15 in FIG. 27 is obtained in block units, 1 part is 4.65625 blocks, 2 part is 3.984375 blocks, 3 part is 2.65625 block, 4 parts Is 4.656625 blocks, 5 is 7.9765625 blocks, 6 is 2.656625 blocks, 7 is 4.65625 blocks, 8 is 7.9765625 blocks, 9 is 2.65625 blocks 10 part is 4.65625 block, 11 part is 7.9765625 block, 12 part is 2.656625 block, 13 part is 4.656625 block, 14 part is 7.97665625 block, 15 part is 2.65625 blocks. As shown in FIG. 35, when the time of wavelet conversion is in units of blocks, level 1 is 0.25 × 2 blocks, level 2 is 0.0625 × 2 blocks, and level 3 is Numbers below the decimal point are generated, such as 0.0156625 × 2 blocks, and level 4 is 0.0O390625 × 2 blocks, but calculation is performed without omission here. The total processing time (when X = Y = 1024) is 4.65625 + 3.984375 × 30 + 2.665625 = 126.84375 blocks in the uppermost block and the lowermost block, and (4.665625 + 7.9756625 × 30 + 2) otherwise. .65625) × 60 = 147796.5625 blocks, for a total of 15050.25 blocks. In terms of the number of clocks, since one block is 16 × 16, it becomes 3762.5625k clock (1k = 1024). This number of clocks corresponds to the case where the speed of reading / writing with respect to the wavelet conversion and the frame memory is the same. This processing speed is only 49% faster than the 7675.5k clock of the first embodiment, and is 35% faster when the latency is 2, compared to the prior art. It will be understood that this is possible.
[0098]
As described above, since processing is performed in units of bits in the encoder / decoder 102, it is apparent that the processing time is several to ten times that of the wavelet transform. If data is read / written to / from the frame memory 100, the processing time is further increased. As described above, encoding / decoding is performed in order from a frequency band signal having a higher importance level. Generally, a higher level frequency band signal has a higher importance level. However, conventionally, wavelet transformation has been performed sequentially from level 1 to a higher level, and in order to obtain a high-level frequency band signal, the end of wavelet transformation had to be waited for. On the other hand, in the present invention, wavelet transform is performed in units of small blocks, and furthermore, frequency band signals at all levels of the blocks can be obtained almost simultaneously.
[0099]
In view of the characteristics of the wavelet transform apparatus of the present invention, according to the third embodiment of the present invention, in order to absorb the difference in processing time between the wavelet transform and the encoding / decoding process, FIG. 36 is simplified. As shown, the buffer memory 250 that operates as a cache memory of the frame memory 100 is added to the main control unit 207 in the wavelet transform device 101 having the same configuration as that of the first embodiment or the second embodiment. The buffer memory 250 can be accessed by the encoder / decoder 102. In the wavelet transform apparatus 101 according to the present embodiment, a part of the frequency band signal data (for example, high-level frequency band signal data) is written in the buffer memory 250 by performing wavelet transform in units of blocks. In parallel with this wavelet transform, the encoder / decoder 102 executes encoding / decoding processing while reading data that can be acquired from the buffer memory 250 from the buffer memory 250 and reading other data from the frame memory 100.
[0100]
For example, it is assumed that the size of the frame memory 100 is X = Y = 1024, and all data of level 3 and level 4 are written in the buffer memory 250. In this case, the required size of the buffer memory 250 is [128 × 128 (level 3 minutes) + 64 × 64 (level 4 minutes)] × 3 (SS coefficients are excluded because they are not encoded / decoded) = It is only 60 kB (1 k = 1024).
[0101]
The processing time in this case will be described. In the prior art, the wavelet transform takes 10880k clock (in the case of latency 2), and the number of data to be processed by the encoder / decoder is 1024k-16k (for SS data) = 1008k, which is required for encoding / decoding one data. If the time is 10 clocks, the processing time in the encoder / decoder is 1,080 k clocks. Therefore, the total time of wavelet transform and encoding / decoding processing is 20960 k clocks.
[0102]
On the other hand, in this embodiment, if the wavelet transform apparatus 101 has the configuration of the second embodiment, the processing time of the wavelet transform is 3762.5625 k clocks. As described above, when the buffer memory 250 corresponding to the size of the level 3 and the level 4 is prepared, since the number of data is 240 kB, the time required for the encoding / decoding process is 2400 k clocks. However, since the encoding / decoding process is performed in parallel with the wavelet transform, this 2400 k clock is included in the time for the wavelet transform. Since the number of data to be processed at level 1 and level 2 is 960 kB, the time required for the encoding / decoding process is 9600 k clocks. Accordingly, the total processing time is 13622.5625 k clock obtained by adding the wavelet transform processing time 3762.5625 k clock to the 9600 k clock, which is reduced to about 64% as compared with the prior art. In this way, the entire process can be greatly speeded up.
[0103]
【The invention's effect】
  Claims 1 to 5The wavelet transform device according to the invention described in each of the items can perform wavelet transform processing up to a desired level in a block unit using a plurality of arithmetic elements at a high speed, and can also read data from the frame memory to the frame memory. Since the frequency band signal is written back in block units, the influence of latency can be avoided, so the entire process including memory access to the frame memory can be significantly faster than before, and in block units. The frequency band signals of all wavelet levels can be obtained almost simultaneously. A wavelet transform device according to the invention of claim 2 is provided.TwoBy reading and writing to the frame memory in parallel while continuously processing adjacent blocks, the processing speed can be further increased. Since the wavelet transformation device according to the third or fourth aspect of the invention can speed up the wavelet transformation processing in the first arithmetic element, the processing speed can be further increased.Claim 6 or 7The encoding / decoding device according to the invention described above speeds up the wavelet transform process and simultaneously obtains the frequency band signals of all wavelet levels in a block unit on the frame memory. It starts immediately after the start and can be executed in parallel with the wavelet transform process, and thus can operate at a much higher speed than in the prior art. In particular, when the frequency band signals are sorted back in order of importance by the wavelet transform device and written back to the frame memory, the access to the frame memory of the encoder / decoder can be speeded up. Is possible. Also,Claim 7The encoding / decoding device according to the described invention eliminates the need to access the frame memory for data that can be acquired from the buffer memory, so that it is possible to achieve higher speed operation and the like.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of the overall configuration of an encoding / decoding device according to the present invention.
FIG. 2 is a block diagram showing an internal configuration of the wavelet transform device according to the first embodiment of the present invention.
FIG. 3 is a block diagram showing an internal configuration of a calculation element (E) according to the first embodiment of the present invention.
FIG. 4 is an explanatory diagram of sizes of work memories (L1_0, L1_1) and cache memories (CM1, CM3, CM4);
FIG. 5 is an explanatory diagram of the size of a cache memory (CM2).
FIG. 6 is an explanatory diagram of the size of a work memory (L2_0, L2_1).
FIG. 7 is an explanatory diagram of the size of a work memory (L3_0, L3_1).
FIG. 8 is an explanatory diagram of a size of a work memory (L4_0, L4_1).
FIG. 9 is an explanatory diagram of the size of a frame memory.
FIG. 10 is an explanatory diagram of the size of a current memory.
FIG. 11 is a block diagram showing an internal configuration of arithmetic elements (A to D, F to I) according to the first embodiment of the present invention.
FIG. 12 is a diagram illustrating an example of mapping of frequency band signals up to level 3 per block of 16 × 16 size.
FIG. 13 is a diagram for explaining processing of two blocks at the left end of the first block row;
FIG. 14 is a diagram for explaining processing of the next two blocks of the first block row;
FIG. 15 is a diagram for explaining processing of two blocks at the right end of the first block row;
FIG. 16 is a diagram for explaining processing of two blocks at the left end of the second block row;
FIG. 17 is a diagram for explaining processing of the next two blocks of the second block row;
FIG. 18 is a diagram for explaining processing of two blocks at the right end of the second block row;
FIG. 19 is a diagram for explaining processing of two blocks at the left end of the last block row;
FIG. 20 is a diagram for explaining processing of the next two blocks of the last block row;
FIG. 21 is a diagram for explaining processing of two blocks at the right end of the last block row;
FIG. 22 is a diagram for explaining data caching by cache memories (CM1 to CM4);
FIG. 23 is a timing chart of the wavelet transform device.
FIG. 24 is a timing chart of the wavelet transform device.
FIG. 25 is a timing chart of the wavelet transform device.
FIG. 26 is a timing chart of a calculation element (E) in the first embodiment of the present invention.
FIG. 27 is a diagram in which a frame memory is divided into a plurality of parts in order to explain the processing time.
FIG. 28 is a diagram showing mapping of frequency band signals obtained in each work memory of the computation element (E).
FIG. 29 is an explanatory diagram of alignment of frequency band signals.
FIG. 30 is an explanatory diagram of a bit plane.
FIG. 31 is a block diagram showing an internal configuration of a calculation element (E) in the second embodiment of the present invention.
FIG. 32 is a diagram showing a method of distributing data to SS, DS, SD, and DD memories constituting the work memory in the calculation element (E) in the second embodiment of the present invention.
FIG. 33 is a diagram illustrating an input / output connection method of a filter during horizontal processing.
FIG. 34 is a diagram illustrating a filter input / output connection method during vertical processing;
FIG. 35 is a timing chart of the calculation element (E) in the second embodiment of the present invention.
FIG. 36 is a diagram showing a configuration of an encoding / decoding device and a wavelet transform device according to a third example of the present invention.
FIG. 37 is a diagram illustrating a general configuration of a conventional wavelet transform device.
FIG. 38 is an explanatory diagram of filter operations for horizontal processing and vertical processing of wavelet transform.
FIG. 39 is a diagram illustrating an example of a memory map of image data before wavelet transform.
FIG. 40 is a diagram illustrating an example of a memory map for 1S coefficients and 1D coefficients.
FIG. 41 is a diagram illustrating an example of a memory map for a 1SS coefficient, a 1SD coefficient, a 1DS coefficient, and a 1DD coefficient.
FIG. 42 is a diagram illustrating an example of a memory map for 2S coefficients and 2D coefficients.
FIG. 43 is a diagram illustrating an example of a memory map for 2SS coefficients, 2SD coefficients, 2DS coefficients, and 2DD coefficients.
FIG. 44 is a timing chart of a conventional general wavelet transform device.
FIG. 45 is a diagram illustrating a general memory map of frequency band signals up to level 4;
FIG. 46 is a diagram showing an example of a memory map when frequency band signals up to level 4 are written back in descending order of importance.
[Explanation of symbols]
100 frame memory
101 Wavelet transform device
102 Coding decoder
200 Calculation unit
201a to 201i computing elements (A to I)
202 Current memory
203 Cache memory (CM1)
204 Cache memory (CM2)
205 Cache memory (CM3)
206 Cache memory (CM4)
207 Main control unit
210 SS calculator
211 Control unit
213 Filter (1)
214 Filter (2)
216 Work memory (L1_0)
217 Work memory (L1_1)
218 Work memory (L2_0)
219 Work memory (L2_1)
220 Work memory (L3_0)
221 Work memory (L3_1)
222 Work memory (L4_0)
223 Work memory (L4_1)
230 SS calculator
231 control unit
233 Work memory (L4_0)
234 Work memory (L4_1)
250 buffer memory

Claims (7)

フレームメモリからブロック単位でデータを読み込み、nレベル(nは3以上の整数)のウェーブレット変換処理を行い、得られたnレベルのウェーブレット変換係数の周波数帯信号を前記フレームメモリに書き戻すウェーブレット変換装置であって、
前記フレームメモリから読み込まれたデータを一時的に記憶するメモリと、
少なくとも一つの第1演算要素及び複数の第2演算要素からなる演算部とを具備し、
前記複数の第2演算要素は、前記フレームメモリから読み込まれた注目ブロックの周囲のブロックのデータからそれぞれレベル(n−1)のウェーブレット変換係数中の低周波数帯信号を計算し、
前記第1演算要素は、前記フレームメモリから読み込まれた前記注目ブロックのデータに対するnレベルのウェーブレット変換処理を実行し、その際にレベルnのウェーブレット変換処理は、該第1演算要素で得られたレベル(n−1)の低周波数帯信号と前記複数の第2演算要素によって計算されたレベル(n−1)の低周波数帯信号とを用いて行って、nレベルのウェーブレット変換係数の全周波数帯信号を計算し、
前記第1演算要素のウェーブレット変換処理で得られたnレベルの全周波数帯信号がブロック単位で前記フレームメモリに書き戻されることを特徴とするウェーブレット変換装置。
A wavelet transform device that reads data from a frame memory in block units, performs wavelet transform processing of n levels (n is an integer of 3 or more), and writes the obtained frequency band signals of n level wavelet transform coefficients back to the frame memory Because
A memory for temporarily storing data read from the frame memory;
A calculation unit including at least one first calculation element and a plurality of second calculation elements;
The plurality of second calculation elements calculate low frequency band signals in wavelet transform coefficients of level (n−1), respectively, from data of blocks around the target block read from the frame memory,
The first calculation element executes an n-level wavelet transform process on the data of the block of interest read from the frame memory, and at this time, the level n wavelet transform process is obtained by the first calculation element. Performing using the low frequency band signal of level (n-1) and the low frequency band signal of level (n-1) calculated by the plurality of second calculation elements, all the frequencies of the wavelet transform coefficients of n level Calculate the band signal,
An n-level all frequency band signal obtained by the wavelet transformation process of the first arithmetic element is written back to the frame memory in units of blocks.
前記第1演算要素が各レベル対応のワークメモリを2面ずつ具備し、前記第2演算要素がワークメモリを2面具備し、前記フレームメモリの隣接する2ブロックのデータに対するウェーブレット変換処理が連続的に実行され、かつ、ウェーブレット変換処理と前記フレームメモリからのデータの読み込み及び前記フレームメモリへの周波数帯信号の書き戻が並行して行われることを特徴とする請求項1記載のウェーブレット変換装置。The first calculation element has two work memories corresponding to each level , the second calculation element has two work memories, and wavelet transform processing for two adjacent blocks of data in the frame memory is continuous. 2. The wavelet transform apparatus according to claim 1, wherein the wavelet transform process, the data read from the frame memory, and the write back of the frequency band signal to the frame memory are performed in parallel. 前記第1演算要素が、レベル1のウェーブレット変換処理に使用される第1フィルタとレベル2〜nのウェーブレット変換処理に使用される第2フィルタを具備するとともに各レベルの低周波数帯信号を計算するための手段を具備し、前記第1演算要素において、注目ブロックのデータに対するレベル1のウェーブレット変換処理とレベル2〜nのウェーブレット変換処理が並行して実行されることを特徴とする請求項2記載のウェーブレット変換装置。Wherein the first computing element calculates the low frequency band signal of each level as well as comprising a first second filter used in wavelet transform process of the filter and level 2~n used in wavelet transform process of the level 1 comprising means for, in the above first computing element, according to claim 2, wherein the wavelet transform process of the wavelet transform process and level 2~n level 1 for data of the target block is characterized in that it is performed in parallel Wavelet transform device. 前記第1演算要素の各レベル対応のワークメモリが独立にアクセス可能な4個のメモリに分割されるとともに、前記第1演算要素がレベル1のウェーブレット変換処理に使用される第1フィルタとレベル2〜nのウェーブレット変換処理に使用される第2フィルタを具備し、ウェーブレット変換処理が前記2個のフィルタを使用して並列処理により実行されることを特徴とする請求項2記載のウェーブレット変換装置。The work memory corresponding to each level of the first calculation element is divided into four memories that can be accessed independently, and the first filter used for the level 1 wavelet transform processing and the level 2 comprising a second filter used in wavelet transform processing ~n, wavelet transform apparatus according to claim 2, wherein the wavelet transform process is characterized in that it is executed by the parallel processing using the two filters. 前記第1演算要素のウェーブレット変換処理によって得られた周波数帯信号の一部を一時的に記憶するためのバッファメモリをさらに具備し、このバッファメモリは外部からアクセス可能であることを特徴とする請求項1、2又は3記載のウェーブレット変換装置。A buffer memory for temporarily storing a part of the frequency band signal obtained by the wavelet transform processing of the first arithmetic element is further provided, and the buffer memory is accessible from the outside. Item 4. The wavelet transform device according to item 1, 2 or 3. フレームメモリと、このフレームメモリにアクセス可能な請求項1、2、3又は4記載のウェーブレット変換装置と、前記フレームメモリにアクセス可能な符号化復号化器とを具備する符号化復号化装置。5. An encoding / decoding apparatus comprising: a frame memory; a wavelet transform apparatus according to claim 1, 2, 3, or 4 that can access the frame memory; and an encoding / decoding apparatus that can access the frame memory. フレームメモリと、このフレームメモリにアクセス可能な請求項5記載のウェーブレット変換装置と、前記フレームメモリ及び前記ウェーブレット変換装置のバッファメモリにアクセス可能な符号化復号化器とを具備する符号化復号化装置。6. A coding / decoding apparatus comprising: a frame memory; a wavelet transform apparatus capable of accessing the frame memory; and a coding / decoding apparatus capable of accessing the frame memory and a buffer memory of the wavelet transform apparatus. .
JP24827699A 1999-09-02 1999-09-02 Wavelet transform device and encoding / decoding device Expired - Fee Related JP4117866B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24827699A JP4117866B2 (en) 1999-09-02 1999-09-02 Wavelet transform device and encoding / decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24827699A JP4117866B2 (en) 1999-09-02 1999-09-02 Wavelet transform device and encoding / decoding device

Publications (2)

Publication Number Publication Date
JP2001078189A JP2001078189A (en) 2001-03-23
JP4117866B2 true JP4117866B2 (en) 2008-07-16

Family

ID=17175716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24827699A Expired - Fee Related JP4117866B2 (en) 1999-09-02 1999-09-02 Wavelet transform device and encoding / decoding device

Country Status (1)

Country Link
JP (1) JP4117866B2 (en)

Also Published As

Publication number Publication date
JP2001078189A (en) 2001-03-23

Similar Documents

Publication Publication Date Title
JP3800552B2 (en) Encoding method and apparatus
JP3800551B2 (en) Data processing apparatus and method
US7321695B2 (en) Encoder rate control
JP3302229B2 (en) Encoding method, encoding / decoding method and decoding method
US5838377A (en) Video compressed circuit using recursive wavelet filtering
US7167592B2 (en) Method and apparatus for compression using reversible wavelet transforms and an embedded codestream
US6229927B1 (en) Reversible embedded wavelet system implementation
KR102754795B1 (en) Bit-plane encoding of data arrays
JP4356028B2 (en) Information processing apparatus and method
US7031536B2 (en) Signal processing apparatus and method, program, and storage medium
EP1035511A2 (en) Encoding method and apparatus
CN101309417B (en) Method and device for processing image data
US8204331B2 (en) Information processing apparatus and method to reduce delay in image decoding
US5706220A (en) System and method for implementing the fast wavelet transform
JP2007267384A (en) Compression device and compression method
JP4209631B2 (en) Encoding device, decoding device, and compression / decompression system
Rein et al. Evaluation of the wavelet image two-line coder: A low complexity scheme for image compression
JP2000341689A (en) Wavelet inverse transform apparatus and method, and wavelet decoding apparatus and method
JP4097108B2 (en) Wavelet transform device and encoding / decoding device
JP4117866B2 (en) Wavelet transform device and encoding / decoding device
US6538583B1 (en) Method and apparatus for context modeling
CN101754017B (en) Information processing apparatus and method
US20220108480A1 (en) Bit plane decoding method and apparatus
JP3719699B2 (en) Encoding device and decoding device
JP3660136B2 (en) Encoding / decoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061108

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070718

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070918

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080421

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

Free format text: PAYMENT UNTIL: 20110502

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120502

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120502

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130502

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130502

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees