JP3384287B2 - Encoding device and decoding device - Google Patents

Encoding device and decoding device

Info

Publication number
JP3384287B2
JP3384287B2 JP16595097A JP16595097A JP3384287B2 JP 3384287 B2 JP3384287 B2 JP 3384287B2 JP 16595097 A JP16595097 A JP 16595097A JP 16595097 A JP16595097 A JP 16595097A JP 3384287 B2 JP3384287 B2 JP 3384287B2
Authority
JP
Japan
Prior art keywords
decoding
unit
pixel
code data
encoding
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
JP16595097A
Other languages
Japanese (ja)
Other versions
JPH1117958A (en
Inventor
徳明 土屋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP16595097A priority Critical patent/JP3384287B2/en
Publication of JPH1117958A publication Critical patent/JPH1117958A/en
Application granted granted Critical
Publication of JP3384287B2 publication Critical patent/JP3384287B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

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 for image data using a predictive coding system and a decoding device for decoding the coded data.

【0002】[0002]

【従来の技術】2値画像の符号化技術の1つとして、周
辺の画素から注目画素の状態を予測し、予測した結果を
符号化する予測符号化方式がある。予測符号化において
は、注目画素と相関関係があると思われる周囲画素をマ
ルコフ情報源として予測に用いる。
2. Description of the Related Art As one of binary image coding techniques, there is a predictive coding method in which the state of a pixel of interest is predicted from surrounding pixels and the predicted result is coded. In predictive coding, surrounding pixels that are considered to have a correlation with the pixel of interest are used for prediction as Markov information sources.

【0003】予測方式には、予測値を直接決定する方法
と、間接的に決定する方法が知られている。予測値を直
接決定する方法としては、例えば特開平5−31637
0号公報で示されるように、複数の予測器の中から的中
率の高い予測器を適応的に切り替え、最終的に1つの予
測器を選択し、原画像の予測に使用する方法がある。ま
た、予測値を間接的に決定する方法としては、例えば、
予測値等の情報をメモリに格納し、周辺の画素値からメ
モリの情報を読み出して予測に使用する方法がある。
As a prediction method, a method of directly determining a prediction value and a method of indirectly determining a prediction value are known. As a method for directly determining the predicted value, for example, Japanese Patent Application Laid-Open No. 5-31637.
As disclosed in Japanese Unexamined Patent Publication (Kokai) No. 0, there is a method of adaptively switching a predictor having a high hit rate from a plurality of predictors, finally selecting one predictor, and using it for predicting an original image. . Further, as a method of indirectly determining the predicted value, for example,
There is a method in which information such as a predicted value is stored in a memory, information in the memory is read from peripheral pixel values and used for prediction.

【0004】特公平6−95645号公報に開示されて
いる予測方式は、後者のメモリを用いた間接的に予測値
を決定する予測方式であり、周辺の複数画素の値をアド
レスとして、テーブルルクアップ方式で出力される予測
値を用い、予測誤差データを生成している。しかし、予
測画素の位置を全て固定とはせず、1画素のみ位置を可
変にし、予測的中率によって予測位置を変更させている
方式をとっている。ITU−T T.82、T−85で
定められたJBIG(Joint Bi−level
Image coding expert Grou
p)で用いられる予測方式は、上述の特公平6−956
45号公報に示されている予測方式であり、符号化状態
によって予測テーブルの情報を更新していく学習型の方
式が採用されている。符号化には、注目画素を上述の予
測方式で予測した結果である予測誤差データが使用され
る。
The prediction method disclosed in Japanese Examined Patent Publication No. 6-95645 is a prediction method that indirectly determines a prediction value using the latter memory, and uses the values of a plurality of peripheral pixels as an address. Prediction error data is generated using the prediction value output in the up method. However, not all the positions of the predicted pixels are fixed, but the position of only one pixel is made variable, and the predicted position is changed according to the predictive predictive ratio. ITU-TT. 82, T-85 JBIG (Joint Bi-level)
Image coding expert Grou
The prediction method used in p) is the above-mentioned Japanese Patent Publication No. 6-956.
The prediction method is disclosed in Japanese Patent Publication No. 45-45, and a learning method in which information in the prediction table is updated according to the coding state is adopted. Prediction error data, which is the result of predicting the pixel of interest by the above-described prediction method, is used for encoding.

【0005】JBIGにおいては、予測誤差データを符
号化する符号化部に、算術符号化が採用された。算術符
号化は、例えば特公平1−17295号公報に示されて
いるように、数直線上の領域を入力されたシンボルの
1,0の発生確率に合わせて分割し、入力シンボルの値
によって領域を選択する。このとき、予測と一致したシ
ンボル(優勢シンボル)をMPS(More Prob
able Symbol)、一致しないシンボル(劣性
シンボル)をLPS(Less Probable S
ymbol)と呼ぶ。このMPS、LPSの発生確率推
定値は、予測的中率などによって変化させる。JBIG
では、シンボルの出現確率の推定部にLPS発生時の確
率値(=領域幅LSZ)を持たせるとともに、その確率
推定値をシンボルの出現過程に応じて更新する学習機能
を持たせている。確率推定の学習機能は上述の予測値の
学習機能と連動する。この分割選択処理を情報源の出力
系列の分だけ行ない、最終段の分割で得られた領域内の
1点の2進小数表示で出力系列を表わす。
In JBIG, arithmetic coding is adopted as a coding unit for coding prediction error data. In arithmetic coding, for example, as disclosed in Japanese Examined Patent Publication No. 17295/1989, the region on the number line is divided according to the occurrence probability of 1 and 0 of the input symbol, and the region is divided by the value of the input symbol. Select. At this time, the symbol (predominant symbol) that matches the prediction is set to MPS (More Probe).
and a non-matching symbol (recessive symbol) with LPS (Less Probable S).
symbol). The estimated probability of occurrence of MPS and LPS is changed according to the predictive predictive value and the like. JBIG
In the above, the symbol appearance probability estimator has a probability value (= region width LSZ) at the time of LPS occurrence, and a learning function for updating the probability estimate value in accordance with the symbol appearance process. The learning function of probability estimation works in conjunction with the learning function of the prediction value described above. This division selection processing is performed for each output sequence of the information source, and the output sequence is represented by the binary decimal display of one point in the area obtained by the division at the final stage.

【0006】図10は、算術符号化の概念図である。斜
線で示した領域が、それぞれシンボルの符号化終了後の
有効領域である。初期状態では、有効領域は[0,1)
区間であり、LPS発生時の領域幅LSZ(0)が設定
されている。1−LSZ(0)がMPS発生時の領域幅
である。ここではシンボルが「0」のときをMPS、
「1」のときをLPSとする。図10において確率値は
2進数で示している。
FIG. 10 is a conceptual diagram of arithmetic coding. The hatched areas are the effective areas after the symbol coding is completed. In the initial state, the effective area is [0, 1)
It is a section, and a region width LSZ (0) at the time of LPS occurrence is set. 1-LSZ (0) is the region width when MPS occurs. Here, the MPS is when the symbol is “0”,
When it is "1", it is set as LPS. In FIG. 10, the probability values are shown in binary numbers.

【0007】図10では、最初に入力されたシンボルが
「0」であるので、MPSの発生により有効領域は図1
0(A)においてハッチングを施した領域となる。そし
てこの有効領域内をLPS発生時とMPS発生時の領域
に分割する新たな領域幅LSZ(1)を設定する。次の
シンボルが「1」のときは、LPSの発生により図10
(B)においてハッチングを施した領域が有効領域とな
る。同様にして、3番目のシンボルが「0」のとき、図
10(C)においてハッチングを施した領域が有効領域
となり、さらに4番目のシンボルが「1」のとき、図1
0(D)においてハッチングを施した領域が有効領域と
なる。
In FIG. 10, since the first input symbol is "0", the effective area is shown in FIG.
In 0 (A), it is a hatched area. Then, a new area width LSZ (1) that divides the effective area into areas when LPS occurs and when MPS occurs is set. When the next symbol is "1", the occurrence of LPS causes
The hatched area in (B) is the effective area. Similarly, when the third symbol is “0”, the hatched area in FIG. 10C is the effective area, and when the fourth symbol is “1”, the area shown in FIG.
The hatched area at 0 (D) is the effective area.

【0008】出力される符号はCで表わされる。入力さ
れたシンボル列「0101」に対する符号は、図10
(D)における有効領域内の1点とすればよい。ここで
は、有効領域の基底、すなわち有効領域の最も小さい値
C(3)を符号として表わし、出力する。
The output code is represented by C. The code for the input symbol string “0101” is shown in FIG.
It may be one point in the effective area in (D). Here, the basis of the effective area, that is, the smallest value C (3) of the effective area is represented as a code and output.

【0009】算術符号化においては、符号化の過程で、
有効領域の1点を符号とするため、領域を大きくとれ
ば、有効桁が減り符号量が減る。つまり、MPS発生時
にはなるべくLSZの値を小さくし、LPS発生時には
なるべくLSZの値を大きくすることによって、有効領
域を多く確保でき、符号量を減らすことができる。
In arithmetic coding, in the process of coding,
Since one point in the effective area is used as a code, if the area is made large, the effective digits decrease and the code amount decreases. In other words, by reducing the value of LSZ as much as possible when MPS occurs and increasing the value of LSZ as much as possible when LPS occurs, it is possible to secure a large effective area and reduce the code amount.

【0010】図11は、JBIGで採用されている予測
符号化方式の概略図である。図中、1は画像データ、2
はコンテキスト生成部、3はコンテキスト、4は予測
部、5はステート、6は確率推定テーブル、7はLSZ
およびSW、8は予測値、9は算術符号化部、10は符
号データ、11は書き換えデータ、12は書き換え信号
である。
FIG. 11 is a schematic diagram of a predictive coding system adopted in JBIG. In the figure, 1 is image data, 2
Is a context generation unit, 3 is a context, 4 is a prediction unit, 5 is a state, 6 is a probability estimation table, and 7 is an LSZ.
And SW, 8 is a prediction value, 9 is an arithmetic coding unit, 10 is code data, 11 is rewriting data, and 12 is a rewriting signal.

【0011】画像データ1は、符号化のために算術符号
化部9に入力されるとともに、コンテキスト生成部2に
入力される。コンテキスト生成部2においては、注目画
素の予測を行なうために、周辺画素を使用して予測のモ
デルテンプレートを作成する。図12は、JBIGで使
用されるテンプレートの一例の説明図である。Pを注目
画素とすると、図12に示す参照画素X9 〜X0 を使用
するテンプレートが生成される。この参照画素X9 〜X
0 の値が210状態(コンテキスト)の10重マルコフ情
報源となり、そのまま予測部4にコンテキスト3として
入力され、予測に使用される。
The image data 1 is input to the arithmetic coding unit 9 for coding and also to the context generation unit 2. In the context generation unit 2, in order to perform prediction of the pixel of interest, peripheral pixel is used to create a prediction model template. FIG. 12 is an explanatory diagram of an example of a template used in JBIG. When P is the target pixel, a template using the reference pixels X 9 to X 0 shown in FIG. 12 is generated. This reference pixel X 9 to X
A value of 0 becomes a 10-fold Markov information source of 2 10 states (context), which is directly input to the prediction unit 4 as context 3 and used for prediction.

【0012】予測部4には、参照画素X9 〜X0 の値に
対応した予測値8と、確率推定テーブル6を参照するた
めのステート5とを対にした予測テーブルが記憶されて
いる。参照画素X9 〜X0 の値であるコンテキスト3が
そのまま予測テーブルにアドレスとして入力され、予測
テーブルの1024個のエントリのいずれかが選択され
る。コンテキスト3により選択された予測テーブルのエ
ントリから予測値8およびステート5を取り出し、予測
値8を算術符号化部9へ入力し、また、ステート5を確
率推定テーブル6に入力する。図13は、予測部4に記
憶されている予測テーブルの一例の説明図である。図1
3に示した予測テーブルは、アドレスに対応して、予測
値とステートが対になって格納されている。なお、アド
レスは2進数で示しているが、これはコンテキストコン
テキスト3として入力される参照画素X9 〜X0 のそれ
ぞれの画素値に対応するものである。例えば、参照画素
0 の値のみが「1」で他の参照画素は「0」であれ
ば、アドレス「0000000001」が参照され、予
測値「1」とステート「2」が得られる。
The predictor 4 has a reference pixel X9~ X0To the value of
The corresponding predicted value 8 and the probability estimation table 6 are referred to.
The prediction table that is paired with state 5 for
There is. Reference pixel X9~ X0Context 3 which is the value of
It is directly input as an address in the prediction table and predicted
Any of the 1024 entries in the table is selected
It Prediction table selected by context 3
Predictive value 8 and state 5 from the
The value 8 is input to the arithmetic coding unit 9 and the state 5 is confirmed.
Input into the rate estimation table 6. FIG. 13 shows the prediction unit 4.
It is explanatory drawing of an example of the prediction table memorized. Figure 1
The prediction table shown in 3 corresponds to the address
Value and state are stored as a pair. In addition,
Res is shown in binary, but this is the context
Reference pixel X input as text 39~ X0That of
It corresponds to each pixel value. For example, the reference pixel
X 0Value of "1" and other reference pixels are "0"
For example, the address "00000001" is referenced and the
The measured value "1" and the state "2" are obtained.

【0013】確率推定テーブル6は、ステート5に対応
して、LPS発生時の領域幅LSZと、LPS発生時の
次のステート値であるNLPSおよびMPS発生時の次
のステート値であるNMPS、さらに正規化発生時に予
測値を書き換えるか否かを示すフラグであるSWが格納
されている。入力されたステート5に対応するLSZお
よびSW7を算術符号化部9に出力するとともに、NM
PS,NLPSを書き換えデータ11の一部として予測
部4へ送る。図14は、確率推定テーブル6の一例の説
明図である。図14では、ステート5の番号に対応し
て、LSZ、NMPS、NLPS、SWを対にして格納
している。例えばステートが「2」のとき、LSZとし
て「0x1114」、NLPSとして「16」、NMP
Sとして「3」、SWとして「0」が得られる。ここ
で、「0x」で始まる数値は16進数である。
Corresponding to the state 5, the probability estimation table 6 has a region width LSZ at the time of LPS occurrence, a next state value NLPS at the time of LPS occurrence and a next state value NMPS at the time of MPS occurrence, and SW, which is a flag indicating whether to rewrite the predicted value when normalization occurs, is stored. The LSZ and SW7 corresponding to the input state 5 are output to the arithmetic encoding unit 9 and the NM
The PS and NLPS are sent to the prediction unit 4 as a part of the rewrite data 11. FIG. 14 is an explanatory diagram of an example of the probability estimation table 6. In FIG. 14, LSZ, NMPS, NLPS, and SW are stored as a pair corresponding to the number of state 5. For example, when the state is “2”, LSZ is “0x1114”, NLPS is “16”, NMP.
“3” is obtained as S and “0” is obtained as SW. Here, the numerical value starting with "0x" is a hexadecimal number.

【0014】算術符号化部9では、予測部4から入力さ
れる予測値8と画像データ1とを比較し、一致していれ
ば符号化するシンボルを「0」、すなわちMPSが発生
したものとし、不一致であれば符号化するシンボルを
「1」、すなわちLPSが発生したものとする。そして
確率推定テーブル6から入力されるLSZを用い、図1
0で概略説明したように算術符号化を行なって符号デー
タ10を出力する。LPSが発生した場合には、確率推
定テーブル6から入力されるSWが予測値の書き換えを
可能としている場合(例えばSWが「1」の場合)に限
り、予測値を反転した新予測値を書き換えデータ11の
一部として予測部4に送るとともに書き換え信号12を
送り、予測部4に記憶されている予測テーブルの予測値
を書き換える。
The arithmetic coding unit 9 compares the predicted value 8 input from the prediction unit 4 with the image data 1, and if they match, the symbol to be coded is "0", that is, the MPS has occurred. If they do not match, it is assumed that the symbol to be encoded is "1", that is, LPS has occurred. Then, using the LSZ input from the probability estimation table 6, FIG.
The coded data 10 is output by performing the arithmetic coding as outlined in 0. When an LPS occurs, a new prediction value obtained by inverting the prediction value is rewritten only when the SW input from the probability estimation table 6 is capable of rewriting the prediction value (for example, when SW is “1”). As a part of the data 11, the rewriting signal 12 is sent together with sending to the prediction unit 4 to rewrite the predicted value of the prediction table stored in the prediction unit 4.

【0015】JBIGにおいては、算術符号化部9にお
いて、有効領域の有効桁を増やさないよう、有効領域は
つねに0.5以上1未満となるように調整されている。
この処理を正規化と呼ぶ。またLSZの値は必ず0.5
未満の値となるように確率推定テーブルを構成してお
く。これにより、LPS発生時には有効領域は0.5未
満となり、必ず正規化が発生する。さらに、MPS発生
時においても、新有効領域は、現有効領域から、LSZ
を減算して求めるため0.5未満となる可能性があり、
正規化が発生するケースがある。この正規化が発生した
場合に、予測部4に対して書き換え信号12を送る。予
測部4では、MPS発生時には確率推定テーブル6から
与えられるNMPSを、コンテキスト生成部2から与え
られているコンテキスト3のステートとして予測テーブ
ルに書き込む。また、LPS発生時には、確率推定テー
ブル6から与えられるNLPSをコンテキスト3のステ
ートとして予測テーブルに書き込む。このようにして予
測テーブルが更新された後、次の画像データ1について
の処理を開始する。
In JBIG, the arithmetic coding unit 9 adjusts the effective area to be always 0.5 or more and less than 1 so as not to increase the effective digits of the effective area.
This process is called normalization. The value of LSZ is always 0.5
The probability estimation table is configured so that the value is less than. As a result, when LPS occurs, the effective area becomes less than 0.5, and the normalization always occurs. Furthermore, even when MPS occurs, the new effective area is LSZ from the current effective area.
May be less than 0.5 because it is calculated by subtracting
There are cases where normalization occurs. When this normalization occurs, the rewrite signal 12 is sent to the prediction unit 4. The prediction unit 4 writes the NMPS given from the probability estimation table 6 in the prediction table as the state of the context 3 given from the context generation unit 2 when the MPS occurs. Further, when LPS occurs, the NLPS given from the probability estimation table 6 is written in the prediction table as the state of the context 3. After the prediction table is updated in this way, the process for the next image data 1 is started.

【0016】上述の予測部4と確率推定テーブル6を順
次書き換えてゆく学習型の予測/確率推定方式につい
て、具体例を用いながらさらに説明する。図15は、入
力される画像データの一具体例の説明図である。図15
では、図12に示すテンプレートの部分の画像データ1
のみを示している。図15に示すように、コンテキスト
9 〜X0 が「0000000011」のとき、注目画
素Pが1であった場合を考える。予測部4の予測テーブ
ルおよび確率推定テーブル6は、それぞれ図13、図1
4に示す内容が設定されているものとする。
The learning type prediction / probability estimation method in which the above-mentioned prediction unit 4 and probability estimation table 6 are sequentially rewritten will be further described using a specific example. FIG. 15 is an explanatory diagram of a specific example of input image data. Figure 15
Then, the image data 1 of the template portion shown in FIG.
Shows only. As shown in FIG. 15, consider a case where the pixel of interest P is 1 when the contexts X 9 to X 0 are “0000000011”. The prediction table and the probability estimation table 6 of the prediction unit 4 are shown in FIGS.
It is assumed that the contents shown in 4 are set.

【0017】まず、コンテキスト「000000001
1」がコンテキスト3として予測部4に入力される。こ
の時、予測部4の予測テーブルのアドレス「00000
00011」には、図13に示すように、予測値「0」
とステート値「80」が格納されている。予測テーブル
から読み出されたステート値「80」は、確率推定テー
ブル6に入力される。次に確率推定テーブル6のステー
ト番号「80」が参照される。確率推定テーブル6には
図14に示す内容が設定されているので、そのステート
番号「80」に対応するLSZ値「0x5832」が読
み出され、算術符号化部9に出力される。
First, the context "00000001"
1 ”is input to the prediction unit 4 as the context 3. At this time, the address “00000” in the prediction table of the prediction unit 4
As shown in FIG. 13, the predicted value "0" is set to "00011".
And the state value “80” are stored. The state value “80” read from the prediction table is input to the probability estimation table 6. Next, the state number “80” in the probability estimation table 6 is referred to. Since the content shown in FIG. 14 is set in the probability estimation table 6, the LSZ value “0x5832” corresponding to the state number “80” is read out and output to the arithmetic encoding unit 9.

【0018】このとき、注目画素Pの値は「1」である
が、予測部4の予測テーブルから読み出された予測値は
「0」であるため、LPSが発生した、ということにな
る。LPSが発生した場合、確率推定テーブル6から読
み出されたLSZ値に対応する領域が基本的に次の有効
領域となる。LSZは、0.5未満であるから、0.5
以上1未満になるように正規化が行なわれ、ステート番
号「80」のNLPSの値「80」が予測部4の予測テ
ーブルのアドレス「0000000011」のステート
値として上書きされる。また、確率推定テーブル6のス
テート番号「80」のSWが「1」であるから、予測値
は反転されて「1」となり、予測部4の予測テーブルの
アドレス「0000000011」の予測値として上書
きされる。図16は、書き換え後の予測部テーブルの一
具体例の説明図である。このようにして図16に示すよ
うに、予測部のアドレス「0000000011」の予
測値およびステート値が書き換えられる。この書き換え
られた後の予測部を用いて次の画像データ1についての
予測を行なうことになる。次に同じコンテキストが入力
された場合は、予測値が1となっている。
At this time, the value of the pixel of interest P is "1", but the predicted value read from the prediction table of the prediction unit 4 is "0", so it means that LPS has occurred. When LPS occurs, the area corresponding to the LSZ value read from the probability estimation table 6 basically becomes the next effective area. Since LSZ is less than 0.5, 0.5
The normalization is performed so as to be less than 1 and the NLPS value “80” of the state number “80” is overwritten as the state value of the address “0000000011” in the prediction table of the prediction unit 4. Further, since the SW of the state number “80” of the probability estimation table 6 is “1”, the predicted value is inverted to “1” and is overwritten as the predicted value of the address “0000000011” in the prediction table of the prediction unit 4. It FIG. 16 is an explanatory diagram of a specific example of the prediction unit table after rewriting. In this way, as shown in FIG. 16, the prediction value and the state value of the address “0000000011” of the prediction unit are rewritten. Prediction for the next image data 1 is performed using the rewritten prediction unit. When the same context is input next, the predicted value is 1.

【0019】この例ではLPSが発生したが、MPSが
発生した場合には、正規化を行なったときには予測部4
の予測テーブルのステート値をNMPS「81」に書き
換える。書き換え後、次に同じコンテキスト3が入力さ
れた場合、ステート値が「81」であり、このときのL
SZは図14から「0x4d1c」となる。この値は、
ステート値「80」のときのLSZ「0x5832」よ
りも小さく、つまりLPSが発生する確率が小さいこと
を意味する。これは、前回の同じコンテキストの時の予
測が当たったため、次に同じコンテキストが入力された
場合、MPSが発生時の領域幅を広げておき、再度予測
が当たった場合に有効領域を広くとれるようにしたもの
であり、最終的な有効領域を増大させ、符号量を減少さ
せることができる。
In this example, LPS has occurred, but if MPS has occurred, the prediction unit 4 will be used when normalization is performed.
Rewrite the state value of the prediction table of NMPS to “81”. When the same context 3 is input next time after rewriting, the state value is “81”, and L at this time is
From FIG. 14, SZ is “0x4d1c”. This value is
It is smaller than LSZ “0x5832” when the state value is “80”, that is, it means that the probability of occurrence of LPS is small. This is because the prediction at the time of the same context last time was correct, so when the same context is input next time, the area width at the time of occurrence of MPS is expanded, and the effective area can be widened when the prediction is correct again. It is possible to increase the final effective area and reduce the code amount.

【0020】以上のようにして、確率推定テーブルにし
たがって予測部を順次書き換え、予測的中率を向上さ
せ、MPS発生数を増やすとともに、MPS/LPS発
生時の領域幅を制御して、符号化効率を向上させてい
る。
As described above, the predictor is sequentially rewritten according to the probability estimation table to improve the predictive predictive value, increase the number of MPS occurrences, and control the area width at the time of MPS / LPS occurrences to perform coding. Improves efficiency.

【0021】また、復号時の処理も符号化時と同様、領
域分割を行ないながら実施される。符号化時と異なるの
は、符号化時は予測値と注目画素の比較を行ない、LP
S/MPSの領域を演算しながら求めるのに対し、復号
化時には、符号が、LPS/MPSのどちらの領域に入
っているかを演算で求め、次に周辺の復号済みの参照画
素から注目画素を逆予測しながら求める。
The processing at the time of decoding is also carried out while performing area division, as in the case of encoding. The difference from encoding is that the prediction value and the pixel of interest are compared during encoding, and the LP
While the S / MPS area is calculated while being calculated, at the time of decoding, which area of the LPS / MPS the code is included in is calculated, and then the pixel of interest is selected from the surrounding decoded reference pixels. Inverse prediction is required.

【0022】図17は、JBIGで採用されている予測
復号化方式の概略図である。図中、図11と同様の部分
には同じ符号を付して説明を省略する。21は算術復号
化部、22は逆予測部、23は逆予測値、24は書き換
えデータである。コンテキスト生成部2および逆予測部
22は、符号化時のコンテキスト生成部2および予測部
4とまったく同一に動作する。逆予測部22は符号化時
の予測部4と同一である。当然、確率推定テーブル6も
符号化時と同一のものが使用されなければならない。
FIG. 17 is a schematic diagram of the predictive decoding system adopted in JBIG. In the figure, parts similar to those in FIG. 11 are assigned the same reference numerals and explanations thereof are omitted. Reference numeral 21 is an arithmetic decoding unit, 22 is an inverse prediction unit, 23 is an inverse prediction value, and 24 is rewrite data. The context generation unit 2 and the inverse prediction unit 22 operate exactly the same as the context generation unit 2 and the prediction unit 4 at the time of encoding. The inverse prediction unit 22 is the same as the prediction unit 4 at the time of encoding. Naturally, the same probability estimation table 6 as that at the time of encoding must be used.

【0023】まず符号化時と同様に、復号化された画像
データ1の注目画素の周辺の参照画素の値によりコンテ
キストが生成され、逆予測部22、確率推定テーブル6
から、LSZと逆予測値23が算術復号化部21に出力
される。
First, as in the case of encoding, the context is generated by the value of the reference pixel around the pixel of interest of the decoded image data 1, and the inverse prediction unit 22 and the probability estimation table 6 are generated.
Then, the LSZ and the inverse prediction value 23 are output to the arithmetic decoding unit 21.

【0024】次に、符号データ10は算術復号化部21
において、有効領域の比較が行なわれた後、逆予測値2
3を用いて画像データ1を出力する。図18は、算術復
号化部の基本動作の説明図である。まず、現有効領域か
ら確率推定テーブルより入力されたLSZ幅を減算し、 (有効領域−LSZ) を得る。この値を境にMPS領域とLPS領域が分割さ
れる。次に入力された符号Cが、先に求めた(有効領域
−LSZ)の値より大きいか否かを比較する。すなわ
ち、 C>有効領域−LSZ の判定を行なう。この比較判定によって、注目画素がL
PSであるかMPSであるかが判定できるので、入力さ
れた逆予測値から、注目画素のレベルを求める。すなわ
ち、MPSであれば注目画素の値は逆予測値であり、L
PSであれば逆予測値を反転して注目画素の値とすれば
よい。以上の処理により、基本的に注目画素を復号でき
る。
Next, the coded data 10 is transferred to the arithmetic decoding unit 21.
Inverse prediction value 2 after valid area comparison is performed in
3 is used to output the image data 1. FIG. 18 is an explanatory diagram of the basic operation of the arithmetic decoding unit. First, the LSZ width input from the probability estimation table is subtracted from the current effective area to obtain (effective area-LSZ). The MPS area and the LPS area are divided at this value. Next, it is compared whether or not the input code C is larger than the value of (effective area-LSZ) previously obtained. That is, C> effective area-LSZ is determined. By this comparison determination, the pixel of interest is L
Since it can be determined whether it is PS or MPS, the level of the pixel of interest is obtained from the input inverse prediction value. That is, in the case of MPS, the value of the pixel of interest is an inverse prediction value, and
In the case of PS, the inverse predicted value may be inverted to obtain the value of the pixel of interest. The pixel of interest can be basically decoded by the above processing.

【0025】ただし、次の画素の復号のために、ここか
らさらに、新有効領域の決定、符号−有効領域の減算等
の処理が必要となる。例えば図18に示した例では、符
号データCがLPS領域に存在するので、新たな有効領
域としてLPS領域を設定し、新たなLSZを設定して
上述の処理を繰り返し行なう。また、符号化時と同様に
して、予測部4に記憶されている予測テーブルの予測値
およびステート値の書き換えも行なわれる。
However, in order to decode the next pixel, it is necessary to further determine a new effective area, a code-effective area subtraction process, and the like. For example, in the example shown in FIG. 18, since the code data C exists in the LPS area, the LPS area is set as a new effective area, a new LSZ is set, and the above-described processing is repeated. In addition, the prediction value and the state value of the prediction table stored in the prediction unit 4 are rewritten in the same manner as at the time of encoding.

【0026】以上のように、JBIGにおいては、確率
推定テーブルとして書き換え可能なメモリを用いて更新
してゆく学習型の予測方式を用い、またエントロピー符
号化部に算術符号化方式を用いることによって、従来の
ランレングス符号化等に比べて高能率な2値画像の符号
化および符号データの復号が達成される。
As described above, in JBIG, the learning type prediction method in which rewritable memory is used as the probability estimation table is used for updating, and the arithmetic coding method is used in the entropy coding section. Highly efficient coding of binary images and decoding of coded data can be achieved as compared to conventional run-length coding and the like.

【0027】しかし、JBIG方式では、高能率な符号
化が達成される反面、処理が低速になるという問題があ
る。JBIGで採用されている予測テーブルを使用する
学習型の予測方式は、予測値、ステートを書き換えて最
適な状態に近づけるため、予測的中率が向上する利点も
ある反面、メモリのアクセスに時間がかかり、また、予
測テーブルの書き換えが発生した場合には書き換えが終
了した後でなければ予測値を読み出すことができず、高
速化が難しい。
However, in the JBIG system, while highly efficient coding is achieved, there is a problem that the processing becomes slow. The learning type prediction method using the prediction table adopted in JBIG has the advantage of improving the predictive hit ratio because it rewrites the prediction value and state to bring it closer to the optimum state, but at the same time, it takes time to access the memory. In addition, when the prediction table is rewritten, the prediction value cannot be read until after the rewriting is completed, which makes it difficult to increase the speed.

【0028】特願平8−301889号および特願平8
−288731号などにおいては、符号化時あるいは復
号時に予測テーブルあるいは逆予測テーブルから複数の
データをあらかじめ読み出しておいて、現画像の符号化
結果あるいは復号結果によってデータを選択して高速化
する方式が提案されている。また、例えば特開平8−1
54059号公報に示されるように、算術符号化自体を
高速化する方式も提案されている。しかしいずれにせ
よ、1画素ごとに予測テーブルの書換えが発生する可能
性があるため、隣接する複数の画素を同時に処理するな
どの高速化の手段がとれないのが現状である。
Japanese Patent Application Nos. 8-301889 and 8
No. 288731, there is a method of preliminarily reading a plurality of data from a prediction table or an inverse prediction table at the time of encoding or decoding, and selecting the data according to the encoding result or the decoding result of the current image to increase the speed. Proposed. Further, for example, Japanese Patent Laid-Open No. 8-1
As shown in Japanese Patent No. 54059, a method of speeding up arithmetic coding itself has also been proposed. However, in any case, since the prediction table may be rewritten for each pixel, it is the current situation that a speed-up means such as simultaneously processing a plurality of adjacent pixels cannot be taken.

【0029】符号化の処理を高速化するために、符号器
を複数用いて並列に処理する方法が一般に考えられる。
すなわち、入力画像を複数の領域に分割して、それぞれ
に対応する符号器で符号化するものである。しかし、こ
の方式では、スキヤナ等から入力画像がページの先頭か
ら1画素ずつ転送される場合には対応できない。例えば
入力画像を2分割して2つの符号器で符号化する場合、
一方の領域の画素が連続して転送され、その間はその一
方の領域に対応する符号器のみが動作し、その後に他方
の領域の画素の転送が開始されるまで、他方の領域に対
応する符号器は動作できない。そのため、複数の符号器
を備えているにもかかわらず、並列に処理することがで
きない。並列に処理するため、画像をメモリに一旦格納
してから転送することが考えられるが、メモリ量が増え
るという問題がある。また伸長時に出力装置などへリア
ルタイム出力する場合も、メモリに一旦格納する必要が
ある。
In order to speed up the encoding process, it is generally conceivable to use a plurality of encoders for parallel processing.
That is, the input image is divided into a plurality of areas and encoded by the corresponding encoders. However, this method cannot handle the case where the input image is transferred pixel by pixel from the top of the page due to scanning or the like. For example, when the input image is divided into two and encoded by two encoders,
Pixels in one region are continuously transferred, during which only the encoder corresponding to that one region operates, and then the code corresponding to the other region is started until the transfer of pixels in the other region starts. The vessel cannot work. Therefore, it is not possible to perform processing in parallel, even though a plurality of encoders are provided. Since the images are processed in parallel, it is conceivable that the images are once stored in the memory and then transferred, but there is a problem that the memory amount increases. Also, when outputting in real time to an output device or the like at the time of decompression, it is necessary to temporarily store in the memory.

【0030】また別の方式として、例えば米国特許第
4,982,292号明細書などに記載されているよう
に、入力画像を1画素おきに符号化する方式なども提案
されている。しかしこの方式では、JBIGにおいて高
能率符号化を実現するコンテキストを1画素おきに生成
することとなって予測効率が落ちてしまい、符号化効率
に影響するという問題がある。
As another method, as described in US Pat. No. 4,982,292, a method of encoding an input image every other pixel has been proposed. However, this method has a problem in that the context for realizing high-efficiency coding in JBIG is generated every other pixel, and the prediction efficiency is lowered, which affects the coding efficiency.

【0031】また、上述したいずれの高速化のための方
式においても、並列的に処理された符号が別々に出力さ
れるため、符号を保持するメモリ管理が複雑になるとい
う問題がある。
Further, in any of the above-described methods for increasing the speed, since the codes processed in parallel are separately output, there is a problem that the memory management for holding the codes becomes complicated.

【0032】別々に生成された符号データを1つに合成
する方法としては、例えば特開平6−38048号公報
などに記載されているように、それぞれの符号データの
先頭に識別コードを挿入する方法がある。この方法によ
れば、符号としては1つになるが、それぞれの符号デー
タ長を長くするとそれだけ余分なメモリを必要とする
し、切り替えを細かくすると識別コード量が増大してし
てしまうという問題があった。
As a method of synthesizing separately generated code data into one, as described in, for example, JP-A-6-38048, a method of inserting an identification code at the beginning of each code data There is. According to this method, the number of codes is one, but if each code data length is increased, an extra memory is required, and if the switching is finely performed, the identification code amount increases. there were.

【0033】[0033]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、高速に高効率の符号化ある
いは復号化を行なうことができるとともに、符号データ
量を抑えて1つの符号データとして管理可能な符号デー
タを生成する符号化装置およびその符号データを復号す
る復号化装置を提供することを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned circumstances and is capable of performing high-speed and highly efficient encoding or decoding and suppressing the amount of code data to obtain a single code. It is an object of the present invention to provide an encoding device that generates encoded data that can be managed as data and a decoding device that decodes the encoded data.

【0034】[0034]

【課題を解決するための手段】上記課題を解決するため
に、第1の発明(請求項1に記載)の符号化装置は、1
つのコンテキスト生成手段により、例えばJBIGと同
様のコンテキストを生成したのち、そのコンテキストを
用いて、複数の符号化手段のいずれかで符号化する。1
つのコンテキスト生成手段でコンテキストを生成するの
で、各符号化手段において的中率の高い予測を行なうこ
とができ、高効率に符号化することができる。複数の符
号化手段は1画素ずつ入力されるごとに切り換えられる
ので、ある符号化手段に1画素入力されて符号化処理を
行なっている間に他の符号化手段は次の1画素の入力を
受け付け、符号化処理を開始することができる。そのた
め、複数の符号化手段は並列的に処理することができ、
高速に符号化することができる。また、入力される画素
データを領域ごとに蓄積する必要がないので、入力側の
メモリは不要である。
In order to solve the above-mentioned problems, the encoding apparatus of the first invention (described in claim 1) is
For example, one context generation unit generates a context similar to that of JBIG, and then the context is used to perform encoding with any of the plurality of encoding units. 1
Since the contexts are generated by the one context generating means, it is possible to perform prediction with a high hit rate in each encoding means, and it is possible to perform encoding with high efficiency. Since a plurality of encoding means are switched every time one pixel is input, while one pixel is input to a certain encoding means to perform an encoding process, another encoding means inputs the next one pixel. It is possible to accept and start the encoding process. Therefore, multiple encoding means can be processed in parallel,
It can be encoded at high speed. Further, since it is not necessary to store the input pixel data for each area, a memory on the input side is unnecessary.

【0035】各符号化手段で符号化された符号データ
は、合成手段で合成されて1つの合成符号データとして
出力される。そのため、複数の符号化手段で符号化する
にもかかわらず、1つの合成符号データを管理すればよ
く、符号データの取り扱いが容易となる。合成の際には
各符号化手段から出力される符号データを所定量ずつ順
次出力することによって通常状態での識別コードを排除
し、合成符号データのデータ量を抑えている。このと
き、ある符号化手段からの出力が多量に蓄積されること
のないように、請求項2に記載の発明のように、識別コ
ードを付してある符号化手段からの出力を連続して出力
できるように構成し、符号化手段の出力段に設ける記憶
手段の容量を減少させている。
The code data coded by each coding means is combined by the combining means and output as one combined code data. Therefore, it is only necessary to manage one combined code data despite the fact that the code data is coded by a plurality of coding means, and the code data can be easily handled. When synthesizing, the code data output from each encoding means is sequentially output by a predetermined amount to eliminate the identification code in the normal state and suppress the data amount of the synthetic code data. At this time, in order to prevent the output from a certain encoding means from being accumulated in a large amount, the output from the encoding means to which the identification code is attached is continuously provided as in the invention according to claim 2. The capacity of the storage means provided in the output stage of the encoding means is reduced so that it can be output.

【0036】[0036]

【0037】第2の発明(請求項3に記載)の復号化装
置においては、符号化時に生成した合成された合成符号
データを分割手段で符号データに分割して各復号化手段
へ分配入力し、複数の復号化手段でそれぞれ復号化す
る。分配された符号データは、それぞれ並列的に処理す
る別の符号化手段で符号化されたものであるので、各復
号化手段は並列的に処理が可能であり、高速に復号化を
行なうことができる。各復号化手段による復号結果の出
力は、1画素ごとに切り換えられ、復号された画像が形
成される。なお、分配された符号データは、請求項4に
記載の復号化装置のように、各復号化手段に対応した記
憶手段に一時格納しておくとよい。また、復号化手段に
おいては、請求項5に記載の復号化装置のように、その
復号化手段で最後に復号した画素から次に復号すべき画
素までの復号化手段の数だけの画素について、それらの
画素のとりうる状態ごとに逆予測テーブルから注目画素
の逆予測値を得ておき、その中から他の復号化手段から
出力される復号結果およびその復号化手段による直前の
復号結果に従って1つの逆予測値を選択手段で選択する
ことによって、さらに高速な復号化処理を実現すること
ができる。
In the decoding device according to the second aspect of the present invention (claim 3), the combined coded data generated at the time of coding is divided into coded data by the dividing means, and the divided coded data is distributed and input to each decoding means. , Each of which is decrypted by a plurality of decryption means. Since the distributed code data is coded by different coding means for processing in parallel, the respective decoding means can process in parallel and can perform high-speed decoding. it can. The output of the decoding result by each decoding unit is switched for each pixel to form a decoded image. The distributed code data may be temporarily stored in the storage means corresponding to each decoding means as in the decoding device according to the fourth aspect. Further, in the decoding means, as in the decoding device according to claim 5, as for the pixels as many as the number of the decoding means from the pixel finally decoded by the decoding means to the pixel to be decoded next, The inverse prediction value of the pixel of interest is obtained from the inverse prediction table for each possible state of those pixels, and 1 is obtained according to the decoding result output from another decoding means and the immediately preceding decoding result by the decoding means. By selecting one of the inverse prediction values by the selecting means, it is possible to realize a faster decoding process.

【0038】[0038]

【0039】[0039]

【発明の実施の形態】図1は、本発明の符号化装置の実
施の一形態を示すブロック構成図である。図中、図11
と同様の部分には同じ符号を付して説明を省略する。3
1は符号化部、32はFIFOメモリ、33はメモリ状
態信号、34はリード信号、35は単位符号データ、3
6は合成部、37は合成符号データである。なお、図1
では符号化部31を2ブロック設けた例を示しており、
一方をAブロック、他方をBブロックとして、各ブロッ
クに関係する構成には‘−’の後にAまたはBを記して
区別している。
1 is a block diagram showing an embodiment of an encoding apparatus according to the present invention. In the figure, FIG.
The same reference numerals are given to the same portions as, and the description thereof will be omitted. Three
1 is an encoding unit, 32 is a FIFO memory, 33 is a memory status signal, 34 is a read signal, 35 is unit code data, 3
6 is a synthesizing unit, and 37 is synthetic code data. Note that FIG.
Shows an example in which two blocks of the encoding unit 31 are provided,
One block is an A block and the other block is a B block, and the configuration related to each block is distinguished by adding A or B after “−”.

【0040】各符号化部31−A,Bは、予測部4、確
率推定テーブル6、算術符号化部9から構成されてお
り、コンテキスト生成部2を各符号化部31−A,Bに
共通した構成として設けている。画像データ1は、共通
して設けられているコンテキスト生成部2に入力される
とともに、それぞれの符号化部31−A,Bの算術符号
化部9に入力される。コンテキスト生成部2で生成され
たコンテキスト3−A,Bは、それぞれの符号化部31
−A,Bの予測部4に入力される。
Each coding unit 31-A, B comprises a prediction unit 4, a probability estimation table 6, and an arithmetic coding unit 9, and the context generation unit 2 is common to each coding unit 31-A, B. It is provided as a configuration. The image data 1 is input to the context generation unit 2 that is provided in common, and is also input to the arithmetic encoding unit 9 of each encoding unit 31-A, B. The contexts 3-A and B generated by the context generation unit 2 are encoded by the respective encoding units 31.
-A, B input to the prediction unit 4.

【0041】また、各符号化部31−A,Bに対応し
て、各符号化部31−A,Bから出力される符号データ
10−A,Bを一時的に格納するFIFOメモリ32−
A,Bを設けている。このFIFOメモリ32−A,B
は、合成部36からのリード信号34−A,Bに従っ
て、先に格納した符号データから順に、基本的には所定
データ量を単位として読み出し、単位符号データ35−
A,Bとして合成部36へ渡す。FIFOメモリ32−
A,Bは、それぞれ複数単位の符号データを格納可能で
あり、空状態か満杯状態かを示すメモリ状態信号33−
A,Bを出力する。
Further, a FIFO memory 32-for temporarily storing the code data 10-A, B output from the encoding units 31-A, B corresponding to the encoding units 31-A, B.
A and B are provided. This FIFO memory 32-A, B
Is read in sequence from the previously stored code data in accordance with the read signals 34-A and B from the synthesizing unit 36, basically in units of a predetermined data amount, and the unit code data 35
It is passed to the synthesizing unit 36 as A and B. FIFO memory 32-
Each of A and B can store a plurality of units of code data, and a memory status signal 33-indicating whether it is empty or full.
Output A and B.

【0042】合成部36は、各FIFOメモリ32−
A,Bからのメモリ状態信号33−A,Bに基づき、基
本的にはFIFOメモリ32−AとFIFOメモリ32
−Bに対して交互にリード信号34−Aまたはリード信
号34−Bを送出して符号データを読み出し、単位符号
データ35−Aまたは単位符号データ35−Bを得て、
合成符号データ37として出力する。FIFOメモリ3
2−AまたはFIFOメモリ32−Bの一方が空の状態
で他方が満杯状態となった場合には、満杯状態となった
側の識別符号を挿入して満杯となったFIFOメモリか
ら連続して単位符号データを読み出し、合成符号データ
37として出力する。また、符号データの終了時には、
FIFOメモリ32−AまたはFIFOメモリ32−B
に残っている符号データの読み出しおよび出力を行な
う。
The synthesizing unit 36 is provided for each FIFO memory 32-.
Based on the memory status signals 33-A and B from A and B, basically, the FIFO memory 32-A and the FIFO memory 32 are
-B, the read signal 34-A or the read signal 34-B is alternately sent to read the code data to obtain the unit code data 35-A or the unit code data 35-B.
The composite code data 37 is output. FIFO memory 3
When one of 2-A or FIFO memory 32-B is empty and the other is full, the identification code of the side that has become full is inserted to continue from the full FIFO memory. The unit code data is read and output as the composite code data 37. Also, at the end of code data,
FIFO memory 32-A or FIFO memory 32-B
The remaining code data is read and output.

【0043】次に、本発明の符号化装置の実施の一形態
における動作の一例について説明する。図2は、画像デ
ータの一例の説明図である。図2(A)には(n+1)
×(n+1)画素からなる原画像を示しており、図中の
上から下方向に各ラインの左端から順に右端までの各画
素のデータが入力されるものとする。すなわち、P00
01,・・・,P0n,P10,P11,・・・,P1n
20,・・・,Pmnの順で各画素の画像データ1が入力
される。図1に示した構成では、符号化部を2ブロック
設けているが、各符号化部31−A,Bはそれぞれ交互
に、入力される画像データ1の符号化を行なう。すなわ
ち、符号化部31−Aは図2(B)に示すように、
00,P02,・・・,P10,P12,・・・の画素(2番
目の添字が偶数の画素)についての符号化処理を行な
う。また、符号化部31−Bは図2(C)に示すよう
に、P01,P03,・・・,P11,P13,・・・の画素
(2番目の添字が奇数の画素)についての符号化処理を
行なうように制御される。
Next, an example of operation in the embodiment of the encoding apparatus of the present invention will be described. FIG. 2 is an explanatory diagram of an example of image data. In FIG. 2A, (n + 1)
An original image composed of x (n + 1) pixels is shown, and the data of each pixel from the left end to the right end of each line is sequentially input from the top to the bottom in the drawing. That is, P 00 ,
P 01 , ..., P 0n , P 10 , P 11 , ..., P 1n ,
The image data 1 of each pixel is input in the order of P 20 , ..., P mn . In the configuration shown in FIG. 1, two blocks of the encoding unit are provided, but the encoding units 31-A and 31-B alternately encode the input image data 1. That is, the encoding unit 31-A, as shown in FIG.
Encoding processing is performed on the pixels P 00 , P 02 , ..., P 10 , P 12 , ... (Pixels with the second subscript being an even number). In addition, as shown in FIG. 2C, the encoding unit 31-B has pixels of P 01 , P 03 , ..., P 11 , P 13 , ... (Pixels of which the second subscript is an odd number). Is controlled so as to perform the encoding process for.

【0044】コンテキスト生成部2は、入力された画像
データ1から、例えば図12に示したようなテンプレー
トに従ってコンテキスト3を生成する。例えばP22の画
像データ1が入力されたとき、図2(D)に示すP22
除く10画素によってコンテキストを生成する。次のP
23の画像データ1が入力されたときには、図2(E)に
示すP23を除く10画素によってコンテキストを生成す
る。これらのコンテキストは、いずれの符号化部によっ
て使用されるかに関係なく、一律に生成される。このよ
うに符号化部に関係なくコンテキスト3を生成すること
によって、予測の的中率を向上させ、効率よく符号化で
きるようにしている。
The context generation unit 2 generates the context 3 from the input image data 1 according to the template shown in FIG. 12, for example. For example, when the image data 1 of P 22 is input, the context is generated by 10 pixels excluding P 22 shown in FIG. Next P
When the image data 1 of 23 is input, the context is generated by 10 pixels except P 23 shown in FIG. These contexts are uniformly generated regardless of which coding unit is used. In this way, by generating the context 3 regardless of the encoding unit, the accuracy of prediction is improved and efficient encoding is possible.

【0045】符号化部31−Aでは、2番目の添字が偶
数の画素が入力されると、コンテキスト生成部2から出
力されるコンテキスト3−Aおよび画像データ1−Aを
取り込む。例えば、P22の画像データが入力されたと
き、これを画像データ1−Aとして取り込むとともに、
22に対応する図2(D)に示すテンプレートによって
生成されたコンテキスト3−Aを取り込む。同様に、符
号化部31−Bでは、2番目の添字が奇数の画素が入力
されると、コンテキスト生成部2から出力されるコンテ
キスト3−Bおよび画像データ1−Bを取り込む。例え
ば、P23の画像データが入力されたとき、これを画像デ
ータ1−Bとして取り込むとともに、P23に対応する図
2(E)に示すテンプレートによって生成されたコンテ
キスト3−Bを取り込む。
In the encoding unit 31-A, when a pixel having a second subscript with an even number is input, the context 3-A and the image data 1-A output from the context generation unit 2 are fetched. For example, when the image data of P 22 is input, this is taken in as image data 1-A and
The context 3-A generated by the template shown in FIG. 2D corresponding to P 22 is fetched. Similarly, when the pixel having the second subscript with an odd number is input, the encoding unit 31-B takes in the context 3-B and the image data 1-B output from the context generation unit 2. For example, when the image data of P 23 is input, it is captured as the image data 1-B, and the context 3-B generated by the template shown in FIG. 2E corresponding to P 23 is captured.

【0046】各符号化部31−A,Bでは、上述の図1
1と同様の動作によって、コンテキスト3−A,Bに従
って画像データ1−A,Bを適応的に予測符号化し、符
号データ10−A,Bを出力する。
In each of the coding units 31-A and 31-B, the above-mentioned FIG.
By the same operation as in 1, the image data 1-A and B are adaptively predictively encoded according to the contexts 3-A and B, and the code data 10-A and B are output.

【0047】図3は、本発明の符号化装置の実施の一形
態における画像の入力と各符号化部の動作の一例を示す
タイミングチャートである。入力画像クロックとともに
1画素分の画像データ1が入力される。符号化部31−
Aおよび符号化部31−Bには、入力画像クロックを2
分周した、それぞれ位相の異なるクロックが入力され
る。符号化部31−A,Bにおいてはそれぞれのクロッ
クの立ち上がりで画像データ1をラッチするため、結果
的にラッチされた画像データA,Bは1画素おきにそれ
ぞれの符号化部に入力されることになる。図3の例で
は、まず画素P20が入力されている間に符号化部31−
Aのクロックが立ち上がり、P20が符号化部31−Aに
取り込まれて符号化される。次に画素P21が入力されて
いる間に符号化部31−Bのクロックが立ち上がり、P
21が符号化部31−Bに取り込まれて符号化される。P
21が入力されている間は符号化部31−Aのクロックは
立ち上がらないため、P21は符号化部31−Aには取り
込まれない。このようにして、符号化部31−Aと符号
化部31−Bに交互に画像データ1が取り込まれて符号
化される。
FIG. 3 is a timing chart showing an example of the input of an image and the operation of each coding section in the embodiment of the coding apparatus of the present invention. The image data 1 for one pixel is input together with the input image clock. Encoding unit 31-
The input image clock is set to 2 in A and the encoding unit 31-B.
The divided clocks with different phases are input. Since the image data 1 is latched at the rising edges of the respective clocks in the encoding units 31-A and B, the resulting latched image data A and B must be input to the respective encoding units every other pixel. become. In the example of FIG. 3, first, while the pixel P 20 is being input, the encoding unit 31-
The clock of A rises, and P 20 is taken into the encoding unit 31-A and encoded. Next, while the pixel P 21 is being input, the clock of the encoding unit 31-B rises and P
21 is captured by the encoding unit 31-B and encoded. P
While 21 is being input, the clock of the encoding unit 31-A does not rise, so P 21 is not taken into the encoding unit 31-A. In this way, the image data 1 is alternately captured by the encoding unit 31-A and the encoding unit 31-B and encoded.

【0048】図3に示したように、符号化部31−A,
Bは、入力画像クロックの2周期分だけの間、符号化処
理を行なうことができる。逆に、符号化部31−A,B
は並列的に動作するので、処理速度の倍の速度で画像デ
ータ1を入力して符号化することができ、全体の符号化
速度は符号化部が1個の場合に比べて倍になる。このと
き、コンテキスト生成部2を共用しているので、符号化
部31−Aと符号化部31−Bはそれぞれ独立して符号
化処理を行なっているにもかかわらず、的中率の高い予
測を行なうことができ、圧縮効率を向上させている。
As shown in FIG. 3, the coding units 31-A,
B can perform the encoding process for only two cycles of the input image clock. On the contrary, the encoding units 31-A, B
Operate in parallel, the image data 1 can be input and encoded at a speed twice as fast as the processing speed, and the overall encoding speed is doubled as compared with the case where there is only one encoding unit. At this time, since the context generation unit 2 is shared, the encoding unit 31-A and the encoding unit 31-B independently perform the encoding process, but the prediction with a high hit rate is performed. It is possible to improve the compression efficiency.

【0049】各符号化部31−A,Bで符号化されて出
力された符号データ10−A,Bは、それぞれ、FIF
Oメモリ32−A,Bに格納される。このときFIFO
メモリ32−A,Bには、所定のデータ量を単位として
複数単位の符号データが格納される。ここでは一例とし
てワード単位で符号データが格納されるものとする。
The coded data 10-A and B coded and output by the respective coding units 31-A and B are respectively FIF.
It is stored in the O memories 32-A and B. FIFO at this time
A plurality of units of code data are stored in the memories 32-A and B with a predetermined data amount as a unit. Here, as an example, it is assumed that code data is stored in word units.

【0050】図4は、本発明の符号化装置の実施の一形
態における合成部の動作の一例を示すフローチャートで
ある。このフローチャートでは、FIFOメモリ32−
Aを‘A’として示し、FIFOメモリ32−Bを
‘B’として示している。合成部36は、基本的にはS
71〜S74の動作を繰り返す。すなわち、S71にお
いてメモリ状態信号33−Aを参照し、FIFOメモリ
32−Aが空か否かを判定し、空でなければS72にお
いてFIFOメモリ32−Aから1ワード分の符号デー
タ(単位符号データ35−A)を読み出して合成符号デ
ータ37として出力する。次にS73においてメモリ状
態信号33−Bを参照し、FIFOメモリ32−Bが空
か否かを判定し、空でなければS74においてFIFO
メモリ32−Bから1ワード分の符号データ(単位符号
データ35−B)を読み出して合成符号データ37とし
て出力する。これを繰り返すことによって、符号化部3
1−Aと符号化部31−Bで符号化した符号データが1
ワードごとに交互に出力されることになり、符号化部3
1−A,Bで生成した符号データが合成されたことにな
る。このような合成を行なうことによって、符号化部3
1−A,Bでそれぞれ生成した符号データを別々に管理
することなく、1つの符号データとして管理することが
できるようになる。また、それぞれの符号データを識別
する識別コードをなるべく排除することができ、合成時
のデータ量の増大を抑制している。
FIG. 4 is a flowchart showing an example of the operation of the synthesizing section in the embodiment of the encoding apparatus of the present invention. In this flowchart, the FIFO memory 32-
A is shown as'A 'and FIFO memory 32-B is shown as'B'. The synthesizing unit 36 is basically S
The operations of 71 to S74 are repeated. That is, in S71, it is determined whether or not the FIFO memory 32-A is empty by referring to the memory status signal 33-A. If it is not empty, in S72, one word of code data (unit code data) from the FIFO memory 32-A is read. 35-A) is read out and output as composite code data 37. Next, in S73, it is determined whether or not the FIFO memory 32-B is empty by referring to the memory status signal 33-B. If not empty, the FIFO memory is used in S74.
The code data (unit code data 35-B) for one word is read from the memory 32-B and output as the composite code data 37. By repeating this, the encoding unit 3
1-A and the encoded data encoded by the encoding unit 31-B is 1
Each word is output alternately, and the encoding unit 3
This means that the code data generated in 1-A and B are combined. By performing such synthesis, the encoding unit 3
The code data generated in 1-A and B can be managed as one code data without separately managing them. Further, the identification code for identifying each code data can be eliminated as much as possible, and the increase of the data amount at the time of composition is suppressed.

