JP3871995B2 - Encoding device and decoding device - Google Patents

Encoding device and decoding device Download PDF

Info

Publication number
JP3871995B2
JP3871995B2 JP2002311145A JP2002311145A JP3871995B2 JP 3871995 B2 JP3871995 B2 JP 3871995B2 JP 2002311145 A JP2002311145 A JP 2002311145A JP 2002311145 A JP2002311145 A JP 2002311145A JP 3871995 B2 JP3871995 B2 JP 3871995B2
Authority
JP
Japan
Prior art keywords
unit
encoding
prediction
decoding
code data
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
JP2002311145A
Other languages
Japanese (ja)
Other versions
JP2003198858A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2002311145A priority Critical patent/JP3871995B2/en
Publication of JP2003198858A publication Critical patent/JP2003198858A/en
Application granted granted Critical
Publication of JP3871995B2 publication Critical patent/JP3871995B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、予測符号化方式を用いた画像データの符号化装置およびその符号データの復号化装置に関するものである。
【0002】
【従来の技術】
2値画像の符号化技術の1つとして、周辺の画素から注目画素の状態を予測し、予測した結果を符号化する予測符号化方式がある。予測符号化においては、注目画素と相関関係があると思われる周囲画素をマルコフ情報源として予測に用いる。
【0003】
予測方式には、予測値を直接決定する方法と、間接的に決定する方法が知られている。予測値を直接決定する方法としては、例えば特開平5−316370号公報で示されるように、複数の予測器の中から的中率の高い予測器を適応的に切り替え、最終的に1つの予測器を選択し、原画像の予測に使用する方法がある。また、予測値を間接的に決定する方法としては、例えば、予測値等の情報をメモリに格納し、周辺の画素値からメモリの情報を読み出して予測に使用する方法がある。
【0004】
特公平6−95645号公報に開示されている予測方式は、後者のメモリを用いた間接的に予測値を決定する予測方式であり、周辺の複数画素の値をアドレスとして、テーブルルックアップ方式で出力される予測値を用い、予測誤差データを生成している。しかし、予測画素の位置を全て固定とはせず、1画素のみ位置を可変にし、予測的中率によって予測位置を変更させている方式をとっている。ITU−T T.82、T−85で定められたJBIG(Joint Bi−level Image coding expert Group)で用いられる予測方式は、上述の特公平6−95645号公報に示されている予測方式であり、符号化状態によって予測テーブルの情報を更新していく学習型の方式が採用されている。符号化には、注目画素を上述の予測方式で予測した結果である予測誤差データが使用される。
【0005】
JBIGにおいては、予測誤差データを符号化する符号化部に、算術符号化が採用された。算術符号化は、例えば特公平1−17295号公報に示されているように、数直線上の領域を入力されたシンボルの1,0の発生確率に合わせて分割し、入力シンボルの値によって領域を選択する。このとき、予測と一致したシンボル(優勢シンボル)をMPS(More Probable Symbol)、一致しないシンボル(劣性シンボル)をLPS(Less Probable Symbol)と呼ぶ。このMPS、LPSの発生確率推定値は、予測的中率などによって変化させる。JBIGでは、シンボルの出現確率の推定部にLPS発生時の確率値(=領域幅LSZ)を持たせるとともに、その確率推定値をシンボルの出現過程に応じて更新する学習機能を持たせている。確率推定の学習機能は上述の予測値の学習機能と連動する。この分割選択処理を情報源の出力系列の分だけ行ない、最終段の分割で得られた領域内の1点の2進小数表示で出力系列を表わす。
【0006】
図10は、算術符号化の概念図である。斜線で示した領域が、それぞれシンボルの符号化終了後の有効領域である。初期状態では、有効領域は[0,1)区間であり、LPS発生時の領域幅LSZ(0)が設定されている。1−LSZ(0)がMPS発生時の領域幅である。ここではシンボルが「0」のときをMPS、「1」のときをLPSとする。図10において確率値は2進数で示している。
【0007】
図10では、最初に入力されたシンボルが「0」であるので、MPSの発生により有効領域は図10(A)においてハッチングを施した領域となる。そしてこの有効領域内をLPS発生時とMPS発生時の領域に分割する新たな領域幅LSZ(1)を設定する。次のシンボルが「1」のときは、LPSの発生により図10(B)においてハッチングを施した領域が有効領域となる。同様にして、3番目のシンボルが「0」のとき、図10(C)においてハッチングを施した領域が有効領域となり、さらに4番目のシンボルが「1」のとき、図10(D)においてハッチングを施した領域が有効領域となる。
【0008】
出力される符号はCで表わされる。入力されたシンボル列「0101」に対する符号は、図10(D)における有効領域内の1点とすればよい。ここでは、有効領域の基底、すなわち有効領域の最も小さい値C(3)を符号として表わし、出力する。
【0009】
算術符号化においては、符号化の過程で、有効領域の1点を符号とするため、領域を大きくとれば、有効桁が減り符号量が減る。つまり、MPS発生時にはなるべくLSZの値を小さくし、LPS発生時にはなるべくLSZの値を大きくすることによって、有効領域を多く確保でき、符号量を減らすことができる。
【0010】
図11は、JBIGで採用されている予測符号化方式の概略図である。図中、1は画像データ、2はコンテキスト生成部、3はコンテキスト、4は予測部、5はステート、6は確率推定テーブル、7はLSZおよびSW、8は予測値、9は算術符号化部、10は符号データ、11は書き換えデータ、12は書き換え信号である。
【0011】
画像データ1は、符号化のために算術符号化部9に入力されるとともに、コンテキスト生成部2に入力される。コンテキスト生成部2においては、注目画素の予測を行なうために、周辺画素を使用して予測のモデルテンプレートを作成する。図12は、JBIGで使用されるテンプレートの一例の説明図である。Pを注目画素とすると、図12に示す参照画素X9 〜X0 を使用するテンプレートが生成される。この参照画素X9 〜X0 の値が210状態(コンテキスト)の10重マルコフ情報源となり、そのまま予測部4にコンテキスト3として入力され、予測に使用される。
【0012】
予測部4には、参照画素X9 〜X0 の値に対応した予測値8と、確率推定テーブル6を参照するためのステート5とを対にした予測テーブルが記憶されている。参照画素X9 〜X0 の値であるコンテキスト3がそのまま予測テーブルにアドレスとして入力され、予測テーブルの1024個のエントリのいずれかが選択される。コンテキスト3により選択された予測テーブルのエントリから予測値8およびステート5を取り出し、予測値8を算術符号化部9へ入力し、また、ステート5を確率推定テーブル6に入力する。図13は、予測部4に記憶されている予測テーブルの一例の説明図である。図13に示した予測テーブルは、アドレスに対応して、予測値とステートが対になって格納されている。なお、アドレスは2進数で示しているが、これはコンテキストコンテキスト3として入力される参照画素X9 〜X0 のそれぞれの画素値に対応するものである。例えば、参照画素X0 の値のみが「1」で他の参照画素は「0」であれば、アドレス「0000000001」が参照され、予測値「1」とステート「2」が得られる。
【0013】
確率推定テーブル6は、ステート5に対応して、LPS発生時の領域幅LSZと、LPS発生時の次のステート値であるNLPSおよびMPS発生時の次のステート値であるNMPS、さらに正規化発生時に予測値を書き換えるか否かを示すフラグであるSWが格納されている。入力されたステート5に対応するLSZおよびSW7を算術符号化部9に出力するとともに、NMPS,NLPSを書き換えデータ11の一部として予測部4へ送る。図14は、確率推定テーブル6の一例の説明図である。図14では、ステート5の番号に対応して、LSZ、NMPS、NLPS、SWを対にして格納している。例えばステートが「2」のとき、LSZとして「0x1114」、NLPSとして「16」、NMPSとして「3」、SWとして「0」が得られる。ここで、「0x」で始まる数値は16進数である。
【0014】
算術符号化部9では、予測部4から入力される予測値8と画像データ1とを比較し、一致していれば符号化するシンボルを「0」、すなわちMPSが発生したものとし、不一致であれば符号化するシンボルを「1」、すなわちLPSが発生したものとする。そして確率推定テーブル6から入力されるLSZを用い、図10で概略説明したように算術符号化を行なって符号データ10を出力する。LPSが発生した場合には、確率推定テーブル6から入力されるSWが予測値の書き換えを可能としている場合(例えばSWが「1」の場合)に限り、予測値を反転した新予測値を書き換えデータ11の一部として予測部4に送るとともに書き換え信号12を送り、予測部4に記憶されている予測テーブルの予測値を書き換える。
【0015】
JBIGにおいては、算術符号化部9において、有効領域の有効桁を増やさないよう、有効領域はつねに0.5以上1未満となるように調整されている。この処理を正規化と呼ぶ。またLSZの値は必ず0.5未満の値となるように確率推定テーブルを構成しておく。これにより、LPS発生時には有効領域は0.5未満となり、必ず正規化が発生する。さらに、MPS発生時においても、新有効領域は、現有効領域から、LSZを減算して求めるため0.5未満となる可能性があり、正規化が発生するケースがある。この正規化が発生した場合に、予測部4に対して書き換え信号12を送る。予測部4では、MPS発生時には確率推定テーブル6から与えられるNMPSを、コンテキスト生成部2から与えられているコンテキスト3のステートとして予測テーブルに書き込む。また、LPS発生時には、確率推定テーブル6から与えられるNLPSをコンテキスト3のステートとして予測テーブルに書き込む。このようにして予測テーブルが更新された後、次の画像データ1についての処理を開始する。
【0016】
上述の予測部4と確率推定テーブル6を順次書き換えてゆく学習型の予測/確率推定方式について、具体例を用いながらさらに説明する。図15は、入力される画像データの一具体例の説明図である。図15では、図12に示すテンプレートの部分の画像データ1のみを示している。図15に示すように、コンテキストX9 〜X0 が「0000000011」のとき、注目画素Pが1であった場合を考える。予測部4の予測テーブルおよび確率推定テーブル6は、それぞれ図13、図14に示す内容が設定されているものとする。
【0017】
まず、コンテキスト「0000000011」がコンテキスト3として予測部4に入力される。この時、予測部4の予測テーブルのアドレス「0000000011」には、図13に示すように、予測値「0」とステート値「80」が格納されている。予測テーブルから読み出されたステート値「80」は、確率推定テーブル6に入力される。次に確率推定テーブル6のステート番号「80」が参照される。確率推定テーブル6には図14に示す内容が設定されているので、そのステート番号「80」に対応するLSZ値「0x5832」が読み出され、算術符号化部9に出力される。
【0018】
このとき、注目画素Pの値は「1」であるが、予測部4の予測テーブルから読み出された予測値は「0」であるため、LPSが発生した、ということになる。LPSが発生した場合、確率推定テーブル6から読み出されたLSZ値に対応する領域が基本的に次の有効領域となる。LSZは、0.5未満であるから、0.5以上1未満になるように正規化が行なわれ、ステート番号「80」のNLPSの値「80」が予測部4の予測テーブルのアドレス「0000000011」のステート値として上書きされる。また、確率推定テーブル6のステート番号「80」のSWが「1」であるから、予測値は反転されて「1」となり、予測部4の予測テーブルのアドレス「0000000011」の予測値として上書きされる。図16は、書き換え後の予測部テーブルの一具体例の説明図である。このようにして図16に示すように、予測部のアドレス「0000000011」の予測値およびステート値が書き換えられる。この書き換えられた後の予測部を用いて次の画像データ1についての予測を行なうことになる。次に同じコンテキストが入力された場合は、予測値が1となっている。
【0019】
この例ではLPSが発生したが、MPSが発生した場合には、正規化を行なったときには予測部4の予測テーブルのステート値をNMPS「81」に書き換える。書き換え後、次に同じコンテキスト3が入力された場合、ステート値が「81」であり、このときのLSZは図14から「0x4d1c」となる。この値は、ステート値「80」のときのLSZ「0x5832」よりも小さく、つまりLPSが発生する確率が小さいことを意味する。これは、前回の同じコンテキストの時の予測が当たったため、次に同じコンテキストが入力された場合、MPSが発生時の領域幅を広げておき、再度予測が当たった場合に有効領域を広くとれるようにしたものであり、最終的な有効領域を増大させ、符号量を減少させることができる。
【0020】
以上のようにして、確率推定テーブルにしたがって予測部を順次書き換え、予測的中率を向上させ、MPS発生数を増やすとともに、MPS/LPS発生時の領域幅を制御して、符号化効率を向上させている。
【0021】
また、復号時の処理も符号化時と同様、領域分割を行ないながら実施される。符号化時と異なるのは、符号化時は予測値と注目画素の比較を行ない、LPS/MPSの領域を演算しながら求めるのに対し、復号化時には、符号が、LPS/MPSのどちらの領域に入っているかを演算で求め、次に周辺の復号済みの参照画素から注目画素を逆予測しながら求める。
【0022】
図17は、JBIGで採用されている予測復号化方式の概略図である。図中、図11と同様の部分には同じ符号を付して説明を省略する。21は算術復号化部、22は逆予測部、23は逆予測値、24は書き換えデータである。コンテキスト生成部2および逆予測部22は、符号化時のコンテキスト生成部2および予測部4とまったく同一に動作する。逆予測部22は符号化時の予測部4と同一である。当然、確率推定テーブル6も符号化時と同一のものが使用されなければならない。
【0023】
まず符号化時と同様に、復号化された画像データ1の注目画素の周辺の参照画素の値によりコンテキストが生成され、逆予測部22、確率推定テーブル6から、LSZと逆予測値23が算術復号化部21に出力される。
【0024】
次に、符号データ10は算術復号化部21において、有効領域の比較が行なわれた後、逆予測値23を用いて画像データ1を出力する。図18は、算術復号化部の基本動作の説明図である。まず、現有効領域から確率推定テーブルより入力されたLSZ幅を減算し、
(有効領域−LSZ)
を得る。この値を境にMPS領域とLPS領域が分割される。次に入力された符号Cが、先に求めた(有効領域−LSZ)の値より大きいか否かを比較する。すなわち、
C>有効領域−LSZ
の判定を行なう。この比較判定によって、注目画素がLPSであるかMPSであるかが判定できるので、入力された逆予測値から、注目画素のレベルを求める。すなわち、MPSであれば注目画素の値は逆予測値であり、LPSであれば逆予測値を反転して注目画素の値とすればよい。以上の処理により、基本的に注目画素を復号できる。
【0025】
ただし、次の画素の復号のために、ここからさらに、新有効領域の決定、符号−有効領域の減算等の処理が必要となる。例えば図18に示した例では、符号データCがLPS領域に存在するので、新たな有効領域としてLPS領域を設定し、新たなLSZを設定して上述の処理を繰り返し行なう。また、符号化時と同様にして、予測部4に記憶されている予測テーブルの予測値およびステート値の書き換えも行なわれる。
【0026】
以上のように、JBIGにおいては、確率推定テーブルとして書き換え可能なメモリを用いて更新してゆく学習型の予測方式を用い、またエントロピー符号化部に算術符号化方式を用いることによって、従来のランレングス符号化等に比べて高能率な2値画像の符号化および符号データの復号が達成される。
【0027】
しかし、JBIG方式では、高能率な符号化が達成される反面、処理が低速になるという問題がある。JBIGで採用されている予測テーブルを使用する学習型の予測方式は、予測値、ステートを書き換えて最適な状態に近づけるため、予測的中率が向上する利点もある反面、メモリのアクセスに時間がかかり、また、予測テーブルの書き換えが発生した場合には書き換えが終了した後でなければ予測値を読み出すことができず、高速化が難しい。
【0028】
特願平8−301889号および特願平8−288731号などにおいては、符号化時あるいは復号時に予測テーブルあるいは逆予測テーブルから複数のデータをあらかじめ読み出しておいて、現画像の符号化結果あるいは復号結果によってデータを選択して高速化する方式が提案されている。また、例えば特開平8−154059号公報に示されるように、算術符号化自体を高速化する方式も提案されている。しかしいずれにせよ、1画素ごとに予測テーブルの書換えが発生する可能性があるため、隣接する複数の画素を同時に処理するなどの高速化の手段がとれないのが現状である。
【0029】
符号化の処理を高速化するために、符号器を複数用いて並列に処理する方法が一般に考えられる。すなわち、入力画像を複数の領域に分割して、それぞれに対応する符号器で符号化するものである。しかし、この方式では、スキャナ等から入力画像がページの先頭から1画素ずつ転送される場合には対応できない。例えば入力画像を2分割して2つの符号器で符号化する場合、一方の領域の画素が連続して転送され、その間はその一方の領域に対応する符号器のみが動作し、その後に他方の領域の画素の転送が開始されるまで、他方の領域に対応する符号器は動作できない。そのため、複数の符号器を備えているにもかかわらず、並列に処理することができない。並列に処理するため、画像をメモリに一旦格納してから転送することが考えられるが、メモリ量が増えるという問題がある。また伸長時に出力装置などへリアルタイム出力する場合も、メモリに一旦格納する必要がある。
【0030】
また別の方式として、例えば米国特許第4,982,292号明細書などに記載されているように、入力画像を1画素おきに符号化する方式なども提案されている。しかしこの方式では、JBIGにおいて高能率符号化を実現するコンテキストを1画素おきに生成することとなって予測効率が落ちてしまい、符号化効率に影響するという問題がある。
【0031】
また、上述したいずれの高速化のための方式においても、並列的に処理された符号が別々に出力されるため、符号を保持するメモリ管理が複雑になるという問題がある。
【0032】
別々に生成された符号データを1つに合成する方法としては、例えば特開平6−38048号公報などに記載されているように、それぞれの符号データの先頭に識別コードを挿入する方法がある。この方法によれば、符号としては1つになるが、それぞれの符号データ長を長くするとそれだけ余分なメモリを必要とするし、切り替えを細かくすると識別コード量が増大してしてしまうという問題があった。
【0033】
【発明が解決しようとする課題】
本発明は、上述した事情に鑑みてなされたもので、高速に高効率の符号化あるいは復号化を行なうことができるとともに、符号データ量を抑えて1つの符号データとして管理可能な符号データを生成する符号化装置およびその符号データを復号する復号化装置を提供することを目的とするものである。
【0034】
【課題を解決するための手段】
上記課題を解決するために、第1の発明(請求項1に記載)の符号化装置は、複数の符号化手段で符号化した符号データを合成手段で合成する際に、各符号化手段から出力される符号データを単位符号データごとに順に出力する。符号化手段から符号データが出力されない場合には符号データの順次出力ができなくなるので、その場合に限って識別コードを付して他の符号化手段からの符号データの出力を行なう。これによって合成手段から出力される合成符号データには、通常の状態では識別コードが出力されず、符号化手段から符号データが出力されないという特別な場合のみに識別コードが出力されるだけであるので、合成符号データ全体のデータ量を抑えることができる。
【0036】
【発明の実施の形態】
図1は、本発明の符号化装置の実施の一形態を示すブロック構成図である。図中、図11と同様の部分には同じ符号を付して説明を省略する。31は符号化部、32はFIFOメモリ、33はメモリ状態信号、34はリード信号、35は単位符号データ、36は合成部、37は合成符号データである。なお、図1では符号化部31を2ブロック設けた例を示しており、一方をAブロック、他方をBブロックとして、各ブロックに関係する構成には‘−’の後にAまたはBを記して区別している。
【0037】
各符号化部31−A,Bは、予測部4、確率推定テーブル6、算術符号化部9から構成されており、コンテキスト生成部2を各符号化部31−A,Bに共通した構成として設けている。画像データ1は、共通して設けられているコンテキスト生成部2に入力されるとともに、それぞれの符号化部31−A,Bの算術符号化部9に入力される。コンテキスト生成部2で生成されたコンテキスト3−A,Bは、それぞれの符号化部31−A,Bの予測部4に入力される。
【0038】
また、各符号化部31−A,Bに対応して、各符号化部31−A,Bから出力される符号データ10−A,Bを一時的に格納するFIFOメモリ32−A,Bを設けている。このFIFOメモリ32−A,Bは、合成部36からのリード信号34−A,Bに従って、先に格納した符号データから順に、基本的には所定データ量を単位として読み出し、単位符号データ35−A,Bとして合成部36へ渡す。FIFOメモリ32−A,Bは、それぞれ複数単位の符号データを格納可能であり、空状態か満杯状態かを示すメモリ状態信号33−A,Bを出力する。
【0039】
合成部36は、各FIFOメモリ32−A,Bからのメモリ状態信号33−A,Bに基づき、基本的にはFIFOメモリ32−AとFIFOメモリ32−Bに対して交互にリード信号34−Aまたはリード信号34−Bを送出して符号データを読み出し、単位符号データ35−Aまたは単位符号データ35−Bを得て、合成符号データ37として出力する。FIFOメモリ32−AまたはFIFOメモリ32−Bの一方が空の状態で他方が満杯状態となった場合には、満杯状態となった側の識別符号を挿入して満杯となったFIFOメモリから連続して単位符号データを読み出し、合成符号データ37として出力する。また、符号データの終了時には、FIFOメモリ32−AまたはFIFOメモリ32−Bに残っている符号データの読み出しおよび出力を行なう。
【0040】
次に、本発明の符号化装置の実施の一形態における動作の一例について説明する。図2は、画像データの一例の説明図である。図2(A)には(n+1)×(n+1)画素からなる原画像を示しており、図中の上から下方向に各ラインの左端から順に右端までの各画素のデータが入力されるものとする。すなわち、P00,P01,・・・,P0n,P10,P11,・・・,P1n,P20,・・・,Pmnの順で各画素の画像データ1が入力される。図1に示した構成では、符号化部を2ブロック設けているが、各符号化部31−A,Bはそれぞれ交互に、入力される画像データ1の符号化を行なう。すなわち、符号化部31−Aは図2(B)に示すように、P00,P02,・・・,P10,P12,・・・の画素(2番目の添字が偶数の画素)についての符号化処理を行なう。また、符号化部31−Bは図2(C)に示すように、P01,P03,・・・,P11,P13,・・・の画素(2番目の添字が奇数の画素)についての符号化処理を行なうように制御される。
【0041】
コンテキスト生成部2は、入力された画像データ1から、例えば図12に示したようなテンプレートに従ってコンテキスト3を生成する。例えばP22の画像データ1が入力されたとき、図2(D)に示すP22を除く10画素によってコンテキストを生成する。次のP23の画像データ1が入力されたときには、図2(E)に示すP23を除く10画素によってコンテキストを生成する。これらのコンテキストは、いずれの符号化部によって使用されるかに関係なく、一律に生成される。このように符号化部に関係なくコンテキスト3を生成することによって、予測の的中率を向上させ、効率よく符号化できるようにしている。
【0042】
符号化部31−Aでは、2番目の添字が偶数の画素が入力されると、コンテキスト生成部2から出力されるコンテキスト3−Aおよび画像データ1−Aを取り込む。例えば、P22の画像データが入力されたとき、これを画像データ1−Aとして取り込むとともに、P22に対応する図2(D)に示すテンプレートによって生成されたコンテキスト3−Aを取り込む。同様に、符号化部31−Bでは、2番目の添字が奇数の画素が入力されると、コンテキスト生成部2から出力されるコンテキスト3−Bおよび画像データ1−Bを取り込む。例えば、P23の画像データが入力されたとき、これを画像データ1−Bとして取り込むとともに、P23に対応する図2(E)に示すテンプレートによって生成されたコンテキスト3−Bを取り込む。
【0043】
各符号化部31−A,Bでは、上述の図11と同様の動作によって、コンテキスト3−A,Bに従って画像データ1−A,Bを適応的に予測符号化し、符号データ10−A,Bを出力する。
【0044】
図3は、本発明の符号化装置の実施の一形態における画像の入力と各符号化部の動作の一例を示すタイミングチャートである。入力画像クロックとともに1画素分の画像データ1が入力される。符号化部31−Aおよび符号化部31−Bには、入力画像クロックを2分周した、それぞれ位相の異なるクロックが入力される。符号化部31−A,Bにおいてはそれぞれのクロックの立ち上がりで画像データ1をラッチするため、結果的にラッチされた画像データA,Bは1画素おきにそれぞれの符号化部に入力されることになる。図3の例では、まず画素P20が入力されている間に符号化部31−Aのクロックが立ち上がり、P20が符号化部31−Aに取り込まれて符号化される。次に画素P21が入力されている間に符号化部31−Bのクロックが立ち上がり、P21が符号化部31−Bに取り込まれて符号化される。P21が入力されている間は符号化部31−Aのクロックは立ち上がらないため、P21は符号化部31−Aには取り込まれない。このようにして、符号化部31−Aと符号化部31−Bに交互に画像データ1が取り込まれて符号化される。
【0045】
図3に示したように、符号化部31−A,Bは、入力画像クロックの2周期分だけの間、符号化処理を行なうことができる。逆に、符号化部31−A,Bは並列的に動作するので、処理速度の倍の速度で画像データ1を入力して符号化することができ、全体の符号化速度は符号化部が1個の場合に比べて倍になる。このとき、コンテキスト生成部2を共用しているので、符号化部31−Aと符号化部31−Bはそれぞれ独立して符号化処理を行なっているにもかかわらず、的中率の高い予測を行なうことができ、圧縮効率を向上させている。
【0046】
各符号化部31−A,Bで符号化されて出力された符号データ10−A,Bは、それぞれ、FIFOメモリ32−A,Bに格納される。このときFIFOメモリ32−A,Bには、所定のデータ量を単位として複数単位の符号データが格納される。ここでは一例としてワード単位で符号データが格納されるものとする。
【0047】
図4は、本発明の符号化装置の実施の一形態における合成部の動作の一例を示すフローチャートである。このフローチャートでは、FIFOメモリ32−Aを‘A’として示し、FIFOメモリ32−Bを‘B’として示している。合成部36は、基本的にはS71〜S74の動作を繰り返す。すなわち、S71においてメモリ状態信号33−Aを参照し、FIFOメモリ32−Aが空か否かを判定し、空でなければS72においてFIFOメモリ32−Aから1ワード分の符号データ(単位符号データ35−A)を読み出して合成符号データ37として出力する。次にS73においてメモリ状態信号33−Bを参照し、FIFOメモリ32−Bが空か否かを判定し、空でなければS74においてFIFOメモリ32−Bから1ワード分の符号データ(単位符号データ35−B)を読み出して合成符号データ37として出力する。これを繰り返すことによって、符号化部31−Aと符号化部31−Bで符号化した符号データが1ワードごとに交互に出力されることになり、符号化部31−A,Bで生成した符号データが合成されたことになる。このような合成を行なうことによって、符号化部31−A,Bでそれぞれ生成した符号データを別々に管理することなく、1つの符号データとして管理することができるようになる。また、それぞれの符号データを識別する識別コードをなるべく排除することができ、合成時のデータ量の増大を抑制している。
【0048】
算術符号化方式では、1つの画像データの入力に対して1つの符号が出力されるとは限らず、例えば非常に効率よく符号化できる場合、多数の画像データが入力されないと符号は出力されない。また、図10を用いて説明したように、有効領域の基底の小数部分を符号とするため、場合によっては有効領域の変化によって桁上がりが発生する場合がある。例えば有効領域の基底が2進数で0.0111のとき、有効領域の分割によって例えば0.10001等に変更される場合がある。このような場合には、この桁上がりが発生する可能性を考慮して、符号を出力することはできない。
【0049】
このように符号データが出力されない状態が一方の符号化部で発生し、他方の符号化部からの符号データの出力がFIFOメモリに蓄積されてゆく場合がある。例えば符号化部31−Aから符号データが出力されない状態が続き、符号化部31−Bからの符号データがFIFOメモリ32−Bに蓄積されいている場合には、S75で符号化が終了したか否かを判断した後、S76においてFIFOメモリ32−Bが満杯か否かを判定する。満杯でない場合には、そのままS71へ戻る。これは、なるべく1ワードごとに交互に符号データを出力するフォーマットを崩さないためであり、符号化部31−Aから符号データが出力された時点で再び交互に1ワードずつ読み出し、出力する処理を開始する。
【0050】
さらに符号化部31−Aから符号データが出力されず、FIFOメモリ32−Bが満杯になると、符号化部31−Bは符号データを出力できないため符号化処理を停止しなければならなくなる。このような事態を回避するため、メモリ状態信号33−Aが空を示し、メモリ状態信号33−Bが満杯を示している場合には、S77において、直前に出力した符号データと同じブロックからの符号データを連続して出力する旨を示す識別コードを出力するとともに、FIFOメモリ32−Bからすべてのワードを読み出して出力する。そしてS71へ戻り、再びFIFOメモリ32−Aに符号データが格納されるのを待つ。
【0051】
符号化部31−Bから符号データが出力されない状態が続き、符号化部31−Aからの符号データがFIFOメモリ32−Aに蓄積されている場合も同様である。S72でFIFOメモリ32−Aから1ワード分の単位符号データ35−Aを読み出して出力した後、S73でFIFOメモリ32−Bが空であると判定される。S78で符号化処理が終了したか否かを判定した後、S79でFIFOメモリ32−Aが満杯か否かを判定する。FIFOメモリ32−Aが満杯でなければS73へ戻り、FIFOメモリ32−Bに符号データが格納されるのを待つ。FIFOメモリ32−Bが空のままFIFOメモリ32−Aが満杯となると、S80において、識別コードを出力するとともに、FIFOメモリ32−Aからすべてのワードを読み出して出力する。そしてS73へ戻り、再びFIFOメモリ32−Bに符号データが格納されるのを待つ。
【0052】
このように、FIFOメモリが満杯の場合には識別コードとともに符号データを出力することによって、合成符号データのデータ量が多少増加するものの、符号化部を停止させることなく、高速な符号化処理を行なうことができる。
【0053】
符号化すべき画像データ1の入力が無くなり、符号化処理が終了した場合にも、いずれかのFIFOメモリに符号データが格納されたまま、他のFIFOメモリに符号データが格納されるのを待つことになる。これを回避するため、S75およびS78で符号化処理の終了を判定する。S75で符号化処理の終了を判定した場合には、S71でFIFOメモリ32−Aが空であると判定されているので、FIFOメモリ32−Bにデータが残っていることになる。S81において、識別コードを出力した後、FIFOメモリ32−B内の符号データをすべて読み出し、出力する。また、S78で符号化処理の終了を判定した場合は、S73でFIFOメモリ32−Bが空であると判定されているので、S82において、識別コードを出力後、FIFOメモリ32−A内の符号データをすべて読み出し、出力する。このようにして、すべての符号データを出力することができる。
【0054】
図5は、合成符号データの一例の説明図である。上述のようにして合成部36から出力された合成符号データ37の一例を図5に示している。ここで、‘A’はFIFOメモリ32−Aから読み出した単位符号データ35−Aであり、‘B’はFIFOメモリ32−Bから読み出した単位符号データ35−Bである。基本的にFIFOメモリ32−AとFIFOメモリ32−Bから交互に1ワードずつ単位符号データ35−A,Bを読み出して出力するので、FIFOメモリ32−Aから読み出した単位符号データ35−Aと、FIFOメモリ32−Bから読み出した単位符号データ35−Bが、1ワードずつ交互に並んでいる。すなわち、FIFOメモリ32−Aから読み出される単位符号データ35−Aが順にA0 ,A1 ,・・・であり、FIFOメモリ32−Bから読み出される単位符号データ35−Bが順にB0 ,B1 ・・・であったとすると、まず、A0 ,B0 ,A0 ,B1 ・・・とそれぞれのブロックの符号が交互に出力される。
【0055】
n を出力した後、符号化部31−Aから符号データ10−Aが出力されない期間が続き、その間に符号化部31−Bから符号データ10−Bが出力されているとする。Bn を出力した後は、FIFOメモリ32−Bが満杯となるまで符号データの読み出しは行なわれず、そのままFIFOメモリ32−Bへ格納されるだけである。この状態がさらに続き、FIFOメモリ32−Bが満杯となると、識別コードを出力し、FIFOメモリ32−B内の符号データをすべて読み出して出力する。なお、ここではFIFOメモリ32の容量を16ワードとしている。図5に示すように、識別コードに続き、Bn+1 からBn+16が出力されている。
【0056】
この例ではその後、符号化部31−Aから符号データの出力があり、An+1 ,Bn+17,・・・と再び交互に読み出しおよび出力がなされている。もちろん、その後も符号化部31−Aから符号データの出力がなく、再びFIFOメモリ32−Bが満杯となれば、識別コードとともにFIFOメモリ32−B内のすべての符号データを出力する。符号化部31−Bから符号データの出力が無く、FIFOメモリ32−Aに符号データが蓄積されてゆく場合も同様である。このようにして、符号化部31−Aと符号化部31−Bで別々に符号化した符号データを1つにまとめることができ、しかもデータ量の増加を抑えた合成符号データ37を出力することができる。
【0057】
上述の識別コードは、通常の符号と異なるものであれば何でもよい。例えば、JBIGの規格で定められるFF04(16進)などのコメントマーカを使用してもよい。
【0058】
図6は、本発明の復号化装置の実施の一形態を示すブロック構成図である。図中、図17と同様の部分には同じ符号を付して説明を省略する。41は復号化部、42はFIFOメモリ、43はメモリ状態信号、44はライト信号、45は単位符号データ、46は分割部、47は合成符号データである。なお、図6では復号化部41を2ブロック設けた例を示しており、一方をAブロック、他方をBブロックとして、各ブロックに関係する構成には‘−’の後にAまたはBを記して区別している。
【0059】
分割部46は、合成符号データ47を分割して、単位符号データ45−A,Bとするとともに、メモリ状態信号43−A,Bを参照しながらFIFOメモリ42−A,Bを制御して、単位符号データ45−A,BをそれぞれFIFOメモリ42−A,Bに書き込む。分割部46は、上述の符号化装置における合成部36と全く逆の動作を行なう。すなわち、基本的には合成符号データ47を所定のデータ量ごとに分割し、FIFOメモリ42−AまたはFIFOメモリ42−Bに交互に書き込む。また、識別コードを検出した場合は、所定のデータ量の単位符号データを連続して一方のFIFOメモリに書き込む。
【0060】
FIFOメモリ42−A,Bは、復号化部41−A,Bにそれぞれ対応してその前段に設けられ、ライト信号44−A,Bに応じて所定のデータ量の単位符号データ45−A,Bを格納する。復号化部41−A,Bは、対応するFIFOメモリ42−A,Bから符号データ10−A,Bを読み出して復号する。
【0061】
復号化部41−A,Bは、図17に示した構成のうちコンテキスト生成部2を除く算術復号化部21、確率推定テーブル6、逆予測部22からなる。コンテキスト生成部2は、2つの復号化部41−A,Bに共通して設けられている。復号化部41−A,Bから交互に画像データ1が出力される。出力された画像データ1はコンテキスト生成部2に入力され、例えば図12に示すようなテンプレートに従ってコンテキスト3を生成する。コンテキスト生成部2で生成されたコンテキスト3は、交互に復号化部41−Aまたは復号化部41−Bに入力される。
【0062】
次に、本発明の復号化装置の実施の一形態における動作の一例について説明する。例えば図5に示したような合成符号データ47が分割部46に入力される。分割部46は、基本的には合成符号データ47を所定のデータ量の単位、例えば1ワード単位に分割し、分割した単位符号データ45−A,Bをライト信号44−A,BとともにFIFOメモリ42−A,Bに交互に書き込む。書き込みに際しては、メモリ状態信号43−A,Bを参照し、書き込む側のFIFOメモリが満杯でないことを確認して行なう。
【0063】
例えば図5に示す合成符号データ47では、最初の1ワードの単位符号データA0 をFIFOメモリ42−Aに書き込み、次の1ワードの単位符号データB0 をFIFOメモリ42−Bに書き込む。同様にしてA1 ,・・・,An をFIFOメモリ42−Aに、B1 ,・・・,Bn をFIFOメモリ42−Bにそれぞれ順次書き込んでゆく。メモリ状態信号43−A,Bを参照し、FIFOメモリ42−A,Bのいずれかが満杯の状態の場合には、その時点で書き込みを一時停止する。
【0064】
識別コードを検出すると、それに続く所定数の単位符号データは一方のFIFOメモリに書き込む。図5に示す合成符号データ47の場合には、識別コードの前にFIFOメモリ42−Bに書き込みを行なっているので、識別コードに続く16ワードの単位符号データをFIFOメモリ42−Bに順次書き込んでゆく。この場合もメモリ状態信号43−Bを参照し、FIFOメモリ42−Bが満杯の状態の場合には書き込みを一時停止する制御を行なう。
【0065】
各復号化部41−A,Bにおける動作は上述の図17と同様であり、コンテキスト生成部2で生成されたコンテキスト3−A,Bを用いて、FIFOメモリ42−A,Bから読み出した符号データ10−A,Bを復号し、画像データ1−A,Bとして出力する。このとき、復号化部41−A,Bは、コンテキスト生成部2から出力されるコンテキストを、復号する画素位置に応じて交互に取り込み、復号する。例えば図2(A)に示す画像を復元する場合、図2(B)に示す画素を符号化した符号データを復号する復号化部41−Aは、2番目の添字が偶数となる画素の画像データを復号する際のコンテキスト3−Aを取り込む。同様に、図2(C)に示す画素を符号化した符号データを復号する復号化部41−Bは、2番目の添字が奇数となる画素の画像データを復号する際のコンテキスト3−Bを取り込む。
【0066】
図7は、本発明の復号化装置の実施の一形態における復号化部の動作と画像データの出力の関係の一例を示すタイミングチャートである。復号化部41−A,Bには、それぞれ位相が異なるクロックが与えられており、このクロックに従って復号を行なう。復号処理によって、ある時点で復号結果である画像データが確定する。このとき、復号化部41−Aと復号化部41−Bはそれぞれ独立に復号処理を行なっており、復号化部が1つの場合に比べて倍の速度で復号することが可能である。
【0067】
復号化部41−Aと復号化部41−Bとは位相の異なるクロックに従って動作しているので、図7に示すように復号結果が確定するタイミングが異なる。これを復号化部41−A,Bに与えられているクロックの1/2の周期の出力画像クロックによって交互に出力させる。これによって、図2(B)に示した画素を復号した復号化部41−Aの復号結果と、図2(C)に示した画素を復号した復号化部41−Bの復号結果とが交互に選択されて、図2(A)に示す画像のデータが順次出力されることになる。
【0068】
また、このようにして復号化部41−A,Bの復号結果を交互に選択した画像データはコンテキスト生成部2にも入力される。これによってコンテキスト生成部2では、符号化時と同様に、図2(D)や(E)に示すような連続した画素を参照したコンテキストを生成することができる。
【0069】
ところが、コンテキスト生成部2において、前画素の復号が終了しないと現画素のコンテキストが生成できないため、現画素の復号を行なうことができないという問題がある。すなわち、一方の復号化部で復号処理が遅れると、他方の復号処理を開始することができず、処理速度が低下してしまう。これを回避するために、例えば上述の特願平8−288731号に開示したように、復号時に前画素がとりうるすべての値に従って逆予測を行ない、複数の逆予測データを生成しておく。そして、前画素の値が確定した時点でいずれがの逆予測データを選択し、復号処理を高速化する方式が提案されており、本発明でもこの技術を用いることができる。
【0070】
図6に示した本発明の復号化装置においては、それぞれの復号化部41−A,Bにおいて1画素おきに復号される。そのため、例えば復号化部41−Aで現画素を復号する際に、復号化部41−Aにおいて直前に復号処理した画素、すなわち原画像上では2画素前の画素と、他方の復号化部41−Bにおいて復号している画素、すなわち原画像上の1画素前の画素をコンテキストに使用する。復号化部41−Aで直前に復号した画素については、値は確定しているものの、逆予測部22内の逆予測テーブルの書き換えが発生している場合、書き換え完了まで逆予測が行なえない。また、復号化部41−Bで復号する画素については、並行して処理を行なっているので値も確定していない場合がある。そのため、現画素の復号を行なう際には、原画像上の1画素前と2画素前の画素について、とりうるすべての値の組み合わせに対応した複数の逆予測値を求めておく。そして、復号化部41−Aで直前に復号した画素の値と、復号化部41−Bで現在復号している画素の値が確定した時点で、これらの画素の値から複数の逆予測値の中から正しいものを選択すればよい。
【0071】
このような動作を実現する構成を以下に示す。図8は、本発明の復号化装置の実施の一形態における復号化部の別の例を示すブロック構成図である。図中、51〜54は逆予測テーブル、55は書き込み制御部、56は書き込み信号、57はライトアドレス、58は選択部、59は他復号化部からの画像データ、60は前画像データである。ここでは、1つの復号化部の構成のみを示している。図8に示す構成が図6における復号化部41−A,Bに適用される。
【0072】
この構成では、例えば図12に示すテンプレートのX1 ,X0 を除いたX9 〜X2 の8個の画像データからなるコンテキストを用いる。逆予測テーブル51〜54は、それぞれが例えば図13に示すような構成のテーブルであり、RAM等の記憶装置に格納されている。この逆予測テーブル51〜54のアドレスは、図13に示したものと異なり、8ビットで構成されている。逆予測テーブル51は、X1 ,X0 の画素を0,0と仮定した時の逆予測値およびステートを格納している。同様に、逆予測テーブル52〜54は、X1 ,X0 の画素をそれぞれ0,1、1,0、1,1と仮定したときの逆予測値およびステートをそれぞれ格納している。8ビットのコンテキストによって4つの逆予測テーブル51〜54からそれぞれ逆予測値およびステートが読み出されて、選択部58に入力される。
【0073】
選択部58は、算術復号化部21から出力される画像データ1を前画像データ60として取り込むとともに、他復号化部からの画像データ59を取り込み、これらに基づいて、逆予測テーブル51〜54から出力されている逆予測値およびステートのいずれかを選択し、ステートを確率推定テーブル6へ、逆予測値23を算術復号化部21へ出力する。例えば前画像データ60が0で、他復号化部からの画像データ59が0の場合には、逆予測テーブル51の出力を選択する。同様に、前画像データ60と他復号化部からの画像データ59が0,1の場合には逆予測テーブル52の出力を選択し、1,0の場合には逆予測テーブル53の出力を選択し、1,1の場合には逆予測テーブル54の出力を選択する。
【0074】
書き込み制御部55は、逆予測テーブル51〜54で利用するコンテキストX9 〜X2 を書き込みアドレスとして逆予測テーブル51〜54に対して出力するとともに、書き換え信号12の書き換え指示に応じて、算術復号化部21から出力される画像データ1および他復号化部からの画像データ59の値から書き込みを行なうべき逆予測テーブル51〜54のいずれかを選択して、選択した逆予測テーブルに書き込み信号56を送る。各逆予測テーブル51〜54には、確率推定テーブル6から出力されるNMPSまたはNLPSおよび算術復号化部21から出力される新逆予測値が書き換えデータ24として与えられているので、書き込み制御部55から書き込み信号56が送られた逆予測テーブルでは、同じく書き込み制御部55から送られてくる書き込みアドレスに書き換えデータ24が書き込まれる。
【0075】
図9は、本発明の復号化装置の実施の一形態における復号化部の別の例の動作の一例を説明するためのタイミングチャートである。図9では、図2におけるP24の位置の画素の復号を復号化部41−Aで行なう例を示している。復号化部41−Aでは、P24の位置の画素を復号する直前に、P22の位置の画素を復号する。書き込み制御部55は、P22の位置の画素を注目画素とするコンテキストX’9 〜X’2 を保持している。
【0076】
22の位置の画素を復号中に、P24の位置の画素を注目画素とするコンテキストX9 〜X2 が逆予測テーブル51〜54にアドレスとして入力される。逆予測テーブル51〜54から、それぞれX1 ,X0 が00,01,10,11の場合の4種類の逆予測値、ステートが読み出されて選択部58に入力される。
【0077】
一方、復号化部41−BにおいてはP23の位置の画素の復号が、復号化部41−AにおけるP22の位置の画素の復号に半周期遅れて開始される。やがて復号化部41−AにおけるP22の位置の画素が復号されて画像データが出力され、これが前画像データ60として選択部58に入力される。その後、復号化部41−BにおけるP23の位置の画素が復号されて画像データが出力され、他復号化部からの画像データ59として選択部58に入力される。この時点でX1 ,X0 の値が00,01,10,11のいずれであるかが確定されるので、選択部58は逆予測テーブル51〜54のいずれかの出力(逆予測値、ステート)を選択して、P24の位置の画素を復号するための逆予測値およびステートとして算術復号化部21および確率推定テーブル6に渡す。これによって次の周期でP24の位置の画素の復号を開始することができる。
【0078】
また、P22の復号によって逆予測テーブルの書き換えが発生した場合には、書き込み制御部55は、保持しているP22の位置の画素を注目画素とするコンテキストX’9 〜X’2 を書き込みアドレス57として予測テーブル51〜54に出力する。また、算術復号化部21から出力されるP22の位置の画像データ1と、復号化部41−Bから出力されるP23の位置の画像データである他復号化部からの画像データ59から書き換えるべき逆予測テーブルを特定し、その逆予測テーブルに対して書き込み信号56を送る。逆予測テーブル51〜54には、確率推定テーブル6および算術復号化部21から、P22の位置の画像データに関する書き換えデータ24が入力されているので、書き込み制御部55から書き込み信号56が与えられた逆予測テーブルは、書き込みアドレス57のデータを書き換えデータ24に書き換える。次のP26の位置の画素の復号では、書き換えられた逆予測テーブルを用いて4種類の逆予測値およびステートが出力されることになる。
【0079】
もちろん、復号化部41−Aから出力されるP22,P24の位置の画像データ1は、復号化部41−Bに送られて他復号化部からの画像データ59として用いられ、同様な処理で復号が実施される。
【0080】
このようにして、逆予測テーブルの書き換え前でも逆予測テーブルの読み出しが可能であるので、算術復号化部21の処理と逆予測テーブル51〜54の読み出しを並列的に実行することができ、復号処理を高速化することができる。
【0081】
なお、逆予測テーブル51〜54は、他復号化部からの画像データ59に対する1画素前の値のみによる2つの逆予測テーブルとして構成し、算術復号化部21から画像データ1が出力された後にコンテキストX9 〜X1 を用いるようにしてもよい。また、3ポートメモリを用いて、2つあるいは1つのメモリで構成してもよい。
【0082】
ここでは復号化装置について図8に示すような逆予測テーブルの先読みを行なって高速化する例を示したが、例えば上述の特願平8−301889号に記載されているように符号化装置について予測テーブルの先読みを行なうように構成すれば、符号化装置においても予測テーブルの書き込みよる遅延を発生させずに符号化処理を行なうことができ、符号化を高速に行なうことができる。
【0083】
以上、本発明による符号化部あるいは復号化部を複数配置して並列処理を行なう符号化装置および復号化装置について、一例を示した。本発明は、これらの例に限られるものではない。例えば、符号化部、復号化部を2ブロックではなく、もっと多数の構成にしてさらに並列化することも可能である。また、合成部36において合成する際の符号データのデータ量の単位も1ワード以外でよく、任意のデータ量を単位として、順次合成してゆくことができる。また、識別コード以後に続ける特定の符号化部からの符号データの単位数も任意に設定することができる。これらは復号化装置との間で設定可能であればよく、分割部46は符号化時と同じ規則で合成符号データを分割すればよい。
【0084】
また、FIFOメモリ32およびFIFOメモリ42の容量も16ワードに限るものではなく、任意の容量でよい。もちろん、FIFOメモリ32とFIFOメモリ42の容量が異なっていてもよく、合成符号データの形式に合わせて合成部36と分割部46がFIFOメモリ32、FIFOメモリ42を制御すればよい。
【0085】
またさらに、本発明は予測符号化方式の符号データを合成符号データに合成するものに限られるものではなく、異なる符号化方式の符号データをも合成するように構成することも可能である。
【0086】
以上のように本発明では、JBIGなどの高速化が困難な符号化方式においても高速化することができるため、高速リアルタイム処理が必要となるプリンタ、複写機などのシステムにも、JBIG等の高能率の符号化方式を応用し、データを圧縮することが可能となる。
【0087】
【発明の効果】
以上の説明から明らかなように、第1の発明の符号化装置によれば、並列処理した符号データを効率よく1つの符号に合成することができるため、合成された符号データのデータ量の増大を抑えるとともに、符号データの管理を簡易にすることができる。
【0088】
また、第2の発明の復号化装置によれば、効率よく合成された符号データを入力として分割手段で複数の復号化手段に分配入力し、複数の復号化手段で並列処理が可能な復号化装置を得ることができるという効果がある。
【0089】
このほか、予測符号化を複数の符号化手段で並列処理を行なうことができるので、高速に符号化を行なうことができる。このとき、前段に大きな画像メモリを必要とせず、またコンテキストを単体の符号化手段を用いる場合と同じように生成できるため、符号化効率を損なうこともなく符号化することができる。また、この符号化装置と同様に、前段に大きな画像メモリを必要とせず、複数の復号化手段で並列して復号処理を行なうことができるので、高速にリアルタイムで復号することができる。
【図面の簡単な説明】
【図1】 本発明の符号化装置の実施の一形態を示すブロック構成図である。
【図2】 画像データの一例の説明図である。
【図3】 本発明の符号化装置の実施の一形態における画像の入力と各符号化部の動作の一例を示すタイミングチャートである。
【図4】 本発明の符号化装置の実施の一形態における合成部の動作の一例を示すフローチャートである。
【図5】 合成符号データの一例の説明図である。
【図6】 本発明の復号化装置の実施の一形態を示すブロック構成図である。
【図7】 本発明の復号化装置の実施の一形態における復号化部の動作と画像データの出力の関係の一例を示すタイミングチャートである。
【図8】 本発明の復号化装置の実施の一形態における復号化部の別の例を示すブロック構成図である。
【図9】 本発明の復号化装置の実施の一形態における復号化部の別の例の動作の一例を説明するためのタイミングチャートである。
【図10】 算術符号化の概念図である。
【図11】 JBIGで採用されている予測符号化方式の概略図である。
【図12】 JBIGで使用されるテンプレートの一例の説明図である。
【図13】 予測部4に記憶されている予測テーブルの一例の説明図である。
【図14】 確率推定テーブル6の一例の説明図である。
【図15】 入力される画像データの一具体例の説明図である。
【図16】 書き換え後の予測部テーブルの一具体例の説明図である。
【図17】 JBIGで採用されている予測復号化方式の概略図である。
【図18】 算術復号化部の基本動作の説明図である。
【符号の説明】
1…画像データ、2…コンテキスト生成部、3…コンテキスト、4…予測部、5…ステート、6…確率推定テーブル、7…LSZおよびSW、8…予測値、9…算術符号化部、10…符号データ、11…書き換えデータ、12…書き換え信号、21…算術復号化部、22…逆予測部、23…逆予測値、24…書き換えデータ、31…符号化部、32…FIFOメモリ、33…メモリ状態信号、34…リード信号、35…単位符号データ、36…合成部、37…合成符号データ、41…復号化部、42…FIFOメモリ、43…メモリ状態信号、44…ライト信号、45…単位符号データ、46…分割部、47…合成符号データ、51〜54…逆予測テーブル、55…書き込み制御部、56…書き込み信号、57…ライトアドレス、58…選択部、59…他復号化部からの画像データ、60…前画像データ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image data encoding apparatus using a predictive encoding method and a decoding apparatus for the encoded data.
[0002]
[Prior art]
As one of binary image encoding techniques, there is a predictive encoding method that predicts the state of a target pixel from surrounding pixels and encodes the predicted result. In predictive coding, surrounding pixels that are considered to have a correlation with the target pixel are used for prediction as Markov information sources.
[0003]
As a prediction method, a method for directly determining a prediction value and a method for indirectly determining a prediction value are known. As a method for directly determining a prediction value, for example, as disclosed in Japanese Patent Laid-Open No. 5-316370, a predictor with a high hit ratio is adaptively switched among a plurality of predictors, and finally one prediction is performed. There is a method of selecting a container and using it for prediction of an original image. In addition, as a method for indirectly determining a prediction value, for example, there is a method in which information such as a prediction value is stored in a memory, and information in the memory is read from surrounding pixel values and used for prediction.
[0004]
The prediction method disclosed in Japanese Examined Patent Publication No. 6-95645 is a prediction method that indirectly determines a prediction value using the latter memory, and uses a table lookup method with the values of peripheral pixels as addresses. Prediction error data is generated using the output predicted value. However, the position of the predicted pixels is not fixed, but the position of only one pixel is made variable, and the predicted position is changed by the predictive middle rate. ITU-T TT. 82, the prediction method used in JBIG (Joint Bi-level Image coding expert Group) defined in T-85 is the prediction method shown in the above-mentioned Japanese Patent Publication No. 6-95645, and depends on the encoding state. A learning type method of updating information in the prediction table is adopted. For the encoding, prediction error data which is a result of predicting the target pixel by the above-described prediction method is used.
[0005]
In JBIG, arithmetic coding is adopted as a coding unit that codes prediction error data. In arithmetic coding, for example, as shown in Japanese Patent Publication No. 1-17295, a region on a number line is divided according to the occurrence probability of 1 and 0 of an input symbol, and the region is determined by the value of the input symbol. Select. At this time, a symbol (predominant symbol) that matches the prediction is referred to as MPS (More Probable Symbol), and a symbol that does not match (inferior symbol) is referred to as LPS (Less Probable Symbol). The MPS and LPS occurrence probability estimates are changed according to the predictive predictive value. In JBIG, a symbol appearance probability estimation unit has a probability value (= region width LSZ) at the time of occurrence of LPS, and has a learning function for updating the probability estimation value according to a symbol appearance process. The learning function for probability estimation works in conjunction with the learning function for the predicted value. This division selection processing is performed for the output series of the information source, and the output series is represented by a binary decimal display of one point in the area obtained by the final division.
[0006]
FIG. 10 is a conceptual diagram of arithmetic coding. The areas indicated by diagonal lines are the effective areas after the end of the symbol encoding. In the initial state, the effective area is the [0, 1) section, and the area width LSZ (0) when LPS occurs is set. 1-LSZ (0) is the area width when MPS occurs. Here, when the symbol is “0”, it is MPS, and when it is “1”, it is LPS. In FIG. 10, the probability value is indicated by a binary number.
[0007]
In FIG. 10, since the first input symbol is “0”, the effective area becomes the hatched area in FIG. 10A due to the occurrence of MPS. Then, a new area width LSZ (1) is set to divide the effective area into areas when LPS occurs and when MPS occurs. When the next symbol is “1”, the hatched area in FIG. 10B becomes the effective area due to the occurrence of LPS. Similarly, when the third symbol is “0”, the hatched area in FIG. 10C becomes an effective area, and when the fourth symbol is “1”, hatching in FIG. 10D. The area subjected to is an effective area.
[0008]
The output code is represented by C. The code for the input symbol string “0101” may be one point in the effective area in FIG. Here, the base of the effective area, that is, the smallest value C (3) of the effective area is expressed as a code and output.
[0009]
In arithmetic coding, since one point in the effective area is used as a code in the encoding process, if the area is increased, the effective digits are reduced and the code amount is reduced. That is, by reducing the value of LSZ as much as possible when MPS occurs and increasing the value of LSZ as much as possible when LPS occurs, a large effective area can be secured and the amount of codes can be reduced.
[0010]
FIG. 11 is a schematic diagram of a predictive coding method employed in JBIG. In the figure, 1 is image data, 2 is a context generation unit, 3 is context, 4 is a prediction unit, 5 is a state, 6 is a probability estimation table, 7 is LSZ and SW, 8 is a predicted value, and 9 is an arithmetic coding unit. 10 is code data, 11 is rewrite data, and 12 is a rewrite signal.
[0011]
The image data 1 is input to the arithmetic encoding unit 9 for encoding and also input to the context generation unit 2. In the context generation unit 2, in order to perform prediction of the target pixel, a prediction model template is created using surrounding pixels. FIG. 12 is an explanatory diagram of an example of a template used in JBIG. If P is a target pixel, the reference pixel X shown in FIG. 9 ~ X 0 A template that uses is generated. This reference pixel X 9 ~ X 0 Value of 2 Ten It becomes a 10-fold Markov information source of the state (context), and is directly input to the prediction unit 4 as context 3 and used for prediction.
[0012]
The prediction unit 4 includes a reference pixel X 9 ~ X 0 A prediction table in which a prediction value 8 corresponding to each value and a state 5 for referring to the probability estimation table 6 is paired is stored. Reference pixel X 9 ~ X 0 Context 3 that is the value of is input as it is to the prediction table as an address, and one of the 1024 entries of the prediction table is selected. The prediction value 8 and the state 5 are extracted from the prediction table entry selected by the context 3, the prediction value 8 is input to the arithmetic coding unit 9, and the state 5 is input to the probability estimation table 6. FIG. 13 is an explanatory diagram of an example of a prediction table stored in the prediction unit 4. The prediction table shown in FIG. 13 stores prediction values and states in pairs corresponding to addresses. The address is shown in binary, but this is the reference pixel X input as the context 3 9 ~ X 0 Correspond to the respective pixel values. For example, reference pixel X 0 If only the value of “1” is “1” and the other reference pixels are “0”, the address “0000000001” is referred to, and the predicted value “1” and the state “2” are obtained.
[0013]
The probability estimation table 6 corresponds to the state 5, the area width LSZ when the LPS occurs, the NLPS that is the next state value when the LPS occurs, the NMPS that is the next state value when the MPS occurs, and the normalization occurrence In some cases, SW that is a flag indicating whether or not to rewrite the predicted value is stored. LSZ and SW7 corresponding to the inputted state 5 are output to the arithmetic coding unit 9 and NMPS and NLPS are sent to the prediction unit 4 as a part of the rewrite data 11. FIG. 14 is an explanatory diagram of an example of the probability estimation table 6. In FIG. 14, LSZ, NMPS, NLPS, and SW are stored as a pair corresponding to the state 5 number. For example, when the state is “2”, “0x1114” as LSZ, “16” as NLPS, “3” as NMPS, and “0” as SW are obtained. Here, the numerical value starting with “0x” is a hexadecimal number.
[0014]
The arithmetic coding unit 9 compares the prediction value 8 input from the prediction unit 4 with the image data 1, and if they match, it is assumed that the symbol to be encoded is “0”, that is, MPS has occurred, and there is a mismatch. If so, it is assumed that the symbol to be encoded is “1”, that is, LPS has occurred. Then, using the LSZ input from the probability estimation table 6, arithmetic coding is performed as outlined in FIG. 10 to output code data 10. When an LPS occurs, the new predicted value is rewritten only when the predicted value is rewritten by the SW input from the probability estimation table 6 (for example, when SW is “1”). A rewrite signal 12 is sent to the prediction unit 4 as part of the data 11, and the prediction value of the prediction table stored in the prediction unit 4 is rewritten.
[0015]
In JBIG, the arithmetic encoding unit 9 is adjusted so that the effective area is always 0.5 or more and less than 1 so as not to increase the effective digits of the effective area. This process is called normalization. The probability estimation table is configured so that the value of LSZ is always less than 0.5. As a result, when LPS occurs, the effective area becomes less than 0.5, and normalization always occurs. Further, even when MPS occurs, the new effective area may be less than 0.5 because it is obtained by subtracting LSZ from the current effective area, and normalization may occur. When this normalization occurs, a rewrite signal 12 is sent to the prediction unit 4. The prediction unit 4 writes the NMPS given from the probability estimation table 6 to the prediction table as the state of the context 3 given from the context generation unit 2 when MPS occurs. When LPS occurs, the NLPS given from the probability estimation table 6 is written in the prediction table as the state of the context 3. After the prediction table is updated in this way, processing for the next image data 1 is started.
[0016]
A learning-type prediction / probability estimation method in which the above-described prediction unit 4 and probability estimation table 6 are sequentially rewritten will be further described using a specific example. FIG. 15 is an explanatory diagram of a specific example of input image data. FIG. 15 shows only the image data 1 of the template portion shown in FIG. As shown in FIG. 9 ~ X 0 Let us consider a case where the pixel of interest P is 1 when is “0000000011”. It is assumed that the contents shown in FIGS. 13 and 14 are set in the prediction table and the probability estimation table 6 of the prediction unit 4, respectively.
[0017]
First, the context “0000000011” is input to the prediction unit 4 as the context 3. At this time, the prediction value “0” and the state value “80” are stored in the address “0000000011” of the prediction table 4 of the prediction unit 4 as shown in FIG. The state value “80” read from the prediction table is input to the probability estimation table 6. Next, the state number “80” in the probability estimation table 6 is referred to. Since the contents shown in FIG. 14 are set in the probability estimation table 6, the LSZ value “0x5832” corresponding to the state number “80” is read and output to the arithmetic coding unit 9.
[0018]
At this time, the value of the pixel of interest P is “1”, but the predicted value read from the prediction table of the prediction unit 4 is “0”, which means that LPS has occurred. When LPS occurs, the area corresponding to the LSZ value read from the probability estimation table 6 is basically the next effective area. Since the LSZ is less than 0.5, normalization is performed so that the LSZ is 0.5 or more and less than 1, and the NLPS value “80” of the state number “80” is the address “0000000011” of the prediction unit 4. "Is overwritten as the state value. In addition, since the SW of the state number “80” in the probability estimation table 6 is “1”, the prediction value is inverted to “1” and is overwritten as the prediction value of the address “0000000011” of the prediction table of the prediction unit 4. The FIG. 16 is an explanatory diagram of a specific example of the prediction unit table after rewriting. In this way, as shown in FIG. 16, the prediction value and state value of the address “0000000011” of the prediction unit are rewritten. Prediction for the next image data 1 is performed using the rewritten prediction unit. Next, when the same context is input, the predicted value is 1.
[0019]
In this example, LPS has occurred, but when MPS has occurred, when normalization is performed, the state value of the prediction table of the prediction unit 4 is rewritten to NMPS “81”. When the same context 3 is input next after rewriting, the state value is “81”, and the LSZ at this time is “0x4d1c” from FIG. This value is smaller than LSZ “0x5832” when the state value is “80”, that is, the probability of occurrence of LPS is small. This is because the prediction at the same time of the previous context was hit, so when the same context is input next time, the area width when MPS occurs is widened, and when the prediction hits again, the effective area can be widened Thus, the final effective area can be increased and the code amount can be decreased.
[0020]
As described above, the prediction unit is sequentially rewritten according to the probability estimation table, the predictive predictability is improved, the number of MPS occurrences is increased, and the area width when MPS / LPS occurs is controlled to improve the coding efficiency. I am letting.
[0021]
Also, the decoding process is performed while performing region segmentation, similar to the encoding process. The difference from the encoding is that the prediction value is compared with the target pixel at the time of encoding, and the LPS / MPS area is calculated while it is calculated. Is obtained by calculation, and then the target pixel is obtained from the surrounding decoded reference pixels while performing reverse prediction.
[0022]
FIG. 17 is a schematic diagram of a predictive decoding method adopted in JBIG. In the figure, the same parts as those in FIG. 21 is an arithmetic decoding unit, 22 is an inverse prediction unit, 23 is an inverse prediction value, and 24 is rewritten data. The context generation unit 2 and the inverse prediction unit 22 operate exactly the same as the context generation unit 2 and the prediction unit 4 at the time of encoding. The inverse prediction unit 22 is the same as the prediction unit 4 at the time of encoding. Naturally, the same probability estimation table 6 as that used for encoding must be used.
[0023]
First, as in the case of encoding, a context is generated based on the values of reference pixels around the target pixel of the decoded image data 1, and the LSZ and the inverse prediction value 23 are arithmetically calculated from the inverse prediction unit 22 and the probability estimation table 6. The data is output to the decoding unit 21.
[0024]
Next, the code data 10 is subjected to comparison of effective areas in the arithmetic decoding unit 21, and then the image data 1 is output using the inverse prediction value 23. FIG. 18 is an explanatory diagram of the basic operation of the arithmetic decoding unit. First, the LSZ width input from the probability estimation table is subtracted from the current effective area,
(Effective area-LSZ)
Get. The MPS area and the LPS area are divided on the basis of this value. Next, it is compared whether or not the input code C is larger than the previously obtained (effective region−LSZ) value. That is,
C> Effective area-LSZ
Judgment is made. Since this comparison determination can determine whether the pixel of interest is LPS or MPS, the level of the pixel of interest is obtained from the input reverse prediction value. That is, in the case of MPS, the value of the target pixel is a reverse prediction value, and in the case of LPS, the reverse prediction value may be inverted to be the value of the target pixel. With the above processing, the target pixel can be basically decoded.
[0025]
However, in order to decode the next pixel, further processing such as determination of a new effective area and subtraction of a code-effective area is necessary. For example, in the example shown in FIG. 18, since the code data C exists in the LPS area, the LPS area is set as a new effective area, a new LSZ is set, and the above-described processing is repeated. Similarly to the encoding, the prediction value and state value of the prediction table stored in the prediction unit 4 are also rewritten.
[0026]
As described above, JBIG uses a learning-type prediction method that is updated using a rewritable memory as a probability estimation table, and uses an arithmetic coding method for the entropy coding unit, so that High-efficiency encoding of binary images and decoding of code data are achieved compared to length encoding and the like.
[0027]
However, in the JBIG system, high-efficiency encoding is achieved, but there is a problem that processing is slow. The learning-type prediction method using the prediction table adopted by JBIG has the advantage of improving the predictive predictive value because it rewrites the predicted value and state to bring it closer to the optimal state, but it takes time to access the memory. In addition, when the rewriting of the prediction table occurs, the predicted value cannot be read out until after the rewriting is completed, and it is difficult to increase the speed.
[0028]
In Japanese Patent Application Nos. 8-301889 and 8-2888731, a plurality of data are read in advance from a prediction table or an inverse prediction table at the time of encoding or decoding, and the encoding result or decoding of the current image is read out. A method has been proposed in which data is selected and speeded up according to the result. In addition, as disclosed in, for example, Japanese Patent Laid-Open No. 8-1554059, a method for speeding up arithmetic coding itself has been proposed. However, in any case, since there is a possibility that the prediction table is rewritten for each pixel, it is not possible to take measures for speeding up such as processing a plurality of adjacent pixels simultaneously.
[0029]
In order to speed up the encoding process, a method of processing in parallel using a plurality of encoders is generally considered. That is, the input image is divided into a plurality of regions and encoded by encoders corresponding to the respective regions. However, this method cannot cope with a case where an input image is transferred pixel by pixel from the top of the page from a scanner or the like. For example, when an input image is divided into two and encoded by two encoders, pixels in one region are transferred continuously, and only the encoder corresponding to one region operates during that time, and then the other encoder operates. The encoder corresponding to the other region cannot operate until the transfer of the pixels in the region is started. For this reason, although a plurality of encoders are provided, they cannot be processed in parallel. In order to perform parallel processing, it is conceivable to transfer an image after it is temporarily stored in a memory, but there is a problem that the amount of memory increases. Also, when outputting in real time to an output device or the like at the time of decompression, it is necessary to temporarily store it in the memory.
[0030]
As another method, as described in, for example, US Pat. No. 4,982,292, a method of encoding an input image every other pixel has been proposed. However, this method has a problem that JBIG generates a context that realizes high-efficiency encoding every other pixel, resulting in a decrease in prediction efficiency, which affects the encoding efficiency.
[0031]
Further, in any of the above-described methods for speeding up, since codes processed in parallel are output separately, there is a problem that memory management for storing codes becomes complicated.
[0032]
As a method of combining the separately generated code data into one, there is a method of inserting an identification code at the head of each code data as described in, for example, JP-A-6-38048. According to this method, one code is used, but if each code data length is increased, an extra memory is required, and if the switching is made finer, the identification code amount increases. there were.
[0033]
[Problems to be solved by the invention]
The present invention has been made in view of the above-described circumstances, and can perform high-efficiency encoding or decoding at high speed and generate code data that can be managed as one code data while suppressing the amount of code data. It is an object of the present invention to provide an encoding device that performs the decoding and a decoding device that decodes the encoded data.
[0034]
[Means for Solving the Problems]
In order to solve the above-described problem, the encoding device according to the first aspect of the present invention (invention 1), when combining the code data encoded by the plurality of encoding means by the combining means, The output code data is output in order for each unit code data. When the code data is not output from the encoding means, the code data cannot be output sequentially. Only in that case, the identification data is attached and the code data is output from the other encoding means. Accordingly, since the identification code is not output to the synthesized code data output from the synthesizing unit in a normal state, only the identification code is output only in a special case where the encoded data is not output from the encoding unit. Therefore, it is possible to reduce the data amount of the entire synthesized code data.
[0036]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block configuration diagram showing an embodiment of an encoding apparatus of the present invention. In the figure, the same parts as those in FIG. Reference numeral 31 denotes an encoding unit, 32 denotes a FIFO memory, 33 denotes a memory status signal, 34 denotes a read signal, 35 denotes unit code data, 36 denotes a synthesis unit, and 37 denotes synthesis code data. FIG. 1 shows an example in which two blocks of the encoding unit 31 are provided. One is an A block, the other is a B block, and A or B is written after “-” in a configuration related to each block. Distinguish.
[0037]
Each of the encoding units 31-A and B includes a prediction unit 4, a probability estimation table 6, and an arithmetic encoding unit 9, and the context generation unit 2 has a configuration common to the encoding units 31-A and B. Provided. The image data 1 is input to the context generation unit 2 provided in common and also input to the arithmetic encoding unit 9 of each of the encoding units 31-A and B. The contexts 3-A and B generated by the context generation unit 2 are input to the prediction units 4 of the respective encoding units 31-A and B.
[0038]
Corresponding to the respective encoding units 31-A, B, FIFO memories 32-A, B for temporarily storing the code data 10-A, B output from the respective encoding units 31-A, B are provided. Provided. The FIFO memories 32-A and B basically read out in advance from the previously stored code data in units of a predetermined data amount in accordance with the read signals 34-A and B from the synthesizer 36, and unit code data 35- A and B are transferred to the synthesis unit 36. The FIFO memories 32-A and B can each store a plurality of units of code data, and output memory status signals 33-A and B indicating whether the data is empty or full.
[0039]
Based on the memory status signals 33-A and B from the FIFO memories 32-A and B, the synthesizer 36 basically reads the read signal 34- alternately with respect to the FIFO memory 32-A and the FIFO memory 32-B. A or a read signal 34 -B is sent to read out the code data, unit code data 35 -A or unit code data 35 -B is obtained and output as synthesized code data 37. When one of the FIFO memory 32-A and the FIFO memory 32-B is empty and the other is full, the identification code of the full side is inserted and the FIFO memory 32-A continues from the full FIFO memory. Then, the unit code data is read out and output as composite code data 37. At the end of the code data, the code data remaining in the FIFO memory 32-A or the FIFO memory 32-B is read and output.
[0040]
Next, an example of the operation in the embodiment of the encoding apparatus of the present invention will be described. FIG. 2 is an explanatory diagram of an example of image data. FIG. 2A shows an original image composed of (n + 1) × (n + 1) pixels, in which data of each pixel from the left end of each line to the right end in order from the top to the bottom in the figure is input. And That is, P 00 , P 01 , ..., P 0n , P Ten , P 11 , ..., P 1n , P 20 , ..., P mn In this order, the image data 1 of each pixel is input. In the configuration shown in FIG. 1, two blocks are provided in the encoding unit, but each encoding unit 31-A, B encodes input image data 1 alternately. That is, the encoding unit 31-A performs P as shown in FIG. 00 , P 02 , ..., P Ten , P 12 ,... (The second subscript is an even pixel) is encoded. In addition, the encoding unit 31-B, as shown in FIG. 01 , P 03 , ..., P 11 , P 13 ,... (The second subscript is an odd number pixel) is controlled to be encoded.
[0041]
The context generation unit 2 generates the context 3 from the input image data 1 according to a template as shown in FIG. 12, for example. For example P twenty two When image data 1 is input, P shown in FIG. twenty two A context is generated by 10 pixels excluding. Next P twenty three When image data 1 is input, P shown in FIG. twenty three A context is generated by 10 pixels excluding. These contexts are generated uniformly regardless of which encoding unit is used. Thus, by generating the context 3 regardless of the encoding unit, the prediction accuracy is improved and the encoding can be performed efficiently.
[0042]
The encoding unit 31-A takes in the context 3-A and the image data 1-A output from the context generation unit 2 when a pixel with an even second subscript is input. For example, P twenty two When image data is input, it is captured as image data 1-A and P twenty two Context 3-A generated by the template shown in FIG. Similarly, the encoding unit 31-B captures the context 3-B and the image data 1-B output from the context generation unit 2 when a pixel with an odd second subscript is input. For example, P twenty three Image data is input as image data 1-B, and P twenty three Context 3-B generated by the template shown in FIG.
[0043]
In each of the encoding units 31-A and B, the image data 1-A and B are adaptively predictively encoded according to the contexts 3-A and B by the same operation as in FIG. Is output.
[0044]
FIG. 3 is a timing chart showing an example of image input and operation of each encoding unit in the embodiment of the encoding apparatus of the present invention. Image data 1 for one pixel is input together with the input image clock. The encoding unit 31-A and the encoding unit 31-B are input with clocks having different phases, respectively, obtained by dividing the input image clock by two. Since the encoding units 31-A and B latch the image data 1 at the rising edge of each clock, as a result, the latched image data A and B are input to the respective encoding units every other pixel. become. In the example of FIG. 20 Is input, the clock of the encoding unit 31-A rises and P 20 Is taken into the encoding unit 31-A and encoded. Next, pixel P twenty one Is input, the clock of the encoding unit 31-B rises and P twenty one Is taken into the encoding unit 31-B and encoded. P twenty one Since the clock of the encoding unit 31-A does not rise while is input, P twenty one Is not captured by the encoding unit 31-A. In this way, the image data 1 is alternately taken into the encoding unit 31-A and the encoding unit 31-B and encoded.
[0045]
As shown in FIG. 3, the encoding units 31-A and 31B can perform encoding processing for only two cycles of the input image clock. On the contrary, since the encoding units 31-A and B operate in parallel, the image data 1 can be input and encoded at a speed twice the processing speed, and the overall encoding speed is determined by the encoding unit. Doubled compared to a single case. At this time, since the context generator 2 is shared, the encoding unit 31-A and the encoding unit 31-B perform encoding processing independently, but the prediction with a high hit rate is performed. And the compression efficiency is improved.
[0046]
Code data 10-A and B encoded and output by the encoding units 31-A and B are stored in the FIFO memories 32-A and B, respectively. At this time, the FIFO memories 32-A and B store a plurality of units of code data in units of a predetermined data amount. Here, as an example, code data is stored in units of words.
[0047]
FIG. 4 is a flowchart showing an example of the operation of the synthesis unit in the embodiment of the encoding apparatus of the present invention. In this flowchart, the FIFO memory 32-A is indicated as 'A', and the FIFO memory 32-B is indicated as 'B'. The synthesizer 36 basically repeats the operations of S71 to S74. That is, referring to the memory status signal 33-A in S71, it is determined whether or not the FIFO memory 32-A is empty. If not, the code data (unit code data) for one word is read from the FIFO memory 32-A in S72. 35-A) is read out and output as composite code data 37. Next, in S73, the memory status signal 33-B is referenced to determine whether or not the FIFO memory 32-B is empty. If it is not empty, code data (unit code data) for one word is read from the FIFO memory 32-B in S74. 35-B) is read out and output as composite code data 37. By repeating this, the code data encoded by the encoding unit 31-A and the encoding unit 31-B are alternately output for each word, and generated by the encoding units 31-A and B. The code data is synthesized. By performing such synthesis, the code data generated by the encoding units 31-A and 31B can be managed as one code data without being managed separately. Also, identification codes for identifying the respective code data can be eliminated as much as possible, and an increase in the amount of data during synthesis is suppressed.
[0048]
In the arithmetic coding system, one code is not always output for input of one image data. For example, when encoding can be performed very efficiently, a code is not output unless a large number of image data is input. Also, as described with reference to FIG. 10, since the decimal part of the base of the effective area is used as a code, a carry may occur depending on the change of the effective area. For example, when the base of the effective area is 0.0111 in binary, it may be changed to 0.10001, for example, by dividing the effective area. In such a case, the code cannot be output in consideration of the possibility of this carry.
[0049]
There is a case where the state where the code data is not output occurs in one encoding unit, and the output of the code data from the other encoding unit is accumulated in the FIFO memory. For example, in a case where the code data is not output from the encoding unit 31-A and the code data from the encoding unit 31-B is accumulated in the FIFO memory 32-B, is the encoding completed in S75? After determining whether or not, in S76, it is determined whether or not the FIFO memory 32-B is full. If it is not full, the process directly returns to S71. This is to avoid losing the format for outputting the code data alternately for each word as much as possible. When the code data is output from the encoding unit 31-A, the process of alternately reading and outputting the words one by one again is performed. Start.
[0050]
Further, if code data is not output from the encoding unit 31-A and the FIFO memory 32-B is full, the encoding unit 31-B cannot output the code data, and thus must stop the encoding process. In order to avoid such a situation, when the memory status signal 33-A indicates empty and the memory status signal 33-B indicates full, in S77, the code data from the same block as the code data output immediately before is output. An identification code indicating that the code data is to be output continuously is output, and all words are read from the FIFO memory 32-B and output. Then, the process returns to S71 and again waits for the code data to be stored in the FIFO memory 32-A.
[0051]
The same applies to the case where the code data is not output from the encoding unit 31-B and the code data from the encoding unit 31-A is stored in the FIFO memory 32-A. After reading and outputting the unit code data 35-A for one word from the FIFO memory 32-A in S72, it is determined in S73 that the FIFO memory 32-B is empty. After determining whether or not the encoding process is completed in S78, it is determined whether or not the FIFO memory 32-A is full in S79. If the FIFO memory 32-A is not full, the process returns to S73 and waits for the code data to be stored in the FIFO memory 32-B. When the FIFO memory 32-A is full while the FIFO memory 32-B is empty, in S80, an identification code is output, and all words are read out from the FIFO memory 32-A and output. Then, the process returns to S73 and again waits for the code data to be stored in the FIFO memory 32-B.
[0052]
As described above, when the FIFO memory is full, the code data is output together with the identification code, so that the data amount of the composite code data is slightly increased. However, high-speed encoding processing can be performed without stopping the encoding unit. Can be done.
[0053]
Even when the input of the image data 1 to be encoded is lost and the encoding process is completed, the code data is stored in one of the FIFO memories, and the code data is stored in another FIFO memory and waits. become. In order to avoid this, the end of the encoding process is determined in S75 and S78. If it is determined in S75 that the encoding process has been completed, since it is determined in S71 that the FIFO memory 32-A is empty, data remains in the FIFO memory 32-B. In S81, after outputting the identification code, all the code data in the FIFO memory 32-B is read and output. If the end of the encoding process is determined in S78, it is determined in S73 that the FIFO memory 32-B is empty. Therefore, after the identification code is output in S82, the code in the FIFO memory 32-A is output. Read and output all data. In this way, all code data can be output.
[0054]
FIG. 5 is an explanatory diagram of an example of the composite code data. An example of the combined code data 37 output from the combining unit 36 as described above is shown in FIG. Here, 'A' is unit code data 35-A read from the FIFO memory 32-A, and 'B' is unit code data 35-B read from the FIFO memory 32-B. Basically, the unit code data 35-A and B are alternately read and output one word at a time from the FIFO memory 32-A and the FIFO memory 32-B, so that the unit code data 35-A read from the FIFO memory 32-A The unit code data 35-B read from the FIFO memory 32-B are alternately arranged one by one. That is, the unit code data 35-A read from the FIFO memory 32-A is sequentially converted to A. 0 , A 1 ,..., And the unit code data 35-B read from the FIFO memory 32-B are sequentially B 0 , B 1 If so, first of all, A 0 , B 0 , A 0 , B 1 .. And the code of each block are output alternately.
[0055]
A n Is output, the code data 10-A is not output from the encoding unit 31-A, and the code data 10-B is output from the encoding unit 31-B during that period. B n Is output, the code data is not read out until the FIFO memory 32-B is full, and is simply stored in the FIFO memory 32-B as it is. When this state further continues and the FIFO memory 32-B becomes full, an identification code is output, and all the code data in the FIFO memory 32-B is read and output. Here, the capacity of the FIFO memory 32 is 16 words. As shown in FIG. n + 1 To B n + 16 Is output.
[0056]
In this example, thereafter, there is an output of code data from the encoding unit 31-A, and A n + 1 , B n + 17 ,... Are alternately read and output alternately. Of course, if no code data is output from the encoding unit 31-A and the FIFO memory 32-B becomes full again, all the code data in the FIFO memory 32-B is output together with the identification code. The same applies to the case where code data is not output from the encoding unit 31-B and code data is accumulated in the FIFO memory 32-A. In this way, the code data separately encoded by the encoding unit 31-A and the encoding unit 31-B can be combined into one, and the combined code data 37 in which the increase in the data amount is suppressed is output. be able to.
[0057]
The above identification code may be anything as long as it is different from a normal code. For example, a comment marker such as FF04 (hexadecimal) defined by the JBIG standard may be used.
[0058]
FIG. 6 is a block configuration diagram showing an embodiment of the decoding apparatus of the present invention. In the figure, parts similar to those in FIG. Reference numeral 41 denotes a decoding unit, 42 denotes a FIFO memory, 43 denotes a memory status signal, 44 denotes a write signal, 45 denotes unit code data, 46 denotes a division unit, and 47 denotes composite code data. FIG. 6 shows an example in which two blocks of the decoding unit 41 are provided. One is an A block, the other is a B block, and A or B is written after “-” in a configuration related to each block. Distinguish.
[0059]
The dividing unit 46 divides the combined code data 47 into unit code data 45-A and B, and controls the FIFO memories 42-A and B while referring to the memory status signals 43-A and B, The unit code data 45-A and B are written into the FIFO memories 42-A and B, respectively. The dividing unit 46 performs the completely opposite operation to the combining unit 36 in the above-described encoding device. That is, basically, the composite code data 47 is divided into predetermined data amounts and written alternately into the FIFO memory 42-A or the FIFO memory 42-B. When the identification code is detected, unit code data having a predetermined data amount is continuously written in one FIFO memory.
[0060]
The FIFO memories 42-A, B are provided in the preceding stage corresponding to the decoding units 41-A, B, respectively, and unit code data 45-A, a predetermined amount of data according to the write signals 44-A, B, Store B. The decoding units 41-A and B read the code data 10-A and B from the corresponding FIFO memories 42-A and B and decode them.
[0061]
The decoding units 41-A and B include the arithmetic decoding unit 21, the probability estimation table 6, and the inverse prediction unit 22 excluding the context generation unit 2 in the configuration illustrated in FIG. The context generation unit 2 is provided in common to the two decoding units 41-A and B. Image data 1 is alternately output from the decoding units 41-A and B. The output image data 1 is input to the context generation unit 2, and a context 3 is generated according to a template as shown in FIG. 12, for example. The context 3 generated by the context generation unit 2 is alternately input to the decoding unit 41-A or the decoding unit 41-B.
[0062]
Next, an example of the operation in the embodiment of the decoding device of the present invention will be described. For example, composite code data 47 as shown in FIG. The dividing unit 46 basically divides the synthesized code data 47 into units of a predetermined data amount, for example, one word unit, and divides the divided unit code data 45-A and B together with the write signals 44-A and B into a FIFO memory. 42-A and B are written alternately. The writing is performed by referring to the memory status signals 43-A and 43B and confirming that the FIFO memory on the writing side is not full.
[0063]
For example, in the composite code data 47 shown in FIG. 5, the unit code data A of the first one word 0 Is written into the FIFO memory 42-A, and the unit code data B of the next one word is written. 0 Is written into the FIFO memory 42-B. Similarly A 1 , ..., A n To the FIFO memory 42-A, B 1 , ..., B n Are sequentially written in the FIFO memory 42-B. With reference to the memory status signals 43-A and B, if any of the FIFO memories 42-A and B is full, the writing is temporarily stopped at that time.
[0064]
When the identification code is detected, a predetermined number of unit code data subsequent thereto is written in one of the FIFO memories. In the case of the composite code data 47 shown in FIG. 5, since writing is performed in the FIFO memory 42-B before the identification code, unit code data of 16 words following the identification code is sequentially written in the FIFO memory 42-B. Go out. In this case as well, the memory status signal 43-B is referred to, and when the FIFO memory 42-B is full, the writing is temporarily stopped.
[0065]
The operations in the decoding units 41-A and B are the same as those in FIG. 17 described above, and the codes read from the FIFO memories 42-A and B using the contexts 3-A and B generated by the context generation unit 2 Data 10-A and B are decoded and output as image data 1-A and B. At this time, the decoding units 41-A and B alternately capture and decode the context output from the context generation unit 2 according to the pixel position to be decoded. For example, when the image shown in FIG. 2A is restored, the decoding unit 41-A that decodes the code data obtained by encoding the pixel shown in FIG. 2B is an image of a pixel whose second subscript is an even number. Context 3-A for decrypting data is captured. Similarly, the decoding unit 41-B that decodes the code data obtained by encoding the pixel illustrated in FIG. 2C performs the context 3-B when decoding the image data of the pixel whose second subscript is an odd number. take in.
[0066]
FIG. 7 is a timing chart showing an example of the relationship between the operation of the decoding unit and the output of image data in the embodiment of the decoding device of the present invention. The decoding units 41-A and 41B are given clocks having different phases, and decoding is performed according to these clocks. By decoding processing, image data that is a decoding result is determined at a certain point in time. At this time, each of the decoding unit 41-A and the decoding unit 41-B performs decoding processing independently, and can perform decoding at a speed twice that of the case of one decoding unit.
[0067]
Since the decoding unit 41-A and the decoding unit 41-B operate according to clocks having different phases, timings at which decoding results are determined are different as shown in FIG. This is alternately output by the output image clock having a cycle of 1/2 of the clock given to the decoding units 41-A and B. Thereby, the decoding result of the decoding unit 41-A that has decoded the pixel shown in FIG. 2B and the decoding result of the decoding unit 41-B that has decoded the pixel shown in FIG. The image data shown in FIG. 2A is sequentially output.
[0068]
Further, the image data obtained by alternately selecting the decoding results of the decoding units 41-A and B in this way is also input to the context generation unit 2. As a result, the context generator 2 can generate a context referring to continuous pixels as shown in FIGS. 2D and 2E as in the case of encoding.
[0069]
However, since the context generation unit 2 cannot generate the context of the current pixel unless decoding of the previous pixel is completed, there is a problem that the current pixel cannot be decoded. That is, if the decoding process is delayed in one decoding unit, the other decoding process cannot be started, and the processing speed decreases. In order to avoid this, for example, as disclosed in the above-mentioned Japanese Patent Application No. 8-288873, reverse prediction is performed according to all values that can be taken by the previous pixel during decoding, and a plurality of reverse prediction data is generated. Then, a method has been proposed in which one of the inverse prediction data is selected at the time when the value of the previous pixel is determined, and the decoding process is accelerated, and this technique can also be used in the present invention.
[0070]
In the decoding apparatus of the present invention shown in FIG. 6, the decoding is performed every other pixel in each decoding unit 41-A, B. Therefore, for example, when the decoding unit 41-A decodes the current pixel, the decoding unit 41-A immediately performs the decoding process, that is, the pixel two pixels before the original image and the other decoding unit 41. The pixel being decoded in -B, that is, the previous pixel on the original image is used for the context. Although the values of the pixels decoded immediately before by the decoding unit 41-A are fixed, if the inverse prediction table in the inverse prediction unit 22 is rewritten, the inverse prediction cannot be performed until the rewriting is completed. Further, since the pixels decoded by the decoding unit 41-B are processed in parallel, the values may not be fixed. Therefore, when decoding the current pixel, a plurality of inverse prediction values corresponding to all possible combinations of values are obtained for the pixels one pixel before and two pixels before on the original image. Then, when the value of the pixel decoded immediately before by the decoding unit 41-A and the value of the pixel currently decoded by the decoding unit 41-B are determined, a plurality of inverse prediction values are obtained from the values of these pixels. Select the correct one from the list.
[0071]
A configuration for realizing such an operation is shown below. FIG. 8 is a block configuration diagram showing another example of the decoding unit in the embodiment of the decoding apparatus of the present invention. In the figure, 51 to 54 are inverse prediction tables, 55 is a write control unit, 56 is a write signal, 57 is a write address, 58 is a selection unit, 59 is image data from another decoding unit, and 60 is previous image data. . Here, only the configuration of one decoding unit is shown. The configuration shown in FIG. 8 is applied to the decoding units 41-A and B in FIG.
[0072]
In this configuration, for example, the template X shown in FIG. 1 , X 0 X excluding 9 ~ X 2 A context consisting of eight image data is used. Each of the inverse prediction tables 51 to 54 is a table configured as shown in FIG. 13, for example, and is stored in a storage device such as a RAM. Unlike those shown in FIG. 13, the addresses of the reverse prediction tables 51 to 54 are composed of 8 bits. The reverse prediction table 51 is X 1 , X 0 The inverse prediction value and the state when the pixels are assumed to be 0, 0 are stored. Similarly, the inverse prediction tables 52 to 54 are represented by X 1 , X 0 Are stored as inverse prediction values and states when the pixels are assumed to be 0, 1, 1, 0 and 1, 1, respectively. Inverse prediction values and states are read from the four inverse prediction tables 51 to 54 according to an 8-bit context, and are input to the selection unit 58.
[0073]
The selection unit 58 captures the image data 1 output from the arithmetic decoding unit 21 as the previous image data 60 and also captures the image data 59 from the other decoding units, and based on these, from the inverse prediction tables 51 to 54. One of the output reverse prediction value and state is selected, and the state is output to the probability estimation table 6 and the reverse prediction value 23 is output to the arithmetic decoding unit 21. For example, when the previous image data 60 is 0 and the image data 59 from the other decoding unit is 0, the output of the reverse prediction table 51 is selected. Similarly, when the previous image data 60 and the image data 59 from the other decoding unit are 0 and 1, the output of the reverse prediction table 52 is selected, and when the image data 59 is 1, 0, the output of the reverse prediction table 53 is selected. In the case of 1, 1, the output of the reverse prediction table 54 is selected.
[0074]
The write control unit 55 uses the context X used in the inverse prediction tables 51 to 54. 9 ~ X 2 As a write address to the inverse prediction tables 51 to 54, and in response to a rewrite instruction of the rewrite signal 12, the image data 1 output from the arithmetic decoding unit 21 and the image data 59 from the other decoding unit One of the reverse prediction tables 51 to 54 to be written is selected from the values, and a write signal 56 is sent to the selected reverse prediction table. In each of the inverse prediction tables 51 to 54, the NMPS or NLPS output from the probability estimation table 6 and the new inverse prediction value output from the arithmetic decoding unit 21 are given as the rewrite data 24. Therefore, the write control unit 55 In the reverse prediction table to which the write signal 56 is sent, the rewrite data 24 is written to the write address sent from the write control unit 55.
[0075]
FIG. 9 is a timing chart for explaining an example of the operation of another example of the decoding unit in the embodiment of the decoding apparatus of the present invention. In FIG. 9, P in FIG. twenty four The example which performs decoding of the pixel of the position by the decoding part 41-A is shown. In the decoding unit 41-A, P twenty four Immediately before decoding the pixel at position P twenty two The pixel at the position is decoded. The write control unit 55 twenty two Context X ′ with the pixel at the position of interest as the pixel of interest 9 ~ X ' 2 Holding.
[0076]
P twenty two While decoding the pixel at position P twenty four Context X with the pixel at the position of the target pixel 9 ~ X 2 Is input to the reverse prediction tables 51 to 54 as an address. From the inverse prediction tables 51 to 54, X 1 , X 0 Four types of reverse predicted values and states in the case of “00”, “01”, “10”, and “11” are read out and input to the selection unit 58.
[0077]
On the other hand, in the decoding unit 41-B, P twenty three Is decoded by the decoding unit 41-A. twenty two This is started with a half cycle delay in decoding of the pixel at the position. Eventually P in the decoding unit 41-A twenty two The pixel at the position is decoded to output image data, which is input to the selection unit 58 as previous image data 60. Thereafter, P in the decoding unit 41-B twenty three Is decoded to output image data, which is input to the selection unit 58 as image data 59 from another decoding unit. X at this point 1 , X 0 Therefore, the selection unit 58 selects any output (reverse prediction value, state) of the reverse prediction tables 51 to 54, and P is determined. twenty four Is passed to the arithmetic decoding unit 21 and the probability estimation table 6 as an inverse prediction value and a state for decoding the pixel at the position. As a result, P in the next cycle twenty four The decoding of the pixel at the position can be started.
[0078]
P twenty two When the reverse prediction table is rewritten by decoding, the write control unit 55 holds the stored P twenty two Context X ′ with the pixel at the position of interest as the pixel of interest 9 ~ X ' 2 Is output to the prediction tables 51 to 54 as the write address 57. Further, P output from the arithmetic decoding unit 21 twenty two Image data 1 at the position of P and P output from the decoding unit 41-B twenty three The reverse prediction table to be rewritten is specified from the image data 59 from the other decoding unit, which is the image data at the position, and a write signal 56 is sent to the reverse prediction table. In the inverse prediction tables 51 to 54, the probability estimation table 6 and the arithmetic decoding unit 21 receive P twenty two Since the rewrite data 24 relating to the image data at the position is input, the reverse prediction table to which the write signal 56 is given from the write control unit 55 rewrites the data at the write address 57 to the rewrite data 24. Next P 26 In the decoding of the pixel at the position, four types of reverse prediction values and states are output using the rewritten reverse prediction table.
[0079]
Of course, P output from the decoding unit 41-A twenty two , P twenty four The image data 1 at the position is sent to the decoding unit 41-B and used as the image data 59 from the other decoding unit, and decoding is performed by the same processing.
[0080]
In this way, since the reverse prediction table can be read even before the reverse prediction table is rewritten, the arithmetic decoding unit 21 and the reverse prediction tables 51 to 54 can be read in parallel. Processing can be speeded up.
[0081]
The inverse prediction tables 51 to 54 are configured as two inverse prediction tables based only on the value of one pixel before the image data 59 from the other decoding unit, and after the image data 1 is output from the arithmetic decoding unit 21. Context X 9 ~ X 1 May be used. Alternatively, a three-port memory may be used to form two or one memory.
[0082]
Here, an example is shown in which the decoding apparatus performs pre-reading of the reverse prediction table as shown in FIG. 8 to increase the speed, but for example, as described in the above-mentioned Japanese Patent Application No. 8-301890, If the prediction table is prefetched, the encoding apparatus can perform the encoding process without causing a delay due to the writing of the prediction table, and the encoding can be performed at high speed.
[0083]
As described above, an example of the encoding device and the decoding device that perform parallel processing by arranging a plurality of encoding units or decoding units according to the present invention has been shown. The present invention is not limited to these examples. For example, the encoding unit and the decoding unit can be further parallelized with a larger number of configurations instead of two blocks. In addition, the unit of the code data amount when combining in the combining unit 36 may be other than one word, and can be combined sequentially with an arbitrary data amount as a unit. In addition, the number of units of code data from a specific encoding unit continued after the identification code can be arbitrarily set. These may be set with the decoding apparatus, and the dividing unit 46 may divide the combined code data according to the same rules as those used for encoding.
[0084]
Further, the capacities of the FIFO memory 32 and the FIFO memory 42 are not limited to 16 words, and may be arbitrary capacities. Of course, the capacities of the FIFO memory 32 and the FIFO memory 42 may be different, and the combining unit 36 and the dividing unit 46 may control the FIFO memory 32 and the FIFO memory 42 in accordance with the format of the combined code data.
[0085]
Furthermore, the present invention is not limited to the one that synthesizes the code data of the predictive coding method into the synthesized code data, and can be configured to synthesize the code data of different coding methods.
[0086]
As described above, according to the present invention, it is possible to increase the speed even in an encoding method such as JBIG, which is difficult to increase in speed. Therefore, even in a system such as a printer or a copier that requires high-speed real-time processing, Data can be compressed by applying an efficient encoding method.
[0087]
【The invention's effect】
As is apparent from the above description, according to the encoding device of the first aspect of the invention, the code data that has been processed in parallel can be efficiently combined into one code, so that the data amount of the combined code data is increased. And the management of the code data can be simplified.
[0088]
Further, according to the decoding device of the second invention, the efficiently synthesized code data is distributed as input to the plurality of decoding means by the dividing means, and the decoding that can be processed in parallel by the plurality of decoding means There is an effect that an apparatus can be obtained.
[0089]
In addition, since predictive encoding can be performed in parallel by a plurality of encoding means, encoding can be performed at high speed. At this time, a large image memory is not required in the previous stage, and since the context can be generated in the same manner as when a single encoding unit is used, encoding can be performed without impairing encoding efficiency. Similarly to this encoding apparatus, a large image memory is not required in the previous stage, and decoding processing can be performed in parallel by a plurality of decoding means, so that decoding can be performed in real time at high speed.
[Brief description of the drawings]
FIG. 1 is a block configuration diagram showing an embodiment of an encoding apparatus of the present invention.
FIG. 2 is an explanatory diagram of an example of image data.
FIG. 3 is a timing chart showing an example of image input and operation of each encoding unit in the embodiment of the encoding apparatus of the present invention.
FIG. 4 is a flowchart showing an example of the operation of the synthesis unit in the embodiment of the encoding apparatus of the present invention.
FIG. 5 is an explanatory diagram of an example of composite code data;
FIG. 6 is a block configuration diagram showing an embodiment of a decoding device of the present invention.
FIG. 7 is a timing chart showing an example of the relationship between the operation of the decoding unit and the output of image data in the embodiment of the decoding device of the present invention.
FIG. 8 is a block configuration diagram showing another example of a decoding unit in an embodiment of the decoding apparatus of the present invention.
FIG. 9 is a timing chart for explaining an example of operation of another example of the decoding unit in the embodiment of the decoding apparatus of the present invention;
FIG. 10 is a conceptual diagram of arithmetic coding.
FIG. 11 is a schematic diagram of a predictive coding method employed in JBIG.
FIG. 12 is an explanatory diagram of an example of a template used in JBIG.
13 is an explanatory diagram of an example of a prediction table stored in a prediction unit 4. FIG.
FIG. 14 is an explanatory diagram of an example of a probability estimation table 6;
FIG. 15 is an explanatory diagram of a specific example of input image data.
FIG. 16 is an explanatory diagram of a specific example of a prediction unit table after rewriting.
FIG. 17 is a schematic diagram of a predictive decoding method employed in JBIG.
FIG. 18 is an explanatory diagram of a basic operation of an arithmetic decoding unit.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Image data, 2 ... Context generation part, 3 ... Context, 4 ... Prediction part, 5 ... State, 6 ... Probability estimation table, 7 ... LSZ and SW, 8 ... Predicted value, 9 ... Arithmetic coding part, 10 ... Code data, 11 ... rewrite data, 12 ... rewrite signal, 21 ... arithmetic decoding unit, 22 ... inverse prediction unit, 23 ... reverse prediction value, 24 ... rewrite data, 31 ... encoding unit, 32 ... FIFO memory, 33 ... Memory state signal 34 ... Read signal 35 ... Unit code data 36 ... Synthesis unit 37 ... Synthesis code data 41 ... Decoding unit 42 ... FIFO memory 43 ... Memory status signal 44 ... Write signal 45 ... Unit code data, 46... Dividing unit, 47... Synthetic code data, 51 to 54 .. Inverse prediction table, 55... Write control unit, 56 ... Write signal, 57 ... Write address, 58. , 59 ... image data, 60 ... front image data from the other decoder.

Claims (1)

画素ごとに順次振り分けられて入力されたデータを符号化する複数の符号化手段と、該複数の符号化手段で生成された符号データをそれぞれ格納する複数のメモリと、前記複数のメモリから前記符号データを読み出して単位符号データごとに所定の順序で1つの合成符号データに合成する合成手段を有し、該合成手段は、ある符号化手段において出力すべき符号データを格納する前記メモリが空で、かつ、他の符号化手段に対応する前記メモリが満杯の場合には識別子とともに他の符号化手段の出力する前記符号データを当該他の符号化手段に対応する前記メモリからすべて読み出して出力することを特徴とする符号化装置。A plurality of encoding means for encoding data input after being sequentially assigned to each pixel; a plurality of memories each storing code data generated by the plurality of encoding means; and the code from the plurality of memories Combining means for reading out data and combining it into one combined code data in a predetermined order for each unit code data, the combining means is configured such that the memory for storing code data to be output by a certain encoding means is empty. When the memory corresponding to the other encoding means is full, the code data output from the other encoding means together with the identifier is read out from the memory corresponding to the other encoding means and output. An encoding apparatus characterized by that.
JP2002311145A 2002-10-25 2002-10-25 Encoding device and decoding device Expired - Fee Related JP3871995B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002311145A JP3871995B2 (en) 2002-10-25 2002-10-25 Encoding device and decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002311145A JP3871995B2 (en) 2002-10-25 2002-10-25 Encoding device and decoding device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP16595097A Division JP3384287B2 (en) 1997-06-23 1997-06-23 Encoding device and decoding device

Publications (2)

Publication Number Publication Date
JP2003198858A JP2003198858A (en) 2003-07-11
JP3871995B2 true JP3871995B2 (en) 2007-01-24

Family

ID=27606721

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002311145A Expired - Fee Related JP3871995B2 (en) 2002-10-25 2002-10-25 Encoding device and decoding device

Country Status (1)

Country Link
JP (1) JP3871995B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100624432B1 (en) 2004-08-05 2006-09-19 삼성전자주식회사 Context adaptive binary arithmetic decoder method and apparatus
GB0524983D0 (en) * 2005-12-07 2006-01-18 Imagination Tech Ltd Recompression and decompression of a data stream for rate smoothing
JP2007214998A (en) * 2006-02-10 2007-08-23 Fuji Xerox Co Ltd Coding apparatus, decoding apparatus, coding method, decoding method, and program
JP5217972B2 (en) * 2008-12-01 2013-06-19 富士ゼロックス株式会社 Image expansion device
PL2559166T3 (en) 2010-04-13 2018-04-30 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Probability interval partioning encoder and decoder

Also Published As

Publication number Publication date
JP2003198858A (en) 2003-07-11

Similar Documents

Publication Publication Date Title
JP4878262B2 (en) Entropy encoding device
JPH0969951A (en) Encoding method and decoding method
JP4785706B2 (en) Decoding device and decoding method
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP3409552B2 (en) Digital information encoding device, digital information decoding device, and digital information encoding / decoding device
JP3621512B2 (en) Digital information encoding apparatus, digital information decoding apparatus, digital information encoding / decoding apparatus, digital information encoding method, and digital information decoding method
US5736947A (en) Digital information encoding device, digital information decoding device, digital information encoding/decoding device, digital information encoding method, and digital information decoding method
JP3871995B2 (en) Encoding device and decoding device
JP2009081726A (en) Entropy coding device, entropy coding method, and computer program
JP3459759B2 (en) Arithmetic decoding device
JP3384287B2 (en) Encoding device and decoding device
JP3787389B2 (en) Image processing apparatus and method, and storage medium storing the method
US6882751B2 (en) Arithmetic decoding method and device and storage medium
JPH07249995A (en) Data encoding device
JP3141794B2 (en) Decryption device
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
JP4086481B2 (en) Arithmetic decoding method and apparatus, and storage medium
JP3213200B2 (en) Decoding device and method
US6999627B2 (en) Deterministic prediction in an image processing system
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP3146109B2 (en) Binary image coding device
JPH0936749A (en) Coding decoding device and coding method used for it
JP3270665B2 (en) Encoding / decoding apparatus and method
JP3484900B2 (en) Image data encoding device
JP3786329B2 (en) Encoding / decoding device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050304

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050413

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050610

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050620

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20050729

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060922

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061018

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101027

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121027

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees