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

JP3457269B2 - Arithmetic encoding / decoding method and arithmetic encoding / decoding device - Google Patents

Arithmetic encoding / decoding method and arithmetic encoding / decoding device

Info

Publication number
JP3457269B2
JP3457269B2 JP2000217850A JP2000217850A JP3457269B2 JP 3457269 B2 JP3457269 B2 JP 3457269B2 JP 2000217850 A JP2000217850 A JP 2000217850A JP 2000217850 A JP2000217850 A JP 2000217850A JP 3457269 B2 JP3457269 B2 JP 3457269B2
Authority
JP
Japan
Prior art keywords
context
symbol
arithmetic
probability
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
JP2000217850A
Other languages
Japanese (ja)
Other versions
JP2002033925A (en
Inventor
等 堀江
Original Assignee
パナソニック コミュニケーションズ株式会社
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 パナソニック コミュニケーションズ株式会社 filed Critical パナソニック コミュニケーションズ株式会社
Priority to JP2000217850A priority Critical patent/JP3457269B2/en
Publication of JP2002033925A publication Critical patent/JP2002033925A/en
Application granted granted Critical
Publication of JP3457269B2 publication Critical patent/JP3457269B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は符号化装置、復号化
装置に関し、特に、エントロピー予測符号化装置・復号
化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding device and a decoding device, and more particularly to an entropy prediction coding device / decoding device.

【0002】[0002]

【従来の技術】符号化シンボルを既に符号化済みの周辺
画素の状態によって予測し、予測結果をその状態毎に定
まる符号化シンボルの確率推定値をもとに算術符号化す
る方式が圧縮率の点から最も優れた特性を示すことが知
られている。JBIG(ITU勧告T。82)に採用されている符号
器であるQM-coderは、その一例である。
2. Description of the Related Art A method of predicting a coded symbol according to the state of already coded peripheral pixels and arithmetically coding the prediction result based on the probability estimation value of the coded symbol determined for each state is the compression rate. It is known that it exhibits the most excellent characteristics. An example is the QM-coder, which is an encoder used in JBIG (ITU Recommendation T.82).

【0003】以下、2値画像の算術符号器であるQM-cod
erの、一般的な構成と動作について説明する。
Hereinafter, QM-cod which is an arithmetic encoder for binary images
The general configuration and operation of er will be described.

【0004】QM-coderは、図50に示すように、コンテク
スト生成部200と、コンテクストテーブル(コンテクス
トメモリ)210と、確率推定器220と、算術符号器230
と、を有する。
As shown in FIG. 50, the QM-coder includes a context generation section 200, a context table (context memory) 210, a probability estimator 220, and an arithmetic encoder 230.
And.

【0005】コンテクスト生成部200は、符号化画素の
周辺10画素によって作られる1024個の状態を検出する。
図52にテンプレートの一例を示す。図中、”?”で示さ
れるのが符号化対象の画素であり、また、”×”で示さ
れる10個の画素が参照画素である。一つの画素の符号化
が終了すると、図52に点線で示されるように、テンプレ
ートを右側に一つずらし、次の画素の符号化を行なう。
The context generator 200 detects 1024 states formed by 10 pixels around the coded pixel.
FIG. 52 shows an example of the template. In the figure, “?” Indicates a pixel to be encoded, and 10 pixels indicated by “x” are reference pixels. When the coding of one pixel is completed, the template is shifted to the right by one, as shown by the dotted line in FIG. 52, and the coding of the next pixel is performed.

【0006】10個の画素の値により決定される210個の
状態の各々は、コンテクスト(以下”S”と表す)と呼ば
れる。コンテクスト毎に、優勢シンボルの予測値MPS(s)
(すなわち、着目する符号化シンボルについて、MPS
が”1”であると予測されれば、MPS(S)=1である)
と、確率推定器の状態番号とが、コンテクストメモリか
ら読み出され、確率推定器220に出力される。
Each of the 2 10 states determined by the values of the 10 pixels is called a context (hereinafter "S"). Predicted value of dominant symbol MPS (s) for each context
(That is, for the coded symbol of interest, MPS
Is predicted to be “1”, MPS (S) = 1)
And the state number of the probability estimator are read from the context memory and output to the probability estimator 220.

【0007】確率推定器220は、これらの情報から劣勢
シンボルの領域幅Qe(s)を算術符号器230に出力する。こ
こで”Qe”は、「LPSが生起される確率」であり、本明
細書では、これを「符号化シンボルの生起確率」とか、
単に「確率推定値」という場合もある。
The probability estimator 220 outputs the area width Qe (s) of the inferior symbol from the above information to the arithmetic encoder 230. Here, “Qe” is “probability of LPS occurrence”, and in the present specification, this is referred to as “probability of occurrence of coded symbol”,
It may also be simply referred to as the "probability estimate".

【0008】また、劣勢シンボルの領域幅Qe(s)は、L
PSの生起確率にオージェンドの幅をかけて算出される、
LPSの生起確率に対応する幅を意味する。オージェンド
とは、図51に示されるような数直線の全体の幅をいう。
The area width Qe (s) of the inferior symbol is L
Calculated by multiplying the probability of occurrence of PS by the range of augend,
It means the width corresponding to the occurrence probability of LPS. The augend refers to the entire width of the number line as shown in FIG.

【0009】算術符号器230は、符号化シンボル、優勢
シンボルの予測値MPS(s)および領域幅Qe(s)から算術符
号化演算を実行し、符号を出力する。
The arithmetic encoder 230 executes an arithmetic encoding operation from the encoded symbol, the predicted value MPS (s) of the dominant symbol and the area width Qe (s), and outputs the code.

【0010】図51に示すように、算術符号化では、初期
値0〜1の数直線を優勢シンボル(MPS)の領域幅と劣
勢シンボル(LPS)の領域幅に分ける。符号化対象のシ
ンボル系列は、分割された領域内の代表点に対応させ
る。代表点は、部分区間内の一番下にとられる。
As shown in FIG. 51, in arithmetic coding, a number line having an initial value of 0 to 1 is divided into an area width of a dominant symbol (MPS) and an area width of an inferior symbol (LPS). The symbol sequence to be encoded is associated with a representative point in the divided area. The representative point is taken at the bottom of the partial section.

【0011】符号化シンボルと予測値が同じときは、次
のシンボルの符号化にはMPS幅が選ばれ、そうでなけれ
ばLPS幅が選ばれる。上述のとおり、この領域幅の中に
代表点を設けて、その2進小数点が符号を表わす。
When the coded symbol and the predicted value are the same, the MPS width is selected for coding the next symbol, and the LPS width is selected otherwise. As described above, a representative point is provided in this area width, and its binary point represents the sign.

【0012】算術符号化演算では、領域幅が所定値未満
になった時には、少数点の精度を防ぐために所定値(具
体的には初期値の1/2)以上になるまで2倍処理を繰
り返す。この処理を「正規化処理」という。
In the arithmetic coding operation, when the area width becomes less than a predetermined value, the doubling process is repeated until it becomes a predetermined value (specifically, half the initial value) or more to prevent the precision of the decimal point. . This process is called "normalization process".

【0013】また、正規化処理は、LPSを符号化したと
きも行われる。すなわち、推定がはずれてLPS幅が選択
されると、そのLPS幅は、必ず、初期値の1/2より小
さいため、毎回、正規化がなされることになる。
The normalization process is also performed when LPS is encoded. That is, when the estimation is deviated and the LPS width is selected, the LPS width is always smaller than ½ of the initial value, so that the normalization is performed every time.

【0014】正規化処理が行なわれる場合には、図50の
コンテクストテーブル210における、MPS値や状態番号
(ST)が更新される。状態番号の更新は、確率推定部22
0に書かれている「次の状態番号」が、コンテクストテ
ーブル210にオーバーライトされることにより実現され
る。図50では、このオーバーライトを矢印RXで示して
いる。
When the normalization process is performed, the MPS value and the state number (ST) in the context table 210 of FIG. 50 are updated. The state number is updated by the probability estimation unit 22.
The “next state number” written in 0 is realized by overwriting the context table 210. In FIG. 50, this overwrite is indicated by an arrow RX.

【0015】このコンテクストテーブル210の更新によ
り、次もまた、前回と同じコンテクストであった(すな
わち、図52のテンプレートを右に一つずらしても、参照
画素の1と0の配置が前回と同じであった)としても、
発生するQe(S)の値が異なることになる。
Due to the update of the context table 210, the next context is also the same as the previous one (that is, even if the template of FIG. 52 is shifted right by one, the arrangement of reference pixels 1 and 0 is the same as the previous one. Was)
The generated Qe (S) value will be different.

【0016】これによって、より情報源の確率分布に適
した値が選択されるようになる。つまり、符号化対象の
画像への適応化がなされる。以上、2値画像の符号・復
号について説明した。
As a result, a value more suitable for the probability distribution of the information source can be selected. That is, the adaptation to the image to be encoded is performed. The encoding / decoding of the binary image has been described above.

【0017】符号化対象は、2値データに限られるもの
ではない。数値データのような多値データも、QM-coder
で符号化することができる。但し、数値を符号化する場
合には、符号化に必要なコンテクストはそれに適したも
のを使わなければならない。例えば、離散コサイン変換
後の係数には、DC成分とAC成分が含まれる。各成分は信
号の性質が異なる。よって、それらに適したコンテクス
トモデルを構築することが、符号化効率を向上させる点
では重要である。現状の技術では、DC成分とAC成分のお
のおのに対して、別々にコンテクストが生成されてい
る。
The object to be encoded is not limited to binary data. Multi-valued data such as numerical data can also be processed by QM-coder
Can be encoded with. However, when encoding a numerical value, the context required for encoding must use the suitable thing. For example, the coefficient after the discrete cosine transform includes a DC component and an AC component. Each component has a different signal property. Therefore, constructing a context model suitable for them is important in improving the coding efficiency. In the current technology, the context is separately generated for each of the DC component and the AC component.

【0018】[0018]

【発明が解決しようとする課題】従来の算術符号化処理
では、以下のような課題がある。
The conventional arithmetic coding processing has the following problems.

【0019】(課題1)本来、算術符号化は、圧縮率に
は優れているが、1シンボル毎にコンテクストの生成
と、シンボルの生起確率情報の推定と、算術符号演算を
繰り返す必要があることから、処理時間が長いという弱
点がある。処理スピードの低下は、高画質かつ高速性が
要求される、デジタルコピー機のような分野では、かな
り大きな問題となる。
(Problem 1) Originally, the arithmetic coding is excellent in compression rate, but it is necessary to repeat the context generation, the symbol occurrence probability information estimation, and the arithmetic code calculation for each symbol. Therefore, there is a weak point that the processing time is long. The decrease in processing speed is a serious problem in fields such as digital copiers, which require high image quality and high speed.

【0020】ここで、図50に示される2値算術符号器に
おいて、パイプライン処理を実行し、そのパイプライン
処理の性能を向上させれば、無駄のない非常に高速な算
術符号処理を実現することができる。
Here, in the binary arithmetic encoder shown in FIG. 50, if pipeline processing is executed and the performance of the pipeline processing is improved, very high-speed arithmetic code processing with no waste is realized. be able to.

【0021】しかし、算術符号処理をパイプライン化し
た場合、途中で正規化処理が発生すると、パイプライン
に乱れが生じ、その結果として無駄な待ち時間が増え
る。よって処理効率が低下する場合がある。特に、正規
化がかなりの頻度で発生し、かつ、コンテクストに連続
性がある画像パターンでパイプラインの乱れが発生しや
すいと考えられる。なお、復号化の場合にも同様の問題
が生じる。
However, when the arithmetic coding process is pipelined, if the normalization process occurs in the middle of the pipeline, the pipeline is disturbed, and as a result, unnecessary waiting time increases. Therefore, the processing efficiency may decrease. In particular, it is considered that normalization occurs at a fairly high frequency, and pipeline disturbance is likely to occur in an image pattern having a continuous context. A similar problem occurs in the case of decoding.

【0022】よって、パイプライン化したとしても、そ
の精度は高いとはいえず、算術符号・復号処理の高速化
は、あまり望めない。
Therefore, even if it is pipelined, its accuracy cannot be said to be high, and the speeding up of arithmetic coding / decoding processing cannot be expected so much.

【0023】(課題2)2値データの符号化のみなら
ず、多値データ(例えば、JPEG圧縮により得られる直交
変換係数などの数値データ)を符号化、復号化する場合
にも、高精度なパイプライン処理を行うようにするのが
望ましい。
(Problem 2) Not only in encoding binary data, but also in encoding and decoding multi-valued data (for example, numerical data such as orthogonal transform coefficients obtained by JPEG compression), high accuracy is achieved. It is desirable to perform pipeline processing.

【0024】しかし、直交変換係数などの数値を高速に
算術符号化、復号化することに関して次の課題がある。
However, there are the following problems in high-speed arithmetic coding and decoding of numerical values such as orthogonal transform coefficients.

【0025】つまり、パイプライン処理を有効に働かせ
るには、一定速度で次のパイプラインステージに必要な
データを連続的に供給しなければならない。
That is, in order to effectively operate the pipeline processing, it is necessary to continuously supply necessary data to the next pipeline stage at a constant speed.

【0026】例えば、復号化処理を高速に実行するため
には、コンテクストインデックスは、復元される可能性
のある複数シンボルに対して同時に供給する必要があ
る。このコンテクストインデックスのセットを、「コン
テクストインデックスベクトル」と呼ぶことにする。
For example, in order to execute the decoding process at high speed, the context index needs to be simultaneously supplied to a plurality of symbols which may be restored. This set of context indexes will be referred to as "context index vector".

【0027】このようなベクトル形式のコンテクストデ
ータを一定速度で供給するのは、実際には困難である。
上述のとおり、直交変換係数にはDC成分とAC成分とが含
まれる。そして、DC成分とAC成分とは統計的性質が異な
るので、現在の技術では、各成分毎に別々のコンテクス
トを設けている。
In practice, it is difficult to supply such vector format context data at a constant rate.
As described above, the orthogonal transform coefficient includes the DC component and the AC component. Since the DC component and the AC component have different statistical properties, the current technology provides a different context for each component.

【0028】異なるコンテクストを連続して供給するの
は困難である。よって、符号化するべき複数のシンボル
の中に、DC成分とAC成分が混在する場合、コンテクスト
インデックスベクトルを一定速度で供給することは困難
である。
It is difficult to continuously supply different contexts. Therefore, when a DC component and an AC component are mixed in a plurality of symbols to be encoded, it is difficult to supply the context index vector at a constant speed.

【0029】したがって、多値データの高速算術符号化
は、2値データの場合以上に、困難である。
Therefore, high-speed arithmetic coding of multi-valued data is more difficult than that of binary data.

【0030】2値データの処理用の回路とは別に、多値
データを処理するための専用の回路を設けるのならば、
ある程度の高速化も可能ではある。しかし、回路構成が
複雑であり、ハードウエア量が増え、コストアップを招
く。
If a dedicated circuit for processing multi-valued data is provided separately from the circuit for processing binary data,
It is possible to speed up to some extent. However, the circuit configuration is complicated, the amount of hardware increases, and the cost increases.

【0031】本発明は、このような現状を考慮し、2値
データ・多値データを問わず、超高速かつ高圧縮率の算
術符号化・復号化を実現するものである。
In consideration of such a current situation, the present invention realizes arithmetic coding / decoding of super-high speed and high compression rate regardless of binary data or multi-valued data.

【0032】本発明の一つの目的は、2値データの算術
符号・復号化処理において、パイプラインの乱れを取り
除き、1クロックで連続的にシンボルの符号化および復
号化を実行できる、超高速の符号化・復号化装置を提供
することである。
One object of the present invention is to achieve ultra-high-speed operation in binary arithmetic arithmetic coding / decoding processing, in which disturbance of the pipeline can be removed and symbol coding and decoding can be executed continuously in one clock. An object is to provide an encoding / decoding device.

【0033】また、本発明の他の目的は、多値データの
算術符号・復号化処理においても、2値データの場合と
同様に、1クロックで連続的にシンボルの符号化および
復号化を実行できる、超高速の符号化・復号化装置を提
供することである。
Another object of the present invention is to perform symbol coding and decoding continuously in one clock in the arithmetic coding / decoding processing of multi-valued data, as in the case of binary data. It is to provide an ultra-high-speed encoding / decoding device capable of performing.

【0034】[0034]

【課題を解決するための手段】(課題1)に対しては、
以下のような手法を採用する。
[Means for Solving the Problems] For (Problem 1),
The following method is adopted.

【0035】すなわち、エントロピー符号装置におい
て、精度維持や、入力画像への適応化のためにパラメー
タの更新が必要になったとき、そのパラメータが更新さ
れた後に出力されるであろう確率推定値(未来の確率推
定値)を、現在の推定値(通常の処理で出力される確率
推定値)と共に、並列に出力する。そして、所定の状況
が発生した場合(例えば、パラメータの更新の必要が生
じ、かつ、コンテクストが連続するためにRAMの読み出
しと書き込みが競合するような場合)には、現在の推定
値ではなく、未来の推定値の方を符号器に供給する。こ
れにより、ループを回してパラメータを更新している
間、符号化を待つ必要がなくなり、パイプラインの乱れ
が防止される。
That is, in the entropy coding apparatus, when it is necessary to update the parameters for maintaining accuracy and adaptation to the input image, the probability estimation value () that will be output after the parameters are updated ( The future probability estimation value) is output in parallel with the current estimation value (probability estimation value output in normal processing). Then, when a predetermined situation occurs (for example, when it is necessary to update the parameter, and when the reading and writing of the RAM conflict due to the continuous context), the current estimated value is The future estimate is fed to the encoder. This eliminates the need to wait for encoding while rotating the loop and updating the parameters, thus preventing pipeline turbulence.

【0036】(課題2)に対しては、以下のような手法
を採用する。
For (Problem 2), the following method is adopted.

【0037】圧縮率を絶対的に重要視する従来の固定的
な考えを捨てて、処理スピードを最も重視する新規な考
え方を導入する。この考え方に立脚して、DC成分用のコ
ンテクストとAC成分用のコンテクストを積極的に共通に
する。そして、コンテクストインデックスの生成を符号
化も復号化も状態遷移テーブルで実現できるようにす
る。
The conventional fixed idea in which the compression rate is absolutely important is discarded, and a new idea in which the processing speed is most emphasized is introduced. Based on this idea, the context for the DC component and the context for the AC component are actively shared. Then, both the encoding and the decoding of the context index can be realized by the state transition table.

【0038】復号時のコンテクストインデックスベクト
ルの生成も容易となり、パイプライン処理に適した符号
器や復号器が実現できる。符号化コンテクストを簡略化
したぶん、圧縮性能が多少は低下する。しかし、応用装
置では圧縮性能よりも処理速度が優先される場合も多
く、実際の使用上、問題は何もない。
It is easy to generate the context index vector at the time of decoding, and an encoder or decoder suitable for pipeline processing can be realized. Since the encoding context is simplified, the compression performance is slightly degraded. However, in the applied device, the processing speed is often prioritized over the compression performance, and there is no problem in actual use.

【0039】本発明によれば、2値画像および多値画像
の双方について、柔軟に、しかも、ほとんど算術符号化
アルゴリズムで決まる限界の速度でもって算術符号化・
算術復号化することができる。しかも、2値画像と多値
画像を区別することなく、共通のコンテクストを用いて
符号・復号化ができるため、符号・復号器の構成もきわ
めて簡素化される。
According to the present invention, both binary images and multi-valued images can be coded flexibly and at a limit speed almost determined by the mathematical coding algorithm.
Can be arithmetically decoded. Moreover, since encoding / decoding can be performed using a common context without distinguishing between a binary image and a multi-valued image, the configuration of the encoding / decoding device is greatly simplified.

【0040】さらなる高速化を達成するためには、文字
画像の行間部分のように白が連続するときに、連続する
シンボルを一括して処理するのがよい。この場合、局
所、局所の状況に適応して、連続処理シンボル数を可変
とするのが望ましい。これにより、画像の複雑さに応じ
て、可能な限りの処理の高速化が実現される。
In order to achieve even higher speed, it is preferable to process consecutive symbols collectively when white is continuous, as in the space between lines of a character image. In this case, it is desirable to make the number of continuously processed symbols variable in accordance with local conditions. As a result, as high a speed as possible is realized according to the complexity of the image.

【0041】[0041]

【発明の実施の形態】本発明の特徴は、高精度なパイ
プライン処理による超高速の処理、この超高速の処理
を、2値データと多値データの双方に適用すること、で
ある。そして、さらに、全白領域に関し、複数シンボ
ルの一括処理を実行し、そのシンボル数を適応的に変化
させる処理を加えることで、さらなる高速処理を実現す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A feature of the present invention is that an ultra-high-speed processing is performed by a highly accurate pipeline processing, and that this ultra-high-speed processing is applied to both binary data and multi-valued data. Further, for all white areas, batch processing of a plurality of symbols is executed, and processing for adaptively changing the number of symbols is added to realize further high speed processing.

【0042】このような本発明の特徴について、図面を
参照しつつ順番に説明していく。
The features of the present invention will be described in order with reference to the drawings.

【0043】(実施の形態1)本実施の形態では、図1
〜図3、図7、図9を参照して、2値データのパイプラ
イン算術符号化および復号化について説明する。 (算術符号化処理について)図1は、本発明の実施の形
態1にかかる算術符号器の構成を示すブロック図であ
る。
(Embodiment 1) In this embodiment, FIG.
~ Pipeline arithmetic encoding and decoding of binary data will be described with reference to Figs. 3, 7, and 9. (Arithmetic Coding Process) FIG. 1 is a block diagram showing the configuration of the arithmetic encoder according to the first embodiment of the present invention.

【0044】図示されるように、符号器は、コンテクス
ト生成器700と、コンテクストテーブル(コンテクストR
AM)701と、確率推定部(Qe ROM)702と、算術符号演算
器703とからなり、それぞれ1クロックで1つの処理を
実行する。すなわち、図1の算術符号器は、4段のパイ
プライン構造を有する。
As shown, the encoder includes a context generator 700 and a context table (context R).
AM) 701, probability estimator (Qe ROM) 702, and arithmetic code calculator 703, each of which executes one process in one clock. That is, the arithmetic encoder of FIG. 1 has a 4-stage pipeline structure.

【0045】これらの構成要素の基本的な処理内容は、
従来と同じである。本実施の形態の特徴は、Qe ROMの構
成と、その周辺部分の回路構成にある。
The basic processing contents of these constituent elements are as follows.
The same as before. The feature of this embodiment lies in the configuration of the Qe ROM and the circuit configuration of its peripheral portion.

【0046】Qe ROM702に搭載されているテーブルの内
容は図2の通りである。図2のテーブルの特徴は、従来
のテーブルのデータに、さらに、「next Qe(LPS)」お
よび「next Qe(MPS)」の各データが追加されているこ
とである。これにより、図2のテーブルは、63ビット
の幅を有し、従来のテーブルよりビット数が拡張されて
いる。
The contents of the table installed in the Qe ROM 702 are as shown in FIG. The feature of the table of FIG. 2 is that each data of “next Qe (LPS)” and “next Qe (MPS)” is further added to the data of the conventional table. As a result, the table of FIG. 2 has a width of 63 bits, and the number of bits is expanded as compared with the conventional table.

【0047】ここで、「next Qe(MPS)」とは、算術符
号器703でMPSの符号化を行なった結果、オージェンドが
初期値の1/2未満となって正規化処理が発生した場合
において、コンテクストROM701の遷移先の状態が更新さ
れ、かつ、次の符号化シンボルが前回と同じコンテクス
トであったために、コンテクストRAM701に対して前回と
同じ番地へのアクセスが発生し、その結果、Qe ROM702
の、更新された遷移先の状態に対応する番地にアクセス
がなされたならば、その結果として、Qe ROM702から出
力されるであろうLPSの幅(Qe)のことである。
Here, "next Qe (MPS)" means that the result of MPS encoding by the arithmetic encoder 703 is that the augend is less than 1/2 of the initial value and normalization processing occurs. , The state of the transition destination of the context ROM 701 is updated, and the next encoded symbol has the same context as the previous time, so that the same address as the previous time is accessed to the context RAM 701, and as a result, the Qe ROM702
When the address corresponding to the updated state of the transition destination is accessed, as a result, it is the width (Qe) of the LPS that will be output from the Qe ROM 702.

【0048】同じく、「next Qe(LPS)」とは、算術符
号器703でLPSの符号化によって必然的に正規化処理が発
生し、これに対応してループを回してコンテクストテー
ブルを更新し、同じアドレスにアクセスしたならば、Qe
ROM702から出力されるであろうLPSの幅(Qe)のことで
ある。
Similarly, "next Qe (LPS)" means that the arithmetic encoder 703 inevitably causes a normalization process due to the encoding of LPS, and in response to this, the loop is rotated to update the context table, If you access the same address, Qe
It is the width (Qe) of the LPS that will be output from the ROM 702.

【0049】つまり、正規化処理が発生し、コンテクス
トRAM701内のテーブルを更新して、再度、全く同じ番地
にアクセスをしたならば発生するであろう、未来のQeの
値を、あらかじめ、Qe ROM702内のテーブルに、現在のQ
eの値と併記しておくことに本実施の形態の特徴があ
る。
That is, if the normalization process occurs, the table in the context RAM 701 is updated, and the same address is accessed again, the future Qe value that will occur will be Qe ROM702 in advance. In the table in the current Q
The feature of this embodiment is that it is described together with the value of e.

【0050】図1の制御回路709には、符号化シンボル
のコンテクストや算術符号器における正規化の発生の有
無等のあらゆる情報が入力される。よって、制御回路70
9がそれらの情報から、現在のQeを選ぶか、未来のQe(M
PS)あるいはQe(LPS)を選ぶかを、リアルタイムで選
択することができる。このような選択を可能とするため
に、セレクタ706が設けられている。
The control circuit 709 of FIG. 1 is supplied with all kinds of information such as the context of the coded symbol and the presence / absence of normalization in the arithmetic encoder. Therefore, the control circuit 70
9 selects the current Qe from those information, or the future Qe (M
You can select in real time whether to select PS) or Qe (LPS). A selector 706 is provided to enable such selection.

【0051】これにより、仮に正規化処理が発生して
も、ループを回してテーブルを更新する間、処理を待つ
必要がなく、セレクタにより未来のQe(MPS)あるいはQ
e(LPS)を選ぶだけでよい。よって、パイプラインに乱
れが生じない。
As a result, even if the normalization process occurs, it is not necessary to wait for the process while the loop is updated to update the table, and the future Qe (MPS) or Q
All you have to do is select e (LPS). Therefore, the pipeline is not disturbed.

【0052】セレクタ704、705は、正規化処理が発生し
た後、次も、また正規化処理が発生する可能性があるこ
とを考慮し、前回使用したMPS値や、遷移先の状態の番
号を再利用できるようにするために設けられている。こ
の点については後述する。
The selectors 704 and 705 consider the possibility that the normalization process may occur again after the normalization process occurs, so that the MPS value used last time and the state number of the transition destination are used. It is provided so that it can be reused. This point will be described later.

【0053】以下、具体的に説明する。A detailed description will be given below.

【0054】Qe ROM702には、状態遷移テーブルの状態
番号がアドレスとして入力する。出力信号は現在の確率
推定値Qe(s)(信号713)、正規化により状態遷移が起き
た時の新しいQe(S)がLPS正規化とMPS正規化用に信号71
4、信号715として出力され、さらに、正規化による状態
遷移番号が、同様に2種類(信号716 、信号717)出力さ
れ、また、MPS(S)を反転させるか否かを示すフラグ(swi
tch-MPS 、信号718)が出力される。
The state number of the state transition table is input to the Qe ROM 702 as an address. The output signal is the current probability estimate Qe (s) (signal 713), and the new Qe (S) when the state transition occurs due to normalization is signal 71 for LPS normalization and MPS normalization.
4, the signal 715 is output, and two types of state transition numbers by normalization are also output (signal 716 and signal 717). Also, a flag (swi) indicating whether or not to invert MPS (S) is output.
tch-MPS, signal 718) is output.

【0055】このフラグと現在の予測シンボルMPS(S)の
排他的論理和をEOR回路708でとることで、新しい予
測シンボルが作られる。この値とセレクタ707の出力
が、正規化対象となるインデックス724のメモリ内容と
なる。
A new prediction symbol is created by taking the exclusive OR of this flag and the current prediction symbol MPS (S) in the EOR circuit 708. This value and the output of the selector 707 become the memory content of the index 724 to be normalized.

【0056】セレクタ704、705では、「正規化が発生し
た」直後の符号化シンボルが「同じコンテクスト」で符
号化されるときには、下側の信号が選択される。すなわ
ち、コンテクストRAM701にオーバーライトされる、更新
用のMPSおよび次の状態番号が選ばれることになる。
The selectors 704 and 705 select the lower signal when the coded symbol immediately after "normalization has occurred" is coded with "same context". That is, the MPS for update and the next state number, which are overwritten in the context RAM 701, are selected.

【0057】このような場合には、次も確率推定がはず
れて、正規化処理が連続する可能性があることから、更
新用のMPSと次の状態番号とを、再度、利用するように
している。この場合、セレクタ705を介して出力される
状態番号をアドレス変数として、Qe ROM702がアクセス
され、前回と同じ値の、Qe713、next Qe714、715が並列
に出力され、符号化結果を待って、この中から一つが選
択されることになる。
In such a case, the probability estimation may be deviated again and the normalization process may continue, so that the MPS for update and the next state number should be used again. There is. In this case, the state number output via the selector 705 is used as an address variable to access the Qe ROM 702, and the same value as the previous time, Qe713, next Qe714, 715, is output in parallel, and waits for the encoding result. One of them will be selected.

【0058】各セレクタの選択信号は、制御回路709に
よって必要な状態信号を見ながら、適宜、出力される。
図が煩雑となるので制御信号の詳細は省略している。
The selection signal of each selector is appropriately output by the control circuit 709 while observing a necessary status signal.
The details of the control signal are omitted because the figure becomes complicated.

【0059】上述したように、図2は、Qe ROMの構成例
を示している。上述のとおり、パイプラインが乱れるの
は、Qe ROMの読み直しが必要となることが原因である。
As described above, FIG. 2 shows a configuration example of the Qe ROM. As described above, the pipeline is disturbed because the Qe ROM needs to be reread.

【0060】本実施の形態では、このような場合に、Qe
ROMの読み直しが不要になるように、LPS正規化時の遷
移先のQeと MPS正規化時の遷移先のQeとを同一アドレス
に記憶している。ビット15からビット46がこの部分にあ
たる。
In this embodiment, in such a case, Qe
The transition destination Qe during LPS normalization and the transition destination Qe during MPS normalization are stored at the same address so that ROM re-reading is not required. Bits 15 to 46 correspond to this part.

【0061】状態遷移表によれば、Qe-indexが0のとき
の、MPS正規化 、LPS正規化の遷移先(Qe-index)は1で
あることが分かる。また、Qe-indexが1のときのQeは0x
2586であることが分かる。従って、図1のビット15から
ビット30には0x2586が記憶されている。同様にビット31
からビット46も0x2586が記憶されている。
From the state transition table, it can be seen that the transition destination (Qe-index) of MPS normalization and LPS normalization is 1 when Qe-index is 0. Also, when Qe-index is 1, Qe is 0x
It turns out to be 2586. Therefore, 0x2586 is stored in bits 15 to 30 of FIG. Bit 31 as well
From bit 46, 0x2586 is also stored.

【0062】こうすることによって、正規化発生直後
に、同一コンテクストの符号化を行う場合も、ROMの読
み直しは不要であり、既に読み出されているものから、
状況に応じて必要なものを選択するだけでよい。
By doing so, even when the same context is encoded immediately after the normalization occurs, it is not necessary to reread the ROM, and since it has already been read,
All you have to do is select the one you need.

【0063】次に、図3を参照しながら、図1の算術符
号器の動作の概要を説明する。
Next, an outline of the operation of the arithmetic encoder of FIG. 1 will be described with reference to FIG.

【0064】第i番目のシンボルの符号化がクロックに
同期して、コンテクストの生成(context det 。)、コン
テクストRAMのリード(context RAM RD)、Qe ROMのリー
ド(QeRD) 、符号化演算および正規化演算(coding/renor
m)の順に処理されていく。
The encoding of the i-th symbol is synchronized with the clock, and context generation (context det.), Context RAM read (context RAM RD), Qe ROM read (QeRD), encoding operation and normalization Arithmetic operation (coding / renor
It is processed in the order of m).

【0065】符号化シンボルとそのコンテクストは、コ
ンテクスト生成器700で検出する 。符号化シンボルはパ
イプラインのタイミング調整用の遅延回路710を通して
算術符号演算器703に送られる。
The encoded symbol and its context are detected by the context generator 700. The encoded symbol is sent to the arithmetic code calculator 703 through the delay circuit 710 for adjusting the timing of the pipeline.

【0066】コンテクストの識別番号であるコンテクス
トインデックス”s”は、コンテクストRAM701の入力信
号となる。同時にそのコンテクストで正規化が発生する
場合に、RAMの内容を更新するためのアドレス情報とし
て、正規化インデックス712に入力される。正規化イン
デックス712は、3クロック分の遅延を与える遅延回路
である。正規化インデックス712の出力信号724は、正規
化処理が発生した場合に、次の遷移先の状態やMPS値を
更新する際のアドレスを指定する信号(コンテクストイ
ンデックス)となる。
The context index “s”, which is the identification number of the context, becomes an input signal of the context RAM 701. At the same time, when normalization occurs in the context, the normalization index 712 is input as address information for updating the contents of RAM. The normalization index 712 is a delay circuit that gives a delay of 3 clocks. The output signal 724 of the normalization index 712 becomes a signal (context index) that specifies an address for updating the state of the next transition destination or the MPS value when the normalization process occurs.

【0067】コンテクストRAM701は、リードとライトを
並行して行なえるデュアルポートRAMで構成する。これ
により、正規化処理が生じてRAMの更新が必要となった
場合でも、次のコンテクスト(図52のテンプレートを右
側にずらした場合の参照画素における1と0の配置)が
前回と違っていれば、符号化用のコンテクスト情報の読
み出し(リード)と、正規化が生じた場合のコンテクス
ト情報の更新(ライト)とを、同じサイクルで、同時に
実行できるようになる。
The context RAM 701 is composed of a dual port RAM capable of performing reading and writing in parallel. As a result, even if the normalization process occurs and the RAM needs to be updated, the next context (arrangement of 1s and 0s in the reference pixels when the template in FIG. 52 is shifted to the right) is different from the previous one. For example, the reading (reading) of the context information for encoding and the updating (writing) of the context information when the normalization occurs can be simultaneously executed in the same cycle.

【0068】したがって、正規化処理が発生しても、次
のコンテクストが異なっているのであれば、ROMへのア
クセスの競合が生じないため、オーバーライトを待つ必
要がなく、パイプラインの乱れは生じない。
Therefore, even if the normalization process occurs, if the next contexts are different, there is no conflict of access to the ROM, so there is no need to wait for the overwriting, and the pipeline is disturbed. Absent.

【0069】コンテクストRAMの出力信号は、符号化シ
ンボルの予測値MPS(S)と確率推定器の状態番号(図中st
ate No)である。予測値MPS(S)は、パイプラインの遅延
調整回路711を通って算術符号演算器703に送られる。
The output signal of the context RAM is the predicted value MPS (S) of the coded symbol and the state number of the probability estimator (st in the figure).
ate No). The predicted value MPS (S) is sent to the arithmetic code calculator 703 through the delay adjustment circuit 711 of the pipeline.

【0070】これら2つの出力信号は、セレクタ704と7
05に入る。制御回路709は、正規化が発生しない時は、
上側の信号(つまり、コンテクストRAMから出力されるM
PS値と状態番号)が選ばれるように、セレクタ704、705
を制御する。
These two output signals are output to the selectors 704 and 7
Enter 05. The control circuit 709, when normalization does not occur,
Upper signal (that is, M output from context RAM)
Selector 704, 705 so that PS value and status number) are selected
To control.

【0071】Qe ROM702は、セレクタ705を介して入力さ
れる状態番号をアドレス変数としてアクセスされる。
The Qe ROM 702 is accessed using the state number input via the selector 705 as an address variable.

【0072】図2に示すように、一つのアドレスには3
種類のQeが併記されているため、QeROM702からは、確率
推定値として3種類の値が、常に出力される。そして、
制御回路709が、正規化の有無やコンテクストの連続の
有無を判定して、状況に応じて、それらの中の一つをリ
アルタイムで選択していく。
As shown in FIG. 2, one address contains 3
Since the types of Qe are also written, the QeROM 702 always outputs three types of values as probability estimation values. And
The control circuit 709 determines the presence or absence of normalization and the presence or absence of consecutive contexts, and selects one of them in real time according to the situation.

【0073】以下、図3を用いて、正規化処理が発生し
た場合の動作を説明する。
The operation when the normalization process occurs will be described below with reference to FIG.

【0074】図3における処理801では、Qe(Si)(信号7
13)が選択されたものとする。ここでは第i番目のコン
テクストをSiとした。
In the process 801 in FIG. 3, Qe (Si) (signal 7
13) is selected. Here, the i-th context is Si.

【0075】処理802で、第iシンボルの符号化演算と正
規化処理が行われる。ここでは、LPSを符号化して正規
化が発生したものとする。第i+1シンボルに対しては第i
シンボルの符号化演算と同一サイクルで、Qe ROM702の
読み出しが実行される(処理804)。
In process 802, the encoding operation of the i-th symbol and the normalization process are performed. Here, it is assumed that the LPS is encoded and the normalization occurs. The i th symbol for the i + 1 th symbol
The Qe ROM 702 is read in the same cycle as the symbol encoding operation (process 804).

【0076】第i+1シンボルのコンテクストも同じくSi
であったとする。そうすると、第iシンボルでLPS正規化
が起きたので、セレクタ706では、LPS正規化で遷移する
先のQe値714が選択される。
The context of the i + 1th symbol is also Si
It was. Then, since LPS normalization has occurred at the i-th symbol, the selector 706 selects the Qe value 714 to which transition is made by LPS normalization.

【0077】処理805では、この値を使った符号化演算
が実行される。このとき処理803ではコンテクストRAM70
1のコンテクストSiの内容が更新される。
In process 805, an encoding operation using this value is executed. At this time, in the processing 803, the context RAM 70
Contents of context Si in 1 are updated.

【0078】更新処理は以下のように行われる。すなわ
ち、セレクタ707では、LPS正規化時の次の状態番号716
が選択される。一方、EOR回路708では、switch-MPS(信
号718)と現在の予測値MPS(Si)(信号723)から新しい
予測値(信号721)を作る。
The update process is performed as follows. That is, in the selector 707, the next state number 716 at the time of LPS normalization is set.
Is selected. On the other hand, the EOR circuit 708 creates a new prediction value (signal 721) from the switch-MPS (signal 718) and the current prediction value MPS (Si) (signal 723).

【0079】上述のとおり、信号718が“1”であればM
PS(Si)の値は反転する。これら2つの情報がコンテクス
トRAM701のアドレスSiに書かれる。
As described above, if the signal 718 is "1", M
The value of PS (Si) is inverted. These two pieces of information are written in the address Si of the context RAM 701.

【0080】このときアドレスSiは、遅延回路712から
信号724として出力されている。この更新処理のタイミ
ングで、第i+2シンボルに対しては、Qe ROM702を読む必
要がある。
At this time, the address Si is output as the signal 724 from the delay circuit 712. At the timing of this update processing, it is necessary to read the Qe ROM 702 for the (i + 2) th symbol.

【0081】この時、第i+2シンボルも同じコンテクス
トSiであればセレクタ704、705は下側の信号が選ばれる
ように制御する。その理由は、上述のとおり、処理805
で正規化が再度発生するかもしれないからである。Siの
コンテクスト情報の更新が終了したら 、セレクタ704
、705の上側の信号が選ばれる。
At this time, if the i + 2th symbol also has the same context Si, the selectors 704 and 705 control so that the lower signal is selected. The reason is, as described above, the processing 805.
This is because normalization may occur again in. After updating the Si context information, select 704
, The signal above 705 is selected.

【0082】第i+3シンボルに対してはこのサイクルで
コンテクストRAMのリードを行う(処理808)。先に説明
したとおり、第i+3シンボルのコンテクストがSiと異な
りSjであれば、デュアルポートROM701に対するコンテク
ストのリードとコンテクストSiの更新は、同時に実行さ
れる。
The context RAM is read in this cycle for the (i + 3) th symbol (process 808). As described above, if the context of the i + 3th symbol is Sj, which is different from Si, the reading of the context to the dual port ROM 701 and the updating of the context Si are executed at the same time.

【0083】第i+3シンボルのコンテクストがSiであれ
ば処理803でその内容が更新される。この時、セレクタ7
04 、705では下側の信号が選択されている。
If the context of the (i + 3) th symbol is Si, its contents are updated in processing 803. At this time, selector 7
For 04 and 705, the lower signal is selected.

【0084】このようにして正規化が発生したコンテク
ストで連続して符号化する場合も従来例のような無効サ
イクルは発生せず、パイプラインが乱れることはない。
したがって、いかなる画像パターンに対しても1シンボ
ルを1クロックで連続して符号化することができる。
Even when encoding is performed continuously in the context in which normalization has occurred in this way, an invalid cycle as in the conventional example does not occur and the pipeline is not disturbed.
Therefore, one symbol can be continuously encoded with one clock for any image pattern.

【0085】図9に、本発明の効果を裏付ける実験(コ
ンピュータシミュレーション)結果を示す。
FIG. 9 shows the results of an experiment (computer simulation) that supports the effect of the present invention.

【0086】パイプラインの乱れが発生しやすいのは、
正規化の頻度もコンテクストの連続性も共に高い画像パ
ターンである。文書画像ではコンテクストが連続する場
合は多いが正規化はあまり発生しない。逆に黒率50%近
いランダム画像では正規化は頻繁に起こるがコンテクス
トの連続性はほとんどない。そうすると、中間点である
圧縮率0.5近辺の画像パターンで、パイプラインの乱れ
が発生しやすそうである。図9は、そのようなテスト画
像によるQM-coderの符号化シミュレーション結果であ
る。
Disturbances in the pipeline are apt to occur
The image pattern has a high frequency of normalization and a high degree of context continuity. In a document image, the context is often continuous, but normalization does not occur often. On the contrary, normalization occurs frequently in a random image with a black ratio of about 50%, but there is almost no context continuity. Then, in the image pattern near the compression rate of 0.5, which is the midpoint, the pipeline is likely to be disturbed. FIG. 9 is a QM-coder encoding simulation result using such a test image.

【0087】図9では、1ライン毎に1シンボルが何サ
イクルで符号化できたかをプロットしている。上側の特
性線Aが従来例、下側の特性線Bが本発明によるデータ
を示している 。
In FIG. 9, the number of cycles in which one symbol can be encoded per line is plotted. The upper characteristic line A shows the conventional example, and the lower characteristic line B shows the data according to the present invention.

【0088】このシミュレーション結果から明らかなよ
うに、従来例では、1.1サイクル/シンボルを超えるこ
ともあることがわかる。これは、100MHzのクロックで動
かしても90Mシンボル/秒程度に処理能力が低下するこ
とを意味する。一方、本発明による符号器では、画像パ
ターンによらず、いかなる場合も100Mシンボル/秒の処
理能力が得られることが分かる。
As is clear from the results of this simulation, it can be seen that the number of cycles exceeds 1.1 cycles / symbol in the conventional example. This means that the processing capacity will drop to about 90 Msymbols / second even if it is operated with a 100 MHz clock. On the other hand, it can be seen that the encoder according to the present invention can obtain a processing capability of 100 M symbols / sec in any case regardless of the image pattern.

【0089】以上説明した本発明の符号化の主要な手順
をまとめると、図7に示すようになる。
The main procedure of the encoding of the present invention described above is summarized as shown in FIG.

【0090】すなわち、現在のQeと、MPS符号化で正規
化処理が発生したならば出力されるであろうQe(next Q
e)と、LPS符号化で正規化処理が発生したならば出力さ
れるであろうQe(next Qe)と、を並列に出力する(ス
テップ30)。
That is, the current Qe and the Qe (next Qe that will be output if normalization processing occurs in MPS encoding)
e) and Qe (next Qe) that would be output if the normalization processing occurred in LPS encoding are output in parallel (step 30).

【0091】そして、正規化が発生し、かつ次のコンテ
クストも同じであるときには(ステップ31)、MPSの符
号化による正規化であるか、LPSの符号化による正規化
であるかに応じて、未来のQe(next Qe)のうちのいず
れかを選択する(ステップ32)。正規化が発生しない
場合には、現在のQeを選択する(ステップ33)。
Then, when normalization occurs and the next context is also the same (step 31), depending on whether the normalization is by MPS coding or LPS coding, Any one of future Qe (next Qe) is selected (step 32). If no normalization occurs, the current Qe is selected (step 33).

【0092】(比較例)本発明を使用しない場合のタイ
ミングチャートを図33および図34に示す。正規化が発生
しない場合には、図33のようにパイプライン処理がなさ
れるが、正規化が発生してQe ROMの更新が必要になる
と、図34のステップ2002のように、無効なサイクルが発
生し、ここで、パイプラインが乱れる。
Comparative Example Timing charts when the present invention is not used are shown in FIGS. 33 and 34. When normalization does not occur, pipeline processing is performed as shown in FIG. 33. However, when normalization occurs and Qe ROM needs to be updated, an invalid cycle is generated as in step 2002 of FIG. 34. Occurs, where the pipeline is disturbed.

【0093】これに対し本発明では、図35のステップ21
08〜2110のように、パラレルにQeを生成し、正規化発生
のときには、いずれかをセレクタで選べばよいので、パ
イプラインの乱れは生じない。
On the other hand, in the present invention, step 21 in FIG.
As in 08 to 2110, Qe is generated in parallel, and when normalization occurs, one of them can be selected by the selector, so that the pipeline is not disturbed.

【0094】以上が、算術符号化処理における高精度な
パイプライン制御の説明である。
The above is the description of the highly accurate pipeline control in the arithmetic coding process.

【0095】次に、算術復号処理について、図4〜図8
および図8を参照して説明する。(算術復号処理につい
て)本発明の2値データの算術復号器の一例が図4に示
される。
Next, the arithmetic decoding process will be described with reference to FIGS.
And it demonstrates with reference to FIG. (Regarding Arithmetic Decoding Process) An example of the binary data arithmetic decoder of the present invention is shown in FIG.

【0096】復号器も1サイクルで1シンボルを連続的に
復号化する構成である。すなわち、符号器と同じく、コ
ンテクスト生成,コンテクストインデックスの出力,コ
ンテクストRAMの読み出し、Qe ROMの読み出し、復号化
演算処理の順に、5段のパイプライン処理を実行する。
The decoder is also configured to continuously decode one symbol in one cycle. That is, like the encoder, it executes five stages of pipeline processing in the order of context generation, context index output, context RAM reading, Qe ROM reading, and decoding operation processing.

【0097】算術復号は、入力された符号が、分割され
た数直線上でMPSに属するかLPSに属するかを判定し、そ
のときのMPS、LPSが”1”、”0”のどちらかを知るこ
とにより、復元対象となるシンボル(復元シンボル)を
復元する。
Arithmetic decoding determines whether the input code belongs to MPS or LPS on the divided number line, and determines whether MPS or LPS at that time is "1" or "0". By knowing, the symbol to be restored (restored symbol) is restored.

【0098】そして、その復元されたシンボルは、次に
入力される符号を復号化するための参照画素として利用
される。通常、このような手法による1シンボルの復元
には、4クロック以上が必要であり、このままでは、パ
イプライン処理を実現できない。符号化の場合と異な
り、復号化の場合には、処理対象の画素の値は、実際に
復号が終了するまで不明であり、画素の復元を待って、
復元画素を参照画素として用いて符号化(Qeの生成)を
行なうしかないため、どうしてもステップ数が多くなる
のである。
Then, the restored symbol is used as a reference pixel for decoding the next input code. Usually, four clocks or more is required to restore one symbol by such a method, and pipeline processing cannot be realized as it is. Unlike the case of encoding, in the case of decoding, the value of the pixel to be processed is unknown until the decoding actually ends, and after the restoration of the pixel,
Since there is no choice but to perform encoding (generation of Qe) using the restored pixel as a reference pixel, the number of steps inevitably increases.

【0099】そこで、本実施の形態では、まず、符号化
の場合と同様の考え方(未来を予測して先回りをして並
列出力する考え方)を復号化にも導入する。
Therefore, in the present embodiment, first, the same idea as that in the case of encoding (the idea of predicting the future and outputting in parallel in advance) is also introduced in decoding.

【0100】すなわち、2値算術符号の場合、復元シン
ボルは”1”または”0”しかないため、現在、復元し
ているシンボルが”1”である場合と”0”である場合
の双方を想定して、それぞれの場合について、次のシン
ボル(一つ先のシンボル)を復元するためのQeを、現在
のシンボルの復元中に、同時に出力してしまう。すなわ
ち、Qe ROMを2つ設けて、それぞれを同時に動作させ
る。そして、現在のシンボルについての復元結果に応じ
て、いずれかのQeを選択する。
That is, in the case of binary arithmetic code, since the restored symbol is only "1" or "0", both the case where the currently restored symbol is "1" and the case where it is "0" are Assuming that, in each case, Qe for restoring the next symbol (one symbol ahead) is output at the same time during the restoration of the current symbol. That is, two Qe ROMs are provided and they are operated simultaneously. Then, depending on the restoration result for the current symbol, any Qe is selected.

【0101】同じく、次の次に復元するべきシンボル
(二つ先のシンボル)を復元するために必要な、コンテ
クストRAMからのリードも、現在のシンボルの復元中
に、同時に実行してしまう。
Similarly, the read from the context RAM necessary for restoring the symbol to be restored next (symbol of two destinations) is simultaneously executed during the restoration of the current symbol.

【0102】このとき、現在復元中のシンボルが”0”
で次のシンボルが”1”の場合と、現在のシンボルが”
0”で次のシンボルが”0”の場合と、現在のシンボル
が”1”で次のシンボルが”1”の場合と、現在のシン
ボルが”1”で次のシンボルが”0”の場合の4つが想
定されるため、コンテキストRAM(デュアルポートメモ
リ)を4つ設けて、これらを同時に動作させる。
At this time, the symbol currently being restored is "0".
When the next symbol is "1" and the current symbol is "
When 0 and the next symbol is “0”, when the current symbol is “1” and the next symbol is “1”, and when the current symbol is “1” and the next symbol is “0” Therefore, four context RAMs (dual port memories) are provided and they are operated simultaneously.

【0103】また、次の次の次のシンボル(3つ先のシ
ンボル)を復元するために必要な4系統のコンテクスト
インデックス(S)のそれぞれを、4つのコンテキストR
AM(デュアルポートメモリ)の入力ポートに、同時に入
力してライトする。
In addition, each of the four context indexes (S) necessary to restore the next next next symbol (three symbols ahead) is converted into four contexts R.
Write to the input ports of AM (dual port memory) at the same time.

【0104】この場合に想定される4つの状態は、一つ
先のシンボルが”0”で2つ先のシンボルが”1”の場
合と、一つ先のシンボルが”0”で二つ先のシンボル
が”0”の場合と、一つ先のシンボルが”1”で二つ先
のシンボルが”1”の場合と、一つ先のシンボルが”
1”で二つ先のシンボルが”0”の場合の4つに大別さ
れる。
The four states assumed in this case are the case where the first symbol is "0" and the second symbol is "1", and the first symbol is "0" and the second symbol is two. Symbol is "0", one symbol ahead is "1" and two symbol ahead is "1", and one symbol ahead is "
When the symbol is "1" and the second symbol is "0", it is roughly classified into four.

【0105】このように、現在のシンボルを復元中に、
一つ先〜三つ先のシンボルの復元に必要な情報を先回り
して、並列に入出力しておき、復元結果が判明した時点
で、それに応じて、いずれかの出力を選択する、という
手法を採用することにより、算術復号処理もパイプライ
ン化することができる。
Thus, during restoration of the current symbol,
A method in which information necessary for the restoration of one-to-three symbols is advanced in advance, input / output in parallel, and when the restoration result is known, one of the outputs is selected according to the information. By adopting, the arithmetic decoding process can be pipelined.

【0106】しかし、符号化と同様に正規化が発生し、
かつコンテクストが連続したときには、パイプラインが
乱れることになる。よって、符号化の場合と同様に、現
在のいQeと更新後のQeとを並列に出力して、実際の復号
結果に応じていずれかを選択していく方式を採用する。
However, normalization occurs similarly to the encoding,
And when the context is continuous, the pipeline is disturbed. Therefore, as in the case of encoding, a method is adopted in which the current Qe and the updated Qe are output in parallel and either is selected according to the actual decoding result.

【0107】以下、具体的に説明する。A detailed description will be given below.

【0108】上述のように、1サイクルで連続的に復号
化するには、i番目の画素が確定する以前に、次のi+1番
目の画素の復号化処理に入る必要がある。そのために
は、i番目の画素が“0”と“1”の場合に分けた並列処
理を行う必要がある。同様に、i+2番目の画素もi+1番目
の画素の値毎に並列処理が行われる。これら並列処理の
内容はパイプラインの構成によって決まる。
As described above, in order to continuously perform decoding in one cycle, it is necessary to start the decoding process for the next i + 1-th pixel before the i-th pixel is determined. For that purpose, it is necessary to perform the parallel processing separately when the i-th pixel is “0” and “1”. Similarly, the i + 2 th pixel is also subjected to parallel processing for each value of the i + 1 th pixel. The contents of these parallel processes are determined by the pipeline configuration.

【0109】図4では、2つのQe ROM913、914を同時に
動作させ、また、4つのコンテクストRAM905、906、90
7、908を同時に動作させる。そして、算術復号演算器91
7の復元シンボルの値(1または0)を選択制御信号と
しても用いて、セレクタ909、910、911、912、915、916
を切り替えて、復元されたシンボルに対応する出力を、
適宜、選択する構成となっている。
In FIG. 4, two Qe ROMs 913 and 914 are simultaneously operated, and four context RAMs 905, 906 and 90 are also used.
Operate 7 and 908 at the same time. Then, the arithmetic decoding calculator 91
The value (1 or 0) of the restored symbol of 7 is also used as the selection control signal to select the selectors 909, 910, 911, 912, 915, 916.
To output the output corresponding to the restored symbol,
The configuration is appropriately selected.

【0110】図5は、図4中の、Qe ROM913およびコン
テクストRAM905、906の周辺のみを抜き出して、より具
体的に示すブロック図である。図1と比較してみれば明
らかなように、回路の詳細な構成は、ほぼ同じである。
これは、復号化装置においても、符号化側と同様の符号
化動作を行なってMPS値とQeを生成し、それらを復号器
に供給していることからして、当然のことである。
FIG. 5 is a block diagram showing more specifically by extracting only the periphery of the Qe ROM 913 and the context RAMs 905 and 906 in FIG. As is clear from comparison with FIG. 1, the detailed configuration of the circuit is almost the same.
This is natural because the decoding apparatus also performs the same encoding operation as that on the encoding side to generate the MPS value and Qe and supplies them to the decoder.

【0111】図4の全体構成によれば、一応、復号器の
パイプライン化が可能となるが、正規化が発生し、かつ
コンテクストが連続するとパイプラインが乱れる。そこ
で、図5に示すように、現在のQeおよび更新後のQeの双
方を生成して出力し、実際の復号結果に応じて、いずれ
かのQeを選択するようにする。これにより、画像パター
ンや復号器の状態に関係なく、パイプラインの乱れが生
じない。
According to the overall configuration of FIG. 4, the decoder can be pipelined for the time being, but if normalization occurs and the context is continuous, the pipeline is disturbed. Therefore, as shown in FIG. 5, both the current Qe and the updated Qe are generated and output, and either Qe is selected according to the actual decoding result. As a result, the pipeline is not disturbed regardless of the image pattern and the state of the decoder.

【0112】図5に示される、Qe ROM913の出力信号と
セレクタ1008、1009の機能は、先に説明した符号化の場
合のセレクタと同じである。また、Qe ROM913の入力側
のセレクタ1003 、1004の機能も符号化と同じく、正規
化によるコンテクストRAMの更新時に同一コンテクスト
で復号化を行う時、下側の信号を選択するためのもので
ある。
The output signal of the Qe ROM 913 and the functions of the selectors 1008 and 1009 shown in FIG. 5 are the same as those of the selector in the case of encoding described above. Further, the functions of the selectors 1003 and 1004 on the input side of the Qe ROM 913 are also for selecting the lower signal when performing decoding in the same context when updating the context RAM by normalization, as in the case of encoding.

【0113】遅延回路901は、タイミング調整用の遅延
回路であり、正規化対象となるコンテクストインデック
スを、コンテクストRAMのアドレスとして出力するため
のものである。
The delay circuit 901 is a delay circuit for timing adjustment, and outputs the context index to be normalized as an address of the context RAM.

【0114】このように復号器を構成すると、正規化が
発生したコンテクストで連続して復号化する場合も、無
効サイクルは発生せずパイプラインが乱れることはない
。したがって、いかなる画像パターンに対しても1シン
ボルを1クロックで連続して復号化することができる
When the decoder is constructed as described above, no invalid cycle occurs and the pipeline is not disturbed even when decoding is performed continuously in the context where the normalization has occurred. Therefore, for any image pattern, one symbol can be continuously decoded with one clock.

【0115】図4の算術復号器の基本的な動作を、図6
のタイミングチャートを用いて具体的に説明する。
The basic operation of the arithmetic decoder of FIG. 4 is shown in FIG.
This will be specifically described with reference to the timing chart of.

【0116】第iシンボルの復号時(処理1100)、第i+1
シンボル(1つ先の復元シンボル)に対しては第iシン
ボルが“0”の場合と“1”の場合を想定し並行してQe R
OM913、914の読み出しを行う(処理1101、1102)。
At the time of decoding the i-th symbol (process 1100), the i + 1-th
For the symbol (the restored symbol one step ahead), assume that the i-th symbol is "0" and "1", and in parallel Qe R
The OM913 and 914 are read (processing 1101 and 1102).

【0117】また、同時に、第i+2シンボル(2つ先の
復元シンボル)に対しては、第iシンボルと第i+1シンボ
ルの組み合わせ4通りについて、コンテクストRAM905〜
908の読み出しを行う(処理1104〜1107)。
At the same time, for the (i + 2) th symbol (restored symbol that is two steps ahead), the context RAMs 905 to
908 is read (processing 1104-1107).

【0118】また同時に、第i+3シンボルに対しては、
図10の参照画素の配置からまだ復元されていない第i+1
シンボルと第i+2シンボルの値を想定して4通りのコン
テクストインデックスを生成している 。
At the same time, for the (i + 3) th symbol,
I + 1th not yet restored from the arrangement of reference pixels in FIG.
Four kinds of context indexes are generated assuming the value of the symbol and the i + 2nd symbol.

【0119】なお、参照画素の配置が復号化ライン上で
左に伸びている場合には、算術復号演算器のパイプライ
ンステージからn段離れたパイプラインステージでは2
のn乗個のデータの並列処理が行われ、これらの並列デ
ータが第iシンボルの復号化によってシンボルが確定す
ると、それらの中から一つが選択され、次のパイプライ
ンステージに送られるという構成となる 。
When the arrangement of the reference pixels extends to the left on the decoding line, the number is 2 in the pipeline stage n stages away from the pipeline stage of the arithmetic decoding arithmetic unit.
N pieces of data are processed in parallel, and when these parallel data are symbolized by decoding the i-th symbol, one of them is selected and sent to the next pipeline stage. Become .

【0120】次に、図5に示される具体的な回路につい
ても、動作の説明を行なう。ここでは、算術復号演算器
917(図4)で第iシンボルの復号化処理を実行している
ものとして 、その時点を基準にして動作を説明する。
Next, the operation of the specific circuit shown in FIG. 5 will be described. Here, the arithmetic decoding unit
Assuming that the decoding process of the i-th symbol is being executed in 917 (FIG. 4), the operation will be described with reference to that time point.

【0121】このタイミングでは、コンテクスト生成器
900は、第i+3画素の復号化用にコンテクストインデック
スSi+3を生成する。
At this timing, the context generator
The 900 generates a context index Si + 3 for decoding the i + 3rd pixel.

【0122】図5において、第iシンボルをDiとする
と、Si+3はDi+1、Di+2の組み合わせから4通りとなる。
それを例えばSi+3(Di+2=0/Di+1=0)のように表す。これ
はDi+2シンボルと第Di+1シンボルがともに“0”を想定
した第i+3シンボルのコンテクストインデックスを表
す。参照符号901〜904は、正規化対象となるコンテクス
トインデックスをコンテクストRAMに出力するための遅
延回路である。参照符号905〜908はコンテクストRAMで
ある。
In FIG. 5, when the i-th symbol is Di, Si + 3 has four combinations from Di + 1 and Di + 2.
It is represented as, for example, Si + 3 (Di + 2 = 0 / Di + 1 = 0). This represents the context index of the i + 3th symbol in which both the Di + 2 symbol and the Di + 1th symbol are assumed to be “0”. Reference numerals 901 to 904 are delay circuits for outputting the context index to be normalized to the context RAM. Reference numerals 905 to 908 are context RAMs.

【0123】一つ一つは、符号化用と同じ構成である。
コンテクストRAM905、906の出力は第i+2シンボルの復号
化のためのQe ROMの状態番号である。ここで、記号Qe-i
ndexi+2(Di+1=0/Di=0)は第iシンボルと第i+1シンボルが
ともに“0”の場合を想定したQe-indexを示す。他も同
様である。MPSi+2は、第i+2シンボルの予測値である。
想定条件は、対応するQe-indexのそれと同じなので省略
している。
Each one has the same structure as that for encoding.
The outputs of the context RAMs 905 and 906 are the state numbers of the Qe ROM for decoding the i + 2th symbol. Where the symbol Qe-i
ndexi + 2 (Di + 1 = 0 / Di = 0) indicates the Qe-index assuming that the i-th symbol and the i + 1-th symbol are both “0”. Others are the same. MPSi + 2 is the predicted value of the i + 2th symbol.
Assumptions are omitted because they are the same as those of the corresponding Qe-index.

【0124】セレクタ909〜セレクタ912は、復元シンボ
ルDiの値によって入力信号を選択する。Diが復号化さ
れ、値が“0”であれば、セレクタの上側の信号が選択
される。その結果、例えば、セレクタ909の出力には、D
i+1復元用のQe-indexが選らばれる。同様に、セレクタ9
10の出力には、Di=0の場合のDi+1の予測値MPSi+1(Di=0)
が選らばれる 。
The selectors 909 to 912 select the input signal according to the value of the restored symbol Di. If Di is decoded and the value is “0”, the signal above the selector is selected. As a result, for example, D
Qe-index for i + 1 restoration is selected. Similarly, selector 9
The output of 10 is the predicted value of Di + 1 when Di = 0 MPSi + 1 (Di = 0)
Is selected.

【0125】Qe ROM913の出力には、Di+1を復元するた
めのQe値が出力する。これをQei+1(Di=0)とする。この
信号は、符号化同様に3種類のQe値が含まれている。複
雑になるのでそれらをまとめて表現している。
The Qe value for restoring Di + 1 is output to the output of the Qe ROM 913. This is Qei + 1 (Di = 0). This signal contains three types of Qe values as in the case of encoding. Since they are complicated, they are expressed together.

【0126】セレクタ915では、Qei+1(Di=0)とQei+1(Di
=1)がDiの値によって選択され、セレクタ916出力のMPS
iと合わせて算術復号演算器917に入力され、Diの復号化
後Di+1の復号化が実行される。セレクタの選択信号など
の制御信号は、制御回路918によって各部に供給されて
いる 。
In the selector 915, Qei + 1 (Di = 0) and Qei + 1 (Di
= 1) is selected by the value of Di, and the MPS of the selector 916 output
It is input to the arithmetic decoding calculator 917 together with i, and the decoding of Di + 1 is executed after the decoding of Di. A control signal such as a selector selection signal is supplied to each unit by the control circuit 918.

【0127】以上説明した本発明の算術復号方法のパイ
プライン化の主要な手順をまとめると、図8に示すよう
になる。
The main steps of pipeline processing of the arithmetic decoding method of the present invention described above are summarized in FIG.

【0128】すなわち、一つ先のシンボル、2つ先のシ
ンボル(3つ先のシンボルについても同様)のそれぞれ
について先行して処理を行ない、実際に取り得る状態の
各々に対応した情報(確率推定値)を並列に出力する
(ステップ40)。
That is, the preceding symbol, the preceding symbol, and the preceding symbol (the same applies to the preceding symbol) are processed in advance to obtain information (probability estimation) corresponding to each of the states that can be actually taken. Values) are output in parallel (step 40).

【0129】そして、実際の復号結果を用いて、セレク
タを制御し、並列に出力されている情報のうちの一つを
選択する(ステップ41)。
Then, using the actual decoding result, the selector is controlled to select one of the information output in parallel (step 41).

【0130】そして、正規化処理が生じ、かつコンテク
ストが同一の場合におけるパイプラインの乱れを防止す
るべく、各状態(コンテクスト)に対応した各確率推定
値の生成の際に、図7に示した、算術符号化の場合と同
様の手法を実行する。
Then, in order to prevent the disturbance of the pipeline in the case where the normalization process occurs and the contexts are the same, the probability estimation value corresponding to each state (context) is generated as shown in FIG. , Perform the same method as in the case of arithmetic coding.

【0131】なお、以上の説明では確率推定テーブルを
ROMで構成する例を述べたがRAMで構成してもよい。ま
た、QM-coderに限らず、コンテクスト毎に確率推定値を
適応的に更新しながら符号器に供給して動作する符号化
復号化装置には、本発明と同様の考えを適用することが
できる。
In the above description, the probability estimation table is
Although the example of configuring with ROM has been described, it may be configured with RAM. Further, not limited to the QM-coder, the same idea as the present invention can be applied to a coding / decoding device that operates by supplying to the encoder while adaptively updating the probability estimation value for each context. .

【0132】以上の説明では、画像の符号化を例に説明
した。しかし、このような符号器、復号器は画像データ
以外のデータ圧縮全般に適用できる。また、確率推定RO
Mを1個で構成する必要もなく、複数個で構成し、出力デ
ータが実施例のようになるようにしてもよい。また、Qe
ROMと同様の機能を、DSP等によるリアルタイム演算で
実現することも可能である。
In the above description, the image coding is described as an example. However, such an encoder and a decoder can be applied to general data compression other than image data. Also, the probability estimation RO
It is not necessary to form one M, but a plurality of M may be used and the output data may be as in the embodiment. Also, Qe
It is also possible to realize the same function as ROM by real-time calculation by DSP.

【0133】また、上述の実施の形態では、パイプライ
ンの乱れを完全に防止する例について説明しているが、
多少の乱れは生じても、未来予測による複数の情報の並
列出力・選択の手法によって、パイプラインの乱れを低
減することも、当然ながら可能である。
Further, in the above-mentioned embodiment, an example of completely preventing the disturbance of the pipeline is explained.
Even if some turbulence occurs, it is naturally possible to reduce the turbulence of the pipeline by a method of parallel output / selection of a plurality of information by future prediction.

【0134】以上説明した本発明の算術符号・復号器
は、図49に示すような、複合機(スキャナー、ファクシ
ミリ装置、コピー機の機能を併せ持つ装置)に搭載する
のに適している。すなわち、画像を読み取って一時的に
メモリに蓄積するような用途、例えばスキャナやFAX、
複合機などにQM-coderを適用するには、スキャナやプリ
ンタの高速化に伴って高速処理が要求される。本発明を
適用すれば、どのような画像であっても、パイプライン
処理が乱れることがなく、非常に高速な符号・復号化を
行なうことができる。
The arithmetic code / decoder of the present invention described above is suitable for mounting on a multi-function machine (a device having the functions of a scanner, a facsimile machine and a copying machine) as shown in FIG. That is, applications such as scanning images and temporarily storing them in memory, such as scanners and fax machines,
In order to apply QM-coder to multi-function peripherals, high speed processing is required as the speed of scanners and printers increases. If the present invention is applied, pipeline processing is not disturbed for any image, and very high-speed encoding / decoding can be performed.

【0135】図49の複合機は、ホストプロセッサ102
と、MH等の符号化回路103と、画像処理回路104と、QM
符号/符号化回路105と、画像ラインメモリ106と、符号
メモリ107と、モデムなどの通信インタフェース108と、
スキャナなどの画像入力装置111と、プリンタなどの画
像記録/表示装置112と、を有している。本発明の算術
符号・復号器は、QM符号/符号化回路105に搭載され
る。
The multifunction machine shown in FIG. 49 is the host processor 102.
An encoding circuit 103 such as MH, an image processing circuit 104, a QM
An encoding / encoding circuit 105, an image line memory 106, an encoding memory 107, a communication interface 108 such as a modem,
An image input device 111 such as a scanner and an image recording / display device 112 such as a printer are included. The arithmetic code / decoder of the present invention is mounted on the QM code / coding circuit 105.

【0136】以上が、2値データについての算術符号化
・復号化処理の説明である。
The above is the description of the arithmetic coding / decoding processing for binary data.

【0137】(実施の形態2)本実施の形態では、図10
〜18を参照して、多値データのパイプライン算術符号化
・復号化処理について説明する。
(Embodiment 2) In the present embodiment, FIG.
The pipeline arithmetic encoding / decoding processing of multi-valued data will be described with reference to FIGS.

【0138】(多値画像データも連続して符号化するた
めに必要なコンテクスト生成器の構成)2値画像データ
のみならず、多値画像データも符号化の対象とする場合
でも、符号器の全体のブロック構成は、図1に示すもの
と同じである。つまり、2値画像の符号化であろうと、
多値画像の符号化であろうと、図1を用いて説明したブ
ロック構成を用いてパイプライン符号化を行うことがで
きる。つまり、算術符号・復号演算は共通である。
(Construction of Context Generator Necessary for Continuously Encoding Multi-Valued Image Data) Not only binary image data but also multi-valued image data is the object of encoding, the encoder The overall block configuration is the same as that shown in FIG. In other words, whether it is the coding of a binary image,
Regardless of the encoding of a multi-valued image, pipeline encoding can be performed using the block configuration described with reference to FIG. That is, the arithmetic coding / decoding operation is common.

【0139】ただし、多値画像データの連続した符号化
(ハザードレスのパイプライン符号化)を行うために
は、2値画像の場合と同様に、連続してコンテクストを
生成することが必要となる。逆にいえば、コンテクスト
インデックスを連続して生成できれば、パイプラインハ
ザードなしに、連続してシンボルの符号化や復号化が実
現できる。したがって、図1において、コンテクスト生
成器700の内部構成をそのように構築するかが問題とな
る。
However, in order to perform continuous encoding of multi-valued image data (hazardless pipeline encoding), it is necessary to continuously generate contexts as in the case of a binary image. . Conversely, if the context indexes can be continuously generated, symbol coding and decoding can be continuously realized without pipeline hazard. Therefore, in FIG. 1, how to construct the internal structure of the context generator 700 as such becomes a problem.

【0140】図10は、符号化時においてコンテクストを
連続して生成する機能をもつ、コンテクスト生成器の構
成例を示すブロック図である。
FIG. 10 is a block diagram showing an example of the structure of a context generator having a function of continuously generating contexts at the time of encoding.

【0141】図10では、画像データを2次元離散コサイ
ン変換器740にて周波数成分のデータに変換し、これを
量子化器741で量子化して、直流成分(DC成分)および
交流成分(AC成分)が得られる。このようにして得られ
たDCT変換係数(直交変換係数)やフラグ情報などの数
値データ(多値データ)が算術符号化の対象である。
In FIG. 10, image data is converted into frequency component data by a two-dimensional discrete cosine transformer 740, which is quantized by a quantizer 741 to obtain a direct current component (DC component) and an alternating current component (AC component). ) Is obtained. Numerical data (multi-valued data) such as DCT transform coefficients (orthogonal transform coefficients) and flag information obtained in this way are targets of arithmetic coding.

【0142】ただし、2値画像データも入力される可能
性があるため、セレクタ406が、まず、入力されるデー
タが2値画像データであるか、あるい多値データ(具体
的には直交変換係数)であるかを判別する。そして、直
交変換係数の場合には、そのデータはフォーマット変換
器/EOB検出器407に送られ、2値画像データの場合に
は、そのデータはJBIGコンテクスト生成器410に送られ
る。
However, since binary image data may also be input, the selector 406 first determines whether the input data is binary image data or multivalued data (specifically, orthogonal transform). Coefficient). Then, in the case of the orthogonal transform coefficient, the data is sent to the format converter / EOB detector 407, and in the case of the binary image data, the data is sent to the JBIG context generator 410.

【0143】JBIGコンテクスト生成器410は既に説明し
た2値画像符号化用のコンテクスト生成器である。
The JBIG context generator 410 is the context generator for binary image coding already described.

【0144】このコンテクスト生成器700からは、符号
化シンボルと、コンテクストの識別インデックスが出力
される。セレクタ411、412は、数値データの符号化コン
テクスト情報と2値画像符号化コンテクスト情報を選択
する。選択条件は2値画像を符号化するか数値データを
符号化するかである。
The context generator 700 outputs a coded symbol and a context identification index. The selectors 411 and 412 select the encoded context information of the numerical data and the binary image encoded context information. The selection condition is whether to encode a binary image or numeric data.

【0145】以下、多値データの符号化について(すな
わち、図10のフォーマット変換器/EOB検出器407と、2
値分解処理回路408と、多値データ符号化コンテクスト
生成器409の構成や機能について)、具体的に説明す
る。
Hereinafter, the encoding of multi-valued data (that is, the format converter / EOB detector 407 of FIG.
Configurations and functions of the value decomposition processing circuit 408 and the multi-valued data encoding context generator 409) will be specifically described.

【0146】数値データは、JPEG規格による、8x8画素
をブロックとした直交変換係数(DCT変換係数)である
として以下説明する。なお、それ以外の多値データの場
合も同様であり、一般性を失うものではない。
Numerical data will be described below assuming that they are orthogonal transform coefficients (DCT transform coefficients) in blocks of 8 × 8 pixels according to the JPEG standard. The same applies to other multi-valued data, and the generality is not lost.

【0147】直交変換係数は、セレクタ406を介してフ
ォーマット変換器/EOB検出器407に入る。ここで、後の
処理に都合がいいようなデータ形式にフォーマット変換
される。ここで、”EOB符号”の位置も検出する。”EOB
符号”とは、変換係数を予め定めた順に並べたときに、
ブロックの最後の部分に並ぶゼロの開始位置を示すシン
ボルである。JPEGでは量子化後の変換係数は低周波から
高周波成分に向かってジグザグにスキャンする。高周波
成分は比較的粗く量子化するので、ブロックの後ろの方
ではゼロが並ぶことになる。これを一つのシンボルと見
なして符号化すると圧縮効果が上がることが知られてい
る。
The orthogonal transform coefficient enters the format converter / EOB detector 407 via the selector 406. Here, the format is converted into a data format convenient for the subsequent processing. Here, the position of the "EOB code" is also detected. "EOB
“Sign” means that when the transform coefficients are arranged in a predetermined order,
It is a symbol that indicates the start position of the zero lined up at the end of the block. In JPEG, the quantized transform coefficients are scanned in a zigzag manner from low frequencies to high frequencies. Since the high frequency components are quantized relatively coarsely, zeros will be arranged in the back of the block. It is known that if this is regarded as one symbol and encoded, the compression effect is improved.

【0148】フォーマット変換器/EOB検出器407の出力
は、1つの数値が16ビットデータで表現され次のように
構成されている。 (1)ビット15:EOB識別ビット (2)ビット14:DC/AC識別ビット (3)ビット13:+/−識別ビット (4)ビット12〜0:数値の絶対値を表すバイナリデー
タ ”EOB識別ビット”は、その数値データがEOBシンボルか
どうかを示す。つまり、その数値以降がすべてゼロであ
るかどうかを表す。
The output of the format converter / EOB detector 407 is such that one numerical value is represented by 16-bit data and is constructed as follows. (1) Bit 15: EOB identification bit (2) Bit 14: DC / AC identification bit (3) Bit 13: +/- identification bit (4) Bits 12 to 0: Binary data "EOB identification that represents the absolute value of a numerical value" Bit "indicates whether the numerical data is an EOB symbol. In other words, it indicates whether or not all values after that number are zero.

【0149】”DC/AC識別ビット”は、その数値をDC成
分として符号化するか、AC成分として符号化すかを示
す。
The "DC / AC identification bit" indicates whether the numerical value is encoded as a DC component or an AC component.

【0150】”+/−識別ビット”は正負を示す。ま
た、ビット12〜0は数値の絶対値を表すバイナリデータ
である。多値画像を8ビット/画素とすると、DCT変換係
数の最大値は11ビットで表現できるので、この程度のビ
ット数があれば充分である。
The "+/- identification bit" indicates positive or negative. Bits 12 to 0 are binary data that represent the absolute value of a numerical value. If the multi-valued image has 8 bits / pixel, the maximum value of the DCT transform coefficient can be represented by 11 bits, so a bit number of this level is sufficient.

【0151】このようにしてフォーマット変換された直
交変換係数は、次に、2値分解処理回路408に入力され
る。
The format-converted orthogonal transform coefficient is then input to the binary decomposition processing circuit 408.

【0152】算術符号は、”1”または”0”を優勢シ
ンボルあるいは劣勢シンボルとして、出現確率を予測
し、推定がミスヒットした場合に、そのペナルティーと
して符号を生成するものである。したがって、多値デー
タを符号化するためには、何らかの手順により、多値デ
ータを”1”または”0”に分解する必要が生じる。こ
れが、2値分解処理である。
The arithmetic code predicts the appearance probability with "1" or "0" as the dominant symbol or the inferior symbol, and generates a code as the penalty when the estimation misses. Therefore, in order to encode the multi-valued data, it is necessary to decompose the multi-valued data into "1" or "0" by some procedure. This is the binary decomposition process.

【0153】図12は、図10に示すフォーマット変換器/
EOB検出器407および2進分解処理回路408の要部の構成を
示すブロック図である。2進分解処理は、数値データ
を”0”と”1”の2進系列に分解する処理である。ま
た、2値分解処理の処理手順が、図13に示される。
FIG. 12 shows the format converter /
3 is a block diagram showing the configuration of the main parts of an EOB detector 407 and a binary decomposition processing circuit 408. FIG. The binary decomposition process is a process that decomposes numerical data into binary sequences of "0" and "1". Further, the processing procedure of the binary decomposition processing is shown in FIG.

【0154】2値分解処理の基本は、あらかじめ順番が
決まっている質問(判断事項)を複数、用意しておき、
データが入力されると、その順番に従って質問をな
し、”yes”か”no”で分岐させ、その分岐を”
1”,”0”で表現することである。これにより、算術
符号化対象の2値シンボルが生成されることになる。復
号側が、どのような順番で、どのような質問(判断)が
なされるかを予め知っていれば、その符号の復号化が可
能である。
The basis of the binary decomposition process is to prepare a plurality of questions (judgements) whose order has been decided in advance,
When data is input, ask questions according to the order, branch with “yes” or “no”, and branch that branch.
This is expressed by 1 "and" 0 ". By this, a binary symbol to be arithmetically encoded is generated. The decoding side asks what kind of order and what kind of question (judgment). If it is known in advance, it is possible to decode that code.

【0155】ここで問題なのは、2値分解により得られ
た符号化シンボルを算術符号化する場合の、コンテクス
トをどのようにするかである。つまり、図10の多値デー
タ不符号化コンテクスト生成器409により、どのような
コンテクストを生成するかが問題となる。
The problem here is how to set the context when arithmetically coding the coded symbols obtained by the binary decomposition. That is, what kind of context is to be generated by the multi-valued data unencoded context generator 409 of FIG. 10 becomes a problem.

【0156】DCT変換係数には、DC成分とAC成分とがあ
り、それぞれが性質が異なるので、従来は、DC成分用の
コンテクストと、AC成分用のコンテクストと独立に設定
しなければならない、と考えられていた。
Since the DCT transform coefficient has a DC component and an AC component, and each has different properties, conventionally, it has been necessary to set the context for the DC component and the context for the AC component independently. Was being considered.

【0157】つまり、図42に示すように、DC成分用コン
テクストインデックス生成器3202と、AC成分用コンテク
ストインデックス生成器3203とを別々に設ける構成とす
るのが、当然と考えられていた。
That is, as shown in FIG. 42, it has been naturally considered that the DC component context index generator 3202 and the AC component context index generator 3203 are separately provided.

【0158】しかし、DC成分とAC成分のコンテクストが
異なる場合は、復元する2進データ列の中にはDCコンテ
クストに属するシンボルとACコンテクストに属するシン
ボルが混在するため、インデックスベクトルを状態遷移
テーブルに基づいて連続して出力することは困難であ
り、このことがパイプラインハザードの原因となる。
However, when the contexts of the DC component and the AC component are different, since the symbols belonging to the DC context and the symbols belonging to the AC context are mixed in the binary data string to be restored, the index vector is stored in the state transition table. It is difficult to output continuously based on this, which causes pipeline hazard.

【0159】つまり、図43(a)に示すように、コンテク
ストを切り替えるためには、そもそも、DC成分(あるい
はAC成分)の2進表現データと、次のDC成分(AC成分デ
ータ)の2進表現データとの境界を判定する必要があ
る。そして、図43(b)のように、コンテクストを生成
する際に、DCコンテクストのツリーからACコンテクスト
のツリーへの遷移が必要となる。
That is, as shown in FIG. 43 (a), in order to switch the context, in the first place, the binary representation data of the DC component (or AC component) and the binary representation of the next DC component (AC component data) are used. It is necessary to determine the boundary with the expression data. Then, as shown in FIG. 43 (b), when generating a context, it is necessary to make a transition from the tree of the DC context to the tree of the AC context.

【0160】したがって、データの復元の際、1つのシ
ンボルを復元する毎に、DC成分/AC成分の終わりを判定
する処理が必要となり、1シンボル当り、最低でも2サ
イクルかかることになり、これで1クロックで処理を完
了させるという、完全なパイプライン処理は不可能とな
ってしまう。また、コンテクストモデルが複数あると、
DC成分とAC成分の境目でパイプラインは初期状態から開
始するような回路構成にならざるを得ないだろう。この
ような復号器では高速処理は期待できない。また、この
ようにDCコンテクストとACコンテクストを持つ回路構成
では、回路規模は大きく、コンテクストの異なる成分間
における制御は煩雑になる。
Therefore, when the data is restored, it is necessary to determine the end of the DC component / AC component each time one symbol is restored, and at least two cycles are required for each symbol. Complete pipeline processing, which completes processing in one clock, becomes impossible. Also, if there are multiple context models,
At the boundary between the DC component and the AC component, the pipeline will have to have a circuit configuration that starts from the initial state. High speed processing cannot be expected with such a decoder. In addition, in the circuit configuration having the DC context and the AC context as described above, the circuit scale is large, and the control between the components having different contexts becomes complicated.

【0161】そこで、本発明では、敢えて、DC成分とAC
成分とを区別せず、双方の成分データに対し、共通のコ
ンテクストを割り当てる。このようにすれば、圧縮率は
やや劣化するものの、図43(a)に示すような、DC成分/A
C成分の終わりを判定する処理はまったく不要となる。
つまり、図44(a)に示すように、DC成分/AC成分の境界
を判定する必要がないため、図44(b)に示すように、
コンテクストのツリーは一つのツリーに統一化される。
Therefore, in the present invention, the DC component and AC
A common context is assigned to both component data without distinguishing between the components. If this is done, the compression rate will deteriorate slightly, but the DC component / A as shown in FIG.
The process of determining the end of the C component is completely unnecessary.
In other words, as shown in FIG. 44 (a), it is not necessary to determine the boundary between the DC component / AC component, so as shown in FIG. 44 (b),
The context tree is unified into one tree.

【0162】コンテクストが共通であれば、シンボルの
復元は連続的に実行可能であり、DC/AC信号の再構成処
理は復号動作とは別の回路で並行動作が可能となる。
If the contexts are common, the symbol restoration can be continuously executed, and the DC / AC signal reconstruction processing can be performed in parallel by a circuit different from the decoding operation.

【0163】以上が、図10のフォーマット変換器/EOB
検出器407と、2値分解処理回路408と、多値データ符合
化コンテクスト生成器409の、基本的な動作と特徴であ
る。
The above is the format converter / EOB of FIG.
The basic operation and characteristics of the detector 407, the binary decomposition processing circuit 408, and the multi-valued data coding context generator 409 are described.

【0164】次に、図12〜図14を用いて、各々について
具体的に説明する。
Next, each will be specifically described with reference to FIGS. 12 to 14.

【0165】図12は、図10に示される、フォーマット変
換器/EOB検出器407および2値分解処理器408の特徴的
な構成を示している。
FIG. 12 shows a characteristic configuration of the format converter / EOB detector 407 and the binary decomposition processor 408 shown in FIG.

【0166】図示されるように、主な構成要素は、レジ
スタ501と、予測変換器515と、2進情報に分解するため
の比較器506〜509と、2進情報を順次選択して符号化シ
ンボルを出力するためのセレクタ510である。
As shown in the figure, the main components are a register 501, a predictive converter 515, comparators 506 to 509 for decomposing into binary information, and binary information is sequentially selected and encoded. A selector 510 for outputting a symbol.

【0167】予測変換器515は、本実施の形態では、DC
成分に対して機能し、直前ブロックとの差分を出力す
る。差分をとるのは符号量を減少させるためであるが、
これに限定されるものではない。
The predictive converter 515 is a DC converter in this embodiment.
It works on components and outputs the difference from the previous block. The difference is taken to reduce the code amount, but
It is not limited to this.

【0168】本実施の形態では、DC成分とAC成分のコン
テクストモデルを同じにして、コンテクストインデック
スやコンテクストインデックスベクトルの生成がパイプ
ライン処理に適するように高速に実行できるようにする
ことが本質的なアイデアである。しかし、現状の構成で
はコンテクストを共通化、簡略化したことによって圧縮
率が多少低下するとう問題がある。これを改善するに
は、 DC成分、AC成分に対するより高度な予測技術を予
測変換器に導入すればよい。
In the present embodiment, it is essential to make the context models of the DC component and the AC component the same so that the generation of the context index or the context index vector can be executed at high speed so as to be suitable for pipeline processing. It's an idea. However, in the current configuration, there is a problem that the compression ratio is slightly reduced due to the commonality and simplification of the context. To improve this, more advanced prediction technology for DC and AC components can be introduced into the predictive converter.

【0169】レジスタ501は、符号化対象となるフラグ
や直交変換係数等1つの数値が入力する。各数値には上
記の識別情報と絶対値の2進データが含まれている。レ
ジスタ出力のうちEOB識別情報511と、+/-識別情報512と
は、セレクタ510に入る。数値の絶対値Vは減算器504とD
C信号用のレジスタ502に入力する。
The register 501 receives one numerical value such as a flag to be encoded or an orthogonal transform coefficient. Each numerical value includes the above identification information and absolute value binary data. Of the register outputs, the EOB identification information 511 and the +/- identification information 512 enter the selector 510. The absolute value of the number V is the subtractor 504 and D
Input to the register 502 for C signal.

【0170】DC成分は比較的予測しやすいので、直前ブ
ロックの対応するDC成分で予測し、予測誤差信号を符号
化する。AC成分はそのまま符号化する。
Since the DC component is relatively easy to predict, the DC component corresponding to the immediately preceding block is predicted and the prediction error signal is encoded. The AC component is encoded as it is.

【0171】DCレジスタ502は、1ブロックのDC値を記憶
する複数のレジスタから構成されている。これはDC成分
の差分値を計算するための遅延用レジスタである。AC/D
C成分識別信号によって、セレクタ503の入力を選択す
る。DC成分は上側、AC成分は下側の信号が選択される。
減算器504は絶対値を出力するものとし、DC成分に対し
てはVの差分であるΔVの絶対値、一方AC成分については
絶対値Vとなる。以下、これらを特に区別せず、ΔVと記
載する。
The DC register 502 is composed of a plurality of registers for storing the DC value of one block. This is a delay register for calculating the difference value of the DC component. AC / D
The input of the selector 503 is selected by the C component identification signal. The upper component is selected for the DC component and the lower component is selected for the AC component.
The subtractor 504 outputs an absolute value, which is the absolute value of ΔV which is the difference between V for the DC component and the absolute value V for the AC component. Hereinafter, these will be referred to as ΔV without being particularly distinguished.

【0172】差分値ΔVは、次に、2値分解処理器520に
入力される。そして、ΔVは更に、減算器505で、Sz =
ΔV(V)-1という信号に変換される。
The difference value ΔV is then input to the binary decomposition processor 520. Then, ΔV is further subtracted by the subtractor 505, Sz =
Converted to a signal of ΔV (V) -1.

【0173】比較器506は、ΔV(V)がゼロであるかどう
かを判定する。比較器507はSz > 0を判定する。比較器5
07〜比較器509では、Sz を表す最小の桁数nを判定して
いる。ここで、記号”**”はべき乗を表す。例えば、Sz
= 5とすると、Sz > 0、 Sz> 1、Sz > 3であるがSz > 7
= 2**3-1にはならないので、Szは4から7の範囲であ
ることが分かる。
The comparator 506 determines whether ΔV (V) is zero. The comparator 507 determines Sz> 0. Comparator 5
The 07-comparator 509 determines the minimum number of digits n representing Sz. Here, the symbol "**" represents exponentiation. For example, Sz
= 5, Sz> 0, Sz> 1, Sz> 3, but Sz> 7
= 2 ** 3-1, so Sz is in the range of 4 to 7.

【0174】この範囲をmagnitude category と呼ぶ。n
が3であることは、Szを2進数表現するとそれが3ビット
長であることを示している。信号514はSzの各ビットを
表す。これをmagnitude bitと呼ぶ。Sz = 5とすると、3
ビットとればよいので”101”が信号514である。以上の
2進分解情報によって数値を一意的に表現することがで
きる。セレクタ510は予め定めた符号化順に従って2進分
解情報を選択し符号化シンボルとして出力する。
This range is called a magnitude category. n
The fact that is 3 indicates that when Sz is expressed in binary, it has a length of 3 bits. Signal 514 represents each bit of Sz. This is called the magnitude bit. If Sz = 5, then 3
“101” is the signal 514 since it is sufficient to use bits. More than
Numerical values can be uniquely represented by binary decomposition information. Selector 510 selects binary decomposition information according to a predetermined encoding order and outputs it as an encoded symbol.

【0175】図13と図14によって、2進情報の符号化手
順とコンテクストを説明する。これらの図の表現方法は
著書W.B.Pennebaker and J.L.Mitchell、 "JPEG - S
tillImage Data Compression Standard、" New York: V
an Nostrand Reinhold、 1993 を参考にした。
The encoding procedure and context of binary information will be described with reference to FIGS. 13 and 14. The method of expressing these figures is described in the book WB. Pennebaker and J. L. Mitchell, "JPEG-S
tillImage Data Compression Standard, "New York: V
Referenced to an Nostrand Reinhold, 1993.

【0176】まず、図13の2値分解処理について具体的
に説明する。
First, the binary decomposition process of FIG. 13 will be specifically described.

【0177】まず、差分データΔV(V)が、EOB(DCおよ
びAC成分を含む周波数成分ブロックの全データがゼロで
ある)であるかどうかを調べ(ステップ601)、その結
果を符号化する。もし、yesなら、”1”を”EOB”とい
うインデックスで表現されるコンテクストで符号化し
て、符号化が終了する。”1”を”EOB”というインデ
ックスで表現されるコンテクストで符号化することを、
図中、1(EOB)と記す。
First, it is checked whether or not the difference data ΔV (V) is EOB (all data of the frequency component block including DC and AC components is zero) (step 601), and the result is encoded. If yes, "1" is encoded with the context represented by the index "EOB", and the encoding is completed. Encoding "1" in the context expressed by the index "EOB"
In the figure, it is written as 1 (EOB).

【0178】一方、ステップ601でEOBでなければ、”
0”を”EOB”というインデックスで表現されるコンテク
ストで符号化する。このことを、図中、0(EOB)と記す。
この表記は、以下、同様である。
On the other hand, if it is not EOB in step 601, then "
"0" is encoded by the context expressed by the index "EOB". This is described as 0 (EOB) in the figure.
This notation is the same below.

【0179】このように、各ステップで判断を行い、出
力が2つあるときは、右側がyesの判定、下側がnoの判
定の符号化を表す。従って、上述のとおり、ステップ60
1において、EOBであれば、1をEOBというコンテクスト
で符号化し符号化終了となる。そうでなければ、0をコ
ンテクストEOBで符号化する。
As described above, when the determination is made at each step and there are two outputs, the right side indicates the determination of yes, and the lower side indicates the determination of no. Therefore, as described above, step 60
If EOB in 1, the 1 is encoded in the context of EOB, and the encoding is completed. Otherwise, 0 is encoded in the context EOB.

【0180】次に、ステップ602において、差分データ
がΔV(V)がゼロであるかどうかを判定する。その判定結
果を、コンテクスト”S0”で符号化する。ΔV(V)がゼロ
であれば、この時点で符号化は終了し次の数値の符号化
が行われる。ΔV(V)がゼロでなければ、ステップ603に
移行し、正負(+または-)の符号を符号化する。このと
きのコンテクストは”S1”である。
Next, in step 602, it is judged whether or not ΔV (V) of the difference data is zero. The determination result is encoded in the context "S0". If ΔV (V) is zero, encoding ends at this point and the next numerical value is encoded. If ΔV (V) is not zero, the process proceeds to step 603, and positive / negative (+ or −) signs are encoded. The context at this time is "S1".

【0181】次に、ステップ604またはステップ605に移
行する。このステップ604では、差分データΔVの絶対
値が”1”より大きいか否かを判定する。つまり、Sz>0
であるかを判定し、その結果をコンテクストS2で符号化
する。
Then, the process proceeds to step 604 or step 605. In step 604, it is determined whether the absolute value of the difference data ΔV is larger than “1”. That is, Sz> 0
Then, the result is encoded in the context S2.

【0182】もしΔVが”1”でなければ、ステップ60
6において、ΔVの絶対値が”2”より大きいか否かを判
定する。つまり、Sz>1であるかを判定し、その結果
を、X1というコンテクストで符号化する。
If ΔV is not "1", step 60
At 6, it is determined whether the absolute value of ΔV is larger than “2”. That is, it is determined whether Sz> 1 and the result is encoded in the context of X1.

【0183】もし、Sz>1(ΔVの絶対値が”2”)でな
ければ、ステップ607において、ΔVの絶対値が3または
4であるか、あるいは、4より大きいかを判定する。つま
り、Sz>3であるか否かを判定し、その結果を、コンテク
ストX2で符号化する。
If Sz> 1 (the absolute value of ΔV is “2”), in step 607 the absolute value of ΔV is 3 or
It is determined whether it is 4 or greater than 4. That is, it is determined whether or not Sz> 3, and the result is encoded with the context X2.

【0184】ここで、Sz=2のときは、ステップ608にお
いて、2の2進表記”10”の下位ビットの”0”をコンテ
クストM2で符号化する。また、Sz=3のときは、同じく
ステップ608において、2の2進表記”11”の下位ビット
の”1”をコンテクストM2で符号化する。
Here, when Sz = 2, in step 608, the lower bit "0" of the binary notation "10" of 2 is encoded in the context M2. When Sz = 3, in step 608, the lower bit "1" of the binary notation "11" of 2 is encoded in the context M2.

【0185】ステップ609では、Sz>7であるかを判定
し、その結果をコンテストX3で符号化する。ここで、Sz
が4〜7のとき、4,5,6,7のそれぞれの2進表記”10
0”,”101”,”110”,”111”の下位2ビット”0
0”,”01”,”10”,”11”を、コンテクストM3で符
号化する(ステップ610,611)。
At step 609, it is determined whether or not Sz> 7, and the result is encoded by the contest X3. Where Sz
Is 4 to 7, the binary notation of each of 4, 5, 6, and 7 is "10.
Lower 2 bits of "0", "101", "110", "111""0"
0 ”,“ 01 ”,“ 10 ”,“ 11 ”are encoded by the context M3 (steps 610, 611).

【0186】ステップ612では、Sz>15であるかを判定
し、その結果をコンテクストX4で符号化する。このと
き、Sz=8〜15のときは、それぞれの数値を2進表記し
て、下位3ビットをコンテクストM4で符号化する。
In step 612, it is determined whether Sz> 15, and the result is encoded in the context X4. At this time, when Sz = 8 to 15, each numerical value is expressed in binary, and the lower 3 bits are encoded by the context M4.

【0187】入力された差分データΔVの値が大きい場
合には、以下、同様の処理を繰り返し実行する。ステッ
プ616では、Sz>32768であるかを判定し、その結果をコ
ンテキストX15で符号化し、Szが32768以下ならば、各数
値を2進表記し、下位の数ビットをコンテクストM15で
符号化する。
When the value of the input difference data ΔV is large, the same processing is repeated thereafter. In step 616, it is determined whether Sz> 32768, and the result is encoded in the context X15. If Sz is 32768 or less, each numerical value is represented in binary and the lower order bits are encoded in the context M15.

【0188】以上の説明の中で、X1〜X15は、Szのmagni
tude categoryを示すデータを符号化するコンテクスト
であり、M2〜M15は、Szのmagnitude bitを符号化するた
めのコンテクストである。
In the above description, X1 to X15 are magni of Sz.
It is a context for encoding data indicating a tude category, and M2 to M15 are contexts for encoding a magnitude bit of Sz.

【0189】以上のような順序で、図12の2値分解処理
器520は、数値の2値化を行い符号化シンボルを生成
し、図10の多値デー符号化コンテクスト409からコンテ
クストXX1〜X15,M2〜M15が出力され、これにより算術
符号化演算が行われる。
In the above-described order, the binary decomposition processor 520 of FIG. 12 binarizes the numerical value to generate an encoded symbol, and the multilevel data encoding context 409 to the contexts XX1 to X15 of FIG. , M2 to M15 are output, and the arithmetic coding operation is performed thereby.

【0190】図14(a),(b)は、図13に現われるコ
ンテクストをまとめたものである。多値画像符号化のブ
ロックは8画素x8画素なので、64個の周波数成分があ
る。これをk=0〜63であらわす。
14 (a) and 14 (b) are a summary of the contexts appearing in FIG. Since the block of multi-valued image coding is 8 pixels x 8 pixels, there are 64 frequency components. This is represented by k = 0 to 63.

【0191】図14(a)に示すようN、コンテクストEO
B、S0、S1、S2については、各周波数成分毎にコンテク
ストが定義され(703〜706)、この他DC成分として扱える
フラグなどの数値を符号化するコンテクストがある(70
1、702)。
As shown in FIG. 14A, N, context EO
For B, S0, S1, and S2, the context is defined for each frequency component (703 to 706), and there is a context that encodes numerical values such as flags that can be treated as DC components (70
1, 702).

【0192】また、図14(b)に示すようにmagnitude
categoryとmagnitude bitのコンテクストは共通である
(707、708)。これらの各コンテクスト情報は、2値画像
の符号化同様に1バイトで表される。
Further, as shown in FIG. 14 (b), the magnitude
The context of category and magnitude bit are common
(707, 708). Each of these pieces of context information is represented by 1 byte like the encoding of a binary image.

【0193】図15(a)は、多値データの符号化の全体の
手順を示すフロー図であり、図15(b)は、周波数成分
64個の符号化の具体的な処理手順を示すフロー図であ
る。
FIG. 15 (a) is a flow chart showing the overall procedure of encoding multi-valued data, and FIG. 15 (b) is a frequency component.
It is a flowchart which shows the specific processing procedure of 64 encoding.

【0194】図15(a)に示すように、多値データの符
号化処理では、まず、フォーマット変換/EOBの検出処
理が行われる(ステップ810)。そして、予め定められ
ている順番で2値分解処理を行う(ステップ811)。そ
して、AC性分,DC成分を区別することなくコンテクスト
を生成し(ステップ812)、算術符号化を行う(ステッ
プ813)。
As shown in FIG. 15A, in the encoding process of multi-valued data, first, the format conversion / EOB detection process is performed (step 810). Then, the binary decomposition processing is performed in a predetermined order (step 811). Then, the context is generated without distinguishing between the AC component and the DC component (step 812) and arithmetic coding is performed (step 813).

【0195】周波数成分の符号化は、図15(b)に示す
ような手順で行われる。ここでkはジグザグスキャンの
インデックスを表す。まず、k=0とする(ステップ80
1)。次に、k=0の数値がEOBシンボルを表しているかど
うかを判定する(ステップ802)。ここで、k=0時点でE
OBであるということは、DC成分もAC成分もすべてゼロで
あるということを意味している。この判定でEOBであれ
ば、ステップ804で、1を符号化(code-1)して、そのブ
ロックは符号化終了となる。
The coding of the frequency component is performed by the procedure as shown in FIG. 15 (b). Here, k represents a zigzag scan index. First, k = 0 (step 80)
1). Next, it is determined whether the numerical value of k = 0 represents an EOB symbol (step 802). Here, E at k = 0
Being OB means that the DC and AC components are all zero. If the result of this determination is EOB, 1 is encoded (code-1) in step 804, and the block ends encoding.

【0196】もしEOBでなければステップ803で0を符号
化し、次に、ステップ805でΔV(V)の符号化を行う。ス
テップ806の判断で1ブロック終了していなければ、ステ
ップ807でインデックスを更新し、同様の処理を繰り返
す。
If it is not EOB, 0 is encoded in step 803, and then ΔV (V) is encoded in step 805. If one block has not ended in the determination in step 806, the index is updated in step 807 and the same processing is repeated.

【0197】このようにして1ブロックの符号化が終了
する。ここには示していないが、周波数成分以外にDC成
分として符号化する情報があれば、まずそれらを符号化
する。本実施の形態では、DC成分、AC成分の順に符号化
する。例えば、図14(a),に示されるように、各ブロ
ックでDC成分として扱えるフラグなどが2個あったとす
ると、1個のブロックは66個の成分から構成されるのでk
=66として図15(b)のフローに従って符号化すればよ
い。図15(b)から明らかなように符号化処理フローに
は、DC、AC成分の区別はなく共通である。
In this way, the encoding of one block is completed. Although not shown here, if there is information to be coded as a DC component other than the frequency component, those are first coded. In the present embodiment, the DC component and the AC component are encoded in this order. For example, as shown in Fig. 14 (a), if there are two flags that can be handled as DC components in each block, one block is composed of 66 components, so k
= 66, and encoding may be performed according to the flow of FIG. As is clear from FIG. 15 (b), the coding process flow is common without distinction between DC and AC components.

【0198】このように、所定の手順に従って、AC成分
/DC成分を問わずに機械的に2値分解し、共通のコンテ
クストを使用して符号化することで、多値データについ
てもハザードのないパイプライン処理を実現できる。つ
まり、図1のブロック構成を用いて、1クロックで1つ
の処理を実行する超高速の算術符号化処理が実現される
ことになる。
As described above, according to the predetermined procedure, the binary decomposition is performed mechanically regardless of the AC component / DC component, and the common context is used for encoding, so that there is no hazard even for multi-valued data. Pipeline processing can be realized. That is, by using the block configuration of FIG. 1, ultra-high-speed arithmetic coding processing that executes one processing in one clock is realized.

【0199】図17は、周波数成分の符号化例を示したも
のである。この例は、DC差分が+1、AC成分が4個でその
後がEOBの場合に、各数値がどのように2進情報として符
号化されるかを示している。
FIG. 17 shows a coding example of frequency components. This example shows how each numerical value is encoded as binary information when the DC difference is +1 and the AC component is four and the subsequent EOB.

【0200】DC差分値+1は図15(b)に従って符号化
すると、まずEOBではないのでステップ803でコンテクス
トEOBで0を符号化する。これを0(EOB)と表す。ステッ
プ805の数値の符号化では、図13を見ながら符号化する
と、数値ΔVはゼロではないので、コンテクストS0で1
を符号化する。次に、正負の符号は+なのでコンテクス
トS1で1を符号化する。
When the DC difference value +1 is encoded according to FIG. 15B, it is not EOB first, so 0 is encoded in the context EOB in step 803. This is represented as 0 (EOB). In the coding of the numerical value in step 805, when the coding is performed while looking at FIG. 13, the numerical value ΔV is not zero, so 1 is set in the context S0.
Is encoded. Next, since the positive and negative signs are +, 1 is coded in the context S1.

【0201】そして、Sz=0なので、Sz > 0の判定に対
してnoとなりコンテクストS2で0を符号化する。このよ
うにして、DC差分値ΔVが符号化できる。この処理をEOB
が現われるまで、または1ブロックのすべての数値が符
号化できるまで繰り返すと図16に示すように符号化され
ることが分かる。以上のようにして、2値分解処理と2進
情報の符号化が行われる。
Since Sz = 0, the determination of Sz> 0 is no, and 0 is encoded in the context S2. In this way, the DC difference value ΔV can be encoded. This process is EOB
It will be understood that the encoding is performed as shown in FIG. 16 by repeating the above operation until all the values in one block can be encoded. As described above, the binary decomposition process and the binary information encoding are performed.

【0202】多値データの符号化では、このように2進
データ列に分解され、分解された各2進データが符号化
シンボルになる。この2進データ列を高速に符号化する
には、各シンボルに対応したコンテクストを同時に出力
する必要がある。
In encoding multi-valued data, the binary data string is decomposed in this way, and each decomposed binary data becomes an encoded symbol. To encode this binary data string at high speed, it is necessary to output the context corresponding to each symbol at the same time.

【0203】図10の多値データ符号化コンテクスト生成
器409は、シンボル系列に同期したコンテクスト列を生
成する。本実施の形態では、多値データ符号化コンテク
スト生成器409は、状態遷移ROMで構成されている。符号
化はDC、AC成分の区別なく図13に従って処理すればよい
ので、図13からコンテクストインデックスの状態遷移テ
ーブルを作ることができる。図29は、コンテクストイン
デックス状態遷移テーブルの一構成例を示す図である。
左側のコンテクスト欄はコンテクストの名前とそのイン
デックスである。右側の次の状態を示す欄は、次の状態
番号と出力インデックスを示す。このテーブルは全部で
70状態から成り、状態0はコンテクストEOBである。この
状態で0を符号化(code-0)すると状態1に移る。そのと
きインデックス1を出力する。1を符号化すると状態0
に留まり、インデックス0を出力するということを表
す。インデックスは0から23であるが、同一コンテクス
トも異なる状態として定義したので状態数の方が多くな
っている。このようにシンボルの符号化に同期してコン
テクストインデックスを高速に出力することができる。
The multi-valued data coding context generator 409 in FIG. 10 generates a context string synchronized with the symbol sequence. In this embodiment, the multi-valued data encoding context generator 409 is composed of a state transition ROM. Since encoding can be performed according to FIG. 13 without distinction between DC and AC components, the state transition table of the context index can be created from FIG. FIG. 29 is a diagram showing an example of the configuration of the context index state transition table.
The context column on the left is the name of the context and its index. The next status column on the right shows the next status number and output index. This table is all
It consists of 70 states, state 0 is the context EOB. If 0 is coded (code-0) in this state, the state moves to 1. At that time, index 1 is output. State 1 when 1 is encoded
Stays at and outputs index 0. The index is 0 to 23, but the number of states is larger because the same context is defined as different states. In this way, the context index can be output at high speed in synchronization with the symbol encoding.

【0204】従来例では、DC成分とAC成分のコンテクス
トが異なるので、DC成分とAC成分が切り替わるタイミン
グでの状態遷移が複雑になる。また、応用によってフラ
グなどDC成分の数を増やす必要が生じた場合に、インデ
ックスの状態遷移テーブルを作り替える必要があり柔軟
性に欠けるという問題がある。
In the conventional example, since the DC component and the AC component have different contexts, the state transition at the timing when the DC component and the AC component are switched becomes complicated. Further, when it is necessary to increase the number of DC components such as flags depending on the application, it is necessary to recreate the index state transition table, and there is a problem of lack of flexibility.

【0205】以上のようにして、図10に示されるセレク
タ411とセレクタ412からは、同時に符号化シンボルとそ
のコンテクストインデックスが出力される。コンテクス
トインデックスは図1のコンテクストRAM701に入力し、
符号化シンボルは2クロックの遅延を経て算術符号器70
3に入力する。この後のパイプライン処理は、2値画像の
符号化の場合と同じである。
As described above, the coded symbol and its context index are simultaneously output from the selector 411 and the selector 412 shown in FIG. The context index is input to the context RAM701 in Figure 1,
The encoded symbol is delayed by 2 clocks and then arithmetic encoder 70
Enter in 3. The subsequent pipeline processing is the same as the case of encoding a binary image.

【0206】以上、多値画像データの、ハザードレスパ
イプライン算術符号化について説明した。
The hazard-less pipeline arithmetic encoding of multi-valued image data has been described above.

【0207】(多値画像の復号器)次に、多値データ
の、ハザードレスパイプライン算術復号化について、説
明する。符号化同様、コンテクスト生成を中心に説明す
る。それ以外の部分は2値画像の復号化と共通である。
(Multi-Valued Image Decoder) Next, the hazard-less pipeline arithmetic decoding of multi-valued data will be described. Like the encoding, the description will focus on the context generation. The other parts are common to the decoding of binary images.

【0208】図11は、多値データの復号時における、コ
ンテクスト生成器(図1の参照符号700)の構成を説明
する。
FIG. 11 illustrates the configuration of the context generator (reference numeral 700 in FIG. 1) at the time of decoding multi-valued data.

【0209】多値合成処理403は、復元した2進データ列
から2進分解の逆手順をたどって数値を合成する。多値
データ復号用コンテクスト生成器404は、コンテクスト
のインデックスベクトルを生成する。セレクタ405は、2
値画像と多値データの復号用にインデックスベクトルを
選択する。セレクタ401は復元データを選択する。
The multi-value synthesizing process 403 synthesizes numerical values from the restored binary data string by following the reverse procedure of binary decomposition. The multi-valued data decoding context generator 404 generates a context index vector. Selector 405 is 2
Select index vectors for decoding value images and multivalued data. The selector 401 selects the restored data.

【0210】図17の下側に、コンテクストインデックス
の生成部分を示した。JBIG復元用のコンテクスト生成器
402の出力信号は、図4に示す復号器に対応して、Si+2(D
i+1=0/Di=0)、 Si+2(Di+1=1/Di=0)、 Si+2(Di+1=0/Di=
1)、 Si+2(Di+1=1/Di=1)である。これらは現在復号中の
シンボルDiと次のシンボルDi+1の、4通りの可能な組み
合わせに対するインデックスであった。多値データ復号
用のコンテクスト生成器404の出力信号も同様である。
この場合、シンボルDiとDi+1は2進分解されたシンボル
である。
The lower part of FIG. 17 shows a portion for generating a context index. Context generator for JBIG reconstruction
The output signal of the 402 corresponds to the decoder shown in FIG.
i + 1 = 0 / Di = 0), Si + 2 (Di + 1 = 1 / Di = 0), Si + 2 (Di + 1 = 0 / Di =
1) and Si + 2 (Di + 1 = 1 / Di = 1). These were indices for four possible combinations of the currently decoded symbol Di and the next symbol Di + 1. The same applies to the output signal of the context generator 404 for multilevel data decoding.
In this case, the symbols Di and Di + 1 are binary decomposed symbols.

【0211】図18は、多値データ復号用のコンテクスト
がつくるContext Treeである。符号化時における2値分
解処理は、図13で示したように、予め定めた手順にした
がって行われる。よって、その手順を逆にたどることに
より、データ復元時において必要なコンテクストが、図
18のように、順次、一義的に定まることになる。よっ
て、復元時にも、必要なコンテクストを連続的に生成す
ることができる。
FIG. 18 is a Context Tree created by the context for decoding multi-valued data. The binary decomposition process at the time of encoding is performed according to a predetermined procedure as shown in FIG. Therefore, by following the procedure in reverse, the context necessary for data restoration is
As in 18, it will be decided uniquely in order. Therefore, even at the time of restoration, the necessary context can be continuously generated.

【0212】このように、図18の多値データ復号用のコ
ンテクストがつくるContext Treeは、図13を参照して構
成することができる。
As described above, the Context Tree created by the context for decoding multi-valued data in FIG. 18 can be constructed with reference to FIG.

【0213】例えば、コンテクストEOB(1101)の次に来
るコンテクストはS0(1103)またはEOB(1102)であり、コ
ンテクストS0の次はS1(1105)またはEOB(1104)である。
For example, the context following the context EOB (1101) is S0 (1103) or EOB (1102), and the context after the context S0 is S1 (1105) or EOB (1104).

【0214】このようにして、図18のContext Treeを構
成することができる。図18には多くのEOBが書かれてい
るが、全て、1101のEOBと同じ状態である。 EOBにたど
り着くと1つのブロックの符号化が終了する。エッジの
上に付けられた数0、1は復元シンボルDiの値である。
In this way, the Context Tree of FIG. 18 can be constructed. Although many EOBs are written in FIG. 18, they are all in the same state as the EOB of 1101. When the EOB is reached, coding of one block is completed. The numbers 0 and 1 attached to the edges are the values of the reconstruction symbol Di.

【0215】図30は、図18のContext Treeに対応したコ
ンテクストインデックスの状態遷移テーブルである。こ
の表で状態番号1601は、図18のContext Treeの各ノード
に対応する番号である。コンテクスト1602は、コンテク
スト名とそれに対応したインデックスである。1603はDi
とDi+1で決まる4つの出力インデックスを表す。1604は
1つのシンボル復号化後の遷移先の状態番号である。
FIG. 30 is a state transition table of context indexes corresponding to the Context Tree of FIG. In this table, the state number 1601 is a number corresponding to each node of the Context Tree in FIG. The context 1602 is a context name and an index corresponding to it. 1603 is Di
And the four output indices determined by Di + 1. 1604 is the state number of the transition destination after one symbol decoding.

【0216】例えば、状態0であるEOBコンテクストでシ
ンボルDiを復号化しているサイクルでは、インデックス
ベクトル(0、2、1、0)を出力する。Diが0として復元
されると状態1に遷移する。この状態ではインデックス
ベクトル(1、0、2、2)が出力される。図17のコンテク
スト生成器404は、この状態遷移テーブルをROMで実現し
たものである。このようにしてシンボルの復号化に同期
して、コンテクストベクトルを次々に生成することがで
きる。
For example, in the cycle in which the symbol Di is decoded in the EOB context in the state 0, the index vector (0, 2, 1, 0) is output. When Di is restored as 0, it transits to state 1. In this state, the index vector (1, 0, 2, 2) is output. The context generator 404 in FIG. 17 implements this state transition table in ROM. In this way, context vectors can be generated one after another in synchronization with symbol decoding.

【0217】復号器のパイプライン動作は2値画像の復
号と同様に動作するので、パイプラインハザードが発生
することなく高速に2進シンボルを復元することができ
る。復元された2進シンボル列から直交変換係数などの
数値を再構成することは、分解処理の逆をたどればよい
ので実現は容易である。従来例のようにDC成分とAC成分
のコンテクストが異なる場合は、復元する2進データ列
の中にはDCコンテクストに属するシンボルとACコンテク
ストに属するシンボルが混在するため、インデックスベ
クトルを状態遷移テーブルに基づいて連続して出力する
ことは困難である。
Since the pipeline operation of the decoder operates in the same way as the decoding of the binary image, the binary symbol can be restored at high speed without the occurrence of pipeline hazard. Reconstructing the numerical values such as the orthogonal transform coefficient from the restored binary symbol sequence is easy because it is necessary to follow the reverse of the decomposition process. If the DC component and the AC component have different contexts as in the conventional example, since the binary data string to be restored contains symbols belonging to the DC context and symbols belonging to the AC context, the index vector is stored in the state transition table. Based on this, it is difficult to output continuously.

【0218】図43(b)に示すように、コンテクストを
切り替えるため、1つのシンボルを復元する毎にDC/AC
成分の終わりを判定する処理が必要となり、シンボル当
り2サイクルかかることになる。
As shown in FIG. 43 (b), since the context is switched, DC / AC is restored every time one symbol is restored.
The process of determining the end of the component is required, which takes 2 cycles per symbol.

【0219】図44(b)に示すように、本実施の形態の
ようにコンテクストが共通であれば、シンボルの復元は
連続的に実行可能であり、DC/AC信号の再構成処理は復
号動作とは別の回路で並行動作が可能となる。
As shown in FIG. 44 (b), if the context is common as in this embodiment, symbol restoration can be continuously executed, and DC / AC signal reconstruction processing is performed by decoding operation. Parallel operation is possible with a circuit different from the above.

【0220】また、コンテクストモデルが複数あると、
DC成分とAC成分の境目でパイプラインは初期状態から開
始するような回路構成にならざるを得ないだろう。この
ような復号器では高速処理は期待できない。またこのよ
うにDCコンテクストとACコンテクストを持つ回路構成で
は回路規模は大きく、コンテクストの異なる成分間にお
ける制御は煩雑になる。本発明の復号器では、このよう
な問題は生じない。
If there are a plurality of context models,
At the boundary between the DC component and the AC component, the pipeline will have to have a circuit configuration that starts from the initial state. High speed processing cannot be expected with such a decoder. Further, in such a circuit configuration having a DC context and an AC context, the circuit scale is large, and control between components of different contexts becomes complicated. The decoder of the present invention does not have such a problem.

【0221】さらに、図27の算術復号器では、符号器の
場合と同様に、最大シンボル長検出器1316を有してお
り、一括復号化できる最大のシンボル数を常に検出して
いる。つまり、最終的に復元するべきデータが2値デー
タである場合において、予め定めた複数個の連続する復
号化シンボルに対応する参照画素が特定のパターンに合
致することを、複数の検出器で常に検出し、これらの検
出器の検出結果に基づいて一括復号化できる最大のシン
ボル数を決定して、その最大シンボル数を算術復号演算
器に供給し、適応的に一括算術復号化を行う。これによ
り、さらなる高速復号処理が実現される。
Further, the arithmetic decoder of FIG. 27 has a maximum symbol length detector 1316 as in the case of the encoder, and always detects the maximum number of symbols that can be collectively decoded. That is, when the data to be finally restored is binary data, it is always detected by the plurality of detectors that the reference pixels corresponding to the predetermined plurality of consecutive decoded symbols match the specific pattern. It detects and determines the maximum number of symbols that can be collectively decoded based on the detection results of these detectors, supplies the maximum number of symbols to the arithmetic decoding calculator, and adaptively performs collective arithmetic decoding. As a result, a higher speed decoding process is realized.

【0222】また、最終的に復元するべきデータが多値
データである場合には、図11で説明したように、算術復
号演算器により復号された2値データは、多値合成処理
回路403により合成(2値分解とは逆の手順で行われ
る)され、これにより、多値データが復元される。な
お、図11に示すように、JBIG用(2値データ用)コンテ
クスト生成器402と、多値データ復号化用コンテクスト
生成器404とを、適宜、選択的に使用して復号化がなさ
れる。
When the data to be finally restored is multi-valued data, the binary data decoded by the arithmetic decoding arithmetic unit is processed by the multi-value synthesis processing circuit 403 as described with reference to FIG. They are combined (the procedure is the reverse of the binary decomposition), and thereby multi-valued data is restored. As shown in FIG. 11, the JBIG (binary data) context generator 402 and the multi-value data decoding context generator 404 are selectively used as appropriate for decoding.

【0223】以上、多値データの符号化・復号化につい
て説明した。
The encoding / decoding of multi-valued data has been described above.

【0224】(実施の形態3)前掲の実施の形態では、
2値(あるいは多値)画像について、ハザードレスパイ
プライン符号化を実現する技術について説明した。ただ
し、実際の画像には、余白や文字の行間というように、
白(あるいは黒)が連続する領域も存在する。このよう
な領域については、1シンボル毎に符号化する必要はな
い。
(Embodiment 3) In the embodiment described above,
The technique for implementing the hazard-less pipeline coding for a binary (or multi-valued) image has been described. However, in the actual image, such as margins and line spacing of characters,
There is also a continuous white (or black) area. It is not necessary to code such a region for each symbol.

【0225】この点に鑑み、本実施の形態では、本発明
の出願人が先に提案している、コンテクストが連続する
場合に、1シンボル毎の符号化を止めて一括した符号化
を行なう方法と、実施の形態1で説明した、2値算術符
号の未来予測によるパイプラインの乱れを防止する方法
とを併用する。
In view of this point, in the present embodiment, the method proposed by the applicant of the present invention to carry out collective coding by stopping coding for each symbol when the contexts are continuous. And the method of preventing the disturbance of the pipeline due to the future prediction of the binary arithmetic code described in the first embodiment.

【0226】図20に、画像の一例を示す。図示されるよ
うに、領域A、領域C等は文字領域であり、領域B、D
は白だけの領域(行間領域)である。そして、領域E、
Fの右側には、コンテキストの連続性が高く、それでい
て確率推定のむずかしい高精細な画像10、20が存在す
る。
FIG. 20 shows an example of the image. As shown, areas A, C, etc. are character areas, and areas B, D
Is a white area (row-to-line area). And area E,
On the right side of F, there are high-definition images 10 and 20 which have high context continuity and whose probability estimation is difficult.

【0227】文字領域では、確率推定が容易で正規化の
発生頻度が少ないため、パイプラインの乱れはそれほど
問題とならないと考えられる。また、高精細な画像10、
20についても、上述の本発明を用いることで、パイプラ
インの乱れを防止することができる。
In the character area, since probability estimation is easy and normalization frequency is low, it is considered that the disturbance of the pipeline is not so problematic. In addition, high-definition image 10,
With respect to 20 as well, by using the above-described present invention, it is possible to prevent the disturbance of the pipeline.

【0228】本発明では、未来予測に基づく情報を、現
在の情報と共に並列に出力して、事後的に選択する手法
を採るが、例えば、全白(あるいは全黒)の行間領域で
は、このような手法は必要がない。
The present invention adopts a method of outputting information based on the future prediction in parallel with the current information and selecting afterwards. For example, in an all-white (or all-black) interline area, There is no need for such a technique.

【0229】そこで、全白の領域が現れると、一括して
符号化(復号化)を行なうことにより、無駄を省き、1
枚の画像の符号化(復号化)を、さらに高速で行なうこ
とが可能となる。
Therefore, when an all-white area appears, the coding (decoding) is collectively performed to reduce waste.
It becomes possible to perform encoding (decoding) of one image at a higher speed.

【0230】非白ラインでも、ある程度の一括符号化・
復号化を行なうことが可能であるが、全白ラインについ
ては、非白ラインの一括処理シンボル数よりも、より多
いシンボル数を、まとめて処理することができる。これ
により、処理速度のさらなる向上が図れる。
Even with non-white lines, a certain amount of collective coding
Although it is possible to perform decoding, it is possible to collectively process all white lines in a larger number of symbols than the number of collectively processed symbols in non-white lines. Thereby, the processing speed can be further improved.

【0231】全白領域の一括符号化を行なうためには、
図21に示すように、コンテクスト生成器3200に入力され
るデータがラインメモリ2000にラッチされた状態で、シ
ーケンス制御部4000が白ラインを検出し、その識別信号
を複数シンボル処理判定器3300に送り、一括処理できる
最大シンボル数を決定する構成とする。
In order to perform the collective coding of the all-white area,
As shown in FIG. 21, while the data input to the context generator 3200 is latched in the line memory 2000, the sequence control unit 4000 detects a white line and sends its identification signal to the multi-symbol processing determination unit 3300. The maximum number of symbols that can be collectively processed is determined.

【0232】なお、パイプラインの乱れを防止(低減)
するための本発明の構成は、コンテクスト生成器3200、
コンテクストメモリ3400、確率推定器3600においても、
前掲の実施の形態と同様に採用されている。
It should be noted that the disturbance of the pipeline is prevented (reduced).
The configuration of the present invention to achieve the context generator 3200,
Even in the context memory 3400 and the probability estimator 3600,
It is adopted in the same manner as the above-mentioned embodiment.

【0233】白ラインの一括符号化(例えば、MPSの符
号化)は、図22に示すように、オージェンド(Areg)か
ら、初期値の1/2(0x8000)以下にならない範囲で複
数回分のQeを一括に減算することにより容易に実現され
る。正規化が生じてしまうと、処理が複雑化することが
懸念される。よって、一般的には、正規化が生じないこ
とを、連続シンボルの一括処理の条件とすることが望ま
しい。
As shown in FIG. 22, the collective coding of white lines (eg, MPS coding) is performed a plurality of times by using Qe for a plurality of times within a range from the agend (Areg) to ½ (0x8000) or less of the initial value. It is easily realized by subtracting all at once. If the normalization occurs, there is a concern that the processing becomes complicated. Therefore, it is generally desirable that no normalization occurs as a condition for batch processing of consecutive symbols.

【0234】全白領域に対する一括符号化処理の手順を
図23に示す。すなわち、一括してQeを減算した場合に中
央値以上となるかを判定し(ステップ10)、コンテクス
トとMPSの連続を判定し(ステップ20)、判定結果に応
じて、一括符号化処理または逐次符号化処理を選択する
(ステップ30、40)。
FIG. 23 shows the procedure of the collective encoding process for the all-white area. That is, it is determined whether or not the median value is greater than or equal to when the Qe is collectively subtracted (step 10), the continuity of the context and MPS is determined (step 20), and the batch encoding processing or the sequential processing is performed depending on the determination result. An encoding process is selected (steps 30 and 40).

【0235】本実施の形態では、パイプラインの乱れが
なく、画像パターンによらず一定速度で符号化や復号化
を実行することができると共に、余白の領域等では、一
括した符号化を行うため、算術符号化処理のさらなる高
速化を達成できる。
In the present embodiment, since the pipeline is not disturbed, the coding and decoding can be executed at a constant speed regardless of the image pattern, and the blank area is collectively coded. Further, the arithmetic coding process can be further speeded up.

【0236】(実施の形態4)本発明では、実施の形態
1および実施の形態2で説明した、2値データおよび多
値データのハザードレスパイプライン符号・復号化機能
に、実施の形態3で説明した、全白領域の一括符号化機
能(さらに適応性を加えてバージョンアップしたもの)
を加え、統合したものである。全白領域の一括符号化で
は、符号化対象の画像の局所的性質に応じて、一括して
符号化するシンボル数を適応的に変化させる機能を設け
る。
(Embodiment 4) In the present invention, the hazardless pipeline encoding / decoding function for binary data and multi-valued data described in Embodiment 1 and Embodiment 2 is applied to Embodiment 3. The batch coding function for all white areas, which has been explained (the version has been upgraded with additional adaptability)
Is added and integrated. In batch coding of all-white areas, a function of adaptively changing the number of symbols to be coded collectively is provided according to the local property of the image to be coded.

【0237】以下、2値画像の符号・復号化、多値画像
の符号・復号化を統合した超高速算術符号器・復号器
(コーデック)について、図面を用いて具体的に説明す
る。
An ultra-high-speed arithmetic encoder / decoder (codec) that integrates encoding / decoding of binary images and encoding / decoding of multi-valued images will be specifically described below with reference to the drawings.

【0238】(全体構成の説明)図24は、本発明の実施
の形態にかかる算術符号器の構成を示すブロック図であ
る。
(Description of Overall Structure) FIG. 24 is a block diagram showing the structure of the arithmetic encoder according to the embodiment of the present invention.

【0239】より詳しいブロック構成は順を追って説明
する。主な構成要素はコンテクスト生成器1001、最大シ
ンボル長検出器1002、コンテクストメモリ1003、確率推
定器1004、算術符号器1005及びこれら処理ブロックの動
作タイミングを制御するタイミング制御部1006である。
A more detailed block configuration will be described step by step. The main components are a context generator 1001, a maximum symbol length detector 1002, a context memory 1003, a probability estimator 1004, an arithmetic encoder 1005, and a timing controller 1006 that controls the operation timing of these processing blocks.

【0240】符号化対象となるのは2値画像や直交変換
係数、各種の識別フラグなどの数値データである。コン
テクスト生成器1001は、これらのデータに適したコンテ
クストインデックスを出力する。
Numerical data such as binary images, orthogonal transform coefficients, and various identification flags are to be encoded. The context generator 1001 outputs a context index suitable for these data.

【0241】最大シンボル長検出器1002は、2値画像の
符号化復号化のときに機能する。Areg、Creg、Qe(S)、M
PS(S)、および2値画像データを入力信号としてシンボル
長を出力する。コンテクストメモリ1003は従来例同様に
各コンテクスト毎に予測シンボルMPS(S)と確率推定器10
04の状態番号を出力する。算術符号器1005は符号化復号
化演算を実行するブロックである。 (2値画像の符号器)まず、2値算術符号器について説
明する。
The maximum symbol length detector 1002 functions when coding / decoding a binary image. Areg, Creg, Qe (S), M
It outputs the symbol length using PS (S) and binary image data as input signals. The context memory 1003 stores the prediction symbol MPS (S) and the probability estimator 10 for each context as in the conventional example.
The 04 status number is output. The arithmetic encoder 1005 is a block that executes encoding / decoding operations. (Binary Image Encoder) First, the binary arithmetic encoder will be described.

【0242】図25は、符号器の構成を示すブロック図で
ある。
FIG. 25 is a block diagram showing the structure of the encoder.

【0243】コンテクスト生成器201、コンテクストRAM
202、Qe ROM203、算術符号器204がパイプライン接続さ
れている。このパイプライン動作タイミングは符号器タ
イミング制御部207によって状態監視が行われ、それに
基づいて適切な制御信号が各部に供給されている。
Context generator 201, context RAM
202, Qe ROM203, and arithmetic encoder 204 are pipeline-connected. The state of the pipeline operation timing is monitored by the encoder timing control unit 207, and an appropriate control signal is supplied to each unit based on the state monitoring.

【0244】このパイプラインは2値画像の符号化と数
値データの符号化に共通する機能ブロックである。それ
に対してQe ROM205と最大シンボル長検出器206は、2値
画像符号化に特有の機能ブロックである。
This pipeline is a functional block common to the coding of binary images and the coding of numerical data. On the other hand, the Qe ROM 205 and the maximum symbol length detector 206 are functional blocks peculiar to binary image coding.

【0245】まず、パイプライン動作について説明す
る。
First, the pipeline operation will be described.

【0246】入力データは2値画像とする。コンテクス
ト生成器201は、図39に示したテンプレートの参照画素
の値に応じたコンテクストインデックスSと符号化シン
ボルを出力する。
The input data is a binary image. The context generator 201 outputs the context index S and the coded symbol according to the value of the reference pixel of the template shown in FIG.

【0247】符号化シンボルは、パイプラインタイミン
グを調整するため、2クロックの遅延を経て算術符号器
に供給される。
The coded symbols are supplied to the arithmetic encoder after a delay of 2 clocks in order to adjust the pipeline timing.

【0248】コンテクストを識別するインデックスS
は、コンテクストRAM202と遅延素子208に入力する。遅
延素子3Dは3クロック遅延することを表す。遅延素子の
出力タイミングはコンテクストの更新タイミングとなる
ように設定されている。
Index S that identifies the context
Input to the context RAM 202 and the delay element 208. The delay element 3D represents a delay of 3 clocks. The output timing of the delay element is set to be the context update timing.

【0249】コンテクストRAM202からは、シンボル予測
値MPS(S)とQe ROM203の状態番号(state No。)が出力
する。コンテクストRAMは2-port RAMであり、インデッ
クスSをアドレスとしMPS(S)と状態番号をデータとする
のが一組のポートで読み出し側、3クロック遅延したイ
ンデックス3D(S)をアドレスとしコンテクスト3D(S)
の更新値をデータとするのがもう一組のポートで書き込
み側である。
From the context RAM 202, the symbol prediction value MPS (S) and the state number (state No.) of the Qe ROM 203 are output. The context RAM is a 2-port RAM, where the index S is the address, MPS (S) and the status number are the data on the read side, and the index 3D (S) delayed by 3 clocks is the address and the context 3D. (S)
Another set of ports uses the updated value of as the data on the write side.

【0250】2-port RAMなのでインデックスSと3D(S)
が異なれば同一サイクルでリードとライトができる。コ
ンテクストRAM202 の出力データはセレクタ212を通して
Qe ROM203や算術符号器204に供給される。セレクタ212
の動作は後に説明する。Qe ROM203は入力する状態番号
に応じてQe(S)と次の状態番号を出力する。このROMの内
容は、図38に示すとおりであり、図41に示すような従来
例と大きく異なる。
Since it is a 2-port RAM, index S and 3D (S)
If different, read and write can be done in the same cycle. The output data of the context RAM 202 is passed through the selector 212.
It is supplied to the Qe ROM 203 and the arithmetic encoder 204. Selector 212
The operation of will be described later. The Qe ROM 203 outputs Qe (S) and the next state number according to the input state number. The contents of this ROM are as shown in FIG. 38, which is significantly different from the conventional example as shown in FIG.

【0251】図40は通常の確率推定テーブルの内容を示
しており、このテーブルをROM化したのが、Qe ROMであ
る。図41のような内容のROMを用いる従来例では、パイ
プラインハザードが発生する原因は、先に説明したよう
に、コンテクストSで正規化が発生したとき、その直後
のシンボルも同じコンテクストのときにはコンテクスト
RAMの出力値が正規化更新前の古い値なので、その読み
直しを必要とするためである。
FIG. 40 shows the contents of a normal probability estimation table, and this table is a ROM that is a Qe ROM. In the conventional example using the ROM with the contents as shown in Fig. 41, the cause of pipeline hazard is, as explained earlier, when the normalization occurs in the context S, and the symbol immediately after that is the same context,
This is because the output value of the RAM is an old value before the normalization update and needs to be reread.

【0252】そこで、本実施の形態では、読み直しが不
要になるように、Qe ROMからQe(S)と正規化が発生して
状態遷移した後のQe(S)も同時に出力し、それらを状況
に応じて選択できるようにした。
Therefore, in this embodiment, Qe (S) and Qe (S) after the normalization occurs and the state transition is output at the same time so that re-reading is unnecessary, and these are output as the status. You can choose according to.

【0253】符号化演算に必要な情報は全てQe ROM203
から供給されているので、コンテクストが連続しその途
中で正規化が発生しても、コンテクストRAMの読み直し
は不要になりパイプラインハザードは発生しない。
All information necessary for encoding calculation is Qe ROM203.
Since it is supplied from, even if the context continues and normalization occurs in the middle, the context RAM does not need to be re-read and the pipeline hazard does not occur.

【0254】図38は、本実施の形態における、2値の算
術符号用Qe ROMの構成例を示したものである。図示され
るように、このQe ROMが有するテーブルのデータは、Qe
(S)と、LPSを符号化して正規化が発生し状態遷移した後
のQe(S)と、同様にMPSを符号化して正規化が発生し状態
遷移した後のQe(S)と、LPSを符号化して正規化が発生し
た時の状態遷移先の情報と、MPSを符号化して正規化が
発生した時の状態遷移先の情報と、そしてフラグswitch
である。
FIG. 38 shows an example of the structure of a binary arithmetic code Qe ROM in the present embodiment. As shown in the figure, the data in the table of this Qe ROM is Qe ROM.
(S), Qe (S) after encoding LPS to cause normalization and state transition, and similarly, Qe (S) after encoding MPS to cause normalization and state transition, and LPS Information of the state transition destination when the encoding is performed and normalization occurs, information of the state transition destination when the encoding of MPS is performed and the normalization occurs, and the flag switch
Is.

【0255】ここで、図35を参照して、Qe ROM周辺の動
作タイミングを説明する。
Here, the operation timing around the Qe ROM will be described with reference to FIG.

【0256】第iシンボルのコンテクストがSiであると
する。処理2101はコンテクストSiについての情報を図2
のコンテクストRAM202 から読み出す(context RAM RD(S
i))。次のサイクルではQe ROMからコンテクストSiのQe
値2102、MPS符号化で正規化が発生した場合の次のQe値2
103、LPS符号化で正規化が発生した場合の次のQe値2104
が同時に出力されている。同様に次の遷移先番号も出力
されるが、ここには図示していない。
It is assumed that the context of the i-th symbol is Si. Process 2101 displays information about context Si in FIG.
Read from the context RAM 202 (context RAM RD (S
i)). In the next cycle, from the Qe ROM to the context Si Qe
Value 2102, next Qe value 2 if normalization occurs in MPS encoding 2
103, next Qe value when normalization occurs in LPS encoding 2104
Are being output at the same time. Similarly, the next transition destination number is also output, but it is not shown here.

【0257】まだ正規化は起きていないので2102〜2104
の中からQe(Si)2102が選ばれる。処理2105では算術符号
演算と必要に応じて正規化処理が行われる。今このサイ
クルでLPSを符号化して正規化が発生したものとする。
処理2106ではコンテクストSiの内容の更新を行う。コン
テクストRAMに書かれる値は、新しい状態番号と新しいM
PS(Si)である。新しい状態番号はセレクタ213で選択さ
れた7ビットのデータ215であり、新しいMPS(Si)は、現
在の予測値MPS(Si)216とフラグswitch-MPS217との排他
的論理和211をとった1ビットの信号である。セレクタ21
3下側のセレクタの選択条件はMPSを符号化したかLPSを
符号化したかである。
Since normalization has not yet occurred, 2102 to 2104
Qe (Si) 2102 is selected from among. In process 2105, arithmetic code calculation and normalization process as necessary are performed. Now, it is assumed that LPS is encoded in this cycle and normalization occurs.
In process 2106, the content of context Si is updated. The value written in the context RAM is the new state number and the new M
It is PS (Si). The new state number is the 7-bit data 215 selected by the selector 213, and the new MPS (Si) is the exclusive OR 211 of the current predicted value MPS (Si) 216 and the flag switch-MPS217 1 It is a bit signal. Selector 21
3 The selection condition of the lower selector is whether MPS is encoded or LPS is encoded.

【0258】第i+1シンボルも第iシンボルと同じコンテ
クストSiとする。処理2108〜処理2110では処理2102〜処
理2104同様に、コンテクストSiに対して3通りのQe(Si)
を同時に出力している。処理2105で正規化が発生したの
で、今度はこの中から状態遷移後のQe値2108を選ぶ。
The i + 1th symbol also has the same context Si as the ith symbol. In the processing 2108 to the processing 2110, similarly to the processing 2102 to the processing 2104, there are three kinds of Qe (Si) for the context Si.
Are being output at the same time. Since normalization has occurred in the process 2105, the Qe value 2108 after the state transition is selected from this.

【0259】セレクタ213上側のセレクタの選択条件
は、正規化発生の有無と正規化発生時のシンボルで決ま
る。このQe値を使って次のサイクル2111で符号化演算を
行う。
The selection condition of the selector on the upper side of the selector 213 is determined by the presence / absence of normalization and the symbol at the time of normalization. An encoding operation is performed in the next cycle 2111 using this Qe value.

【0260】第i+2シンボルのコンテクストもSiとす
る。処理2112では、前のサイクルで読み出したQe ROMの
状態番号は更新前のものなのでセレクタ212の下側の入
力を選択してQe ROMの読み出しを行う。
The context of the (i + 2) th symbol is also Si. In process 2112, the state number of the Qe ROM read in the previous cycle is that before update, so the lower input of the selector 212 is selected and the Qe ROM is read.

【0261】セレクタ212の下側には、次の状態番号と
次の予測値MPS(Si)が既に入力している。Qe ROMからはQ
e(Si)と遷移後のQe(Si)が出力される。第i+1シンボル符
号化では正規化は発生していないので、Qe(Si)が選ばれ
る。もし、第i+1シンボル符号化で再度正規化が発生し
たならば遷移後のQe(Si)を選べばよい。
Below the selector 212, the next state number and the next predicted value MPS (Si) have already been input. Q from Qe ROM
e (Si) and Qe (Si) after transition are output. Since no normalization has occurred in the (i + 1) th symbol encoding, Qe (Si) is selected. If normalization occurs again in the (i + 1) th symbol encoding, Qe (Si) after the transition may be selected.

【0262】第i+3シンボルのコンテクストはSiと異な
り、Sjであったとすると処理2114でコンテクストSjデー
タの読み出しが行われる。このとき処理2106でコンテク
ストRAMへの書き込みを行っているが、コンテクストRAM
は2-port RAMなので処理2106と処理2114は同一サイクル
で実行できる。
If the context of the i + 3th symbol is Sj, which is different from Si, the context Sj data is read in step 2114. At this time, the process 2106 is writing to the context RAM.
Is a 2-port RAM, processing 2106 and processing 2114 can be executed in the same cycle.

【0263】第i+3シンボルがコンテクストSiであれ
ば、処理2116ではデータの書き込みが優先され、読み出
しは行わない。処理2117では処理2112と同様にセレクタ
212の下側の入力を選んでQe ROMの読み出しを行う。こ
のようにQe ROM周辺は動作し、パイプラインハザードは
発生しないことが分かる。
If the (i + 3) th symbol is the context Si, the process 2116 gives priority to the writing of data and does not read it. In process 2117, the selector is the same as in process 2112.
Select the lower input of 212 to read Qe ROM. In this way, it can be seen that the area around the Qe ROM operates and no pipeline hazard occurs.

【0264】次に図25に戻り、最大シンボル長検出器20
6との関係について説明する。
Next, returning to FIG. 25, the maximum symbol length detector 20
The relationship with 6 is explained.

【0265】最大シンボル長検出器206では、同一のコ
ンテクストが連続するときに予め定めた範囲のシンボル
長の中で最大のシンボル長を選択する。本実施例では参
照画素が全白のコンテクストと全黒のコンテクストを対
象にする。
The maximum symbol length detector 206 selects the maximum symbol length from the symbol lengths in a predetermined range when the same context continues. In this embodiment, the reference pixels are all white contexts and all black contexts.

【0266】全白コンテクストは参照画素が全て白
(0)なので、このインデックスSを”0”、全黒コンテ
クストのインデックスSを”1023”とする。
Since the reference pixels in the all-white context are all white (0), the index S is set to "0", and the index S of the all-black context is set to "1023".

【0267】したがって、全白、全黒各コンテクストの
予測シンボルはMPS(0)、MPS(1023)と表される。
Therefore, the prediction symbols of the all-white and all-black contexts are represented as MPS (0) and MPS (1023).

【0268】図26に最大長シンボル検出器の構成例を示
す。この検出器は、全白領域について複数シンボルを一
括処理する場合の、一括処理できる最大のシンボル数を
検出するものである。
FIG. 26 shows a configuration example of the maximum length symbol detector. This detector detects the maximum number of symbols that can be collectively processed when a plurality of symbols are collectively processed for all white areas.

【0269】本実施の形態では、一括処理可能なシンボ
ル長として”64”、”32”、”16”および”8”の4つ
を定め、この中から最適なものを選択する。図26には処
理ユニット301が4つ並んでいる。右から64シンボル検
出ユニット、32シンボル検出ユニット、16シンボル検出
ユニット、8シンボル検出ユニットの順である。全て構
成は同じなので一つの処理ユニットを説明する。
In the present embodiment, four symbol lengths "64", "32", "16" and "8" are defined as batch processable symbol lengths, and the optimum symbol length is selected from these. In FIG. 26, four processing units 301 are lined up. From the right, the order is 64 symbol detection unit, 32 symbol detection unit, 16 symbol detection unit, 8 symbol detection unit. Since all the configurations are the same, one processing unit will be described.

【0270】一括符号化処理(連続符号化処理)できる
かどうかは、以下の条件によって定まる。 条件(C1):n個のコンテクストが同じで、符号化シンボ
ルがMPS(S)と同じ。 条件(C2):Areg-n・Qe(s)>=0x8000 ここで、”Areg”は、領域幅を表すレジスタの値であ
る。また、”0x”は、16進表示を表す。
Whether or not collective coding processing (continuous coding processing) is possible is determined by the following conditions. Condition (C1): n contexts are the same, and coded symbols are the same as MPS (S). Condition (C2): Areg-n · Qe (s)> = 0x8000 Here, “Areg” is the value of the register indicating the area width. Also, “0x” represents hexadecimal display.

【0271】一方、復号化のときは、以下の条件により
定まる。 条件(D1):n個のコンテクストが同じ 条件(D2):Areg-n・Qe(s)>=0x8000 条件(D3):Creg<Areg-n・Qe(s) ここで、”Creg”は、領域幅の中にとられた代表点を指
すレジスタの値である。
On the other hand, at the time of decoding, it is determined by the following conditions. Condition (D1): n contexts are the same Condition (D2): Areg-nQe (s)> = 0x8000 Condition (D3): Creg <Areg-nQe (s) where "Creg" is It is the value of the register that points to the representative point taken in the region width.

【0272】6ビットシフタ302ではQe(S)を64倍する。
演算器303ではAreg -64*Qe(S)を計算する。比較器304で
はAreg -64*Qe(S)と0x8000を比較し、結果を最大シンボ
ル長判定回路306に出力する。ここで条件(C2)、(D2)を
判定する。さらに復号化時の条件(D3)は比較器305によ
って比較される。
In the 6-bit shifter 302, Qe (S) is multiplied by 64.
The arithmetic unit 303 calculates Areg -64 * Qe (S). The comparator 304 compares Areg -64 * Qe (S) with 0x8000 and outputs the result to the maximum symbol length determination circuit 306. Here, the conditions (C2) and (D2) are determined. Further, the condition (D3) at the time of decoding is compared by the comparator 305.

【0273】コンテクストの連続条件や符号化時のMPS
の連続条件は同一コンテクスト/MPS64連続検出回路307
によって判定される。判定結果は最大シンボル長判定回
路306に送られる。以上の判定が、32シンボル、16シン
ボル、8シンボルに対して同様に同時に実行される。最
大シンボル長判定回路はこれらの判定結果をもとに連続
処理可能なシンボル長の最大値を決定する。連続処理可
能なシンボル長は2のn乗にしているので、シンボル長3
08はこのnを出力する。64シンボルであれば6を出力する
ことになる。また、連続処理できないときは”0”を出
力する。
[0273] Context continuous condition and MPS at encoding
The continuous conditions of the same context / MPS64 continuous detection circuit 307
It is judged by. The determination result is sent to the maximum symbol length determination circuit 306. The above determination is similarly simultaneously performed on 32 symbols, 16 symbols, and 8 symbols. The maximum symbol length determination circuit determines the maximum value of the symbol length that can be continuously processed based on these determination results. Since the symbol length that can be continuously processed is 2 to the n-th power, the symbol length is 3
08 outputs this n. If there are 64 symbols, 6 will be output. If continuous processing cannot be performed, "0" is output.

【0274】図25に戻り、最大シンボル長検出器と周辺
の関係を説明する。
Returning to FIG. 25, the relationship between the maximum symbol length detector and the surroundings will be described.

【0275】Qe ROM205は、Qe(0)とQe(1023)を出力す
る。ROM構成はQe ROM203とは異なり、出力データはQe値
だけあればよい。インデックス0とインデックス1023に
対するQe ROM205の状態番号は2本のレジスタ209に記憶
されている。
The Qe ROM 205 outputs Qe (0) and Qe (1023). The ROM configuration is different from the Qe ROM 203, and the output data only needs to have the Qe value. The state numbers of the Qe ROM 205 for the index 0 and the index 1023 are stored in the two registers 209.

【0276】レジスタの初期値はゼロで、正規化に伴っ
てレジスタの値は更新される。信号218はコンテクスト
の更新値である。インデックス検出回路210で2つのイ
ンデックスを検出し、レジスタ209を更新する。算術符
号器の入力データを切り替えるセレクタ214では、連続
処理の時は右側が選ばれる。算術符号器ではnシンボル
分の演算処理が行われる。
The initial value of the register is zero, and the value of the register is updated with the normalization. Signal 218 is the updated value of the context. The index detection circuit 210 detects two indexes and updates the register 209. The selector 214 that switches the input data of the arithmetic encoder selects the right side during continuous processing. The arithmetic encoder performs arithmetic processing for n symbols.

【0277】次に、図36を用いてパイプライン処理とシ
ンボル連続処理の相互動作について説明する。図36はパ
イプライン符号器とシンボル連続処理の切り替えタイミ
ング例を示す。ここでパイプライン符号器とは、図25の
コンテクスト生成器201、コンテクストRAM202、Qe ROM2
03および算術符号器204から構成されるシンボル逐次処
理を指す。
Next, the mutual operation of the pipeline processing and the symbol continuous processing will be described with reference to FIG. FIG. 36 shows an example of switching timing between the pipeline encoder and the symbol continuous processing. Here, the pipeline encoder means the context generator 201, the context RAM 202, and the Qe ROM2 of FIG.
It refers to symbol sequential processing composed of 03 and arithmetic encoder 204.

【0278】パイプライン符号器とシンボル連続処理部
は図39に示すように1画素ずらしたタイミングで常に動
作している。パイプライン符号器で第i画素を符号化し
ている時、最大シンボル長検出器は第i+1画素から符号
化できる最大シンボル長を常に検出している。
As shown in FIG. 39, the pipeline encoder and the symbol continuation processing section are always operating at the timing shifted by one pixel. When the i-th pixel is encoded by the pipeline encoder, the maximum symbol length detector always detects the maximum symbol length that can be encoded from the i + 1-th pixel.

【0279】図36の処理2201で、算術符号器204が第i画
素の符号化演算/正規化処理を実行しているとする。こ
の時、パイプライン符号器のQe ROMからは第i+1シンボ
ル用のQeが読み出されている(処理2202)。一方、最大
シンボル長検出器は処理2204と処理2205でコンテクスト
の連続性やAregが所定の条件を満足するかどうかの判定
を行っている。処理2201の初期段階でAregは演算される
ので、処理2205の演算結果が確定するのは、このサイク
ルの後半である。
In processing 2201 of FIG. 36, it is assumed that the arithmetic encoder 204 executes the encoding operation / normalization processing of the i-th pixel. At this time, Qe for the (i + 1) th symbol is read from the Qe ROM of the pipeline encoder (process 2202). On the other hand, the maximum symbol length detector determines in process 2204 and process 2205 whether the context continuity or Areg satisfies a predetermined condition. Since Areg is calculated in the initial stage of processing 2201, the calculation result of processing 2205 is finalized in the latter half of this cycle.

【0280】処理2204と処理2205の結果を合わせて最大
シンボル長が決定する。その結果、連続処理できない時
は処理2203でパイプライン処理が連続する。nシンボル
の連続処理が可能であれば、処理2207で算術符号器204
はnシンボルの連続符号化演算を行う。
The maximum symbol length is determined by combining the results of processing 2204 and processing 2205. As a result, when continuous processing cannot be performed, pipeline processing continues in step 2203. If continuous processing of n symbols is possible, in operation 2207 the arithmetic encoder 204
Performs a continuous encoding operation of n symbols.

【0281】これと同一サイクルで、コンテクスト生成
器内部の画像データをnビットシフトして、新しいコン
テクストの検出に備える。nシンボルの符号化演算の結
果、コンテクスト情報の更新が必要な時は処理2209で実
行する。このようにしてパイプライン処理から連続処理
に切り替わる。
In the same cycle as this, the image data in the context generator is shifted by n bits to prepare for the detection of a new context. If the context information needs to be updated as a result of the n-symbol encoding operation, it is executed in processing 2209. In this way, the pipeline processing is switched to the continuous processing.

【0282】逆に連続処理ができなくなるとパイプライ
ン処理に切り替える。このとき、パイプラインにデータ
は詰まっていないので、4段パイプラインであれば4クロ
ックのパイプライン遅延が生じる。この途中でパイプラ
イン処理から連続処理への切り替えは行わないように制
御する。連続処理からパイプライン処理への切り替えが
頻繁に起こるとパイプライン遅延のため、シンボル長が
短い時には高速化効果が小さくなる。
On the contrary, when continuous processing cannot be performed, the processing is switched to pipeline processing. At this time, since the pipeline is not clogged with data, a 4-stage pipeline causes a pipeline delay of 4 clocks. Control is performed so that switching from pipeline processing to continuous processing is not performed during this process. When the switching from continuous processing to pipeline processing occurs frequently, pipeline delay occurs. Therefore, when the symbol length is short, the speedup effect is small.

【0283】全白コンテクストに関しては、Qeは速やか
に最小値付近に収束するので連続符号化処理条件のうち
(C2)は比較的緩い条件であり、条件(C1)によって連続処
理は決定される。文書画像では行間や左右の余白など白
い部分はかたまっているので、このようなところでは予
め定めた最大値である64画素を連続して符号化できるこ
とが多く、1ページ全体での高速化効果は大きい。
Regarding the all-white context, Qe quickly converges to the vicinity of the minimum value.
(C2) is a relatively mild condition, and continuous processing is determined by the condition (C1). Since white parts such as line spacing and left and right margins are gathered in the document image, it is often possible to continuously encode 64 pixels, which is a predetermined maximum value, in such places, and the speedup effect for the entire page is large.

【0284】(2値画像の復号器)次に、復号化動作に
ついて説明する。まず高速算術復号器に共通して適用で
きる処理方式を説明する。図19(a)は、高速動作が可能
な、算術符号の復号器のブロック構成図である。なお、
図19(b)は、復元シンボルのコンテクストが構成するTre
eを示す。
(Binary Image Decoder) Next, the decoding operation will be described. First, a processing method that can be commonly applied to high-speed arithmetic decoders will be described. FIG. 19 (a) is a block diagram of an arithmetic code decoder capable of high-speed operation. In addition,
Fig. 19 (b) shows Tre that is composed of the context of the restored symbol.
indicates e.

【0285】この図は2値画像の復号と直交変換係数な
ど数値データの復号に共通する構成となっている。構成
要素はコンテクスト生成器1201、複数のコンテクストRA
M1202〜1205、セレクタ1206、1207、1210、Qe ROM120
8、1209、算術符号復号器1211、多値合成処理器1212で
ある。
This drawing has a configuration common to decoding of a binary image and decoding of numerical data such as an orthogonal transform coefficient. Constituent elements are context generator 1201, multiple context RAs
M1202-1205, selector 1206, 1207, 1210, Qe ROM120
8 and 1209, an arithmetic code decoder 1211, and a multilevel synthesis processor 1212.

【0286】符号器同様にコンテクスト生成処理、コン
テクストRAMのリード、Qe ROMのリード、算術符号の復
号処理がパイプライン接続され、各パイプラインステー
ジを1サイクルで実行する。多値データの復号化処理は
後に説明し、以下では2値画像の復号動作を説明する。
Similar to the encoder, the context generation processing, the context RAM reading, the Qe ROM reading, and the arithmetic code decoding processing are pipeline-connected, and each pipeline stage is executed in one cycle. The decoding process of multi-valued data will be described later, and the decoding operation of a binary image will be described below.

【0287】復号化では、現在復号しているシンボルに
よって、そのシンボルを含む将来のコンテクストが決ま
る。したがって、パイプライン処理するためには、これ
から起こる可能性のある複数コンテクストに対して並列
して処理を行い、一つのシンボルが復元され確定する毎
に並列して処理されたデータの中から必要なものを絞り
込む必要がある。
In decoding, the currently decoded symbol determines the future context containing that symbol. Therefore, in order to perform pipeline processing, multiple contexts that may occur in the future are processed in parallel, and each time one symbol is restored and confirmed, it is necessary to process the data in parallel. It is necessary to narrow things down.

【0288】図19(b)は、復元シンボルのコンテクスト
が構成するTreeを示す。いま、i番目のシンボルDiをコ
ンテクストSiで復元しているとする。Diは”0”また
は”1”であるから、コンテクストSiを表すノードが2つ
に分かれて、次のコンテクストSi+1になる。Si+1からの
分岐も同様にして、Si+2は復元シンボルDiとDi+1の組み
合わせで4通りの可能性がある。このように構成され
た、コンテクストの分岐を表すTreeをContext Treeと呼
ぶことにする。復号器はこのContext Treeにしたがって
パイプライン処理を行う。算術符号復号器1211がコンテ
クストSiでシンボルDiを復元しているとする。パイプラ
イン処理であるから、それと同一サイクルでQe ROM1208
とQe ROM1209からは次のコンテクストSi+1を想定してQ
e値の読み出しが行われている。Qe ROM 1208をDi=0とし
たコンテクスト、Qe ROM 1209をDi=1としたコンテクス
トである。Diが復元されると、その値によってセレクタ
1210で選択され、次のコンテクストSi+1における復号化
処理に必要なQe値が算術符号復号器1211に供給される。
これと同様に、コンテクストRAM読み出し処理では、コ
ンテクストSi+2用にコンテクスト情報の読み出しが同一
サイクルで行われている。復号シンボルDiが確定する
と、可能な候補はセレクタ1206と1207で半分に絞られ
る。
FIG. 19 (b) shows a Tree formed by the context of the restored symbol. Now, assume that the i-th symbol Di is restored in the context Si. Since Di is "0" or "1", the node representing the context Si is divided into two and becomes the next context Si + 1. Similarly for the branch from Si + 1, there are four possibilities for Si + 2 by combining the restoration symbols Di and Di + 1. The Tree having the above-described structure and representing a branch of the context will be referred to as a Context Tree. The decoder performs pipeline processing according to this Context Tree. It is assumed that the arithmetic code decoder 1211 restores the symbol Di in the context Si. Since it is pipeline processing, Qe ROM1208 is used in the same cycle as it.
And from Qe ROM 1209, assuming the following context Si + 1, Q
The e value is being read. Qe ROM 1208 has Di = 0 context, and Qe ROM 1209 has Di = 1 context. When Di is restored, its value selects
The Qe value selected in 1210 and necessary for the decoding process in the next context Si + 1 is supplied to the arithmetic code decoder 1211.
Similarly, in the context RAM reading process, the reading of the context information for the context Si + 2 is performed in the same cycle. When the decoded symbol Di is decided, possible candidates are narrowed down to half by the selectors 1206 and 1207.

【0289】このようにしてパイプライン処理が行われ
ていく。このパイプライン復号器をContext Tree Decod
er と呼ぶことにする。Context Tree Decoderではコン
テクスト生成器の出力は1つのインデックスではなく、
複数のインデックス1213〜1216となる。これらをまとめ
てインデックスベクトルと呼ぶ。
Pipeline processing is performed in this manner. Context Tree Decod this pipeline decoder
I'll call it er. In Context Tree Decoder, the output of context generator is not one index,
There will be multiple indexes 1213-1216. These are collectively called an index vector.

【0290】図27と図28は、図25に対応する復号器のブ
ロック構成図である。これらの図を参照して復号動作を
説明する。
27 and 28 are block configuration diagrams of a decoder corresponding to FIG. The decoding operation will be described with reference to these figures.

【0291】図19(a)による概念説明から分かるよう
に、主な構成要素はコンテクスト生成器1301、4つのコ
ンテクストRAM1302〜1305、2つのQe ROM1310、1311、
算術復号演算器1314、最大シンボル長検出器1316、およ
びタイミングを制御する復号器タイミング制御部1317で
ある。復号器タイミング制御部は、符号器同様にパイプ
ラインタイミングやパイプライン復号器と最大シンボル
長復号処理の切り替え制御を行うブロックである。
As can be seen from the conceptual description with reference to FIG. 19A, the main constituent elements are the context generator 1301, four context RAMs 1302-1305, two Qe ROMs 1310, 1311,
An arithmetic decoding arithmetic unit 1314, a maximum symbol length detector 1316, and a decoder timing control unit 1317 for controlling timing. The decoder timing control unit is a block that performs pipeline timing and switching control between the pipeline decoder and the maximum symbol length decoding process, like the encoder.

【0292】最大シンボル長検出器1316とそれに接続す
るQe ROM1315は、符号器で使われたものと全く同じであ
る。図19(a)と同様に、算術復号演算器1314ではi番目の
シンボルDiをコンテクストSiで復元しているとする。
The maximum symbol length detector 1316 and the Qe ROM 1315 connected to it are exactly the same as those used in the encoder. Similar to FIG. 19A, it is assumed that the arithmetic decoding operator 1314 restores the i-th symbol Di in the context Si.

【0293】コンテクスト生成器1301はコンテクストの
インデックスベクトルを生成する。ベクトルの要素はDi
とDi+1の組み合わせによって図示するように、Si+2(Di+
1=0/Di=0)、Si+2(Di+1=0/Di=1)、Si+2(Di+1=1/Di=0)、S
i+2(Di+1=1/Di=1)である。添え字は第i+2シンボル用
のコンテクストインデックスであることを表し、括弧内
はこれから復元されるシンボルに対する条件である。
The context generator 1301 generates a context index vector. The elements of the vector are Di
And Di + 1 as shown in the figure, Si + 2 (Di +
1 = 0 / Di = 0), Si + 2 (Di + 1 = 0 / Di = 1), Si + 2 (Di + 1 = 1 / Di = 0), S
i + 2 (Di + 1 = 1 / Di = 1). The subscript indicates that it is the context index for the (i + 2) th symbol, and the values in parentheses are the conditions for the symbol to be restored.

【0294】以下、これと同じように記号を使う。コン
テクストRAM1302 からは第i+2シンボル用のQe ROMの状
態番号Qe-index i+2とシンボル予測値MPSi+2が出力され
ている。他のコンテクストRAMの出力も同様である。
Hereinafter, symbols are used in the same manner as this. The context RAM 1302 outputs the Qe ROM state number Qe-index i + 2 and the symbol prediction value MPSi + 2 for the i + 2th symbol. The output of other context RAMs is similar.

【0295】セレクタ1306〜1309ではDi=0のときに上
側、Di=1のときに下側が選択されるものとする。したが
って、例えばセレクタ1306の上側の入力信号はQe-index
i+2(Di+1=0/Di=0)、下側の入力信号はQe-index i+2(Di
+1=0/Di=1)となる。他も同様である。パイプラインレジ
スタは図示していないが、セレクタ1306〜1309、セレク
タ1312、1313の出力段に入っているものとする。
It is assumed that the selectors 1306 to 1309 select the upper side when Di = 0 and the lower side when Di = 1. Therefore, for example, the input signal on the upper side of the selector 1306 is Qe-index.
i + 2 (Di + 1 = 0 / Di = 0), the lower input signal is Qe-index i + 2 (Di
+ 1 = 0 / Di = 1). Others are the same. Although not shown, the pipeline registers are assumed to be included in the output stages of the selectors 1306 to 1309 and the selectors 1312 and 1313.

【0296】セレクタ1312とセレクタ1313からは、各々
Diの復号演算に必要なQe値QeiとMPS予測値MPSiを出力し
ている。MPSiは最大シンボル長検出器からの予測値とセ
レクタ1318を通して算術復号演算器に供給されている。
セレクタ1318の選択条件はパイプライン復号器による逐
次処理を行うのか、複数シンボルの連続処理を行うのか
によって決まる。
From the selector 1312 and the selector 1313,
It outputs Qe value Qei and MPS prediction value MPSi required for Di decoding operation. MPSi is supplied to the arithmetic decoding arithmetic unit through the predicted value from the maximum symbol length detector and the selector 1318.
The selection condition of the selector 1318 is determined by whether the pipeline decoder performs sequential processing or continuous processing of a plurality of symbols.

【0297】Diが復号されると、その値に応じてセレク
タ1312からは次のQe値Qei+1(Di=0)またはQei+1(Di=1)
が算術復号演算器に供給される。このとき、セレクタ13
13からはMPSi+1(Di=0)またはMPSi+1(Di=1)が出力され
る。この状態で第i+1シンボルDi+1が復号される。
When Di is decoded, the next Qe value Qei + 1 (Di = 0) or Qei + 1 (Di = 1) is output from the selector 1312 according to the value of Di.
Is supplied to the arithmetic decoding calculator. At this time, the selector 13
MPSi + 1 (Di = 0) or MPSi + 1 (Di = 1) is output from 13. In this state, the i + 1th symbol Di + 1 is decoded.

【0298】同様に上記の信号の変化に同期して、セレ
クタ1306からはシンボルDiの値に応じて、Qe-index i+2
(Di+1=0/Di=0)またはQe-index i+2(Di+1=0/Di=1)が出
力され、これが現時点のデータQe-indexi+1(Di=0)に置
き換わってQe-indexi+2(Di+1=0)となる。他のセレクタ1
307〜1309も同様にDiの値によってDi+2を復号化する信
号が選択される。コンテクスト生成器でもこの信号変化
に同期して、新しいインデックスベクトルが出力され
る。
Similarly, in synchronization with the above signal change, the selector 1306 outputs Qe-index i + 2 according to the value of the symbol Di.
(Di + 1 = 0 / Di = 0) or Qe-index i + 2 (Di + 1 = 0 / Di = 1) is output, and this is replaced by the current data Qe-index i + 1 (Di = 0) It becomes Qe-indexi + 2 (Di + 1 = 0). Other selector 1
Similarly for 307 to 1309, a signal for decoding Di + 2 is selected according to the value of Di. The context generator also outputs a new index vector in synchronization with this signal change.

【0299】図37は以上の動作をタイムチャートで示し
たものである。
FIG. 37 is a time chart showing the above operation.

【0300】クロックiではDiの復号化2301、QeROMの読
み出し2302、2303、コンテクストRAMの読み出し2304〜2
307を実行している。Di=0と復元されると、クロックi+1
では必要に応じてコンテクストの更新、Di+1の復号化、
Di+2用のQe ROMの読み出し2310、2311が実行される。Di
+1=0であれば図示するようにQe RD(Di+1=0)の信号が選
択される。これを繰り返してパイプライン復号化が実行
される。
At clock i, Di decoding 2301, QeROM reading 2302, 2303, and context RAM reading 2304-2
Running 307 When restored as Di = 0, clock i + 1
Then, if necessary, context update, Di + 1 decoding,
The reading 2310 and 2311 of the Qe ROM for Di + 2 is executed. Di
If + 1 = 0, the signal of Qe RD (Di + 1 = 0) is selected as shown in the figure. By repeating this, pipeline decoding is executed.

【0301】図28は、図27のコンテクストRAM1302、130
3とQe ROM1310の周辺を詳細に示したものである。Qe RO
Mの内容とその周辺、およびコンテクストRAM周辺は符号
器の構成と同一である。セレクタ1405、1406は正規化が
発生した直後の同一コンテクストの復号化で入力信号を
選択する。
FIG. 28 shows the context RAMs 1302 and 130 of FIG.
3 and the area around Qe ROM 1310 are shown in detail. Qe RO
The contents of M and its periphery and the context RAM are the same as the encoder. Selectors 1405 and 1406 select an input signal by decoding the same context immediately after normalization occurs.

【0302】シンボルの連続復号化が有効なコンテクス
トは、符号化同様にコンテクストは全白(index-0)と全
黒(index-1023)である。index-0の検出器1402とレジス
タ1403はシンボル連続復号化処理に使用する。レジスタ
1403の出力はindex-0におけるMPS予測値であるMPS(0)と
QeROMの状態番号Qe-index(0)である。index-1023につい
て、これらのコンテクスト情報は図示していないが、コ
ンテクストRAM1305周辺から同様の構成で出力される。
Similar to the encoding, the context in which the continuous decoding of symbols is effective is the all white (index-0) and all black (index-1023) contexts. The index-0 detector 1402 and the register 1403 are used for symbol continuous decoding processing. register
The output of 1403 is MPS (0), which is the MPS prediction value at index-0.
This is the QeROM status number Qe-index (0). Although not shown, the context information of index-1023 is output from the context RAM 1305 peripheral area in the same configuration.

【0303】これらの信号が図27のQe ROM1315や最大シ
ンボル長検出器1316に入る。これらの信号に基づく、最
大シンボル長検出の動作は符号化の場合と同じである。
また、パイプライン復号器とシンボルの連続復号化の切
り替えも符号化同様にして実現できる。以上のようにし
て2値画像の復号化が高速に実行できる。
These signals enter the Qe ROM 1315 and the maximum symbol length detector 1316 of FIG. The operation of maximum symbol length detection based on these signals is the same as in the case of encoding.
Further, switching between the pipeline decoder and the continuous decoding of symbols can be realized in the same manner as the encoding. As described above, the binary image can be decoded at high speed.

【0304】(多値画像の符号化・復号化)多値画像の
符号化・復号化については、前掲の実施の形態2で、図
10〜図18を用いて詳細に説明したとおりであり、ここで
は、詳細な説明は省略する。
(Encoding / Decoding of Multivalued Image) Encoding / decoding of a multivalued image will be described in the above-mentioned Embodiment 2.
This is as described in detail with reference to FIGS. 10 to 18, and detailed description is omitted here.

【0305】すなわち、予め定めた手順に従う2値分解
処理により、DCT変換係数のAC成分/DC成分を区別する
ことなく、符号化シンボルを生成していき、これに合わ
せて、AC成分/DC成分を区別することなく共通のコンテ
クストを使用し、そのコンテクストを一定の速度で連続
的に供給し、ハザードレスのパイプライン算術符号化・
復号化を達成するものである。
That is, the coded symbols are generated without distinguishing the AC component / DC component of the DCT transform coefficient by the binary decomposition processing according to the predetermined procedure, and in accordance with this, the AC component / DC component is generated. The common context is used without distinction, and the context is continuously supplied at a constant speed.
It achieves decryption.

【0306】コンテクスト生成器が記憶するテーブルの
内容の例が、図29,図30に示される。図29は、符号化用
のコンテクストインデックスの状態遷移テーブルであ
り、図30は、復号化用のコンテクストインデックスの状
態遷移テーブルである。
An example of the contents of the table stored in the context generator is shown in FIGS. 29 and 30. 29 is a state transition table of a context index for encoding, and FIG. 30 is a state transition table of a context index for decoding.

【0307】本発明では、敢えて、DC成分とAC成分とを
区別せず、双方の成分データに対し、共通のコンテクス
トを割り当てる。このようにすれば、圧縮率はやや劣化
するものの、図43(a)に示すような、DC成分/AC成分の
終わりを判定する処理はまったく不要となる。つまり、
図44(a)に示すように、DC成分/AC成分の境界を判定す
る必要がないため、図44(b)に示すように、コンテク
ストのツリーは一つのツリーに統一化される。
In the present invention, the DC component and the AC component are intentionally not distinguished, and a common context is assigned to both component data. In this way, although the compression rate is slightly deteriorated, the process of determining the end of the DC component / AC component as shown in FIG. 43 (a) is completely unnecessary. That is,
As shown in FIG. 44 (a), since it is not necessary to determine the boundary between the DC component / AC component, the context tree is unified into one tree as shown in FIG. 44 (b).

【0308】このように、パイプライン処理による高速
性を何よりも重要と考え、従来のように、符号量を第1
とする考え方を採用しない点に本実施の形態の特徴があ
る。
In this way, the high speed of pipeline processing is considered to be of utmost importance, and the code amount is set to the first level as in the conventional case.
The feature of the present embodiment is that the above-mentioned idea is not adopted.

【0309】コンテクストが共通であれば、シンボルの
復元は連続的に実行可能であり、DC/AC信号の再構成処
理は復号動作とは別の回路で並行動作が可能となる。よ
って、装置の簡素化も達成される。
If the context is common, symbol restoration can be continuously executed, and the DC / AC signal reconstruction processing can be performed in parallel by a circuit different from the decoding operation. Therefore, simplification of the device is also achieved.

【0310】(多値画像圧縮の応用例)今まで説明した
高速算術符号器復号器の応用例について説明する。2値
画像のJBIG符号化や多値画像の直交変換符号化は直接的
応用として明らかなので、ここでは適応量子化に関する
応用例を説明する。
(Application Example of Multi-Valued Image Compression) An application example of the high-speed arithmetic encoder / decoder described above will be described. Since JBIG coding of binary images and orthogonal transform coding of multivalued images are obvious as direct applications, here we will describe application examples related to adaptive quantization.

【0311】図31は、DCTなどの直交変符号化に量子化
器の適応制御機能を加えた例である。算術符号器1701は
本発明の実施例による符号器である。
FIG. 31 shows an example in which an adaptive control function of a quantizer is added to orthogonal variable coding such as DCT. Arithmetic encoder 1701 is an encoder according to an embodiment of the present invention.

【0312】直交変換符号化は直交変換器1705、量子化
器1702および算術符号器1701によって構成される。直交
変換はJPEGのように8x8画素単位に実行するものとす
る。
The orthogonal transform coding is composed of an orthogonal transformer 1705, a quantizer 1702 and an arithmetic encoder 1701. Orthogonal transformation shall be performed in 8x8 pixel units like JPEG.

【0313】直交変換符号化では圧縮性能を上げると急
峻なエッジ部分でリンギングノイズが発生する。これを
改善するには、例えばブロック毎にエッジ成分があるか
どうかをエッジ検出回路1704で検出し、その出力信号が
所定値以上のときに量子化テーブル1703のスケーリング
係数を変化させ、量子化ステップ幅を小さくしてやれば
よい。
In orthogonal transform coding, if the compression performance is improved, ringing noise is generated at a steep edge portion. To improve this, for example, the edge detection circuit 1704 detects whether there is an edge component for each block, and when the output signal is a predetermined value or more, the scaling coefficient of the quantization table 1703 is changed, and the quantization step You can reduce the width.

【0314】エッジ検出回路は水平方向と垂直方向のエ
ッジ検出フィルタを組みあわせて構成できる。復号器に
量子化器のスケーリング情報を伝えるため、スケーリン
グ係数を符号化する必要がある。スケーリング係数は、
頻繁には変化しないのでDC成分として差分値を符号化す
ればよい。そうすると、各ブロックの符号化情報はスケ
ーリング係数と64個の直交変換係数の計65個となる。こ
のうち2個がDC成分、63個がAC成分として符号化され
る。
The edge detection circuit can be configured by combining edge detection filters in the horizontal and vertical directions. In order to convey the quantizer scaling information to the decoder, the scaling factors need to be encoded. The scaling factor is
Since it does not change frequently, the difference value may be encoded as a DC component. Then, the coding information of each block is 65 in total including the scaling coefficient and the 64 orthogonal transform coefficients. Of these, two are encoded as DC components and 63 as AC components.

【0315】図32は、本発明による算術符号器1801をレ
ート制御符号化に用いた例を示す。デジタルコピーなど
ではバッファメモリに画像を符号化して格納する際に符
号化レートを所定範囲で一定に保てると便利である。
FIG. 32 shows an example in which the arithmetic encoder 1801 according to the present invention is used for rate control encoding. In digital copying and the like, it is convenient to keep the coding rate constant in a predetermined range when encoding and storing an image in the buffer memory.

【0316】このような場合には、ブロック毎または複
数ブロックから定義されたマクロブロック毎に符号化レ
ートが所定範囲に収まるように量子化ステップ幅を制御
してやればよい。ブロック毎にレート制御する場合は、
符号化情報はスケーリング係数と64個の周波数成分であ
る。より複雑なモデルでは、周波数成分以外に符号化す
べき情報が増えることになるが、それを含むようにコン
テクスト領域やDC成分を1ブロック遅延させるためのレ
ジスタ(図12の参照符号502)などを予め多めに実装し
ておけばよい。
In such a case, the quantization step width may be controlled so that the coding rate falls within a predetermined range for each block or for each macroblock defined from a plurality of blocks. When controlling the rate for each block,
The coding information is a scaling coefficient and 64 frequency components. In a more complicated model, the information to be encoded increases in addition to the frequency component, but the context area and the register (reference numeral 502 in FIG. 12) for delaying the DC component by one block so as to include it in advance. You should implement more.

【0317】符号化情報が増えてもコンテクストモデル
は変わらないので、本実施例のように構成した符号器復
号器は各種の応用に柔軟に対応できる。
Since the context model does not change even if the number of encoded information increases, the encoder / decoder configured as in this embodiment can flexibly cope with various applications.

【0318】高速動作可能なDCT変換器や量子化器と本
発明による算術符号器を組み合わせると、上記のような
応用例においても全体として極めて高速な符号器を実現
できる。
By combining the DCT converter or quantizer capable of high-speed operation with the arithmetic encoder according to the present invention, an extremely high-speed encoder as a whole can be realized even in the above-mentioned application example.

【0319】本発明の算術符号・復号器を搭載したデジ
タル複合機(コピー機能とファックス機能を併せ持つ機
器)の全体構成を図49に示す。
FIG. 49 shows the overall configuration of a digital multi-function peripheral (equipment having both a copy function and a fax function) equipped with the arithmetic code / decoder of the present invention.

【0320】本発明の算術符号・復号器は、QM符号/復
号化回路105に搭載される。図示されるように、このデ
ジタル機器101は、ホストプロセッサ102と、MH/MR/MM
R符号/復号化回路103と、画像処理回路104と、QM符号
/復号化回路105と、画像ラインメモリ106と、符号メモ
リ107と、モデムなどの通信インタフェース108と、スキ
ャナなどの画像入力装置111と、プリンタなどの画像記
録/表示装置112と、を有する。本発明により、従来に
ない高速性,柔軟な拡張性を有する高機能のデジタル機
器が実現される。
The arithmetic code / decoder of the present invention is mounted on the QM code / decoding circuit 105. As shown, the digital device 101 includes a host processor 102, an MH / MR / MM
R code / decoding circuit 103, image processing circuit 104, QM code / decoding circuit 105, image line memory 106, code memory 107, communication interface 108 such as a modem, and image input device 111 such as a scanner. And an image recording / display device 112 such as a printer. According to the present invention, it is possible to realize a highly functional digital device having an unprecedentedly high speed and flexible expandability.

【0321】(本実施の形態のシミュレーション結果)
以下、本発明の効果をシミュレーションデータに基づい
て説明する。本発明の高速処理に関する効果は次の通り
である。 (1)連続して符号化復号化するシンボル長の適応化に
よる高速化効果(2値画像に適用) (2)パイプラインハザードを防止することによるパイ
プライン処理の高速化効果(2値、多値画像に適用) (3)DC成分、AC成分のコンテクストを共通化してパイ
プライン処理を可能としたことによる高速化効果(多値
画像に適用) 図45は、2値画像の符号化処理速度のシミュレーション
結果を示す。横軸は圧縮率、縦軸は1シンボル当りのサ
イクル数(クロック数)である。文書画像、ハーフトー
ン画像、これらの混在画像およびランダム画像につい
て、1ページ単位の圧縮率と符号化に要したサイクル数
を求め、それらの関係をプロットしたものである。
(Results of Simulation of this Embodiment)
Hereinafter, the effect of the present invention will be described based on simulation data. The effects of the high speed processing of the present invention are as follows. (1) Speed-up effect by adapting symbol length for continuous encoding / decoding (applied to binary image) (2) Speed-up effect of pipeline processing by preventing pipeline hazard (binary, multi-valued) (Applicable to binary images) (3) Speed-up effect by enabling pipeline processing by sharing the context of DC and AC components (Applied to multi-valued images) Fig. 45 shows the coding processing speed of binary images The simulation result of is shown. The horizontal axis represents the compression rate and the vertical axis represents the number of cycles (clock number) per symbol. For the document image, the halftone image, a mixed image of these images, and the random image, the compression ratio per page and the number of cycles required for encoding are obtained, and the relationship between them is plotted.

【0322】パイプライン処理とシンボルの連続処理の
切り替えには多少の余裕を持たせて処理速度を計算して
いる。この図を見ると、圧縮率0.5以下で連続処理によ
る効果が現われていることが分かる。おおよそである
が、圧縮率0。2以下が文書画像である。圧縮率0.2〜
0.5が混在画像やハーフトーン画像、圧縮率0。5以上が
黒率の異なるランダム画像である。文書画像における高
速化効果は大きく、0。2サイクル/シンボル程度で符号
化できることが分かる。1シンボルは1画素であるから、
80MHzのクロックで動作させたとき、400M画素/秒の処
理性能が実現できることを示している。
The processing speed is calculated with some allowance for switching between pipeline processing and continuous symbol processing. From this figure, it can be seen that the effect of continuous processing appears when the compression rate is 0.5 or less. The document image has a compression ratio of 0.2 or less. Compression rate 0.2-
0.5 is a mixed image or halftone image, and compression ratios of 0.5 or more are random images with different black ratios. It can be seen that the speed-up effect on the document image is large, and the coding can be performed at about 0.2 cycle / symbol. Since 1 symbol is 1 pixel,
It shows that a processing performance of 400M pixels / second can be realized when operated with an 80MHz clock.

【0323】また、本発明では複数のシンボル長を並列
して同時判定しているので文字とハーフトーンの混在画
像など比較的複雑な画像でも高速化効果があるのが特徴
である。従来のように例えば、連続シンボル長を64だけ
にすると、0.3や0.4など圧縮率の小さいところで処理
速度は1サイクル/シンボルとなってしまう。
Further, in the present invention, since a plurality of symbol lengths are simultaneously judged in parallel, it is characterized in that the speedup effect can be obtained even for a relatively complicated image such as a mixed image of characters and halftones. For example, if the continuous symbol length is only 64 as in the conventional case, the processing speed becomes 1 cycle / symbol at a low compression rate such as 0.3 or 0.4.

【0324】図46は、パイプラインハザードの防止効果
を示す。この図は1ライン毎の処理速度をライン毎にプ
ロットしたものである。横軸はライン数、縦軸は1シン
ボル当りの処理サイクル数である。
FIG. 46 shows the effect of preventing pipeline hazards. This figure is a plot of the processing speed for each line. The horizontal axis represents the number of lines, and the vertical axis represents the number of processing cycles per symbol.

【0325】テスト画像は圧縮率が約0.5となるランダ
ム画像を用いた。上側のプロットは従来のQe ROMの構成
による符号器の性能を示し、下側のプロットが本発明に
よる符号器の性能を表す。従来構成ではパイプラインの
乱れによって、本発明に対して5%〜10%性能が劣化し
ていることが分かる。画像パターンを変化させたとき、
劣化の最大値がどうなるかは、評価するのが難しい問題
である。画像によっては更に劣化が大きくなる可能性も
ある。本発明ではこのようなことを憂慮する必要はな
い。
As the test image, a random image having a compression rate of about 0.5 was used. The upper plot shows the performance of the encoder according to the conventional Qe ROM configuration, and the lower plot shows the performance of the encoder according to the present invention. It can be seen that in the conventional configuration, the performance is degraded by 5% to 10% with respect to the present invention due to the disturbance of the pipeline. When changing the image pattern,
What is the maximum value of deterioration is a difficult problem to evaluate. Depending on the image, the deterioration may be greater. In the present invention, it is not necessary to worry about this.

【0326】図47の下側のプロット(点線)は多値画像
の符号化処理速度のシミュレーションデータである。
The lower plot (dotted line) in FIG. 47 is simulation data of the encoding processing speed of a multivalued image.

【0327】JPEG同様に直交変換はDCT変換とし、変換
係数を予め定めた量子化テーブルを使って量子化し、量
子化値を本発明によるコンテクストモデルを使って符号
化した。2進分解したデータ列は1シンボルが1サイクル
で符号化できるものとして符号化のサイクル数を計数し
た。
Similar to JPEG, the orthogonal transform is a DCT transform, the transform coefficient is quantized using a predetermined quantization table, and the quantized value is encoded using the context model according to the present invention. The number of coding cycles was counted assuming that the binary decomposed data string can be coded in one cycle for one symbol.

【0328】横軸は量子化器のスケーリング計数、縦軸
は1画素あたりのサイクル数である。量子化テーブルはJ
PEG Annex−Kに記載されたテーブルを使用した。スケー
リング係数2。0は量子化テーブル値の1/2の値で量子化
することを示す。
The horizontal axis is the scaling factor of the quantizer, and the vertical axis is the number of cycles per pixel. Quantization table is J
The table described in PEG Annex-K was used. A scaling coefficient of 2.0 indicates that quantization is performed with a half value of the quantization table value.

【0329】テスト画像は人物写真画像である。図47の
上側のプロットはDC成分、AC成分を別々のコンテクスト
としてパイプライン処理した場合の処理速度を示した。
1シンボル復号する毎にDC/ACのコンテクスト切り替え
の判定のため、2サイクル/シンボルとした。またDC/AC
の境界でパイプラインを初期化するサイクル数もカウン
トした。
The test image is a portrait image. The upper plot in FIG. 47 shows the processing speed when pipeline processing is performed with the DC component and the AC component as separate contexts.
Two cycles / symbol were used for determining the DC / AC context switching each time one symbol was decoded. DC / AC
The number of cycles to initialize the pipeline at the boundary of is also counted.

【0330】この図によると、スケーリング係数1.0で
は、パイプライン処理によって1サイクル/画素以下で
符号化できることを示している。本発明の原理上、復号
化も同一速度となる。本発明は、パイプライン処理に適
するようにDC成分とAC成分のコンテクストを共通化し、
コンテクストのインデックスやインデックスベクトルを
状態遷移テーブルに基づいて生成できるようにした。こ
うすることによってパイプライン化が容易となり、特に
復号器において、高速処理効果が上がる。その反面、コ
ンテクストを共通化によって圧縮性能が低下するという
欠点がある。次に、この劣化がどの程度であるかを評価
する。
According to this figure, it is shown that the scaling factor of 1.0 enables encoding by 1 cycle / pixel or less by pipeline processing. According to the principle of the present invention, the decoding speed becomes the same. The present invention standardizes the context of the DC component and the AC component so as to be suitable for pipeline processing,
The context index and index vector can now be generated based on the state transition table. This facilitates pipeline processing, and particularly in the decoder, the high-speed processing effect is improved. On the other hand, there is a drawback in that the compression performance is lowered by sharing the context. Next, the degree of this deterioration is evaluated.

【0331】図48は図45と同じテスト画像を用いて圧縮
性能を評価したものである。横軸は図45同様にスケーリ
ング係数、縦軸は圧縮率を表す。この図で上側のプロッ
トは、図42に示した従来例の圧縮性能、下側は本発明に
よる符号器の圧縮性能である。スケーリング係数によっ
て変動するが劣化は約3%であった。この劣化は主にDC
成分の符号化で発生している。
FIG. 48 shows the evaluation of compression performance using the same test image as in FIG. Similar to FIG. 45, the horizontal axis represents the scaling coefficient and the vertical axis represents the compression rate. In this figure, the upper plot shows the compression performance of the conventional example shown in FIG. 42, and the lower plot shows the compression performance of the encoder according to the present invention. Deterioration was about 3% although it varied depending on the scaling factor. This deterioration is mainly DC
It occurs in the encoding of the component.

【0332】本発明による実施例では、DC成分として符
号化する信号は差分値を符号化する簡単な構成である。
圧縮率はより高度な信号予測を導入することによって改
善できる。高速のデジタルコピーや、そのFAX複合機で
は僅かな圧縮性能の差よりも高速性能が重要である。こ
れらの装置に限らず高速性能が要求される応用分野では
本発明の効果は大きい。
In the embodiment according to the present invention, the signal encoded as the DC component has a simple configuration for encoding the difference value.
The compression rate can be improved by introducing more advanced signal prediction. High-speed performance is more important than high-speed digital copying and the slight difference in compression performance of the fax machine. The effect of the present invention is great not only in these devices but also in application fields requiring high-speed performance.

【0333】本発明の効果は高速化だけではなく、2値
画像の符号化や多値データの符号化に共通して使用でき
るCODECを実現できる点にも特徴がある。また、本発明
の説明では、算術符号としてQM-coderを用いたが、本発
明はこれに限るものではなく他の算術符号においても同
様に適用できるものである。
The effect of the present invention is not only high in speed, but also characterized in that a CODEC that can be commonly used for encoding binary images and encoding multivalued data can be realized. Further, although the QM-coder is used as the arithmetic code in the description of the present invention, the present invention is not limited to this and can be similarly applied to other arithmetic codes.

【0334】[0334]

【発明の効果】以上、説明したように本発明は、下記の
〜の効果を有する。 現在のコンテクストに対する確率Qeのみならず、未来
における確率Qeも並列に出力しておき、状況に応じてそ
れらを選択する構成として(確率推定テーブルの構成を
そのような処理が可能なように変更して)、パイプライ
ンの乱れを除去し、超高速処理を可能とした。 DC成分/AC成分を区別することなく、所定の手順に従
う機械的な2値分解処理と、共通のコンテクストを設定
することにより、多値画像データについても、ハザード
レスのパイプライン処理を実現した。また、処理が簡素
化されるため、柔軟な拡張性やハードウエア量の削減と
いった効果も得ることができる。 余白や行間部分について、画像の複雑さや解像度に応
じて、適応的に一括処理シンボル数を変化させつつ、一
括符号化・復号化処理を行うことにより、さらなる高速
処理を実現した。 これらの結果、本発明によれば、2値画像や多値画像
を柔軟に処理し、かつ、ほとんど算術符号のアルゴリズ
ムで決まる限界の速度でもって処理できる、画期的なコ
ーデックを実現することができる。
As described above, the present invention has the following effects (1) to (3). Not only the probability Qe for the current context but also the probability Qe in the future are output in parallel, and as a configuration for selecting them according to the situation (change the configuration of the probability estimation table to enable such processing). ), Eliminating the turbulence of the pipeline, enabling ultra-high speed processing. By distinguishing between DC and AC components, a mechanical binary decomposition process according to a predetermined procedure and a common context are set to realize a hazardless pipeline process for multi-valued image data. Further, since the processing is simplified, it is possible to obtain effects such as flexible expandability and reduction in the amount of hardware. By performing batch encoding / decoding processing while adaptively changing the number of batch processing symbols according to the complexity and resolution of the image, the margins and line spacings achieve higher speed processing. As a result, according to the present invention, it is possible to realize an epoch-making codec capable of flexibly processing a binary image or a multi-valued image and processing at a limit speed almost determined by an arithmetic code algorithm. it can.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のハザードレスパイプライン算術符号器
の全体構成を示すブロック図
FIG. 1 is a block diagram showing an overall configuration of a hazardless pipeline arithmetic encoder according to the present invention.

【図2】本発明における確率推定メモリの構成例を示す
FIG. 2 is a diagram showing a configuration example of a probability estimation memory according to the present invention.

【図3】図1の算術符号器の動作(パイプライン動作)
を説明するためのタイミング図
3 is an operation of the arithmetic encoder of FIG. 1 (pipeline operation)
Timing diagram to explain

【図4】本発明のハザードレスパイプライン算術復号器
の全体構成を示すブロック図
FIG. 4 is a block diagram showing the overall configuration of a hazardless pipeline arithmetic decoder according to the present invention.

【図5】図4の算術復号器のQe ROMの周辺の構成を詳細
に示すブロック図
5 is a block diagram showing in detail the configuration around the Qe ROM of the arithmetic decoder of FIG.

【図6】図4の算術復号器の動作(パイプライン動作)
を説明するためのタイミング図
6 is an operation of the arithmetic decoder of FIG. 4 (pipeline operation)
Timing diagram to explain

【図7】本発明の算術符号器の特徴的な動作を説明する
ためのフロー図
FIG. 7 is a flowchart for explaining the characteristic operation of the arithmetic encoder of the present invention.

【図8】本発明の算術復号器の特徴的な動作を説明する
ためのフロー図
FIG. 8 is a flowchart for explaining a characteristic operation of the arithmetic decoder of the present invention.

【図9】本発明の算術符号器の効果を説明するための図FIG. 9 is a diagram for explaining the effect of the arithmetic encoder of the present invention.

【図10】本発明の多値画像データの符号化機能をもつ
算術符号器における、コンテクスト生成器の構成を示す
ブロック図
FIG. 10 is a block diagram showing a configuration of a context generator in an arithmetic encoder having a multi-valued image data encoding function of the present invention.

【図11】本発明の多値画像データの復号化機能をもつ
算術復号器における、コンテクスト生成器の構成を示す
ブロック図
FIG. 11 is a block diagram showing the configuration of a context generator in an arithmetic decoder having a decoding function for multi-valued image data according to the present invention.

【図12】図10の算術符号器の、2値分解処理器の構成
を示すブロック図
12 is a block diagram showing the configuration of a binary decomposition processor of the arithmetic encoder of FIG.

【図13】2値分解処理器における、2値分解処理(符
号化シンボルの生成)の手順を示す図
FIG. 13 is a diagram showing a procedure of binary decomposition processing (generation of encoded symbols) in the binary decomposition processor.

【図14】(a)図10の算術符号器において使用され
る、共通コンテクストの一例を示す図 (b)図10の算術符号器において使用される、共通コン
テクストの他の例を示す図
14 (a) is a diagram showing an example of a common context used in the arithmetic encoder of FIG. 10 (b) is a diagram showing another example of a common context used in the arithmetic encoder of FIG.

【図15】(a)図10の算術符号器における、多値デー
タの符号化処理の手順を示すフロー図 (b)DCT変換係数(周波数成分データ)の算術符号化
の手順を示すフロー図
15A is a flowchart showing the procedure of encoding processing of multivalued data in the arithmetic encoder of FIG. 10, and FIG. 15B is a flowchart showing the procedure of arithmetic encoding of DCT transform coefficients (frequency component data).

【図16】図13および図15(a),(b)の手順に従っ
て符号化をした場合の、具体的な符号化シーケンスの一
例を示す図
FIG. 16 is a diagram showing an example of a specific encoding sequence when encoding is performed according to the procedure of FIGS. 13 and 15A and 15B.

【図17】本発明の復号化用のコンテクスト生成器の全
体構成の例を示す図
FIG. 17 is a diagram showing an example of the overall configuration of a decoding context generator of the present invention.

【図18】多値データ符号化用のコンテクストインデッ
クスがどのように変化していくかをツリー構造で示す図
FIG. 18 is a diagram showing, in a tree structure, how the context index for multilevel data encoding changes.

【図19】(a)多値データの復号器における、コンテ
クスト生成器の構成の概要を示すブロック図 (b)復号時におけるコンテクストインデックスの変化
をツリー構造で示す図
FIG. 19A is a block diagram showing the outline of the configuration of a context generator in a multi-valued data decoder, and FIG. 19B is a diagram showing a change in context index at the time of decoding in a tree structure.

【図20】符号化対象の画像の一例を示す図FIG. 20 is a diagram showing an example of an image to be encoded.

【図21】本発明の、全白領域における複数シンボルの
一括符号化機能をもつ算術符号器・復号器の全体構成を
示すブロック図
FIG. 21 is a block diagram showing an overall configuration of an arithmetic encoder / decoder having a collective encoding function for a plurality of symbols in an all-white area according to the present invention.

【図22】算術符号演算におけるQeの一括減算と正規化
処理との関係を説明するための図
FIG. 22 is a diagram for explaining the relationship between the batch subtraction of Qe and the normalization processing in arithmetic sign calculation.

【図23】全白領域における複数シンボルの一括符号化
を行う際の処理手順を示すフロー図
FIG. 23 is a flowchart showing a processing procedure when collectively encoding a plurality of symbols in an all-white area.

【図24】本発明の算術符号・復号器の全体の構成を示
す図
FIG. 24 is a diagram showing the overall configuration of an arithmetic code / decoder of the present invention.

【図25】本発明の算術符号器(2値・多値ハザードレ
スパイプライン機能と、適応的複数シンボル一括機能
と、を併せ持つ)の詳細な構成を示すブロック図
FIG. 25 is a block diagram showing a detailed configuration of an arithmetic encoder of the present invention (having both a binary / multilevel hazardless pipeline function and an adaptive multiple symbol batch function).

【図26】図25の算術符号器における、最大シンボル数
検出器の構成を示すブロック図
26 is a block diagram showing the configuration of a maximum symbol number detector in the arithmetic encoder of FIG. 25.

【図27】本発明の算術復号器の要部構成を示すブロッ
ク図
FIG. 27 is a block diagram showing a main configuration of an arithmetic decoder according to the present invention.

【図28】本発明の算術復号器の要部構成を示すブロッ
ク図
FIG. 28 is a block diagram showing a main configuration of an arithmetic decoder according to the present invention.

【図29】多値データ符号化用のコンテクストインデッ
クスの状態遷移を示す図
FIG. 29 is a diagram showing state transition of a context index for multilevel data encoding.

【図30】多値データ復号化用のコンテクストインデッ
クスの状態遷移を示す図
[Fig. 30] Fig. 30 is a diagram showing a state transition of a context index for multilevel data decoding.

【図31】多値算術符号化を応用した装置の一例を示す
FIG. 31 is a diagram showing an example of an apparatus to which multilevel arithmetic coding is applied.

【図32】多値算術符号化を応用した装置の他の一例を
示す図
FIG. 32 is a diagram showing another example of an apparatus to which multilevel arithmetic coding is applied.

【図33】従来の算術符号器におけるパイプライン処理
を説明するための図
FIG. 33 is a diagram for explaining pipeline processing in a conventional arithmetic encoder.

【図34】従来の算術符号器におけるパイプライン処理
の問題点を説明するための図
FIG. 34 is a diagram for explaining a problem of pipeline processing in the conventional arithmetic encoder.

【図35】本発明の算術符号器における、ハザードレス
パイプライン処理を説明するための図
FIG. 35 is a diagram for explaining hazardless pipeline processing in the arithmetic encoder of the present invention.

【図36】本発明の算術符号器における、パイプライン
処理と複数シンボル連続処理との切り替えタイミングを
説明するための図
FIG. 36 is a diagram for explaining a switching timing between pipeline processing and continuous processing of a plurality of symbols in the arithmetic encoder of the present invention.

【図37】本発明の算術復号器の主要な動作タイミング
を説明するための図
FIG. 37 is a diagram for explaining main operation timings of the arithmetic decoder of the present invention.

【図38】本発明の算術符号器におけるQe ROMの構成例
を示す図
FIG. 38 is a diagram showing a configuration example of a Qe ROM in the arithmetic encoder of the present invention.

【図39】JBIGにおける算術符号用テンプレートを示す
FIG. 39 is a diagram showing a template for arithmetic coding in JBIG.

【図40】一般的な確率推定テーブルの内容を示す図FIG. 40 is a diagram showing the contents of a general probability estimation table.

【図41】従来のQe ROMの構成を示す図FIG. 41 is a diagram showing a configuration of a conventional Qe ROM.

【図42】従来例(比較例)における、多値データ符号
化コンテクストの構成例を示す図
FIG. 42 is a diagram showing a configuration example of a multi-valued data coding context in a conventional example (comparative example).

【図43】(a)従来例における、DC成分用コンテクス
トとAC成分用コンテクストの切り替えを説明するための
図 (b)従来例における、DC成分用コンテクストのツリー
からAC成分用コンテクストのツリーへの遷移を示す図
43A is a diagram for explaining switching between the DC component context and the AC component context in the conventional example, and FIG. 43B is a diagram of the DC component context tree to the AC component context tree in the conventional example. Diagram showing transitions

【図44】(a)本発明における、DC成分用コンテクス
トとAC成分用コンテクストの切り替えを説明するための
図 (b)本発明における、統一されたコンテクストのツリ
ーを示す図
FIG. 44 (a) is a diagram for explaining switching between the DC component context and the AC component context in the present invention; and (b) is a diagram showing a unified context tree in the present invention.

【図45】本発明の算術符号器の、2値画像の処理速度
のシミュレーション結果を示す図
FIG. 45 is a diagram showing a simulation result of a processing speed of a binary image of the arithmetic encoder of the present invention.

【図46】本発明の算術符号器のパイプライン処理性能
を従来例と比較して示す図
FIG. 46 is a diagram showing pipeline processing performance of the arithmetic encoder of the present invention in comparison with a conventional example.

【図47】本発明の算術符号器の、多値画像の符号化処
理速度に関するシミュレーション結果を示す図
[Fig. 47] Fig. 47 is a diagram illustrating a simulation result regarding a coding processing speed of a multi-valued image of the arithmetic encoder of the present invention.

【図48】本発明の算術符号器における、多値画像の圧
縮性能に関するシミュレーション結果を示す図
FIG. 48 is a diagram showing a simulation result regarding compression performance of a multi-valued image in the arithmetic encoder of the present invention.

【図49】本発明の算術符号器・復号器を搭載したデジ
タル機器の全体構成を示すブロック図
FIG. 49 is a block diagram showing the overall configuration of a digital device equipped with an arithmetic encoder / decoder according to the present invention.

【図50】算術符号器の全体構成の概略を説明するため
の図
FIG. 50 is a diagram for explaining the outline of the overall configuration of the arithmetic encoder.

【図51】算術符号化の原理を説明するための図FIG. 51 is a diagram for explaining the principle of arithmetic coding.

【図52】JBIGにおける算術符号用テンプレートを示す
FIG. 52 is a diagram showing a template for arithmetic coding in JBIG.

【符号の説明】 700 コンテクスト生成器 701 コンテクストRAM 702 Qe ROM 703 算術符号演算器 704〜707 セレクタ 708 EOR回路 709 制御回路 710,711,712 タイミング調整回路[Explanation of symbols] 700 context generator 701 Context RAM 702 Qe ROM 703 Arithmetic code calculator 704-707 selector 708 EOR circuit 709 control circuit 710,711,712 Timing adjustment circuit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平7−249995(JP,A) 特開2000−115549(JP,A) 特開2000−278538(JP,A) 特許3406550(JP,B2) 特許3350482(JP,B2) 特許3308940(JP,B2) (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 ─────────────────────────────────────────────────── ─── Continuation of front page (56) References JP-A-7-249995 (JP, A) JP-A-2000-115549 (JP, A) JP-A-2000-278538 (JP, A) JP 3406550 (JP, B2) Patent 3350482 (JP, B2) Patent 3308940 (JP, B2) (58) Fields investigated (Int.Cl. 7 , DB name) H04N 1/41-1/419

Claims (17)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 多値画像データを直交変換してDC成分
とAC成分とが混在する直交変換係数に変換し、当該直
交変換係数を先頭がDC成分で低周波成分から高周波成
分の順番に並べ替え、判断事象がツリー状に連なるシー
ケンスであって判断事象に対してYES,NOの判定を
繰り返すことで直交変換係数を2進分解する判定シーケ
ンスを設け、前記直交変換係数を当該判定シーケンスに
したがって2進分解処理し判定対象となった判断事象に
対するYES,NOの判定結果を出力する一方、DC成
分とAC成分とで共用化したコンテクストモデルを用い
て前記判定シーケンス中の各判断事象に予めコンテクス
トを割り付けておき、前記判定結果に対応した判断事象
に割り付けられたコンテクストを出力し、当該出力コン
テクスト及び判定結果を用いて算術符号化する多値デー
タの算術符号化方法。
1. A DC component obtained by orthogonally transforming multivalued image data.
And an AC component are mixed and converted into an orthogonal transform coefficient,
The AC conversion coefficient begins with the DC component and the high frequency component
Sorted in the order of minutes, the decision event is a tree-like sequence.
If it is a can and the judgment event is YES, NO judgment
Decision sequence for binary decomposition of orthogonal transformation coefficient by repeating
To set the orthogonal transformation coefficient to the decision sequence.
Therefore, in the decision event that was subject to the decision by binary decomposition
Outputs YES / NO judgment results for the
Min. And AC component are used in common
The context for each decision event in the decision sequence.
Event that has been assigned, and the judgment event corresponding to the judgment result
Output the context assigned to
An arithmetic encoding method for multi-valued data, which is arithmetically encoded using a text and a determination result .
【請求項2】 前記判定シーケンスは、前記直交変換係
数が小さいものほど早く判定結果が出力されるように判
断事象が配列されることを特徴とする請求項1記載の多
値データの算術符号化方法。
2. The determination sequence is the orthogonal transform function.
The smaller the number, the faster the judgment result will be output.
2. The multiple according to claim 1, wherein the disconnection events are arranged.
Arithmetic encoding method for value data.
【請求項3】 前記直交変換係数には、順番並べ替え後
に検出されるEOB情報及び各直交変換係数の正負情報
を含み、前記判定シーケンスは、初めにEOB情報及び
正負情報を2進分解処理し、その後に直交変換係数の数
値を2進分解処理するように判断事象が配列されること
を特徴とする請求項1又は請求項2に記載の多値データ
の算術符号化方法。
3. The orthogonal transform coefficients are after rearrangement in order.
EOB information and positive / negative information of each orthogonal transform coefficient detected in
And the decision sequence begins with EOB information and
Positive / negative information is binary decomposed and then the number of orthogonal transform coefficients
Arrangement of decision events so as to process the values in binary.
The multivalued data according to claim 1 or 2,
Arithmetic encoding method.
【請求項4】 前記判定シーケンスは、各判断事象に対
する判定結果に”1”または”0”を割り当て、直交変
換係数を2進数列の判定結果に変換することを特徴とす
請求項1から請求項3のいずれかに記載の多値データ
の算術符号化方法。
4. The decision sequence is provided for each decision event.
"1" or "0" is assigned to the judgment result
The arithmetic coding method for multivalued data according to claim 1 , wherein the conversion coefficient is converted into a determination result of a binary number sequence .
【請求項5】 コンテクストによって推定される優性シ
ンボルの予測値及び劣性シンボルの生起確率を符号演算
器に供給して符号化を行う際に、パイプライン処理を実
行して、多値データを高速に算術符号化する方法であっ
て、多値画像データを直交変換してDC成分とAC成分とが
混在する直交変換係数に変換するステップと、 当該直交変換係数を先頭がDC成分で低周波成分から高
周波成分の順番に並べ替えるステップと、 判断事象がツリー状に連なるシーケンスであって判断事
象に対してYES,NOの判定を繰り返すことで直交変
換係数を2進分解する判定シーケンスを設け、前記直交
変換係数を当該判定シーケンスにしたがって2進分解処
理し判定対象となった判断事象に対するYES,NOの
判定結果を出力するステップと、 DC成分とAC成分とで共用化したコンテクストモデル
を用いて前記判定シーケンス中の各判断事象に予めコン
テクストを割り付けておき、前記判定シーケンスでの判
定に同期して前記判定結果に対応した判断事象に割り付
けられたコンテクストを出力するステップと、 前記判定結果とそれに対する前記コンテクストとが出力
される度に、当該コンテクストに対する優性シンボルの
予測値を求め、劣性シンボルの現在の確率推定値を求
め、さらに仮に正規化処理が発生して 予測条件が更新さ
れた後における、前記コンテクストと同一のコンテクス
トに対する、未来の確率推定値を求めるステップと、 前回のコンテクストと今回のコンテクストの異同及び前
回の符号化時の正規化処理の有無 に応じて、前記現在の
確率推定値または前記未来の確率推定値のいずれかを選
択して、前記符号演算器に供給するステップと、を含む
多値データの算術符号化方法。
5. Dominance sequence estimated by context
The probability of the predicted value and inferiority symbol symbols when coding and supplies the code calculator executes the pipeline processing, a method for arithmetic coding a multivalued data at a high speed, multi-level The image data is orthogonally transformed to obtain a DC component and an AC component.
The step of converting into mixed orthogonal transform coefficients, and the orthogonal transform coefficients are DC components at the beginning,
The step of rearranging in the order of frequency components and the judgment
Orthogonal transformation is possible by repeating YES and NO judgments for elephants.
A decision sequence for binary decomposition of the replacement coefficient is provided, and the orthogonality
The conversion factor is binary decomposed according to the determination sequence.
Yes or NO for the judgment event
The step of outputting the judgment result and the context model shared by the DC component and the AC component
For each decision event in the decision sequence.
The text is assigned, and the judgment in the judgment sequence is performed.
Assigned to the judgment event corresponding to the judgment result in synchronization with
The output of the detected context, and the determination result and the context corresponding thereto are output.
Each time the
Obtain the predicted value and the current probability estimate of the recessive symbol
Therefore, if a normalization process occurs and the prediction conditions are updated , the step of obtaining a future probability estimate for the same context as the context, and the difference between the previous context and the current context and the previous context
According to the presence / absence of normalization processing at the time of encoding, selecting either the current probability estimated value or the future probability estimated value and supplying the selected probability estimated value to the code calculator. Arithmetic encoding method for data.
【請求項6】 2値データと多値データを識別した後、
多値データについては、2値データに分解して2値の符
号化シンボルを生成した後に符号化するようになし、
ンテクストに応じて推定される優性シンボルの予測値及
び劣性シンボルの生起確率を符号演算器に供給し、パイ
プライン処理による高速な算術符号化を行う算術符号化
方法であって、 前記多値データの処理に関しては、多値画像データを直交変換してDC成分とAC成分とが
混在する直交変換係数に変換するステップと、 当該直交変換係数を先頭がDC成分で低周波成分から高
周波成分の順番に並べ替えるステップと、 判断事象がツリー状に連なるシーケンスであって判断事
象に対してYES,NOの判定を繰り返すことで直交変
換係数を2進分解する判定シーケンスを設け、前記直交
変換係数を当該判定シーケンスにしたがって2進分解処
理し判定対象となった判断事象に対するYES,NOの
判定結果を出力するステップと、 DC成分とAC成分とで共用化したコンテクストモデル
を用いて前記判定シーケンス中の各判断事象に予めコン
テクストを割り付けておき、前記判定シーケンスでの判
定に同期して前記判定結果に対応した判断事象に割り付
けられたコンテクストを出力するステップと、を含み、 2値データおよび多値データに共通の処理に関しては、生成されたコンテクストによって優性シンボルの予測値
を推定し、劣性シンボルの現在の確率推定値を推定し、
さらに仮に正規化処理が発生して予測条件が更新された
後における、前記コンテクストと同一のコンテクストに
対する、未来の確率推定値を求めるステップと、 前回のコンテクストと今回のコンテクストの異同及び前
回の符号化時の正規化処理の有無に応じて、前記現在の
確率推定値または前記未来の確率推定値のいずれかを選
択して、前記符号演算器に供給するステップと、を含
み、 さらに、2値データの処理に関しては、 コンテクストおよび優性シンボルが連続するという第1
の条件と、前記連続する優性シンボル数分の劣性シンボ
ルの領域幅を一括して現状のオージェントから減算した
後に残存する領域の値が所定値未満にならないという第
2の条件とを共に満たすかを常に検出し、それらの条件
が満たされる場合には、前記第1および第2の条件を満
たす最大のシンボル数を、所定の条件の下で検出し、検
出されたそのシンボル数分の一括符号化を適応的に実行
するステップを含む、ことを特徴とする算術符号化方
法。
6. After identifying binary data and multi-valued data,
For multi-valued data, no to encode decomposed into binary data after generating the encoded symbols of the binary co
Predicted value of dominant symbol estimated according to context
And an inferiority symbol occurrence probability are supplied to a code calculator, which is an arithmetic coding method for performing high-speed arithmetic coding by pipeline processing, wherein multivalued image data is orthogonally transformed with respect to the processing of the multivalued data. DC component and AC component
The step of converting into mixed orthogonal transform coefficients, and the orthogonal transform coefficients are DC components at the beginning,
The step of rearranging in the order of frequency components and the judgment
Orthogonal transformation is possible by repeating YES and NO judgments for elephants.
A decision sequence for binary decomposition of the replacement coefficient is provided, and the orthogonality
The conversion factor is binary decomposed according to the determination sequence.
Yes or NO for the judgment event
The step of outputting the judgment result and the context model shared by the DC component and the AC component
For each decision event in the decision sequence.
The text is assigned, and the judgment in the judgment sequence is performed.
Assigned to the judgment event corresponding to the judgment result in synchronization with
The output of the scrambled context, and for a process common to binary and multi-valued data, the predicted value of the dominant symbol depending on the generated context.
To estimate the current probability estimate of the recessive symbol,
Furthermore, if the normalization process occurs, the prediction conditions are updated.
Later, in the same context as the above
The step of obtaining the future probability estimate, and the difference between the previous context and the current context and the previous context
Depending on the presence or absence of normalization processing at the time of encoding,
Choose either the probability estimate or the future probability estimate.
Optionally, supplying to the code calculator.
See further, with respect to the binary data processing, the called context and dominant symbol are consecutive 1
And the second condition that the value of the remaining area does not become less than a predetermined value after the area widths of recessive symbols corresponding to the number of consecutive dominant symbols are collectively subtracted from the current orient. Is always detected, and if those conditions are satisfied, the maximum number of symbols satisfying the first and second conditions is detected under predetermined conditions, and the collective code for the detected number of symbols is detected. An arithmetic coding method , comprising the step of adaptively performing encoding.
【請求項7】 多値画像データを直交変換してDC成分
とAC成分とが混在する直交変換係数に変換する直交変
換手段と、 当該直交変換係数を先頭がDC成分で低周波成分から高
周波成分の順番に並べ替えるフォーマット変換手段と、 判断事象がツリー状に連なるシーケンスであって判断事
象に対してYES,N Oの判定を繰り返すことで直交変
換係数を2進分解する判定シーケンスを設け、前記直交
変換係数を当該判定シーケンスにしたがって2進分解処
理し判定対象となった判断事象に対するYES,NOの
判定結果を出力する分解処理手段と、 前記判定シーケンスに基づいて作成されていて、各判断
事象に対応した状態番号と、DC成分とAC成分とで共
用化したコンテクストモデルに基づいて状態番号毎に定
められたコンテクストと、判定結果に応じて遷移すべき
次の状態番号とが登録された状態遷移テーブルを備え、
前記分解処理手段で判定対象となる判断事象に対応した
コンテクストを状態番号に基づいて前記状態遷移テーブ
ルから読み出し、前記分解処理手段での判定結果に応じ
て次の状態番号を決定するコンテクスト生成手段と、 前記分解処理手段から出力される判定結果と前記コンテ
クスト生成手段から出力されるコンテクストとを用い
て、優性シンボルの予測値と劣性シンボルの確率推定値
とを推定する推定手段と、 優性シンボルの予測値と劣性シンボルの確率推定値とを
用いて算術符号化を実行する算術符号演算手段と、を具
備した算術符号化装置。
7. A DC component obtained by orthogonally transforming multivalued image data.
Orthogonal transform that transforms into an orthogonal transform coefficient in which
The conversion means and the orthogonal transformation coefficient have a DC component at the beginning and a high frequency component from a low frequency component.
Format conversion means for rearranging in the order of frequency components and judgment event is a sequence in which tree-like judgment events are connected.
Orthogonal transformation is possible by repeating YES and NO judgments on elephants.
A decision sequence for binary decomposition of the replacement coefficient is provided, and the orthogonality
The conversion factor is binary decomposed according to the determination sequence.
Yes or NO for the judgment event
Disassembly processing means for outputting a determination result and each determination made based on the determination sequence
Both the state number corresponding to the event and the DC and AC components
Based on the adapted context model, it is determined for each state number.
Transition according to the determined context and the judgment result
It has a state transition table in which the following state numbers are registered,
Corresponding to the judgment event to be judged by the decomposition processing means
The state transition table based on the context number
Read out from the
Context generating means for determining the next state number, and the judgment result output from the decomposition processing means and the context.
Using the context output from the
, The predicted value of the dominant symbol and the probability estimate of the recessive symbol
The estimation means for estimating and the predicted value of the dominant symbol and the probability estimate of the recessive symbol
Arithmetic code operation means for executing arithmetic encoding using the
Arithmetic encoder provided.
【請求項8】 前記推定手段は、 状態番号に対応させて劣性シンボルの確率推定値が記憶
されたメモリであって、1つの状態番号に対して当該状
態番号に対応したコンテクストに対する劣性シンボルの
現在の確率推定値と、さらに仮に正規化処理が発生して
予測条件が更新された後における、前記コンテクストと
同一のコンテクストに対する、未来の確率推定値とが記
録された確率推定メモリと、 前記コンテクストモデルに対応した各コンテクストに対
する優性シンボルの予測値と前記確率推定メモリにアク
セするための状態番号とを対応させたコンテクストメモ
リと、 前回のコンテクストと今回のコンテクストの異同及び前
回の符号化時の正規化処理の有無に応じて、前記確率推
定メモリから前記現在の確率推定値または前記未来の確
率推定値のいずれかを選択して前記算術符号演算手段へ
供給する制御手段と、を具備する請求項7記載の算術符
号化装置。
8. The estimation means stores a probability estimation value of a recessive symbol in association with a state number.
Stored memory, the state is
The recessive symbol for the context corresponding to the state number
The current probability estimate and the normalization process
After the prediction condition is updated,
Estimated future probability for the same context
The recorded probability estimation memory is paired with each context corresponding to the context model.
The predicted value of the dominant symbol and the probability estimation memory
Context memo that corresponds to the status number for
The difference between the previous context and the current context and the previous
Depending on the presence / absence of normalization processing at the time of encoding,
Constant memory from the current probability estimate or the future probability estimate.
Select one of the rate estimation values to the arithmetic code operation means
8. Arithmetic code according to claim 7, comprising a control means for supplying.
Device.
【請求項9】 前記確率推定メモリは、前記現在の確率
推定値(Qe),前記 未来の確率推定値(next Qe)およ
び、前記コンテクストメモリに記憶されている前記状態
番号の更新が生じた場合における更新後の状態番号(ne
xt state No.)を記憶しており、かつ、前記現在の確率
推定値、前記未来の確率推定値,および前記更新後の状
態番号の各々を並列に出力し、 前記制御手段は、 前記 確率推定メモリから出力される前記現在の確率推定
値(Qe),前記未来の確率推定値(next Qe)のうちのいず
れかを選択する第1のセレクタと、 前記コンテクストメモリから出力される前記状態番号
(state No.),あるいは前記確率推定メモリから出力
される前記更新後の状態番号(next state No.)のいず
れかを選択して、前記確率推定メモリに、アドレス情報
として供給する第2のセレクタと、を制御して 前記第1のセレクタにより選択された確率推
定値(Qeまたはnext Qe)と、前記コンテクストメモリ
から出力される前記シンボルの予測値(MPS)と、を
記算術符号演算手段へ供給することを特徴とする請求項
8記載の算術符号化装置。
Wherein said probability estimation memory, the current probability estimate (Qe), the future probability estimates (next Qe) and, if an update of the state number stored in said context memory has occurred The updated status number (ne
xt state No.) stores a and the current probability estimate, the probability estimate of the future, and outputs each of the updated state number in parallel, said control means, said probability estimating A first selector for selecting one of the current probability estimate value (Qe) output from the memory and the future probability estimate value (next Qe); and the state number output from the context memory ( state No.) or the updated state number (next state No.) output from the probability estimation memory, and supplies it to the probability estimation memory as address information. , before the control to probability estimation value selected by the first selector and (Qe or next Qe), the predicted value of the symbols output from said context memory and (MPS), the a
The arithmetic code calculator is supplied to the arithmetic means.
8. The arithmetic coding device according to item 8 .
【請求項10】 入力される2値データについて、予め
定めた複数個の連続する符号化シンボルの値および各符
号化シンボルを符号化する際に用いられる参照画素の値
が所定のパターンに合致することを検出する複数個の検
出器と、 これらの検出器の検出結果に基づいて、一括して符号化
できる最大のシンボル数を決定し、最大シンボル数を前
記算術符号演算手段に供給する最大シンボル数判定回路
と、を有する請求項7から請求項9のいずれかに記載の
算術符号化装置。
10. Regarding input binary data, a value of a predetermined plurality of consecutive encoded symbols and a value of a reference pixel used when encoding each encoded symbol match a predetermined pattern. That the maximum number of symbols that can be coded collectively is determined based on the detection results of these detectors, and the maximum number of symbols to be supplied to the arithmetic code calculation means is the maximum symbol. The arithmetic coding device according to any one of claims 7 to 9 , further comprising a number determination circuit.
【請求項11】 コンテクストの生成処理,確率推定メ
モリの読み出し処理,コンテクストメモリの読み出し処
理,および算術符号化演算を同じサイクルで実行してパ
イプライン化し、1サイクルで1画素の符号化を実行す
請求項8から請求項10のいずれかに記載の算術符号
化装置。
11. A context generation process, a probability estimation memory read process, a context memory read process, and an arithmetic coding operation are executed in the same cycle to be pipelined, and one pixel is coded in one cycle. The arithmetic coding device according to any one of claims 8 to 10 .
【請求項12】 多値データの直交変換係数を算術符号
化して得られた算術符号データを、パイプライン処理の
下で算術復号化する算術復号化方法であって、 入力された算術符号データが、優性シンボルの確率推定
値と劣性シンボルの確率推定値とで分割した数直線上
で、優性シンボルに属するか劣性シンボルに属するかを
判定し、算術符号データが属するシンボルの予測値を復
号シンボルとして出力する復号化ステップと、 算術符号化時に直交変換係数を2進分解するための判断
事象がツリー状に連なる判定シーケンスに対応させてコ
ンテクストツリーを構成し、DC成分とAC成分とで共
用化したコンテクストモデルを用いて前記コンテクスト
ツリーの各ノードにコンテクストを割り付けておき、復
号シンボルが生成される度に当該復号シンボルの値に応
じて前記コンテクストツリー上を遷移し、遷移先のノー
ドに割り付けられたコンテクストを出力するコンテクス
ト生成ステップと、 出力されたコンテクストによって劣性シンボルの確率推
定値、優性シンボル及び又は劣性シンボルの予測値を推
定して前記復号化ステップへ与える推定ステップと、を
具備する算術復号化方法。
12. Arithmetic code for orthogonal transform coefficient of multi-valued data
The arithmetic code data obtained by digitizing the
An arithmetic decoding method for performing arithmetic decoding below, wherein the input arithmetic code data is a probability estimation of a dominant symbol.
On the number line divided by the value and the probability estimate of the recessive symbol
, Whether it belongs to a dominant symbol or a recessive symbol
Judge and recover the predicted value of the symbol to which the arithmetic code data belongs.
Decoding step of outputting as a signal symbol and determination for binary decomposition of orthogonal transform coefficients during arithmetic coding
Corresponds to a decision sequence in which events are arranged in a tree.
The text tree is constructed, and the DC component and the AC component are shared.
The context using a specialized context model
Assign a context to each node of the tree and restore
Each time a symbol symbol is generated, it corresponds to the value of the decoded symbol.
Then transitions on the context tree, and
Context that outputs the context assigned to
Probability generation step and the probability of recessive symbol estimation based on the output context.
Estimate predicted values for constant values, dominant symbols and / or recessive symbols
And an estimation step which is given to the decoding step,
Arithmetic decoding method provided.
【請求項13】 多値データの直交変換係数を算術符号
化して得られた算術符号データを、パイプライン処理の
下で算術復号化する算術復号化装置であって、 入力された算術符号データが、優性シンボルの確率推定
値と劣性シンボルの確率推定値とで分割した数直線上
で、優性シンボルに属するか劣性シンボルに属するかを
判定し、算術符号データが属するシンボルの予測値を復
号シンボルとして出力する算術復号演算手段と、 算術符号化時に直交変換係数を2進分解するのに用いた
各判断事象に対応した状態番号と、DC成分とAC成分
とで共用化したコンテクストモデルに基づいて状態番号
毎に定められたコンテクストと、復号シンボルの値に応
じて遷移すべき次の状態番号と、が登録された状態遷移
テーブルを備え、復号シンボルが生成される度に状態番
号に応じたコンテクストを生成するコンテクスト生成手
段と、 前記コンテクスト生成手段から出力されるコンテクスト
から優性シンボルの予測値と劣性シンボルの確率推定値
とを推定して前記算術復号演算手段へ与える推定手段
と、を具備する算術復号化装置。
13. An arithmetic code for orthogonal transform coefficients of multi-valued data.
The arithmetic code data obtained by digitizing the
An arithmetic decoding device for performing arithmetic decoding below, wherein the input arithmetic code data is a probability estimation of a dominant symbol.
On the number line divided by the value and the probability estimate of the recessive symbol
, Whether it belongs to a dominant symbol or a recessive symbol
Judge and recover the predicted value of the symbol to which the arithmetic code data belongs.
Used for binary decoding of orthogonal transform coefficients during arithmetic coding and arithmetic decoding operation means for outputting as a symbol
State number corresponding to each judgment event, DC component and AC component
State number based on the context model shared by and
It corresponds to the context defined for each and the value of the decoded symbol.
The next state number to be transitioned to and the state transition where is registered
A table is provided, and the status number is generated each time a decoded symbol is generated.
Context generator that generates the context according to the issue
And a context output from the context generating means.
To the predicted value of the dominant symbol and the probability estimate of the recessive symbol
Estimating means for estimating and giving to the arithmetic decoding operation means
An arithmetic decoding device comprising:
【請求項14】 前記コンテクスト生成手段は、前記状
態遷移テーブルを用 いて、2サイクル先までの各遷移先
状態番号に応じた4つのコンテクストを生成し、 前記推定手段は、 状態番号に対応させて劣性シンボルの確率推定値が記憶
されたメモリであって、1つの状態番号に対して当該状
態番号に対応したコンテクストに対する劣性シンボルの
現在の確率推定値と、さらに仮に正規化処理が発生して
予測条件が更新された後における、前記コンテクストと
同一のコンテクストに対する、未来の確率推定値とが記
録された2つの確率推定メモリと、 前記コンテクストモデルの各コンテクストに対する優性
シンボルの予測値と、各コンテクストでの劣性シンボル
の確率推定値と、前記確率推定メモリにアクセするため
の状態番号と、を記憶した4つのコンテクストメモリ
と、 前記コンテクスト生成手段が生成した4つのコンテクス
トに対応して各々対応するコンテクストメモリから並列
に出力される4つの状態番号から2つの状態番号を最新
復号シンボルによって選択し、且つ選択された2つの状
態番号に対応して前記確率推定メモリから並列に出力さ
れる確率推定値を前記最新復号シンボルによって選択す
る選択手段と、を具備することを請求項13記載の算術
復号化装置。
14. The context generating means includes:
And have use of the state transition tables, each transition destination of up to 2 cycles destination
Four contexts are generated according to the state number, and the estimation means stores the probability estimation value of the recessive symbol in association with the state number.
Stored memory, the state is
The recessive symbol for the context corresponding to the state number
The current probability estimate and the normalization process
After the prediction condition is updated,
Estimated future probability for the same context
Two recorded probability estimation memories and the dominance of the context model for each context
Symbol predictor and recessive symbol in each context
To access the probability estimate and the probability estimate memory
4 context memories that store the state number of
And four contexts generated by the context generating means
Parallel from the corresponding context memory
2 status numbers from 4 status numbers output to
Two states selected by the decoded symbol and selected
It is output in parallel from the probability estimation memory corresponding to the state number.
Selected probability estimation value according to the latest decoded symbol
14. Arithmetic according to claim 13, further comprising:
Decoding device.
【請求項15】 多値データを2値分解して算術符号化
して得られた符号データあるいは2値データを算術符号
化して得られた符号データを、パイプライン処理によっ
て算術復号化する算術復号化装置であって、 既に復号化済みのシンボル系列の状態(コンテクスト)
から復号化シンボルの生起確率を推定し、その推定値と
シンボルの予測値を復号器に供給して復号化する手段と
して、 2値データを復号化するためのコンテクストを生成する
第1のコンテクスト生成手段と、多値データを復号化す
るためのコンテクストを生成する第2のコンテクスト生
成手段と、を具備するコンテクスト生成器と、 現在の確率推定値,更新後の確率推定値,および更新後
の確率推定値が格納されている番地を示すアドレス情報
のそれぞれを、並列に出力する確率推定メモリと、 この確率推定メモリの並列に出力される、前記現在の確
率推定値,更新後の確率推定値のうちのいずれかを選択
する第1の選択手段と、 コンテクスト毎に予測シンボルおよび前記確率推定メモ
リのアドレス情報を格納しているコンテクストメモリ
と、 前記確率推定メモリのアドレスとして、前記コンテクス
トメモリの出力、または、前記確率推定メモリから出力
される、前記更新後の確率推定値が格納されている番地
を示すアドレス情報のいずれかを選択する第2の選択手
段と、 前記第1の選択手段によって選択された確率推定値と、
前記コンテクストメモリから出力される前記シンボルの
予測値(MPS)とを用いて算術復号演算を行なう算術復
号演算器と、を有し、 さらに、最終的に復元するべきデータが2値データであ
る場合において、予め定めた複数個の連続する復号化シ
ンボルに対応する参照画素が特定のパターンに合致する
ことを、常に検出する複数の検出器と、これらの検出器
の検出結果に基づいて一括復号化できる最大のシンボル
数を決定して、その最大シンボル数を前記算術復号演算
器に供給する最大シンボル数決定手段と、を有し、 また、最終的に復元するべきデータが多値データである
場合、前記算術復号演算器により復号された2値データ
を合成して多値データを復元する多値合成処理回路を有
することを特徴とする算術復号化装置。
15. Arithmetic decoding for arithmetically decoding the coded data obtained by binary-decomposing multivalued data and arithmetically coding or the coded data obtained by arithmetically coding binary data by pipeline processing. The state of the symbol sequence that has already been decoded by the device (context)
A first context generation for generating a context for decoding binary data as means for estimating a probability of occurrence of a decoded symbol from, and supplying the estimated value and the predicted value of the symbol to a decoder for decoding. Means and a second context generating means for generating a context for decoding multi-valued data, a current probability estimate, an updated probability estimate, and an updated probability. Probability estimation memory that outputs in parallel each piece of address information indicating the address where the estimated value is stored, and the current probability estimated value and updated probability estimated value that are output in parallel to this probability estimation memory. First selecting means for selecting any one of them, and a context memory storing predicted symbol and address information of the probability estimation memory for each context And, as the address of the probability estimation memory, either the output of the context memory or the address information output from the probability estimation memory and indicating the address in which the updated probability estimation value is stored is selected. Second selecting means, the probability estimation value selected by the first selecting means,
An arithmetic decoding operation unit for performing an arithmetic decoding operation using the predicted value (MPS) of the symbol output from the context memory, and the data to be finally restored is binary data. , A plurality of detectors that constantly detect that a reference pixel corresponding to a plurality of predetermined consecutive decoded symbols matches a specific pattern, and a batch decoding based on the detection results of these detectors. A maximum symbol number determining means for determining the maximum possible symbol number and supplying the maximum symbol number to the arithmetic decoding arithmetic unit, and the data to be finally restored is multi-valued data. An arithmetic decoding device comprising a multi-value synthesizing processing circuit for synthesizing binary data decoded by the arithmetic decoding arithmetic unit to restore multi-valued data.
【請求項16】 請求項14又は請求項15において、 コンテクストの生成処理,確率推定メモリの読み出し処
理,コンテクストメモリの読み出し処理,および算術復
号化演算を同じサイクルで実行してパイプライン化する
ことにより、1サイクルで1画素の復号化を実行するこ
とを特徴とする算術復号化装置 。
16. The method according to claim 14 or 15, wherein the context generation processing, the probability estimation memory reading processing, the context memory reading processing, and the arithmetic decoding operation are executed in the same cycle and pipelined. An arithmetic decoding device characterized by executing decoding of one pixel in one cycle.
【請求項17】 請求項7〜請求項11のいずれかに記
載の算術符号化装置、あるいは、請求項13〜請求項1
6のいずれかに記載の算術復号化装置を搭載した電気機
器。
17. The arithmetic coding device according to any one of claims 7 to 11 , or claims 13 to 1.
An electric device equipped with the arithmetic decoding device according to any one of 6 above.
JP2000217850A 2000-07-18 2000-07-18 Arithmetic encoding / decoding method and arithmetic encoding / decoding device Expired - Fee Related JP3457269B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000217850A JP3457269B2 (en) 2000-07-18 2000-07-18 Arithmetic encoding / decoding method and arithmetic encoding / decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000217850A JP3457269B2 (en) 2000-07-18 2000-07-18 Arithmetic encoding / decoding method and arithmetic encoding / decoding device

Publications (2)

Publication Number Publication Date
JP2002033925A JP2002033925A (en) 2002-01-31
JP3457269B2 true JP3457269B2 (en) 2003-10-14

Family

ID=18712902

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000217850A Expired - Fee Related JP3457269B2 (en) 2000-07-18 2000-07-18 Arithmetic encoding / decoding method and arithmetic encoding / decoding device

Country Status (1)

Country Link
JP (1) JP3457269B2 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9577667B2 (en) 2002-04-23 2017-02-21 Ntt Docomo, Inc. System and method for arithmetic encoding and decoding
EP3709217A1 (en) * 2002-04-23 2020-09-16 NTT DoCoMo, Inc. System and method for arithmetic encoding and decoding
JP4327036B2 (en) 2004-07-15 2009-09-09 株式会社東芝 Arithmetic code decoding method and apparatus
KR100648258B1 (en) 2004-08-02 2006-11-23 삼성전자주식회사 Content-based Adaptive Binary Arithmetic Decoder for Pipeline Architectures with Fast Decoding
KR100624432B1 (en) 2004-08-05 2006-09-19 삼성전자주식회사 Content-based Adaptive Binary Arithmetic Decoding Method and Apparatus
JP2007074648A (en) * 2005-09-09 2007-03-22 Matsushita Electric Ind Co Ltd CABAC decoding device
KR100717055B1 (en) 2005-11-18 2007-05-10 삼성전자주식회사 A method for decoding a plurality of binary values by a pipeline method in a CAA decoder and a decoding device therefor
US7983343B2 (en) * 2006-01-12 2011-07-19 Lsi Corporation Context adaptive binary arithmetic decoding for high definition video
JP2008141530A (en) * 2006-12-01 2008-06-19 Canon Inc Image coding apparatus and image coding method
JP2008289125A (en) 2007-04-20 2008-11-27 Panasonic Corp Arithmetic decoding apparatus and method
JP4524501B2 (en) * 2007-12-27 2010-08-18 株式会社アクセル Encoding system, encoding method, encoding program, decoding system, decoding method, and decoding program
EP2239852A1 (en) * 2009-04-09 2010-10-13 Thomson Licensing Method and device for encoding an input bit sequence and corresponding decoding method and device
CN113034625B (en) * 2019-12-25 2023-06-20 武汉Tcl集团工业研究院有限公司 Lossless compression method based on picture, intelligent terminal and storage medium
CN113095583B (en) * 2021-04-23 2024-05-03 浙江皓亮智享信息技术咨询有限公司 Data analysis method applied to service management and service management server
CN116366868B (en) * 2023-05-31 2023-08-25 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Concurrent video packet filtering method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000115549A (en) 1998-10-05 2000-04-21 Mitsubishi Electric Corp Encoding device and encoding method, and decoding device and decoding method
JP2000278538A (en) 1999-03-26 2000-10-06 Kyocera Mita Corp Device and method for arithmetic encoding/decoding
JP3308940B2 (en) 1999-08-17 2002-07-29 松下電送システム株式会社 Encoding method and decoding method
JP3350482B2 (en) 1999-06-04 2002-11-25 松下電送システム株式会社 Arithmetic encoding device and arithmetic decoding device
JP3406550B2 (en) 1999-12-28 2003-05-12 パナソニック コミュニケーションズ株式会社 Arithmetic encoding device and arithmetic decoding device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000115549A (en) 1998-10-05 2000-04-21 Mitsubishi Electric Corp Encoding device and encoding method, and decoding device and decoding method
JP2000278538A (en) 1999-03-26 2000-10-06 Kyocera Mita Corp Device and method for arithmetic encoding/decoding
JP3350482B2 (en) 1999-06-04 2002-11-25 松下電送システム株式会社 Arithmetic encoding device and arithmetic decoding device
JP3308940B2 (en) 1999-08-17 2002-07-29 松下電送システム株式会社 Encoding method and decoding method
JP3406550B2 (en) 1999-12-28 2003-05-12 パナソニック コミュニケーションズ株式会社 Arithmetic encoding device and arithmetic decoding device

Also Published As

Publication number Publication date
JP2002033925A (en) 2002-01-31

Similar Documents

Publication Publication Date Title
US6677869B2 (en) Arithmetic coding apparatus and image processing apparatus
JP3457269B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
KR100624432B1 (en) Content-based Adaptive Binary Arithmetic Decoding Method and Apparatus
EP0376679A2 (en) Image encoding apparatus and image encoding method
JPH0793586B2 (en) Data compression model selection method and system
US20140286417A1 (en) Data encoding and decoding
CN109936742B (en) Method for encoding a video sequence, encoding device and storage medium
JP2000165678A (en) Method and device for improving transmission speed and efficiency of electronic data
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
US5655032A (en) Coding method and apparatus therefor
US7277585B2 (en) Image encoding method, image encoding apparatus and storage medium
US5761342A (en) Image processing apparatus and method
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
JP4061104B2 (en) Memory access and skipping based on run / skip count by context model
CN110035288B (en) Method for encoding a video sequence, encoding device and storage medium
JP3929312B2 (en) Arithmetic coding apparatus and image processing apparatus
Ramesh Kumar et al. Two-symbol FPGA architecture for fast arithmetic encoding in JPEG 2000
JP2872334B2 (en) Color image encoding device
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
JP3847891B2 (en) Encoding apparatus and method and storage medium storing method
JP3127513B2 (en) Encoding device
JP3200109B2 (en) Image transmission method
JP2832072B2 (en) Image coding method and apparatus
JP2001169118A (en) Image processing apparatus and method, computer readable memory
JPH1013247A (en) Variable-length code decoding method and device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070801

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080801

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20080801

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090801

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090801

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100801

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110801

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110801

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120801

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees