JPH0135542B2 - - Google Patents
Info
- Publication number
- JPH0135542B2 JPH0135542B2 JP58192493A JP19249383A JPH0135542B2 JP H0135542 B2 JPH0135542 B2 JP H0135542B2 JP 58192493 A JP58192493 A JP 58192493A JP 19249383 A JP19249383 A JP 19249383A JP H0135542 B2 JPH0135542 B2 JP H0135542B2
- Authority
- JP
- Japan
- Prior art keywords
- parallel
- shift register
- serial
- out shift
- output
- 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
Links
Description
〔発明の利用分野〕
本発明は、高速フアクシミリで国際規格として
定められたMH符号(Modified Huffman
Code)及び/またはMR符号(Modified READ
Code)の符号化及び復号化を行う回路に関する。
〔発明の背景〕
従来の符号化・復号化回路は、外部回路との符
号の入出力をシリアルあるいはパラレルで行つて
いる。そして、パラレルで外部回路との間で符号
を入出力する場合も、パラレルシリアル変換とシ
リアルパラレル変換を必要としていた。
すなわち、通常、符号化、復号化のために用い
られるEncoding Table ROMは、1ワードが8
ビツト、または、16ビツトで構成されており、パ
ラレルで符号の出力を行つている。しかし、符号
語の長さは、MH符号の場合、2〜12ビツトと可
変である。このため、Encoding Table ROMの
パラレル出力は、その一部のみが有効である。一
方、外部回路へパラレル出力を行う場合、その出
力は、全てが符号として有効なものである必要が
ある。従つて、通常、Encoding Table ROMの
パラレル出力のうち、有効なビツトのみを集め
て、外部回路に符号だけをパラレル出力するため
の変換処理が必要である。通常、この変換は、
Encoding Table ROMのパラレル出力をラツチ
し、シリアル変換した後、このシリアル変換され
た符号を再びパラレル符号に変換することにより
実現できるもので、パラレルイン・シリアルアウ
トレジスタと、シリアルイン・パラレルアウトレ
ジスタとを用いて行われる。すなわち、
Encoding Table ROMのパラレル出力は、パラ
レルイン・シリアルアウトレジスタにより、その
有効ビツトのみが取り出され、取り出した有効ビ
ツトは、シリアルイン・パラレルアウトレジスタ
により、例えば、8ビツトのワード単位に変換さ
れる。
従来技術による符号化・復号化回路は、前述の
ような動作を行うが、符号化時に符号のシリアル
パラレル変換と符号化終了とを、すなわち、
Encoding Table ROMのパラレル出力のうち、
符号語として有効なビツトを全て取り出したこと
とを同時に検出することができず、また、復号化
時に符号のパラレルシリアル変換を行い符号の復
号化を行う動作と、MH符号で符号化される1ラ
イン分の符号の切れ目を示す符号語であるEOL
(End of Line)の検出とを同時に行うことがで
きず、高速処理に向かないという問題点があつ
た。
〔発明の目的〕
本発明の目的は、MH符号及び/またはMR符
号を高速に符号化及び復号化できる回路規模の小
さい符号化・復号化回路を提供することにある。
〔発明の概要〕
本発明は、符号化時において符号をパラレルに
出力するには、符号化テーブルを記憶したメモリ
のパラレル出力をラツチしてシリアルに変換する
パラレルインシリアルアウトレジスタと、パラレ
ルインシリアルアウトレジスタのシリアル出力を
入力し再びパラレルに変換するシリアルインパラ
レルアウトシフトレジスタが必要であることに着
目し、前記パラレルインシリアルアウトシフトレ
ジスタをパラレルインパラレルアウトシフトレジ
スタとすることによつて符号化終了検出回路の小
型化を実現し、かつシリアルパラレル変換と符号
化終了検出を同時に行えるようにした。また、復
号化時において、パラレルで入力した符号をシリ
アルに変換し、シリアルの符号を復号化情報を記
憶したメモリのアドレスの一部とするパラレルイ
ンシリアルアウトシフトレジスタのシリアル出力
を入力し再びパラレルに変換することによつてメ
モリのアドレス作成と同時にEOLを検出できる
ようにしたことを特徴とする。
このような符号化・復号化回路は小型で、かつ
カウンタ等のタイミング発生回路を持たないため
LSI(Large Scale Integration)化に向いてい
る。
〔発明の実施例〕
以下、本発明の一実施例を図面を用いて説明す
る。第1図は、本発明の符号化・復号化回路20
00と、これをコントロールするコントローラ1
000との関係を示すものである。符号化・復号
化回路2000については、第2図以下を用いて
詳細に説明する。コントローラ1000は、例え
ばマイクロコンピユータを用いて構成されてお
り、第3図及び第4図のフローチヤートを用いて
その動作を説明する。
第2図は、本発明の一実施例に係る符号化・復
号化回路2000の詳細ブロツク図である。
本発明の一実施例により用いられるMH符号
は、通常一般に使用されているMH符号と同一で
あり、0から63までのランレングスを符号化する
Terminating Codeと、64刻みのランニングスを
符号化するMake Up Codeの2種類の符号を組
み合わせてランレングスを符号化したものであ
る。例えば、ランレングス=65を符号したMH符
号は、ランレングス=64+1とし、64をMake
Up Codeで符号化した後、1をTerminating
Codeで符号化して得ることができ、1つのラン
レングスを表わす符号は、必ずTeminating
Codeで終了する。なお、ランレングス63以下は、
Terminating Codeのみにより符号化される。こ
のMH符号は、最大12ビツトの符号長を有する可
変長の符号であり、Encoding Table ROMに記
憶されるが、該ROMの固定長の読み出しパラレ
ル出力のうち、符号語として有効なビツトを示す
ため、符号中の有効なビツトの次のビツトを
“1”とし、その後のビツトを全て“0”とした
符号形式を備えている。この“100…0”の符号
は、Encoding Table ROMのパラレル出力のう
ち、符号語として有効なビツトを全て取り出した
こと、すなわち、符号化終了の検出(ターミネー
ト検出ともいう)のために用いられる。
第2図に示す本発明の一実施例において、
Encoding Table ROM(以下、テーブルROMと
いう)2040は、1ワードが8ビツトで構成さ
れ、そのうち少なくとも1ビツトが前述した符号
化終了の検出のために用いられるので、1ワード
には最大7ビツトまでの符号列しか記憶すること
ができない。一方、MH符号は、前述したように
最大12ビツトの符号語が存在するため、テーブル
ROM2040には、1つのMH符号が前半と後
半に分けられて、2ワード分を用いて記憶されて
いる。
表1は、符号化用アドレス発生回路2010が
発生するアドレスと、テーブルROM2040内
のそのアドレスに記憶されているデータの内容と
の関係を示しており、そのデータが前述したMH
符号の前半のものか後半のものかが備考として示
されている。
同様に、表2も、復号化用アドレス発生回路2
020が発生するアドレスと、テーブルROM2
040内のそのアドレスに記憶されているデータ
の内容との関係を説明するものである。
次に、第2図に示す本発明の一実施例による符
号化・復号化回路と、第1図に示すコントローラ
1000との間で送受信される信号の意味を説明
する。
c……復号化時に、復号化用アドレス発生回路
2020に与えられる信号であり、受信符号の種
類、すなわち、白のMH符号、黒のMH符号、
MR符号の1つを特定する信号である。符号の種
類の受信順序は、MH符号及びMR符号の符号化
体系によりユニークに決定されており、コントロ
ーラ1000は、この符号化体系にそつて信号c
を出力する。これにより、復号化アドレス発生回
路2020は、表2に基づいて3種類のアドレス
のいずれか1つを出力する。
d……コントローラ1000が計測した白ある
いは黒の画素の連続数、すなわち、ランレングス
を示す2進数であり、符号化時に、符号化用アド
レス発生回路2010に与えられる。
e……符号化時に、符号化用アドレス発生回路
2010に与えられる信号で、符号の種類を示す
信号である。MH符号の場合、白のMake Up
Code、白のTerminating Code、黒のMake Up
Code、黒のTerminating Codeの4種類がある。
f……第2図に示す符号化・復号化回路を符号
化回路として使用するか、復号化回路として使用
するかを選択する信号である。符号化回路として
使用する場合、MPX2030は、符号化アドレ
ス発生回路2010からの符号化用アドレスgを
テーブルROM2040に与える。
k……パラレルイン・パラレルアウトシフトレ
ジスタ2050へのシフトパルス信号である。
l……テーブルROMの出力jがパラレルイン
パラレルアウトレジスタ2050にラツチされた
信号である。コントローラ1000は、復号化時
にこの信号lを取り込み、符号語の復号化の終
了、未終了の判定、及び復号化された結果(例え
ば、ランレングス)の収得のために使用する。
n……テーブルROMのパラレル出力jのう
ち、有効なビツトの全てがシフトアウトされて、
S/P2080に対して出力されたか否かを示す
信号であり、コントローラ1000は、この信号
nにより有効な符号語ビツトのS/P2080へ
の出力の終了を知ることができる。
o……第2図に示す符号化・復号化回路を符号
化回路として使用するか、復号化回路として使用
するかを選択する信号である。復号化回路として
使用する場合、MPX2070は、パラレルイ
ン・パラレルアウトシフトレジスタ2050の最
上位ビツトmをS/P2080に対する入力qと
する。
p……S/P2080へのシフトパルス信号で
ある。符号化時には、信号kとペアで与えられ、
テーブルROMからのパラレル出力のうち、有効
な符号ビツトのみをS/P2080内に整列させ
るために使用される。また、復号化時には、信号
tとペアで与えられ、符号vをパラレルに整列さ
せ、EOL符号を検出するための信号をS/P2
080内に生成するために使用される。
r……符号化時に得られる8ビツトパラレルに
整列された符号である。
s……EOL符号の検出、未検出を示す信号で
ある。コントローラは、この信号sにより、復号
化時、EOL符号の検出を知ることができる。
t……P/S2100へのシフトパルス信号で
ある。
u……コントローラ1000から与えられる8
ビツトの受信符号である。
[Field of Application of the Invention] The present invention utilizes the MH code (Modified Huffman code) defined as an international standard for high-speed facsimile.
Code) and/or MR code (Modified READ
This invention relates to a circuit that performs encoding and decoding. [Background of the Invention] Conventional encoding/decoding circuits input and output codes to and from external circuits in serial or parallel fashion. Also, when inputting and outputting codes to and from an external circuit in parallel, parallel-to-serial conversion and serial-to-parallel conversion were required. In other words, one word of the Encoding Table ROM used for encoding and decoding is 8.
It consists of bits or 16 bits, and the code is output in parallel. However, the length of the code word is variable from 2 to 12 bits in the case of the MH code. Therefore, only part of the parallel output of the Encoding Table ROM is valid. On the other hand, when performing parallel output to an external circuit, all outputs need to be valid as codes. Therefore, it is usually necessary to perform a conversion process to collect only valid bits from the parallel output of the Encoding Table ROM and output only the code in parallel to an external circuit. This conversion is typically
This can be achieved by latching the parallel output of the Encoding Table ROM, serially converting it, and then converting this serially converted code back to a parallel code. This is done using That is,
Only the valid bits of the parallel output of the Encoding Table ROM are taken out by the parallel-in/serial-out register, and the taken-out valid bits are converted into, for example, 8-bit words by the serial-in/parallel-out register. The encoding/decoding circuit according to the prior art operates as described above, but performs serial-to-parallel conversion of codes and ends encoding at the time of encoding, that is,
Of the parallel outputs of the Encoding Table ROM,
It is not possible to simultaneously detect that all bits that are valid as a code word have been taken out, and the operation of performing parallel-to-serial conversion of the code during decoding and the operation of decoding the code by performing parallel-to-serial conversion of the code, and the EOL is a code word that indicates the code break for a line.
There was a problem in that it was not possible to simultaneously detect (End of Line) and was not suitable for high-speed processing. [Object of the Invention] An object of the present invention is to provide a small-scale encoding/decoding circuit that can encode and decode MH codes and/or MR codes at high speed. [Summary of the Invention] In order to output codes in parallel during encoding, the present invention requires a parallel-in-serial-out register that latches the parallel output of a memory that stores an encoding table and converts it into serial data, and a parallel-in-serial out register that Focusing on the need for a serial-in-parallel out shift register that inputs the serial output of the out register and converts it back into parallel, we encoded it by making the parallel-in serial out shift register a parallel-in parallel out shift register. The end detection circuit has been miniaturized, and serial-to-parallel conversion and encoding end detection can be performed simultaneously. Also, during decoding, the code input in parallel is converted to serial, and the serial code is used as part of the address of the memory that stores the decoding information.The serial output of the parallel-in serial-out shift register is input, and the The feature is that the EOL can be detected at the same time as the memory address is created by converting it to . This type of encoding/decoding circuit is small and does not have a timing generation circuit such as a counter.
Suitable for LSI (Large Scale Integration). [Embodiment of the Invention] An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows an encoding/decoding circuit 20 of the present invention.
00 and the controller 1 that controls it
This shows the relationship with 000. The encoding/decoding circuit 2000 will be explained in detail using FIG. 2 and subsequent figures. The controller 1000 is configured using, for example, a microcomputer, and its operation will be explained using the flowcharts of FIGS. 3 and 4. FIG. 2 is a detailed block diagram of an encoding/decoding circuit 2000 according to an embodiment of the present invention. The MH code used by one embodiment of the present invention is the same as the commonly used MH code, and encodes run lengths from 0 to 63.
Run lengths are encoded by combining two types of codes: Terminating Code and Make Up Code, which encodes runs in 64 increments. For example, an MH code with run length = 65 has run length = 64 + 1, and 64 is Make
Terminating 1 after encoding with Up Code
The code that can be obtained by encoding with Code and represents one run length is always Terminating
End with Code. In addition, if the run length is 63 or less,
Encoded only by Terminating Code. This MH code is a variable length code with a maximum code length of 12 bits and is stored in the Encoding Table ROM, but it is used to indicate the valid bits as a code word among the fixed length read parallel output of the ROM. The code has a code format in which the bit following the valid bit in the code is set to "1", and all subsequent bits are set to "0". This code "100...0" is used to detect that all bits valid as a code word have been extracted from the parallel output of the Encoding Table ROM, that is, to detect the end of encoding (also referred to as termination detection). In one embodiment of the present invention shown in FIG.
In the Encoding Table ROM (hereinafter referred to as table ROM) 2040, one word consists of 8 bits, of which at least 1 bit is used for detecting the end of encoding as described above, so one word can contain up to 7 bits. Only code strings can be stored. On the other hand, as mentioned above, MH codes have codewords of up to 12 bits, so the table
In the ROM 2040, one MH code is divided into a first half and a second half, and stored using two words. Table 1 shows the relationship between the address generated by the encoding address generation circuit 2010 and the content of the data stored at that address in the table ROM 2040.
It is indicated as a note whether it is the first half or the second half of the code. Similarly, Table 2 also shows the decoding address generation circuit 2
Address where 020 occurs and table ROM2
The relationship with the contents of data stored at that address in 040 will be explained. Next, the meaning of the signals transmitted and received between the encoding/decoding circuit according to the embodiment of the present invention shown in FIG. 2 and the controller 1000 shown in FIG. 1 will be explained. c...A signal given to the decoding address generation circuit 2020 during decoding, and indicates the type of received code, i.e., white MH code, black MH code,
This is a signal that specifies one of the MR codes. The order in which the types of codes are received is uniquely determined by the encoding system of the MH code and the MR code, and the controller 1000 receives the signal c according to this encoding system.
Output. As a result, decoded address generation circuit 2020 outputs one of three types of addresses based on Table 2. d...A binary number indicating the consecutive number of white or black pixels measured by the controller 1000, that is, the run length, and is given to the encoding address generation circuit 2010 at the time of encoding. e...This is a signal given to the encoding address generation circuit 2010 during encoding, and is a signal indicating the type of code. For MH code, white Make Up
Code, Terminating Code in white, Make Up in black
There are four types: Code, and black Terminating Code. f...This is a signal for selecting whether the encoding/decoding circuit shown in FIG. 2 is used as an encoding circuit or a decoding circuit. When used as an encoding circuit, the MPX 2030 provides the encoding address g from the encoding address generation circuit 2010 to the table ROM 2040. k... is a shift pulse signal to the parallel-in/parallel-out shift register 2050. l...The output j of the table ROM is the signal latched in the parallel in/parallel out register 2050. The controller 1000 takes in this signal l during decoding, and uses it to determine whether decoding of a code word has ended or not, and to obtain a decoded result (for example, run length). n... All valid bits of the parallel output j of the table ROM are shifted out,
This is a signal indicating whether or not it has been output to the S/P 2080, and the controller 1000 can know from this signal n that the output of valid code word bits to the S/P 2080 has ended. o...This is a signal for selecting whether the encoding/decoding circuit shown in FIG. 2 is used as an encoding circuit or a decoding circuit. When used as a decoding circuit, MPX 2070 uses the most significant bit m of parallel-in/parallel-out shift register 2050 as input q to S/P 2080. p...This is a shift pulse signal to the S/P2080. At the time of encoding, it is given as a pair with signal k,
Only the valid sign bits of the parallel output from the table ROM are used to align into the S/P 2080. In addition, at the time of decoding, the code v is given as a pair with the signal t, and the code v is aligned in parallel, and the signal for detecting the EOL code is sent to the S/P2.
Used to generate within 080. r... is an 8-bit parallel-aligned code obtained during encoding. s...A signal indicating whether an EOL code is detected or not. The controller can know the detection of the EOL code at the time of decoding from this signal s. t... is a shift pulse signal to the P/S 2100. u...8 given from the controller 1000
This is the received bit code.
【表】【table】
Claims (1)
ブルと復号化テーブルを記憶したメモリを持ち、
画信号の変化点情報を入力して前記メモリをアク
セスすることによつてMH符号及び/またはMR
符号に符号化し、MH符号及び/またはMR符号
を入力してメモリをアクセスすることによつて画
信号の変化点情報に復号化する符号化・復号化回
路において、符号化時に前記メモリのパラレル出
力をラツチしシフトするパラレルインパラレルア
ウトシフトレジスタと、このパラレルインパラレ
ルアウトシフトレジスタのシフト毎に出力端子に
出力されるパラレル出力信号の第1ビツトを順次
取り込みシリアルパラレル変換して符号化信号と
するシリアルインパラレルアウトシフトレジスタ
と、前記パラレルインパラレルアウトシフトレジ
スタの前記パラレル出力信号を受け取りシフト毎
に符号化終了を検出するターミネート検出回路
と、復号化時にパラレル入力された符号をシフト
して前記メモリのアドレス修飾信号としてシリア
ル出力するパラレルインシリアルアウトシフトレ
ジスタと、前記メモリのパラレル出力をラツチし
て復号化信号として出力し、また、前記メモリア
ドレスとして出力するパラレルインパラレルアウ
トシフトレジスタと、前記パラレルインシリアル
アウトシフトレジスタのシリアル出力と前記パラ
レルインパラレルアウトシフトレジスタの出力に
基づいて前記メモリアクセスアドレスを発生する
回路と、前記パラレルインシリアルアウトシフト
レジスタの前記シリアル出力を受け取りパラレル
変換するシリアルインパラレルアウトシフトレジ
スタと、このシリアルインパラレルアウトシフト
レジスタのパラレル出力を受け取り前記パラレル
インシリアルアウトシフトレジスタがシフトする
毎にEOLを検出するEOL検出回路とを備えたこ
とを特徴とする符号化・復号化回路。 2 特許請求の範囲第1項において、復号化時に
メモリの出力をラツチするパラレルインパラレル
アウトレジスタを符号化時にメモリの出力をラツ
チするパラレルインパラレルアウトシフトレジス
タで兼用し、符号化時に符号化信号を得るシリア
ルインパラレルアウトシフトレジスタと復号化時
にパラレルインシリアルアウトシフトレジスタの
出力をパラレル変換するシリアルインパラレルア
ウトシフトレジスタを1つのレジスタで兼用し、
このシリアルインパラレルアウトシフトレジスタ
の入力回路に入力選択回路を接続したことを特徴
とする符号化・復号化回路。[Claims] 1. Having a memory storing an encoding table and a decoding table of MH code and/or MR code,
By inputting the change point information of the image signal and accessing the memory, the MH code and/or MR
In an encoding/decoding circuit that inputs an MH code and/or an MR code and decodes it into change point information of an image signal by accessing the memory, the parallel output of the memory is used during encoding. A parallel-in parallel-out shift register that latches and shifts the parallel-in parallel-out shift register, and the first bit of the parallel output signal that is output to the output terminal every time the parallel-in parallel out shift register is shifted is sequentially taken in and serial-parallel converted to become an encoded signal. a serial-in-parallel out shift register; a termination detection circuit that receives the parallel output signal of the parallel-in-parallel out shift register and detects the end of encoding for each shift; and a termination detection circuit that shifts the code input in parallel at the time of decoding to the memory. a parallel-in serial-out shift register that serially outputs the address modification signal of the memory, a parallel-in parallel-out shift register that latches the parallel output of the memory and outputs it as a decoded signal, and outputs the memory address as the memory address; a circuit that generates the memory access address based on the serial output of the in-serial out shift register and the output of the parallel in-parallel out shift register; and a serial in parallel circuit that receives the serial output of the parallel in serial out shift register and converts it into parallel. An encoding/decoding device comprising an out shift register and an EOL detection circuit that receives the parallel output of the serial-in-parallel out shift register and detects EOL every time the parallel-in serial out shift register shifts. circuit. 2 In claim 1, a parallel-in-parallel-out register that latches the memory output during decoding is also used as a parallel-in-parallel-out shift register that latches the memory output during encoding, and the encoded signal is A single register is used as a serial-in-parallel-out shift register to obtain the output of the serial-in-parallel-out shift register and a serial-in-parallel-out shift register to convert the output of the parallel-in serial out shift register into parallel during decoding.
An encoding/decoding circuit characterized in that an input selection circuit is connected to the input circuit of this serial-in-parallel out shift register.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58192493A JPS6085684A (en) | 1983-10-17 | 1983-10-17 | Encoding/decoding circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58192493A JPS6085684A (en) | 1983-10-17 | 1983-10-17 | Encoding/decoding circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6085684A JPS6085684A (en) | 1985-05-15 |
| JPH0135542B2 true JPH0135542B2 (en) | 1989-07-26 |
Family
ID=16292220
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP58192493A Granted JPS6085684A (en) | 1983-10-17 | 1983-10-17 | Encoding/decoding circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6085684A (en) |
-
1983
- 1983-10-17 JP JP58192493A patent/JPS6085684A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6085684A (en) | 1985-05-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4626829A (en) | Data compression using run length encoding and statistical encoding | |
| US4647908A (en) | Codeword decoding | |
| CA1291822C (en) | Method and apparatus for processing an image signal | |
| KR930006750B1 (en) | Image data coding device | |
| JP2587069B2 (en) | Circuit device for code conversion of data signal | |
| JPH0255987B2 (en) | ||
| JPH04298164A (en) | Data compression/release circuit for facsimile apparatus | |
| JPH0569342B2 (en) | ||
| JPH0149072B2 (en) | ||
| JPS6147466B2 (en) | ||
| JPH04270569A (en) | Data compression system for picture processor | |
| GB1570914A (en) | Method and apparatus for bandwidth compression | |
| EP0499225A2 (en) | Variable-length code decoding device | |
| JPS6087551A (en) | Multi-value transmission system | |
| JPS58225779A (en) | Decoding system for picture signal | |
| JPS61230525A (en) | modified haffman code converter | |
| JPS60240275A (en) | Picture reader | |
| JPS60253372A (en) | Picture signal coding system | |
| JPS59156073A (en) | Data decoding device | |
| JPH0212417B2 (en) | ||
| JP3142911B2 (en) | Processing method of encoding / decoding device | |
| JPS59156075A (en) | data decoding device | |
| JPS62199173A (en) | Modified huffman code decoding circuit | |
| JPH0360225B2 (en) | ||
| JPH0834545B2 (en) | Image data coding device |