JP4086481B2 - Arithmetic decoding method and apparatus, and storage medium - Google Patents

Arithmetic decoding method and apparatus, and storage medium Download PDF

Info

Publication number
JP4086481B2
JP4086481B2 JP2001179063A JP2001179063A JP4086481B2 JP 4086481 B2 JP4086481 B2 JP 4086481B2 JP 2001179063 A JP2001179063 A JP 2001179063A JP 2001179063 A JP2001179063 A JP 2001179063A JP 4086481 B2 JP4086481 B2 JP 4086481B2
Authority
JP
Japan
Prior art keywords
image data
bit
arithmetic
memory
decoding
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
JP2001179063A
Other languages
Japanese (ja)
Other versions
JP2002077634A (en
JP2002077634A5 (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2001179063A priority Critical patent/JP4086481B2/en
Publication of JP2002077634A publication Critical patent/JP2002077634A/en
Publication of JP2002077634A5 publication Critical patent/JP2002077634A5/ja
Application granted granted Critical
Publication of JP4086481B2 publication Critical patent/JP4086481B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、算術符号化(Arithmetic coding)により画像データを符号化した符号化データを復号化する算術復号化方法及び装置、特に2値画像においても多値画像においても処理可能な算術復号化方法及び装置並びにこの算術復号化方法を実行するプログラムを格納した記憶媒体に関する。
【0002】
【従来の技術】
算術符号化は、[0,1)(区間一端のカギ括弧は、数値を含むことを意味し、丸括弧は数値を含まないことを意味する)の数値直線上の対応区間を各シンボルの生起確率に応じてそれぞれシンボルの生起確率に対応する下位区間に分割し、符号化対象シンボルに対応する前記下位区間の1つを選択して符号化する。次に、選択された下位区間をより小さい下位区間に前記確率に応じて再分割し、符号化対象シンボルに相当する当該より小さい下位区間の1つを選択して符号化する。この再起的再分割と下位区間の選択を符号化対象シンボル系列全体に亘って繰り返していき、かくして得られた最終的な下位区間内に含まれる点の座標を、少なくとも他の区間と区別できる2進小数で表現して、そのまま符号化対象シンボル系列全体の符号とするものである。
【0003】
算術符号化の方式として代表的なものとして、ITU(International Telecommunication:国際電気通信連合)の機関であるJBIG(Joint Bi−level Image Experts Group)で標準化されたJBIG(QM−coder)方式、IBM社が提案しているQ−coder方式等がある。
【0004】
各方式により使用されている用語が異なるため、ここでは標準方式であるJBIG方式に用いられている用語を使用することにする。
【0005】
原理的な算術符号化では、算術演算部で乗算処理を必要とするが、それだと算術演算部のハードウェア規模が大きくなるとか、乗算処理に要する時間が長くなるといった問題があり、該算術演算を加減演算に置き換えて簡略化した方式が主流になっている。
【0006】
算術演算部の内部には、符号化されたシンボル系列に対応する領域幅(オージェント)を保持するAレジスタと、算術符号(コード)を発生する基となる値を保持するコードレジスタ(Cレジスタ)とがある。符号化予測値に対して符号化対象シンボルが外れる確率に対応する値を確率推定値(LSZ)とすると、算術演算部には予測値(MPS)、対象シンボルの値及びLSZが入力として与えられ、前記対象シンボルがMPSと一致したか否かという情報に基づいて、該確率推定値LSZと前記2つのレジスタの値とから算術演算(加減算)を行い、該2つのレジスタの値を更新する。
【0007】
前記領域幅は分割されるたびに小さくなるので精度を保つためにAレジスタの値は正規化される。これはAレジスタ及びCレジスタを左にビットシフトすることである。Cレジスタの上位の確定したビットは算術符号として出力される。
【0008】
復号化を行うときは算術演算部にMPS、LSZ及び算術符号が与えられる。LSZと算術符号の値からMPSと対象シンボルとが一致したか否かが分かるので、対象シンボルの値を逆算することができる。
【0009】
MPSとLSZはCX(コンテキスト)と呼ばれる情報から求められる。CXは対象シンボルの処理時に既に出現した近傍のシンボル値から構成される。JBIGでは10個のシンボル値からCXを構成するので、CXのとり得る値は1024通りであり、それぞれがMPSと確率を示す状態値(ST)とを持っている。LSZはコンテキスト(CX)の状態値を所定の対応表に従って変換することによって得られる。
【0010】
コンテキスト(CX)ごとに持つMPSとSTは、ある条件の元で更新することにより、符号化シンボル系列固有のパターンを学習することができ、符号化効率を高めることができる。具体的に言えば10ビットのアドレスを持つRAM(ランダムアクセスメモリ)の対応するアドレスにMPSとSTの各一対をデータとしてセットしておき、CXをアドレスするRAMの出力をMPSとSTとする。MPSとSTの更新は、データの書き換えによって実現される。
【0011】
算術符号化方式において、符号化対象シンボル及びMPSは2値であるので、JBIGでは2値画像に対する処理法のみを規定している。但し、多値画像に対しても1ビットづつデータを切り出して算術演算を行うことが可能である。この場合、算術演算部は2値でも多値でも関係ないが、LSZの導き方については工夫が必要である。何故ならば、対象シンボルが属するビットの階層によって対象シンボル以前に出現したシンボル群(コンテキスト)と対象シンボルの出現確率の相関は異なるからである。つまり、LSZと対になるコンテキストのとり方はビットプレーンごとに独立して持つ必要がある。
【0012】
また、別の技術的課題として復号化の高速化に関するものがあった。算術符号の原理からいって、コンテキストは対象画素と相関が強い方が圧縮効率が高まる。また、処理済みの画素である必要があることから、例えば、1ビットの画像を扱う場合、1画素前のシンボルはコンテキストの構成要素の1つとなる。これは算術演算で復号化を行うとき処理速度を上げるための制約となる。何故ならば、直前画素の値が決定するまで対象画素のコンテキストが一意に決定せず、従って、状態値の読み出しを開始できないからである。
【0013】
これを解決するための手段として、MPSとSTを保持するRAMを複数に分割して先読みする方法がある。これは、例えば、2画素前の値が決定した時点でコンテキストは1画素前が0のときと1のときの2通りに絞られるから、2つのRAMを同時に読み出し、1画素前の値が決定した時点で読み出された2つの状態値から一方を選ぶ方法である。
【0014】
【発明が解決しようとする課題】
上述した従来例においては、多値画像に対して最適な算術符号化を行う場合及び2値画像の復号化処理を高速に行う場合のいずれにおいても、メモリの分割が必要であった。また、2値画像と多値画像の両方を処理可能な算術復号化装置を提供しようとした場合、算術演算部を共通化できても状態メモリを共通化することはできず、高価になるという問題点があった。
【0015】
本発明の目的は、2値画像と多値画像の両方を処理することができる安価な算術復号化方法及び装置、並びに上記算術復号化方法を実行するためのプログラムを格納した記憶媒体を提供することである。
【0016】
【課題を解決するための手段】
上記目的を達成するために、請求項1記載の算術復号化方法は、単一の算術演算部と個別にアクセス可能な複数のメモリを用いて、少なくとも1つのビットプレーンから成る算術符号化した画像データを復号化する算術復号化方法であって、前記算術符号化された画像データのビット深さに関する情報を受け取る受取ステップと、前記算術符号化された画像データのビット深さが前記メモリの数と等しい場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数を前記メモリのそれぞれ対応するものに格納する格納ステップと、前記算術符号化された画像データのビット深さが前記メモリの数より少ない場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数の1つを前記メモリの少なくとも一部に割り当てて格納する割当格納ステップと、前記状態変数のうちの前記各ビットプレーンの復号化対象画素にそれぞれ対応するものを前記メモリから読み出す読出ステップと、前記状態変数のうちの前記メモリから読み出されたものを前記算術演算部で既に算術復号化されたデータに基づいて選択する選択ステップと、当該選択された状態変数、及び該選択された状態変数と対をなす予測値を前記算術演算部に入力する入力ステップとを有することを特徴とする。
また、上記目的を達成するために、請求項6記載の算術復号化装置は、少なくとも1つのビットプレーンから成る算術符号化した画像データを復号化する算術復号化装置であって、算術演算を実行する単一の算術演算部と、個別にアクセス可能な複数のメモリと、算術符号化された画像データのビット深さに関する情報が入力されるビットモード入力部と、前記ビットモード入力部で入力されたビット深さが前記メモリの数と等しい場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数を前記メモリのそれぞれ対応するものに格納し、当該ビット深さが前記メモリの数より少ない場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数の1つを前記メモリの少なくとも一部に割り当てて格納する格納制御部と、前記状態変数のうちの前記各ビットプレーンの復号化対象画素にそれぞれ対応するものを前記メモリから読み出す読出部と、前記状態変数のうちの前記メモリから読み出されたものを前記算術演算部で既に算術復号化されたデータに基づいて選択する選択部と、当該選択された状態変数、及び該選択された状態変数と対をなす予測値を前記算術演算部に入力する入力部とを備えることを特徴とする。
また、上記目的を達成するために、請求項11記載の記憶媒体は、単一の算術演算部と個別にアクセス可能な複数のメモリとを用いて、少なくとも1つのビットプレーンから成る算術符号化した画像データを復号化する算術復号化方法をコンピュータに実行させるためのプログラムを格納したコンピュータ読み取り可能な記憶媒体であって、前記プログラムが、前記算術符号化された画像データのビット深さに関する情報を受け取る受取モジュールと、前記算術符号化された画像データのビット深さが前記メモリの数と等しい場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数を前記メモリのそれぞれ対応するものに格納する格納モジュールと、前記算術符号化された画像データのビット深さが前記メモリの数より少ない場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数の1つを前記メモリの少なくとも一部に割り当てて格納する割当格納モジュールと、前記状態変数のうちの前記各ビットプレーンの復号化対象画素にそれぞれ対応するものを前記メモリから読み出す読出モジュールと、前記状態変数のうちの前記メモリから読み出されたものを前記算術演算部で既に算術復号化されたデータに基づいて選択する選択モジュールと、当該選択された状態変数、及び該選択された状態変数と対をなす予測値を前記算術演算部に入力する入力モジュールとを有することを特徴とする。
また、上記目的を達成するために、請求項12記載の算術復号化方法は、算術符号化された2値画像データ及び多値画像データの双方を処理するのに共通して使用し得る単一の算術演算部と、前記算術演算部によって算術演算に利用するための予測値を含む状態変数の組を記憶する複数のメモリとを制御して前記算術符号化された2値画像データ及び多値 画像データを算術復号化する算術復号化方法であって、前記算術符号化された画像データ及び当該画像データのビット深さに関する情報を受け取る受取ステップと、前記ビット深さに関する情報に基づいて、前記画像データの1つのビットプレーンのうち復号化対象画素に対応する前記状態変数の各組を前記メモリ内のそれぞれのビットプレーンに当該画像データの各ビットプレーンと対応付けて記憶させるか、前記画像データの各ビットプレーンのうち復号化対象画素に対応する前記状態変数の組を割り当てて前記メモリの少なくとも部分に記憶させるかの選択を制御する制御ステップと、前記メモリに記憶された前記状態変数の組又はその少なくとも一部を、前記ビット深さに応じて決定された順序で前記算術演算部に入力する入力ステップとを有することを特徴とする。
【0026】
【発明の実施の形態】
以下、本発明の一実施の形態を図面に基づき説明する。
【0027】
図1は、本実施の形態に係る算術復号化装置の構成を示すブロック図である。
【0028】
同図において、160は復号化される算術符号データ、150はモード指定信号で、1ビットモードまたは2ビットモードまたは4ビットモードのいずれかを指定する信号である。
【0029】
108はラインバッファメモリで、復号化された画像データを略主走査1ライン分バッファリングするものである。100はCX生成部で、モード指定信号150に応じて、ラインバッファメモリ108から出力される前ラインのデータと不図示のシフトレジスタから出力される同一ラインの既に復号化された数画素分の画像データからCX(コンテキスト)101を生成するものである。
【0030】
110は、ROMであり、各ビットモード毎のMPS(予測値)とST(状態値)の前データが格納されている。
【0031】
181乃至184はそれぞれ予測状態メモリで、2ポートの同期型SRAM(スタティックランダムアクセスメモリ)によって構成され、各々、CX生成部100から出力されるCX101の最大1024通りの可能な値にそれぞれ対応する1024個のアドレスを有する。各アドレスには、1ビットモード、2ビットモード、及び4ビットモードの1つを指定する前記モード指定信号150に応じて、選択されたビットモードに応じて、一対のMPS(予測値)とST(状態値)が格納される。MPS(予測値)とST(状態値)は、後述の予測状態更新部107により更新される。CX生成部100からは、後述のようにビットモードに応じて生成されるCX101が、共通に入力され、それぞれMPS(予測値)185乃至188とST(状態値)189乃至192を出力するものである。
【0032】
140は予測状態値セレクト信号生成部で、予測状態値セレクト信号142を生成するものである。111は第1のセレクタで、第1の予測状態メモリ181から出力されるMPS185、ST189または第2の予測状態メモリ182から出力されるMPS186、ST190のいずれか一方を選んで出力するものである。112は第2のセレクタで、第3の予測状態メモリ183から出力されるMPS187、ST191または第4の予測状態メモリ184から出力されるMPS188、ST192のいずれか一方を選んで出力するものである。両セレクタ111,112の選択は予測状態値セレクト信号142により行われる。
【0033】
121は第1のF/F(フリップフロップ)回路で、第1のセレクタ111から出力されるデータ(MPS113、ST115)を保持するものである。122は第2のF/F(フリップフロップ)回路で、第2のセレクタ112から出力されるデータ(MPS114、ST116)を保持するものである。131は第1のST/LSZ変換部で、第1のF/F回路121から出力されるST125をLSZ(確率推定値)133に変換するものである。132は第2のST/LSZ変換部で、第2のF/F回路122から出力されるST126をLSZ(確率推定値)134に変換するものである。
【0034】
141はMPS/LSZセレクト信号生成部で、MPS/LSZセレクト信号143を生成するものである。105は第3のセレクタで、第1のF/F回路121から出力されるMPS123と第1のST/LSZ変換部131から出力されるLSZ133の組または第2のF/F回路122から出力されるMPS124と第2のST/LSZ変換部132から出力されるLSZ134の組のいずれか一方をMPS/LSZセレクト信号143により選択して出力するものである。この第3のセレクタ105の選択の指定は、MPS/LSZセレクト信号143により行われる。
【0035】
算術符号データ160は必要に応じて算術演算部106へ供給される。算術演算部106は算術符号データ160と第3のセレクタ105から出力されるLSZ136の値から、算術符号化時の予測が当たったか否かを判定し、Yn信号171として出力する。また、第3のセレクタ105から出力されるMPS135の値とYn信号171から復号化データ170の値が確定するので、それを出力する。
【0036】
予測状態更新部107は、算術演算部106からの出力に応じて予測状態の更新を行うものである。即ち、予測状態更新部107は、MPS135、LSZ136及びYn信号171に基づいて予測状態値即ち状態値STと予測値MPSの更新された対139を決定し、第1〜第4の予測状態メモリ181〜184の対応するアドレスに供給する。
【0037】
以上が各ブロックの基本的な機能である。
【0038】
本実施の形態においては、第1〜第4の予測状態メモリ181〜184は予測値(MPS)と状態値(ST)とを記憶する構成であるが、状態値(ST)の代わりに対応する確率推定値(LSZ)を記憶する構成としてもよい。状態値(ST)に対して確率推定値(LSZ)のビット数は多いので、RAMの記憶容量はより多く必要となるため一般的ではないが、状態値(ST)の代わりに対応する確率推定値(LSZ)を記憶する構成にした場合は、状態値(ST)から確率推定値(LSZ)を求めるプロセスがなくなるという利点がある。
【0039】
次に、2値の画像データを復号化するときにどのような動作を行うかについて説明する。
【0040】
(1ビットモード時)
図2は、2値の画像データを扱うときのCXの取り方を示す図であり、同図において、編み線部分は復号化対象画素である。
【0041】
図1において、モード指定信号150により1ビットモードであることをCX生成部100、予測状態値セレクト信号生成部140、MPS/LSZセレクト信号生成部141、予測状態更新部107及びROM110に通知され、後述のCX(8)とCX(9)が、00,01,10,11であるそれぞれの場合用に用意された1ビットモード用のMPSとST全体の4つの分割部分が、ROM110から読み出され、それぞれ予測状態メモリー181〜184の最初の4分の1(256個)のアドレスに格納される。
【0042】
あるサイクルでCX生成部100では、図2のCX(0)からCX(7)までの成分(画素にそれぞれ対応する2値の値)を含むコンテキスト(CX)を生成し出力する。即ち、1ビットモードでは、CX生成部100は、CX(8)とCX(9)に当たる画素がまだ復号化されておらず、CXが特定できないタイミングでCX101を出力する。この場合、それらの値によって最終的に確定するCXの値は4通りの場合が考えられるが、出力されるCX101のCX(8)とCX(9)はとりあえず0に固定される。各予測状態メモリ181乃至184には、このCX(8)とCX(9)が0である同一のCX101が共通して入力されるが、第1乃至第4予測状態メモリ181〜184の同じアドレス値の格納場所には、予め、CX(8)とCX(9)が、00,01,10,11である場合のMPSとSTのそれぞれの対が、格納されている。したがって、1ビットモード時は、各予測状態メモリは、その4分の1が実際に使用されることになる。説明の便宜上、上述のサイクルを第1のサイクルとする。
【0043】
次のサイクル、即ち第2のサイクルにおいて第1の予測状態メモリ181乃至第4の予測状態メモリ184は、前記CX101によって指定された同一のアドレス値を有するそれぞれの格納場所からCXの可能な4つの値に対応するMPS185〜188とST189〜192とのそれぞれの対を出力する。このサイクルにおいて図2のCX(8)に当たる画素の値が算術演算部106において復号化され、その復号化データ170は予測状態値セレクト信号生成部140を介して第1のセレクタ111及び第2のセレクタ112の選択信号142として用いられる。第1のセレクタ111及び第2のセレクタ112によって選択出力されたMPS113、ST115及びMPS114、ST116は、それぞれ第1のF/F回路121及び第2のF/F回路122によって次のサイクル、即ち第3のサイクルの間ラッチされる。
【0044】
第3のサイクルにおいて、第1のF/F回路121及び第2のF/F回路122から出力されるST125及びST126は、それぞれ第1のST/LSZ変換部131及び第2のST/LSZ変換部132によって対応するLSZ133及びLSZ134へ同サイクル中に変換される。
【0045】
また、現サイクルにおいては、図2のCX(9)に相当する画素の値が算術演算部106において復号化され、その復号化データ170はMPS/LSZセレクト信号生成部141を介して第3のセレクタ105の選択信号143として用いられる。第3のセレクタ105によって選択出力されたMPS135とLSZ136は算術演算部106へ入力される。
【0046】
第3のサイクルにおいて入力されたMPS135とLSZ136は、第4のサイクルにおいて算術演算に用いられ、図2の編み線部分に相当する画素の復号化データが算術演算部106から出力される。即ち、第4のサイクルにおいて算術演算部106は前記データを基に復号化処理を行い、第1のビットプレーンの注目ビットを復号化データ170として出力する。
【0047】
以上、ある注目画素が復号化される流れを追って説明したが、各処理ブロックについて着目すると、ある注目画素に関する処理を行ったサイクルの次のサイクルにおいては、その次の注目画素に関する処理を行う。
【0048】
以上のように1ビットモードにおいては、MPSとSTを4つの予測状態メモリ181乃至184から並列に読み出し、更にSTからLSZの変換と算術演算とをパイプライン的に同時に行うことにより、高速な復号化を行っている。
【0049】
(4ビットモード時)
図3(a)、(b)及び図4(a)、(b)は、4ビットモード時、つまり4ビットの深さを持つ画像データを扱うときのCXの取り方を示す図である。
【0050】
図3(a)は第1のビットプレーン上の注目ビットに対するCXの取り方を示している。この場合、注目ビットを含む同一ビットプレーン即ち第1のビットプレーン上のビットを参照している。図3(b)は、第2のビットプレーン上の注目ビットに対するCXの取り方を示している。この場合、注目ビットと同じ第2のビットプレーン及び上位の第1のビットプレーン上のビットを参照している。
【0051】
図4(a)は第3のビットプレーン上の注目ビットに対するCXの取り方を示している。注目ビットと同じ第3のビットプレーン及び上位の第1のビットプレーン及び第2のビットプレーン上のビットを参照している。図4(b)は、第4のビットプレーン上の注目ビットに対するCXの取り方を示している。注目ビットと同じ第4のビットプレーン及び上位の第1のビットプレーンと第2のビットプレーンと第3のビットプレーン上のビットを参照している。
【0052】
このように(注目ビットを含むビットプレーン上のビット以外では)上位のビットプレーン上のビットのみを参照するのは、上位ビットから下位ビットに対する相関が強いという多値画像の性質による。
【0053】
図5は、算術復号化処理を施す順番を示す図である。この図5に示す順番で復号化できるためには算術符号データ160も図5の順番で算術符号化処理を施す必要がある。図5のような復号化順序にする利点は、第2乃至第4のビットプレーン上の注目ビットに対するCXの要素のうちで1番最近に決定される第1ビットプレーンのビットは、少なくとも5サイクル前に復号化対象になっていることである。従って、図1においてCX生成部100がある注目ビットのCXを生成するとき、一番最近に復号化されたビットである第1ビットプレーンのビットは既に確定しているので、図2のCX(0)からCX(9)は全て決定している。
【0054】
4ビットモード時、画像データを復号化するときの動作を説明する。
【0055】
図1において、モード指定信号150により4ビットモードであることがCX生成部100、予測状態値セレクト信号生成部140、MPS/LSZセレクト信号生成部141、予測状態更新部107及びROM110に通知され、4つのビットプレーン用にそれぞれ用意された4ビットモード用の1024対のMPSとSTの4つの組が、ROM110から読み出されて、それぞれ予測状態メモリー181〜184に格納される。
【0056】
あるサイクルでCX生成部100では、図5の{i}、[1]の位置の注目ビットに対するCXを出力するものとする。前述のようにCXの全要素が確定している。説明の便宜上、このときのサイクルを第1のサイクルとする。
【0057】
次のサイクル、即ち第2のサイクルにおいて第1の予測状態メモリ181乃至第4の予測状態メモリ184は、前記CX101によって示される同一のアドレスを有する格納場所からデータ(MPS及びST)のそれぞれの対を同時に出力する。但し、第1ビットプレーンに対応するMPS及びSTは第1の予測状態メモリ181の対応するアドレスに保持されている。また、同様に第2ビットプレーンに対応するMPS及びSTは第2の予測状態メモリ182の対応するアドレスに保持されている。また、同様に第3ビットプレーンに対応するMPS及びSTは第3の予測状態メモリ183の対応するアドレスに保持されている。また、同様に第4ビットプレーンに対応するMPS及びSTは第4の予測状態メモリ184の対応するアドレスに保持されている。つまり、本サイクルの読み出しにおいては、第1の予測状態メモリ181からの読み出しデータであるMPS185、ST189だけが有効な出力である。
【0058】
予測状態値セレクト信号生成部140は、有効データが選択されるように予測状態値セレクト信号142を生成する。即ち、第1のセレクタ111はMPS185、ST189を選択し、MPS113、ST115として第1のF/F回路121へ出力する。
【0059】
第3のサイクルにおいて第1のF/F回路121は前サイクルにおいてMPS113、ST115としてラッチしたデータをMPS123、ST125として出力する。第2のF/F回路122に保持されているデータは無効なデータである。従って、このサイクルにおいてはMPS123と第1のST/LSZ変換部131の出力であるLSZ133を選択し、MPS135、ST136として出力するようにMPS/LSZセレクト信号生成部141は第3のセレクタ105を制御する。
【0060】
第4のサイクルにおいて算術演算部106は前記MPS135及びST136を基に復号化処理を行い、第1ビットプレーンの注目ビットを復号化データ170として出力する。
【0061】
以上、図5の{i}、[1]の位置のビットが復号化される流れを追って説明したが、各処理ブロックについて着目すると、図5の{i}、[1]の位置のビットに関する処理を行ったサイクルの次のサイクルにおいて、その次の処理ビットである図5の{i−1}、[2]の位置のビットに関する処理を行う。即ち、CX生成部100は、第1のサイクルで図5の{i}、[1]の位置のビットに対するCXを出力し、第2のサイクルで図5の{i−1}、[2]の位置のビットに対するCXを出力し、第3のサイクルで図5の{i−2}、[3]の位置のビットに対するCXを出力し、第4のサイクルで図5の{i−3}、[4]の位置のビットに対するCXを出力し、第5のサイクルで図5の{i+1}、[1]の位置のビットに対するCXを出力し、以下これを繰り返すものである。
【0062】
従って、予測状態メモリの出力に着目すると、第2のサイクルでは第1の予測状態メモリ181の出力データが有効であり、第3のサイクルでは第2の予測状態メモリ182の出力データが有効であり、第4のサイクルでは第3の予測状態メモリ183の出力データが有効であり、第5のサイクルでは第4の予測状態メモリ184の出力データが有効であり、というように続くものである。即ち、4ビットモードにおいて、予測状態値セレクト信号生成部140は各メモリ181乃至184の出力が順々に選択されるようにシーケンシャルにセレクト信号を切り換えていけばよい。
【0063】
第3のセレクタ105について着目すると、第3のサイクルにおいて第1の予測状態メモリ181の出力データに対応するMPS123、LSZ133を選択し、第4のサイクルにおいて第2の予測状態メモリ182の出力データに対応するMPS123、LSZ133を選択し、第5のサイクルにおいて第3の予測状態メモリ183の出力データに対応するMPS124、LSZ134を選択し、第6のサイクルにおいて第4の予測状態メモリ184の出力データに対応するMPS124、LSZ134を選択し、というように続くものである。即ち、4ビットモードにおいて、MPS/LSZセレクト信号生成部141はMPS123、LSZ133とMPS124、LSZ134がサイクルおきに順々に選択されるようにシーケンシャルにセレクト信号を切り換えていけばよい。
【0064】
以上のように4ビットモード時においては、4つの予測状態メモリ181乃至184をビットプレーンごとに割り当てている。
【0065】
(2ビットモード時)
図6(a)、(b)は、2ビットモード時、つまり2ビットの深さを持つ画像データを扱うときのCXの取り方を示す図である。図6(a)は上位の第1のビットプレーン上の注目ビットに対するCXの取り方を示している。同一のビットプレーン上のビットを参照している。図6(b)は第2のビットプレーン上の注目ビットに対するCXの取り方を示している。注目ビットと同じ第2のビットプレーン及び上位の第1のビットプレーン上のビットを参照している。
【0066】
このように(注目ビットを含むビットプレーンのビット以外では)上位のビットプレーン上のビットのみを参照するのは、上位ビットから下位ビットに対する相関が強いという多値画像の性質による。
【0067】
図7は、算術復号化処理を施す順番を示す図である。この図7に示す順番で復号化できるためには算術符号データ160も図7に示す順番で算術符号化を施す必要がある。図7のような復号化の順序にする利点は、ビットプレーン上の注目ビットに対するCXの要素のうちで一番最近に決定される直ぐ隣のビットは、2サイクル前に復号化対象になっていることである。従って、図1においてCX生成部100がある注目ビットのCXを生成するとき、図6(a)、(b)のCX(0)からCX(8)は全て決定している。確定していないのは図6(a)、(b)のCX(9)の1ビットのみである。
【0068】
あるサイクルでCX生成部100では、図7の上位ビットプレーンに相当する{i}、[1]の位置にある注目ビットに対するCX(0)乃至CX(8)の成分(画素にそれぞれ対応する2値の値)を有するコンテキスト(CX)101を生成し、出力する。即ち、2ビットモードでは、CX生成部100は、図6(a)のCX(9)に当たる画素がまだ復号化されておらず、CXが特定できないタイミングでCX101を出力する。この場合、最終的に確定するCXの値は2通りの場合が考えられるが、出力されるCX101のCX(9)はとりあえず0に固定される。予測状態メモリ181乃至184には、このCX(9)が0である同一のCX101が共通して入力されるが、第1及び第2予測状態メモリ181及び182の同じアドレス値の格納場所には、予め、各々上位ビットプレーンに対応し且つそれぞれCXのCX(9)が、0及び1である場合のMPSとSTの対が、モード選択信号150に応じてROM110から読み出されて格納されており、同様に第2及び第4予測状態メモリ183及び184の同じアドレス値の格納場所には、予め、各々下位ビットプレーンに対応し且つそれぞれCXのCX(9)が、0及び1である場合のMPSとSTの対が、モード選択信号150に応じてROM110から読み出されて格納されている。したがって、1ビットモード時は、各予測状態メモリは、その2分の1が実際に使用されることになる。説明の便宜上、上述サイクルを第1のサイクルとする。
【0069】
次のサイクル、即ち第2のサイクルにおいて第1の予測状態メモリ181乃至第4の予測状態メモリ184は、前記CX101によって示される同一のアドレスを有する格納場所からデータ(MPS及びST)のそれぞれの対を同時に出力する。このサイクルにおいて、CX(9)に相当する画素の値が算術演算部106において復号化され、その復号化データ170は予測状態値セレクト信号生成部140を介して第1のセレクタ111の選択信号142として用いられる。第1のセレクタ111によって選択出力されたMPS113及びST115は第1のF/F回路121によって次のサイクル、即ち第3のサイクルの間ラッチされる。
【0070】
第3のサイクルにおいて、第1のF/F回路121から出力されるST125は第1のST/LSZ変換部131によって対応するLSZ133へ同サイクル中に変換される。第2のF/F回路122の出力データは無効なデータである。従って、このサイクルにおいてはMPS123と第1のST/LSZ変換部131の出力であるLSZ133とを選択し、MPS135、ST136として出力するようにMPS/LSZセレクト信号生成部141は第3のセレクタ105を制御する。
【0071】
第4のサイクルにおいて算術演算部106は前記データを基に復号化処理を行い、第1ビットプレーンの注目ビットを復号化データ170として出力する。
【0072】
以上、図7の{i}、[1]の位置のビットが復号化される流れを追って説明したが、次の処理ビットデータである図7の{i−1}、[2]の位置のビットは下位ビットプレーンに属する。
【0073】
図6(b)に示すようなCX(0)乃至CX(8)を成分として有するCX101は第2のサイクルにおいてCX生成部100から出力される。
【0074】
次の第3のサイクルにおいて第1の予測状態メモリ181乃至第4の予測状態メモリ184は、前記CX101によって示される同一のアドレスを有する格納場所からデータ(MPS及びST)のそれぞれの対を同時に出力する。前述のように下位ビットプレーンに対応する2つの可能なMPSとSTの対は第3の予測状態メモリ183と第4の予測状態メモリ184とにそれぞれ予め分割して格納されている。このサイクルにおいて図6(b)のCX(9)に相当する画素の値が算術演算部106において復号化され、その復号化データ170は予測状態値セレクト信号生成部140に供給され、そこで選択信号142が生成されて第2のセレクタ112に供給される。第2のセレクタ112によって選択出力されたMPS114、ST116は第2のF/F回路122によって次のサイクル、即ち第4のサイクルの間ラッチされる。
【0075】
第4のサイクルにおいて、第2のF/F回路122から出力されるST126は第2のST/LSZ変換部132によって対応するLSZ134へ同サイクル中に変換される。第1のF/F回路121の出力データは無効なデータである。従って、このサイクルにおいてはMPS124と第2のST/LSZ変換部132の出力であるLSZ134とを選択し、MPS135、ST136として出力するようにMPS/LSZセレクト信号生成部141は第3のセレクタ105を制御する。
【0076】
第5のサイクルにおいて算術演算部106は前記データを基に復号化処理を行い、第2ビットプレーンの注目ビットを復号化データ170として出力する。
【0077】
第3のセレクタ105について着目すると、第3のサイクルにおいては上位ビットプレーンに対応するデータであるMPS123とLSZ133とを選択し、第4のサイクルにおいては下位ビットプレーンに対応するデータであるMPS124とLSZ134とを選択し、というように続くものである。即ち、2ビットモードにおいて、MPS/LSZセレクト信号生成部141は、MPS123とLSZ133及びMPS124とLSZ134が順々に選択されるようにシーケンシャルにセレクト信号を切り換えればよい。
【0078】
なお、上述した実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体により当該プログラムを、FAXマシンやパソコンなどの電子機器にインストールし、その電子機器のコンピュータ(またはCPU)が当該プログラムを実行することによっても、本発明の目的が達成されることは言うまでもない。
【0079】
この場合、記憶媒体を用いて電子機器にインストールされたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0080】
プログラムコードを記録するための記憶媒体としては、たとえば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。また、通信ネットワークを介してサーバコンピュータからプログラムコードが供給されるようにしてもよい。
【0081】
また、コンピュータが読出したプログラムコードを実行することにより、上述した実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOSなどが実際の処理の一部または全部を行い、その処理によって上述した実施の形態の機能が実現される場合も含まれることは言うまでもない。
【0082】
さらに、記憶媒体から読出されたプログラムコードが、FAXマシンやパソコン等に挿入された機能拡張ボードやそれらに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって上述した実施の形態の機能が実現される場合も含まれることは言うまでもない。
【0083】
【発明の効果】
以上詳述したように本発明の算術復合化方法及び装置によれば、2値画像と多値画像の両方を処理することができると共に、安価に提供できる。
【0084】
また、本発明の記憶媒体によれば、上述した本発明の算術復合化装置を円滑に制御することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係る算術復号化装置の構成を示すブロック図である。
【図2】図1の算術復号化装置において2値の画像データを扱うときのCXの取り方を示す図である。
【図3】図1の算術復号化装置において4ビットの深さを持つ画像データを扱うときのCXの取り方を示す図であり、(a)は、第1のビットプレーン上の注目ビットに対するCXの取り方を示し、(b)は、第2のビットプレーン上の注目ビットに対するCXの取り方を示す図である。
【図4】図1の算術復号化装置において4ビットの深さを持つ画像データを扱うときのCXの取り方を示す図であり、(a)は第3のビットプレーン上の注目ビットに対するCXの取り方を示し、(b)は、第4のビットプレーン上の注目ビットに対するCXの取り方を示している図である。
【図5】図4の画像データに算術復号化処理を施す順番を示す図である。
【図6】図1の算術復号化装置において2ビットの深さを持つ画像データを扱うときのCXの取り方を示す図であり、(a)は第1のビットプレーン上の注目ビットに対するCXの取り方を示し、(b)は、第2のビットプレーン上の注目ビットに対するCXの取り方を示している図である。
【図7】図6の画像データに算術復号化処理を施す順番を示す図である。
【符号の説明】
100 CX生成部
101 CX(コンテキスト)
105 第3のセレクタ
106 算術演算部
107 予測状態更新部
108 ラインバッファメモリ
110 ROM
111 第1のセレクタ
112 第2のセレクタ
113 MPS(予測値)
114 MPS(予測値)
115 ST(状態値)
116 ST(状態値)
121 第1のF/F(フリップフロップ)回路
122 第2のF/F(フリップフロップ)回路
123 MPS(予測値)
124 MPS(予測値)
125 ST(状態値)
126 ST(状態値)
131 第1のST/LSZ変換部
132 第2のST/LSZ変換部
133 LSZ(確立推定値)
134 LSZ(確立推定値)
135 MPS(予測値)
136 LSZ(確立推定値)
139 予測状態値
140 予測状態値セレクト信号生成部
141 MPS/LSZセレクト信号生成部
142 予測状態値セレクト信号
143 MPS/LSZセレクト信号
150 モード指定信号
160 算術符号データ
170 復合化データ
171 Yn信号
181 第1の予測状態メモリ
182 第2の予測状態メモリ
183 第3の予測状態メモリ
184 第4の予測状態メモリ
185 MPS(予測値)
186 MPS(予測値)
187 MPS(予測値)
188 MPS(予測値)
189 ST(状態値)
190 ST(状態値)
191 ST(状態値)
192 ST(状態値)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an arithmetic decoding method and apparatus for decoding encoded data obtained by encoding image data by arithmetic coding, particularly an arithmetic decoding method capable of processing both binary images and multi-valued images. And a storage medium storing a program for executing the arithmetic decoding method.
[0002]
[Prior art]
Arithmetic coding uses [0, 1] (the square brackets at one end of the interval mean that it contains a numeric value, and the parenthesis means that it doesn't contain a numeric value). Each of the sub-intervals corresponding to the symbol to be encoded is selected and encoded according to the probability. Next, the selected lower section is subdivided into smaller lower sections according to the probability, and one of the smaller lower sections corresponding to the encoding target symbol is selected and encoded. This recursive subdivision and selection of lower sections are repeated over the entire encoding target symbol sequence, and the coordinates of the points included in the final lower section thus obtained can be distinguished from at least other sections. This is expressed as a decimal number and is used as a code for the entire encoding target symbol sequence.
[0003]
As a representative arithmetic coding method, JBIG (QM-coder) standardized by JBIG (Joint Bi-level Image Experts Group), an organization of ITU (International Telecommunication), IBM Corporation Q-coder method proposed by
[0004]
Since the terminology used by each method is different, the terminology used in the JBIG method, which is the standard method, is used here.
[0005]
In principle arithmetic coding, multiplication processing is required in the arithmetic operation unit. However, there is a problem that the hardware scale of the arithmetic operation unit becomes large or the time required for the multiplication processing becomes long. Simplified methods by replacing operations with addition / subtraction operations have become mainstream.
[0006]
An arithmetic operation unit includes an A register that holds an area width (orient) corresponding to an encoded symbol sequence, and a code register (C register) that holds a value from which an arithmetic code (code) is generated. ) When the value corresponding to the probability that the encoding target symbol is deviated from the encoded prediction value is a probability estimation value (LSZ), the arithmetic operation unit is given the prediction value (MPS), the value of the target symbol, and LSZ as inputs. Based on the information whether or not the target symbol matches MPS, an arithmetic operation (addition / subtraction) is performed from the probability estimated value LSZ and the values of the two registers, and the values of the two registers are updated.
[0007]
Since the area width is reduced every time it is divided, the value of the A register is normalized in order to maintain accuracy. This is a bit shift of the A and C registers to the left. The upper determined bit of the C register is output as an arithmetic code.
[0008]
When decoding, MPS, LSZ, and arithmetic code are given to the arithmetic operation unit. Since it can be determined whether or not the MPS and the target symbol match from the values of LSZ and the arithmetic code, the value of the target symbol can be calculated backward.
[0009]
MPS and LSZ are obtained from information called CX (context). CX is composed of nearby symbol values that have already appeared during processing of the target symbol. In JBIG, since CX is composed of 10 symbol values, there are 1024 possible values of CX, each having an MPS and a state value (ST) indicating probability. The LSZ is obtained by converting the state value of the context (CX) according to a predetermined correspondence table.
[0010]
By updating the MPS and ST for each context (CX) under a certain condition, it is possible to learn a pattern unique to the encoded symbol sequence, and to increase the encoding efficiency. Specifically, each pair of MPS and ST is set as data at a corresponding address of a RAM (Random Access Memory) having a 10-bit address, and the output of the RAM that addresses CX is MPS and ST. The update of MPS and ST is realized by rewriting data.
[0011]
In the arithmetic coding system, since the encoding target symbol and the MPS are binary, JBIG defines only a processing method for a binary image. However, it is possible to perform arithmetic operations by cutting out data bit by bit even for multi-valued images. In this case, the arithmetic operation unit may be binary or multi-valued, but it is necessary to devise how to derive LSZ. This is because the correlation between the symbol group (context) that appeared before the target symbol and the appearance probability of the target symbol differs depending on the bit hierarchy to which the target symbol belongs. That is, it is necessary to have a method of taking a context paired with LSZ independently for each bit plane.
[0012]
Another technical problem has been related to speeding up decoding. In terms of the principle of arithmetic codes, the compression efficiency increases when the context has a stronger correlation with the target pixel. In addition, since the pixel needs to be processed, for example, when a 1-bit image is handled, the symbol one pixel before becomes one of the components of the context. This is a limitation for increasing the processing speed when decoding by arithmetic operation. This is because the context of the target pixel is not uniquely determined until the value of the immediately preceding pixel is determined, and therefore reading of the state value cannot be started.
[0013]
As means for solving this, there is a method of prefetching by dividing a RAM holding MPS and ST into a plurality of RAMs. This is because, for example, when the value of the previous pixel is determined, the context is narrowed down to two ways, when the previous pixel is 0 and when the previous pixel is 1, so that two RAMs are read simultaneously and the previous value is determined. This is a method of selecting one of the two state values read out at the time.
[0014]
[Problems to be solved by the invention]
In the conventional example described above, it is necessary to divide the memory both in the case of performing optimal arithmetic coding on a multilevel image and in the case of performing a decoding process of a binary image at high speed. In addition, if an arithmetic decoding device capable of processing both binary images and multi-value images is to be provided, the state memory cannot be shared even if the arithmetic operation unit can be shared, which is expensive. There was a problem.
[0015]
An object of the present invention is to provide an inexpensive arithmetic decoding method and apparatus capable of processing both a binary image and a multi-valued image, and a storage medium storing a program for executing the arithmetic decoding method. That is.
[0016]
[Means for Solving the Problems]
  In order to achieve the above object, the arithmetic decoding method according to claim 1 comprises:A single arithmetic unit andIndividually accessibleMultipleMemoryWhenAn arithmetic decoding method for decoding arithmetically encoded image data composed of at least one bit plane using:A receiving step for receiving information on the bit depth of the arithmetically encoded image data; and if the bit depth of the arithmetically encoded image data is equal to the number of memories, each bit plane of the image data A storage step of storing state variables corresponding to the pixels to be decoded in corresponding ones of the memories, and when the bit depth of the arithmetically encoded image data is less than the number of the memories, An allocation storing step of allocating and storing one of state variables corresponding to a decoding target pixel of each bit plane to at least a part of the memory, and a decoding target pixel of each bit plane of the state variables, respectively A reading step of reading out the corresponding one from the memory, and reading out the state variable from the memory A selection step for selecting based on data already arithmetically decoded by the arithmetic operation unit, and an input for inputting the selected state variable and a predicted value paired with the selected state variable to the arithmetic operation unit With stepsIt is characterized by that.
In order to achieve the above object, an arithmetic decoding device according to claim 6 is an arithmetic decoding device for decoding arithmetically encoded image data composed of at least one bit plane, and performs arithmetic operations. A single arithmetic operation unit, a plurality of individually accessible memories, a bit mode input unit to which information on the bit depth of arithmetically encoded image data is input, and the bit mode input unit. If the bit depth is equal to the number of the memories, the state variable corresponding to the decoding target pixel of each bit plane of the image data is stored in the corresponding one of the memories, and the bit depth is the memory. Less than the number of the state variables, one of the state variables corresponding to the decoding target pixel of each bit plane of the image data is allocated to at least a part of the memory. A storage control unit for storing, a reading unit for reading from the memory corresponding to the decoding target pixel of each bit plane among the state variables, and a reading from the memory among the state variables Is selected based on data that has already been arithmetically decoded by the arithmetic operation unit, the selected state variable, and a predicted value paired with the selected state variable are input to the arithmetic operation unit. And an input unit.
In order to achieve the above object, the storage medium according to claim 11 is arithmetically encoded with at least one bit plane using a single arithmetic operation unit and a plurality of individually accessible memories. A computer-readable storage medium storing a program for causing a computer to execute an arithmetic decoding method for decoding image data, wherein the program stores information on a bit depth of the arithmetically encoded image data. When the receiving module to receive and the bit depth of the arithmetically encoded image data is equal to the number of the memories, the state variables corresponding to the decoding target pixels of the respective bit planes of the image data correspond to the respective memories. A storage module for storing in the memory, and the bit depth of the arithmetically encoded image data is the number of the memories If there are fewer, an allocation storage module that allocates and stores one of the state variables corresponding to the decoding target pixel of each bit plane of the image data to at least a part of the memory, and each of the state variables Based on data that has been read out from the memory of the state variables corresponding to the respective decoding target pixels of the bit plane and data that has already been read out from the memory among the state variables by the arithmetic operation unit A selection module, and an input module for inputting the selected state variable and a predicted value paired with the selected state variable to the arithmetic operation unit.
In order to achieve the above object, the arithmetic decoding method according to claim 12 is a single unit that can be commonly used to process both binary image data and multi-value image data that have been arithmetically encoded. The arithmetically encoded binary image data and the multi-value by controlling the arithmetic operation unit and a plurality of memories storing a set of state variables including predicted values to be used for the arithmetic operation by the arithmetic operation unit An arithmetic decoding method for arithmetically decoding image data, wherein the receiving step receives the arithmetically encoded image data and information about the bit depth of the image data, and based on the information about the bit depth, Each set of state variables corresponding to a pixel to be decoded in one bit plane of image data is stored in each bit plane in the memory in association with each bit plane of the image data, or the image data A control step for controlling whether to assign the state variable set corresponding to the pixel to be decoded among the bit planes to be stored in at least a part of the memory; and the state variable set stored in the memory Alternatively, at least a part thereof is input to the arithmetic operation unit in an order determined according to the bit depth. And having a flop.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0027]
FIG. 1 is a block diagram showing the configuration of the arithmetic decoding apparatus according to the present embodiment.
[0028]
In the figure, 160 is arithmetic code data to be decoded, and 150 is a mode designation signal, which designates one of the 1-bit mode, 2-bit mode or 4-bit mode.
[0029]
A line buffer memory 108 buffers the decoded image data for approximately one main scanning line. Reference numeral 100 denotes a CX generation unit, and in accordance with the mode designation signal 150, the data of the previous line output from the line buffer memory 108 and the already decoded image of several pixels of the same line output from a shift register (not shown). A CX (context) 101 is generated from data.
[0030]
Reference numeral 110 denotes a ROM that stores data before MPS (predicted value) and ST (state value) for each bit mode.
[0031]
Reference numerals 181 to 184 are prediction state memories, each of which is constituted by a 2-port synchronous SRAM (static random access memory), and each of which corresponds to a maximum of 1024 possible values of CX101 output from the CX generation unit 100. Number of addresses. Each address has a pair of MPS (predicted value) and ST according to the selected bit mode according to the mode designation signal 150 that designates one of the 1-bit mode, 2-bit mode, and 4-bit mode. (State value) is stored. MPS (prediction value) and ST (state value) are updated by a prediction state update unit 107 described later. CX 101 generated according to the bit mode as described later is commonly input from the CX generation unit 100 and outputs MPS (predicted values) 185 to 188 and ST (state values) 189 to 192, respectively. is there.
[0032]
140 is a predicted state value select signal generator for generating a predicted state value select signal 142. Reference numeral 111 denotes a first selector which selects and outputs one of MPS 185 and ST 189 output from the first prediction state memory 181 or MPS 186 and ST 190 output from the second prediction state memory 182. Reference numeral 112 denotes a second selector which selects and outputs one of MPS 187 and ST 191 output from the third prediction state memory 183 or MPS 188 and ST 192 output from the fourth prediction state memory 184. The selectors 111 and 112 are selected by a predicted state value select signal 142.
[0033]
A first F / F (flip-flop) circuit 121 holds data (MPS 113 and ST 115) output from the first selector 111. Reference numeral 122 denotes a second F / F (flip-flop) circuit that holds data (MPS 114 and ST 116) output from the second selector 112. Reference numeral 131 denotes a first ST / LSZ conversion unit that converts ST125 output from the first F / F circuit 121 into an LSZ (probability estimated value) 133. Reference numeral 132 denotes a second ST / LSZ conversion unit that converts ST126 output from the second F / F circuit 122 into an LSZ (probability estimated value) 134.
[0034]
Reference numeral 141 denotes an MPS / LSZ select signal generator for generating an MPS / LSZ select signal 143. Reference numeral 105 denotes a third selector, which is output from the combination of the MPS 123 output from the first F / F circuit 121 and the LSZ 133 output from the first ST / LSZ converter 131 or the second F / F circuit 122. One of the sets of the MPS 124 and the LSZ 134 output from the second ST / LSZ converter 132 is selected by the MPS / LSZ select signal 143 and output. The designation of selection by the third selector 105 is performed by the MPS / LSZ select signal 143.
[0035]
The arithmetic code data 160 is supplied to the arithmetic operation unit 106 as necessary. The arithmetic operation unit 106 determines whether or not the prediction at the time of arithmetic encoding has been achieved from the arithmetic code data 160 and the value of the LSZ 136 output from the third selector 105, and outputs the result as the Yn signal 171. Further, since the value of the MPS 135 output from the third selector 105 and the value of the decoded data 170 are determined from the Yn signal 171, it is output.
[0036]
The prediction state update unit 107 updates the prediction state according to the output from the arithmetic operation unit 106. That is, the predicted state update unit 107 determines a predicted state value, that is, an updated pair 139 of the state value ST and the predicted value MPS based on the MPS 135, the LSZ 136, and the Yn signal 171, and the first to fourth predicted state memories 181. To the corresponding address of .about.184.
[0037]
The above is the basic function of each block.
[0038]
In the present embodiment, the first to fourth prediction state memories 181 to 184 are configured to store the prediction value (MPS) and the state value (ST), but correspond to the state value (ST) instead. It is good also as a structure which memorize | stores a probability estimated value (LSZ). Since the number of bits of the probability estimation value (LSZ) is larger than the state value (ST), it is not general because a larger storage capacity of the RAM is required, but a corresponding probability estimation instead of the state value (ST). When the value (LSZ) is stored, there is an advantage that the process for obtaining the probability estimated value (LSZ) from the state value (ST) is eliminated.
[0039]
Next, what operation is performed when decoding binary image data will be described.
[0040]
(In 1-bit mode)
FIG. 2 is a diagram showing how CX is taken when binary image data is handled. In FIG. 2, the knitted line portion is a pixel to be decoded.
[0041]
In FIG. 1, the CX generation unit 100, the prediction state value select signal generation unit 140, the MPS / LSZ select signal generation unit 141, the prediction state update unit 107, and the ROM 110 are notified by the mode designation signal 150. Read out from ROM 110 four divisions of MPS for 1-bit mode and ST as a whole prepared for each case where CX (8) and CX (9) described later are 00, 01, 10, 11 And stored in the first quarter (256 addresses) of the prediction state memories 181 to 184, respectively.
[0042]
In a certain cycle, the CX generation unit 100 generates and outputs a context (CX) including components (binary values corresponding to pixels) from CX (0) to CX (7) in FIG. That is, in the 1-bit mode, the CX generation unit 100 outputs the CX 101 at a timing at which CX cannot be specified because the pixels corresponding to CX (8) and CX (9) have not been decoded yet. In this case, there are four possible CX values that are finally determined based on these values, but CX (8) and CX (9) of the output CX101 are fixed to 0 for the time being. The same CX101 in which CX (8) and CX (9) are 0 is commonly input to the prediction state memories 181 to 184, but the same addresses of the first to fourth prediction state memories 181 to 184 are used. In the value storage location, each pair of MPS and ST when CX (8) and CX (9) are 00, 01, 10, 11 is stored in advance. Therefore, in the 1-bit mode, a quarter of each prediction state memory is actually used. For convenience of explanation, the above cycle is referred to as a first cycle.
[0043]
In the next cycle, the second cycle, the first prediction state memory 181 to the fourth prediction state memory 184 have four possible CXs from the respective storage locations having the same address value specified by the CX 101. Each pair of MPS 185 to 188 and ST 189 to 192 corresponding to the value is output. In this cycle, the value of the pixel corresponding to CX (8) in FIG. 2 is decoded by the arithmetic operation unit 106, and the decoded data 170 is supplied to the first selector 111 and the second selector via the prediction state value select signal generation unit 140. Used as the selection signal 142 of the selector 112. The MPS 113, ST115 and MPS 114, ST116 selected and output by the first selector 111 and the second selector 112 are sent to the next cycle, that is, the first cycle by the first F / F circuit 121 and the second F / F circuit 122, respectively. Latched for 3 cycles.
[0044]
In the third cycle, ST125 and ST126 output from the first F / F circuit 121 and the second F / F circuit 122 are the first ST / LSZ conversion unit 131 and the second ST / LSZ conversion, respectively. It is converted by the unit 132 into the corresponding LSZ 133 and LSZ 134 during the same cycle.
[0045]
Further, in the current cycle, the value of the pixel corresponding to CX (9) in FIG. 2 is decoded by the arithmetic operation unit 106, and the decoded data 170 is transmitted through the MPS / LSZ select signal generation unit 141 via the third value. Used as the selection signal 143 of the selector 105. The MPS 135 and LSZ 136 selected and output by the third selector 105 are input to the arithmetic operation unit 106.
[0046]
MPS 135 and LSZ 136 input in the third cycle are used for arithmetic operations in the fourth cycle, and decoded data of pixels corresponding to the braided line portion in FIG. 2 is output from arithmetic operation unit 106. That is, in the fourth cycle, the arithmetic operation unit 106 performs a decoding process based on the data, and outputs the target bit of the first bit plane as the decoded data 170.
[0047]
As described above, the flow of decoding a certain pixel of interest has been described. However, when attention is paid to each processing block, in the cycle following the cycle in which the processing relating to the certain pixel of interest is performed, processing regarding the next pixel of interest is performed.
[0048]
As described above, in the 1-bit mode, MPS and ST are read in parallel from the four prediction state memories 181 to 184, and further, conversion from ST to LSZ and arithmetic operation are simultaneously performed in a pipeline manner, thereby enabling high-speed decoding. Is going on.
[0049]
(In 4-bit mode)
FIGS. 3A, 3B, 4A, and 4B are diagrams showing how to take CX in the 4-bit mode, that is, when handling image data having a 4-bit depth.
[0050]
FIG. 3A shows how to take CX for the bit of interest on the first bit plane. In this case, a bit on the same bit plane including the bit of interest, that is, a bit on the first bit plane is referred to. FIG. 3B shows how to take CX for the bit of interest on the second bit plane. In this case, the same bit on the second bit plane and the upper first bit plane as the target bit are referred to.
[0051]
FIG. 4A shows how to take CX for the bit of interest on the third bit plane. Reference is made to the bits on the third bit plane and the upper first bit plane and second bit plane which are the same as the bit of interest. FIG. 4B shows how to take CX for the bit of interest on the fourth bit plane. Reference is made to the fourth bit plane that is the same as the bit of interest and the bits on the upper first bit plane, second bit plane, and third bit plane.
[0052]
The reason for referring to only the bits on the upper bit plane (other than the bits on the bit plane including the bit of interest) in this way is due to the nature of the multivalued image that the correlation from the upper bits to the lower bits is strong.
[0053]
FIG. 5 is a diagram illustrating the order in which the arithmetic decoding process is performed. In order to be able to decode in the order shown in FIG. 5, the arithmetic code data 160 also needs to be subjected to arithmetic coding processing in the order shown in FIG. The advantage of the decoding order as shown in FIG. 5 is that the bit of the first bit plane determined most recently among the elements of CX for the bit of interest on the second to fourth bit planes is at least 5 cycles. That is, it has been subject to decryption before. Therefore, when the CX of the bit of interest is generated by the CX generation unit 100 in FIG. 1, the bit of the first bit plane, which is the most recently decoded bit, has already been determined, so CX ( 0) to CX (9) are all determined.
[0054]
An operation when decoding image data in the 4-bit mode will be described.
[0055]
In FIG. 1, the CX generator 100, the predicted state value select signal generator 140, the MPS / LSZ select signal generator 141, the predicted state update unit 107, and the ROM 110 are notified of the 4-bit mode by the mode designation signal 150. Four sets of 1024 pairs of MPS and ST for 4-bit mode respectively prepared for the four bit planes are read from the ROM 110 and stored in the prediction state memories 181 to 184, respectively.
[0056]
In a certain cycle, the CX generation unit 100 outputs CX for the bit of interest at the position of {i}, [1] in FIG. As described above, all elements of CX are fixed. For convenience of explanation, this cycle is referred to as a first cycle.
[0057]
In the next cycle, i.e., the second cycle, the first prediction state memory 181 to the fourth prediction state memory 184 are provided for each pair of data (MPS and ST) from the storage location having the same address indicated by the CX101. Are output simultaneously. However, MPS and ST corresponding to the first bit plane are held at corresponding addresses in the first prediction state memory 181. Similarly, MPS and ST corresponding to the second bit plane are held at corresponding addresses in the second prediction state memory 182. Similarly, MPS and ST corresponding to the third bit plane are held at corresponding addresses in the third prediction state memory 183. Similarly, MPS and ST corresponding to the fourth bit plane are held at corresponding addresses in the fourth prediction state memory 184. That is, in the reading of this cycle, only MPS 185 and ST 189 that are read data from the first prediction state memory 181 are valid outputs.
[0058]
The predicted state value select signal generation unit 140 generates a predicted state value select signal 142 so that valid data is selected. That is, the first selector 111 selects MPS 185 and ST 189 and outputs them to the first F / F circuit 121 as MPS 113 and ST 115.
[0059]
In the third cycle, the first F / F circuit 121 outputs the data latched as MPS 113 and ST 115 in the previous cycle as MPS 123 and ST 125. The data held in the second F / F circuit 122 is invalid data. Therefore, in this cycle, the MPS 123 and the LSZ 133 which is the output of the first ST / LSZ conversion unit 131 are selected, and the MPS / LSZ select signal generation unit 141 controls the third selector 105 so as to output as MPS 135 and ST 136. To do.
[0060]
In the fourth cycle, the arithmetic operation unit 106 performs a decoding process based on the MPS 135 and ST 136, and outputs the target bit of the first bit plane as the decoded data 170.
[0061]
The flow of decoding the bits at the positions {i} and [1] in FIG. 5 has been described above, but focusing on each processing block, the bits at the positions {i} and [1] in FIG. In the cycle following the cycle in which the processing is performed, processing is performed on the bit at the position of {i−1}, [2] in FIG. 5 which is the next processing bit. That is, the CX generation unit 100 outputs CX for the bit at the position of {i} and [1] in FIG. 5 in the first cycle, and {i−1} and [2] in FIG. 5 in the second cycle. CX is output for the bit at position # 1, {i-2} in FIG. 5 in the third cycle, CX for the bit at position [3] is output, and {i-3} in FIG. 5 is output at the fourth cycle. , [4] is output for the bit at position [4], and CX is output for the bit at position {i + 1} and [1] in FIG. 5 in the fifth cycle.
[0062]
Therefore, focusing on the output of the prediction state memory, the output data of the first prediction state memory 181 is valid in the second cycle, and the output data of the second prediction state memory 182 is valid in the third cycle. The output data of the third predicted state memory 183 is valid in the fourth cycle, the output data of the fourth predicted state memory 184 is valid in the fifth cycle, and so on. That is, in the 4-bit mode, the predicted state value select signal generation unit 140 may switch the select signal sequentially so that the outputs of the memories 181 to 184 are sequentially selected.
[0063]
Focusing on the third selector 105, the MPS 123 and LSZ 133 corresponding to the output data of the first prediction state memory 181 are selected in the third cycle, and the output data of the second prediction state memory 182 is selected in the fourth cycle. The corresponding MPS 123 and LSZ 133 are selected, the MPS 124 and LSZ 134 corresponding to the output data of the third prediction state memory 183 are selected in the fifth cycle, and the output data of the fourth prediction state memory 184 is selected in the sixth cycle. The corresponding MPS 124, LSZ 134 is selected, and so on. That is, in the 4-bit mode, the MPS / LSZ select signal generation unit 141 may switch the select signal sequentially so that the MPS 123, LSZ 133, MPS 124, and LSZ 134 are sequentially selected every cycle.
[0064]
As described above, in the 4-bit mode, four prediction state memories 181 to 184 are allocated for each bit plane.
[0065]
(In 2-bit mode)
FIGS. 6A and 6B are diagrams showing how to take CX in the 2-bit mode, that is, when handling image data having a 2-bit depth. FIG. 6A shows how to take CX for the target bit on the upper first bit plane. Refers to a bit on the same bit plane. FIG. 6B shows how to take CX for the bit of interest on the second bit plane. Reference is made to a bit on the same second bit plane as the bit of interest and an upper first bit plane.
[0066]
The reason why only the bits on the upper bit plane are referred to (other than the bit of the bit plane including the bit of interest) is due to the property of the multi-valued image that the correlation from the upper bits to the lower bits is strong.
[0067]
FIG. 7 is a diagram illustrating the order in which the arithmetic decoding process is performed. In order to be able to decode in the order shown in FIG. 7, the arithmetic code data 160 also needs to be subjected to arithmetic coding in the order shown in FIG. The advantage of the decoding order as shown in FIG. 7 is that the most immediately determined bit of the CX elements corresponding to the target bit on the bit plane becomes the decoding target two cycles before. It is that you are. Therefore, when the CX generating unit 100 generates the CX of the bit of interest in FIG. 1, all of CX (0) to CX (8) in FIGS. 6A and 6B are determined. Only one bit of CX (9) in FIGS. 6A and 6B is not fixed.
[0068]
In a certain cycle, the CX generation unit 100 corresponds to the components (CX (0) to CX (8) corresponding to the pixel of interest at the positions {i} and [1] corresponding to the upper bit plane in FIG. A context (CX) 101 having a value) is generated and output. That is, in the 2-bit mode, the CX generation unit 100 outputs the CX 101 at a timing at which CX cannot be specified because the pixel corresponding to CX (9) in FIG. 6A has not been decoded yet. In this case, there are two possible CX values to be finally determined, but CX (9) of the output CX101 is fixed to 0 for the time being. The same CX101 in which CX (9) is 0 is commonly input to the prediction state memories 181 to 184, but the same address value storage locations in the first and second prediction state memories 181 and 182 are stored in the prediction state memories 181 to 184. A pair of MPS and ST corresponding to each upper bit plane and CX (9) of CX being 0 and 1 is read from the ROM 110 according to the mode selection signal 150 and stored in advance. Similarly, when the same address value is stored in the second and fourth prediction state memories 183 and 184, each corresponding to the lower bit plane and CX (9) of CX is 0 and 1, respectively. The pair of MPS and ST is read from the ROM 110 and stored in accordance with the mode selection signal 150. Therefore, in the 1-bit mode, one half of each prediction state memory is actually used. For convenience of explanation, the above cycle is referred to as a first cycle.
[0069]
In the next cycle, i.e., the second cycle, the first prediction state memory 181 to the fourth prediction state memory 184 are provided for each pair of data (MPS and ST) from the storage location having the same address indicated by the CX101. Are output simultaneously. In this cycle, the value of the pixel corresponding to CX (9) is decoded by the arithmetic operation unit 106, and the decoded data 170 is selected by the selection signal 142 of the first selector 111 via the predicted state value select signal generation unit 140. Used as The MPS 113 and ST 115 selected and output by the first selector 111 are latched by the first F / F circuit 121 for the next cycle, that is, the third cycle.
[0070]
In the third cycle, ST 125 output from the first F / F circuit 121 is converted into the corresponding LSZ 133 by the first ST / LSZ converter 131 during the same cycle. The output data of the second F / F circuit 122 is invalid data. Accordingly, in this cycle, the MPS 123 and the LSZ 133 which is the output of the first ST / LSZ conversion unit 131 are selected, and the MPS / LSZ select signal generation unit 141 sets the third selector 105 so as to output as MPS 135 and ST 136. Control.
[0071]
In the fourth cycle, the arithmetic operation unit 106 performs a decoding process based on the data, and outputs the target bit of the first bit plane as the decoded data 170.
[0072]
The flow of decoding the bits at the positions {i} and [1] in FIG. 7 has been described above. However, at the positions {i−1} and [2] in FIG. Bits belong to the lower bitplane.
[0073]
CX101 having CX (0) to CX (8) as components as shown in FIG. 6B is output from the CX generation unit 100 in the second cycle.
[0074]
In the next third cycle, the first prediction state memory 181 to the fourth prediction state memory 184 simultaneously output each pair of data (MPS and ST) from the storage location having the same address indicated by the CX101. To do. As described above, the two possible MPS and ST pairs corresponding to the lower bit planes are stored separately in the third prediction state memory 183 and the fourth prediction state memory 184, respectively. In this cycle, the value of the pixel corresponding to CX (9) in FIG. 6B is decoded by the arithmetic operation unit 106, and the decoded data 170 is supplied to the prediction state value select signal generation unit 140, where the selection signal 142 is generated and supplied to the second selector 112. The MPS 114 and ST 116 selected and output by the second selector 112 are latched by the second F / F circuit 122 for the next cycle, that is, the fourth cycle.
[0075]
In the fourth cycle, ST 126 output from the second F / F circuit 122 is converted into a corresponding LSZ 134 by the second ST / LSZ conversion unit 132 during the same cycle. The output data of the first F / F circuit 121 is invalid data. Therefore, in this cycle, the MPS 124 and the LSZ 134 that is the output of the second ST / LSZ conversion unit 132 are selected, and the MPS / LSZ select signal generation unit 141 sets the third selector 105 so as to output the MPS 135 and ST 136. Control.
[0076]
In the fifth cycle, the arithmetic operation unit 106 performs a decoding process based on the data, and outputs the target bit of the second bit plane as the decoded data 170.
[0077]
Focusing on the third selector 105, MPS 123 and LSZ 133, which are data corresponding to the upper bit plane, are selected in the third cycle, and MPS 124 and LSZ 134, which are data corresponding to the lower bit plane, in the fourth cycle. And so on. That is, in the 2-bit mode, the MPS / LSZ select signal generation unit 141 may switch the select signal sequentially so that the MPS 123 and LSZ 133 and the MPS 124 and LSZ 134 are sequentially selected.
[0078]
The program is installed in an electronic device such as a FAX machine or a personal computer using a storage medium that records the program code of the software that realizes the functions of the above-described embodiments, and the computer (or CPU) of the electronic device performs the program. It goes without saying that the object of the present invention can also be achieved by executing the above.
[0079]
In this case, the program code itself installed in the electronic device using the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.
[0080]
As a storage medium for recording the program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like is used. be able to. Further, the program code may be supplied from a server computer via a communication network.
[0081]
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the OS running on the computer based on the instruction of the program code performs the actual processing. It goes without saying that a case where the functions of the above-described embodiment are realized by performing part or all of the above and the processing thereof is included.
[0082]
Furthermore, after the program code read from the storage medium is written to the memory provided in the function expansion board inserted in the FAX machine or personal computer or the function expansion unit connected thereto, it is based on the instruction of the program code. Needless to say, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
[0083]
【The invention's effect】
As described above in detail, according to the arithmetic decoding method and apparatus of the present invention, both a binary image and a multi-value image can be processed and can be provided at low cost.
[0084]
Further, according to the storage medium of the present invention, the arithmetic decoding apparatus of the present invention described above can be controlled smoothly.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an arithmetic decoding apparatus according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating how to take CX when binary image data is handled in the arithmetic decoding apparatus of FIG. 1;
FIG. 3 is a diagram showing how to take CX when handling image data having a depth of 4 bits in the arithmetic decoding apparatus of FIG. 1, (a) is for a bit of interest on a first bit plane; FIG. 4B shows how to take CX, and FIG. 4B shows how to take CX for the bit of interest on the second bit plane.
4A and 4B are diagrams illustrating how CX is taken when image data having a depth of 4 bits is handled in the arithmetic decoding apparatus of FIG. 1, and FIG. 4A is a diagram illustrating CX for a target bit on a third bit plane. (B) is a diagram showing how to take CX for the bit of interest on the fourth bit plane.
FIG. 5 is a diagram illustrating an order in which arithmetic decoding processing is performed on the image data in FIG. 4;
6 is a diagram showing how CX is taken when image data having a depth of 2 bits is handled in the arithmetic decoding apparatus of FIG. 1, FIG. 6A is a diagram illustrating CX for a bit of interest on a first bit plane; (B) is a diagram showing how to take CX for the bit of interest on the second bit plane.
7 is a diagram illustrating an order in which arithmetic decoding processing is performed on the image data in FIG. 6; FIG.
[Explanation of symbols]
100 CX generator
101 CX (context)
105 Third selector
106 Arithmetic operation part
107 prediction state update unit
108 Line buffer memory
110 ROM
111 first selector
112 second selector
113 MPS (predicted value)
114 MPS (predicted value)
115 ST (state value)
116 ST (state value)
121 First F / F (flip-flop) circuit
122 Second F / F (Flip-Flop) Circuit
123 MPS (predicted value)
124 MPS (predicted value)
125 ST (state value)
126 ST (state value)
131 First ST / LSZ converter
132 Second ST / LSZ converter
133 LSZ (estimated estimate)
134 LSZ (estimated estimate)
135 MPS (predicted value)
136 LSZ (estimated estimate)
139 Predicted state value
140 Predictive state value select signal generator
141 MPS / LSZ select signal generator
142 Predictive state value select signal
143 MPS / LSZ select signal
150 Mode designation signal
160 Arithmetic code data
170 Decryption data
171 Yn signal
181 First prediction state memory
182 second prediction state memory
183 Third prediction state memory
184 Fourth prediction state memory
185 MPS (predicted value)
186 MPS (predicted value)
187 MPS (predicted value)
188 MPS (predicted value)
189 ST (state value)
190 ST (state value)
191 ST (state value)
192 ST (state value)

Claims (13)

単一の算術演算部と個別にアクセス可能な複数のメモリを用いて、少なくとも1つのビットプレーンから成る算術符号化した画像データを復号化する算術復号化方法であって、
前記算術符号化された画像データのビット深さに関する情報を受け取る受取ステップと、
前記算術符号化された画像データのビット深さが前記メモリの数と等しい場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数を前記メモリのそれぞれ対応するものに格納する格納ステップと、
前記算術符号化された画像データのビット深さが前記メモリの数より少ない場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数の1つを前記メモリの少なくとも一部に割り当てて格納する割当格納ステップと、
前記状態変数のうちの前記各ビットプレーンの復号化対象画素にそれぞれ対応するものを前記メモリから読み出す読出ステップと、
前記状態変数のうちの前記メモリから読み出されたものを前記算術演算部で既に算術復号化されたデータに基づいて選択する選択ステップと、
当該選択された状態変数、及び該選択された状態変数と対をなす予測値を前記算術演算部に入力する入力ステップとを有することを特徴とする算術復号化方法。
By using a single arithmetic unit and individually accessible plurality of memories, an arithmetic decoding method for decoding image data obtained by arithmetic coding of at least one bit plane,
Receiving to receive information regarding the bit depth of the arithmetically encoded image data;
When the bit depth of the arithmetically encoded image data is equal to the number of the memories, the state variable corresponding to the decoding target pixel of each bit plane of the image data is stored in the corresponding one of the memories. A storage step;
When the bit depth of the arithmetically encoded image data is less than the number of the memories, one of the state variables corresponding to the decoding target pixel of each bit plane of the image data is stored in at least a part of the memory. An allocation storage step for allocating and storing;
A reading step of reading out from the memory one of the state variables corresponding to a decoding target pixel of each bit plane;
A selection step of selecting one of the state variables read from the memory based on data that has already been arithmetically decoded by the arithmetic operation unit;
An arithmetic decoding method comprising: an input step of inputting the selected state variable and a predicted value paired with the selected state variable to the arithmetic operation unit .
前記予測値は当該予測値と対をなす前記選択された状態変数と共に前記画像データのビット深さに関する情報に応じて前記メモリに格納されることを特徴とする請求項1記載の算術復号化方法。2. The arithmetic decoding method according to claim 1, wherein the predicted value is stored in the memory in accordance with information on a bit depth of the image data together with the selected state variable paired with the predicted value. . 前記読出ステップは、前記画像データのビット深さが偶数で且つ前記メモリの数の半分の数に等しい場合、前記状態変数のうちの復号化対象画素の各々に実際に対応する可能性のあるものを、当該状態変数のどれが当該画素に実際に対応しているかが分かる前に前記メモリから読み出すと共に保持する読出保持ステップを含み、The reading step may actually correspond to each decoding target pixel of the state variables when the bit depth of the image data is an even number and equal to half the number of the memories. A read hold step that reads and holds from the memory before knowing which of the state variables actually corresponds to the pixel,
前記選択ステップは、前記メモリから読み出されると共に保持される前記状態変数のうち、当該画素に実際に対応していると分かったものを選択する状態変数選択ステップを含むことを特徴とする請求項1又は2記載の算術復号化方法。  The selection step includes a state variable selection step of selecting a state variable that is read from the memory and held and found to actually correspond to the pixel. Or the arithmetic decoding method of 2.
さらに、前記復号化された画像データを画素単位でバッファメモリに記憶する記憶ステップと、A storage step of storing the decoded image data in a buffer memory in units of pixels;
前記画像データのビット深さに関する情報に応じて、前記バッファメモリに記憶された画像データからコンテキストを生成する生成ステップとを有することを特徴とする請求項1乃至3のいずれか1項に記載の算術復号化方法。  4. The method according to claim 1, further comprising: generating a context from the image data stored in the buffer memory in accordance with information on the bit depth of the image data. 5. Arithmetic decoding method.
前記状態変数は状態値及び確率推定値のいずれか一方であることを特徴とする請求項1乃至4のいずれか1項に記載の算術復号化方法。The arithmetic decoding method according to any one of claims 1 to 4, wherein the state variable is one of a state value and a probability estimation value. 少なくとも1つのビットプレーンから成る算術符号化した画像データを復号化する算術復号化装置であって、
算術演算を実行する単一の算術演算部と、
個別にアクセス可能な複数のメモリと、
算術符号化された画像データのビット深さに関する情報が入力されるビットモード入力部と、
前記ビットモード入力部で入力されたビット深さが前記メモリの数と等しい場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数を前記メモリのそれぞれ対応するものに格納し、当該ビット深さが前記メモリの数より少ない場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数の1つを前記メモリの少なくとも一部に割り当てて格納する格納制御部と、
前記状態変数のうちの前記各ビットプレーンの復号化対象画素にそれぞれ対応するものを前記メモリから読み出す読出部と、
前記状態変数のうちの前記メモリから読み出されたものを前記算術演算部で既に算術復号化されたデータに基づいて選択する選択部と、
当該選択された状態変数、及び該選択された状態変数と対をなす予測値を前記算術演算部に入力する入力部とを備えることを特徴とする算術復号化装置。
An arithmetic decoding device for decoding arithmetically encoded image data composed of at least one bit plane,
A single arithmetic unit that performs arithmetic operations;
Multiple memory that can be accessed individually,
A bit mode input unit to which information regarding the bit depth of the arithmetically encoded image data is input;
When the bit depth input at the bit mode input unit is equal to the number of the memories, the state variables corresponding to the decoding target pixels of the bit planes of the image data are stored in the corresponding ones of the memories. When the bit depth is less than the number of the memories, a storage control unit that allocates and stores at least a part of the memory with one of state variables corresponding to the decoding target pixels of each bit plane of the image data When,
A reading unit that reads out from the memory the state variables corresponding to the decoding target pixels of each of the bit planes;
A selection unit for selecting one of the state variables read from the memory based on data that has already been arithmetically decoded by the arithmetic operation unit;
An arithmetic decoding apparatus comprising: an input unit that inputs the selected state variable and a predicted value paired with the selected state variable to the arithmetic operation unit .
前記予測値は当該予測値と対をなす前記選択された状態変数と共に前記画像データのビット深さに関する情報に応じて前記メモリに格納されることを特徴とする請求項6記載の算術復号化装置。7. The arithmetic decoding apparatus according to claim 6, wherein the predicted value is stored in the memory in accordance with information on a bit depth of the image data together with the selected state variable paired with the predicted value. . 前記読出部は、前記画像データのビット深さが偶数で且つ前記メモリの数の半分の数に等しい場合、前記状態変数のうちの復号化対象画素の各々に実際に対応する可能性のあるものを、当該状態変数のどれが当該画素に実際に対応しているかが分かる前に前記メモリから読み出すと共に保持する読出保持部を含み、The reading unit may actually correspond to each of the decoding target pixels among the state variables when the bit depth of the image data is an even number and equal to half the number of the memories. Including a read holding unit that reads and holds from the memory before knowing which of the state variables actually corresponds to the pixel,
前記選択部は、前記メモリから読み出されると共に保持される前記状態変数のうち、当該画素に実際に対応していると分かったものを選択する状態変数選択部を含むことを特徴とする請求項6又は7記載の算術復号化装置。  The said selection part contains the state variable selection part which selects what was found to correspond to the said pixel actually among the said state variables read and hold | maintained from the said memory. Or the arithmetic decoding apparatus of 7.
さらに、前記復号化された画像データを画素単位で記憶するバッファメモリと、A buffer memory for storing the decoded image data in units of pixels;
前記画像データのビット深さに関する情報に応じて、前記バッファメモリに記憶された画像データからコンテキストを生成するコンテキスト生成部とを備えることを特徴とする請求項6乃至8のいずれか1項に記載の算術復号化装置。  9. The system according to claim 6, further comprising: a context generation unit configured to generate a context from the image data stored in the buffer memory in accordance with information related to a bit depth of the image data. Arithmetic decoding device.
前記状態変数は状態値及び確率推定値のいずれか一方であることを特徴とする請求項6乃至9のいずれか1項に記載の算術復号化装置。The arithmetic decoding device according to claim 6, wherein the state variable is one of a state value and a probability estimation value. 単一の算術演算部と個別にアクセス可能な複数のメモリを用いて、少なくとも1つのビットプレーンから成る算術符号化した画像データを復号化する算術復号化方法をコンピュータに実行させるためのプログラムを格納したコンピュータ読み取り可能な記憶媒体であって、前記プログラムが、
前記算術符号化された画像データのビット深さに関する情報を受け取る受取モジュールと、
前記算術符号化された画像データのビット深さが前記メモリの数と等しい場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数を前記メモリのそれぞれ対応するものに格納する格納モジュールと、
前記算術符号化された画像データのビット深さが前記メモリの数より少ない場合は、当該画像データの各ビットプレーンの復号化対象画素に対応する状態変数の1つを前記メモリの少なくとも一部に割り当てて格納する割当格納モジュールと、
前記状態変数のうちの前記各ビットプレーンの復号化対象画素にそれぞれ対応するものを前記メモリから読み出す読出モジュールと、
前記状態変数のうちの前記メモリから読み出されたものを前記算術演算部で既に算術復号化されたデータに基づいて選択する選択モジュールと、
当該選択された状態変数、及び該選択された状態変数と対をなす予測値を前記算術演算部に入力する入力モジュールとを有することを特徴とする記憶媒体。
By using a single arithmetic unit and individually accessible plurality of memories, a program for executing the arithmetic decoding method for decoding image data obtained by arithmetic coding of at least one bit plane on a computer A stored computer-readable storage medium, wherein the program is
A receiving module for receiving information about a bit depth of the arithmetically encoded image data;
When the bit depth of the arithmetically encoded image data is equal to the number of the memories, the state variable corresponding to the decoding target pixel of each bit plane of the image data is stored in the corresponding one of the memories. A storage module;
When the bit depth of the arithmetically encoded image data is less than the number of the memories, one of the state variables corresponding to the decoding target pixel of each bit plane of the image data is stored in at least a part of the memory. An allocation storage module to allocate and store;
A readout module that reads out from the memory one of the state variables corresponding to a decoding target pixel of each bit plane;
A selection module for selecting one of the state variables read from the memory based on data already arithmetically decoded by the arithmetic operation unit;
A storage medium comprising: an input module that inputs the selected state variable and a predicted value paired with the selected state variable to the arithmetic operation unit .
算術符号化された2値画像データ及び多値画像データの双方を処理するのに共通して使用し得る単一の算術演算部と、前記算術演算部によって算術演算に利用するための予測値を含む状態変数の組を記憶する複数のメモリとを制御して前記算術符号化された2値画像データ及び多値画像データを算術復号化する算術復号化方法であって、A single arithmetic operation unit that can be used in common to process both binary image data and multi-value image data that have been subjected to arithmetic coding, and a predicted value to be used for arithmetic operation by the arithmetic operation unit. An arithmetic decoding method for arithmetically decoding the arithmetically encoded binary image data and multilevel image data by controlling a plurality of memories that store a set of state variables including
前記算術符号化された画像データ及び当該画像データのビット深さに関する情報を受け取る受取ステップと、  Receiving the arithmetically encoded image data and information regarding the bit depth of the image data;
前記ビット深さに関する情報に基づいて、前記画像データの1つのビットプレーンのうち復号化対象画素に対応する前記状態変数の各組を前記メモリ内のそれぞれのビットプレーンに当該画像データの各ビットプレーンと対応付けて記憶させるか、前記画像データの各ビットプレーンのうち復号化対象画素に対応する前記状態変数の組を割り当てて前記メモリの少なくとも部分に記憶させるかの選択を制御する制御ステップと、  Based on the information on the bit depth, each set of the state variables corresponding to the decoding target pixel in one bit plane of the image data is transferred to each bit plane in the memory. Or a control step for controlling selection of whether to store the state variable set corresponding to the decoding target pixel in each bit plane of the image data and store it in at least a part of the memory;
前記メモリに記憶された前記状態変数の組又はその少なくとも一部を、前記ビット深さ  The set of state variables stored in the memory or at least a portion thereof, the bit depth に応じて決定された順序で前記算術演算部に入力する入力ステップとを有することを特徴とする算術復号化方法。And an input step for inputting to the arithmetic operation unit in an order determined according to the arithmetic decoding method.
さらに、前記ビット深さに応じて、前記メモリに記憶された前記状態変数の組又はその少なくとも一部のうち有効なものを選択する選択ステップを有することを特徴とする請求項12記載の算術復号化方法。13. The arithmetic decoding according to claim 12, further comprising a selection step of selecting a valid one of the set of state variables or at least a part thereof stored in the memory according to the bit depth. Method.
JP2001179063A 2000-06-14 2001-06-13 Arithmetic decoding method and apparatus, and storage medium Expired - Fee Related JP4086481B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001179063A JP4086481B2 (en) 2000-06-14 2001-06-13 Arithmetic decoding method and apparatus, and storage medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2000178704 2000-06-14
JP2000-178704 2000-06-14
JP2001179063A JP4086481B2 (en) 2000-06-14 2001-06-13 Arithmetic decoding method and apparatus, and storage medium

Publications (3)

Publication Number Publication Date
JP2002077634A JP2002077634A (en) 2002-03-15
JP2002077634A5 JP2002077634A5 (en) 2006-09-07
JP4086481B2 true JP4086481B2 (en) 2008-05-14

Family

ID=26593939

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001179063A Expired - Fee Related JP4086481B2 (en) 2000-06-14 2001-06-13 Arithmetic decoding method and apparatus, and storage medium

Country Status (1)

Country Link
JP (1) JP4086481B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050087956A (en) * 2004-02-27 2005-09-01 삼성전자주식회사 Lossless audio decoding/encoding method and apparatus

Also Published As

Publication number Publication date
JP2002077634A (en) 2002-03-15

Similar Documents

Publication Publication Date Title
JPH0969951A (en) Encoding method and decoding method
US6026197A (en) Coding method and apparatus therefor
JP2001230935A (en) Method and device for arithmetic encoding/decoding
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
US6313767B1 (en) Decoding apparatus and method
US6127950A (en) Transmission circuit and reception circuit
JP4086481B2 (en) Arithmetic decoding method and apparatus, and storage medium
US6882751B2 (en) Arithmetic decoding method and device and storage medium
JP3459759B2 (en) Arithmetic decoding device
JP3871995B2 (en) Encoding device and decoding device
JP3119025B2 (en) Encoding device and decoding device
JPH07249995A (en) Data encoding device
JP3384287B2 (en) Encoding device and decoding device
JP3484900B2 (en) Image data encoding device
JP3270665B2 (en) Encoding / decoding apparatus and method
JP3213200B2 (en) Decoding device and method
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP3141794B2 (en) Decryption device
JP3247052B2 (en) Image data conversion processing method and apparatus
JP3336537B2 (en) Encoding device, decoding device, encoding / decoding device, and arithmetic encoding device
JP3146109B2 (en) Binary image coding device
JP2002171412A (en) Simd type information processing apparatus provided with x-branch tree instruction
JP3123795B2 (en) Encoding device and decoding device using arithmetic code

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060415

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060721

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060721

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20070626

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080131

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080219

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

Free format text: PAYMENT UNTIL: 20110228

Year of fee payment: 3

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130228

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140228

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees