JPH065890B2 - Decompression device for compression code - Google Patents

Decompression device for compression code

Info

Publication number
JPH065890B2
JPH065890B2 JP59114834A JP11483484A JPH065890B2 JP H065890 B2 JPH065890 B2 JP H065890B2 JP 59114834 A JP59114834 A JP 59114834A JP 11483484 A JP11483484 A JP 11483484A JP H065890 B2 JPH065890 B2 JP H065890B2
Authority
JP
Japan
Prior art keywords
code
decoding
image
signal
compressed
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
JP59114834A
Other languages
Japanese (ja)
Other versions
JPS60257666A (en
Inventor
加津利 久田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP59114834A priority Critical patent/JPH065890B2/en
Publication of JPS60257666A publication Critical patent/JPS60257666A/en
Publication of JPH065890B2 publication Critical patent/JPH065890B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 本発明はファクシミリや画像電子ファイル等に用いられ
る帯域圧縮符号化による圧縮コードの復号装置に関する
ものである。
The present invention relates to a decoding device for a compressed code by band compression encoding used for facsimiles, image electronic files and the like.

従来のファクシミリ等の画像伝送装置や近年の光ディス
クや磁気ディスク等を用いた画像ファイル装置等におい
ては、画像データを圧縮して取扱うことにより、データ
量を減少せしめ伝送或いは蓄積動作の高速化、効率化を
計っている。
In an image transmission device such as a conventional facsimile or an image file device using an optical disk or a magnetic disk in recent years, by compressing and handling image data, the amount of data is reduced and transmission or storage operation is speeded up and efficiency is improved. I am trying to make it.

かかる画像圧縮とは、いわゆるコード変換操作の一種で
あり、代表的な圧縮方法であるモディファイド・ホフマ
ン(MH)符号化について言えば、画像中の連続した白
又は黒画素のビットブロックを別の圧縮コードに対応さ
せて表現するものである。この際、発生頻度の高い画素
ビットブロックに対しては短いコード長の圧縮コードを
対応させ、一方、発生頻度の低い画素ビットブロックに
対しては長いコード長の圧縮コードを対応させることに
より、画素の組合せの発生頻度の偏りを利用し画像全体
をより少ないビット数の別のコード列で表現するもので
ある。
The image compression is a kind of so-called code conversion operation, and in the case of the modified Hoffman (MH) encoding which is a typical compression method, a continuous bit block of white or black pixels in an image is separately compressed. It is expressed in correspondence with the code. At this time, a compressed code having a short code length is made to correspond to a pixel bit block having a high occurrence frequency, while a compressed code having a long code length is made to correspond to a pixel bit block having a low occurrence frequency. The entire image is represented by another code string with a smaller number of bits by utilizing the bias in the occurrence frequency of the combination of.

ところで、この画素ビットブロックに対する圧縮コー
ドの対応は経験的に基づいて決められたものであり、ま
た、その圧縮コードのコード長は不揃いなものである。
Incidentally, the correspondence of the compressed code to this pixel bit block is determined empirically, and the code lengths of the compressed code are not uniform.

また、MH符号化の規約として、1ライン毎の画像の
同期又は区切りを示すため、EOL(エンド・オブ・ラ
イン)符号が、上記圧縮符号とともに用いられる。そし
て、受信側の装置ではこのEOL符号に基づきライン同
期をとる構成が一般的に用いられている。従って、何ら
かの原因により、復号動作に誤りが生じた場合には、復
号回路ではその後に入力するEOL符号を検出し、検出
動作に従って、符号動作を開始する。この様に、EOL
符号は復号動作に重要な機能を果すものであり、もし、
EOL符号の検出が誤ってなされると、それに続く復号
動作に乱れを生じ正確な画像再現がなされないことにな
る。
Further, as a rule of MH coding, an EOL (End of Line) code is used together with the compression code in order to indicate the synchronization or break of the image for each line. A device on the receiving side generally uses a configuration for line synchronization based on the EOL code. Therefore, when an error occurs in the decoding operation for some reason, the decoding circuit detects the EOL code to be input thereafter, and starts the encoding operation according to the detection operation. Like this, EOL
The code plays an important function in the decoding operation.
If the EOL code is erroneously detected, the subsequent decoding operation will be disturbed and accurate image reproduction will not be performed.

また、前述の様に符号コードのコード長は不揃いなもの
であるので、1ラインを構成する1又は複数の符号コー
ドのコード長も一定とはならない。従って、EOL符号
の入力する間隔も一定とはならず、このEOL符号の検
出は難しかった。
Further, since the code lengths of the code codes are not uniform as described above, the code lengths of one or a plurality of code codes forming one line are not constant. Therefore, the interval at which the EOL code is input is not constant, and it is difficult to detect this EOL code.

また、前述のMH符号化による圧縮コードの中には、コ
ード長よりもラン長の方が短い圧縮コードがいくつか存
在し、この様な圧縮コードを復号した場合には、高速プ
リンタによるライン長に対応した画像再生の終了前に次
に復号すべき圧縮コードの用意が整わず、この様なとき
には、高速プリンタの画像再生に圧縮コードの復号動作
が間に合わないという不都合を生じる可能性がある。
In addition, there are some compressed codes having a shorter run length than the code length among the above-mentioned MH-encoded compressed codes. When such compressed codes are decoded, the line length of a high-speed printer is The compressed code to be decoded next is not ready before the end of the image reproduction corresponding to, and in such a case, there is a possibility that the decoding operation of the compressed code is not in time for the image reproduction of the high speed printer.

本発明は以上の点に鑑みてなされたもので、コード長よ
りもラン長の方が短い特定の圧縮コードを含む不定長の
圧縮コードを高速に復号するとともに、この特定の圧縮
コードを含む圧縮コードを高速復号する構成においても
復号動作の基準となるEOLコードを確実に検出するこ
とを目的とし、詳しくは、画像の各ラインの終了を示す
EOLコードを含む不定長の圧縮コードを順次復号する
圧縮コードの復号装置において、連続して入力する圧縮
コードを複数連続して記憶する記憶手段と、前記記憶手
段に記憶されている複数の圧縮コードをシフトすること
により次に復号すべき圧縮コードを前記記憶手段の所定
位置にセットするシフト手段と、前記記憶手段の所定位
置にセットされた圧縮コードを復号することによりラン
長データ及び圧縮コードのコード長データを出力する復
号手段と、前記復号手段で復号された圧縮コードがコー
ド長よりもラン長の方が短い特定の圧縮コードでない場
合には前記シフト手段により前記コード長データに従っ
たシフトを順次実行せしめ、前記特定の圧縮コードであ
る場合には前記シフト手段により前記コード長データに
従ったシフトを一度に実行せしめるシフト制御手段と、
前記復号手段で復号された圧縮コードが前記特定の圧縮
コードである場合に前記シフト手段により一度に実行さ
れる最大シフト量に対応した前記記憶手段の前記所定位
置より1ビットずつずれた複数の異なる位置に前記EO
Lコードが存在しているか否かをそれぞれ検出する複数
の検出手段と、前記複数の検出手段による前記EOLコ
ードの検出に基づいて前記復号手段により前記EOLコ
ードに続く圧縮コードを復号せしめる復号制御手段とを
有する圧縮コードの復号装置を提供するものである。
The present invention has been made in view of the above points, and decodes a compressed code of an indefinite length including a specific compressed code whose run length is shorter than the code length at high speed, and compresses the compressed code including this specific compressed code. In order to reliably detect the EOL code that serves as the reference of the decoding operation even in the configuration in which the code is decoded at high speed, in detail, the indefinite-length compressed code including the EOL code indicating the end of each line of the image is sequentially decoded. In a compressed code decoding device, a storage unit that stores a plurality of consecutively input compressed codes and a compressed code that should be decoded next by shifting the plurality of compressed codes stored in the storage unit Run length data and compression are performed by shifting means set at a predetermined position of the storage means and decoding the compression code set at a predetermined position of the storage means. Decoding means for outputting the code length data of the code, and when the compressed code decoded by the decoding means is not a specific compressed code having a shorter run length than the code length, the shift means converts the code length data into the code length data. Shift control means for sequentially executing the following shifts, and in the case of the specific compression code, for executing the shifts according to the code length data at once by the shift means,
When the compressed code decoded by the decoding means is the specific compressed code, a plurality of different bits shifted by 1 bit from the predetermined position of the storage means corresponding to the maximum shift amount executed at one time by the shift means EO in position
A plurality of detecting means for respectively detecting whether or not the L code exists, and a decoding control means for decoding the compressed code following the EOL code by the decoding means based on the detection of the EOL code by the plurality of detecting means. There is provided a compressed code decoding device having:

本発明の詳細な説明を以下に述べる。A detailed description of the invention is provided below.

まず、本発明の実施例の概要を第1図に示す回路ブロッ
クを用いて説明する。
First, an outline of an embodiment of the present invention will be described using the circuit block shown in FIG.

第1図において101は記憶回路であり、例えば画像を光
電的に読取るリーダや画像をファイルする電子ファイ
ル、或いは電話線等の伝送路を介して画像情報を受信す
る受信機等から入力された既に別途手段を用いて画像信
号を圧縮符号化することにより得た、所謂MHコード(モ
ディファイド・ホフマン)コードを、16ビット(1ワ
ード)単位で順次読出し可能な形で記憶している回路
で、例えばRAM(ランダム・アクセス・メモリ)又はラ
ッチ回路等により実現できる回路である。又、記憶回路
101におけるMHコードの記憶形式は、第2図(a)に一例を
示す如くである。即ち、MHコード本来の性質として、そ
のコード長は不揃い(最小2ビット〜最大13ビット)
であるが、コード長に拘らず、1ビットの空もなく、第
2図(b)の如くシリアルに連ねたビット列を16ビット
毎に並列変換して並べた形式である。第2図(b)におい
て、WB及びBBは夫々白及び黒画素を示すMHコードで、WB
及びBBの後の数字はそのコードの示すランレングスを表
わしており、例えばWB8はランレングス8の白を示すMH
コードである。この形式に於て、MHコードの区切りとワ
ード(16ビット)の区切りとは必ずしも一致していな
い。又、記憶回路101は外部コントロールに依り、後続
のワードを順次パラレル出力できる機能を有するもので
ある。
In FIG. 1, reference numeral 101 denotes a storage circuit, which has been input from, for example, a reader that photoelectrically reads an image, an electronic file that files an image, or a receiver that receives image information via a transmission line such as a telephone line. A circuit that stores a so-called MH code (Modified Hoffman) code obtained by compressing and encoding an image signal using a separate means so that it can be sequentially read in 16-bit (1 word) units, for example, It is a circuit that can be realized by a RAM (random access memory) or a latch circuit. Also, the memory circuit
The storage format of the MH code in 101 is as shown in FIG. In other words, the nature of the MH code is that the code lengths are not uniform (minimum 2 bits to maximum 13 bits).
However, regardless of the code length, there is no 1-bit vacancy, and a serially concatenated bit string is parallel-converted every 16 bits and arranged as shown in FIG. 2 (b). In FIG. 2 (b), WB and BB are MH codes indicating white and black pixels, respectively.
The number after BB and BB indicates the run length indicated by the code. For example, WB8 is MH indicating the run length 8 is white.
Is the code. In this format, the MH code delimiter and the word (16 bit) delimiter do not necessarily match. Further, the memory circuit 101 has a function of sequentially outputting the subsequent words in parallel in accordance with external control.

第1図において102は謂ゆるマルチプレクサ(データセ
レクタ)である。また、103は28ビット並列入力及び
出力を有するレジスタであり、記憶回路101からマルチ
プレクサ102を経て、レジスタ103の入力側に与えられる
MHコードを一時記憶する機能及び既にレジスタ103に記
憶しているMHコードを出力として後述するMHコード・デ
コード・ロジック104及びMHコード・デコード・テーブ
ルROM(リード・オンリ・メモリ)105等に与える役割り
を有する。
In FIG. 1, 102 is a so-called multiplexer (data selector). Further, 103 is a register having 28-bit parallel input and output, which is given to the input side of the register 103 from the memory circuit 101 through the multiplexer 102.
The function of temporarily storing the MH code and the role of giving the MH code already stored in the register 103 as an output to the MH code decoding logic 104 and the MH code decoding table ROM (read only memory) 105 described later. Have a

マルチプレクサ102及びレジスタ103とでデータのシリア
ル・シフト及びnビットのジャンプ・シフトが可能な謂
ゆるビット・シフタを形成する。このビット・シフタは
後述するMHコード・デコード・ロジック104及びMHコー
ド・デコードROM105の出力等によりコントロールされ、
前述の方法によりMHコードの境目に拘りなく記憶回路10
1からレジスタ103内に記憶されたMHコードを必要なビッ
ト数だけシフトし、記憶する機能を果すものである。第
3図(詳細は後述する)はこのビットシフタの詳細な構
成を示す図であり、レジスタ103内に例示されたMHコー
ド列は第1図示の記憶回路101内に例示したMHコードが
適切なコントロールを経て白のランレングス8を示すMH
コードWB1(10011)がデコード可能な位置に来た状態を図
示している。即ち第3図示のレジスタ103の出力CO、即
ち、LSB出力にMHコードの先頭ビットが出力されている
状態をデコード可能な位置とし、今后「頭出し完了」と
称する。従って第3図レジスタ103内のコードの配列は
白のランレングス8を示すMHコードWB8が「頭出し完
了」の状態にある事を示している。
The multiplexer 102 and the register 103 form a so-called loose bit shifter capable of serial shift of data and jump shift of n bits. This bit shifter is controlled by the output of the MH code decode logic 104 and MH code decode ROM 105, which will be described later,
By the method described above, the memory circuit 10 regardless of the boundary of the MH code
This functions to shift the MH code stored in the register 103 from 1 by the required number of bits and store it. FIG. 3 (details will be described later) is a diagram showing a detailed configuration of the bit shifter, and the MH code string illustrated in the register 103 is an appropriate control for the MH code illustrated in the memory circuit 101 illustrated in FIG. MH showing a white run length 8 through
It shows a state in which the code WB1 (10011) has come to a position where it can be decoded. That is, the output CO of the register 103 shown in FIG. 3, that is, the state in which the first bit of the MH code is output to the LSB output is set as a decodable position, and is hereinafter referred to as "cue completion". Therefore, the arrangement of the codes in the register 103 in FIG. 3 indicates that the MH code WB8 indicating the white run length 8 is in the "cue completed" state.

第1図において104はMHコード・デコード・ロジック
(以下ロジック104と称する)であり、MHコードのコー
ド長よりMHコードの示すランレングスの方が短い以下の
4種のコード即ち、白のランレングス1(MHコードで00
0111、コード長=6>ランレングス=1)、白のランレ
ングス2(MHコードで0111、コード長=4>ランレ
ングス=2)、白のランレングス3(MHコードで100
0、コード長=4>ランレングス=3)及び黒のランレ
ングス1(MHコードで010、コード長=3>ランレン
グス=1)をデコードする回路である。
In FIG. 1, reference numeral 104 denotes an MH code decoding logic (hereinafter referred to as logic 104), which is the following four types of codes, in which the run length indicated by the MH code is shorter than the code length of the MH code, that is, the white run length. 1 (00 with MH code
0111, code length = 6> run length = 1), white run length 2 (MH code 0111, code length = 4> run length = 2), white run length 3 (MH code 100)
0, code length = 4> run length = 3) and black run length 1 (MH code 010, code length = 3> run length = 1).

尚、以下の説明中、白のランレングス1、白のランレン
グス2、白のランレングス3及び黒のランレングス1を
夫々示す上述の4種のMHコードをまとめてHSCコードと
呼ぶことにする。
In the following description, the above four types of MH codes indicating the white run length 1, the white run length 2, the white run length 3 and the black run length 1 will be collectively referred to as an HSC code. .

第1図において105はMHコード・デコード・RM(以下
RM105と称する。)であり、前述のロジック104がデ
コードを受持つ4種のMHコードを含む全てのMHコードを
主としてデコードする回路である。
In FIG. 1, reference numeral 105 denotes an MH code decode RM (hereinafter referred to as RM105), which is a circuit that mainly decodes all MH codes including four kinds of MH codes that the logic 104 takes charge of decoding.

ロジック104及びROM105はMHコードの処理スピード及び
方法の違いにより、デコードを受け持つMHコードを区分
しているのであるが、これら2つのデコーダによりレジ
スタ103においてMHコードが「頭出し完了」する毎に、
該MHコードのランレングス、コード長及び黒又は白の画
像の色の別、そしてメイク・アップ・コード又はターミ
ネイト・コードの別、あるかないか等の出力をするもの
である。
The logic 104 and the ROM 105 divide the MH code that is in charge of decoding according to the difference in the processing speed and method of the MH code. These two decoders each time the MH code in the register 103 is “cue completed”,
The output of the run length of the MH code, the code length and the color of the image of black or white, the make-up code or the termination code, and whether or not they are present.

112はEOL検出回路で、レジスタ103にビットシリアルに
格納されたMHコード中にライン同期のためのコード、即
ち、エンド・オブ・ライン(EOL)コードが存在するか
否か及びその格納位置を検出する。
Reference numeral 112 denotes an EOL detection circuit, which detects whether or not a line synchronization code, that is, an end of line (EOL) code exists in the MH code stored in the register 103 in bit serial, and the storage position thereof. To do.

第1図において108はランレングス・カウンタでカウン
ト数“0”から最大のメイク・アップコードのランレン
グス、即ち“2560”以上のカウントが可能なバイナリ・
カウンタである。このランレングス・カウンタ108はロ
ジック104又はROM105から出力されるMHコードのランレ
ングスをカウントし終える毎にカウント終了信号(本例
ではカウンタのリップル・キャリCR)を出力する。
In FIG. 1, reference numeral 108 denotes a run length counter, which is a run length of the maximum make-up code from the count number "0", that is, a binary number capable of counting "2560" or more.
It is a counter. The run length counter 108 outputs a count end signal (ripple carry CR of the counter in this example) every time the run length of the MH code output from the logic 104 or the ROM 105 is counted.

109はフリップ・フロップであり、前述のランレングス
・カウンタ108からのカウント終了信号(リップル・キ
ャリCR)を受けて、その度毎に出力を反転させる。但し
後述するようにメイク・アップ・コードのカウント終了
信号では該出力は反転しないように制御される。このフ
リップ・フロップ109の出力が記憶回路101から読出した
MHコードをデコードして得られた画像信号である。
Reference numeral 109 is a flip-flop, which receives a count end signal (ripple carry CR) from the run-length counter 108 and inverts the output each time. However, as will be described later, the output is controlled not to be inverted by the make-up code count end signal. The output of this flip-flop 109 was read from the memory circuit 101.
It is an image signal obtained by decoding the MH code.

107はコード・レングス・カウンタでMHコードの最大コ
ード長である“13”以上をカウントできる。バイナリ・
カウンタでレジスタ103内において「頭出し完了」して
いたMHコードをシリアルシフト或いはジャンプ・シフト
する事によって、デコード済コードとして103レジスタ
から掃出してしまい、後続するMHコードを「頭出し完
了」の位置へシフトする際に、そのシフト量をカウント
し制御するものである。
Reference numeral 107 is a code length counter capable of counting the maximum code length "13" or more of the MH code. binary·
By serially shifting or jump-shifting the MH code that had been "cue completed" in the register 103 by the counter, it was swept out of the 103 register as a decoded code, and the subsequent MH code was at the "cue completed" position. When shifting to, the shift amount is counted and controlled.

106は4ビットのアキュムレータである。上述したよう
に、レジスタ103内に記憶回路101から取込まれたMHコー
ドはデコード済となると順次レジスタ103から掃出さ
れ、これによりレジスタ103内に空ビットができる。そ
こでアキュムレータ106がレジスタ103内の空ビットの数
をカウントし、16ビットの空ビットができる毎に新た
なMHコードを記憶回路101から1ワード(16ビット)
パラレルにレジスタ103内の空ビットへ補充する。これ
によりレジスタ103からロジック104又はRM105へ与
えるMHコードの列が途切れないように制御し、高速なデ
コード動作を可能とする。
106 is a 4-bit accumulator. As described above, the MH code fetched from the memory circuit 101 into the register 103 is sequentially swept out from the register 103 when it has been decoded, which causes an empty bit in the register 103. Therefore, the accumulator 106 counts the number of empty bits in the register 103, and each time 16 empty bits are generated, a new MH code is read from the memory circuit 101 by one word (16 bits).
Fill empty bits in register 103 in parallel. Thus, the sequence of the MH code given from the register 103 to the logic 104 or the RM 105 is controlled so as not to be interrupted, and a high-speed decoding operation is enabled.

尚、110は第1図示のブロック101〜109間の入出力信号
を制御する制御回路を図示したものである。
Reference numeral 110 shows a control circuit for controlling input / output signals between the blocks 101 to 109 shown in the first figure.

以上の如くしてMHコードを画像信号へ変換、即ち、MHコ
ードの復号がなされる。復号された画像信号はプリンタ
111に供給され、被記録材上に画像記録がなされる。
尚、プリンタ111からは1走査毎の同期信号である水平
同期信号HSYNCが出力され、このHSYNCは復号動作のタイ
ミングに用いられる。
As described above, the MH code is converted into the image signal, that is, the MH code is decoded. The decoded image signal is a printer
The image is recorded on the recording material by being supplied to 111.
The printer 111 outputs a horizontal synchronizing signal HSYNC which is a synchronizing signal for each scanning, and this HSYNC is used for the timing of the decoding operation.

次に本発明の実施例を更に具体的に説明する。本実施例
は画像圧縮符号であるMHコードを復号した結果である画
像信号を何らの画像メモリを設けることなくレーザ・ビ
ーム・プリンタ等の高速プリンタに直接出力するのに使
用する謂ゆる“高速・リアルタイム・MHデコーダ”を提
供するものである。従って、MHデコーダの処理速度の高
速性及びMHデコーダの画像出力(本例は画像周波数=+
数MHzを想定)とレーザ・ビーム・プリンタ等の高速プ
リンタとの同期の問題が解決されねばならない。そこ
で、これらの問題点を解決する為に、以下に述べる処理
方法に基づき、所望の“高速リアル・タイム・MHデコー
ダ”を実現する。
Next, examples of the present invention will be described more specifically. This embodiment is a so-called "high-speed, high-speed," which is used to directly output an image signal, which is the result of decoding the MH code, which is an image compression code, to a high-speed printer such as a laser beam printer without providing any image memory. It provides "real-time MH decoder". Therefore, the high processing speed of the MH decoder and the image output of the MH decoder (in this example, the image frequency = +
The problem of synchronization between high-speed printers such as laser beam printers should be solved. Therefore, in order to solve these problems, a desired "high-speed real-time MH decoder" is realized based on the processing method described below.

(1)MHデコーダとプリンタの同期はMHコードのELと
プリンタの1ライン毎の同期信号である水平同期信号と
で行なう。
(1) The MH decoder and the printer are synchronized with the EL of the MH code and the horizontal synchronizing signal which is a synchronizing signal for each line of the printer.

(2)第1レジスタ103内において「頭出し完了」してデコ
ード済となつたMHコードを掃出し、後続のMHコードを
「頭出し完了」の位置までシフトする方法として、掃出
すべきコードによってジャンプ・シフト及びシリアル・
シフトの2種類の方法のうちのどちらかを使用するよう
にする。
(2) Jumping by the code to be swept out as a method of sweeping out the MH code that has been “delayed” and decoded in the first register 103 and shifting the subsequent MH code to the “cueing completed” position・ Shift and serial ・
Use one of two methods of shifting.

この2点を達成するための具体的な構成を図面を用いて
説明する。
A specific configuration for achieving these two points will be described with reference to the drawings.

第8図は第1図に出力部の例として示したレーザ・ビー
ム・プリンタの一実施例の構成を示す斜視図である。
FIG. 8 is a perspective view showing the configuration of an embodiment of the laser beam printer shown as an example of the output section in FIG.

このプリントはレーザ光を用いた電子写真方式によるも
のであり、201はハウジングHa内に可回動に支持され
た感光ドラムである。202はレーザ光Laを出射する半
導体レーザであり、出射されたレーザ光Laはビームエ
キスパンダ203に入射せしめられ、所定のビーム径をも
ったレーザ光となる。更にレーザ光は鏡面を複数個有す
る多面体ミラー204に入射される。多面体ミラー204は定
速回転モータ205により所定速度で回転される。多面体
ミラー204によってビームエキスパンダ203より出射した
レーザ光は実質的に水平に走査される。そしてf−θ特
性を有する結像レンズ206により、帯電器213により所定
の極性に帯電されている感光ドラム201上にスポット光
として結像される。
This print is based on an electrophotographic method using laser light, and 201 is a photosensitive drum rotatably supported in the housing Ha. Reference numeral 202 denotes a semiconductor laser that emits laser light La, and the emitted laser light La is made incident on the beam expander 203 and becomes a laser light having a predetermined beam diameter. Further, the laser light is incident on the polyhedral mirror 204 having a plurality of mirror surfaces. The polyhedral mirror 204 is rotated at a predetermined speed by a constant speed rotation motor 205. The laser light emitted from the beam expander 203 is scanned substantially horizontally by the polygon mirror 204. Then, an image is formed as spot light on the photosensitive drum 201 charged to a predetermined polarity by the charger 213 by the image forming lens 206 having the f-θ characteristic.

207は反射ミラー208によって反射されたレーザ光を検知
するビーム検出器で、この検出信号により感光ドラム20
1上に所望の光情報を与えるため半導体レーザ202の変調
動作のタイミングを決定する。
A beam detector 207 detects the laser light reflected by the reflection mirror 208, and the photosensitive drum 20 is detected by this detection signal.
The timing of the modulation operation of the semiconductor laser 202 is determined in order to give desired optical information on 1.

感光ドラム201上に結像走査されたレーザ光により感光
ドラム201上に高解像度の静電潜像が形成される。この
潜像は現像器209により顕画化された後、カセット210,2
11のいずれかに収納されている記録材に転写され、更に
定着器212を記録材が通ことにより像は記録材に定着さ
れハードコピーとして不図示の排出部に排出される。
A high-resolution electrostatic latent image is formed on the photosensitive drum 201 by the laser light image-formed and scanned on the photosensitive drum 201. This latent image is visualized by the developing device 209, and then the cassette 210, 2
The image is transferred onto a recording material housed in any one of 11, and the recording material is further passed through a fixing device 212, whereby the image is fixed on the recording material and is ejected as a hard copy to an ejection portion (not shown).

第9図に第8図の半導体レーザを所定の画像信号により
変調するためのプリンタ回路の一実施例を示す。
FIG. 9 shows an embodiment of a printer circuit for modulating the semiconductor laser of FIG. 8 with a predetermined image signal.

復号処理されて入力端子INから入力された画像信号VI
DEOは1走査分の画像信号群毎に少なくとも1走査分の
画素数に等しい数のビット数を持つシフトレジスタ等か
らなる第1ラインバッファ301及び第2ラインバッファ3
02にバッファスイッチ制御回路303の制御により交互に
入力される。
Image signal VI decoded and input from input terminal IN
DEO is a first line buffer 301 and a second line buffer 3 each including a shift register having a number of bits equal to the number of pixels for at least one scan for each image signal group for one scan.
The signals are alternately input to 02 under the control of the buffer switch control circuit 303.

更に、第1ラインバッファ301及び第2ラインバッファ3
02に入力された画像信号はビーム検出器304からのビー
ム検出信号をトリガ信号として1走査分毎に交互に読出
され、レーザドライバ305に加えられる。
Furthermore, the first line buffer 301 and the second line buffer 3
The image signal input to 02 is alternately read for each scanning by using the beam detection signal from the beam detector 304 as a trigger signal and applied to the laser driver 305.

レーザドライバ305はレーザ光の発光を制御すべく入力
した画像信号に基づき半導体レーザ306を変調制御す
る。
The laser driver 305 modulates and controls the semiconductor laser 306 based on the input image signal to control the emission of laser light.

ラインバッファを2個有することにより次々に入力され
る画像信号をいずれかのラインバッファに入力している
間に他方のラインバッファに既に格納されている画像信
号をレーザドライバ305に入力するので高速な画像信号
の入力に対応可能である。
By having two line buffers, the image signals already stored in the other line buffer are input to the laser driver 305 while the image signals input one after the other are input to the laser driver 305. It is possible to handle the input of image signals.

又、ビーム検出器304からのビーム検出信号は水平同期
信号HSYNCとして復号処理回路にも伝達され、後述の如
く、復号処理とプリンタ動作との同期合せに用いられ
る。
The beam detection signal from the beam detector 304 is also transmitted to the decoding processing circuit as the horizontal synchronization signal HSYNC, and is used for synchronization between the decoding processing and the printer operation as described later.

尚、本プリンタにおいて復号化された画像信号は2つの
ラインバッファ、即ち、第1ラインバッファ301及び第
2ラインバッファ302によるダブルバッファ構成のバッ
ファを介して入力される。このダブルバッファ構成を用
いて復号動作に誤まりがあった場合の補正動作を行な
う。つまり、復号回路により復号された画像信号を一方
のラインバッファに格納中、復号動作に誤まりが生じた
場合、誤まりのあった現ラインの画像信号によるプリン
ト動作を禁止し、他方のラインバッファに既に格納され
ている前ラインの画像信号によりプリント動作する。
The image signal decoded by the printer is input via two line buffers, that is, a double-buffered buffer including a first line buffer 301 and a second line buffer 302. This double buffer configuration is used to perform the correction operation when there is an error in the decoding operation. That is, if an error occurs in the decoding operation while the image signal decoded by the decoding circuit is being stored in one of the line buffers, the printing operation by the image signal of the current line in which the error occurred is prohibited and the other line buffer The printing operation is performed by the image signal of the previous line already stored in.

これにより、復号誤まりのあつた画像信号によるプリン
トがなされないので、再生画像への影響を除去できる。
尚、この補正動作により同一画像信号による画像が少な
くとも2ライン重複してしまうことになるが、本例に用
いた高解像度(例えば16pel/mm)の記録動作において
は再生画像にそれほど影響を与えるものではない。
As a result, printing is not performed due to the image signal that has been erroneously decoded, so that it is possible to remove the influence on the reproduced image.
It should be noted that at least two lines of images by the same image signal are overlapped by this correction operation, but in the high-resolution (for example, 16 pel / mm) recording operation used in this example, the reproduced image is greatly affected. is not.

第4図において105は第1図示のMHコード・テーブルROM
であり、実際には複数個のRM(リード・オンリ・メ
モリ)により構成されるものである。以下にRM105
の内容を模式的に説明すると、AD0〜AD13はRM105の
アドレス端子である。又0〜O11はRM105の出
力端子である。ROM105の記憶内容のフォーマットは、レ
ジスタ103から供給されるデコードすべきMHコードのLSB
ビットをRM105のアドレス端子AD0にそろえ以下各MH
コードの各ビットをMSB方向へ順次RM105のアドレス
端子のAD1からAD11までに与える。アドレス端子AD13に
はMHコードの色別を示す信号B/-ROM(黒=1、白=
0)を与えるものとする。尚、MHコードが12ビットよ
り短い場合はその不足分のビットは無視(DON′T CAR
E)する。又ELコードはメイク・アップ・コードと
して扱う。又ランレングス1972以上のメイク・アッ
プ・コードの色別ビット(AD13)は無視)(DON′T CAR
E)とする。
In FIG. 4, 105 is the MH code table ROM shown in FIG.
In reality, it is composed of a plurality of RMs (read only memory). Below is RM105
When the contents of the above are schematically explained, AD0 to AD13 are address terminals of the RM 105. Further, 0 to O11 are output terminals of the RM105. The format of the contents stored in ROM 105 is the LSB of the MH code to be decoded supplied from register 103.
Align bits to the address terminal AD0 of RM105
Each bit of the code is sequentially applied to the ADB to AD11 of the address terminal of the RM105 in the MSB direction. A signal B / -ROM indicating the color of the MH code is input to the address terminal AD13 (black = 1, white =
0) shall be given. If the MH code is shorter than 12 bits, the insufficient bits are ignored (DON'T CAR
E) to do. The EL code is treated as a make-up code. In addition, the color code bit (AD13) of the make-up code of run length 1972 or higher is ignored) (DON'T CAR
E).

ROM105には、以上によって決めたアドレスの記憶データ
として各アドレスを与えたMHコードの内容を書き込んで
おき、各MHコードに対応した出力を出力端子O0〜O11
に出力する。即ち、出力端子0はデコードしたMHコー
ドがメイク・アップ・コードのときに「1」、ターミネ
イトコードのときに「0」となる信号M/を出力す
る。出力端子1はデコードしたMHコードがランレング
ス0の白コード(00110101)又はランレングス0の黒コー
ド(0000110111)のときに「0」を出力し、その他の時
「1」となる信号▲▼を出力する。
The contents of the MH code to which each address is given are written in the ROM 105 as the storage data of the address determined by the above, and the output corresponding to each MH code is output terminals O 0 to O 11
Output to. That is, the output terminal 0 outputs the signal M / which becomes "1" when the decoded MH code is the make-up code and "0" when the decoded MH code is the termination code. The output terminal 1 outputs a signal "0" when the decoded MH code is a white code (00110101) with run length 0 or a black code (0000110111) with run length 0, and a signal ▲ ▼ that becomes "1" at other times. Output.

出力端子2〜5は各MHコード長(ビット数)を2の
補数表現した形式の4ビット出力CL0〜CL3を出力する。
但し、出力端子5は該コード長のLSBである。出力端
子6〜11は各MHコードのランレングスを2の補数
表現した形式の6ビット出力RL0〜RL5を出力する。但
し、出力端子11は該ランレングスのLSBである。
尚、メイク・アップ・コードに対してはランレングスの
2進数表現の上位6ビットのみを出力端子〜11に
割当てる。これはMHコードにおけるメイク・アップ・コ
ードは上位6ビットのみでもそのランレングスを表現で
きるからである。第4図の402にランレングス8の白を
示すMHコードWB8(10011)をデコードした場合のROM105の
出力0〜O11を例示する(本実施例に用いるMHコード
表はCCITT YELLOW BK FascicleVII.2Rec.T.4
TABLE1/T.4及びTABLE2/T.4による)。
The output terminals 2 to 5 output 4-bit outputs CL0 to CL3 in a format in which each MH code length (the number of bits) is expressed in 2's complement.
However, the output terminal 5 is the LSB of the code length. The output terminals 6 to 11 output 6-bit outputs RL0 to RL5 in a format in which the run length of each MH code is expressed in 2's complement. However, the output terminal 11 is the LSB of the run length.
For the make-up code, only the upper 6 bits of the run length binary number expression are assigned to the output terminals to 11. This is because the make-up code in the MH code can express its run length with only the upper 6 bits. The output 0 to O11 of the ROM 105 when the MH code WB8 (10011) indicating the white of the run length 8 is decoded at 402 in FIG. 4 is illustrated (the MH code table used in this embodiment is CCITT YELLOW BK Fascicle VII.2 Rec. T.4
According to TABLE1 / T.4 and TABLE2 / T.4).

第4図において104は第1図示のMHコードデコード・ロ
ジックであり、本実施例ではアンドゲート及びオアゲー
トにより構成した検出ロジックである。ロジック104の
出力である▲▼信号はHSCコード、即ち、ランレ
ングス1,2及び3の白を示すMHコード及びランレン
グス1の黒を示すMHコードを検出した検出した時
「0」となる。また出力▲▼〜▲▼は上述
の4種のMHコード(HSCコード)の各々のコード長を
2進数で表現し、インバートして出力したものである。
第4図404にランレングス1の白を示すMHコード白1W
B1(000111)をデコードした場合の出力を例示する。
In FIG. 4, reference numeral 104 denotes the MH code decoding logic shown in FIG. 1, and in this embodiment is a detection logic constituted by an AND gate and an OR gate. The signal {circle around (1)} which is the output of the logic 104 becomes "0" when the HSC code, that is, the MH code indicating that the run lengths 1, 2 and 3 are white and the MH code indicating that the run length 1 is black are detected. The outputs ▲ ▼ to ▲ ▼ represent the code lengths of the above-mentioned four types of MH codes (HSC codes) in binary numbers, which are inverted and output.
Fig. 4 MH code white 1W showing run length 1 white in Fig. 404
An output when B1 (000111) is decoded is illustrated.

尚、HSCコードのデコード用にロジック回路を用いたの
は高速処理のための現在のROMアドレス方式では時間的
に十分対応できないからである。
The reason why the logic circuit is used for decoding the HSC code is that the current ROM address system for high-speed processing cannot sufficiently cope with time.

第3図示のビット・シフタの動作を表1及び表2に参照
して説明する。
The operation of the bit shifter shown in FIG. 3 will be described with reference to Tables 1 and 2.

第3図102は第1図示のマルチプレクサであり、2個の
トライステートのマルチプレクサ1021及び1022からな
る。マルチプレクサ102へのアキュミュレータ106からの
制御線、が「0」のときはマルチプレクサ1022側から
レジスタ103への出力A7〜A27はすべてトライステートの
フローティングとなることにより無効となり、レジスタ
103にはマルチプレクサ1021側からの出力A0〜A27が有効
となり、レジスタ103の出力C0〜C27となる。その時マル
チプレクサ1021は入力線S0〜S2によりレジスタ103から
の入力信号C0〜C27の選択動作をする。その選択のされ
方を表1に示す。例えばS0=S1=1、S2=0の場合
はレジスタ103の出力C3〜C27を取込み、夫々出力A0
〜A24として選択出力する。
FIG. 3 shows the multiplexer shown in FIG. 1 and comprises two tri-state multiplexers 1021 and 1022. When the control line from the accumulator 106 to the multiplexer 102 is "0", the outputs A7 to A27 from the multiplexer 1022 side to the register 103 are all invalidated because they become tristate floating.
The outputs A0 to A27 from the multiplexer 1021 side are valid for 103 and become the outputs C0 to C27 of the register 103. At that time, the multiplexer 1021 selects the input signals C0 to C27 from the register 103 by the input lines S0 to S2. Table 1 shows the selection method. For example, in the case of S 0 = S 1 = 1 and S 2 = 0, the outputs C 3 to C 27 of the register 103 are taken in, and the outputs A 0 respectively.
~ Output as A 24 .

次にマルチプレクサ102への制御線が「1」の時は、
マルチプレクサ102の出力A0〜A6は制御線が「0」の
時と同じにマルチプレクサ1021から入力線S0〜S2により
選択的に与えられる。マルチプレクサ102からの出力A7
〜A27のうち表2でYで示す以外はマルチプレクサ1022
側が有効となり、マルチプレクサ1021側の出力A7〜A27
のうち表2でYで示す以外はフローティングとなり無効
となる。又マルチプレクサ1022からレジスタ103に与え
られる出力A7〜A27は表2に示す如く、マルチプレクサ1
022への入力線Σ0〜Σ2により選択されるが、但し、表
2においてYで示すビットはマルチプレクサ1021側から
選択される。このYの数はマルチプレクサ1022への入力
線Σ0〜Σ2に対応して出力される入力線ST7〜ST11によ
りマルチプレクサ1021のトライステート状態をコントロ
ールすることにより設定される。なお第3図のマルチプ
レクサ1021及び1022の回路は市販のマルチプレクサ(例
えば米国フェアチャイルド社製IC,F215等)及びケート
回路等により容易に実現できる。又、マルチプレクサ10
2においてレジスタ103への出力としてA0〜A27に選択さ
れた出力はクロックCKによりレジスタ103にラッチさ
れる。
Next, when the control line to the multiplexer 102 is "1",
The outputs A0 to A6 of the multiplexer 102 are selectively given from the multiplexer 1021 by the input lines S0 to S2 in the same manner as when the control line is "0". Output A7 from multiplexer 102
~ A27 multiplexers other than those indicated by Y in Table 2
Side becomes valid, and outputs A7 to A27 from the multiplexer 1021 side
Of those, those other than those indicated by Y in Table 2 become floating and invalid. Further, as shown in Table 2, outputs A7 to A27 given from the multiplexer 1022 to the register 103 are the multiplexer 1
It is selected by the input lines Σ0 to Σ2 to 022, but the bit indicated by Y in Table 2 is selected from the multiplexer 1021 side. The number of Y is set by controlling the tri-state state of the multiplexer 1021 by the input lines ST7 to ST11 output corresponding to the input lines Σ0 to Σ2 to the multiplexer 1022. The circuits of the multiplexers 1021 and 1022 in FIG. 3 can be easily realized by a commercially available multiplexer (for example, IC, F215 manufactured by Fairchild, USA) and a gate circuit. Also, the multiplexer 10
The outputs selected by A0 to A27 as outputs to the register 103 in 2 are latched in the register 103 by the clock CK.

以上の様にビット・シフタを構成し、記憶回路101より
16ビットパラレルに入力するMHコード信号に対する
任意のビット数分のシフトを可能とする。これにより、
コード長の不揃いなMHコードを前述の「頭出し完了」
状態にすることができる。
By configuring the bit shifter as described above, it is possible to shift the MH code signal input from the memory circuit 101 in 16-bit parallel by an arbitrary number of bits. This allows
For MH codes with irregular code lengths, the above-mentioned "cue completed"
Can be in a state.

前述した如くMHコードが何であるかを判別するのはレジ
スタ103内を移動するコード列を監視する方法をとって
いるが、その移動方法はビット・シフタ102等により1
ビットずつ移動するシリアルシフト及びHSCコードとし
て扱われるMHコードが検出された場合の最大6ビットの
ジャンプシフトが起る。即ち103レジスタ内のコード列
は最大でも6ビット以下の移動しか1クロック時間には
できないように制御されている。
As described above, what is the MH code is determined by observing the code string moving in the register 103. The moving method is 1 by the bit shifter 102 or the like.
A maximum 6-bit jump shift occurs when a serial shift that moves bit by bit and an MH code that is treated as an HSC code are detected. That is, the code string in the 103 register is controlled so that the maximum movement is 6 bits or less in one clock time.

従ってEOLコード(000000000001)はレジスタ103内を移動
する際、前からの経過で誤った移動量であってもそのLS
Bビットは必ずレジスタ103のC0〜C5に現われることにな
るのである。
Therefore, when the EOL code (000000000001) moves in the register 103, even if the movement amount is incorrect from the previous time, the LS
The B bit always appears in C0 to C5 of the register 103.

さて、一般にMHコードを復号する際、そのコード体系か
らして、ELコードの検出が極めて重要である。以
下、第1図示のEOL検出回路112を詳細に説明する。
Now, generally, when decoding an MH code, detection of the EL code is extremely important due to its code system. Hereinafter, the EOL detection circuit 112 shown in FIG. 1 will be described in detail.

即ち、EOLコードは画像1ライン毎の区切りのコードで
あると同時にそれに続く、MHコードのIを示す役割を持
っているわけであるが、故にデコードの際EOLコードを
検出ミスとすると直ちにそれに続く各MHコードの区切り
が不明となり1ライン分の画像がデコード不可能とな
り、又、続く各画像ラインのEOLもその検出法に依って
は検出できなくなり結局、プリント出力した画像が乱れ
て殆んど使用できない程度まで波及することになる。
That is, the EOL code is a code that separates each line of the image, and at the same time, it has the role of indicating the I of the MH code that follows it. Therefore, if the EOL code is detected as a detection error during decoding, it immediately follows it. The delimiter of each MH code becomes unknown, and the image for one line cannot be decoded. Also, the EOL of each subsequent image line cannot be detected depending on the detection method, and eventually the printed image is disturbed and almost It will spread to the extent that it cannot be used.

従って、MHコード列の中でたとえ送・受信誤り等により
MHコードを多少誤っていても、EOLコードの検出に極力
誤りを起さないEOL検出方法が重要となるのである。
Therefore, in the MH code sequence, even if there is an error in sending or receiving,
Even if the MH code is a little wrong, it is important to have an EOL detection method that does not cause an error in detecting the EOL code as much as possible.

EOLコードが確実に検出されればコード誤りは画像1ラ
イン内で回復できる。
If the EOL code is reliably detected, the code error can be recovered within one image line.

第10図はEOL検出回路112の詳細な構成を示す図であ
る。第10図に示すように12ビットのELコード(0
00000000001)のLSBがレジスタ103のC0〜C5のどこにきて
も良いように少なくともレジスタの一度にシフト可能な
シフト量即ち6に対応する6種の検出ゲート1001で並列
に設ける。これによりレジスタ103内の格納データを監
視することによりELコードの検出漏れを防止してい
る。そして、EOLコードを検出した検出ゲート1001から
は夫々▲▼〜▲▼の如く、EOLコード
のレジスタ103内における位置を示す検出信号が出力さ
れる。
FIG. 10 is a diagram showing a detailed configuration of the EOL detection circuit 112. As shown in FIG. 10, a 12-bit EL code (0
In order that the LSB of (00000000001) may come anywhere in C0 to C5 of the register 103, at least six kinds of detection gates 1001 corresponding to the shift amount which can be shifted at one time of the register, that is, 6 are provided in parallel. As a result, the EL code detection failure is prevented by monitoring the data stored in the register 103. Then, the detection gate 1001 that has detected the EOL code outputs a detection signal indicating the position of the EOL code in the register 103, as shown in ▲ ▼ to ▲ ▼, respectively.

この方法によりEOLコード自身が誤りビットを含んでい
ない限りEL検出を誤る事がなくなるのである。
This method prevents the EL detection from being mistaken unless the EOL code itself includes an error bit.

従って画像コード誤りは必ず1ライン以内で回復可能で
ある。またEOLコード内に誤りビットを含む確率は画像
コード内に誤りビットを含む確率に比較しそのビット数
の割合等からして極めて低く実用上無視できる程度であ
る。
Therefore, the image code error can always be recovered within one line. In addition, the probability that the EOL code contains an error bit is extremely low compared to the probability that the error code is included in the image code, and is extremely low in practical use and can be ignored.

第11図にはEOLコード検出のための検出ゲートの詳細
を示す。図の如く、12ビットデータをパラレルに取込
む構成となつており、そのMSBを除いた11ビットのデ
ータを反転ゲートINVを介し、前述のMSBとともに12入
力のNANDゲート1002に印加する。これによりEOLコード
のデコードを行い、EOLコードがデコードされた場合に
はNANDゲート1002の出力がローレベルとなる。
FIG. 11 shows the details of the detection gate for detecting the EOL code. As shown in the figure, the configuration is such that 12-bit data is fetched in parallel, and 11-bit data excluding the MSB is applied to the 12-input NAND gate 1002 together with the above-mentioned MSB via the inversion gate INV. As a result, the EOL code is decoded, and when the EOL code is decoded, the output of the NAND gate 1002 becomes low level.

第10図のEOL検出回路112の出力0EOL〜5EOLはコードレ
ングスカウンタ107及びアキュムレータ106に伝えられ
る。アキュムレータ106はこの信号により、EOLコードの
コード長分のシフトをレジスタ103になさしめるもので
ある。
Outputs 0EOL to 5EOL of the EOL detection circuit 112 of FIG. 10 are transmitted to the code length counter 107 and the accumulator 106. Based on this signal, the accumulator 106 causes the register 103 to shift by the code length of the EOL code.

即ち第10図示のEL検出回路112はその検出位置か
らしてレジスタ103にEOLコードの前にMHコード又はF1LL
ビットがまだ残っている状態で既にEOLを検出すること
もある。従ってEOL検出回路112が検出するEOLコードの
うち信号▲▼以外のEOLコード検出信号即ち▲
▼〜▲▼を検出した場合にはアキュム
レータ106はレジスタ103におけるELコードの前の残り
コードがレジスタ103から前述のシフト動作によって掃
出されたあと、ELコードのコード長分即ち12ビッ
トのシフトをレジスタ103に更に行なわせる。
That is, the EL detection circuit 112 shown in the tenth figure shows the MH code or F1LL before the EOL code in the register 103 from the detection position.
EOL may already be detected with bits still remaining. Therefore, among the EOL codes detected by the EOL detection circuit 112, EOL code detection signals other than the signal ▲ ▼, that is, ▲
When ▼ to ▲ ▼ are detected, the accumulator 106 shifts the code length of the EL code, that is, 12 bits after the remaining code before the EL code in the register 103 is swept from the register 103 by the shift operation described above. The register 103 is made to perform further.

これによりEOLコードを掃出し終え、復号すべき次ライ
ンの先頭の画像MHコードの「“頭出し完了”」の状態と
なる。またこれにより画像情報ではないEOLコードを他
の圧縮コードと同様に復号動作することによる時間無駄
も除去できる。
As a result, the EOL code has been swept out, and the state of the "image heading completed" of the image MH code at the beginning of the next line to be decoded is set. Further, by doing so, it is possible to eliminate the waste of time due to the decoding operation of the EOL code which is not the image information similarly to other compressed codes.

次に第1図に示したブロック全体の詳細な説明を第5図
等を用いて行なう。第5図に掲げた回路の動作は複雑で
あるので、説明を容易にする為に、いくつかの条件設定
し、更に一般的と思われるMHコードの復号動作を例にし
て、また、該回路の基本的動作の説明を行ない、その
後、前記設定条件の成立に関して説明するものとする。
Next, a detailed description of the entire block shown in FIG. 1 will be given with reference to FIG. Since the operation of the circuit shown in FIG. 5 is complicated, some conditions are set to facilitate the explanation, and the decoding operation of the MH code which is considered to be more general is taken as an example. The basic operation will be described, and then the establishment of the setting condition will be described.

復号されるべき、MHコード列の一例として第2図(b)を
用いる事とする。そして本回路の動作原理として、プリ
ンタの水平同期信号HSYNCが来る前までに、第2図(b)の
先に現れるELコードは第3図示のレジスタ103から
前述のビット・シフト動作により掃出され、ELの次
のMHコード(即ち、これからデコードしようとするライ
ンの最初の画像信号のMHコード)である白のランレング
ス8を示すMHコードWB8がレジスタ103に前述の如く「頭
出し完了」の状態でプリンタからのHSYNC待ちとなって
いるとする。
FIG. 2 (b) is used as an example of the MH code string to be decoded. As a principle of operation of this circuit, before the horizontal synchronizing signal HSYNC of the printer arrives, the EL code appearing at the end of FIG. 2 (b) is swept from the register 103 shown in FIG. 3 by the bit shift operation described above. , MH code WB8 indicating the white run length 8 which is the MH code next to EL (that is, the MH code of the first image signal of the line to be decoded from now on) is stored in the register 103 as "cue completed" as described above. Suppose that the printer is waiting for HSYNC from the printer.

第6図は第5図回路の主要部のタイム・チャートであ
る。第6図においてHSYNC601は前述のプリンタの主走査
方向の同期信号であり、主走査1ライン毎に発生され
る。これをタイム・チャートの基準とし、この時刻t
とする。CK600は基本クロックであり、その周波数は画
像周波数と同じである。VEN602は主走査線内の有効画像
区間を規定する区間信号である。またiNi603は区間信号
VENの始まる1クロック(1ビット)前のパルス、EOS60
4は区間信号VENの最終クロック(ビット)のパルスであ
る。
FIG. 6 is a time chart of the main part of the circuit shown in FIG. In FIG. 6, HSYNC601 is a synchronizing signal in the main scanning direction of the printer described above, which is generated for each main scanning line. Using this as the reference for the time chart, this time t 0
And CK600 is the basic clock, and its frequency is the same as the image frequency. VEN602 is a section signal that defines the effective image section within the main scanning line. INi603 is a section signal
A pulse one clock (1 bit) before VEN starts, EOS60
4 is a pulse of the last clock (bit) of the section signal VEN.

尚、前述した様に、圧縮コード(MHコード)を復号した
画信号に基ずく記録動作をレーザ・ビーム・プリンタで
行なう場合、水平同期信号HSYNCはレーザ光によるラス
タスキャンのスキャンラインの所定位置に、レーザ光が
達したことを検知したビーム検知信号に基ずくものであ
り、また、区間信号VENはレーザ光によりスキャンされ
て潜像形成のなされる感光体(ドラム)をレーザ光がス
キャンしている区間に基ずく。
As described above, when the recording operation based on the image signal obtained by decoding the compressed code (MH code) is performed by the laser beam printer, the horizontal synchronization signal HSYNC is set at a predetermined position of the scan line of the raster scan by the laser light. , Is based on the beam detection signal that detects the arrival of the laser beam, and the section signal VEN is scanned by the laser beam and the laser beam scans the photoconductor (drum) on which a latent image is formed. Based on the section.

これらから明らかなように第6図における各信号600〜6
04の時間的関係は一般に一定値に固定されるべきもので
ある。そして本例ではHSYNC601とiNi603の間を64クロ
ックの固定長とする。またVEN602の区間は1ラインの画
素数となるが本例ではそれを4096ビット(画素)とす
る。
As is clear from these, the signals 600 to 6 in FIG.
The time relationship of 04 should generally be fixed to a fixed value. In this example, a fixed length of 64 clocks is set between HSYNC601 and iNi603. In addition, the section of VEN602 has the number of pixels of one line, but in this example, it is 4096 bits (pixels).

第6図において、時刻tでは第6図の回路は画像出力
の各主走査毎のイニシアル状態に設定されている。即
ち、前述の如く各ライン毎の先頭画像のMHコード(本例
では白のランレングス8を示すWB8(10011))がレジスタ
103に「頭出し完了」であり、該レジスタ103の出力・C0
〜C12(本例では(10011.0010.0001)
はロジック104、ROM105等に与えられている。
In FIG. 6, at time t 0 , the circuit of FIG. 6 is set to the initial state for each main scanning of image output. That is, as described above, the MH code (WB8 (10011) indicating the white run length 8 in this example) of the head image of each line is registered.
103 is "cue completed", and the output of the register 103-C0
~ C12 ((10011.0010.0001) in this example)
Are provided to the logic 104, ROM 105, etc.

又、同じくコードレングスカウンタ107の値は(-1)=(11
11B)となっている。この際(-1)は「頭出し完了」を意味
すると定義されている。又、各フリップフロップ510,10
9,515はリセット状態、フリップフロップ509はセット状
態にある。
Similarly, the value of the code length counter 107 is (-1) = (11
11B). At this time, (-1) is defined to mean "cue completion". Also, each flip-flop 510,10
9,515 is in a reset state and flip-flop 509 is in a set state.

フリップ・フロップ509がセットされている(Q=1)ことは
MH・コードのEOLを検出した后、レジスタ103からEOLコ
ードの掃出しを完了した状態にある事を示す。また、フ
リップ・フロップ510がセットされている(Q=1)の状態は
後述するように、ランレングス・ラッチ513がビジー(B
usy)であることを示す。フリップ・フロップ515はB/
−ROM信号を出力Qとして出力する。このフリップ・
フロップ515の出力は1のときにこれから復号すべきMH
・コードの色が黒であることを示すB/−ROM信号で
ある。同じく出力Qが0のときは白であることを示す。
Flip-flop 509 is set (Q = 1)
After detecting the EOL of the MH code, it indicates that the sweeping of the EOL code from the register 103 is completed. In addition, when the flip-flop 510 is set (Q = 1), the run length latch 513 is busy (B = 1) as described later.
usy). F / Flip 515 is B /
Output ROM signal as output Q. This flip
When the output of flop 515 is 1, MH to be decoded from now
-B / -ROM signal indicating that the color of the code is black. Similarly, when the output Q is 0, it indicates white.

又、ランレングス・カウンタ108は停止しているとし、
その値は0であるとする。SFTEN605はコントロール線で
これが1であることはレジスタ103がデータ(MHコー
ド)をシフトさせて良い事を示す。又簡単の為、アキュ
ミレータ106の出力信号Σ0〜Σ2及び信号は0である
と仮定する。即ち、この仮定によりレジスタ103の28
ビット全てが有効なMHコード列であり、空のない状態を
示すこととなる。
Also, assume that the run length counter 108 is stopped,
The value is assumed to be 0. SFTEN605 is a control line, and when this is 1, it means that the register 103 may shift data (MH code). Further, for simplicity, it is assumed that the output signals Σ0 to Σ2 and the signal of the accumulator 106 are zero. That is, according to this assumption, 28 of register 103
All bits are a valid MH code string, indicating a non-empty state.

以上が時刻tの状態である。The above is the state at time t 0 .

さて、時刻t1になると第6図示のHSYNC信号601の立下
がりにより第5図示フリップフロップ509がリセットさ
れ、第6図に613で示す▲▼信号が1となりAND
・ゲート508を介してSFTEN信号605が1となる。SFTEN信
号605が1の場合は第6図示のカウンタ107がカウントイ
ネーブルとなる。同時に時刻t1にはROM105のアドレス
にはレジスタ103の保持する出力C0〜C12が与えられる。
(本例では10011××××××××)そしてRM105の
出力のうちコード・レングスCL0〜CL3はゲート503及び
ゲート504を経て、コード・レングス・カウンタ107に与
えられている。又同時に▲▼信号607が0である
のでカウンタ107はロード・モードとなりt1のクロック
によりCL0〜CL3の値がカウンタ107にロードされる。本
例ではランレングス8の白を示すMHコードWB8のコード
長5の2の補数である(-5)がロードされる。
Now, at time t 1 , the flip-flop 509 shown in FIG. 5 is reset by the fall of the HSYNC signal 601 shown in FIG. 6, and the signal ▲ ▼ shown in FIG.
-SFTEN signal 605 goes to 1 through gate 508. When the SFTEN signal 605 is 1, the counter 107 shown in FIG. 6 is count enable. At the same time, the outputs C0 to C12 held by the register 103 are given to the address of the ROM 105 at time t 1 .
(10011 ×××××××× in this example), and among the outputs of the RM 105, the code lengths CL0 to CL3 are given to the code length counter 107 via the gate 503 and the gate 504. At the same time, since the signal 607 is 0, the counter 107 enters the load mode and the values of CL0 to CL3 are loaded into the counter 107 by the clock of t 1 . In this example, (-5) which is the two's complement of the code length 5 of the MH code WB8 indicating the white of the run length 8 is loaded.

又、RM105の出力RL0〜RL5及びM/はランレング
ス・ラッチ513の入力として与えられる。同時にランレ
ングス・ラッチ513にはフリップフロップ515のQ出力も
B/−ROM信号620として入力されている。この時、RL
CH信号608が1によりラッチ513をラッチ・イネーブルに
制御し、t1のクロックでD0〜D7の値をラッチ513にラッ
チする。
The outputs RL0 to RL5 and M / of RM105 are provided as inputs to run length latch 513. At the same time, the Q output of the flip-flop 515 is also input to the run length latch 513 as the B / -ROM signal 620. At this time, RL
The CH signal 608 controls the latch 513 to be latch enable by 1 and latches the values of D0 to D7 in the latch 513 at the clock of t 1 .

同時に時刻t1ではフリップ・フロップ510は1にセット
される。又、フリップ・フロップ515は反転する。フリ
ップ・フロップ510のQ出力であるBUSY信号609が1であ
ることはラッチ513が有効なランレングスをラッチして
いる事を示す。又、フリップ・フロップ515のQ出力で
あるB/−RM信号620が1であることは次にレジ
スタ103に「頭出し完了」にすべきMHコードの示す色が
黒である事を示す。(又、B/−RM信号620が0
であるならば該色が白である。) SFTEN信号605はゲート505、ゲート506を経て、S信号
としてマルチ・プレクサ102に与えられレジスタ103のデ
ータが1ビットシフトするようにコントロールする。こ
れによりレジスタ103にあつたMHコードから必要なデー
タの後段への受渡しが終ったので該MHコードは使用済と
なり、SFTEN信号605によりカウント可能になったカウン
タ107の制御下で第6図タイムチャートに示す如くカウ
ンタ107からキャリアウト信号CRO606が発生する迄ビッ
ト・シフトが行なわれて、使用済のMHコードがレジスタ
103から掃出される。即ち本例では−5の設定されたカ
ウンタ107の値が(-1)の値になるまでレジスタ103の1ビ
ット・シフトを繰返し続行する。
At the same time, flip-flop 510 is set to 1 at time t 1 . Also, flip-flop 515 is inverted. The BUSY signal 609, which is the Q output of flip-flop 510, is one, indicating that latch 513 is latching a valid run length. When the B / -RM signal 620, which is the Q output of the flip-flop 515, is 1, it indicates that the color indicated by the MH code that should be "cue completed" in the register 103 is black. (Also, the B / -RM signal 620 is 0
, The color is white. The SFTEN signal 605 is applied to the multiplexer 102 as an S signal via the gates 505 and 506 and controls so that the data in the register 103 is shifted by 1 bit. As a result, the transfer of the necessary data from the MH code in the register 103 to the subsequent stage is completed, so that the MH code is used and can be counted by the SFTEN signal 605. Bit shift is performed from the counter 107 until the carry-out signal CRO606 is generated, and the used MH code is registered in the register.
Swept from 103. That is, in this example, the 1-bit shift of the register 103 is repeatedly continued until the value of the counter 107 set to -5 becomes the value of (-1).

カウンタ107の値が(-1)になると今、使用済となったMH
コード(本例ではランレングス8の白を示すMHコードWB
8)の掃出しが終了し、次のMHコード(ランレングス6
の黒を示すMHコードBB6)がレジスタ103)において「頭
出し完了」となるがラッチ513にはまだ、前のMHコードW
B8のランレングスが残っているためフリップ・フロップ
510はセットのままである。従って、カウンタ107のCRO
信号が1となることによりゲート511の出力は0にな
り、結局SFTEN信号605が0となることにより、カウンタ
107が停止する。同様にSFTEN信号が605が0となること
によりS0〜S2信号も全て0となり、レジスタ103がシフ
ト停止しデータがホールドされる。従って「頭出し完
了」BB6の状態が時刻t2まで続く。
When the value of the counter 107 becomes (-1), the MH that has been used now
Code (MH code WB that indicates white with run length 8 in this example)
After the sweep of 8) is completed, the next MH code (run length 6
The MH code BB6) that indicates the black color is “Completed at the beginning” in the register 103), but the previous MH code W still appears in the latch 513.
Flip flop due to remaining run length of B8
The 510 remains the set. Therefore, the CRO of counter 107
When the signal becomes 1, the output of the gate 511 becomes 0, and eventually the SFTEN signal 605 becomes 0, so that the counter
107 stops. Similarly, when the SFTEN signal is set to 0, the S0 to S2 signals are all set to 0, the register 103 stops shifting, and the data is held. Therefore, the state of “cue completion” BB6 continues until time t 2 .

時刻t2に於いてiNi信号603により▲▼信号610が
0となり、ラッチ513に保持されていたランレングス
(本例では白の8ビット)がマルチプレクサ514を経て
▲▼信号610によりカウンタ108へ移される。同時
にフリップ・フロップ510が▲▼信号610によりリ
セットされる。これによりラッチ513が空となり、ビジ
ー(BUSY)が解消される。従って、ゲート511の出力が
1となり前述と同様にSFTEN信号605が1となり、レジス
タ103において「頭出し完了」となつているMHコードに
よつて得られるランレングスがラッチ513へラッチされ
る。
At time t 2 , the iNi signal 603 causes the ▲ ▼ signal 610 to become 0, and the run length (8 bits of white in this example) held in the latch 513 is transferred to the counter 108 by the ▼ signal 610 via the multiplexer 514. Be done. At the same time, the flip-flop 510 is reset by the signal 610. As a result, the latch 513 is emptied and the busy state is canceled. Therefore, the output of the gate 511 becomes 1 and the SFTEN signal 605 becomes 1 in the same manner as described above, and the run length obtained by the MH code which is "cue completed" in the register 103 is latched in the latch 513.

以下同様にMHコードが順次デコードされる。Similarly, the MH code is sequentially decoded thereafter.

時刻t2でカウンタ108へロードされたランレングス(本
例では−5)に基き、時刻t2の次のビットから発生す
るVEN信号602によりカウンタ108はカウントを開始す
る。そしてカウンタ108の値が(-1)になつた時(本例で
は時刻t3)CR1信号611を出す。又、ラッチ513からのB
/信号621により指定された画像の色別にフリップ・
フロップ109をセットする。これによりとりあえず第1
番目のMHコードが画像VIDE0(本例では白の8ビット)
に変換できたわけである。
Based on the run length (-5 in this example) loaded into the counter 108 at time t 2 , the VEN signal 602 generated from the next bit at time t 2 causes the counter 108 to start counting. And issue a CR1 signal 611 (time t 3 in this example) when the value of the counter 108 has decreased to (-1). Also, B from the latch 513
/ Flip by color of image specified by signal 621
Set flop 109. As a result, the first
The second MH code is the image VIDE0 (white 8 bits in this example)
I was able to convert to.

尚、VEN信号602の立上り後においては、ii信号603は新
たなHSYNC601が到来する迄、0のままである。従ってVE
N信号602の立上り後、例えば時刻t3においてはiNi信号
603に代って、カウンタ108のカウントアップを示すCR1
信号611によりフリップ・フロップ510をリセットし、そ
のビジー状態を解除せしめ、続くMHコードのデコードに
より得たランレングスのラッチ513への取込みを可能と
する。
After the rising edge of the VEN signal 602, the ii signal 603 remains 0 until a new HSYNC 601 arrives. Therefore VE
After the rising of the N signal 602, for example, at time t 3 , the iNi signal
CR1 instead of 603, indicating a count-up of counter 108
The signal 611 resets the flip-flop 510 to release its busy state, and the run length obtained by the subsequent decoding of the MH code can be taken into the latch 513.

さてここまでの説明においては、MHコードのコード長が
ランレングス長より等しいか、又は短かい場合であり、
MHコードを「頭出し完了」の時点から、レジスタ103か
ら掃出すべき使用済のMHコードをマルチプレクサ102に
与えられる信号S0=1,S1=S2=0とすることによりシ
リアルシフトすれば、MHコードを途切れることなくデコ
ードを続けられるわけであるが、しかし、一方、MHコー
ドのランレングス長がコード長より短かい場合には前述
の如くシリアルシフトさせるとレジスタ103からコード
を掃出している間(シフト中0に、カウンタ108におい
て、該MHコードのランレングスのカウントが完了してし
まう。この時点において画像の途切れをなくすためには
次のランレングスをラッチ513からカウンタ108へ取る必
要がある。しかし、レジスタ103では次のMHコードに対
する「頭出し完了」状態となっていないので、ラッチ51
3には取込むべき、ランレングスがROM105より出力され
ていないことになる。
By the way, in the above description, the code length of the MH code is equal to or shorter than the run length length,
If the used MH code to be swept out from the register 103 is serially shifted by setting the signals S0 = 1, S1 = S2 = 0 from the time point of “completion of cueing” the MH code, the MH code can be obtained. However, if the run length length of the MH code is shorter than the code length, serial shift as described above can be performed while sweeping the code from the register 103 (shift In the middle 0, the count of the run length of the MH code is completed in the counter 108. At this point, the next run length needs to be taken from the latch 513 to the counter 108 in order to eliminate the discontinuity of the image. Since the register 103 is not in the “cue completion” state for the next MH code, the latch 51
The run length that should be captured in 3 is not output from ROM 105.

結局この場合、プリンタにおいて記録される画像が途切
れる事になり、リアルタイムで画像を出力することがで
きない事になる。この様な不都合は前述したHSCコー
ド、即ち、ランレングス1,2及び3の白を示すMHコー
ドとランレングス1の黒を示す、MHコードのデコードの
際に生じる。
After all, in this case, the image recorded by the printer is interrupted, and the image cannot be output in real time. Such inconvenience occurs when decoding the above-mentioned HSC code, that is, the MH code indicating that the run lengths 1, 2 and 3 are white and the MH code indicating that the run length 1 is black.

そこで、この様な場合は、前述の4種のHSCコードであ
るMHコードだけはMHコード・デコード・ロジック104を
用いて、ROM105からのコード長データCL0〜CL3によりシ
ルアル・シフトしたと等価に後段の回路を動作せしめ
る。即ち、カウンタ107に(-1)をロードできるようにロ
ジック104は▲▼信号により、ロード値(-1)をつ
くりゲート504を介してカウンタ107にロードする。又、
このときROM105からの出力CL0〜CL3は▲▼信号に
よりゲート503にてイン ビットする。又、ロジック104
からの出力SF1とSF2にデコードしたMHコードのコード長
に対応したジャンプ量を▲▼〜▲▼として
出力しS0〜S2を経てマルチプレクサ102を動作する。こ
れにより1ビットの時間で複数ビットのシフトを行なう
ことが可能となり、換言すれば1ビットの時間でデコー
ドすべき次のコードのレジスタ103における「頭出し完
了」ができるようになる。またこのジャンプ量はアキュ
ムレータ106にも入力され、レジスタ103の空ビット数に
累積加算される。
Therefore, in such a case, only the MH code, which is the above-mentioned four types of HSC code, is serially shifted by the code length data CL0 to CL3 from the ROM 105 using the MH code decoding logic 104, and the latter stage is equivalent. Activate the circuit of. That is, the logic 104 generates a load value (-1) by the signal and loads it into the counter 107 through the gate 504 so that the counter 107 can be loaded with (-1). or,
At this time, the outputs CL0 to CL3 from the ROM 105 are inverted by the gate 503 by the signal. Also, logic 104
Outputs the jump amount corresponding to the code length of the decoded MH code to SF1 and SF2 as ▲ ▼ to ▲ ▼, and operates the multiplexer 102 via S0 to S2. As a result, it is possible to shift a plurality of bits in 1 bit time, in other words, it is possible to "cue out" in the register 103 of the next code to be decoded in 1 bit time. This jump amount is also input to the accumulator 106 and is cumulatively added to the number of empty bits in the register 103.

以上2通りのシフト方法により「頭出し完了」から「ラ
ンレングスラッチ」更に「ランレングスカウント」の一
連の動作を高速に繰返し、プリンタ部に供給する画像が
とぎれることなく、復号を実行する。112はEOL検出回路
でレジスタ103の出力C0〜C11にEOLコードが現われたこ
とを検出すると信号0EOL信号を出力する。そして1ラ
インの終了を示すEOLコードがEOL検出回路112で検出さ
れると、タイミング合せ回路523を介してEOL検出回路11
2からの信号0EOLにより、フリップ・フロップ509がセ
ットされ▲▼信号613が0となる。これによ
り、結局SFTEN信号605が0となり、次のHSYNCが来るま
でレジスタ103は停止し、MHコードは「頭出し完了」の
状態でHSYNC待ちとなることとなる。この様に、プリン
タと復号動作との同期合せが良好に得られるものであ
る。
By the above two shift methods, a series of operations from "cue completion" to "run length latch" and "run length count" are repeated at high speed to execute decoding without interrupting the image supplied to the printer unit. An EOL detection circuit 112 outputs a signal 0 EOL signal when detecting that an EOL code appears at the outputs C0 to C11 of the register 103. When the EOL code indicating the end of one line is detected by the EOL detection circuit 112, the EOL detection circuit 11 is passed through the timing adjustment circuit 523.
The signal 0EOL from 2 sets the flip-flop 509, and the signal 613 becomes 0. As a result, the SFTEN signal 605 eventually becomes 0, the register 103 is stopped until the next HSYNC comes, and the MH code waits for HSYNC in the state of “cue completion”. In this way, good synchronization between the printer and the decoding operation can be obtained.

以上のように各ラインごと繰返し走査が進行すれば、画
像が形成されるのである。
An image is formed by repeating the scanning for each line as described above.

次に第7図を用いてデコードエラー検出法について述べ
る。第7図示回路は第1図又は第5図の適当な位置に接
続される。第7図において、801はインバータである。
また、802は加算器、803はラッチ、804はコンパレー
タ、805はラッチ、806及び807はフリップ・フロップで
ある。
Next, the decoding error detection method will be described with reference to FIG. The circuit shown in FIG. 7 is connected to the appropriate position shown in FIG. 1 or 5. In FIG. 7, reference numeral 801 is an inverter.
802 is an adder, 803 is a latch, 804 is a comparator, 805 is a latch, and 806 and 807 are flip-flops.

第7図820は第5図において、ラッチ513からマルチプレ
クサ514を介して出力される信号820と同じ信号であり、
前述の如く、MHコードを解読した結果のランレングスが
2の補数で表現されたものである。
FIG. 7 820 is the same signal as the signal 820 output from the latch 513 through the multiplexer 514 in FIG.
As described above, the run length as a result of decoding the MH code is expressed in 2's complement.

さて、加算器802とラッチ803とでアキュミユレータを構
成する。加算器802のLSBの下位からの桁上りは829信号
(1)により1にセットされており結局加算器802の出力82
1はランレングス820の2の補数となる。従って出力821
は該ランレングスの正整数を2進数表現したものであ
る。又、ラッチ803への加算は第6図▲▼610のタ
イミング、即ち、第5図示のカウンタ108へ、カウント
すべきランレングスをロードするタイミングで加算が続
けられる。又、ラッチ803は主走査の各ライン毎に、出
力される第6図HSYNC信号601毎にクリヤされる。即ちラ
ッチ803の出力822は各ライン毎のランレングスの累積値
を2進数で表わす。一方、ラッチ805は毎ラインの一定
ランレングス(本例では1ラインの画素数に対応する40
96)を信号824によりCPU等から知らされて保持してい
る。コンパレータ804は今ラッチ803に累積されているラ
ンレングス822(Aとする)とラッチ805からの正解値82
3(Bとする)とを比較するコンパレータ回路である。
Now, the adder 802 and the latch 803 constitute an accumulator. The carry from the lower LSB of the adder 802 is 829 signals
It is set to 1 by (1) and eventually the output 82 of the adder 802
1 is the two's complement of run length 820. Therefore output 821
Is a binary representation of the run length positive integer. The addition to the latch 803 is continued at the timing of 610 in FIG. 6, that is, the timing of loading the run length to be counted into the counter 108 shown in FIG. The latch 803 is cleared for each line of the main scan and for each HSYNC signal 601 shown in FIG. That is, the output 822 of the latch 803 represents the cumulative value of the run length for each line by a binary number. On the other hand, the latch 805 has a constant run length for each line (in this example, 40 pixels corresponding to the number of pixels on one line).
96) is held by being notified from the CPU or the like by the signal 824. The comparator 804 is the run length 822 (A) accumulated in the latch 803 and the correct answer value 82 from the latch 805.
It is a comparator circuit that compares 3 (denoted as B).

フリップ・フロップ806は第6図示のEOS信号604の出力
時、即ち、各ラインの最終ビットに於いて、コンバータ
804よりA=Bであることを示す信号831が出力されてい
ない時ANDゲート808の出力825によりセットされる。即
ち、フリップ・フロップ806のセットされることはラン
レングスの累積値Aが予定された正解値B(本例では40
96)に等しくなかったことを示し、MHコード又はそのデ
コードに誤りがあったことを示す。
The flip-flop 806 converts the EOS signal 604 shown in FIG. 6, that is, at the last bit of each line, into the converter.
It is set by the output 825 of the AND gate 808 when the signal 831 indicating that A = B is not output from 804. That is, the setting of the flip-flop 806 means that the cumulative value A of the run length is the correct correct value B (40 in this example).
96) and that the MH code or its decoding was incorrect.