【0051】算術符号化方式では、1つの画像データの
入力に対して1つの符号が出力されるとは限らず、例え
ば非常に効率よく符号化できる場合、多数の画像データ
が入力されないと符号は出力されない。また、図10を
用いて説明したように、有効領域の基底の小数部分を符
号とするため、場合によっては有効領域の変化によって
桁上がりが発生する場合がある。例えば有効領域の基底
が2進数で0.0111のとき、有効領域の分割によっ
て例えば0.10001等に変更される場合がある。こ
のような場合には、この桁上がりが発生する可能性を考
慮して、符号を出力することはできない。
In the arithmetic coding method, one code is not always output for one input of image data. For example, when coding can be performed very efficiently, the code is not input if a large number of image data are not input. No output. Further, as described with reference to FIG. 10, since the decimal part of the base of the effective area is used as a code, a carry may occur depending on the change of the effective area in some cases. For example, when the base of the effective area is 0.0111 in binary, it may be changed to 0.10001 or the like due to division of the effective area. In such a case, the code cannot be output in consideration of the possibility that this carry will occur.

【0052】このように符号データが出力されない状態
が一方の符号化部で発生し、他方の符号化部からの符号
データの出力がFIFOメモリに蓄積されてゆく場合が
ある。例えば符号化部31−Aから符号データが出力さ
れない状態が続き、符号化部31−Bからの符号データ
がFIFOメモリ32−Bに蓄積されいている場合に
は、S75で符号化が終了したか否かを判断した後、S
76においてFIFOメモリ32−Bが満杯か否かを判
定する。満杯でない場合には、そのままS71へ戻る。
これは、なるべく1ワードごとに交互に符号データを出
力するフォーマットを崩さないためであり、符号化部3
1−Aから符号データが出力された時点で再び交互に1
ワードずつ読み出し、出力する処理を開始する。
There is a case where the code data is not output in this way in one of the encoding units, and the output of the code data from the other encoding unit is accumulated in the FIFO memory. For example, when the state in which the code data is not output from the encoding unit 31-A continues and the code data from the encoding unit 31-B is accumulated in the FIFO memory 32-B, whether the encoding is completed in S75. After judging whether or not S
At 76, it is determined whether the FIFO memory 32-B is full. If it is not full, the process directly returns to S71.
This is because the format of outputting code data alternately for each word is not destroyed, if possible.
When the code data is output from 1-A, it is alternately set to 1 again.
The process of reading and outputting word by word is started.

【0053】さらに符号化部31−Aから符号データが
出力されず、FIFOメモリ32−Bが満杯になると、
符号化部31−Bは符号データを出力できないため符号
化処理を停止しなければならなくなる。このような事態
を回避するため、メモリ状態信号33−Aが空を示し、
メモリ状態信号33−Bが満杯を示している場合には、
S77において、直前に出力した符号データと同じブロ
ックからの符号データを連続して出力する旨を示す識別
コードを出力するとともに、FIFOメモリ32−Bか
らすべてのワードを読み出して出力する。そしてS71
へ戻り、再びFIFOメモリ32−Aに符号データが格
納されるのを待つ。
Further, when no code data is output from the encoding unit 31-A and the FIFO memory 32-B becomes full,
Since the encoding unit 31-B cannot output the encoded data, it has to stop the encoding process. To avoid this situation, the memory status signal 33-A indicates empty
If the memory status signal 33-B indicates full,
In S77, an identification code indicating that code data from the same block as the code data output immediately before is continuously output is output, and all words are read from the FIFO memory 32-B and output. And S71
Then, the process returns to and waits for the code data to be stored in the FIFO memory 32-A again.

【0054】符号化部31−Bから符号データが出力さ
れない状態が続き、符号化部31−Aからの符号データ
がFIFOメモリ32−Aに蓄積されている場合も同様
である。S72でFIFOメモリ32−Aから1ワード
分の単位符号データ35−Aを読み出して出力した後、
S73でFIFOメモリ32−Bが空であると判定され
る。S78で符号化処理が終了したか否かを判定した
後、S79でFIFOメモリ32−Aが満杯か否かを判
定する。FIFOメモリ32−Aが満杯でなければS7
3へ戻り、FIFOメモリ32−Bに符号データが格納
されるのを待つ。FIFOメモリ32−Bが空のままF
IFOメモリ32−Aが満杯となると、S80におい
て、識別コードを出力するとともに、FIFOメモリ3
2−Aからすべてのワードを読み出して出力する。そし
てS73へ戻り、再びFIFOメモリ32−Bに符号デ
ータが格納されるのを待つ。
The same applies when the code data is not output from the encoding unit 31-B and the code data from the encoding unit 31-A is accumulated in the FIFO memory 32-A. After the unit code data 35-A for one word is read from the FIFO memory 32-A and output in S72,
In step S73, it is determined that the FIFO memory 32-B is empty. After it is determined in S78 whether the encoding process is completed, it is determined in S79 whether the FIFO memory 32-A is full. If the FIFO memory 32-A is not full, S7
3, the process waits until code data is stored in the FIFO memory 32-B. FIFO memory 32-B remains empty F
When the IFO memory 32-A becomes full, in S80, the identification code is output and the FIFO memory 3
Read and output all words from 2-A. Then, the process returns to S73 and waits again for the code data to be stored in the FIFO memory 32-B.

【0055】このように、FIFOメモリが満杯の場合
には識別コードとともに符号データを出力することによ
って、合成符号データのデータ量が多少増加するもの
の、符号化部を停止させることなく、高速な符号化処理
を行なうことができる。
As described above, when the FIFO memory is full, by outputting the code data together with the identification code, the data amount of the combined code data is slightly increased, but the high-speed code can be performed without stopping the coding unit. The conversion process can be performed.

【0056】符号化すべき画像データ1の入力が無くな
り、符号化処理が終了した場合にも、いずれかのFIF
Oメモリに符号データが格納されたまま、他のFIFO
メモリに符号データが格納されるのを待つことになる。
これを回避するため、S75およびS78で符号化処理
の終了を判定する。S75で符号化処理の終了を判定し
た場合には、S71でFIFOメモリ32−Aが空であ
ると判定されているので、FIFOメモリ32−Bにデ
ータが残っていることになる。S81において、識別コ
ードを出力した後、FIFOメモリ32−B内の符号デ
ータをすべて読み出し、出力する。また、S78で符号
化処理の終了を判定した場合は、S73でFIFOメモ
リ32−Bが空であると判定されているので、S82に
おいて、識別コードを出力後、FIFOメモリ32−A
内の符号データをすべて読み出し、出力する。このよう
にして、すべての符号データを出力することができる。
Even when the input of the image data 1 to be coded is lost and the coding process is completed, either of the FIF
Other FIFOs with code data stored in O memory
It waits for the code data to be stored in the memory.
In order to avoid this, the end of the encoding process is determined in S75 and S78. When the end of the encoding process is determined in S75, it is determined in S71 that the FIFO memory 32-A is empty, so that data remains in the FIFO memory 32-B. In S81, after outputting the identification code, all code data in the FIFO memory 32-B is read and output. If it is determined in S78 that the encoding process has ended, it is determined in S73 that the FIFO memory 32-B is empty. Therefore, in S82, after the identification code is output, the FIFO memory 32-A is output.
Reads and outputs all the code data in. In this way, all code data can be output.

【0057】図5は、合成符号データの一例の説明図で
ある。上述のようにして合成部36から出力された合成
符号データ37の一例を図5に示している。ここで、
‘A’はFIFOメモリ32−Aから読み出した単位符
号データ35−Aであり、‘B’はFIFOメモリ32
−Bから読み出した単位符号データ35−Bである。基
本的にFIFOメモリ32−AとFIFOメモリ32−
Bから交互に1ワードずつ単位符号データ35−A,B
を読み出して出力するので、FIFOメモリ32−Aか
ら読み出した単位符号データ35−Aと、FIFOメモ
リ32−Bから読み出した単位符号データ35−Bが、
1ワードずつ交互に並んでいる。すなわち、FIFOメ
モリ32−Aから読み出される単位符号データ35−A
が順にA0,A1 ,・・・であり、FIFOメモリ32
−Bから読み出される単位符号データ35−Bが順にB
0 ,B1 ・・・であったとすると、まず、A0 ,B0
0,B1 ・・・とそれぞれのブロックの符号が交互に
出力される。
FIG. 5 is an explanatory diagram of an example of the synthetic code data. An example of the combined code data 37 output from the combining unit 36 as described above is shown in FIG. here,
“A” is the unit code data 35-A read from the FIFO memory 32-A, and “B” is the FIFO memory 32.
It is the unit code data 35-B read from -B. Basically, FIFO memory 32-A and FIFO memory 32-
Unit code data 35-A, B alternately from B every 1 word
Since the unit code data 35-A read from the FIFO memory 32-A and the unit code data 35-B read from the FIFO memory 32-B are
The words are alternated one by one. That is, the unit code data 35-A read from the FIFO memory 32-A
Are A 0 , A 1 , ... In turn, and the FIFO memory 32
Unit code data 35-B read from
0 , B 1, ..., First, A 0 , B 0 ,
The sign of A 0, B 1 ··· and each block is output alternately.

【0058】An を出力した後、符号化部31−Aから
符号データ10−Aが出力されない期間が続き、その間
に符号化部31−Bから符号データ10−Bが出力され
ているとする。Bn を出力した後は、FIFOメモリ3
2−Bが満杯となるまで符号データの読み出しは行なわ
れず、そのままFIFOメモリ32−Bへ格納されるだ
けである。この状態がさらに続き、FIFOメモリ32
−Bが満杯となると、識別コードを出力し、FIFOメ
モリ32−B内の符号データをすべて読み出して出力す
る。なお、ここではFIFOメモリ32の容量を16ワ
ードとしている。図5に示すように、識別コードに続
き、Bn+1 からBn+16が出力されている。
It is assumed that, after outputting A n , a period in which the encoding data 31-A does not output the encoded data 10-A continues, during which the encoding data 31-B outputs the encoded data 10-B. . After outputting B n , the FIFO memory 3
The code data is not read until the 2-B is full, and is simply stored in the FIFO memory 32-B as it is. This state continues, and the FIFO memory 32
When -B is full, the identification code is output, and all code data in the FIFO memory 32-B is read and output. The capacity of the FIFO memory 32 is 16 words here. As shown in FIG. 5, B n + 1 to B n + 16 are output following the identification code.

【0059】この例ではその後、符号化部31−Aから
符号データの出力があり、An+1 ,Bn+17,・・・と再
び交互に読み出しおよび出力がなされている。もちろ
ん、その後も符号化部31−Aから符号データの出力が
なく、再びFIFOメモリ32−Bが満杯となれば、識
別コードとともにFIFOメモリ32−B内のすべての
符号データを出力する。符号化部31−Bから符号デー
タの出力が無く、FIFOメモリ32−Aに符号データ
が蓄積されてゆく場合も同様である。このようにして、
符号化部31−Aと符号化部31−Bで別々に符号化し
た符号データを1つにまとめることができ、しかもデー
タ量の増加を抑えた合成符号データ37を出力すること
ができる。
In this example, thereafter, the coded data is output from the coding unit 31-A, and read and output are alternately performed again with A n + 1 , B n + 17 , .... Of course, after that, there is no output of code data from the encoding unit 31-A, and if the FIFO memory 32-B becomes full again, all the code data in the FIFO memory 32-B is output together with the identification code. The same applies when the code data is not output from the encoding unit 31-B and the code data is accumulated in the FIFO memory 32-A. In this way
It is possible to combine the code data separately encoded by the encoding unit 31-A and the encoding unit 31-B into one, and output the combined code data 37 in which the increase in the data amount is suppressed.

【0060】上述の識別コードは、通常の符号と異なる
ものであれば何でもよい。例えば、JBIGの規格で定
められるFF04(16進)などのコメントマーカを使
用してもよい。
The above-mentioned identification code may be any code as long as it is different from a normal code. For example, a comment marker such as FF04 (hexadecimal) defined by the JBIG standard may be used.

【0061】図6は、本発明の復号化装置の実施の一形
態を示すブロック構成図である。図中、図17と同様の
部分には同じ符号を付して説明を省略する。41は復号
化部、42はFIFOメモリ、43はメモリ状態信号、
44はライト信号、45は単位符号データ、46は分割
部、47は合成符号データである。なお、図6では復号
化部41を2ブロック設けた例を示しており、一方をA
ブロック、他方をBブロックとして、各ブロックに関係
する構成には‘−’の後にAまたはBを記して区別して
いる。
FIG. 6 is a block diagram showing an embodiment of the decoding apparatus of the present invention. 17, those parts that are the same as those corresponding parts in FIG. 17 are designated by the same reference numerals, and a description thereof will be omitted. 41 is a decoding unit, 42 is a FIFO memory, 43 is a memory status signal,
44 is a write signal, 45 is unit code data, 46 is a division unit, and 47 is composite code data. Note that FIG. 6 shows an example in which two blocks of the decoding unit 41 are provided, one of which is A
Blocks and the other block are B blocks, and configurations related to each block are distinguished by adding A or B after “−”.

【0062】分割部46は、合成符号データ47を分割
して、単位符号データ45−A,Bとするとともに、メ
モリ状態信号43−A,Bを参照しながらFIFOメモ
リ42−A,Bを制御して、単位符号データ45−A,
BをそれぞれFIFOメモリ42−A,Bに書き込む。
分割部46は、上述の符号化装置における合成部36と
全く逆の動作を行なう。すなわち、基本的には合成符号
データ47を所定のデータ量ごとに分割し、FIFOメ
モリ42−AまたはFIFOメモリ42−Bに交互に書
き込む。また、識別コードを検出した場合は、所定のデ
ータ量の単位符号データを連続して一方のFIFOメモ
リに書き込む。
The dividing section 46 divides the combined code data 47 into unit code data 45-A and B, and controls the FIFO memories 42-A and B while referring to the memory status signals 43-A and B. Unit code data 45-A,
B is written in the FIFO memories 42-A and B, respectively.
The dividing unit 46 performs an operation that is completely opposite to that of the combining unit 36 in the above-described encoding device. That is, basically, the synthetic code data 47 is divided into a predetermined amount of data and written alternately into the FIFO memory 42-A or the FIFO memory 42-B. When the identification code is detected, the unit code data of a predetermined data amount is continuously written in one of the FIFO memories.

【0063】FIFOメモリ42−A,Bは、復号化部
41−A,Bにそれぞれ対応してその前段に設けられ、
ライト信号44−A,Bに応じて所定のデータ量の単位
符号データ45−A,Bを格納する。復号化部41−
A,Bは、対応するFIFOメモリ42−A,Bから符
号データ10−A,Bを読み出して復号する。
The FIFO memories 42-A and B are provided in the preceding stages corresponding to the decoding units 41-A and B, respectively.
The unit code data 45-A, B having a predetermined data amount is stored according to the write signals 44-A, B. Decoding unit 41-
A and B read the code data 10-A and B from the corresponding FIFO memories 42-A and B and decode them.

【0064】復号化部41−A,Bは、図17に示した
構成のうちコンテキスト生成部2を除く算術復号化部2
1、確率推定テーブル6、逆予測部22からなる。コン
テキスト生成部2は、2つの復号化部41−A,Bに共
通して設けられている。復号化部41−A,Bから交互
に画像データ1が出力される。出力された画像データ1
はコンテキスト生成部2に入力され、例えば図12に示
すようなテンプレートに従ってコンテキスト3を生成す
る。コンテキスト生成部2で生成されたコンテキスト3
は、交互に復号化部41−Aまたは復号化部41−Bに
入力される。
The decoding units 41-A and 41-B are arithmetic decoding units 2 excluding the context generation unit 2 in the configuration shown in FIG.
1, a probability estimation table 6, and an inverse prediction unit 22. The context generation unit 2 is provided commonly to the two decoding units 41-A and 41-B. The image data 1 is alternately output from the decoding units 41-A and B. Output image data 1
Is input to the context generation unit 2 and generates a context 3 according to a template as shown in FIG. 12, for example. Context 3 generated by context generator 2
Are alternately input to the decoding unit 41-A or the decoding unit 41-B.

【0065】次に、本発明の復号化装置の実施の一形態
における動作の一例について説明する。例えば図5に示
したような合成符号データ47が分割部46に入力され
る。分割部46は、基本的には合成符号データ47を所
定のデータ量の単位、例えば1ワード単位に分割し、分
割した単位符号データ45−A,Bをライト信号44−
A,BとともにFIFOメモリ42−A,Bに交互に書
き込む。書き込みに際しては、メモリ状態信号43−
A,Bを参照し、書き込む側のFIFOメモリが満杯で
ないことを確認して行なう。
Next, an example of the operation of the embodiment of the decoding apparatus of the present invention will be described. For example, the composite code data 47 as shown in FIG. 5 is input to the dividing unit 46. The dividing unit 46 basically divides the combined code data 47 into units of a predetermined data amount, for example, one word unit, and divides the divided unit code data 45-A and B into the write signal 44-.
A and B are written alternately into the FIFO memories 42-A and B. When writing, the memory status signal 43-
By referring to A and B, it is confirmed that the FIFO memory on the writing side is not full.

【0066】例えば図5に示す合成符号データ47で
は、最初の1ワードの単位符号データA0 をFIFOメ
モリ42−Aに書き込み、次の1ワードの単位符号デー
タBをFIFOメモリ42−Bに書き込む。同様にし
てA,・・・,An をFIFOメモリ42−Aに、
1 ,・・・,Bn をFIFOメモリ42−Bにそれぞ
れ順次書き込んでゆく。メモリ状態信号43−A,Bを
参照し、FIFOメモリ42−A,Bのいずれかが満杯
の状態の場合には、その時点で書き込みを一時停止す
る。
For example, in the composite code data 47 shown in FIG. 5, the first unit code data A 0 of one word is written in the FIFO memory 42-A, and the next unit code data B 0 of one word is written in the FIFO memory 42-B. Write. Similarly, A 1 , ..., An are stored in the FIFO memory 42-A,
B 1 , ..., B n are sequentially written in the FIFO memory 42-B. Referring to the memory status signals 43-A and B, if either of the FIFO memories 42-A and B is full, the writing is temporarily stopped at that point.

【0067】識別コードを検出すると、それに続く所定
数の単位符号データは一方のFIFOメモリに書き込
む。図5に示す合成符号データ47の場合には、識別コ
ードの前にFIFOメモリ42−Bに書き込みを行なっ
ているので、識別コードに続く16ワードの単位符号デ
ータをFIFOメモリ42−Bに順次書き込んでゆく。
この場合もメモリ状態信号43−Bを参照し、FIFO
メモリ42−Bが満杯の状態の場合には書き込みを一時
停止する制御を行なう。
When the identification code is detected, a predetermined number of unit code data following it is written in one of the FIFO memories. In the case of the synthetic code data 47 shown in FIG. 5, since the writing is performed in the FIFO memory 42-B before the identification code, the unit code data of 16 words following the identification code is sequentially written in the FIFO memory 42-B. Go on.
Also in this case, referring to the memory status signal 43-B, the FIFO
When the memory 42-B is full, control is performed to suspend writing.

【0068】各復号化部41−A,Bにおける動作は上
述の図17と同様であり、コンテキスト生成部2で生成
されたコンテキスト3−A,Bを用いて、FIFOメモ
リ42−A,Bから読み出した符号データ10−A,B
を復号し、画像データ1−A,Bとして出力する。この
とき、復号化部41−A,Bは、コンテキスト生成部2
から出力されるコンテキストを、復号する画素位置に応
じて交互に取り込み、復号する。例えば図2(A)に示
す画像を復元する場合、図2(B)に示す画素を符号化
した符号データを復号する復号化部41−Aは、2番目
の添字が偶数となる画素の画像データを復号する際のコ
ンテキスト3−Aを取り込む。同様に、図2(C)に示
す画素を符号化した符号データを復号する復号化部41
−Bは、2番目の添字が奇数となる画素の画像データを
復号する際のコンテキスト3−Bを取り込む。
The operation in each of the decoding units 41-A, B is the same as that in FIG. 17 described above, and the contexts 3-A, B generated by the context generating unit 2 are used to output from the FIFO memories 42-A, B. Read code data 10-A, B
Is decoded and output as image data 1-A, B. At this time, the decrypting units 41-A and 41-B
The context output from is alternately fetched according to the pixel position to be decoded and decoded. For example, when the image shown in FIG. 2A is restored, the decoding unit 41-A that decodes the code data obtained by encoding the pixels shown in FIG. 2B has an image of pixels in which the second subscript is an even number. Take in context 3-A when decrypting the data. Similarly, a decoding unit 41 that decodes coded data obtained by coding the pixels illustrated in FIG.
-B captures the context 3-B when decoding the image data of the pixel whose second subscript is an odd number.

【0069】図7は、本発明の復号化装置の実施の一形
態における復号化部の動作と画像データの出力の関係の
一例を示すタイミングチャートである。復号化部41−
A,Bには、それぞれ位相が異なるクロックが与えられ
ており、このクロックに従って復号を行なう。復号処理
によって、ある時点で復号結果である画像データが確定
する。このとき、復号化部41−Aと復号化部41−B
はそれぞれ独立に復号処理を行なっており、復号化部が
1つの場合に比べて倍の速度で復号することが可能であ
る。
FIG. 7 is a timing chart showing an example of the relationship between the operation of the decoding section and the output of image data in the embodiment of the decoding apparatus of the present invention. Decoding unit 41-
Clocks having different phases are given to A and B, and decoding is performed according to the clocks. By the decoding process, the image data that is the decoding result is determined at a certain point. At this time, the decoding unit 41-A and the decoding unit 41-B
Perform decoding processing independently of each other, and it is possible to perform decoding at a speed twice that in the case where there is one decoding unit.

【0070】復号化部41−Aと復号化部41−Bとは
位相の異なるクロックに従って動作しているので、図7
に示すように復号結果が確定するタイミングが異なる。
これを復号化部41−A,Bに与えられているクロック
の1/2の周期の出力画像クロックによって交互に出力
させる。これによって、図2(B)に示した画素を復号
した復号化部41−Aの復号結果と、図2(C)に示し
た画素を復号した復号化部41−Bの復号結果とが交互
に選択されて、図2(A)に示す画像のデータが順次出
力されることになる。
Since the decoding section 41-A and the decoding section 41-B operate in accordance with clocks having different phases, FIG.
As shown in, the timing at which the decoding result is determined is different.
This is output alternately by the output image clock having a half cycle of the clock given to the decoding units 41-A and 41-B. As a result, the decoding result of the decoding unit 41-A that decodes the pixel illustrated in FIG. 2B and the decoding result of the decoding unit 41-B that decodes the pixel illustrated in FIG. 2C alternate. 2 is selected, the image data shown in FIG. 2A is sequentially output.

【0071】また、このようにして復号化部41−A,
Bの復号結果を交互に選択した画像データはコンテキス
ト生成部2にも入力される。これによってコンテキスト
生成部2では、符号化時と同様に、図2(D)や(E)
に示すような連続した画素を参照したコンテキストを生
成することができる。
Further, in this way, the decoding units 41-A,
The image data in which the decoding result of B is alternately selected is also input to the context generation unit 2. As a result, in the context generation unit 2, as in the case of encoding, the context generation unit 2 shown in FIG.
It is possible to generate a context with reference to consecutive pixels as shown in FIG.

【0072】ところが、コンテキスト生成部2におい
て、前画素の復号が終了しないと現画素のコンテキスト
が生成できないため、現画素の復号を行なうことができ
ないという問題がある。すなわち、一方の復号化部で復
号処理が遅れると、他方の復号処理を開始することがで
きず、処理速度が低下してしまう。これを回避するため
に、例えば上述の特願平8−288731号に開示した
ように、復号時に前画素がとりうるすべての値に従って
逆予測を行ない、複数の逆予測データを生成しておく。
そして、前画素の値が確定した時点でいずれがの逆予測
データを選択し、復号処理を高速化する方式が提案され
ており、本発明でもこの技術を用いることができる。
However, the context generation unit 2 has a problem that the decoding of the current pixel cannot be performed because the context of the current pixel cannot be generated unless the decoding of the previous pixel is completed. That is, if the decoding process is delayed by one decoding unit, the other decoding process cannot be started, and the processing speed is reduced. In order to avoid this, for example, as disclosed in Japanese Patent Application No. 8-288731 mentioned above, inverse prediction is performed according to all possible values of the previous pixel at the time of decoding to generate a plurality of inverse prediction data.
Then, a method has been proposed in which any of the inverse prediction data is selected when the value of the previous pixel is determined to speed up the decoding process, and this technique can be used in the present invention.

【0073】図6に示した本発明の復号化装置において
は、それぞれの復号化部41−A,Bにおいて1画素お
きに復号される。そのため、例えば復号化部41−Aで
現画素を復号する際に、復号化部41−Aにおいて直前
に復号処理した画素、すなわち原画像上では2画素前の
画素と、他方の復号化部41−Bにおいて復号している
画素、すなわち原画像上の1画素前の画素をコンテキス
トに使用する。復号化部41−Aで直前に復号した画素
については、値は確定しているものの、逆予測部22内
の逆予測テーブルの書き換えが発生している場合、書き
換え完了まで逆予測が行なえない。また、復号化部41
−Bで復号する画素については、並行して処理を行なっ
ているので値も確定していない場合がある。そのため、
現画素の復号を行なう際には、原画像上の1画素前と2
画素前の画素について、とりうるすべての値の組み合わ
せに対応した複数の逆予測値を求めておく。そして、復
号化部41−Aで直前に復号した画素の値と、復号化部
41−Bで現在復号している画素の値が確定した時点
で、これらの画素の値から複数の逆予測値の中から正し
いものを選択すればよい。
In the decoding device of the present invention shown in FIG. 6, the decoding units 41-A and 41-B decode every other pixel. Therefore, for example, when the current pixel is decoded by the decoding unit 41-A, the pixel immediately before being decoded by the decoding unit 41-A, that is, the pixel two pixels before in the original image and the other decoding unit 41. -The pixel being decoded in B, that is, the pixel one pixel before in the original image is used for the context. Although the value of the pixel decoded immediately before by the decoding unit 41-A is fixed, if the inverse prediction table in the inverse prediction unit 22 is rewritten, the inverse prediction cannot be performed until the rewriting is completed. In addition, the decoding unit 41
Regarding the pixel to be decoded in -B, the value may not be fixed because it is processed in parallel. for that reason,
When decoding the current pixel, the previous pixel and
For a pixel before the pixel, a plurality of inverse prediction values corresponding to all possible combinations of values are obtained. Then, when the value of the pixel decoded immediately before by the decoding unit 41-A and the value of the pixel currently decoded by the decoding unit 41-B are determined, a plurality of inverse prediction values are calculated from the values of these pixels. Choose the correct one from the.

【0074】このような動作を実現する構成を以下に示
す。図8は、本発明の復号化装置の実施の一形態におけ
る復号化部の別の例を示すブロック構成図である。図
中、51〜54は逆予測テーブル、55は書き込み制御
部、56は書き込み信号、57はライトアドレス、58
は選択部、59は他復号化部からの画像データ、60は
前画像データである。ここでは、1つの復号化部の構成
のみを示している。図8に示す構成が図6における復号
化部41−A,Bに適用される。
A configuration for realizing such an operation is shown below. FIG. 8 is a block diagram showing another example of the decoding unit in the embodiment of the decoding apparatus of the present invention. In the figure, 51 to 54 are inverse prediction tables, 55 is a write controller, 56 is a write signal, 57 is a write address, and 58 is a write address.
Is a selection unit, 59 is image data from another decoding unit, and 60 is previous image data. Here, only the configuration of one decoding unit is shown. The configuration shown in FIG. 8 is applied to the decoding units 41-A and 41-B in FIG.

【0075】この構成では、例えば図12に示すテンプ
レートのX1 ,X0 を除いたX9 〜X2 の8個の画像デ
ータからなるコンテキストを用いる。逆予測テーブル5
1〜54は、それぞれが例えば図13に示すような構成
のテーブルであり、RAM等の記憶装置に格納されてい
る。この逆予測テーブル51〜54のアドレスは、図1
3に示したものと異なり、8ビットで構成されている。
逆予測テーブル51は、X1 ,X0 の画素を0,0と仮
定した時の逆予測値およびステートを格納している。同
様に、逆予測テーブル52〜54は、X1 ,X0 の画素
をそれぞれ0,1、1,0、1,1と仮定したときの逆
予測値およびステートをそれぞれ格納している。8ビッ
トのコンテキストによって4つの逆予測テーブル51〜
54からそれぞれ逆予測値およびステートが読み出され
て、選択部58に入力される。
[0075] In this configuration, for example, a X 1, context of eight image data of X 9 to X 2, excluding the X 0 of the template shown in Figure 12. Inverse prediction table 5
Each of 1 to 54 is a table having a configuration as shown in FIG. 13, for example, and is stored in a storage device such as a RAM. The addresses of the reverse prediction tables 51 to 54 are as shown in FIG.
Unlike the one shown in FIG. 3, it is composed of 8 bits.
The inverse prediction table 51 stores the inverse prediction value and the state when the pixels of X 1 and X 0 are assumed to be 0 and 0. Similarly, the reverse prediction tables 52 to 54 respectively store the reverse prediction values and the states when the pixels of X 1 and X 0 are assumed to be 0 , 1 , 1 , 0 , 1 , 1 , respectively. Four inverse prediction tables 51 to 51 depending on an 8-bit context
The inverse predicted value and the state are read from 54 and input to the selection unit 58.

【0076】選択部58は、算術復号化部21から出力
される画像データ1を前画像データ60として取り込む
とともに、他復号化部からの画像データ59を取り込
み、これらに基づいて、逆予測テーブル51〜54から
出力されている逆予測値およびステートのいずれかを選
択し、ステートを確率推定テーブル6へ、逆予測値23
を算術復号化部21へ出力する。例えば前画像データ6
0が0で、他復号化部からの画像データ59が0の場合
には、逆予測テーブル51の出力を選択する。同様に、
前画像データ60と他復号化部からの画像データ59が
0,1の場合には逆予測テーブル52の出力を選択し、
1,0の場合には逆予測テーブル53の出力を選択し、
1,1の場合には逆予測テーブル54の出力を選択す
る。
The selecting unit 58 fetches the image data 1 output from the arithmetic decoding unit 21 as the previous image data 60 and the image data 59 from the other decoding unit, and based on these, the inverse prediction table 51. 54 to 54, select any one of the inverse prediction value and the state, and set the state in the probability estimation table 6 to the inverse prediction value 23.
Is output to the arithmetic decoding unit 21. For example, the previous image data 6
When 0 is 0 and the image data 59 from the other decoding unit is 0, the output of the inverse prediction table 51 is selected. Similarly,
When the previous image data 60 and the image data 59 from the other decoding unit are 0 and 1, the output of the inverse prediction table 52 is selected,
In the case of 1, 0, the output of the inverse prediction table 53 is selected,
In the case of 1, 1, the output of the inverse prediction table 54 is selected.

【0077】書き込み制御部55は、逆予測テーブル5
1〜54で利用するコンテキストX9 〜X2 を書き込み
アドレスとして逆予測テーブル51〜54に対して出力
するとともに、書き換え信号12の書き換え指示に応じ
て、算術復号化部21から出力される画像データ1およ
び他復号化部からの画像データ59の値から書き込みを
行なうべき逆予測テーブル51〜54のいずれかを選択
して、選択した逆予測テーブルに書き込み信号56を送
る。各逆予測テーブル51〜54には、確率推定テーブ
ル6から出力されるNMPSまたはNLPSおよび算術
復号化部21から出力される新逆予測値が書き換えデー
タ24として与えられているので、書き込み制御部55
から書き込み信号56が送られた逆予測テーブルでは、
同じく書き込み制御部55から送られてくる書き込みア
ドレスに書き換えデータ24が書き込まれる。
The write control unit 55 uses the inverse prediction table 5
And outputs against reverse prediction table 51 to 54 as a write address context X 9 to X 2 to be used in 1 to 54, in accordance with the rewrite instruction of rewrite signal 12, the image data outputted from the arithmetic decoder 21 1 and the value of the image data 59 from the other decoding unit, one of the inverse prediction tables 51 to 54 to be written is selected, and the write signal 56 is sent to the selected inverse prediction table. Since each of the inverse prediction tables 51 to 54 is given the NMPS or NLPS output from the probability estimation table 6 and the new inverse prediction value output from the arithmetic decoding unit 21 as the rewriting data 24, the write control unit 55.
In the inverse prediction table to which the write signal 56 is sent from
Similarly, the rewrite data 24 is written at the write address sent from the write control unit 55.

【0078】図9は、本発明の復号化装置の実施の一形
態における復号化部の別の例の動作の一例を説明するた
めのタイミングチャートである。図9では、図2におけ
るP24の位置の画素の復号を復号化部41−Aで行なう
例を示している。復号化部41−Aでは、P24の位置の
画素を復号する直前に、P22の位置の画素を復号する。
書き込み制御部55は、P22の位置の画素を注目画素と
するコンテキストX’ 9 〜X’2 を保持している。
FIG. 9 shows an embodiment of the decoding apparatus of the present invention.
An example of the operation of another example of the decoding unit in the state
FIG. In Figure 9, in Figure 2
Ptwenty fourDecoding of the pixel at the position is performed by the decoding unit 41-A.
An example is shown. In the decryption unit 41-A, Ptwenty fourIn the position of
Just before decoding the pixel, Ptwenty twoDecode the pixel at the position.
The write control unit 55 uses Ptwenty twoThe pixel at the position of
Context X ' 9~ X '2Holding

【0079】P22の位置の画素を復号中に、P24の位置
の画素を注目画素とするコンテキストX9 〜X2 が逆予
測テーブル51〜54にアドレスとして入力される。逆
予測テーブル51〜54から、それぞれX1 ,X0 が0
0,01,10,11の場合の4種類の逆予測値、ステ
ートが読み出されて選択部58に入力される。
While the pixel at the position P 22 is being decoded, the contexts X 9 to X 2 having the pixel at the position P 24 as the target pixel are input as addresses to the inverse prediction tables 51 to 54. From the reverse prediction tables 51 to 54, X 1 and X 0 are 0, respectively.
Four kinds of inverse prediction values and states of 0, 01, 10, and 11 are read and input to the selection unit 58.

【0080】一方、復号化部41−BにおいてはP23
位置の画素の復号が、復号化部41−AにおけるP22
位置の画素の復号に半周期遅れて開始される。やがて復
号化部41−AにおけるP22の位置の画素が復号されて
画像データが出力され、これが前画像データ60として
選択部58に入力される。その後、復号化部41−Bに
おけるP23の位置の画素が復号されて画像データが出力
され、他復号化部からの画像データ59として選択部5
8に入力される。この時点でX1 ,X0 の値が00,0
1,10,11のいずれであるかが確定されるので、選
択部58は逆予測テーブル51〜54のいずれかの出力
(逆予測値、ステート)を選択して、P24の位置の画素
を復号するための逆予測値およびステートとして算術復
号化部21および確率推定テーブル6に渡す。これによ
って次の周期でP24の位置の画素の復号を開始すること
ができる。
On the other hand, in the decoding unit 41-B, the decoding of the pixel at the position P 23 is started with a delay of a half cycle from the decoding of the pixel at the position P 22 in the decoding unit 41-A. Eventually, the pixel at the position of P 22 in the decoding unit 41-A is decoded and the image data is output, and this is input to the selection unit 58 as the previous image data 60. After that, the pixel at the position of P 23 in the decoding unit 41-B is decoded and the image data is output, and the selection unit 5 outputs the image data 59 from another decoding unit.
8 is input. At this point, the values of X 1 and X 0 are 00,0
Since it is determined which of 1, 1, and 11 is selected, the selection unit 58 selects one of the outputs (inverse prediction value, state) of the inverse prediction tables 51 to 54 to select the pixel at the position of P 24. The inverse prediction value and the state for decoding are passed to the arithmetic decoding unit 21 and the probability estimation table 6. By this, the decoding of the pixel at the position of P 24 can be started in the next cycle.

【0081】また、P22の復号によって逆予測テーブル
の書き換えが発生した場合には、書き込み制御部55
は、保持しているP22の位置の画素を注目画素とするコ
ンテキストX’9 〜X’2 を書き込みアドレス57とし
て予測テーブル51〜54に出力する。また、算術復号
化部21から出力されるP22の位置の画像データ1と、
復号化部41−Bから出力されるP23の位置の画像デー
タである他復号化部からの画像データ59から書き換え
るべき逆予測テーブルを特定し、その逆予測テーブルに
対して書き込み信号56を送る。逆予測テーブル51〜
54には、確率推定テーブル6および算術復号化部21
から、P22の位置の画像データに関する書き換えデータ
24が入力されているので、書き込み制御部55から書
き込み信号56が与えられた逆予測テーブルは、書き込
みアドレス57のデータを書き換えデータ24に書き換
える。次のP26の位置の画素の復号では、書き換えられ
た逆予測テーブルを用いて4種類の逆予測値およびステ
ートが出力されることになる。
When the inverse prediction table is rewritten by the decoding of P 22 , the write control unit 55
Outputs the contexts X ′ 9 to X ′ 2 in which the held pixel at the position of P 22 is the target pixel as the write address 57 to the prediction tables 51 to 54. Also, the image data 1 at the position of P 22 output from the arithmetic decoding unit 21,
The inverse prediction table to be rewritten is specified from the image data 59 from the other decoding unit, which is the image data at the position of P 23 output from the decoding unit 41-B, and the write signal 56 is sent to the inverse prediction table. . Inverse prediction table 51-
54 includes a probability estimation table 6 and an arithmetic decoding unit 21.
Since the rewrite data 24 regarding the image data at the position of P 22 is input, the inverse prediction table to which the write signal 56 is given from the write control unit 55 rewrites the data of the write address 57 to the rewrite data 24. In the next decoding of the pixel at the position of P 26 , four types of inverse prediction values and states will be output using the rewritten inverse prediction table.

【0082】もちろん、復号化部41−Aから出力され
るP22,P24の位置の画像データ1は、復号化部41−
Bに送られて他復号化部からの画像データ59として用
いられ、同様な処理で復号が実施される。
Of course, the image data 1 at the positions of P 22 and P 24 output from the decoding unit 41-A is the decoding unit 41-
It is sent to B and used as the image data 59 from the other decoding unit, and the decoding is carried out by the same processing.

【0083】このようにして、逆予測テーブルの書き換
え前でも逆予測テーブルの読み出しが可能であるので、
算術復号化部21の処理と逆予測テーブル51〜54の
読み出しを並列的に実行することができ、復号処理を高
速化することができる。
In this way, the inverse prediction table can be read even before the inverse prediction table is rewritten.
The processing of the arithmetic decoding unit 21 and the reading of the inverse prediction tables 51 to 54 can be executed in parallel, and the decoding processing can be speeded up.

【0084】なお、逆予測テーブル51〜54は、他復
号化部からの画像データ59に対する1画素前の値のみ
による2つの逆予測テーブルとして構成し、算術復号化
部21から画像データ1が出力された後にコンテキスト
9 〜X1 を用いるようにしてもよい。また、3ポート
メモリを用いて、2つあるいは1つのメモリで構成して
もよい。
The inverse prediction tables 51 to 54 are constructed as two inverse prediction tables based on only the value of the preceding pixel for the image data 59 from the other decoding unit, and the arithmetic decoding unit 21 outputs the image data 1. Then, the contexts X 9 to X 1 may be used. Alternatively, a three-port memory may be used to configure two or one memories.

【0085】ここでは復号化装置について図8に示すよ
うな逆予測テーブルの先読みを行なって高速化する例を
示したが、例えば上述の特願平8−301889号に記
載されているように符号化装置について予測テーブルの
先読みを行なうように構成すれば、符号化装置において
も予測テーブルの書き込みよる遅延を発生させずに符号
化処理を行なうことができ、符号化を高速に行なうこと
ができる。
Here, an example is shown in which the decoding device performs prefetching of the inverse prediction table as shown in FIG. 8 to increase the speed. However, for example, as described in Japanese Patent Application No. 8-301889 mentioned above, the code is used. If the encoding device is configured to perform pre-reading of the prediction table, the encoding device can perform the encoding process without causing a delay due to the writing of the prediction table, and the encoding can be performed at high speed.

【0086】以上、本発明による符号化部あるいは復号
化部を複数配置して並列処理を行なう符号化装置および
復号化装置について、一例を示した。本発明は、これら
の例に限られるものではない。例えば、符号化部、復号
化部を2ブロックではなく、もっと多数の構成にしてさ
らに並列化することも可能である。また、合成部36に
おいて合成する際の符号データのデータ量の単位も1ワ
ード以外でよく、任意のデータ量を単位として、順次合
成してゆくことができる。また、識別コード以後に続け
る特定の符号化部からの符号データの単位数も任意に設
定することができる。これらは復号化装置との間で設定
可能であればよく、分割部46は符号化時と同じ規則で
合成符号データを分割すればよい。
An example of the encoding device and the decoding device for arranging a plurality of encoding units or decoding units according to the present invention and performing parallel processing has been described above. The invention is not limited to these examples. For example, the encoding unit and the decoding unit may be configured in a larger number than two blocks and further parallelized. Further, the unit of the data amount of the code data to be synthesized by the synthesizing unit 36 may be other than one word, and the synthesizing can be performed sequentially with an arbitrary data amount as a unit. Further, the number of units of code data from the specific coding unit following the identification code can be set arbitrarily. These need only be settable with the decoding device, and the dividing unit 46 may divide the combined code data according to the same rules as at the time of encoding.

【0087】また、FIFOメモリ32およびFIFO
メモリ42の容量も16ワードに限るものではなく、任
意の容量でよい。もちろん、FIFOメモリ32とFI
FOメモリ42の容量が異なっていてもよく、合成符号
データの形式に合わせて合成部36と分割部46がFI
FOメモリ32、FIFOメモリ42を制御すればよ
い。
Further, the FIFO memory 32 and the FIFO memory
The capacity of the memory 42 is not limited to 16 words and may be any capacity. Of course, the FIFO memory 32 and FI
The FO memories 42 may have different capacities, and the synthesizing unit 36 and the dividing unit 46 may perform FI according to the format of the synthetic code data.
The FO memory 32 and the FIFO memory 42 may be controlled.

【0088】またさらに、本発明は予測符号化方式の符
号データを合成符号データに合成するものに限られるも
のではなく、異なる符号化方式の符号データをも合成す
るように構成することも可能である。
Furthermore, the present invention is not limited to combining the code data of the predictive coding method with the combined code data, but may be configured to also combine the code data of different coding methods. is there.

【0089】以上のように本発明では、JBIGなどの
高速化が困難な符号化方式においても高速化することが
できるため、高速リアルタイム処理が必要となるプリン
タ、複写機などのシステムにも、JBIG等の高能率の
符号化方式を応用し、データを圧縮することが可能とな
る。
As described above, according to the present invention, it is possible to increase the speed even in an encoding method such as JBIG which is difficult to increase in speed. Therefore, even in a system such as a printer or a copying machine which requires high-speed real-time processing, JBIG It is possible to compress data by applying a high-efficiency encoding method such as.

【0090】[0090]

【発明の効果】以上の説明から明らかなように、第1の
発明の符号化装置によれば、予測符号化を複数の符号化
手段で並列処理を行なうことができるので、高速に符号
化を行なうことができる。このとき、前段に大きな画像
メモリを必要とせず、またコンテキストを単体の符号化
手段を用いる場合と同じように生成できるため、符号化
効率を損なうこともなく符号化することができる。
As is clear from the above description, according to the encoding device of the first invention, the predictive encoding can be performed in parallel by a plurality of encoding means, so that the encoding can be performed at high speed. Can be done. At this time, since a large image memory is not required in the previous stage and the context can be generated in the same manner as when using a single encoding unit, it is possible to perform encoding without impairing the encoding efficiency.

【0091】[0091]

【0092】また第2の発明の復号化装置によれば、符
号化装置と同様に、前段に大きな画像メモリを必要とせ
ず、複数の復号化手段で並列して復号処理を行なうこと
ができるので、高速にリアルタイムで復号することがで
きるという効果がある。
Further, according to the decoding device of the second aspect of the invention, like the coding device, a large image memory is not required in the preceding stage, and the decoding processing can be performed in parallel by a plurality of decoding means. There is an effect that decoding can be performed in real time at high speed.

【0093】[0093]

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

【図1】 本発明の符号化装置の実施の一形態を示すブ
ロック構成図である。
FIG. 1 is a block configuration diagram showing an embodiment of an encoding device of the present invention.

【図2】 画像データの一例の説明図である。FIG. 2 is an explanatory diagram of an example of image data.

【図3】 本発明の符号化装置の実施の一形態における
画像の入力と各符号化部の動作の一例を示すタイミング
チャートである。
FIG. 3 is a timing chart showing an example of image input and an operation of each encoding unit in the embodiment of the encoding device of the present invention.

【図4】 本発明の符号化装置の実施の一形態における
合成部の動作の一例を示すフローチャートである。
FIG. 4 is a flowchart showing an example of the operation of a synthesizing unit in the embodiment of the encoding device of the present invention.

【図5】 合成符号データの一例の説明図である。FIG. 5 is an explanatory diagram of an example of composite code data.

【図6】 本発明の復号化装置の実施の一形態を示すブ
ロック構成図である。
FIG. 6 is a block diagram showing an embodiment of a decoding device of the present invention.

【図7】 本発明の復号化装置の実施の一形態における
復号化部の動作と画像データの出力の関係の一例を示す
タイミングチャートである。
FIG. 7 is a timing chart showing an example of the relationship between the operation of the decoding unit and the output of image data in the embodiment of the decoding apparatus of the present invention.

【図8】 本発明の復号化装置の実施の一形態における
復号化部の別の例を示すブロック構成図である。
FIG. 8 is a block diagram showing another example of the decoding unit in the embodiment of the decoding apparatus of the present invention.

【図9】 本発明の復号化装置の実施の一形態における
復号化部の別の例の動作の一例を説明するためのタイミ
ングチャートである。
FIG. 9 is a timing chart for explaining an example of the operation of another example of the decoding unit in the embodiment of the decoding apparatus of the present invention.

【図10】 算術符号化の概念図である。FIG. 10 is a conceptual diagram of arithmetic coding.

【図11】 JBIGで採用されている予測符号化方式
の概略図である。
FIG. 11 is a schematic diagram of a predictive coding system adopted in JBIG.

【図12】 JBIGで使用されるテンプレートの一例
の説明図である。
FIG. 12 is an explanatory diagram of an example of a template used in JBIG.

【図13】 予測部4に記憶されている予測テーブルの
一例の説明図である。
FIG. 13 is an explanatory diagram of an example of a prediction table stored in the prediction unit 4.

【図14】 確率推定テーブル6の一例の説明図であ
る。
FIG. 14 is an explanatory diagram of an example of a probability estimation table 6.

【図15】 入力される画像データの一具体例の説明図
である。
FIG. 15 is an explanatory diagram of a specific example of input image data.

【図16】 書き換え後の予測部テーブルの一具体例の
説明図である。
FIG. 16 is an explanatory diagram of a specific example of a prediction unit table after rewriting.

【図17】 JBIGで採用されている予測復号化方式
の概略図である。
FIG. 17 is a schematic diagram of a predictive decoding system adopted in JBIG.

【図18】 算術復号化部の基本動作の説明図である。FIG. 18 is an explanatory diagram of a basic operation of the arithmetic decoding unit.

【符号の説明】[Explanation of symbols]

1…画像データ、2…コンテキスト生成部、3…コンテ
キスト、4…予測部、5…ステート、6…確率推定テー
ブル、7…LSZおよびSW、8…予測値、9…算術符
号化部、10…符号データ、11…書き換えデータ、1
2…書き換え信号、21…算術復号化部、22…逆予測
部、23…逆予測値、24…書き換えデータ、31…符
号化部、32…FIFOメモリ、33…メモリ状態信
号、34…リード信号、35…単位符号データ、36…
合成部、37…合成符号データ、41…復号化部、42
…FIFOメモリ、43…メモリ状態信号、44…ライ
ト信号、45…単位符号データ、46…分割部、47…
合成符号データ、51〜54…逆予測テーブル、55…
書き込み制御部、56…書き込み信号、57…ライトア
ドレス、58…選択部、59…他復号化部からの画像デ
ータ、60…前画像データ。
1 ... Image data, 2 ... Context generation part, 3 ... Context, 4 ... Prediction part, 5 ... State, 6 ... Probability estimation table, 7 ... LSZ and SW, 8 ... Prediction value, 9 ... Arithmetic coding part, 10 ... Code data, 11 ... Rewriting data, 1
2 ... Rewriting signal, 21 ... Arithmetic decoding part, 22 ... Inverse prediction part, 23 ... Inverse prediction value, 24 ... Rewriting data, 31 ... Encoding part, 32 ... FIFO memory, 33 ... Memory status signal, 34 ... Read signal , 35 ... Unit code data, 36 ...
Compositing unit, 37 ... Combined code data, 41 ... Decoding unit, 42
... FIFO memory, 43 ... Memory status signal, 44 ... Write signal, 45 ... Unit code data, 46 ... Dividing unit, 47 ...
Composite code data 51 to 54 ... Inverse prediction table, 55 ...
Write control unit, 56 ... Write signal, 57 ... Write address, 58 ... Selection unit, 59 ... Image data from other decoding unit, 60 ... Previous image data.

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 1画素ずつ入力される画像データを予測
符号化する符号化装置において、入力された画素を注目
画素として該注目画素の周辺に位置する複数の参照画素
を選択してコンテキストを生成するコンテキスト生成手
段と、1画素ずつ入力されるごとに切り換えられ前記コ
ンテキストをもとに前記注目画素を予測して予測符号化
する複数の符号化手段と、該複数の符号化手段で生成さ
れた符号データを1つの合成符号データに合成する合成
手段を有することを特徴とする符号化装置。
1. A coding device for predictively coding image data input pixel by pixel, wherein a plurality of reference pixels located around a pixel of interest are selected as a pixel of interest to generate a context. Context generating means, a plurality of encoding means that are switched every time one pixel is input, predict the target pixel based on the context, and perform predictive encoding, and generate a plurality of encoding means. An encoding apparatus having a combining means for combining coded data into one combined coded data.
【請求項2】 前記複数の符号化手段の後段にそれぞれ
前記符号データを保持する記憶手段を具備し、前記合成
手段は、前記各記憶手段の符号記憶状態を管理し、前記
各記憶手段から順に所定量ごとに符号データを読み出し
て出力するとともに、前記符号記憶状態に応じて識別子
とともに一つの前記記憶手段に格納されている前記符号
データを所定量ずつ複数回出力することを特徴とする請
求項1に記載の符号化装置。
2. A storage unit for holding the coded data is provided at a stage subsequent to the plurality of coding units, and the synthesizing unit manages a code storage state of each of the storage units, and sequentially from the storage unit. The code data is read and output for each predetermined amount, and the code data stored in one of the storage means together with an identifier according to the code storage state is output a predetermined number of times a plurality of times. 1. The encoding device according to 1.
【請求項3】 符号データを合成した合成符号データを
予測復号化する復号化装置において、次に復号する画素
を注目画素として該注目画素の周辺に位置する複数の参
照画素を選択してコンテキストを生成するコンテキスト
生成手段と、復号された画像が形成されるように1画素
ごとにその出力が切り換えられ前記コンテキストをもと
に前記注目画素を逆予測して予測復号化する複数の復号
化手段と、入力された前記合成符号データを前記符号デ
ータに分割して前記複数の復号化手段へ分配入力する分
割手段を有することを特徴とする復号化装置。
3. A decoding device for predictively decoding synthetic code data obtained by synthesizing code data, wherein a pixel to be decoded next is set as a target pixel, and a plurality of reference pixels located around the target pixel are selected to set a context. Context generating means for generating, and a plurality of decoding means for switching the output for each pixel so as to form a decoded image and performing reverse prediction and predictive decoding of the pixel of interest based on the context A decoding device, comprising: a dividing unit that divides the input synthetic code data into the code data and distributes and inputs the code data to the plurality of decoding units.
【請求項4】 前記複数の復号化手段の前段にそれぞれ
前記分割手段で分割された符号データを保持する記憶手
段を具備し、前記分割手段は、前記各記憶手段の符号記
憶状態を管理し、分割した前記符号データを前記各記憶
手段へ書き込み、前記復号化手段は、対応する前記記憶
手段から符号データを読み出して予測復号化することを
特徴とする請求項3に記載の復号化装置。
4. A storage unit is provided in front of the plurality of decoding units, each storing code data divided by the division unit, and the division unit manages a code storage state of each storage unit. 4. The decoding device according to claim 3, wherein the divided code data is written in each of the storage means, and the decoding means reads the code data from the corresponding storage means and predictively decodes the code data.
【請求項5】 前記復号化手段は、前記注目画素の直前
の前記復号化手段の数だけの画素の状態ごとに前記注目
画素の逆予測値を出力する複数の逆予測テーブルと、前
記複数の逆予測テーブルが出力する複数の前記逆予測値
の中から他の前記復号化手段から出力される復号結果お
よび該復号化手段による直前の復号結果に従って1つの
前記逆予測値を選択する選択手段と、該選択手段で選択
された前記逆予測値に基づいて前記注目画素を復号する
予測復号手段を有することを特徴とする請求項3に記載
の復号化装置。
5. The decoding means includes a plurality of inverse prediction tables for outputting the inverse prediction values of the pixel of interest for each pixel state corresponding to the number of the decoding means immediately before the pixel of interest, and the plurality of inverse prediction tables. Selecting means for selecting one of the inverse prediction values according to the decoding result output from the other decoding means and the immediately preceding decoding result by the decoding means from among the plurality of inverse prediction values output by the inverse prediction table; The decoding apparatus according to claim 3, further comprising a predictive decoding unit that decodes the pixel of interest based on the inverse prediction value selected by the selecting unit.
JP16595097A 1997-06-23 1997-06-23 Encoding device and decoding device Expired - Fee Related JP3384287B2 (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (2)

Publication Number Publication Date
JPH1117958A JPH1117958A (en) 1999-01-22
JP3384287B2 true JP3384287B2 (en) 2003-03-10

Family

ID=15822106

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP3384287B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0524983D0 (en) * 2005-12-07 2006-01-18 Imagination Tech Ltd Recompression and decompression of a data stream for rate smoothing
JP4785706B2 (en) * 2006-11-01 2011-10-05 キヤノン株式会社 Decoding device and decoding method

Also Published As

Publication number Publication date
JPH1117958A (en) 1999-01-22

Similar Documents

Publication Publication Date Title
US6798833B2 (en) Video frame compression/decompression hardware system
JP4782181B2 (en) Entropy decoding circuit, entropy decoding method, and entropy decoding method using pipeline method
JPH0969951A (en) Encoding method and decoding method
US5848194A (en) Coding/decoding apparatus and coding/decoding method
JP2001230935A (en) Method and device for arithmetic encoding/decoding
JP2924964B2 (en) Image information encoding device, image information decoding device, and image information encoding / decoding device
US6026197A (en) Coding method and apparatus therefor
JP3621512B2 (en) Digital information encoding apparatus, digital information decoding apparatus, digital information encoding / decoding apparatus, digital information encoding method, and digital information decoding method
KR970057910A (en) Digital information coding apparatus, digital information decoding apparatus, digital information coding and decoding apparatus, digital information coding method, and digital information decoding method
JP3871995B2 (en) Encoding device and decoding device
JP3384287B2 (en) Encoding device and decoding device
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
JP3141794B2 (en) Decryption device
US6882751B2 (en) Arithmetic decoding method and device and storage medium
JP3213200B2 (en) Decoding device and method
JP3146109B2 (en) Binary image coding device
JP3251447B2 (en) Encoding device and method, and decoding device and method
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP4086481B2 (en) Arithmetic decoding method and apparatus, and storage medium
US6999627B2 (en) Deterministic prediction in an image processing system
JP3270665B2 (en) Encoding / decoding apparatus and method
JP2507954B2 (en) Run length decoding device
JP3302253B2 (en) Information encoding / decoding method and apparatus
JP3066219B2 (en) Predictive decoding device
JP3382492B2 (en) Image processing apparatus and method

Legal Events

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

Free format text: PAYMENT UNTIL: 20071227

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081227

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091227

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101227

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111227

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111227

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121227

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20121227

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20131227

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees