JP3029863B2 - Compressed data decoding device - Google Patents

Compressed data decoding device

Info

Publication number
JP3029863B2
JP3029863B2 JP2317977A JP31797790A JP3029863B2 JP 3029863 B2 JP3029863 B2 JP 3029863B2 JP 2317977 A JP2317977 A JP 2317977A JP 31797790 A JP31797790 A JP 31797790A JP 3029863 B2 JP3029863 B2 JP 3029863B2
Authority
JP
Japan
Prior art keywords
code
data
bits
length
word
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 - Lifetime
Application number
JP2317977A
Other languages
Japanese (ja)
Other versions
JPH04192675A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2317977A priority Critical patent/JP3029863B2/en
Publication of JPH04192675A publication Critical patent/JPH04192675A/en
Application granted granted Critical
Publication of JP3029863B2 publication Critical patent/JP3029863B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、一定の符号化によりデータ圧縮された符号
系列を復号化する圧縮データの復号化装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device for decoding compressed data, which decodes a code sequence that has been data-compressed by constant coding.

[従来の技術] ファクシミリ装置や画像電子ファイリング装置などに
おいて、原稿から読み取った画情報を符号化によりデー
タ圧縮することがよく行なわれている。
[Related Art] In a facsimile apparatus, an electronic image filing apparatus, and the like, it is common to compress image data read from a document by encoding.

一般に、このような装置で、データ圧縮された符号化
データから元の画情報を再生する場合、例えば、特開昭
62−149269号公報に見られるように、ROM内に各符号を
格納した符号テーブルを形成し、符号化データの符号列
とROM内の各符号とを照合するようにしている。
In general, when reproducing the original image information from the coded data which has been compressed by such a device, for example, a method disclosed in
As seen in Japanese Patent Application Laid-Open No. 62-149269, a code table in which each code is stored in a ROM is formed, and a code string of encoded data is compared with each code in the ROM.

ところで、近年、このような復号化処理を行なう1チ
ップ化されたLSIが開発され、よく利用されている。
By the way, in recent years, a one-chip LSI for performing such a decoding process has been developed and widely used.

LSIに上記のような符号テーブルを形成する場合、チ
ップサイズは、符号テーブルのデータ量に応じて増大す
る。また、チップサイズの増大に応じてコストが大幅に
上昇する。特に、ゲートアレイ方式で行列構成のメモリ
を形成する場合には、メモリ専用のICに対して非常に大
きいチップエリアが必要であるため、テーブルのデータ
量はコストに大きく影響する。さらに、チップスペース
が少ない場合には、LSI化が困難になることもあり得
る。
When the above-described code table is formed in the LSI, the chip size increases according to the data amount of the code table. In addition, the cost increases significantly as the chip size increases. In particular, when a matrix-structured memory is formed by a gate array method, a very large chip area is required for an IC dedicated to the memory, and the amount of data in the table greatly affects the cost. Furthermore, if the chip space is small, it may be difficult to implement LSI.

前記公報は、MH(Modified Hoffman)符号により復号
化を行なうもので、ターミネーティング符号とメイクア
ップ符号の符号種別ごとに、符号テーブルを使い分ける
ことにより、符号テーブルのデータ量を減少させるよう
にしている。
The publication discloses that decoding is performed using an MH (Modified Hoffman) code, and the data amount of the code table is reduced by selectively using a code table for each code type of a terminating code and a makeup code. .

しかしながら、この提案のものにおいても、符号テー
ブルのデータ量は、上記2種類のコードを合計すると31
87ビットと大きくなっていた。
However, even in the case of this proposal, the data amount of the code table is 31
It was as large as 87 bits.

ところで、MH符号の符号化データは、メイクアップ符
号とターミネーティング符号とが交互に配列していると
は限らず、符号の生起順序は不定である。
By the way, in the encoded data of the MH code, the makeup code and the terminating code are not always arranged alternately, and the order in which the codes occur is undefined.

このため、従来は、符号化データの1つ符号を復号化
する場合、例えば、まず各種ターミネーティング符号に
一致するものがあるかどうか判定し、一致したものがな
けば、次に各種メイクアップ符号について判定するとい
うように、2段階の手順で処理していた。このため、符
号化処理に時間がかかっていた。
For this reason, conventionally, when decoding one code of the encoded data, for example, it is first determined whether or not there is a code that matches the various terminating codes. Is determined in a two-stage procedure. For this reason, the encoding process took time.

[発明が解決しようとする課題] 以上のように、従来は、ROMに形成する符号テーブル
のデータ量が大きくなると共に、復号化処理に時間がか
かるという問題があった。
[Problems to be Solved by the Invention] As described above, conventionally, there has been a problem that the data amount of the code table formed in the ROM becomes large and the decoding process takes a long time.

本発明は、上記の問題を改善し、符号テーブルのデー
タ量を減少させると共に、復号化処理を高速化した圧縮
データの復号化装置を提供することを目的とする。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a decoding apparatus for compressed data in which the above problem is solved, the amount of data in a code table is reduced, and the decoding process is accelerated.

[課題を解決するための手段] このために、本願の第1の発明は、MH符号のように、
各符号のビット長が不定であり、そのビット長が一定ビ
ット数を超過する場合には、その超過分の全ビットが同
一データとなる符号の場合において、上記一定ビット数
未満の符号データと符号のビット長を示す符号長データ
とにより1ワードを構成したワードデータを符号テーブ
ルに格納し、復号化の際には、その符号テーブルのワー
ドデータを1ワードずつ順次読み出して、符号データと
符号長データとにより各符号を発生し、発生した符号
と、入力される符号系列とを比較して一致した場合に、
対応する各種パターンの生データを再生するようにした
ものである。
[Means for Solving the Problems] For this purpose, the first invention of the present application uses, as in the MH code,
If the bit length of each code is indefinite and the bit length exceeds a certain number of bits, the code data with the number of bits less than the above-mentioned certain number of bits is used in the case of a code in which all bits of the excess are the same data. Is stored in the code table. When decoding, the word data of the code table is read out one word at a time, and the code data and the code length are read. Each code is generated according to the data, and the generated code is compared with the input code sequence, and when they match,
It reproduces raw data of various corresponding patterns.

また、第2の発明は、MH符号の場合に、各種ターミネ
ーティング符号と各種メイクアップ符号を同時にそれぞ
れ1つずつ発生し、発生した各符号と、入力される符号
系列と同時比較して、一致した場合に、その符号に対応
する元の生データを再生するようにしている。
Further, in the second invention, in the case of the MH code, various terminating codes and various make-up codes are generated one by one at the same time, and the generated codes are simultaneously compared with the input code sequence to determine the coincidence. In this case, the original raw data corresponding to the code is reproduced.

[作用] 第1の発明によれば、符号テーブルの1ワードあたり
の必要ビット数が減少し、符号テーブル全体のデータ量
を削減することができる。
[Operation] According to the first aspect, the required number of bits per word of the code table is reduced, and the data amount of the entire code table can be reduced.

また、第2の発明では、入力された符号系列に対し
て、同時にターミネーティング符号とメイクアップ符号
についてチェックするので、1つの符号を迅速に判別す
ることができる。これにより、復号化処理が高速化され
る。
In the second invention, the input code sequence is checked for the terminating code and the makeup code at the same time, so that one code can be determined quickly. This speeds up the decoding process.

[実施例] 以下、添付図面を参照しながら、本発明の実施例を詳
細に説明する。
Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

第1図は、本発明の一実施例に係る圧縮データの復号
化装置のブロック構成図を示したものである。図におい
て、シフトレジスタ1は、シリアル信号で入力されるMH
符号のデータを13ビットのパラレル信号に変換するもの
である。
FIG. 1 is a block diagram of a compressed data decoding apparatus according to an embodiment of the present invention. In the figure, a shift register 1 is an MH input by a serial signal.
The code data is converted into a 13-bit parallel signal.

ターミネーティング符号検出回路2及びメイクアップ
符号検出回路3は、シフトレジスタ1の出力信号から各
符号を検出し、1つの符号を検出すると各符号別に特定
の計数値を出力するものである。
The terminating code detection circuit 2 and the makeup code detection circuit 3 detect each code from the output signal of the shift register 1, and when detecting one code, output a specific count value for each code.

レジスタ4は、ターミネーティング符号検出回路2及
びメイクアップ符号検出回路3からの計数値をセットす
るものである。画素データ発生回路5は、白または黒の
画素データを、上記セットされた計数値の画素数分だけ
出力するものである。制御部6は、上記各部を監視・制
御するものである。
The register 4 sets the count value from the terminating code detection circuit 2 and the makeup code detection circuit 3. The pixel data generating circuit 5 outputs white or black pixel data for the number of pixels of the set count value. The control section 6 monitors and controls the above sections.

ターミネーティング符号検出回路2内おいて、カウン
タ21は、6ビットの2進カウンタであり、その出力は、
レジスタ4と、符号テーブルROM22とに入力されてい
る。
In the terminating code detection circuit 2, the counter 21 is a 6-bit binary counter, and its output is
It is input to the register 4 and the code table ROM22.

符号テーブルROM22には、第2図に示すような各種ワ
ードデータが格納されている。これらのワードデータ
は、各種ターミネーティング符号を生成するためのもの
で、白と黒の色別にラン長0〜63まで64ワードずつ格納
されている。また、1ワードは、8ビット以下の符号デ
ータと4ビットの符号長データとで構成されている。
The code table ROM 22 stores various word data as shown in FIG. These word data are used to generate various terminating codes, and are stored in 64 words each of run lengths 0 to 63 for each color of white and black. One word is composed of code data of 8 bits or less and code length data of 4 bits.

符号テーブルROM22から読み出される符号データは、
バレルシフタ23に入力され、符号長データは、シフト量
デコーダ24に入力されている。
The code data read from the code table ROM 22 is:
The code length data input to the barrel shifter 23 is input to the shift amount decoder 24.

シフト量デゴーダ24は、上記4ビットの符号長データ
6ビットのシフト量信号に変換するものである。
The shift amount degoder 24 converts the 4-bit code length data into a 6-bit shift amount signal.

第3図は、このシフト量デコーダ24の回路を示したも
のである。図において、符号データの第1ビットb1は、
インバータI1と、アンド回路A1,A2,A3にそれぞれ入力さ
れている。そのインバータI1の出力は、アンド回路A4,A
5にそれぞれ入力されている。
FIG. 3 shows a circuit of the shift amount decoder 24. In the figure, the first bit b 1 of the code data is
An inverter I 1, are inputted to the AND circuit A 1, A 2, A 3 . The outputs of the inverter I 1 are AND circuits A 4 and A
Entered in 5 respectively.

符号データの第2ビットb2は、インバータI2と、アン
ド回路A1,A3,A4にそれぞれ入力され、インバータI2の出
力は、アンド回路A2,A5にそれぞれ入力されている。
The second bit b 2 of the code data includes an inverter I 2, are input to the AND circuit A 1, A 3, A 4 , the output of the inverter I 2 are respectively inputted to the AND circuit A 2, A 5 .

符号データの第3ビットb3は、インバータI3と、アン
ド回路A1,A2,A4,A5にそれぞれ入力され、インバータI3
の出力は、アンド回路A3に入力されている。
Third bit b 3 of the code data includes an inverter I 3, are inputted to the AND circuit A 1, A 2, A 4 , A 5, an inverter I 3
The output of is inputted to the AND circuit A 3.

また、第4ビットb3は、第5ビットのシフト量信号S5
として出力されると共に、インバータI4を介して、アン
ド回路A1〜A4にそれぞれ入力されている。そして、アン
ド回路A3,A5,A2,A4,A1の各出力が、その順序で各シフト
信号S0〜S4として出力されている。
The fourth bit b 3 is a shift amount signal S 5 of the fifth bit.
It is outputted as, through an inverter I 4, are inputted respectively to the AND circuits A 1 to A 4. The outputs of the AND circuits A 3 , A 5 , A 2 , A 4 , and A 1 are output as shift signals S 0 to S 4 in that order.

バレルシフタ23は、符号テーブルROM22から入力され
る符号データのビット位置をシフトして13ビットの信号
として出力するものである。
The barrel shifter 23 shifts the bit position of the code data input from the code table ROM 22 and outputs it as a 13-bit signal.

第4図は、このバレルシフタ23の回路を示したもので
ある。図において、バレルシフタ23内には、シフト信号
S0〜S5により開閉制御される6組のゲート回路G1〜G6
配設されている。ゲート回路G1〜G6のそれぞれには、入
力された符号データの各ビットbiを出力信号の各ビット
bj側に出力するトライステートバッファBが配設されて
いる。そのバッファBは、各シフト信号Skにより開閉制
御されるようになっている。
FIG. 4 shows a circuit of the barrel shifter 23. In the figure, a shift signal is provided in the barrel shifter 23.
S 0 6 sets of gate circuits G 1 ~G 6 that is opened and closed controlled by to S 5 are disposed. In each of the gate circuits G 1 to G 6 , each bit b i of the input code data is
b A tri-state buffer B for outputting to the j side is provided. The buffer B is adapted to be opened and closed controlled by the shift signal S k.

ゲート回路G1は、入力された符号データの各ビットb1
〜b8を、出力信号のビットb1〜b8に出力するように配置
している。ゲート回路G2は、符号データの各ビットb1
b8を、上記に対して1ビットずれた出力信号のビットb2
〜b9に出力するように配置している。同様に、ゲート回
路G3〜G6は、上記符号データを1ビットずつずれた出力
信号側にそれぞれ出力するように配置している。
The gate circuit G 1, each bit b 1 of the input code data
The ~b 8, are arranged to output to the bit b 1 ~b 8 output signals. The gate circuit G 2 is, each bit b 1 ~ code data
b 8 is replaced by bit b 2 of the output signal which is shifted by one bit from the above.
It is arranged so as to output the ~b 9. Similarly, the gate circuit G 3 ~G 6 is arranged to output to the output signal side offset the code data bit by bit.

上記符号テーブルROM22,シフト量デコーダ24及びバレ
ルシフタ23は、各種MH符号を順次1つずつ発生する符号
発生手段を構成している。
The code table ROM 22, shift amount decoder 24, and barrel shifter 23 constitute code generation means for sequentially generating various MH codes one by one.

比較器25は、バレルシフタ24の出力信号とシフトレジ
スタ1の出力信号とを比較するものである。
The comparator 25 compares the output signal of the barrel shifter 24 with the output signal of the shift register 1.

第5図は、この比較器25の回路を示したものである。
図において、排他的論理和回路E01〜E13には、シフトレ
ジスタ1側とシフト量デコーダ24側の出力信号の各ビッ
トbiが1対1でそれぞれ入力されている。
FIG. 5 shows the circuit of the comparator 25.
In the figure, to the exclusive OR circuit E 01 to E 13, each bit b i of the output signals of the shift register 1 side and the shift amount decoder 24 side are respectively inputted in a one-to-one.

オア回路O01は、排他的論理和回路E01と排他的論理和
回路E02の出力とを入力し、オア回路O02は、そのオア回
路O01の出力と排他的論理和回路E03の出力とを入力して
いる。以下同様に、オア回路O03〜O12は、それぞれ前段
のオア回路の出力と対応する排他的論理和回路の出力と
が入力されている。
OR circuit O 01 inputs the output of the exclusive OR circuit E 01 and exclusive OR circuits E 02, the OR circuit O 02 is the exclusive OR circuit E 03 and the output of the OR circuit O 01 Output and input. Similarly, to the OR circuits O 03 to O 12 , the output of the preceding OR circuit and the output of the corresponding exclusive OR circuit are input.

マルチプレクサMは、排他的論理和回路E01の出力
と、オア回路O01〜O12の各出力を入力し、符号テーブル
ROM22からの符号長データにより、それらの出力の1つ
を選択するものである。
Multiplexer M inputs and outputs of the exclusive OR circuit E 01, the outputs of the OR circuit O 01 ~ O 12, code table
According to the code length data from the ROM 22, one of these outputs is selected.

メイクアップ符号検出回路3は、一部を除いて、ター
ミネーティング符号検出回路2と同一構成である。異な
る点は、第6図に示すように、カウンタ21と符号テーブ
ルROM22との間に、テーブルアドレス補正回路26が配設
されている点と、符号テーブルROM22内のワードデータ
である。
The makeup code detection circuit 3 has the same configuration as the terminating code detection circuit 2 except for a part. The difference is that a table address correction circuit 26 is provided between the counter 21 and the code table ROM 22, as shown in FIG. 6, and the word data in the code table ROM 22.

第7図は、その符号テーブルROM22のワードデータを
示している。これらのワードデータは、各種メイクアッ
プ符号を生成するためのもので、白と黒の色別にラン長
64から64のステップで1728まで、27ワードずつ格納され
ている。また、白黒共通にラン長1792から2560まで13ワ
ード格納されている。
FIG. 7 shows the word data of the code table ROM22. These word data are used to generate various make-up codes.
27 words are stored from 1 to 1728 in 64 to 64 steps. In addition, 13 words of run length 1792 to 2560 are stored in common for black and white.

なお、ラン長1728までは、A4幅までの標準メイクアッ
プ符号に対応し、ラン長1792以上は、A4幅を越える拡張
メイクアップ符号に対応している。
Note that a run length up to 1728 corresponds to a standard makeup code up to A4 width, and a run length 1792 or more corresponds to an extended makeup code exceeding A4 width.

以上構成で、本実施例の復号化装置が動作を実行する
場合、図示せぬ他の装置からMH符号のデータがシリアル
信号で順次入力される。
With the above configuration, when the decoding device of the present embodiment performs an operation, MH code data is sequentially input as a serial signal from another device (not shown).

MH符号のデータが入力されると、制御部6は、第8図
に示すように、まず再生する画素が白か黒かを符号テー
ブルROM22と画素データ発生回路5に指定する。この指
定は、今の処理開始時は白とする。また、後述するよう
に画素データを再生した後は、1つ1つの画素データを
再生するごとに白と黒とを交互に指定することになる
(処理101)。
When the data of the MH code is input, the control unit 6 first specifies to the code table ROM 22 and the pixel data generation circuit 5 whether the pixel to be reproduced is white or black, as shown in FIG. This designation is white at the start of the current processing. After the pixel data is reproduced, as will be described later, white and black are alternately designated each time the pixel data is reproduced (process 101).

次いで、ターミネーティング符号検出回路2とメイク
アップ符号検出回路3内のカウンタ21、及びレジスタ4
をそれぞれリセットする(処理102)。そして、入力さ
れたMH符号のデータをシフトレジスタ1に13ビット分読
み込む(処理103)。
Next, the counter 21 in the terminating code detection circuit 2 and the makeup code detection circuit 3 and the register 4
Are reset (process 102). Then, the input MH code data is read into the shift register 1 for 13 bits (process 103).

この後、制御部6は、ターミネーティング符号検出回
路2とメイクアップ符号検出回路3の比較器25から出力
されるターミネーティング符号検知信号DTと、メイクア
ップ符号検知信号DMとをチェックする(処理104)。
Thereafter, the control unit 6 checks the terminating code detection signal D T and the makeup code detection signal D M output from the comparator 25 of the terminating code detection circuit 2 and the makeup code detection circuit 3 ( Process 104).

このとき、ターミネーティング符号検出回路2の符号
テーブルROM22は、上記指定された各ワードデータの
内、カウンタ21で指定されたテーブルアドレスの1つの
ワードデータを出力する。
At this time, the code table ROM 22 of the terminating code detection circuit 2 outputs one word data of the table address specified by the counter 21 among the respective specified word data.

一方、メイクアップ符号検出回路3側では、テーブル
アドレス補正回路26は、カウンタ21が、「1」〜「27」
を指示しているときは、その計数値はそのまま符号テー
ブルROM22にテーブルアドレスとして出力する。また、
カウンタが「28」以上を指示しているときは、第7図に
示す白黒共通のワードデータが格納されているテーブル
アドレスを指示する。これにより、符号テーブルROM22
は、その対応するワードデータを出力する。
On the other hand, on the makeup code detection circuit 3 side, the table address correction circuit 26 determines that the counter 21 has “1” to “27”.
Is output as the table address to the code table ROM 22 as it is. Also,
When the counter indicates "28" or more, it indicates the table address where the black and white common word data shown in FIG. 7 is stored. Thereby, the code table ROM22
Outputs the corresponding word data.

ところで、MH符号は、CCITTによりコード表が提示さ
れている。各符号は、2〜13ビットのビット長であり、
コード表における左側を上位ビットとすると、上位ビッ
ト側から1ビットずつ伝送されるようになっている。
By the way, the code table of the MH code is presented by CCITT. Each code has a bit length of 2 to 13 bits,
Assuming that the left side of the code table is the upper bits, the upper bits are transmitted one bit at a time.

そのコード表から明らかなように、各符号の内、ビッ
ト長が8ビットを越えるものは、下位ビット側から数え
て9ビット目以上の上位ビットは全て“0"になってい
る。
As is clear from the code table, among the codes, those having a bit length exceeding 8 bits have all the higher bits of the ninth and higher bits counted from the lower bit side become "0".

符号テーブルROM22内には、ビット長が8ビット以下
のMH符号は、そのまま符号データとして格納されてい
る。また、9ビット以上のMH符号は、下位8ビットが符
号データとして格納されている。そして、それぞれのMH
符号のビット数つまり符号等の補数が、符号長データと
して格納されている。
In the code table ROM 22, MH codes having a bit length of 8 bits or less are stored as code data as they are. In the MH code of 9 bits or more, the lower 8 bits are stored as code data. And each MH
The number of bits of the code, that is, the complement of the code or the like is stored as code length data.

例えば、画素の色が「白」でラン長が「1」のMH符号
は「000111」であり、符号長は「6」である。この場
合、符号テーブルROM22には、第2図に示すように、ワ
ードデータとして「000111」が格納され、符号長データ
として、符号長「6」の補数である「1010」が格納され
ている。
For example, an MH code having a pixel color of “white” and a run length of “1” is “000111”, and the code length is “6”. In this case, as shown in FIG. 2, "000111" is stored as word data in the code table ROM 22, and "1010" which is a complement of the code length "6" is stored as code length data.

また、画素が「黒」でラン長が「0」のMH符号は「00
00110111」で、符号長は「10」である。この場合、ワー
ドデータとして「00110111」という下位8ビットが格納
され、符号長データとして、符号長「10」の補数である
「0110」が格納されている。
Further, the MH code of the pixel “black” and the run length “0” is “00”.
00110111 ”and the code length is“ 10 ”. In this case, lower eight bits “00110111” are stored as word data, and “0110”, which is a complement of code length “10”, is stored as code length data.

ターミネーティング符号検出回路2内の22は、カウン
タ21の計数値をラン長とするワードデータを出力する。
また、メイクアップ符号検出回路3内の符号テーブルRO
M22は、その計数値が「1」のときラン長「64」、
「2」のときラン長「128」というように、計数値の2
の7乗倍をラン長とするワードデータをそれぞれ出力す
る。
22 in the terminating code detection circuit 2 outputs word data having a count value of the counter 21 as a run length.
Also, the code table RO in the makeup code detection circuit 3
M22 is a run length "64" when the count value is "1",
When the run length is "2", the run length "128"
And outputs word data having a run length of 7 times.

シフト量デコーダ24は、出力されたワードデータの内
の符号長データを入力する。その符号長データは、第9
図に示すように、符号長の補数に対応している。シフト
量デコーダ24は、符号長データを入力すると、同図に示
すように、そのデータに応じてシフト信号S0〜S5をオン
にする。
The shift amount decoder 24 inputs the code length data of the output word data. The code length data is ninth
As shown in the figure, it corresponds to the complement of the code length. Shift amount decoder 24 inputs the code length data, as shown in the figure, to turn on the shift signal S 0 to S 5 in accordance with the data.

すなわち、符号長が13ビットのときには、シフト量
「0」を示すシフト信号S0を出力し、符号長が12ビット
のときには、シフト量「1ビット」を示すシフト信号S1
を出力する。以下同様に、符号長に応じてシフト量の大
きいシフト信号Siを出力する。また、符号長が8ビット
以下のときには、シフト量「5ビット」を示すシフト信
号S5を出力する。
That is, when the code length is 13 bits, the shift signal S 0 indicating the shift amount “0” is output, and when the code length is 12 bits, the shift signal S 1 indicating the shift amount “1 bit” is output.
Is output. Hereinafter Similarly, outputs a large shift signal S i of the shift amount according to the code length. Further, when the code length is 8 bits or less outputs a shift signal S 5 indicating the shift amount "5 bits".

バレルシフタ23は、上記シフト信号S0〜S5と、符号テ
ーブルROM22から出力された符号データとを入力する。
このとき、オンした1つのシフト信号Siにより、対応し
たゲート回路Giが動作する。これにより、第4図から明
らかなように、入力された8ビットの符号データが、シ
フト信号Siが示すシフト量だけシフトして、13ビットの
データb1〜b13として出力される。また、そのデータの
各信号ラインは、抵抗Rによりアースされ、ローレベル
になっているので、符号データがセットされなかった出
力は、データ“0"として出力される。この出力データ
は、1つのMH符号になっている。
The barrel shifter 23 receives the shift signals S 0 to S 5 and the code data output from the code table ROM 22.
In this case, by one of the shift signal S i which is turned on, the gate circuit G i corresponding to operate. Thus, is apparent from FIG. 4, 8-bit code data input is shifted by a shift amount indicated by the shift signal S i, is output as 13-bit data b 1 ~b 13. Further, since each signal line of the data is grounded by the resistor R and is at the low level, the output in which the code data is not set is output as data "0". This output data is one MH code.

例えば、いま、制御部9により、「黒」が指定され、
カウンタ21の計数値が「0」であったとすると、ターミ
ネーティング符号検出回路2の符号テーブルROM22から
は、第10図(a)にように、符号データ「00110100」と
符号長データ「0110」が出力される。このとき、シフト
量デコーダ23は、その符号データを、符号長データに従
って3ビット分シフトして、同図(b)に示すように、
所定のMH符号「0000110100000」を生成する。
For example, “black” is specified by the control unit 9 now,
Assuming that the count value of the counter 21 is "0", the code data "00110100" and the code length data "0110" are read from the code table ROM 22 of the terminating code detection circuit 2 as shown in FIG. Is output. At this time, the shift amount decoder 23 shifts the code data by 3 bits according to the code length data, and as shown in FIG.
A predetermined MH code “0000110100000” is generated.

比較器25は、その生成されたMH符号と、シフトレジス
タ1の出力データとを入力する。ここで、第5図に示す
ように、排他的論理和回路E01の出力を信号c1、オア回
路O01〜O12までの各出力をそれぞれ信号c2〜c13とす
る。
The comparator 25 receives the generated MH code and the output data of the shift register 1. Here, as shown in Figure 5, the exclusive OR signal c 1 the output of the circuit E 01, the OR circuit O 01 ~ O respectively signals c 2 to c 13 each output of up to 12.

比較器25内の排他的論理和回路E01〜E13は、それぞれ
入力された両者のデータを1ビットずつ比較し、一致す
ると論理値“0"を出力する。従って、同図から明らかな
ように、例えば、上記生成されたMH符号と、シフトレジ
スタ1の出力データとが、13ビットとも全て一致する
と、上記信号c1〜c13は、全て“0"になる。一方、上位
ビットから数えてi番目のビットが不一致になった場
合、上記信号c1〜ci-1までが“0"となり、信号ci〜c13
が“1"となる。
Exclusive OR circuit E 01 to E 13 in the comparator 25 compares the data of the two input respectively by one bit, and outputs a logical value "0" match. Therefore, as is apparent from FIG. 6, for example, when the generated MH code and the output data of the shift register 1 all match 13 bits, the signals c 1 to c 13 all become “0”. Become. On the other hand, when the i-th bit counted from the upper bits does not match, the signals c 1 to c i-1 become “0” and the signals c i to c 13
Becomes “1”.

マルチプレクサMは、符号テーブルROM22から出力さ
れる符号長データが示す符号長に対応する1つの上記信
号cjを選択出力する。上記符号長は、そのとき生成され
たMH符号の符号長を示しているので、比較器25の出力信
号が“0"のとき、生成されたMH符号がシフトレジスタ1
にセットされていることになる。
Multiplexer M selectively outputs one of the signal c j corresponding to the code length indicated by the code length data output from the code table ROM 22. Since the code length indicates the code length of the MH code generated at that time, when the output signal of the comparator 25 is “0”, the generated MH code is
Will be set to

比較器25の出力信号は、ターミネーティング符号検出
回路2の場合、ターミネーティング符号検知信号DTとし
て出力され、メイクアップ符号検出回路3の場合、メイ
クアップ符号検知信号DMとして出力される。
The output signal of the comparator 25 is output as a terminating code detection signal D T in the case of the terminating code detection circuit 2 and is output as a makeup code detection signal D M in the case of the makeup code detection circuit 3.

制御部6は、ターミネーティング符号検知信号DT及び
メイクアップ符号検知信号DMがともに“1"の場合(処理
104のN)、カウンタ21を+1インクリメントして(処
理105)、同様のチェックを繰り返す(処理104へ)。
Control unit 6, when the the terminating code detection signal D T and make-up code detection signal D M are both "1" (process
(N in 104), the counter 21 is incremented by +1 (process 105), and the same check is repeated (to process 104).

そして、ターミネーティング符号検知信号DTまたはメ
イクアップ符号検知信号DMが“0"になった場合(処理10
4のY)、対応する回路側のカウンタ21の計数値をレジ
スタ4にセットする。
When the the terminating code detection signal D T or makeup code detection signal D M becomes "0" (process 10
(4) Y), the count value of the corresponding circuit-side counter 21 is set in the register 4.

レジスタ4は、12ビットあり、ターミネーティング符
号検出回路2側の計数値は、その下位6ビットにセット
し、メイクアップ符号検出回路3側の計数値は、上位6
ビットにセットする。これにより、白黒画素のラン長が
レジスタ4にセットされることになる。
The register 4 has 12 bits. The count value of the terminating code detection circuit 2 is set to the lower 6 bits, and the count value of the makeup code detection circuit 3 is 6 bits.
Set a bit. As a result, the run length of the monochrome pixel is set in the register 4.

次いで、セットした計数値の種別を判別する(処理10
7)。ここで、メイクアップ符号のラン長をセットした
場合(処理107のN)、シフトレジスタ1を上記符号長
が示しているビット数だけシフトして、次の新しいMH符
号データを読み込んで、同時に処理する(処理103
へ)。
Next, the type of the set count value is determined (step 10
7). Here, when the run length of the makeup code is set (N in process 107), the shift register 1 is shifted by the number of bits indicated by the code length, the next new MH code data is read, and the process is performed simultaneously. Yes (Process 103
What).

一方、ターミネーティング符号をセットした場合には
(処理107のY)、画素データ発生回路5を起動する。
On the other hand, when the terminating code is set (Y in step 107), the pixel data generating circuit 5 is activated.

画素データ発生回路5は、指定された白または黒の画
素データをレジスタ4にセットされたラン長だけ生成し
て出力する(処理108)。このようにして、1つのラン
に相当する元の画素データが再生される。
The pixel data generation circuit 5 generates and outputs the designated white or black pixel data for the run length set in the register 4 (process 108). In this way, the original pixel data corresponding to one run is reproduced.

この後、再生する画素の色を反転して、同様に処理す
る(処理101へ)。これにより、順次元の画素データが
再生されるようになる。
Thereafter, the color of the pixel to be reproduced is inverted, and the same processing is performed (to processing 101). Thus, the forward dimension pixel data is reproduced.

以上のように、本実施例では、符号テーブルとして
は、第2図に示したターミネーティング符号用の128ワ
ードと、第7図に示したメイクアップ符号用の67ワード
のデータを備えている。そして、1ワードは、8ビット
未満の符号データと4ビットの符号長データとで構成し
て、その2つのデータにより各種MH符号を発生するよう
にしている。
As described above, in this embodiment, the code table includes the data of 128 words for the terminating code shown in FIG. 2 and the data of 67 words for the make-up code shown in FIG. One word is composed of code data of less than 8 bits and code length data of 4 bits, and various MH codes are generated by the two data.

従って、符号テーブルのデータ量は、12ビットを195
ワード、つまり高々2340ビットになる。このように、前
述した従来例の3187ビットに比較して、データ量を大幅
に削減することができるようになる。
Therefore, the data amount of the code table is 12 bits to 195
A word, at most 2340 bits. As described above, the data amount can be significantly reduced as compared with the above-described conventional example of 3187 bits.

これにより、符号化処理用のLSIチップの所要スペー
スも減少し、LSIのコストが低下する一方、さらに処理
機能の高いLSIの作成が容易になる。
As a result, the space required for the LSI chip for the encoding process is reduced, and the cost of the LSI is reduced. On the other hand, it is easy to create an LSI having a higher processing function.

また、ターミネーティング符号検出回路2と、メイク
アップ符号検出回路3とを別々に配設し、入力されるMH
符号に対して、2種類の符号を同時に判定するようにし
ている。これにより、1つのMH符号を迅速に判定でき、
復号化速度を高速化することができる。
Also, the terminating code detection circuit 2 and the makeup code detection circuit 3 are separately provided, and the input MH
Two types of codes are determined simultaneously for codes. This allows one MH code to be determined quickly,
The decoding speed can be increased.

さらに、符号テーブルROM22内の符号長データは、符
号長の補数を示すようにしている。これにより、第3図
から分るように、符号長データの4ビット目をそのまま
シフト信号S5として利用することができる。これによ
り、シフト量デコーダ24の回路構成が簡略化されてい
る。
Further, the code length data in the code table ROM 22 indicates the complement of the code length. Thus, as can be seen from FIG. 3, can be utilized 4 bit code length data as a shift signal S 5 as it is. Thereby, the circuit configuration of the shift amount decoder 24 is simplified.

しかし、符号長データは、そのまま単純に符号ビット
数を指示するようにしてもよいことは当然である。ま
た、符号テーブル内に、1ラインの終端を示すEOLコー
ドを格納してもよい。
However, it goes without saying that the code length data may simply indicate the number of code bits as it is. Further, an EOL code indicating the end of one line may be stored in the code table.

また、以上の実施例では、MH符号の元のデータは画情
報であることを想定したが、画情報に限らず任意のビッ
トパータンデータに対して、本発明が適用できることは
当然である。
Further, in the above embodiment, the original data of the MH code is assumed to be image information. However, it is obvious that the present invention can be applied to not only image information but also arbitrary bit pattern data.

また、ターミネーティング符号検出回路2とメイクア
ップ符号検出回路3とで同時に符号判定するよにした
が、例えば、白黒64ワードずつあるターミネーティング
符号を、さらに32ワードずつに分割して、その分割した
範囲で同時に符号判定することも考えられる。これによ
り、さらに復号化速度を高速化することができる。
In addition, the termination code detection circuit 2 and the makeup code detection circuit 3 determine the code at the same time. It is also conceivable to simultaneously determine the sign in the range. Thereby, the decoding speed can be further increased.

さらに、1ライン内でランレングスを符号化する一次
元符号化方式であるMH符号の例を説明したが、MR符号や
MMR符号のような二次元符号化方式では、ライン内の白
黒変化点の位置を前ラインの最寄の変化点位置との相対
位置関係として表現し、可変長符号に符号化するが、本
発明を同様に適用することができる。
Furthermore, the example of the MH code, which is a one-dimensional encoding method for encoding a run length in one line, has been described.
In a two-dimensional coding method such as an MMR code, the position of a black and white change point in a line is expressed as a relative positional relationship with the nearest change point position of the previous line, and is encoded into a variable length code. Can be similarly applied.

[発明の効果] 以上のように、本願の第1の発明によれば、各符号の
最大長に満たない符号データと符号のビット長を示す符
号長データとにより1ワードを構成して符号テーブルに
格納し、その2つのデータにより各符号を発生するよう
にしたので、符号テーブルのデータ量を削減することが
できる一方、第2の発明によれば、MH符号の場合に、タ
ーミネーティング符号とメイクアップ符号とを同時に発
生して、2種類の符号判定を同時に実行するようにした
ので、復号化処理を高速化することができる。
[Effects of the Invention] As described above, according to the first invention of the present application, one word is constituted by code data less than the maximum length of each code and code length data indicating the bit length of the code. , And each code is generated by the two data, so that the data amount of the code table can be reduced. On the other hand, according to the second invention, in the case of the MH code, the terminating code and the Since a make-up code is generated at the same time and two types of code determinations are performed at the same time, the decoding process can be sped up.

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

第1図は本発明の一実施例に係る圧縮データの復号化装
置のブロック構成図、第2図はターミネーティング符号
用の符号テーブルROMの格納データ説明図、第3図はシ
フト量デコーダの回路図、第4図はバレルシフタの回路
図、第5図は比較器の回路図、第6図はメイクアップ符
号検出回路の補足説明図、第7図はメイクアップ符号用
の符号テーブルROMの格納データ説明図、第8図は復号
処理の動作フローチャート、第9図はシフト量デコーダ
の出力信号説明図、第10図はMH符号発生動作の説明図で
ある。 1……シフトレジスタ、2……ターミネーティング符号
検出回路、3……メイクアップ符号検出回路、4……レ
ジスタ、5……画素データ発生回路、6……制御部、21
……カウンタ、22……符号テーブルROM、23……バレル
シフタ、24……シフト量デコーダ、25……比較器。
FIG. 1 is a block diagram of a compressed data decoding apparatus according to one embodiment of the present invention, FIG. 2 is an explanatory diagram of data stored in a code table ROM for terminating codes, and FIG. 3 is a circuit of a shift amount decoder. FIG. 4, FIG. 4 is a circuit diagram of a barrel shifter, FIG. 5 is a circuit diagram of a comparator, FIG. 6 is a supplementary explanatory diagram of a makeup code detection circuit, and FIG. 7 is data stored in a code table ROM for makeup codes. FIG. 8 is an operation flowchart of a decoding process, FIG. 9 is an explanatory diagram of an output signal of a shift amount decoder, and FIG. 10 is an explanatory diagram of an MH code generating operation. DESCRIPTION OF SYMBOLS 1 ... Shift register, 2 ... Terminating code detection circuit, 3 ... Makeup code detection circuit, 4 ... Register, 5 ... Pixel data generation circuit, 6 ... Control part, 21
... Counter, 22 code table ROM, 23 barrel shifter, 24 shift amount decoder, 25 comparator.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】各符号がそれぞれ一定パターンの生データ
がデータ圧縮されたものであると共に、各符号のビット
長は不定であり一定ビット数を超過する場合には超過分
の全ビットが同一データである符号系列を入力して、元
の生データを再生する圧縮データの復号化装置におい
て、上記一定ビット数未満の符号データと符号のビット
長を示す符号長データとにより1ワードが構成された各
ワードデータを格納している符号テーブルと、その符号
テーブルから上記ワードデータを1ワードずつ順次読み
出す読出手段と、読み出されたワードデータの上記符号
データと符号長データとにより各符号を発生する符号発
生手段と、発生した符号と入力される上記符号系列とを
比較する比較手段と、その比較結果が一致した場合に発
生した符号に対応する元の生データを再生する生データ
再生手段とを備えていることを特徴とする圧縮データの
復合化装置。
1. Each code is obtained by compressing raw data of a predetermined pattern, and the bit length of each code is indefinite. If the number of bits exceeds a predetermined number of bits, all excess bits are replaced by the same data. In a compressed data decoding apparatus for inputting a code sequence and reproducing the original raw data, one word is composed of the code data of less than the predetermined number of bits and the code length data indicating the bit length of the code. A code table storing each word data, reading means for sequentially reading the word data from the code table one word at a time, and generating each code by the code data and code length data of the read word data. Code generating means; comparing means for comparing the generated code with the input code sequence; Recovery Goka device of the compressed data, characterized in that it comprises a raw data reproducing means for reproducing the original raw data.
【請求項2】MH符号の符号系列を入力して、元の生デー
タを再生する圧縮データの復号化装置において、各種タ
ーミネーティング符号を1つずつ順次発生するターミネ
ーティング符号発生手段と、各種メイクアップ符号を1
つずつ順次発生するメイクアップ符号発生手段と、その
メイクアップ符号発生手段及び上記ターミネーティング
符号発生手段から同時に発生される各符号と入力される
符号系列と比較する比較手段と、その比較結果が一致し
た場合に一致した符号に対応する元の生データを再生す
る生データ再生手段とを備えていることを特徴とする圧
縮データの復号化装置。
2. A compressed data decoding apparatus for receiving a code sequence of an MH code and reproducing original raw data, comprising: a terminating code generating means for sequentially generating various terminating codes one by one; Up code 1
Make-up code generating means, which is sequentially generated one by one, and comparing means for comparing each code simultaneously generated from the make-up code generating means and the terminating code generating means with an input code sequence; And a raw data reproducing means for reproducing the original raw data corresponding to the code which coincided with the compressed data.
JP2317977A 1990-11-26 1990-11-26 Compressed data decoding device Expired - Lifetime JP3029863B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2317977A JP3029863B2 (en) 1990-11-26 1990-11-26 Compressed data decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2317977A JP3029863B2 (en) 1990-11-26 1990-11-26 Compressed data decoding device

Publications (2)

Publication Number Publication Date
JPH04192675A JPH04192675A (en) 1992-07-10
JP3029863B2 true JP3029863B2 (en) 2000-04-10

Family

ID=18094108

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2317977A Expired - Lifetime JP3029863B2 (en) 1990-11-26 1990-11-26 Compressed data decoding device

Country Status (1)

Country Link
JP (1) JP3029863B2 (en)

Also Published As

Publication number Publication date
JPH04192675A (en) 1992-07-10

Similar Documents

Publication Publication Date Title
US5663724A (en) 16B/20B encoder
US5032838A (en) Variable length code parallel decoding apparatus and method
KR100241792B1 (en) Method and apparatus for encoding and decoding image data
US4688100A (en) Video data encoding/decoding apparatus
JPH04270568A (en) Data compression system in picture processing unit
JPS59178077A (en) Method for compressing data of binary picture
JPS60140980A (en) Method and device for encoding signal representing flow of digital data group
JP3269970B2 (en) Method and apparatus for compressing and decompressing digital image signals
US4972497A (en) Image coding system
KR0134750B1 (en) Output apparatus and method
JP3029863B2 (en) Compressed data decoding device
US20040246264A1 (en) Image display apparatus
JPH04270564A (en) Serial picture data compression system having color information
JP3415481B2 (en) Variable length code decoding device
JPH04298164A (en) Data compression/release circuit for facsimile apparatus
JP3433276B2 (en) Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer
JP2687926B2 (en) Code decoder
JPS6341271B2 (en)
JPH04270569A (en) Data compression system for picture processor
KR0152035B1 (en) Method and apparatus of variable length decode
JP2833743B2 (en) MH code decoder
JPH06225166A (en) Coding and decoding device
JP3054173B2 (en) Variable length code detection circuit
JP3127029B2 (en) Image information encoding device
JPH05207300A (en) Decoding processing method and decoder

Legal Events

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

Free format text: PAYMENT UNTIL: 20080204

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090204

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110204

Year of fee payment: 11

EXPY Cancellation because of completion of term