フリップ・フロップ807はA>Bの状態になった場合に
コンパレータ804から出力される信号832を入力するとア
ンドゲート809の出力826によりランレングスの累積途中
でも直ちにセットされる。即ち、フリップ・フロップの
Q出力828はランレングスの累積値がラインの途中で予
定された正解値(本例では4096、即ちVEN602の区間の画
素数)を越えてしまった事を示し、これは1ラインのデ
コードの途中において既に大巾なデコード誤まりが生じ
たことを表わすものである。
When the signal 832 output from the comparator 804 is input when the state of A> B is entered, the flip-flop 807 is immediately set by the output 826 of the AND gate 809 even during the accumulation of run lengths. That is, the Q output 828 of the flip-flop indicates that the cumulative run length value has exceeded the planned correct value (4096 in this example, that is, the number of pixels in the VEN602 section) in the middle of the line. This indicates that a large erroneous decoding error has already occurred during the decoding of one line.

又、フリップ・フロップ806及び807は第6図▲
▼613が“0”即ちEL(End of line)がEOL検出
回路112により検出されHSYNC601の入力がなされるまで
リセツトされず、HSYN信号601の入力によりゲート810の
出力によりリセットされる。従って、各フリップ・フロ
ップ806,807の出力827又は出力828を検知し別途のEOL検
出回路112によりEOL検知に専念させることにより、デコ
ード誤り等による同期ズレを最小限に止める事ができ
る。
The flip-flops 806 and 807 are shown in FIG.
▼ 613 is "0", that is, EL (End of line) is not reset until the EOL detection circuit 112 detects and the HSYNC 601 is input, and is reset by the output of the gate 810 by the input of the HSYN signal 601. Therefore, by detecting the output 827 or the output 828 of each of the flip-flops 806 and 807 and devoting it to the EOL detection by the separate EOL detection circuit 112, it is possible to minimize the synchronization deviation due to a decoding error or the like.

尚、本例ではアキュムレータによりランレングスを累積
加算する例を示したが、これは所定数例えば4096から順
次ランレングス値を減算し減算カウンタからのボロウを
検出する方法等に置き換えることもできる。
In this example, the run length is cumulatively added by the accumulator, but this can be replaced with a method of sequentially subtracting the run length value from a predetermined number, for example, 4096, and detecting a borrow from the subtraction counter.

以上の様にデコード誤まりが生じ、フリップ・フロップ
806又は807がセットされると、その出力は第9図示のプ
リンタ回路のバッファスイッチ制御回路303に伝達され
る。
As described above, the decoding error occurs and the flip-flop
When 806 or 807 is set, its output is transmitted to the buffer switch control circuit 303 of the printer circuit shown in FIG.

バッファスイッチ制御回路303は前述した様にダブルバ
ッファ構成となっているプリンタのラインバッファの入
出力を交互に選択するためのバッファ選択動作を行なう
ものである。そして、フリップ・フロップ806又は807よ
りそのセット信号、即ち、デコード誤まり検出信号を入
力すると、デコード誤まりの発生した現ラインの画像信
号を無効にし、エラーのあったラインに代って前ライン
の画像信号を再利用すべく、前ラインの画像信号の格納
されているラインバッファの再読出しを行なう様、ライ
ンバッファの選択制御を行なう。即ち、例えば第1ライ
ンバッファ301に復号中の画像信号を格納している時
に、デコード誤まりが発生した場合、第1ラインバッフ
ァ301に現在格納中の画像信号を無効にし、現在、画像
信号の読出しがなされている第2ラインバッファ302の
読出しの終了後、再び、第2ラインバッファ302から同
一の画像信号の読出しを行なう。
The buffer switch control circuit 303 performs a buffer selection operation for alternately selecting the input / output of the line buffer of the printer having the double buffer structure as described above. When the set signal, that is, the decoding error detection signal is input from the flip-flop 806 or 807, the image signal of the current line in which the decoding error occurs is invalidated, and the previous line is replaced with the line in error. In order to reuse the image signal of, the line buffer selection control is performed so that the line buffer in which the image signal of the previous line is stored is reread. That is, for example, when a decoding error occurs while the image signal being decoded is being stored in the first line buffer 301, the image signal currently stored in the first line buffer 301 is invalidated, and the current image signal After the reading of the read second line buffer 302 is completed, the same image signal is read again from the second line buffer 302.

これにより、デコード誤まりの生じたラインの画像信号
によりプリント動作はなされずに、記録画像への影響を
除去できる。尚、プリンタのラインバッファの数は2本
以上でも同様に実行できる。又、この誤まり補正用のラ
インバッファをデコード回路側に設けてもよい。
As a result, the print operation is not performed by the image signal of the line in which the decoding error occurs, and the influence on the recorded image can be removed. It should be noted that even if the number of line buffers of the printer is two or more, the same process can be performed. A line buffer for correcting this error may be provided on the decoding circuit side.

さて、前述の如く本例では、MHコード化された画像をデ
コードする際には、該MHコードの先頭ELを検知し、
その後に続くコードから該画像の第1ラインとして、デ
コードを開始し、実際の画像を再生する。
Now, as described above, in the present example, when decoding the MH coded image, the head EL of the MH code is detected,
Decoding is started from the code following that as the first line of the image, and the actual image is reproduced.

なぜなら、MHコード化された画像は、本杆では図示して
いないが第1図示の記憶回路101の前段に存在する。例
えば画像メモリ等に蓄積されているものである。そこか
らCPU等により、画像メモリの読出し開始アドレスを指
定し、MHコード化された画像を読出し、記憶回路101を
介しデコード回路に与える。
This is because the MH-coded image exists in the preceding stage of the storage circuit 101 shown in the first illustration, although not shown in the present drawing. For example, it is stored in an image memory or the like. From there, the CPU or the like specifies the read start address of the image memory, reads the MH coded image, and supplies it to the decoding circuit via the memory circuit 101.

その際、画像メモリから読出されたMHコードは例えば、
画像ページの途中カラ読出した場合には必ずしも、先頭
にELコードが来ない。この場合でも正しくデコード
を開始できるように、デコード開始前に第1図示記憶回
路101をクリア状態にしておき、次に該メモリから読出
したMHコードを記憶回路101が満杯(第2図の状態)に
なるまで読出し、次いで、デコード内部へデータ(MHコ
ード)を送り始める。そして、第1番目のELコード
が検出できるまでは、画像コードとして扱わず、次々に
データを送り続けELコードを検出することに専念す
る。
At that time, the MH code read from the image memory is, for example,
When the color is read out in the middle of the image page, the EL code does not always come at the beginning. In order to start decoding correctly in this case as well, the first illustrated memory circuit 101 is set to the clear state before the decoding is started, and then the MH code read from the memory is full in the memory circuit 101 (state of FIG. 2). Until, the data (MH code) is sent to the inside of the decode. Then, until the first EL code can be detected, it is not treated as an image code, and data is sent continuously one after another, and the focus is on detecting the EL code.

そしてELコードが検出できた後には以后のコードを
画像情報として扱い、コード・レングス等によりシフト
量をコントロールしながらデコードしていくわけであ
る。このようにして第1番目のELコードを前述のEO
L検出回路112により見つける事により、MHコードの区切
りを判定し、又画像の同期的再生が可能となるのであ
る。
After the EL code is detected, the subsequent codes are treated as image information and are decoded while controlling the shift amount by the code length or the like. In this way, the first EL code is changed to the above-mentioned EO.
By finding it by the L detection circuit 112, it becomes possible to judge the delimiter of the MH code and to synchronously reproduce the image.

さて、前述のデコード動作開始後、初めて入力する第1
のEOLコードを見つける動作を開始すると記憶回路101か
ら順次レジスタ103へデータが送られて来るが、その開
始前にレジスタ103に全て“0”が存在しているとする
と実際に記憶回路101から来たMHコード又はMHコードの
一部(途中)と継がって、EOLコード(000000000001)と
誤検知されることとなる。それを避ける為レジスタ103
の初期状態は全て“1”にセットする。即ちレジスタ10
3のC0〜C27を全て“1”とする。これにより前述のE
Lの誤検知を避けることができる。
Now, the first input after the above decoding operation is started
When the operation of finding the EOL code of is started, data is sequentially sent from the memory circuit 101 to the register 103. However, if all "0" s exist in the register 103 before the start, the memory circuit 101 actually receives the data. In addition to the MH code or a part of the MH code (on the way), it will be erroneously detected as the EOL code (000000000001). Register 103 to avoid it
The initial state of is set to "1". Ie register 10
C0 to C27 of 3 are all set to "1". As a result, the above E
False detection of L can be avoided.

レジスタ103を全て“1”にプリセットする方法を説明
する。第12図にはレジスタ103の構成の一例を示すも
ので、即ち、レジスタ103は28個のフリップ・フロッ
プF/Fで構成される。従って、その全てのフリップ・フ
ロップF/Fのプリセット端子にCPU等からプリセットパル
ス901を入力し、全てのフリップ・フロップのQ出力を
1とする。ここではフリップ・フロップF/Fは例えばア
メリカTI社製のSN74S74N等を使用することができる。
A method of presetting all the registers 103 to "1" will be described. FIG. 12 shows an example of the structure of the register 103, that is, the register 103 is composed of 28 flip-flops F / F. Therefore, the preset pulse 901 is input from the CPU or the like to the preset terminals of all the flip-flops F / F, and the Q outputs of all the flip-flops are set to 1. Here, as the flip-flop F / F, for example, SN74S74N manufactured by American TI Co. can be used.

以上、本実施例はMHコードの復号を例に説明したが、他
の圧縮方法によるコードの復号装置に適用することもで
きる。また、復号後の画像信号はレーザ・ビーム・プリ
ンタ等のプリンタで画像記録される以外に、CRT等のデ
ィスプレイにて表示したり、ビットイメージとしてファ
イルしたりする等、多様な用途に利用可能である。更
に、本実施例中で用いた数値はそれに限るものではな
く、用途や環境等において適宜選択されるものであるこ
とは言う迄もない。
Although the present embodiment has been described by taking the decoding of the MH code as an example, the present embodiment can be applied to a decoding device for a code by another compression method. Also, the image signal after decoding can be used for various purposes such as displaying on a display such as a CRT or file as a bit image in addition to recording the image with a printer such as a laser beam printer. is there. Further, it goes without saying that the numerical values used in the present embodiment are not limited to those values, and may be appropriately selected depending on the application, environment and the like.

以上説明した様に圧縮コードの復号動作を確実に実行で
きるものであり、また、高速処理を必要とする画像処理
に対してもリアルタイムな復号動作を可能とするもので
ある。また、高速で且つ高品位な画像記録を必要とする
プリンタ等の出力部に対しても効果的に圧縮コードを復
号化し、供給することが可能となるものである。
As described above, the decoding operation of the compressed code can be surely executed, and the decoding operation can be performed in real time even for the image processing that requires high speed processing. Further, it is possible to effectively decode and supply the compressed code to an output unit such as a printer that requires high-speed and high-quality image recording.

また、圧縮コードの復号動作或いは伝送に係わる異常を
確実に検出することができ、また、それによる影響を最
小限にすることができるものである。
Further, it is possible to surely detect an abnormality related to the decoding operation or transmission of the compressed code, and to minimize the influence thereof.

また、圧縮コードを復号化して得た画像信号に基ずき、
プリント動作する際、プリンタと復号処理部との同期が
良好に得られるものである。
Also, based on the image signal obtained by decoding the compressed code,
When the printing operation is performed, good synchronization can be obtained between the printer and the decoding processing unit.

また、復号動作の基準となるライン同期コードの検出を
確実に行ない、復号動作の同期ずれ等の不都合を除去で
きるものである。
Further, it is possible to surely detect the line synchronization code which is the reference of the decoding operation, and to eliminate the inconvenience such as the synchronization deviation of the decoding operation.

また、1ページ或いは1ラインの途中から圧縮コードが
復号回路に供給されたとしても、復号動作におけるライ
ン同期を確実になさしめ復号誤まり等を防止できる。
Further, even if the compressed code is supplied to the decoding circuit from the middle of one page or one line, the line synchronization in the decoding operation can be reliably performed, and erroneous decoding can be prevented.

以上説明した様に、本発明によると、記憶手段に記憶さ
れている複数の圧縮コードをシフトすることにより次に
復号すべき圧縮コードを記憶手段の所定位置にセット
し、記憶手段の所定位置にセットされた圧縮コードを復
号することによりラン長データ及び圧縮コードのコード
長データを出力するとともに、復号された圧縮コードが
コード長よりもラン長の方が短い特定の圧縮コードでな
い場合にはコード長データに従ったシフトを順次実行せ
しめ、特定の圧縮コードである場合にはコード長データ
に従ったシフトを一度に実行せしめるので、コード長よ
りもラン長の方が短い特定の圧縮コードの復号が行われ
た場合でも、次に復号すべき圧縮コードを即座に記憶手
段の所定位置にセット可能となり、従って、特定の圧縮
コードに続く圧縮コードの復号を迅速に実行でき、ま
た、更に、復号された圧縮コードが特定の圧縮コードで
ある場合に一度に実行される最大シフト量に対応した記
憶手段の所定位置から1ビットずつずれた複数の異なる
位置にEOLコードが存在しているか否かをそれぞれ検
出する複数の検出手段を備え、これら複数の検出手段に
よるEOLコードの検出に基づいてEOLコードに続く
圧縮コードを復号せしめるので、特定の圧縮コードを含
む圧縮コードを高速復号する構成において復号動作の基
準となるEOLコードを確実に検出でき、従って、EO
Lコードを基準とする圧縮コードの復号動作を良好に実
行可能となる。
As described above, according to the present invention, a plurality of compressed codes stored in the storage means are shifted to set a compressed code to be decoded next at a predetermined position of the storage means, and the compressed code is set at a predetermined position of the storage means. The run length data and the code length data of the compressed code is output by decoding the set compressed code, and if the decoded compressed code is not a specific compressed code whose run length is shorter than the code length, the code Decodes a specific compressed code that has a shorter run length than the code length, because it sequentially performs shifts according to long data and, in the case of a specific compression code, shifts according to code length data at once. Even if the compression code is executed, the compression code to be decoded next can be immediately set in a predetermined position of the storage means, and therefore, the compression code following the specific compression code can be set. The code can be quickly decoded, and further, when the decoded compressed code is a specific compressed code, a plurality of bits shifted from the predetermined position of the storage means corresponding to the maximum shift amount at one bit A plurality of detecting means for respectively detecting whether or not the EOL code exists at different positions, and the compressed code following the EOL code can be decoded based on the detection of the EOL code by the plurality of detecting means. In the structure for high-speed decoding of the compressed code including the compressed code, the EOL code which is the reference of the decoding operation can be surely detected.
The decoding operation of the compressed code based on the L code can be satisfactorily executed.

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

第1図は本発明の一実施例の概略構成を示す回路ブロッ
ク図、第2図(a)は記憶回路101におけるMHコードの記憶
型式を示す図、第2図(b)は複数のMHコードの連続した
状態を示す図、第3図はビット・シフタの構成を示す回
路ブロック図、第4図はMHコードのデコード回路の構成
を示す回路ブロック図、第5図は第1図示の回路ブロッ
ク図の詳細な回路図、第6図は第5図示回路の各部動作
タイミングを示すタイミングチャート図、第7図はデコ
ードエラー検出回路の構成を示す回路ブロック図、第8
図はプリンタの一構成例を示す図、第9図は第8図示プ
リンタの記録動作のための回路構成を示すブロック図、
第10図はEOL検出回路の構成を示す回路ブロック図、
第11図は第10図示の検出ゲートの構成を示す回路
図、第12図はレジスタの一構成例を示す回路図であ
り、101は記録回路、102はマルチプレクサ、103はレジ
スタ、104はMHコード・デコード・ロジック、104はMHコ
ード・テーブルROMである。
FIG. 1 is a circuit block diagram showing a schematic configuration of an embodiment of the present invention, FIG. 2 (a) is a diagram showing a memory type of an MH code in a memory circuit 101, and FIG. 2 (b) is a plurality of MH codes. Showing a continuous state of the circuit, FIG. 3 is a circuit block diagram showing the configuration of the bit shifter, FIG. 4 is a circuit block diagram showing the configuration of the MH code decoding circuit, and FIG. 5 is the circuit block shown in FIG. FIG. 6 is a detailed circuit diagram of the figure, FIG. 6 is a timing chart diagram showing operation timing of each part of the illustrated circuit, FIG. 7 is a circuit block diagram showing a configuration of a decoding error detection circuit, and FIG.
FIG. 9 is a diagram showing a configuration example of a printer, FIG. 9 is a block diagram showing a circuit configuration for recording operation of the printer shown in FIG.
FIG. 10 is a circuit block diagram showing the configuration of the EOL detection circuit,
FIG. 11 is a circuit diagram showing the configuration of the detection gate shown in FIG. 10, and FIG. 12 is a circuit diagram showing an example of the configuration of the register. 101 is a recording circuit, 102 is a multiplexer, 103 is a register, 104 is an MH code. Decoding logic 104 is an MH code table ROM.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】画像の各ラインの終了を示すEOLコード
を含む不定長の圧縮コードを順次復号する圧縮コードの
復号装置において、 連続して入力する圧縮コードを複数連続して記憶する記
憶手段と、 前記記憶手段に記憶されている複数の圧縮コードをシフ
トすることにより次に復号すべき圧縮コードを前記記憶
手段の所定位置にセットするシフト手段と、 前記記憶手段の所定位置にセットされた圧縮コードを復
号することによりラン長データ及び圧縮コードのコード
長データを出力する復号手段と、 前記復号手段で復号された圧縮コードがコード長よりも
ラン長の方が短い特定の圧縮コードでない場合には前記
シフト手段により前記コード長データに従ったシフトを
順次実行せしめ、前記特定の圧縮コードである場合には
前記シフト手段により前記コード長データに従ったシフ
トを一度に実行せしめるシフト制御手段と、 前記復号手段で復号された圧縮コードが前記特定の圧縮
コードである場合に前記シフト手段により一度に実行さ
れる最大シフト量に対応した前記記憶手段の前記所定位
置から1ビットずつずれた複数の異なる位置に前記EO
Lコードが存在しているか否かをそれぞれ検出する複数
の検出手段と、 前記複数の検出手段による前記EOLコードの検出に基
づいて前記復号手段により前記EOLコードに続く圧縮
コードを復号せしめる復号制御手段とを有することを特
徴とする圧縮コードの復号装置。
1. A compression code decoding device for sequentially decoding an indefinite length compression code including an EOL code indicating the end of each line of an image, and a storage means for storing a plurality of compression codes to be continuously input. Shift means for setting a compressed code to be decoded next at a predetermined position of the storage means by shifting a plurality of compressed codes stored in the storage means, and compression set at a predetermined position of the storage means Decoding means for outputting the run length data and the code length data of the compressed code by decoding the code, and when the compressed code decoded by the decoding means is not a specific compressed code whose run length is shorter than the code length. Causes the shift means to sequentially perform shifts according to the code length data, and in the case of the specific compressed code, the shift means A shift control means for executing a shift according to the code length data at a time, and a maximum shift amount executed by the shift means at a time when the compression code decoded by the decoding means is the specific compression code. Corresponding to the EO at a plurality of different positions shifted by 1 bit from the predetermined position of the storage means.
A plurality of detecting means for respectively detecting whether or not the L code exists, and a decoding control means for decoding the compressed code following the EOL code by the decoding means based on the detection of the EOL code by the plurality of detecting means. An apparatus for decoding a compressed code, comprising:
JP59114834A 1984-06-05 1984-06-05 Decompression device for compression code Expired - Lifetime JPH065890B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59114834A JPH065890B2 (en) 1984-06-05 1984-06-05 Decompression device for compression code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59114834A JPH065890B2 (en) 1984-06-05 1984-06-05 Decompression device for compression code

Publications (2)

Publication Number Publication Date
JPS60257666A JPS60257666A (en) 1985-12-19
JPH065890B2 true JPH065890B2 (en) 1994-01-19

Family

ID=14647858

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59114834A Expired - Lifetime JPH065890B2 (en) 1984-06-05 1984-06-05 Decompression device for compression code

Country Status (1)

Country Link
JP (1) JPH065890B2 (en)

Also Published As

Publication number Publication date
JPS60257666A (en) 1985-12-19

Similar Documents

Publication Publication Date Title
US3471639A (en) Shift/count control circuit
US3895184A (en) Facsimile system with buffered transmission and reception
US4924509A (en) Image processing apparatus
US4884147A (en) Image signal processing system
CA1254999A (en) Compression/decompression system and device for two-dimensional binary data from a picture field
US4716471A (en) Data decoding apparatus
EP0212905B1 (en) Decoding apparatus for image code
US4814898A (en) Image signal processing system
JPS5812787B2 (en) Fuakushimirishingounojiyushinhoushiki
US4918540A (en) System for encoding or decoding analog video signals
US4837634A (en) Apparatus for decoding image codes obtained by compression process
JPH088647B2 (en) Run-length coding method and apparatus
JPH065890B2 (en) Decompression device for compression code
JPS6031423B2 (en) Compressed data restoration method
US5280361A (en) Data processing apparatus
JPH0646777B2 (en) Decompression device for compression code
JPH0685568B2 (en) Decompression device for compression code
JPH0646776B2 (en) Decompression device for compression code
JPH0586698B2 (en)
JPH0584698B2 (en)
JPH0584697B2 (en)
JPS6333350B2 (en)
CA1118091A (en) Block length multiple plus run length residue codes for run length encoding
JPS6235780A (en) Decoding device for image code
JPS6351429B2 (en)

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term