JP3115117B2 - Binary image compression processor - Google Patents

Binary image compression processor

Info

Publication number
JP3115117B2
JP3115117B2 JP04256297A JP25629792A JP3115117B2 JP 3115117 B2 JP3115117 B2 JP 3115117B2 JP 04256297 A JP04256297 A JP 04256297A JP 25629792 A JP25629792 A JP 25629792A JP 3115117 B2 JP3115117 B2 JP 3115117B2
Authority
JP
Japan
Prior art keywords
data
change point
processing
selector
point
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
JP04256297A
Other languages
Japanese (ja)
Other versions
JPH06113149A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP04256297A priority Critical patent/JP3115117B2/en
Publication of JPH06113149A publication Critical patent/JPH06113149A/en
Application granted granted Critical
Publication of JP3115117B2 publication Critical patent/JP3115117B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、2値画像データの圧縮
伸張を行なう符号化復号器(コーデック)に適用される
もので、より詳細にいえば、CCITT勧告に準拠した
符号化方式(MH方式、MR方式、MMR方式等)を用
いた2値イメージ圧縮処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is applied to an encoder / decoder (codec) for compressing and expanding binary image data. More specifically, the present invention relates to an encoding system (MH) conforming to CCITT recommendations. , An MR method, an MMR method, etc.).

【0002】[0002]

【従来の技術】CCITT勧告T.4に準拠したMH
(Modified Huffman)/MR(ModifiedREAD)方式、及
び同T.6に準拠したMMR(Modified MR )方式によ
る2値イメージ用符号化復号器(CODEC:コーデッ
ク)が、既に多数作成されている。この2値イメージ用
コーデックとして、本願出願人は先に特願昭62−59
990号「2値データ圧縮伸張処理装置」として出願し
ている。
2. Description of the Related Art MH conforming to 4
(Modified Huffman) / MR (Modified READ) method and A number of binary image encoding / decoding devices (CODEC: codec) using the MMR (Modified MR) system conforming to J.6 have already been created. As a codec for this binary image, the present applicant has previously filed Japanese Patent Application No. 62-59.
No. 990, "binary data compression / decompression processing device".

【0003】一般に、2値イメージの符号化、すなわち
圧縮処理は、図11に示すCCITT勧告のフローチャ
ートに従って行われる。このフローチャートに従って符
号化すれば、与えられたイメージに対して生成される圧
縮されたコード化データのビット・パターンも一意に決
まる。
Generally, encoding of a binary image, that is, compression processing is performed according to a flowchart of CCITT recommendation shown in FIG. If encoding is performed according to this flowchart, the bit pattern of the compressed coded data generated for a given image is also uniquely determined.

【0004】しかし、このフローチャートに従って、例
えば図12(a)に示すような2値イメージについて符
号化を行なうと、図12(b)に示すようにパスモード
の“Pass”、及び垂直モードの“VL(2)”とい
う2つのコードの縦横で符号化ラインの白ランを表現す
ることになる。一方、明らかに、この例では図12
(c)に示すように垂直モードの“VR(3)”という
コード1つで表現することもできる。
However, when encoding is performed on a binary image as shown in FIG. 12A, for example, according to this flowchart, as shown in FIG. 12B, "Pass" in the pass mode and "Pass" in the vertical mode VL (2) "expresses a white run of a coding line in the vertical and horizontal directions of two codes. On the other hand, obviously, in this example, FIG.
As shown in (c), it can be expressed by one code of "VR (3)" in the vertical mode.

【0005】図12の符号化ラインを“Pass”“V
L(2)”というコードの縦続ではなく、“VR
(3)”のコード1個で表現しても、そのコードをCC
ITT勧告に準拠したMRまたはMMR復号器で復号で
きることは明らかである。実際、MR符号化の標準は、
これ以外にも、与えられた画像に対して複数の符号化の
方式が存在し、それらのうちから用途に応じて適切なも
のを選んで出力することが許されている。
[0005] The encoding lines in FIG.
L (2) ”instead of cascaded,
(3) Even if it is expressed by one code of ",
Obviously, it can be decoded with an MR or MMR decoder according to the ITT recommendations. In fact, the standard for MR coding is
In addition to the above, there are a plurality of encoding schemes for a given image, and it is allowed to select and output an appropriate one from among them according to the application.

【0006】例えば、MH/MRの符号化方式の設計思
想を論じた論文“International Facsimile Standards
” Proceedings of IEEE,vol 68,No.7 July 1980,
(RoyHunter & A.Harry Robinson 著)のP.864〜
P.865では大略次のような内容が記載されている。
[0006] For example, a paper "International Facsimile Standards" discussing the design concept of the MH / MR coding method.
”Proceedings of IEEE, vol 68, No. 7 July 1980,
(By RoyHunter & A. Harry Robinson). 864-
P. 865 generally describes the following contents.

【0007】「符号器、復号器の間で矛盾を束すことな
く、図11のフローチャートに示す符号化手順を変更す
ることが可能である。そのように変更するためには詳細
な検討が必要である。例えば、パスコードがいくつも続
くと符号化効率が落ちるのでパスコードが連続しないよ
うに制限を加えることができる。また、(a1 1 の絶
対値)≦3である場合には、垂直(V)モードでも水平
(H)モードでも符号化できるので、短く符号化できた
方を用いるようにしてもよい。」
"It is possible to change the encoding procedure shown in the flowchart of FIG. 11 without contradicting between the encoder and the decoder. To make such a change, a detailed study is required. For example, if a number of passcodes continue, the coding efficiency is reduced, so that it is possible to limit the passcodes so that they do not continue.If (absolute value of a 1 b 1 ) ≦ 3, Since the coding can be performed in either the vertical (V) mode or the horizontal (H) mode, the shorter coding may be used. "

【0008】また、図11のフローチャートでは垂直モ
ードになるべきケースでも水平モードで符号化すること
は、上記に示されている以外でも符号化器の設計を容易
にするために多用されてきた。例えば、参照ラインデー
タが大量であるため、内部処理上それをブロックに分割
して管理する場合に、ブロック境界のすぐ近くのa1
を符号化するのに隣のブロックの中のb1 点を基準とす
る垂直モード符号化を行なわず、水平モードで符号化す
るなどである。
In the flowchart of FIG. 11, encoding in the horizontal mode even in the case where the mode should be the vertical mode has been frequently used in order to facilitate the design of an encoder other than the above. For example, since a large amount of reference line data is to be divided into blocks for internal processing and managed, when encoding a point a 1 near the block boundary, a point b 1 in the next block is used. Is performed in the horizontal mode without performing the vertical mode coding based on.

【0009】このようにMR方式で符号化されたコード
データは一意に決まらないので、一般に、MR方式によ
る符号器のテストをする場合でもコードデータの比較は
避けて、コードデータを伸張してイメージデータにして
から比較するのが普通になっている。
Since the code data encoded by the MR method is not uniquely determined, the code data is generally decompressed by decompressing the code data even when testing the encoder by the MR method. It is common to make data before comparing.

【0010】[0010]

【発明が解決しようとする課題】前述のように、図11
に示すフローチャートに従って符号化を実現すると、不
要なパスコードが入ることがあるので、必要以上にコー
ドデータが長くなってしまう。
As described above, FIG.
If the encoding is realized according to the flowchart shown in (1), an unnecessary passcode may be entered, so that the code data becomes longer than necessary.

【0011】また、図11のフローチャート通りの符号
化器を特願昭62−59990号に記載された「2値デ
ータ圧縮伸張処理装置」のように実現するためには、b
2 点検出回路を必要としていた(なお、特願昭62−5
9990号「2値データ圧縮伸張処理装置」では、特許
請求範囲と関連しないので、b2 点検出回路については
説明を省略している。)。
In order to realize an encoder as shown in the flow chart of FIG. 11 as a "binary data compression / expansion processing apparatus" described in Japanese Patent Application No. 62-59990, b
A two-point detection circuit was required (see Japanese Patent Application No. 62-5 / 1987).
No. 9990 "Binary data compression / decompression processing apparatus" is not related to the claims, so that the description of the b2 point detection circuit is omitted. ).

【0012】この場合、出現頻度の最も高い垂直モード
の符号化においてb2 点がa1 点より左側には存在しな
いことを確認する必要があるので、圧縮処理速度を伸張
処理と同程度にするために、b2 点検出回路をハードウ
ェアとして持ち、各マシンサイクルで、a1 点,b
1 点,b2 点を並行して検出する必要がある。このb2
点検出回路の主要部は、特願昭62−59990号の図
5に開示されているb1 点検出回路と同様な回路であ
る。このb2 点検出回路は、符号化の際に用いられるだ
けで、伸張処理には全く利用できない回路となってい
る。
In this case, it is necessary to confirm that the point b 2 does not exist on the left side of the point a 1 in the encoding in the vertical mode having the highest appearance frequency. For this purpose, the b 2 point detection circuit is provided as hardware, and a 1 point, b
It is necessary to detect 1 point and b 2 point in parallel. This b 2
Main part of the point detection circuit are the same circuits as b 1 point detection circuit disclosed in FIG. 5 of Japanese Patent Application Sho 62-59990. This b 2 point detection circuit is a circuit that is used only at the time of encoding and cannot be used at all for decompression processing.

【0013】ただし、b2 点検出回路を持たないで、垂
直モード符号化できると判った後で、符号化と並行して
2 点のチェックをし、条件に合わなければ符号化を取
り消す方法も考えられる。しかし、高速処理を目的とし
て一般に符号化器に用いられているパイプライン型処理
では、取り消しの手順が含まれると制御が困難になって
しまう。
However, after it is determined that the vertical mode coding can be performed without the b 2 point detection circuit, the b 2 point is checked in parallel with the coding, and the coding is canceled if the condition is not met. Is also conceivable. However, in a pipeline type process generally used for an encoder for the purpose of high-speed processing, control becomes difficult if a canceling procedure is included.

【0014】本発明は前記のような点に鑑みてなされた
もので、b2 点検出回路を不要にすると共に、不要なパ
スコードを排除してデータ圧縮率を高めることが可能な
2値イメージ圧縮伸長処理方式を提供することを目的と
する。
[0014] The present invention has been made in view of the points mentioned above, b 2 point detection while eliminating the need for circuit, unnecessary paths eliminates code binary image that can increase the data compression ratio An object of the present invention is to provide a compression / decompression processing method.

【0015】[0015]

【課題を解決するための手段】本発明は、垂直モード符
号、パスモード符号、及び水平モード符号を扱う2次元
符号化方式によって2値イメージの圧縮を行なう2値イ
メージ圧縮処理装置において、圧縮の対象となる符号化
ラインのイメージ中から所定の色変化点を検出する第1
変化点検出手段と、前記符号化ラインに対応する参照ラ
インのイメージ中から所定の色変化点を検出する第2変
化点検出手段と、前記第1の変化点検出手段が検出対象
とする色変化の方向を制御する第1制御手段と、前記第
2の変化点検出手段が検出対象とする色変化の方向を制
御する第2制御手段とを具備し、前記第1,第2変化点
検出手段の少なくとも一方で変化点が検出された場合
に、前記符号化ラインの変化点と参照ラインの変化点と
の相対位置関係が|(符号化ラインの変化点)×(参照
ラインの変化点)|≦3の条件を満たす場合に垂直モー
ド、前記条件を満たさない場合水平モードの符号の生成
が可能であると判定し、垂直モード又は水平モードの符
号を生成する第1のステップと、前記第1のステップで
符号を生成できなかった場合に、前記第1制御手段の状
態を前記第1ステップと同じ状態に保ち、前記第2制
御手段の状態を前記第1ステップと逆の状態にして変
化点検出を行ない、変化点が検出された場合には、パス
モードまたは水平モードの符号を生成する第2のステッ
プとに従って圧縮処理を行なうことを特徴とする。
According to the present invention, there is provided a binary image compression processing apparatus for compressing a binary image by a two-dimensional encoding system which handles a vertical mode code, a pass mode code and a horizontal mode code. A first method of detecting a predetermined color change point from an image of a target coding line
Change point detection means, second change point detection means for detecting a predetermined color change point from an image of a reference line corresponding to the encoding line, and color change to be detected by the first change point detection means A first control means for controlling the direction of the color change, and a second control means for controlling the direction of the color change to be detected by the second change point detection means, wherein the first and second change point detection means are provided. When a change point is detected in at least one of the above, the relative positional relationship between the change point of the coding line and the change point of the reference line is | (change point of the coding line) × (reference
(Change point of line) |
If the above conditions are not satisfied, it is determined that a code in the horizontal mode can be generated, and a first step of generating a code in the vertical mode or the horizontal mode, and the code cannot be generated in the first step If the state of the first control means maintaining the same state as the first step, the state of the second control means performs the first step and the opposite state to the to the change point detection, change point If detected, a compression process is performed according to a second step of generating a code in a pass mode or a horizontal mode.

【0016】[0016]

【作用】このような構成によれば、パスモード符号化の
チェックよりも垂直モードの符号化が優先してチェック
されることにより不要なパスコードを排除することがで
きる。すなわち、通常、例えばMMR符号データ中でほ
ぼ9割を占める垂直モードの符号化を優先することによ
り、一般的にも符号化処理が単純になり高速化できる。
また、特願昭62−59990号に記載された構成によ
って圧縮処理を行なう際には、垂直モードで符号化でき
る場合にb2 点を考慮しなくてよいので、b2 点検出回
路を省略できる。垂直モード符号化ができなくて、b1
点が検出されている場合についてだけ、改めてb2 点を
検出する。その場合には、b1 点検出用の回路をそのま
ま利用する。
According to such a configuration, unnecessary pass codes can be eliminated by checking the coding in the vertical mode in preference to the check in the coding in the pass mode. That is, usually, for example, by giving priority to the encoding in the vertical mode, which accounts for approximately 90% of the MMR code data, the encoding process can be simplified and generally speeded up.
Further, when performing the compression processing according to the configuration described in Japanese Patent Application No. 62-59990, the b 2 point detection circuit can be omitted since the b 2 point need not be considered when encoding can be performed in the vertical mode. . The vertical mode encoding cannot be performed and b 1
Only when a point has been detected, the point b 2 is detected again. In that case, as it is to use the circuit for the b 1 out inspection.

【0017】[0017]

【実施例】以下、図面を参照して本発明の一実施例を説
明する。図1は同実施例に係わる2値データ圧縮伸長処
理装置の全体構成を示すブロック図である。図1に示す
ように、2値データ圧縮伸長処理装置は、解読部2、処
理部4、生成部6、バッファ部7、照明ラインイメージ
バッファメモリ8、及びこれらを制御する制御部1、解
読部サブシーケンサ5とからなり、パイプライン型の構
成をとっている。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the overall configuration of a binary data compression / decompression processing apparatus according to the embodiment. As shown in FIG. 1, the binary data compression / decompression processing device includes a decoding unit 2, a processing unit 4, a generation unit 6, a buffer unit 7, an illumination line image buffer memory 8, a control unit 1 for controlling these, and a decoding unit. It has a sub-sequencer 5 and has a pipeline type configuration.

【0018】解読部2は、伸長時には入力バス9を介し
て得られる符号語データの解読を行い、圧縮時には入力
バス9を介して得られる符号化ラインのイメージデータ
から変化点を検出するとともにライン長を得る。
The decoding section 2 decodes the code word data obtained through the input bus 9 at the time of decompression, detects a change point from the image data of the coded line obtained through the input bus 9 at the time of compression, and detects a line change. Get the length.

【0019】処理部4は、2次元の圧縮伸長処理におい
て参照ラインのイメージデータから変化点を検出する。
処理部4は、圧縮時に変化点の検出結果と解読部2によ
る検出結果とに基づき、a1 点とb1 点との位置の差を
算出し、生成すべき符号語を決め、その結果を生成部6
に送出すると共に、次のa0 点の位置を演算し、解読部
2に送出する。つまり、垂直モード/パスモード/水平
モードの決定は処理部4で行なう。例えば処理部4は垂
直モードで符号化すべきこととa1 −b1 の演算結果と
を生成部6に送出する。処理部4は伸長時には変化点の
検出結果と解読部2による解読結果とに基づき、次のa
0 点の位置を演算し、生成部6に送出するとともに、a
0 点とa1 点との位置の差を算出し、ランの処理が完了
したか否かを制御部1に伝える。生成部6は、処理部4
からのデータに基づき、圧縮時は符号語生成を行い、伸
長時はイメージデータ生成を行う。
The processing section 4 detects a change point from the image data of the reference line in the two-dimensional compression / expansion processing.
The processing unit 4 calculates the difference between the positions of the points a 1 and b 1 based on the detection result of the change point during compression and the detection result of the decoding unit 2, determines a codeword to be generated, and determines the result. Generator 6
And calculates the position of the next point a 0 and sends it to the decoding unit 2. That is, the processing unit 4 determines the vertical mode / pass mode / horizontal mode. For example, the processing unit 4 sends to the generation unit 6 the information to be encoded in the vertical mode and the calculation result of a 1 −b 1 . At the time of decompression, the processing unit 4 determines the following a based on the detection result of the change point and the decoding result
The position of the zero point is calculated and sent to the generation unit 6, and a
The difference between the positions of the 0 point and the a 1 point is calculated, and the control unit 1 is notified of whether or not the run processing has been completed. The generation unit 6 includes a processing unit 4
Based on the data from, a code word is generated at the time of compression and image data is generated at the time of decompression.

【0020】参照ラインイメージバッファメモリ8は、
圧縮時には、解読部2に入力されたイメージデータを次
のラインのイメージデータの参照ラインとするために保
持し、伸長時には、生成部6により生成されたイメージ
データを、次のラインの符号語解読の際、参照ラインと
するために保持するメモリである。入力バス9は、解読
部2に接続されて2値データを入力し、出力バス10
は、生成部6に接続されて圧縮伸長された2値データが
出力される。
The reference line image buffer memory 8
At the time of compression, the image data input to the decoding unit 2 is held for use as a reference line for the image data of the next line. At the time of decompression, the image data generated by the generation unit 6 is decoded by the code word of the next line. In this case, it is a memory that is held to be used as a reference line. The input bus 9 is connected to the decoding unit 2 and inputs binary data, and the output bus 10
Is connected to the generator 6 to output compressed and decompressed binary data.

【0021】解読部サブシーケンサ3は、伸長時、制御
部1により起動され、解読部2の制御を司る。生成部サ
ブシーケンサ3は、圧縮時、制御部1により起動され、
生成部6の制御を司る。制御部1は処理部4を制御し、
また、伸長時には生成部6を、圧縮時には解読部2をも
あわせて直接制御する。すなわち、イメージデータを扱
うブロックは制御部1によりまとめて制御され、符号語
を扱うブロックは専用サブシーケンスにより、独立的に
制御され、各ブロックは並行に動作する。次に各部の構
成・動作について図2から図4を参照しながら詳細に説
明する。各部の動作は伸長処理と圧縮処理とで異なるの
で2次元伸長処理・2次元圧縮処理を中心にそれぞれ別
々に説明する。 (1)2次元伸張処理
The decoding unit sub-sequencer 3 is activated by the control unit 1 when decompressing, and controls the decoding unit 2. The generating unit sub-sequencer 3 is activated by the control unit 1 during compression,
It controls the generation unit 6. The control unit 1 controls the processing unit 4,
The decompression unit 2 is directly controlled together with the generation unit 6 during decompression and the decryption unit 2 during compression. That is, the blocks that handle image data are collectively controlled by the control unit 1, the blocks that handle codewords are independently controlled by dedicated subsequences, and each block operates in parallel. Next, the configuration and operation of each unit will be described in detail with reference to FIGS. Since the operation of each unit is different between the decompression process and the compression process, the two-dimensional decompression process and the two-dimensional compression process will be described separately. (1) Two-dimensional expansion processing

【0022】まず、図2を参照しながら解読部2につい
て説明する。21は符号語データが設定されるレジスタ
RDTI0−23である。レジスタ21は符号語データ
をデータAとして1バイトずつ入力する。符号語データ
を入力する毎にデータRDTI16−23はRDTI8
−15に、データRDTI8−15はRDTI0−7に
移動する。つまり、レジスタ21は1クロックで8ビッ
ト左の位置へ(バイト単位で)移動するように構成され
ている。22はデータRDTI9−23を入力し、レジ
スタ32の示す値だけRDTI9−23を反処理方向に
シフト(左シフト)したデータSHTD0−7を出力す
るバレルシフタである。レジスタ32からのデータRB
PP2−0はバレルシフタ22に入力された符号語デー
タのうち既に解読済みのデータの末尾の(最も左の)ビ
ット番号を示す。例えばRBPP2−10が“011”
の場合、入力データRDTI9−23のうちRDETI
12−19が出力データSHTD0−7となる。23は
制御部1の制御回路11(図8)から送られる制御信号
bとSHTD0−7の各ビットとの排他的論理和をとる
反転回路である。しかし、伸長の場合、制御信号bは常
に“0”になっており、この反転回路23は実質的動作
をしない。
First, the decoding section 2 will be described with reference to FIG. Reference numeral 21 denotes registers RDTI0-23 in which codeword data is set. The register 21 inputs the code word data as data A one byte at a time. Each time code word data is input, the data RDTI16-23 becomes RDTI8
At -15, the data RDTI8-15 moves to RDTI0-7. That is, the register 21 is configured to move to the left 8 bits (in byte units) in one clock. Reference numeral 22 denotes a barrel shifter that inputs data RDTI 9-23 and outputs data SHTD0-7 obtained by shifting (left shifting) RDTI 9-23 in the reverse direction by the value indicated by the register 32. Data RB from register 32
PP2-0 indicates the last (leftmost) bit number of already decoded data among the codeword data input to the barrel shifter 22. For example, RBPP2-10 is "011"
In the case of, RDETI out of the input data RDTI9-23
12-19 is the output data SHTD0-7. Reference numeral 23 denotes an inverting circuit that performs an exclusive OR operation on the control signal b sent from the control circuit 11 (FIG. 8) of the control unit 1 and each bit of SHTD0-7. However, in the case of expansion, the control signal b is always "0", and this inverting circuit 23 does not substantially operate.

【0023】31はセレクタであり、伸長処理の場合、
加算器33からの出力データABPP2−0を選択す
る。25は反転回路23からのデータDTIS0−7が
設定されるレジスタであり、このレジスタ25に設定さ
れたデータRPAT0−7は非圧縮モード(伸長処理に
おいて、非圧縮モード符号語を解読した後、この符号語
に続くイメージデータをそのまま出力すること)の際に
使用される。24はデータDTIS0−7のうちの特定
ビットをマスクするマスク回路である。データDTIS
0−7は直接あるいはマスク回路24を介してゲート2
6に与えられる。ゲート26は制御部1からの3ビット
のデータE(RDSQ4−2)とデータDTIS0−7
とに基づいてデコーダROM27のアドレスデータDR
MA10−0をデコーダROM27に与える。RDSQ
4−2はDRMA10−8となり、DTIS0−7はD
RMA7−0となる。デコーダROM27は伸長時、圧
縮された符号語データの解読を行う。(圧縮時、a1
とイメージデータのラン長とを検出する。)デコーダR
OM27のアドレス構成は表1のようになる。
Reference numeral 31 denotes a selector.
The output data ABPP2-0 from the adder 33 is selected. Numeral 25 is a register in which data DTIS0-7 from the inverting circuit 23 is set. The data RPAT0-7 set in this register 25 is stored in the non-compression mode (in the decompression process, after decoding the non-compression mode codeword, (The image data following the code word is output as it is). Reference numeral 24 denotes a mask circuit for masking a specific bit of the data DTIS0-7. Data DTIS
0-7 are gates 2 directly or through a mask circuit 24.
6 given. The gate 26 receives the 3-bit data E (RDSQ4-2) from the control unit 1 and the data DTIS0-7.
And the address data DR of the decoder ROM 27 based on
MA10-0 is supplied to the decoder ROM 27. RDSQ
4-2 becomes DRMA10-8, and DDIS0-7 becomes DMA.
RMA7-0. When expanded, the decoder ROM 27 decodes the compressed codeword data. (Compressed, to detect a run length of a 1-point and the image data.) Decoder R
The address configuration of the OM 27 is as shown in Table 1.

【0024】[0024]

【表1】 [Table 1]

【0025】解読部サブシーケンサ3は、1次元伸長、
2次元伸長、非圧縮モード伸長、特種(非圧縮最終、E
OLサーチ)等の処理条件に応じて、データRDSQ4
−2に異なる値をセットする。
The decoding unit subsequencer 3 is one-dimensionally expanded,
2D decompression, non-compression mode decompression, special type (uncompressed final, E
Data RDSQ4 according to processing conditions such as OL search).
Set a different value to -2.

【0026】1次元伸張では、白ランを示す符号語デー
タを解読するとき、制御部1は最初にDRMA10−8
=“000”(白A)とし、符号語が9ビット以上の場
合、一度に解読できないので、白Aに続いて白B(DR
MA10−8=“001”)とする。
In the one-dimensional expansion, when decoding the code word data indicating the white run, the control unit 1 firstly reads the DRMA 10-8.
= “000” (white A) and if the code word is 9 bits or more, it cannot be decoded at a time, so white B (DR
MA10-8 = “001”).

【0027】黒ランを示す符号語データを解読すると
き、解読サブシーケンサ3は最初にDRMA10−8=
“010”(黒A)とし、デコーダROM27にて符号
語データの最初から“0”を6個連続解読した場合、黒
Aに続いて黒B(DRMA10−8=“011”)とす
る。
When decoding code word data indicating a black run, the decoding sub-sequencer 3 first sets the DRMA 10-8 =
When it is set to “010” (black A) and the decoder ROM 27 decodes six consecutive “0” from the beginning of the code word data, black A is followed by black B (DRMA10-8 = “011”).

【0028】また、デコーダROM27にて符号語デー
タの最初から“0”を4個連続解読した場合、黒Aに続
いて黒C(DRMA10−8=“100”)とする。2
次元伸長ではDRMA10−8=“101”、非圧縮モ
ード伸長ではDRMA10−8=“110”となる。ま
た、非圧縮モード最終伸張及びEOLコード探索の場
合、DRMA10−8=“111”となる。
If four "0" s are decoded consecutively from the beginning of the code word data in the decoder ROM 27, black A is followed by black C (DRMA10-8 = "100"). 2
In dimension expansion, DRMA10-8 = "101", and in uncompressed mode expansion, DRMA10-8 = "110". In the case of the final decompression in the non-compression mode and the EOL code search, DRMA10-8 = “111”.

【0029】表1のDRMA7−0において、下線部分
はマスク回路24によりマスクされる対象となるビット
を示す。マスクする条件を以下に示す。黒Aで解読する
際、(D0 ,D1 )が(0,0)でない場合、D3 〜D
6 を全て“1”とする。2次元伸長で解読する際、(0
0,01)が(0,0)でない場合、03 〜05 を全て
“1”とする。非圧縮モードで解読する際、(D3 ,D
4 )が(0,0)でない場合、D0 ,D2 を全て“1”
とする。特殊で解読する際、(D0 ,D1 )が(0,
0)でない場合、03 〜07 を全て“1”とする。この
マスク回路24によりデコーダROM27の記憶領域を
減少できる。また、このマスク回路24を省略して、代
わりにデコーダROM27の該当するアドレス領域に全
て同じデータを書いても同じ結果が得られる。
In the DRMA 7-0 of Table 1, the underlined portions indicate bits to be masked by the mask circuit 24. The masking conditions are shown below. When decoding with black A, if (D 0 , D 1 ) is not (0, 0), D 3 to D
6 is all "1". When decoding by two-dimensional expansion, (0
When (0,01) is not (0,0), all of 0 3 to 0 5 are set to “1”. When decoding in uncompressed mode, (D 3 , D
If 4 ) is not (0, 0), D 0 and D 2 are all “1”.
And When decoding with special, (D 0 , D 1 ) is (0,
If not 0), and all 0 3-0 7 "1". With this mask circuit 24, the storage area of the decoder ROM 27 can be reduced. Also, the same result can be obtained even if the mask circuit 24 is omitted and the same data is written in the corresponding address area of the decoder ROM 27 instead.

【0030】次に、デコーダROM27の出力データD
ROM1 1−0の構成について説明する。DROM1 1
−9は次状態への遷移条件を示すデータであり、解読部
サーブシーケンサ3に送られる。解読部サーブシーケン
サ3は、このデータDROM1 1−9に基づき、次の処
理条件DRMA10−8を決定する。DROM8−5は
符号語長からマイナス1した値(符号語長−1)を示す
データであり、加算器33に送られる。DROM5−0
の構成は表2のようになる。
Next, the output data D of the decoder ROM 27
The configuration of the ROM 11-0 will be described. DROM1 1
Data -9 indicating a transition condition to the next state is sent to the decryption unit serve sequencer 3. The decryption unit serve sequencer 3 determines the next processing condition DRMA10-8 based on the data DROM11-9. The DROM 8-5 is data indicating a value obtained by subtracting -1 from the code word length (code word length -1) and sent to the adder 33. DROM5-0
Is as shown in Table 2.

【0031】[0031]

【表2】 表2において、δ−4はb1 点を基準としてa1 点の位
置を示すデータであり、垂直モードの各符号語に対応す
るδ−4は表3のようになる。
[Table 2] In Table 2, δ-4 is data indicating the position of point a 1 with reference to point b 1 , and δ-4 corresponding to each code word in the vertical mode is as shown in Table 3.

【0032】[0032]

【表3】 DROM5−0はセレクタ28に送られる。セレクタ2
8におけるデータの選択は制御部1からの指示に基づ
く。各データに対応する選択条件を表4に示す。
[Table 3] DROM 5-0 is sent to selector 28. Selector 2
The selection of data in 8 is based on an instruction from the control unit 1. Table 4 shows selection conditions corresponding to each data.

【0033】[0033]

【表4】 [Table 4]

【0034】表4において、2バイト以上のランを連続
して生成している間は“ANLC8−0 RNLC2−
0”が選択され、ランの最終バイトを生成するステップ
では、次のランのラン長を解読部2から受取るため、
“000000 DROM5−0”あるいは“DROM
5−0 000000”が選択され、圧縮処理開始にあ
たり、“100111111100”が選択される。こ
れら3つの条件に基づく選択は制御部1により決定さ
れ、“000000 DROM5−1”あるいは“DR
OM5−0 000000”の選択は解読部2により決
定される。
In Table 4, while continuously generating runs of 2 bytes or more, "ANLC8-0 RNLC2-
0 ”is selected, and in the step of generating the last byte of the run, in order to receive the run length of the next run from the decoding unit 2,
“000000 DROM5-0” or “DROM
5-000000 "is selected, and" 100111111100 "is selected at the start of the compression processing.The selection based on these three conditions is determined by the control unit 1, and" 000000 DROM5-1 "or" DR
The selection of OM5-000000 "is determined by the decryption unit 2.

【0035】選択されたデータDNLC11−0は、レ
ジスタ29に設定される。加算器30は、1次元伸長処
理の際、比較器34からの一致信号eが有効となるま
で、レジスタ29からのデータRNLC11−3からマ
イナス1する。(また、加算器30は圧縮処理の際、イ
メージデータを1バイト処理する毎にレジスタ29から
のデータRMLC11−3からマイナス1する。)加算
器30からのデータANLC8−0はセレクタ28に送
られ、セレクタ28により選択されレジスタ29に設定
される。さらに、加算器30からのデータANLC8−
0は、データJとして生成部6にも送られる。データJ
は圧縮処理の際、使用される。
The selected data DNLC11-0 is set in the register 29. The adder 30 subtracts 1 from the data RNLC 11-3 from the register 29 until the coincidence signal e from the comparator 34 becomes valid during the one-dimensional expansion processing. (In addition, during the compression process, the adder 30 subtracts 1 from the data RMLC11-3 from the register 29 every time one byte of image data is processed.) The data ANLC8-0 from the adder 30 is sent to the selector 28. , Is selected by the selector 28 and set in the register 29. Further, the data ANLC8-
0 is also sent to the generation unit 6 as data J. Data J
Is used in the compression process.

【0036】レジスタ29に設定されたデータRMLC
3−0はデータKとして図3に示すゲート51及びセレ
クタ53に送られる。RNLC11−4は比較器34に
送られる。比較器34は1次元伸長処理の際、ランの生
成の終了を示すために設けられたものであり、RNLC
11−4と“00000000”とを比較し、一致した
場合、一致信号eを制御部1に送る。制御部1は一致信
号eとRNLC3−0の値とに基づき、所定長のイメー
ジが生成されるように、生成部6にイメージデータ生成
を指示する。
Data RMLC set in register 29
3-0 is sent as data K to the gate 51 and the selector 53 shown in FIG. The RNLC 11-4 is sent to the comparator 34. The comparator 34 is provided to indicate the end of the generation of the run during the one-dimensional expansion processing.
11-4 and “00000000” are compared, and if they match, a match signal e is sent to the control unit 1. The control unit 1 instructs the generation unit 6 to generate image data based on the coincidence signal e and the value of the RNLC 3-0 so that an image of a predetermined length is generated.

【0037】一方、加算器33では、レジスタ32に設
定されたデータRBPP2−0とデコーダROM27か
らのデータDROM8−6とを加算し、この加算結果に
さらに1を加える。つまり、加算器33により出力され
るデータABPP2−0は次式のようになる。 ABPP2−0 = RBPP2−0 + DROM8−6 + 1 ABPP2−0はセレクタ31により選択され、レジス
タ32に設定される。例えば、RBPP2−0が01
1”(=3)であり、デコーダROM27による解読結
果DROM8−6(符号長−1)が“110”(=6)
の場合、 ABPP2−0 =“011”+“110”+“001” =“(1)010”
On the other hand, the adder 33 adds the data RBPP2-0 set in the register 32 and the data DROM8-6 from the decoder ROM 27, and adds 1 to the addition result. That is, the data ABPP2-0 output by the adder 33 is expressed by the following equation. ABPP2-0 = RBPP2-0 + DROM8-6 + 1 The ABPP2-0 is selected by the selector 31 and set in the register 32. For example, if RBPP2-0 is 01
1 "(= 3), and the decryption result DROM 8-6 (code length -1) by the decoder ROM 27 is" 110 "(= 6).
In the case of ABPP2-0 = “011” + “110” + “001” = “(1) 010”

【0038】となる。この4ビットの情報は、ビット2
−0がABPP2−0として出力され、ビット3が制御
信号COABPP(図示せず)として制御部1に出力さ
れる。制御部1は制御信号COABPPの値に基づき、
COABPPが“1”のとき、1バイトの符号語を処理
したと判断し、レジスタ21に次の1バイトの符号語デ
ータを入力する。また、COABPPが、“0”のとき
は、レジスタ21はそのままで次の処理を続ける。上記
の例の場合、ABPP2−0が“010”(=2)であ
り、COABPPが“1”であるのでレジスタ21を1
バイト進め、更に次の符号語データはバレルシフタ22
により2ビットシフトされる。
## EQU4 ## This 4-bit information is
−0 is output as ABPP2-0, and bit 3 is output to the control unit 1 as a control signal COABPP (not shown). The control unit 1 determines a value based on the value of the control signal COABPP,
When COABPP is “1”, it is determined that a one-byte codeword has been processed, and the next one-byte codeword data is input to the register 21. When COABPP is “0”, the next processing is continued without changing the register 21. In the case of the above example, since ABPP2-0 is “010” (= 2) and COABPP is “1”, the register 21 is set to 1
The byte is advanced, and the next code word data is transferred to the barrel shifter 22.
Is shifted by 2 bits.

【0039】次に、図3を参照しながら処理部4につい
て説明する。41は参照ラインのイメージデータが設定
されるレジスタRREF0−27である。レジスタ41
はイメージデータをデータNとして1バイトずつ入力す
る。イメージデータを入力する毎にデータRREF20
−27はRREF12−19に、RREF12−19は
RREF4−11に、RREF8−11はRREF0−
3に移動する。
Next, the processing section 4 will be described with reference to FIG. 41 is a register RREF0-27 in which image data of the reference line is set. Register 41
Inputs image data as data N one byte at a time. Each time image data is input, data RREF20
-27 is RREF12-19, RREF12-19 is RREF4-11, RREF8-11 is RREF0-
Go to 3.

【0040】42はデータRREF0−21を入力し、
レジスタ46の示す値だけRREF0−21を反処理方
向にシフトしたデータSHTP0−14を出力するバレ
ルシフタである。レジスタ46からのデータRBPA2
−0は、バレルシフタ42に入力されたイメージデータ
に対応するa0 点の位置のビット番号からマイナス4し
た値を示すデータである。従ってバレルシフタ42によ
りシフトされたデータSHTP0−14において、a0
点の位置はSHTP4(ビット4)となる。このように
シフトすることにより、a0 点の位置から3ビット反処
理方向の範囲まで変化点検出を可能にしている。例え
ば、RBPA2−0が“011”(=3)である場合、
データRREF0−21はバレルシフタ42により3ビ
ットシフトされ、RREF3−17がSHTP0−14
となる。
42 inputs data RREF0-21,
This is a barrel shifter that outputs data SHTP0-14 obtained by shifting RREF0-21 in the reverse direction by the value indicated by the register 46. Data RBPA2 from register 46
−0 is data indicating a value obtained by subtracting 4 from the bit number at the position of the point a 0 corresponding to the image data input to the barrel shifter 42. Therefore, in the data SHTP0-14 shifted by the barrel shifter 42, a 0
The position of the point is SHTP4 (bit 4). By shifting in this way, a change point can be detected from the position of the point a 0 to a range in the 3-bit non-processing direction. For example, when RBPA2-0 is “011” (= 3),
Data RREF0-21 is shifted by 3 bits by barrel shifter 42, and RREF3-17 is shifted to SHTP0-14.
Becomes

【0041】43は制御部1の制御回路11(図8)か
ら送られる制御信号a(FBLKC)とSHTP0−1
4の各ビットとの排他的論理和をとる反転回路である。
この反転回路43は画素の色変化の方向を統一するため
のものである。本実施例では色変化の方向を白→黒と統
一し、さらに次段の変化点検出回路45において、白→
黒の変化点のみ検出するような構成としている。従っ
て、検出しようとする変化点が白である場合には、予め
反転回路43によりイメージデータを反転させておくこ
とにより、変化点検出回路45において、適切な変化点
を検出することができる。また、検出しようとする変化
点が黒である場合には、反転回路43はSHTP0−1
4を素通しする。
Reference numeral 43 denotes a control signal a (FBLKC) sent from the control circuit 11 (FIG. 8) of the control unit 1 and SHTP0-1.
4 is an inverting circuit that performs an exclusive OR operation with each of the four bits.
This inverting circuit 43 is for unifying the direction of color change of the pixel. In this embodiment, the direction of the color change is unified from white to black.
The configuration is such that only the black change point is detected. Therefore, when the change point to be detected is white, the change point detection circuit 45 can detect an appropriate change point by inverting the image data in advance by the inversion circuit 43. When the change point to be detected is black, the inverting circuit 43 outputs SHTP0-1.
Pass through 4.

【0042】44は反転回路43から出力されたデータ
DREN0−14からb1 点あるいはb2 点を検出する
変化点検出回路である。変化点検出回路44は変化点候
補であるビットを“0”、他のビットを“1”としたD
REC1−14を出力する。この変化点検出回路44の
詳細な構成については後述する。45は変化点候補を示
すデータDREC1−14を入力し、変化点候補の中か
ら最も左側の候補を検出し、この点(b1 点)の位置を
示すデータに変換するプライオリティエンコーダであ
る。プライオリティエンコーダ45の出力データB1D
T3−0はDREC1−14の値により、表5のように
なる。
[0042] 44 is the change point detection circuit for detecting a b 1 point or b 2 points from data DREN0-14 output from the inverting circuit 43. The change point detection circuit 44 sets the bit that is a change point candidate to “0” and sets the other bits to “1”.
REC 1-14 is output. The detailed configuration of the change point detection circuit 44 will be described later. 45 inputs data DREC1-14 indicating a change point candidates to detect the leftmost candidate from the changing point candidates, a priority encoder to convert the data indicating the position of the point (b 1 point). Output data B1D of the priority encoder 45
T3-0 is as shown in Table 5 according to the value of DREC1-14.

【0043】[0043]

【表5】 [Table 5]

【0044】表5において、“0”が変化点を示し、
“*”印はどのようなデータでもよいことを示す。例え
ばB1DT3−0が“0111”(=7)の場合、DR
EC1−14のうちビット7に最も左側の変化点が存在
することを示す。
In Table 5, "0" indicates a change point,
“*” Indicates that any data may be used. For example, when B1DT3-0 is “0111” (= 7), DR
It indicates that the leftmost transition point exists in bit 7 of EC1-14.

【0045】また、DREC1−14のビット番号1〜
14は、符号化ラインのイメージデータと比較すると、
ビット番号−3〜10に相当する。即ち、このことは、
変化点検出回路44において符号化ラインのイメージデ
ータに対して、処理方向側と反処理方向側とにそれぞれ
3ビットずつ広げたビット幅で変化点検出を行っている
ことを意味している。B1DT3−0の値がDREC1
−14のどのビット番号を表わすか、また、このDRE
C1−14のビット番号は符号化ラインと比較するとど
のビット番号を表わすかを表6に示す。
Also, bit numbers 1 to 1 of DREC1-14
14 is compared with the image data of the coding line,
It corresponds to bit numbers -3 to 10. That is,
This means that the change point detection circuit 44 performs change point detection on the image data of the encoded line with a bit width that is expanded by 3 bits each in the processing direction and the non-processing direction. The value of B1DT3-0 is DREC1
-14 to indicate the bit number,
Table 6 shows which bit numbers of C1-14 represent the bit numbers as compared with the coding lines.

【0046】[0046]

【表6】 [Table 6]

【0047】この表6からB1DT3−0は、符号化ラ
インのイメージデータと比較してみた場合、本来のビッ
ト番号に4を加えた値を示していることが理解できる。
例えばB1DT3−0が“0011”(=3)の場合、
本来のビット番号は“−1”ということになる。
From Table 6, it can be understood that B1DT3-0 indicates a value obtained by adding 4 to the original bit number when compared with the image data of the encoding line.
For example, when B1DT3-0 is “0011” (= 3),
The original bit number is "-1".

【0048】また、RREF0−26のビット位置から
B1DT3−0をみた場合、RREF0−21はバレル
シフタ42により、RBPA2−0が示す値だけシフト
されているので、B1DT3−0は本来のビット番号に
4を加えたものからRBPA2−0(a0 点の位置)を
減算した値を示していることが理解できる。
When B1DT3-0 is viewed from the bit position of RREF0-26, since RREF0-21 has been shifted by the value indicated by RBPA2-0 by barrel shifter 42, B1DT3-0 has 4 bits as the original bit number. can be seen that shows the value obtained by subtracting the RBPA2-0 from plus (position of a 0 point).

【0049】さて、このようにして検出されたB1DT
3−0は伸長、圧縮などの処理に応じて演算がなされ
る。47,48,53,54,59はセレクタ、50,
51,55はゲート、49,52,56,58は加算
器、57は反転回路である。
The B1DT detected as described above
In 3-0, an operation is performed according to processing such as expansion and compression. 47, 48, 53, 54, 59 are selectors, 50,
51 and 55 are gates, 49, 52, 56 and 58 are adders, and 57 is an inverting circuit.

【0050】まず、2次元伸長処理の場合について説明
する。2次元伸長処理の場合、解読部2から与えられた
データRNLC3−0がデータKとしてゲート51及び
セレクタ53に入力されるデータSは2次元伸長処理か
1次元伸長処理かを示す1ビットのデータであり、制御
部1から送られる。
First, the case of the two-dimensional expansion processing will be described. In the case of the two-dimensional decompression process, the data S input to the gate 51 and the selector 53 is the data RNLC3-0 given from the decoding unit 2 as data K, and is 1-bit data indicating whether the process is the two-dimensional decompression process or the one-dimensional decompression process. And sent from the control unit 1.

【0051】2次元伸長処理の場合、“1”となり、1
次元伸長処理の場合、“0”となる。セレクタ51は2
次元伸長処理の場合、データS(“1”)とRNLC2
−0とで構成するデータを加算器52に送る。加算器5
2には、さらに“0”とRBPA2−0とで構成するセ
レクタ50からのデータが入力される。例えば解読部2
により、垂直モード符号語を解読した場合、加算器52
による加算結果A0PL3−0は、 A0PL3−0 = “0”RBPA2−0 + “1”RNLC2−0 = a0 + (δ−4) = δ − 4 + a0
In the case of two-dimensional decompression processing, it becomes "1" and 1
In the case of the dimension extension processing, it is “0”. The selector 51 is 2
In the case of the dimension expansion processing, the data S (“1”) and RNLC2
The data constituted by −0 is sent to the adder 52. Adder 5
2, data from the selector 50 composed of “0” and RBPA2-0 is further input. For example, decryption unit 2
When the vertical mode code word is decoded,
Sum A0PL3-0 by the, A0PL3-0 = "0" RBPA2-0 + "1" RNLC2-0 = a 0 + (δ-4) = δ - 4 + a 0

【0052】となる。この加算結果A0PL3−0はゲ
ート55により、更にデータを1ビット延長して5ビッ
トのデータとした後、加算器56に送られる。加算器5
6の他の入力には、B1DT3−0を符号延長して5ビ
ットにしたデータがセレクタ54から入力される。例え
ば解読部2により、垂直モード符号語を解読した場合、
加算器56による加算結果AB1A4−0は、 ABIA4−1 = “0”B1DT3−0 + “1”A0PL3−0 = (b1 +4−a0 ) + (δ−4+a0 ) = b1 + δ = b1 + (a1 −b1 ) = a1
Is as follows. The addition result A0PL3-0 is further extended by one bit into five-bit data by a gate 55 to be sent to an adder 56. Adder 5
To the other input 6, data obtained by sign-extending B1DT3-0 to 5 bits is input from the selector 54. For example, when the decoding unit 2 decodes a vertical mode codeword,
The addition result AB1A4-0 by the adder 56 is: ABIA4-1 = “0” B1DT3-0 + “1” A0PL3-0 = (b 1 + 4-a 0 ) + (δ−4 + a 0 ) = b 1 + δ = b 1 + (a 1 -b 1 ) = a 1

【0053】となる。この加算結果AB1A2−0のう
ちAB1A2−0はセレクタ59に送られる。セレクタ
59はこのAB1A2−0を選択し、データDBPA2
−0として生成部6に送る。更に、データDBPA2−
0はレジスタ46に設定され、次のa0 点を示す。
Is as follows. AB1A2-0 of the addition result AB1A2-0 is sent to the selector 59. The selector 59 selects AB1A2-0, and selects the data DBPA2
It is sent to the generation unit 6 as −0. Further, the data DBPA2-
0 is set in the register 46 and indicates the next a0 point.

【0054】一方、加算器58にはセレクタ53により
選択されたデータRNLC3−0と反転回路57を素通
りしたデータB1DT3−0とが入力される。例えば解
読部2により、垂直モード符号語を解読した場合、加算
器58による加算結果ADLT3−0は、 ADLT3−0 = B1DT3−0 + RNLC3−0 = (b1 +4−a0 ) + (δ−4) = b1 + δ − a0 = a1 −a0 となる。そして、このデータは制御部1に送られる。制
御部1はこの値が8以下の場合、ランの処理が完了した
ことを認識する。
On the other hand, the data RNLC3-0 selected by the selector 53 and the data B1DT3-0 passed through the inverting circuit 57 are input to the adder 58. The example decoding unit 2, when decrypting the vertical mode code words, the addition result ADLT3-0 by the adder 58, ADLT3-0 = B1DT3-0 + RNLC3-0 = (b 1 + 4-a 0) + (δ- 4) = b 1 + δ−a 0 = a 1 −a 0 Then, this data is sent to the control unit 1. When this value is 8 or less, the control unit 1 recognizes that the run processing has been completed.

【0055】次に、1次元伸長の場合について説明す
る。1次元伸長の場合、解読部2のレジスタ29からの
データRNLC2−0が、データKとしてセレクタ51
に入力される。RNLC2−0は1バイト以下のラン長
を示し、次のa0 点の位置を算出するために設けられた
ものである。また、データSは1次元伸長処理では
“0”が設定される。このデータS(“0”)とRNL
C2−0とで構成されるセレクタ51からのデータは加
算器52に送られる。加算器52には、さらに“0”と
RBPA2−0とで構成されるセレクタ50からのデー
タが入力される。加算器52による加算結果A0PL3
−0は A0PL3−0 = “0”RBPA2−0 + “0”RNLC2−0 = a0 + RL
Next, the case of one-dimensional expansion will be described. In the case of one-dimensional expansion, the data RNLC2-0 from the register 29 of the decoding unit 2
Is input to RNLC2-0 represents a run length of less than 1 byte, and is provided in order to calculate the position of the next a 0 point. The data S is set to “0” in the one-dimensional expansion processing. This data S (“0”) and RNL
The data from the selector 51 composed of C2-0 is sent to the adder 52. The data from the selector 50 composed of “0” and RBPA2-0 is further input to the adder 52. Addition result A0PL3 by adder 52
-0 A0PL3-0 = "0" RBPA2-0 + "0" RNLC2-0 = a 0 + RL

【0056】となる。ここで“a0 ”はa0 点の位置を
示し、“RL”は1バイト以下のラン長を示している。
このA0PL3−0はセレクタ55に送られる。セレク
タ55に入力されるデータTは、1次元伸張処理の場合
“0”となる。データT(“0”)とA0PL3−0と
で構成されるセレクタ55からのデータは加算器56に
送られる。加算器56にはさらにセレクタ54により選
択されたデータ“11111”が入力される。加算器5
6ではセレクタ54とセレクタ55とを加算した後、さ
らに1を加える。従って、加算結果AB1A4−0は AB1A4−0 = “11111” + “0”A0PL3−0 + 1 = “0”A0PL3−0 = a0 + RL
Is as follows. Here, “a 0 ” indicates the position of the a 0 point, and “RL” indicates a run length of 1 byte or less.
This A0PL3-0 is sent to the selector 55. The data T input to the selector 55 is “0” in the case of the one-dimensional expansion processing. Data from the selector 55 composed of the data T (“0”) and A0PL3-0 is sent to the adder 56. The data “11111” selected by the selector 54 is further input to the adder 56. Adder 5
At 6, after adding the selector 54 and the selector 55, 1 is further added. Therefore, the addition result AB1A4-0 is AB1A4-0 = “11111” + “0” A0PL3-0 + 1 = 1 = “0” A0PL3-0 = a 0 + RL

【0057】となる。この加算結果AB1A4−0のう
ちAB1A2−0はセレクタ59に送られる。セレクタ
59はこのABPA2−0を選択し、データDBPA2
−0として生成部6に送る。また、このDBPA2−0
はレジスタ45に設定される。
Is as follows. AB1A2-0 of the addition result AB1A4-0 is sent to the selector 59. The selector 59 selects this ABPA2-0 and outputs the data DBPA2
It is sent to the generation unit 6 as −0. In addition, this DBPA2-0
Is set in the register 45.

【0058】次に図4を参照しながら生成部6について
説明する。ここでは伸長処理の場合に使用される構成の
みについて説明し、圧縮処理の場合に使用される構成に
ついては後述する。
Next, the generator 6 will be described with reference to FIG. Here, only the configuration used in the case of the decompression process will be described, and the configuration used in the case of the compression process will be described later.

【0059】70はセレクタであり、伸長処理の場合、
生成するイメージデータの色に応じて“1111111
1”(黒)または、“00000000”(白)を選択
する。セレクタ70は2次元伸長処理の際、エラーが発
生してイメージ生成ができなかったとき、処理部4から
のデータDREN4−11を選択する。これはエラーが
発生した場合、参照ラインのデータをそのまま置換える
ためである。また、セレクタ70は圧縮処理の際、エン
コーダROM66の出力データEROM7−0を選択す
る。セレクタ70は非圧縮モードの場合、解読部2から
のデータRPAT0−7を選択する。これは伸長処理に
おいて、非圧縮モード符号を解読した場合、その後につ
づく非圧縮イメージをそのまま出力するためである。
Reference numeral 70 denotes a selector.
“1111111” according to the color of the image data to be generated
Selector 1 ”(black) or“ 00000000 ”(white) The selector 70 outputs the data DREN4-11 from the processing unit 4 when an error occurs during the two-dimensional expansion processing and an image cannot be generated. This is because, when an error occurs, the data of the reference line is replaced as it is, and the selector 70 selects the output data EROM7-0 of the encoder ROM 66 during the compression processing. In the case of the mode, the data RPAT0-7 is selected from the decoding unit 2. This is because, when the non-compression mode code is decoded in the decompression processing, the subsequent uncompressed image is output as it is.

【0060】71はローテートシフタであり、レジスタ
68からのデータRBPQ2−0が示す値だけ、セレク
タ70からのデータECDP0−7を右シフトし、オー
バーフローしたデータは左側から入力される。例えば、
RBPQ2−0が“010”(=2)の場合、ECDP
0−7は2ビット右シフトされ、ECDP0−7のうち
ビット6と7とがオーバーフローし、左側から入力され
る。従って、ローテートシフタ71の出力データSHT
G0−7はECDP6,7,0−5となる。伸長処理で
は、ECDP0−7が“11111111”または“0
0000000”であるので、ローテートシフタ71を
介しても内容に変化はなぃ。
Reference numeral 71 denotes a rotate shifter, which shifts the data ECDP0-7 from the selector 70 to the right by the value indicated by the data RBPQ2-0 from the register 68, and inputs the overflowed data from the left. For example,
ECDP when RBPQ2-0 is "010" (= 2)
0-7 are shifted right by 2 bits, and bits 6 and 7 of ECDP0-7 overflow and are input from the left. Therefore, the output data SHT of the rotate shifter 71
G0-7 becomes ECDP6, 7, 0-5. In the decompression processing, ECDP0-7 is set to “11111111” or “0
00000000 ", the contents do not change even through the rotation shifter 71.

【0061】ローテートシフタ71から出力されたデー
タSHTG0−7はセレクタ72及びセレクタ73に出
力される。セレクタ72には既に途中まで生成されたデ
ータEPSL0−7が入力されている。セレクタ72は
レジスタ68からのデータRBPQ2−0が示す値に従
い、指示値より左側のデータをEPSL0−7から選択
し、指示値を含む指示値より右側のデータをSHTG0
−7から選択する。選択されたデータEPCK0−7は
レジスタ73に出力される。
Data SHTG0-7 output from rotate shifter 71 is output to selector 72 and selector 73. Data EPSL0-7 generated halfway has already been input to the selector 72. In accordance with the value indicated by data RBPQ2-0 from register 68, selector 72 selects data on the left side of the indicated value from EPSL0-7, and selects data on the right side of the indicated value including the indicated value as SHTG0.
Select from -7. The selected data EPCK0-7 is output to the register 73.

【0062】レジスタ73のRODT0−7にはEPC
K0−7が設定され、RODT8−15にはSHTG0
−7が設定される。データRODT0−7はレジスタ7
5及びセレクタ74に出力される。セレクタ74はRO
DT0−7においてイメージデータ生成が完了している
場合、RODT8−15を選択し、RODT0−7にお
いてイメージデータ生成が中途の場合、RODT0−7
を選択する。RODT0−7においてイメージデータ生
成が完了しているか否かは、加算器58の加算結果のビ
ット3が“1”となった場合、制御部1がRODT0−
7においてイメージデータ生成の完了を認識する。制御
部1はこれにより、セレクタ74に選択信号を送る。セ
レクタ74からのデータEPSL0−7はセレクタ72
に送られ、つぎに出力されたSHTG0−7と合成され
る。レジスタ75はRODT0−7が設定されるレジス
タであり、RODT0−7においてイメージデータ生成
が完了すると、データROUT0−7Sとして読み出さ
れる。
EPC is set in RODT0-7 of the register 73.
K0-7 is set, and SHTG0 is set in RODT8-15.
-7 is set. Data RODT0-7 is in register 7
5 and the selector 74. Selector 74 is RO
If image data generation is completed in DT0-7, RODT8-15 is selected. If image data generation is incomplete in RODT0-7, RODT0-7 is selected.
Select Whether or not the image data generation is completed in RODT0-7 is determined when the bit 1 of the addition result of the adder 58 becomes "1".
In step 7, the completion of image data generation is recognized. Thus, the control unit 1 sends a selection signal to the selector 74. The data EPSL0-7 from the selector 74 is supplied to the selector 72.
And then combined with the output SHTG0-7. The register 75 is a register in which RODT0-7 is set, and when the image data generation is completed in RODT0-7, it is read out as data ROUT0-7S.

【0063】1次元伸長処理の場合、ROUT0−7は
データCとして外部に出力され、2次元伸長処理の場
合、外部に出力されるとともに、次のラインの伸長にお
いて参照ラインとして利用するために、データCとして
バッファ部8にも送られる。上述してきたように伸長処
理が進められる。 (2)2次元圧縮処理 次に、圧縮処理における各部の構成・動作について説明
する。
In the case of one-dimensional expansion processing, ROUT0-7 is output to the outside as data C, and in the case of two-dimensional expansion processing, it is output to the outside and used as a reference line in the expansion of the next line. The data C is also sent to the buffer unit 8. The decompression process proceeds as described above. (2) Two-dimensional compression processing Next, the configuration and operation of each unit in the compression processing will be described.

【0064】まず、図2を参照しながら解読部2につい
て説明する。レジスタ21は圧縮処理の場合、イメージ
データが設定される。レジスタ21はイメージデータを
1バイトずつ入力する。イメージデータを入力する毎に
データRDTI16−23はRDTI8−15に、デー
タRDTI8−15はRDTI0−7にシフトされる。
RDTI0−7は次の符号化ラインの処理の際、参照ラ
インのイメージデータとして利用されるため、データB
としてバッファ部8に送られる。レジスタ21のRDT
I9−23がバレルシフタ22に入力される。バレルシ
フタ22はレジスタ32の示す値だけ、RDTI9−2
3を反処理方向にシフトする。例えば、初期値としてR
BPP2−0が“111”(=7)となるので、バレル
シフタ22は7ビットシフトする。従ってRDTI16
−23がSHTD0−7として始めに処理されることに
なる。セレクタ31は圧縮処理の場合、処理部4からの
出力データDBPA2−0を選択する。
First, the decoding section 2 will be described with reference to FIG. In the case of compression processing, the register 21 is set with image data. The register 21 inputs the image data one byte at a time. Each time image data is input, the data RDTI 16-23 is shifted to RDTI 8-15, and the data RDTI 8-15 is shifted to RDTI 0-7.
Since RDTI0-7 is used as image data of a reference line when processing the next encoding line, data B
Is sent to the buffer unit 8. RDT of register 21
I9-23 is input to the barrel shifter 22. The barrel shifter 22 stores only the value indicated by the register 32 in the RDTI 9-2.
3 in the anti-processing direction. For example, as an initial value R
Since BPP2-0 is "111" (= 7), the barrel shifter 22 shifts by 7 bits. Therefore RDTI16
-23 will be processed first as SHTD0-7. In the case of the compression process, the selector 31 selects the output data DBPA2-0 from the processing unit 4.

【0065】バレルシフタ22からの出力データSHT
D0−7は反転回路23に入力される。反転回路23
は、変化点を検出する際、画素の色変化の方向を統一し
ているために設けられたものである。本実施例では画素
の色変化の方向を白→黒に統一し、黒色の画素のみ変化
点として検出する構成となっている。従って反転回路2
3は白色の画素を変化点として検出したい場合、イメー
ジデータを反転する。反転回路23は制御信号b(FB
LKB)とSHTD0−7の各ビットとの排他的論理和
をとる。制御信号b(FBLKB)は白色の画素を変化
点として検出したい場合、有効(“1”)となる。
Output data SHT from barrel shifter 22
D0-7 is input to the inverting circuit 23. Inverting circuit 23
Is provided to unify the direction of color change of a pixel when detecting a change point. In this embodiment, the direction of color change of pixels is unified from white to black, and only black pixels are detected as change points. Therefore, the inverting circuit 2
3 inverts image data when it is desired to detect a white pixel as a change point. The inverting circuit 23 outputs a control signal b (FB
LKB) and each bit of SHTD0-7 is exclusive-ORed. The control signal b (FBLKB) is valid ("1") when it is desired to detect a white pixel as a change point.

【0066】反転回路23からのデータDTIS0−7
はマスク回路24を介してセレクタ26に与えられる。
セレクタ26にはデータD(DNDP0−7)が入力さ
れている。このデータDNDP0−7は、ラインの終端
点の1ビット右側に仮想の変化点を補うためのデータで
ある。通常はこのデータDNDP0−7の各ビットは
“0”であり、ラインの最終のデータを処理する際、デ
ータDNDP0−7のうち、終端点の右側のビットの位
置のみが“1”となる。このデータDNDP0−7とデ
ータDTIS0−7との論理和をとったデータがセレク
タ26により選択され、DRMA7−0となる。また、
マスク回路24は圧縮処理の場合、表1に示したように
処理条件は“特殊”ということで、前述した条件に従
い、データをマスクする。セレクタ26には制御部1か
らデータEとして“111”が与えられる。セレクタ2
6には制御部1からデータEとして“111”が与えら
れる。従って、セレクタ26からのデータDRMA10
−8は“111”となる。
Data DTI0-7 from inverting circuit 23
Is supplied to the selector 26 via the mask circuit 24.
Data D (DNDP0-7) is input to the selector 26. This data DNDP0-7 is data for supplementing a virtual change point one bit to the right of the end point of the line. Normally, each bit of the data DNDP0-7 is "0", and when processing the last data of the line, only the bit position of the data DNDP0-7 on the right side of the end point is "1". Data obtained by calculating the logical sum of the data DNDP0-7 and the data DTIS0-7 is selected by the selector 26 and becomes DRMA7-0. Also,
In the case of compression processing, the mask circuit 24 masks data in accordance with the above-described condition because the processing condition is "special" as shown in Table 1. The selector 26 is supplied with “111” as data E from the control unit 1. Selector 2
6 is given “111” as data E from the control unit 1. Therefore, the data DRMA10 from the selector 26
-8 becomes "111".

【0067】アドレスデータDRMA10−0はデコー
ダROM27に与えられ、デコータROM27はこのデ
ータを解読し、解読結果DROM11−0を出力する。
圧縮処理の場合、DRMA10−8は“111”であ
り、また、DRDM11−0のうちビット11,10,
9,5は使用されないので、各アドレスデータDRMA
7−0に対応する解読結果DROM8−6,4−0を表
7に示す。
The address data DRMA10-0 is supplied to a decoder ROM 27, which decodes the data and outputs a decoding result DROM11-0.
In the case of compression processing, DRMA10-8 is “111”, and bits 11, 10, and
9 and 5 are not used, so that each address data DRMA
Table 7 shows the decoding results DROM8-6, 4-0 corresponding to 7-0.

【0068】[0068]

【表7】 [Table 7]

【0069】表7において、アドレスデータDRAM7
−0の“M”印は、マスク回路24によりマスクされた
ビット(全て“1”である)を示す。このマスク回路2
4によりデコータROM27の記憶領域を減少させてい
る。“×”印は“0”でも“1”でもよいことを示して
いる。DROM8−6は解読したイメージの長さからマ
イナス1した値(ラン長−1)を示す。DROM4はラ
ン長をカウントするランレングスカウンタ(セレクタ2
8、レジスタ29、加算器30とから構成される)にお
いて、カウントするか否かを決定する情報として用いら
れる。a1 点が検出された場合、DROM4が“0”と
なり、a1 点が未検出の場合、DROM4が“1”とな
る。制御部1はこのDROM4の値に従い、DROM4
が“1”の場合、ランレングスカウンタにカウントさせ
る。DROM3−0は解読したイメージの長さ(ラン
長)を示す。解読結果DROM8−6,4−0のうちD
ROM3−0は処理部4へ、DROM8−6は加算器3
3及び処理部4へ、DROM4は制御部1へそれぞれ出
力される。
In Table 7, address data DRAM 7
An “M” mark of −0 indicates a bit masked by the mask circuit 24 (all bits are “1”). This mask circuit 2
4, the storage area of the decoder ROM 27 is reduced. The “x” mark indicates that it may be “0” or “1”. The DROM 8-6 indicates a value obtained by subtracting 1 from the length of the decoded image (run length-1). DROM 4 is a run length counter (selector 2) for counting the run length.
8, a register 29 and an adder 30) are used as information for determining whether or not to count. When the point a 1 is detected, the DROM 4 becomes “0”, and when the point a 1 is not detected, the DROM 4 becomes “1”. The control unit 1 determines the value of the DROM 4
Is "1", the run length counter is counted. DROM 3-0 indicates the length (run length) of the decoded image. D of decryption result DROM8-6,4-0
The ROM 3-0 is sent to the processing unit 4, and the DROM 8-6 is sent to the adder 3
3 and the processing unit 4, and the DROM 4 is output to the control unit 1.

【0070】加算器33では伸長処理と同様にして、レ
ジスタ32に設定されたデータRBPP2−0とデコー
タROM27からのデータDROM8−6とを加算し、
黒で始まるラインの最初の処理を行っている場合以外
は、この結果にさらに1を加える。黒スタートのライン
の開始はラン長が白0であるから、この場合、最初のス
テップでは1を加えない。加算結果ABPP2−0は次
式のようになる。 ABPP2−0 = RBPP2−0 + DROM8
−6 + 反転(FBLKST)
The adder 33 adds the data RBPP2-0 set in the register 32 and the data DROM8-6 from the decoder ROM 27 in the same manner as in the decompression process.
Unless the first processing of a line starting with black is being performed, one is added to this result. At the start of the black start line, the run length is white 0, and in this case, 1 is not added in the first step. The addition result ABPP2-0 is expressed by the following equation. ABPP2-0 = RBPP2-0 + DROM8
-6 + inversion (FBLKST)

【0071】ここで、FBLKSTは黒スタートを示す
制御信号であり、黒スタート時、FBLKSTは有効
(“1”)となる。例えば、RBPPが“111”(=
7)であり、DROM8−6(ラン長−1)が“01
0”(=2)であった場合、 ABPP2−0 = “111” + “001” = “(1)010”
Here, FBLKST is a control signal indicating black start, and at the time of black start, FBLKST becomes valid ("1"). For example, if the RBPP is "111" (=
7) and the DROM 8-6 (run length -1) is "01
0 ”(= 2), then ABPP2−0 =“ 111 ”+“ 001 ”=“ (1) 010 ”

【0072】となる。この4ビットの情報は、ビット2
−0がABPP2−0として出力され、ビット3(括弧
の数値)が制御信号COABPPとして制御部1に出力
される。制御部1は制御信号COABPPの値に基づ
き、COABPPが“1”のとき、1バイトのイメージ
データを処理したと判断し、レジスタ21に新たな1バ
イトのイメージデータを入力させる。また、COABP
Pが“0”のときはそのまま処理を続ける。加算器33
の加算結果ABPP2−0は生成部6及びセレクタ31
に送られる。セレクタ31では圧縮処理の場合、処理部
4からのデータを選択するので、ABPP2−0は利用
されない。
Is obtained. This 4-bit information is
−0 is output as ABPP2-0, and bit 3 (the numerical value in parentheses) is output to the control unit 1 as the control signal COABPP. Based on the value of the control signal COABPP, the control unit 1 determines that one-byte image data has been processed when COABPP is “1”, and causes the register 21 to input new one-byte image data. Also, COABP
If P is "0", the process is continued. Adder 33
Is added to the generation unit 6 and the selector 31.
Sent to In the case of the compression process, the selector 31 selects the data from the processing unit 4, and thus the ABPP2-0 is not used.

【0073】さて、ランレングスカウンタは、圧縮処理
開始にあたり、まずセレクタ28は2556(=“10
0111111100”)を選択する。この値はレジス
タ29に設定される。このレジスタ29からのデータR
NLC11−0のうちRNLC11−3は加算器30に
送られる。加算器30では、デコータROM27の解読
結果でDROM4が“1”の場合、RNLC11−3か
らマイナス1する。この値はデータANLC8−0とし
て生成部6及びセレクタ28に送られる。セレクタ28
はANLC8−0とRNLC2−0とから構成されるデ
ータを選択し、レジスタ29に送る。このようにして、
ランレングスカウンタは変化点を検出するまで1バイト
単位でカウントダウンする。
At the start of the compression process, the run-length counter first sets the selector 28 to 2556 (= “10
0111111100 "). This value is set in a register 29. Data R from this register 29
The RNLC 11-3 of the NLC 11-0 is sent to the adder 30. In the adder 30, when the decoding result of the decoder ROM 27 indicates that the DROM 4 is "1", the adder 30 subtracts 1 from the RNLC 11-3. This value is sent to the generator 6 and the selector 28 as data ANLC8-0. Selector 28
Selects data composed of ANLC8-0 and RNLC2-0 and sends it to register 29. In this way,
The run length counter counts down in units of 1 byte until a change point is detected.

【0074】次に図3を参照しながら処理部4について
説明する。参照ラインレジスタ41からプライオリティ
エンコーダ45までのb1 点検出処理の過程は伸長処理
の場合と同様であるので説明を省略する。プライオリテ
ィエンコーダ45の出力データB1DT3−0は反転回
路57を介して加算器58に送られる。反転回路57は
1 点とb1 点の位置の差を加算器58で求めるために
設けられたもので、制御部1から送られる制御信号gと
B1 DT3−0の各ビットとの排他的論理和をとる。圧
縮処理の場合、制御信号gは有効(“1”)とな、B1
DT3−0各ビットは反転される。また、セレクタ53
には解読部2からのデータDROM3−0(データI)
が入力されている。セレクタ53はこのデータDROM
3−0を選択し、加算器58に送る。加算器58では次
式のように演算がなされる。 ADLT3−0 = 反転(B1DT3−0) + D
ROM3−0 +1= 反転(b1 +4−a0 ) +
(a1 −a0 ) +1= a1 − b1 − 4=
δ−4 この加算器58からの出力データADLT3−0のうち
ADLT2−0は生成部6に送られ、垂直モード符号語
生成に使用される。
Next, the processing section 4 will be described with reference to FIG. Omitted because b 1 Point Detection processing process from the reference line register 41 to the priority encoder 45 is similar to that of decompression. Output data B1DT3-0 of the priority encoder 45 is sent to the adder 58 via the inverting circuit 57. Inverting circuit 57 provided in order to determine in adder 58 the difference in the position of one point and b 1 point a, exclusive of the bits of the control signal g and B1 DT3-0 sent from the control unit 1 Perform a logical OR. In the case of the compression processing, the control signal g is valid (“1”),
Each bit of DT3-0 is inverted. Also, the selector 53
Is the data DROM3-0 (data I) from the decryption unit 2.
Is entered. The selector 53 uses the data DROM
3-0 is selected and sent to the adder 58. In the adder 58, an operation is performed as in the following equation. ADLT3-0 = inversion (B1DT3-0) + D
ROM3-0 + 1 = inversion (b 1 + 4-a 0 ) +
(A 1 −a 0 ) + 1 = a 1 −b 1 −4 =
δ-4 Of the output data ADLT3-0 from the adder 58, ADLT2-0 is sent to the generation unit 6 and used for generating a vertical mode codeword.

【0075】また、a0 点の位置を示すレジスタ46か
らのデータRBPA2−0はセレクタ47により選択さ
れ、加算器49に送られる。セレクタ48は解読部2か
らのデータDROM8−6(データR)を選択し、加算
器49に送る。加算器49では次式のように演算がなさ
れる。 A1CM3−0 = RBPA2−0 + DROM8−6 + 1 = a0 + (a1 −a0 −1) + 1 = a1
[0075] Also, data RBPA2-0 from the register 46 indicating the position of a 0 point is selected by the selector 47 and sent to the adder 49. The selector 48 selects the data DROM 8-6 (data R) from the decoding unit 2 and sends it to the adder 49. The adder 49 performs an operation as in the following equation. A1CM3-0 = RBPA2-0 + DROM8-6 + 1 = a 0 + (a 1 -a 0 -1) + 1 = a 1

【0076】この式のように加算器49ではセレクタ4
7からのデータとセレクタ48からのデータとを加算
し、さらにこの結果に1を加える。加算器49の出力デ
ータA1CM3−0は、セレクタ59により選択され、
DBPA2−0としてレジスタ46に設定されると共
に、解読部2に送られる。このように圧縮処理の際は、
処理部4側でa0 点の位置の更新が行われる。また、前
述したように伸長処理では解読部2側でa0 点の位置の
更新が行われる。
As shown in this equation, the adder 49 selects the selector 4
The data from 7 and the data from the selector 48 are added, and 1 is added to the result. The output data A1CM3-0 of the adder 49 is selected by the selector 59,
DBPA2-0 is set in the register 46 and sent to the decoding unit 2. Thus, during the compression process,
Updating position of a 0 point is performed by the processing unit 4 side. As described above, in the decompression process, the position of the point a 0 is updated on the decoding unit 2 side.

【0077】次に図4を参照しながら生成部6について
説明する。60はセレクタであり、解読部2からデータ
ANLC8−0(データJ)とABPP2−0(データ
M)とを入力し、このANLC8−0とABPP2−0
とで構成する12ビットデータをレジスタ61に送る。
レジスタ61に保待されたデータRNLG11−0のう
ち、上位6ビットのデータRNLG11−6は比較器6
2に送られる。
Next, the generator 6 will be described with reference to FIG. Reference numeral 60 denotes a selector, which inputs data ANLC8-0 (data J) and ABPP2-0 (data M) from the decryption unit 2, and outputs the ANLC8-0 and the ABPP2-0.
Is sent to the register 61.
Of the data RNLG 11-0 held in the register 61, the data RNLG 11-6 of the upper 6 bits is the comparator 6
Sent to 2.

【0078】比較器62は1次元圧縮処理に用いられ、
生成すべき符号語がMake-up 符号かTerminate 符号かを
判断するものである。比較器62によりRNLG11−
6は“100111”と比較される。“100111”
は“100111111100”(=2556)の上位
6ビットである。比較器62において一致した場合、Te
rminate 符号の生成を示す。比較器62において一致し
た場合、制御信号dが有効となり、この制御信号dは制
御部1に送られる。制御部1は1次元符号語生成の際、
この制御信号dに基づき、セレクタ65において、RN
LG5−0とRNLG11−6とのどちらを選択するか
を決定する。
The comparator 62 is used for one-dimensional compression processing.
This is to determine whether the codeword to be generated is a Make-up code or a Terminate code. RNLG11−
6 is compared with “100111”. “100111”
Are the upper 6 bits of “100111111100” (= 2556). If they match in the comparator 62, Te
rminate Indicates the generation of a code. When they match in the comparator 62, the control signal d becomes valid, and this control signal d is sent to the control unit 1. When generating the one-dimensional codeword, the control unit 1
Based on this control signal d, the selector 65
It is determined whether to select LG5-0 or RNLG11-6.

【0079】63はセレクタであり、処理部4からのデ
ータADLT2−0(データW)と制御部1からのデー
タEGCD3−0(データY)とが入力される。セレク
タ63は垂直モード符号語生成の場合、“01”ADL
T2−0を選択し、水平モード符号語、パスモード符号
語などの生成の場合、“1”EGCD3−0を選択す
る。セレクタ63により選択されたデータDGCD4−
0はレジスタ64に設定される。EGCD3−0は例え
ば、水平モード符合語生成の場合、“0001”であ
り、パスモード符号語生成の場合、“0010”であ
る。
A selector 63 receives data ADLT2-0 (data W) from the processing unit 4 and data EGCD3-0 (data Y) from the control unit 1. In the case of generating a vertical mode codeword, the selector 63 outputs “01” ADL
When T2-0 is selected and a horizontal mode codeword, a pass mode codeword, or the like is generated, "1" EGCD3-0 is selected. The data DGCD4 selected by the selector 63
0 is set in the register 64. EGCD3-0 is, for example, "0001" for horizontal mode codeword generation, and "0010" for pass mode codeword generation.

【0080】セレクタ65はレジスタ61からのデータ
RNLG11−0とレジスタ64からのデータRGCD
4−0とを入力している。セレクタ65は更に制御部1
からのデータZ(制御信号DBUG)とデータL(制御
信号F2NG)とを入力している。
The selector 65 receives the data RNLG11-0 from the register 61 and the data RGCD from the register 64.
4-0 is input. The selector 65 further includes the control unit 1
, And data L (control signal F2NG) and data Z (control signal DBUG).

【0081】制御信号DBUGは白/黒どちらかの色の
符号語を生成するかを示す信号であり、1次元符合語生
成の際、色を区別するのに使用される。この制御信号D
BUGは白の場合“0”、黒の場合“1”となる。制御
信号F2NGは生成したい符号語が9ビット以上の場
合、エンコーダROM66を2回アクセスする必要があ
り、1回目のアクセスか2回目のアクセスかを区別する
ために設けられたものである。
The control signal DBUG is a signal indicating whether to generate a code word of either white or black, and is used to distinguish colors when a one-dimensional code word is generated. This control signal D
BUG is "0" for white and "1" for black. When the code word to be generated has 9 bits or more, the control signal F2NG needs to access the encoder ROM 66 twice, and is provided for distinguishing between the first access and the second access.

【0082】制御信号F2NGは2回目のアクセスの
際、有効(“1”)となる。制御信号DBUGはセレク
タ65からのアドレスデータERMA8−0のビット8
となり、制御信号F2NGはERMA8−0のビット0
となる。セレクタ65における選択条件は、以下のよう
になる。Terminate 符合語生成の場合、DBUGと
“0”とRNLG5−0とF2NGから構成されるデー
タを選択する。Make-up 符号語生成の場合、DBUGと
“1”とRNLG11−6とF2NGとから構成される
データを選択する。2次元符号語及び特殊符合語生成の
場合、DBUGと“11”とRGCD4−0とF2NG
とから構成されるデータを選択する。
The control signal F2NG becomes valid ("1") at the time of the second access. Control signal DBUG is bit 8 of address data ERMA8-0 from selector 65.
And the control signal F2NG is bit 0 of ERMA8-0.
Becomes The selection conditions in the selector 65 are as follows. In the case of Terminate code word generation, data composed of DBUG, “0”, RNLG5-0, and F2NG is selected. In the case of Make-up codeword generation, data composed of DBUG, "1", RNLG 11-6, and F2NG is selected. In the case of two-dimensional codeword and special codeword generation, DBUG, "11", RGCD4-0 and F2NG
Select the data consisting of

【0083】アドレスデータERMA8−0に対応する
エンコーダROM66からの出力データEROM11−
0は次のような意味をもつ。EROM11は9ビット以
上の一つの符号語生成を2回に分けて生成する場合、1
回目の符号語(第1ワード)生成の際、“0”となる。
このデータEROM11は制御部1に送られる。
Output data EROM11- from encoder ROM 66 corresponding to address data ERMA8-0
0 has the following meaning. When the EROM 11 generates one code word of 9 bits or more by dividing it into two times,
It becomes “0” when the second codeword (first word) is generated.
This data EROM11 is sent to the control unit 1.

【0084】このことにより、制御部1は2回目の符号
語(第2ワード)生成の必要があることを判断し、アド
レスデータERMA8−0の制御信号F2NGを“1”
にセットする。EROM11はエンコーダROM66を
1回アクセスするだけで符号語を生成できる(符号語長
が8ビット以下)場合、及び2回目の符号語(第2ワー
ド)生成の場合、“1”となる。EROM10−8は符
号語長からマイナス1した値を示す。EROM7−0は
符号語を示す。符号語長別のデータEROM11−0を
表8に示す。
Thus, control unit 1 determines that a second codeword (second word) needs to be generated, and sets control signal F2NG of address data ERMA8-0 to "1".
Set to. The EROM 11 is “1” when the codeword can be generated by accessing the encoder ROM 66 only once (the codeword length is 8 bits or less) and when the codeword (second word) is generated for the second time. The EROM 10-8 indicates a value obtained by subtracting -1 from the code word length. EROM7-0 indicates a code word. Table 8 shows data EROM 11-0 for each codeword length.

【0085】[0085]

【表8】 [Table 8]

【0086】表8において“*”印は符号語である。符
号語長が8ビット以下の場合、符号語はEROM7−0
に左詰めした形で出力される。符号語長が9ビット以上
の場合、表のように2回に分けて出力する。例えば符号
語長が10ビットの場合、第1ワードとして符号語の上
位2ビットを出力し、第2ワードとして残りの8ビット
を出力する。
In Table 8, "*" indicates a code word. If the codeword length is 8 bits or less, the codeword is EROM7-0
Is output left justified. If the codeword length is 9 bits or more, the data is output in two parts as shown in the table. For example, when the code word length is 10 bits, the upper 2 bits of the code word are output as the first word, and the remaining 8 bits are output as the second word.

【0087】また、エンコーダROM66に存在しない
アドレスデータERMA8−0が入力された場合(エラ
ーの場合)、EROM11−3を“0000”とする。
制御部1はこのEROM11−8を調べ、エラーか否か
を判断する。
When the address data ERMA8-0 that does not exist in the encoder ROM 66 is input (in the case of an error), the EROM 11-3 is set to "0000".
The control unit 1 checks the EROM 11-8 to determine whether or not an error has occurred.

【0088】このようにして出力されたEROM11−
0のうちEROM7−0はセレクタ70を介してローテ
ートシフタ71に、EROM11−8は加算器69に、
EROM11は制御部1に送られる。
The EROM 11- output as described above
0, the EROM 7-0 is provided to the rotate shifter 71 via the selector 70, the EROM 11-8 is provided to the adder 69,
The EROM 11 is sent to the control unit 1.

【0089】加算器69にはEROM10−8と共にレ
ジスタ68からのデータRBPQ2−0が入力され、加
算器69による演算結果ABPQ2−0は以下のように
なる。 ABPQ2−0 = EROM11−8 + RBPQ2−0 + 1
The data RBPQ2-0 from the register 68 is input to the adder 69 together with the EROM 10-8, and the operation result ABPQ2-0 by the adder 69 is as follows. ABPQ2-0 = EROM11-8 + RBPQ2-0 + 1

【0090】この演算結果ABPQ2−0はセレクタ6
7に送られる。セレクタ67は圧縮処理の場合、このA
BPQ2−0を選択し、レジスタ68に送る。レジスタ
68のデータRBPQ2−0はローテートシフタ71と
セレクタ72に送られる。
The operation result ABPQ2-0 is supplied to selector 6
7 In the case of compression processing, the selector 67
Select BPQ2-0 and send to register 68. Data RBPQ2-0 of register 68 is sent to rotate shifter 71 and selector 72.

【0091】ローテートシフタ71にはセレクタ70に
より選択されたEROM7−0が入力される。ローテー
トシフタ71はEBPQ2−0の示す値だけECDP0
−7を右シフトし、オーバーフローしたデータは左側か
ら入力される。例えば、ECDP0−7が“00001
11**”であり、RBPQ2−0が“011”(=
3)の場合、ECDP0−7は3ビット右シフトされ、
“1**00001”となる。この“1**0000
1”はデータSHTG0−7としてセレクタ72とレジ
スタ73とに送られる。セレクタ72には既に途中まで
生成された符号語EPSL0−7が入力されている。セ
レクタ72はRBPQ2−0の示す値に従い、指示値よ
り左側のデータをEPSL0−7から選択し、指示値を
含む指示値より右側のデータをSHTG0−7から選択
する。例えば、EPSL0−7が“011*****”
であり、SHTG0−7が“1**00001”であ
り、RBPQ2−0が“011”(=3)の場合、セレ
クタ72からの出力データEPCK0−7は“0110
0001”となる。そしてEPCK0−7はレジスタ7
3に送られ、ローテートシフタ71からのデータSHT
G0−7とともに16ビットのデータRODT0−15
を構成する。上記の例では、EPCK0−7が“011
00001”であり、SHTG0−7が“1**000
01”であるので、RODT0−15は“011000
011**00001”となる。
The rotate shifter 71 receives the EROM 7-0 selected by the selector 70. Rotate shifter 71 sets ECDP0 by the value indicated by EBPQ2-0.
-7 is shifted right, and overflow data is input from the left. For example, ECDP0-7 is "00001"
11 ** ", and RBPQ2-0 is" 011 "(=
In case 3), ECDP0-7 are shifted right by 3 bits,
It becomes "1 ** 00001". This "1 ** 0000
1 "is sent to the selector 72 and the register 73 as data SHTG0-7. The selector 72 has already inputted the codeword EPSL0-7 generated halfway. The selector 72 follows the value indicated by RBPQ2-0 Data on the left side of the indicated value is selected from EPSL0-7, and data on the right side of the indicated value including the indicated value is selected from SHTG0-7, for example, EPSL0-7 is "011 ****".
When SHTG0-7 is “1 ** 00001” and RBPQ2-0 is “011” (= 3), the output data EPCK0-7 from the selector 72 is “0110”.
0001 ". EPCK0-7 is the register 7
3 and the data SHT from the rotate shifter 71.
16-bit data RODT0-15 together with G0-7
Is configured. In the above example, EPCK0-7 is "011
00001 ”and SHTG0-7 is“ 1 ** 000
01 ", RODT0-15 is" 011000
011 ** 00001 ".

【0092】RODT0−15のうちRODT0−7と
RODT8−15とはそれぞれセレクタ74に送られ
る。セレクタ74はRODT0−7において、符号語デ
ータ生成が完了している場合、RODT8−15を選択
し、RODT0−7において、符号語データ生成が中途
の場合、RODT0−7を選択する。RODT0−7に
おいて符号語データ生成が完了しているか否かは、加算
器69の加算結果のビット3が“1”となった場合、制
御部1が符号語データ生成の完了を確認する。
[0092] Of the RODTs 0-15, the RODTs 0-7 and 8-15 are sent to the selector 74, respectively. The selector 74 selects RODT8-15 when the codeword data generation is completed in RODT0-7, and selects RODT0-7 when the codeword data generation is in progress in RODT0-7. Whether or not the code word data generation is completed in RODTs 0 to 7 is performed when the bit 3 of the addition result of the adder 69 becomes “1”, and the control unit 1 confirms the completion of the code word data generation.

【0093】制御部1はこれにより、セレクタ74に選
択信号を送る。上記の例では、まず、RBPQ2−0が
“011”(=3)であり、次に解読した結果ECDP
0−7が“000011**”(符合語長=“6”)で
あるので、加算器69の演算結果ABPQ2−0は
“(1)001”(=1)となる。加算結果のビット3
が“1”となったので、セレクタ74はRODT8−1
5を選択する。セレクタ74からのデータEPSL0−
7はセレクタ72に送られ、次に出力されたSHTG0
−7と合成される。このようにして符号語を合成してい
く。レジスタ75はRODT0−7が設定され、ROD
T0−7において符号語データ生成が完了すると、デー
タROUT0−7として外部に出力される。上述してき
たように圧縮処理が進められる。
The control section 1 sends a selection signal to the selector 74. In the above example, first, RBPQ2-0 is “011” (= 3), and the decryption result ECDP
Since 0-7 is “0000011 **” (code word length = “6”), the operation result ABPQ2-0 of the adder 69 is “(1) 001” (= 1). Bit 3 of the addition result
Has become “1”, the selector 74 sets the RODT 8-1.
Select 5. Data EPSL0- from selector 74
7 is sent to the selector 72, and the next output SHTG0
-7 is synthesized. The code words are synthesized in this way. In the register 75, RODT0-7 are set, and
When the codeword data generation is completed at T0-7, it is output to the outside as data ROUT0-7. The compression process proceeds as described above.

【0094】さて、次に処理部4の変化点検出回路44
について図5を参照しながら詳細に説明する。基本的に
は白→黒(0→1)となる変化点を見つけるために、反
転回路43からのデータDREN0−14の各ビットと
このDREN0−14の各ビットを反転して1ビットず
つ右側にシフトした各ビットとの論理積をとった後、更
にラインの終了の処理において、終端点の右側に仮想の
変化点を補うためのデータDNDP0−10との否定和
をとるという構成になっている。この基本構成に更に、
ラインの第1ステップでの処理とランの第1ステップで
の処理に対応するために特別な回路が付加されている。
ラインの第1ステップでの処理とは、ラインの最初の1
バイトの処理のことである。
Next, the change point detecting circuit 44 of the processing unit 4 will be described.
Will be described in detail with reference to FIG. Basically, in order to find a transition point where white → black (0 → 1), each bit of the data DREN0-14 from the inversion circuit 43 and each bit of the DREN0-14 are inverted to the right one bit at a time. After taking the logical product with each shifted bit, in the processing of the end of the line, the negative sum with the data DNDP0-10 for supplementing the virtual change point is provided on the right side of the end point. . In addition to this basic configuration,
Special circuits have been added to accommodate the processing in the first step of the line and the processing in the first step of the run.
The processing in the first step of the line is the first one of the line.
Processing of bytes.

【0095】図6に示すように入力データの与え方によ
ってはバイトの境界がラインの左端に一致しない場合が
ある。そして、a0 点の真上にb1 点がくることがあ
る。このような場合、b1 点が変化点として検出される
ためには、一つ前のビットが“0”になっていなければ
ならない。この処理をするのがDREN2と制御信号
“反転(ラインの第1)”との否定積をとるNANDゲ
ートである。ラインの第1ステップの処理では、制御信
号“反転(ラインの第1)”は“0”となる。従って、
このNANDゲートにより、ラインの第1ステップでの
処理においては、DREN2は必ず“0”として扱われ
る。つまり、DREC3をb1 点として検出できる。
As shown in FIG. 6, the byte boundary may not coincide with the left end of the line depending on how the input data is given. Then, it may b 1 point comes directly above the a 0 point. In such a case, in order to b 1 point is detected as a change point, the previous bit must become "0". This processing is performed by a NAND gate that takes the negative product of DREN2 and the control signal “inversion (first line)”. In the processing of the first step of the line, the control signal “inversion (first of the line)” becomes “0”. Therefore,
With this NAND gate, DREN2 is always treated as "0" in the processing in the first step of the line. In other words, it detects the DREC3 as 1 point b.

【0096】ランの第1ステップでの処理とは、変化点
を検出した後、新たなランの処理に入り、最初の1バイ
トの処理のことである。ランの第1ステップでの処理で
は、図7に示すように、b1 点はa0 点より右側にある
ので、a0 点から左側の変化点が検出されてはならな
い。このような処理をするのが制御信号“反転(ランの
第1)”である。この制御信号“反転(ランの第1)”
はランの第1ステップでの処理では、“0”となる。従
って、この制御信号をDREN0の反転信号とDREN
1との否定積をとるNANDゲートに入力することによ
り、出力データDREC1は必ず“1”となる。同様に
この制御信号をDREN1の反転信号とDREN2との
否定積をとるNANDゲートに入力することにより、出
力データDREC2は必ず“1”となる。
The process in the first step of the run is a process of the first one byte after a change point is detected and a process of a new run is started. The process in the first step of the run, as shown in FIG. 7, since b 1 points to the right from a 0-point, the left change point from a 0-point should not be detected. The control signal "inversion (first of run)" performs such processing. This control signal “inversion (first of run)”
Is "0" in the processing in the first step of the run. Therefore, this control signal is used as an inverted signal of DREN0 and DREN0.
The output data DREC1 always becomes "1" by inputting to the NAND gate which takes the negative product with "1". Similarly, by inputting this control signal to the NAND gate that takes the negative product of the inverted signal of DREN1 and DREN2, the output data DREC2 always becomes "1".

【0097】また、ラインの第1ステップでの処理の場
合、ランの第1ステップでの処理でもある。このような
場合には、DREC3をb1 点として検出しなければな
らない。しかし、ラインの第1ステップでの処理ではな
く、単にラインの第1ステップでの処理の場合には、D
REC3を変化点として検出してはならない。このよう
な処理をするのが制御信号“反転(ラインの第1)”を
反転するNOTゲートと、NOTゲートからの出力と制
御信号反転“反転(ランの第1)”との論理和をとるO
Rゲートとである。ORゲートの出力はDREC3を出
力するNANDゲートに入力される。ラインの第1ステ
ップでの処理であり、かつランの第1ステップでの処理
である場合、ORゲートの出力は“1”となり、DRE
C3をb1 点として検出することができる。一方、ライ
ンの第1ステップでの処理ではなく、単にランの第1ス
テップでの処理の場合には、ORゲートの出力は“0”
となり、DREC3を変化点として検出しない。
In the case of the processing in the first step of the line, it is also the processing in the first step of the run. In such a case, it must be detected DREC3 as 1 point b. However, if the processing is not the processing in the first step of the line but simply the processing in the first step of the line, D
REC3 should not be detected as a change point. Such processing is performed by a NOT gate for inverting the control signal “inversion (first line)” and the logical sum of an output from the NOT gate and the control signal inversion “inversion (first run)”. O
R gate. The output of the OR gate is input to a NAND gate that outputs DREC3. In the case of the processing in the first step of the line and the processing in the first step of the run, the output of the OR gate becomes “1” and the DRE
It is possible to detect the C3 as 1 point b. On the other hand, if the processing is not the processing in the first step of the line but simply the processing in the first step of the run, the output of the OR gate is “0”.
And DREC3 is not detected as a change point.

【0098】データDNDP0−10は、前述したよう
に終端点の1ビット右側に仮想の変化点を補うデータで
あり、通常はDNDP0−10の各ビットは“0”であ
る。ラインの最終のデータを処理する際、データDND
P0−10のうち、終端点の1ビット右側に位置するビ
ットのみが“1”となる。従って、ANDゲートから出
力される各ビットデータとDNDP0−10の各ビット
の否定和をとると、終端点の1ビット右側に仮想の変化
点が補われる。
As described above, the data DNDP0-10 is data for supplementing a virtual change point one bit to the right of the end point. Normally, each bit of the DNDP0-10 is "0". When processing the last data of the line, the data DND
Of P0-10, only the bit located one bit to the right of the terminal point is "1". Therefore, when each bit data output from the AND gate and the respective bits of DNDP0-10 are calculated as a negative sum, a virtual change point is supplemented to the right of the end point by one bit.

【0099】データDREN0−14は、このような回
路を介して、変化点候補が検出される。DREC1−1
4において、変化点候補は“0”となり、それ以外は
“1”となる。変化点候補を示すデータDREC1−1
4はプライオリティエンコーダ45に入力される。プラ
イオリティエンコーダ45はDREC1−14のうち最
も左側に存在する変化点候補を検出し、このビット位置
を示すデータB1DT3−0を出力する。図8は、制御
部1における、図2に示す解読部2中の反転回路23及
び図3に示す処理部4中の反転回路43を制御する回路
を示す図である。図中80は黒ラン処理中を示すフリッ
プフロップであり、このQ出力FBLKP信号は黒ラン
処理中を表わす信号として各部で使われる。
In the data DREN0-14, a change point candidate is detected through such a circuit. DREC1-1
In 4, the change point candidate is “0”, and otherwise, it is “1”. Data DREC1-1 indicating a change point candidate
4 is input to the priority encoder 45. The priority encoder 45 detects a change point candidate existing on the leftmost side of the DREC 1-14, and outputs data B1DT3-0 indicating the bit position. FIG. 8 is a diagram showing a circuit that controls the inverting circuit 23 in the decoding unit 2 shown in FIG. 2 and the inverting circuit 43 in the processing unit 4 shown in FIG. In the figure, reference numeral 80 denotes a flip-flop indicating that black run processing is being performed. The Q output FBLKP signal is used in each unit as a signal indicating that black run processing is being performed.

【0100】フリップフロップ81は、フリップフロッ
プ80と全く同じ構成であり、パスコードへ符号化する
際に、b1 点検出後に反転して、b1 点検出回路をb2
点検出に使えるようにするFBLKCを出力する。AN
Dゲート82は、伸張時には“0”になる信号をkから
入力して、黒ランの圧縮処理中だけ“1”になる信号を
解読部2の反転回路23へ送る。
[0100] flip-flop 81 is the same structure as the flip-flop 80, when encoding the passcode inverts after b 1 out inspections, b 1 point detection circuit b 2
FBLKC to be used for point detection is output. AN
The D gate 82 receives a signal that becomes “0” at the time of decompression from k, and sends a signal that becomes “1” to the inverting circuit 23 of the decoding unit 2 only during the black run compression processing.

【0101】ANDゲート83は、1ラインの処理を終
え、次のラインの処理を始める前に出る信号CSWBF
Aにより、各ラインの左端処理時にフリップフロップ8
0を0にする。
The AND gate 83 outputs a signal CSWBF which is output before finishing the processing of one line and before starting the processing of the next line.
A, the flip-flop 8 at the left end processing of each line.
Set 0 to 0.

【0102】ANDゲート84〜86は、それぞれフリ
ップフロップ80の状態保持、フリップフロップ80へ
FBLKD信号のロード、及びフリップフロップ80の
状態反転を行うために使われる。ANDゲート85によ
るFBLKDからのロードは、伸張時に使われ、圧縮時
にはランの終了時にiに信号を出して状態反転する。
The AND gates 84 to 86 are used for holding the state of the flip-flop 80, loading the FBLKD signal to the flip-flop 80, and inverting the state of the flip-flop 80, respectively. The load from the FBLKD by the AND gate 85 is used at the time of decompression, and at the time of compression, a signal is sent to i at the end of the run to invert the state.

【0103】ANDゲート87は、パスコードへの符号
化の可能性があるとき、b1 点検出時に信号jに応じて
フリップフロップ81をフリップフロップ80と反対の
状態にする。フリップフロップ81の出力aは処理部4
の反転回路43へ送られているので、これにより、b2
点検出が可能になる。図9は、図11のフローチャート
中の破線内の処理に対応する制御部1の状態遷移を示す
図である。
When there is a possibility of encoding into a pass code, the AND gate 87 sets the flip-flop 81 in the opposite state to the flip-flop 80 in response to the signal j when the point b1 is detected. The output a of the flip-flop 81 is the processing unit 4
Because of being sent to the inverting circuit 43, thereby, b 2
Point detection becomes possible. FIG. 9 is a diagram showing a state transition of the control unit 1 corresponding to the processing within the broken line in the flowchart of FIG.

【0104】状態90は、a1 点、b1 点を検出する状
態であり、a1 点,b1 点の何れも見つからなければ、
解読部2のレジスタ(RDTI)21におけるシフト、
及び処理部4のレジスタ(PREF)41におけるシフ
トを行うと共に、遷移条件100が成立して、この状態
90を繰り返す。a1 点,b1 点何れかが検出されれば
状態91へ進む。
The state 90 is a state in which the points a 1 and b 1 are detected. If none of the points a 1 and b 1 is found,
Shift in the register (RDTI) 21 of the decoding unit 2;
Then, the shift in the register (PREF) 41 of the processing unit 4 is performed, and the transition condition 100 is satisfied, and this state 90 is repeated. a 1-point, if any is detected b 1 point goes to state 91.

【0105】状態91は、a1 点,b1 点の相互関係に
基づいて符号化モードを判定する状態であり、まず垂直
モードで符号化できる場合は垂直モード符号生成を指示
して、状態90へ戻る。水平モードで符号化せざるを得
ないことが判明した場合は同様に水平モード符号生成を
指示して状態90へ戻る。パスモードで符号化できる可
能性のある場合には、b1 点の位置を処理部4のレジス
タ(RBPA)46に入れる(これによりb1 点より右
側の変化点を検出対象とする)と共に、図8のフリップ
フロップ81の出力FBLKCを反転するために図8に
示す制御回路11に対してj信号を付勢して、状態92
へ移る。
The state 91 is a state in which the encoding mode is determined based on the correlation between the points a 1 and b 1. First, when the encoding can be performed in the vertical mode, the generation of the vertical mode code is instructed. Return to If it is found that the encoding must be performed in the horizontal mode, the generation of the horizontal mode code is similarly instructed and the process returns to the state 90. If that could be encoded in pass mode places the position of b 1 point in the register (RBPA) 46 of the processing unit 4 with (thereby the right change point detection target than b 1 point), In order to invert the output FBLKC of the flip-flop 81 of FIG. 8, the j signal is applied to the control circuit 11 shown in FIG.
Move to

【0106】状態92は、a1 点,b2 点を検出する状
態でありa1 点,b2 点が見つかるまでこの状態にとど
まり、状態90と同様にデータシフトを繰り返す。この
とき、RBPA46とFBLKCが上述のように更新さ
れているので、処理部4が、b1 点ではなくb2 点を検
出するように働く。
The state 92 is a state in which the points a 1 and b 2 are detected. This state is maintained until the points a 1 and b 2 are found, and the data shift is repeated as in the state 90. At this time, since the RBPA 46 and the FBLKC have been updated as described above, the processing unit 4 operates to detect the point b 2 instead of the point b 1 .

【0107】状態93は、パスモードまたは水平モード
で符号化する状態であり、状態91と似た機能を持つ。
パスモードで符号化した場合は、図8に示す制御回路1
1に対するi信号は出さないようにして、次も同じラン
として処理する。
The state 93 is a state in which encoding is performed in the pass mode or the horizontal mode, and has a function similar to the state 91.
When encoding is performed in the pass mode, the control circuit 1 shown in FIG.
The i-signal for 1 is not output, and the next process is performed as the same run.

【0108】次に、図9を参照しながら制御部1の動作
について説明する。本実施例においても、図11のフロ
ーチャートにおける最初の3ステップと同じように、ラ
イン毎の初期化処理を行い、その後、状態90に移る。
ここでa1 点,b1 点の両方または一方が見つかるま
で、参照ラインのイメージデータと符号化ラインのイメ
ージデータを同時にシフトする。a1 点またはb1 点が
検出されると状態91へ移り、符号化モードの判定を行
う。垂直モード及び水平モードで符号化できる場合に
は、b2 点がどこにあるかに無関係にそれぞれのモード
で符号化することに決定し、生成部サブシーケンサ5へ
指示を出す。
Next, the operation of the control section 1 will be described with reference to FIG. Also in the present embodiment, the initialization process for each line is performed as in the first three steps in the flowchart of FIG.
Here, the image data of the reference line and the image data of the encoding line are simultaneously shifted until both or one of the points a 1 and b 1 is found. When a 1-point or b 1 point is detected moves to state 91, it is determined coding mode. If the encoding can be performed in the vertical mode and the horizontal mode, it is determined that the encoding is performed in each mode regardless of where the point b 2 is, and an instruction is issued to the generation unit subsequencer 5.

【0109】このとき遷移条件102が成立するので次
は再び状態90へ戻る。状態91で垂直モードでも水平
モードでも符号化できないと判明した場合は、制御部1
の図8に示す制御回路11に対しj信号を付勢して、フ
リップフロップ81だけ状態を反転させる。(同時に、
垂直モード、水平モード符号化ができる場合と同様に、
図3中のAB1Aに求められているb1 点のビットアド
レスの下位3ビットをレジスタ46にRBPA2−0と
して入れる。)
At this time, since the transition condition 102 is satisfied, the process returns to the state 90 again. If it is determined in state 91 that encoding cannot be performed in either the vertical mode or the horizontal mode, the control unit 1
8 is energized to the control circuit 11 shown in FIG. 8 and only the flip-flop 81 inverts the state. (at the same time,
As with vertical and horizontal mode encoding,
The lower 3 bits of the bit address of b 1 point sought to AB1A in Figure 3 the register 46 add as RBPA2-0. )

【0110】これにより、次の状態では図3の変化点検
出回路44が、b1 点より右側の逆方向への変化点を検
出するように働くが、それ以外の点では同じ色のランと
して処理し続けることができる。
[0110] Thus, in the next state change point detection circuit 44 of FIG. 3, acts as from b 1 point for detecting a change point in the opposite direction of the right side, but the other points as the run of the same color Processing can be continued.

【0111】次の状態では、状態92において、b2
またはa1 点の検出をする。何れか又は両方の変化点が
検出されれば状態93へ移りパスモードで符号化できる
場合はパスモードとして、それ以外の場合は水平モード
で符号化する。パスモードで符号化する場合は、図8の
i信号は出さないで、次も同じ色のランとして処理する
ようにすると共に、j信号を出して、フリップフロップ
81を再び反転し、次の状態で再びb1 点検出ができる
ようにする。次に状態90へ戻る。
[0111] In the next state, in the state 92, the detection of b 2 points or a 1-point. If either or both of the change points are detected, the process goes to the state 93. If the encoding can be performed in the pass mode, the encoding is performed in the pass mode. Otherwise, the encoding is performed in the horizontal mode. In the case of encoding in the pass mode, the i signal of FIG. 8 is not output, and the next processing is performed as a run of the same color. The j signal is output, the flip-flop 81 is inverted again, and the next state is output. in to be able to b 1 point detection again. Next, the process returns to the state 90.

【0112】水平モードで符号化する場合は、制御回路
11に対しi信号を出して(j信号は出さない)、反対
の色のランの処理ができるようにする。この場合も、フ
リップフロップ81はフリップフロップ80と同じ状態
になることは図8に示す制御回路11から明らかであ
る。
In the case of encoding in the horizontal mode, an i signal is output to the control circuit 11 (j signal is not output) so that a run of an opposite color can be processed. In this case as well, it is clear from the control circuit 11 shown in FIG. 8 that the flip-flop 81 is in the same state as the flip-flop 80.

【0113】このようして、b2 点検出回路を持たずb
1 点検出回路だけであっても、図8に示す制御回路11
を設け、図9に示すような手順で処理することにより、
コードデータの大部分を占める垂直モード符号によって
符号化できるようになる。この際、垂直モード符号化が
できなくてb1 点が検出されている場合にだけ、改めて
2 点検出をするので、b2 点検出のために余分のマシ
ンサイクルを必要としても、全体として符号化処理を高
速に行なうことができる。
[0113] b not have this to, b 2-point detection circuit
The control circuit 11 shown in FIG.
And processing by the procedure shown in FIG.
It can be encoded by a vertical mode code that occupies most of the code data. At this time, only if b 1 point and not be vertical mode coding is detected, since the newly b 2 point detection, even require extra machine cycles for b 2-point detection, as a whole The encoding process can be performed at high speed.

【0114】なお、前記実施例においては、図1に示す
ように、処理部4と生成部6が分かれていて、パイプラ
イン型の並行処理を行なっている。そのため、制御部1
は、生成部サブシーケンサ5に符号生成を指示してい
る。しかし、本発明は処理部4と生成部6が一体となっ
た符号化復号器(コーデック)にも適用することができ
る。その場合は制御部1が符号を「生成」することにな
る。
In the above embodiment, as shown in FIG. 1, the processing unit 4 and the generation unit 6 are separated, and perform a pipeline type parallel processing. Therefore, the control unit 1
Instructs the generation unit sub-sequencer 5 to generate a code. However, the present invention can also be applied to an encoder / decoder (codec) in which the processing unit 4 and the generation unit 6 are integrated. In that case, the control unit 1 “generates” the code.

【0115】また、図8に示すように、二つのフリップ
フロップ80,81で二つの反転回路23,43を個別
に制御しているが、図10のようにフリップフロップ8
1の代わりにEXOR回路121を用いることも考えら
れる。この場合、信号用としては、図9の状態105と
状態106でONとなり、他の状態ではOFFとなる信
号を用いればよい。
As shown in FIG. 8, the two inverting circuits 23 and 43 are individually controlled by the two flip-flops 80 and 81. However, as shown in FIG.
It is also conceivable to use the EXOR circuit 121 instead of 1. In this case, a signal that is turned on in the states 105 and 106 in FIG. 9 and turned off in other states may be used as a signal.

【0116】[0116]

【発明の効果】以上詳記したように本発明によれば、圧
縮処理においてb1 点を検出するb1点検出回路をb2
点検出にも用いるのでb2 点検出回路を不要にすること
ができる。また、垂直文字または水平モードを優先して
圧縮処理が行われるので、不要なパスコードによる圧縮
を避けることができ、データ圧縮率を高めることができ
る。
As described above in detail, according to the present invention, the b 1 point detecting circuit for detecting the b 1 point in the compression processing is b 2
Since it is also used for point detection, the b 2 point detection circuit can be eliminated. Further, since the compression processing is performed with priority given to the vertical character or horizontal mode, it is possible to avoid compression by unnecessary passcodes and to increase the data compression ratio.

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

【図1】本発明の一実施例に係わる2値データ圧縮伸長
処理装置の全体構成を示すブロック図。
FIG. 1 is a block diagram showing an overall configuration of a binary data compression / decompression processing device according to an embodiment of the present invention.

【図2】図1中に示した解読部2の構成を詳細に示す回
路図。
FIG. 2 is a circuit diagram showing in detail a configuration of a decoding unit 2 shown in FIG. 1;

【図3】図1中に示す処理部4の構成を詳細に示す回路
図。
FIG. 3 is a circuit diagram showing a configuration of a processing unit 4 shown in FIG. 1 in detail.

【図4】図1中に示す生成部6の構成を詳細に示す回路
図。
FIG. 4 is a circuit diagram showing a configuration of a generation unit 6 shown in FIG. 1 in detail.

【図5】図3に示した変化点検出回路44の構成を詳細
に示す回路図。
FIG. 5 is a circuit diagram showing in detail a configuration of a change point detection circuit 44 shown in FIG. 3;

【図6】ラインの第1ステップの処理におけるイメージ
データの一例を示す図。
FIG. 6 is a diagram showing an example of image data in a process of a first step of a line.

【図7】ランの第1ステップの処理におけるイメージデ
ータの一例を示す図。
FIG. 7 is a view showing an example of image data in a process of a first step of a run.

【図8】反転回路23,43の制御を行なう制御回路1
1の構成を詳細に示す回路図。
FIG. 8 is a control circuit 1 for controlling the inverting circuits 23 and 43.
1 is a circuit diagram showing the configuration of FIG.

【図9】制御部1の状態遷移を示す図。FIG. 9 is a diagram showing a state transition of the control unit 1.

【図10】反転回路23,43の制御を行なう制御回路
11の他の構成を詳細に示す回路図。
FIG. 10 is a circuit diagram showing in detail another configuration of the control circuit 11 for controlling the inverting circuits 23 and 43.

【図11】CCITT勧告の圧縮処理の手順を示すフロ
ーチャート。
FIG. 11 is a flowchart showing the procedure of a compression process according to the CCITT recommendation.

【図12】図11に示すフローチャートに従う符号化の
例を示す図。
FIG. 12 is a diagram showing an example of encoding according to the flowchart shown in FIG. 11;

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

1…制御部、2…解読部、3…解読部サブシーケンサ、
4…処理部、5…生成部サブシーケンサ、6…生成部、
7…バッファ部、8…参照ラインイメージバッファメモ
リ、9…入力バス、10…出力バス、11…制御回路、
21…レジスタ(RDTI)、22…バレルシフタ、2
3,43,57…反転回路、24…マスク生成回路、2
5…レジスタ(RPAT)、26,28,31,47,
48,53,54,59,63,65,67,70,7
2,74…セレクタ、27…デコーダROM(DRO
M)、29…レジスタ(RNLC)、30,33,4
9,52,56,58,69…加算器、32…レジスタ
(RBPP)、34,62…比較器、41…レジスタ
(PREF)、42…バレルシフタ、44…変化点検出
回路、45…プライオリティエンコーダ、46…レジス
タ(RBPA)、61…レジスタ(RNLG)、64…
レジスタ(RGCD)、66…エンコーダROM(ER
OM)、68…レジスタ(RBPQ)、71…ローテー
ドシフタ、73…レジスタ(RODT)、80,81…
フリップフロップ、82〜87…ANDゲート回路、1
20…インバータ回路、121…EXOR回路。
DESCRIPTION OF SYMBOLS 1 ... Control part, 2 ... Decoding part, 3 ... Decoding part Subsequencer,
4 processing unit, 5 generation unit sub-sequencer, 6 generation unit,
7 buffer unit, 8 reference line image buffer memory, 9 input bus, 10 output bus, 11 control circuit,
21: register (RDTI), 22: barrel shifter, 2
3, 43, 57: inversion circuit, 24: mask generation circuit, 2
5. Register (RPAT), 26, 28, 31, 47,
48, 53, 54, 59, 63, 65, 67, 70, 7
2, 74 ... selector, 27 ... decoder ROM (DRO
M), 29 ... Register (RNLC), 30, 33, 4
9, 52, 56, 58, 69 ... adder, 32 ... register (RBPP), 34, 62 ... comparator, 41 ... register (PREF), 42 ... barrel shifter, 44 ... change point detection circuit, 45 ... priority encoder, 46: register (RBPA), 61: register (RNLG), 64:
Register (RGCD), 66 ... Encoder ROM (ER
OM), 68: register (RBPQ), 71: rotated shifter, 73: register (RODT), 80, 81 ...
Flip-flops, 82 to 87 ... AND gate circuit, 1
20: an inverter circuit; 121: an EXOR circuit.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 H03M 7/30 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/41-1/419 H03M 7/30

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 垂直モード符号、パスモード符号、及び
水平モード符号を扱う2次元符号化方式によって2値イ
メージの圧縮を行なう2値イメージ圧縮処理装置におい
て、 圧縮の対象となる符号化ラインのイメージ中から所定の
色変化点を検出する第1変化点検出手段と、 前記符号化ラインに対応する参照ラインのイメージ中か
ら所定の色変化点を検出する第2変化点検出手段と、 前記第1の変化点検出手段が検出対象とする色変化の方
向を制御する第1制御手段と、 前記第2の変化点検出手段が検出対象とする色変化の方
向を制御する第2制御手段と、 を具備し、 前記第1,第2変化点検出手段の少なくとも一方で変化
点が検出された場合に、前記符号化ラインの変化点と参
照ラインの変化点との相対位置関係が|(符号化ライン
の変化点)×(参照ラインの変化点)|≦3の条件を満
たす場合に垂直モード、前記条件を満たさない場合水平
モードの符号の生成が可能であると判定し、垂直モード
又は水平モードの符号を生成する第1のステップと、 前記第1のステップで符号を生成できなかった場合に、
前記第1制御手段の状態を前記第1ステップと同じ状
態に保ち、前記第2制御手段の状態を前記第1ステッ
プと逆の状態にして変化点検出を行ない、変化点が検出
された場合には、パスモードまたは水平モードの符号を
生成する第2のステップと、 に従って圧縮処理を行なうことを特徴とする2値イメー
圧縮処理装置
1. A binary image compression processing apparatus for compressing a binary image by a two-dimensional encoding method that handles a vertical mode code, a pass mode code, and a horizontal mode code, wherein an image of an encoding line to be compressed is provided. First change point detection means for detecting a predetermined color change point from the inside; second change point detection means for detecting a predetermined color change point from an image of a reference line corresponding to the encoding line; A first control means for controlling a direction of a color change to be detected by the change point detecting means of the first and second control means for controlling a direction of a color change to be detected by the second change point detecting means; When a change point is detected by at least one of the first and second change point detection means, the relative positional relationship between the change point of the coding line and the change point of the reference line is | (coding line
Change point) × (reference line change point) | ≦ 3
Vertical mode when added, horizontal when the above conditions are not met
A first step of generating a code in a vertical mode or a horizontal mode, and determining that generation of a code in a mode is possible, and when the code cannot be generated in the first step,
Wherein the state of the first control means maintaining the same state as the first step, the state of the second control means performs the first step <br/> flop opposite state to change point detection, change 2. A binary image compression processing apparatus , wherein when a point is detected, a compression process is performed in accordance with a second step of generating a pass mode or horizontal mode code.
JP04256297A 1992-09-25 1992-09-25 Binary image compression processor Expired - Fee Related JP3115117B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04256297A JP3115117B2 (en) 1992-09-25 1992-09-25 Binary image compression processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04256297A JP3115117B2 (en) 1992-09-25 1992-09-25 Binary image compression processor

Publications (2)

Publication Number Publication Date
JPH06113149A JPH06113149A (en) 1994-04-22
JP3115117B2 true JP3115117B2 (en) 2000-12-04

Family

ID=17290705

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04256297A Expired - Fee Related JP3115117B2 (en) 1992-09-25 1992-09-25 Binary image compression processor

Country Status (1)

Country Link
JP (1) JP3115117B2 (en)

Also Published As

Publication number Publication date
JPH06113149A (en) 1994-04-22

Similar Documents

Publication Publication Date Title
KR900001821B1 (en) Processor for compressing and expanding binary data
US5032838A (en) Variable length code parallel decoding apparatus and method
US4486784A (en) Image compression systems
JPH08162970A (en) Decoder and method therefor
JPH07177039A (en) Huffman encoder/decoder
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP3115117B2 (en) Binary image compression processor
JP3459759B2 (en) Arithmetic decoding device
JP3184670B2 (en) Image coding device
JPH01183733A (en) Code converting circuit
JP2003198858A (en) Encoder and decoder
JP2614927B2 (en) Image decoding processing method
JP2891818B2 (en) Encoding device
JP2002064715A (en) Data processing unit and its method
JP3223118B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
JP3232533B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
JP3247052B2 (en) Image data conversion processing method and apparatus
US5724275A (en) Fast multi-operand bit pattern detection method and circuit
JP2000278538A (en) Device and method for arithmetic encoding/decoding
JPS63276973A (en) Compression expanding processor
JP3219571B2 (en) Image coding apparatus and method
JPH05341955A (en) Data compression and restoration system
JP2833743B2 (en) MH code decoder
JP3342380B2 (en) Encoding and decoding apparatus and image processing apparatus to which the same is applied
JPH0435777B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees
RD07 Notification of extinguishment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D07