JPH053186B2 - - Google Patents

Info

Publication number
JPH053186B2
JPH053186B2 JP58031173A JP3117383A JPH053186B2 JP H053186 B2 JPH053186 B2 JP H053186B2 JP 58031173 A JP58031173 A JP 58031173A JP 3117383 A JP3117383 A JP 3117383A JP H053186 B2 JPH053186 B2 JP H053186B2
Authority
JP
Japan
Prior art keywords
data
code
bit
length
decoded
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
JP58031173A
Other languages
Japanese (ja)
Other versions
JPS59156074A (en
Inventor
Yoshikazu Yokomizo
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 JP3117383A priority Critical patent/JPS59156074A/en
Priority to CA000447989A priority patent/CA1228925A/en
Priority to DE19843406624 priority patent/DE3406624A1/en
Priority to GB08404879A priority patent/GB2138604B/en
Priority to FR8402961A priority patent/FR2541836B1/en
Publication of JPS59156074A publication Critical patent/JPS59156074A/en
Priority to US07/018,868 priority patent/US4716471A/en
Publication of JPH053186B2 publication Critical patent/JPH053186B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
    • H03M7/425Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory for the decoding process only
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/005Statistical coding, e.g. Huffman, run length coding

Description

【発明の詳細な説明】[Detailed description of the invention]

本発明は画像フアイル又はフアクシミリ装置の
データ復号装置に関する。特にモデイフアイド・
ハフマン(M・H)符号によりランレングス符号
化されて記憶ないしは伝送された画像信号の高速
復号化に有効である。 従来この種の装置においては復号変換の処理速
度が一定ではなく、従つて副走査速度が可変速の
プリンタ装置を必要とする欠点があつた。このた
めもし副走査速度が一定の高速静電プリンタに出
力する時は一旦1ページ分のバツフアメモリに展
開して行なう必要があつた。又マイクロプロセツ
サを用いたソフトウエア処理で行なつていたの
で、高速化に限界があつた。 又、特開昭55−79565号公報の様に、MH符号
の復号装置をハードウエアで構成したものも知ら
れている。しかしながら、特開昭55−79565号公
報のものでは、MH符号をビツトシリアルにシフ
トレジスタに入力させ、1つのMH符号の復号毎
にシフトレジスタ内のMH符号をビツトシリアル
にシフトさせながらROMをアクセスして、MH
符号の復号を行なうものである。この様な構成で
は、シフトレジスタにビツトシリアルに入力させ
るので、MH符号の入力に時間がかかるだけでな
く、復号毎にMH符号の先頭をシフトレジスタ内
の決められた位置にビツトシリアルにシフトする
ので、復号用のROMをアクセスまでに時間がか
かつてしまう。 本発明は、上述した問題点を解決し、不定長の
符号データを高速に復号処理可能で、しかも復号
に用いる変換テーブルの構成を簡略化したデータ
復号装置の提供を目的とする。 即ち、本発明は、不定長の符号データを格納す
るためのメモリと、上記メモリから不定長符号デ
ータを所定ビツト数パラレルに読み出す読出手段
と、上記所定ビツト数パラレルで上記読出手段に
より読み出される不定長符号データを複数連続し
て記憶する格納手段と、上記格納手段に記憶され
た不定長符号データから所望のnビツトのデータ
をパラレルに抽出する抽出手段と、上記格納手段
の不定長符号データの先頭の連続した0の数を検
出する検出手段と、上記検出手段により検出され
た0の数と、上記抽出手段により抽出されたnビ
ツトパラレルのデータによりアクセスされ、その
アクセスに応じて復号データ及び復号化されたコ
ード長を出力する変換テーブルと、上記復号化さ
れたコード長を逐次加算する加算手段と、上記加
算手段の加算結果と上記検出手段により検出され
た0の数に応じて、上記抽出手段により抽出する
データの部分を変更する手段と、上記加算手段の
加算結果に応じて上記メモリから上記格納手段に
不定長符号データを記憶させる手段を有すること
を特徴とするデータ復号装置である。 本発明によれば、複数連続して記憶した不定長
符号データの中から所望のnビツトパラレルのデ
ータを抽出して変換テーブルをアクセスして復号
データを出力する構成としたので、従来の様に不
定長符号データをビツトシリアルにシフトする必
要がなく、高速に不定長符号データの復号処理を
行なうことができる。 又、本発明によれば、記憶した不定長符号デー
タの先頭の連続する0の数の検出と、記憶した不
定長符号データの中から抽出したnビツトパラレ
ルのデータにより変換テーブルをアクセスするの
で、変換テーブルの構成を簡略化できます。しか
も、復号化されたコード長の加算結果と連続する
0の数の検出に応じて抽出するnビツトのデータ
部分を変更するようにしたので、次の不定長符号
データ時のデータの抽出も適切に行なうことがで
きる。 次に図示の実施例にもとづき本発明を詳細に説
明する。 第1図は本発明によるMH符号の復号器の概略
ブロツク図である。図中1は画面メモリでここに
はMH符号化された画像信号が記憶されている。
1として画像フアイルメモリがある。ここからの
データは24ビツトパラレルで出力又はその型式
に変換されて出力される。2はリードアドレスカ
ウンタで画面メモリ1のリードアドレスを与える
ためのカウンタである。 3はパラレル・シリアル変換器である。画面メ
モリ1からの出力データ線Onは相対速度を上げ
るために24ビツト構成になつている。3は24ビツ
トのデータを8ビツトのデータ3個に分割し8ビ
ツト毎にシリアル変換するためのパラレル・シリ
アル変換器である。従つてこの変換回路3は8ビ
ツトのデータを3回シフトしたらリードアドレス
カウンタ2を1個歩進するための3進カウンタ1
01(第2図)を含んでいる。従つて24ビツトを
そのままシフトレジスタにより変換することによ
る時間遅れを防止できる。 4はトライステート・バツフア群で、シリアル
変換されたデータ14の中から、オフセツトレジ
スタ9の示すオフセツト値15のデータを先頭と
する連続した最大13個のデータをラン長デコード
ROM5及びコード長デコードROM7に入力す
るためのものである。ここでオフセツト値とは8
ビツト毎にパラレルシフトされたシリアルデータ
D0〜D25のどの位置からMH符号を抜き取るかを
示すデータである。従つて具体的には13ビツトの
トライステートバツフアを複数個(14個)用意し
てその入力線は1ビツトずつずらして信号線14
に接続し、出力線はワイヤードオア接続すること
によつて構成している。そのトライステートバツ
フア群の中の1個を選択すれば任意のデータシフ
トが実行できる。つまりバツフアのどれか1つを
コード長毎にイネブルすると13ビツト内のコード
データを瞬時に得ることができる。オフセツト値
15をバツフア選択信号線16に変換するのがオ
フセツトデコーダ10である。従つて8ビツト構
成であつてもMHの可変調符号を簡単にかつ高速
で読取ることができる。 ラン長デコードROMに入力されたMH符号は
ここでラン長に変換される。すなわちラン長デコ
ードROMは、MH符号をアドレスにし、それに
対応するラン長を出力データとする様に構成した
変換テーブルである。 ROM出力のラン長はラン長カウンタ6によつ
て計数され、黒又は白のビツト数、白ビツト数が
出力される。 ラン長カウンタ6の計数終了を示す信号リツプ
ルキヤリアウト(RCO)で次のラン長をロード
すると共にトグルフリツプフロツプ13を反転し
てその出力とカウンタ出力とにより黒ビツト群、
白ビツト群が交互に連続したVideo信号を得る。 7はコード長デコードROMで、MH符号をア
ドレスにし、そのMH符号のコード長を出力デー
タとする様に構成した変換テーブルである。コー
ド長17は加算器群8を介してオフセツトレジス
タ9に加算される。いま入力C,D及びEが共に
The present invention relates to a data decoding device for image files or facsimile devices. Especially modified
This is effective for high-speed decoding of image signals stored or transmitted after being run-length encoded using Huffman (M.H) codes. Conventionally, this type of apparatus has had the disadvantage that the processing speed of decoding and conversion is not constant, and therefore requires a printer apparatus with a variable sub-scanning speed. For this reason, when outputting to a high-speed electrostatic printer with a constant sub-scanning speed, it was necessary to first develop the data into a buffer memory for one page. Furthermore, since this was done through software processing using a microprocessor, there was a limit to how high the speed could be increased. Furthermore, as disclosed in Japanese Unexamined Patent Publication No. 55-79565, an MH code decoding device constructed using hardware is also known. However, in the method disclosed in Japanese Patent Application Laid-Open No. 55-79565, the MH code is input into a shift register bit-serially, and the ROM is accessed while shifting the MH code in the shift register bit-serially every time one MH code is decoded. Then, M.H.
It decodes the code. In such a configuration, input is made bit-serial to the shift register, so not only does it take time to input the MH code, but the beginning of the MH code must be bit-serial shifted to a predetermined position in the shift register each time it is decoded. Therefore, it takes time to access the decryption ROM. SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems and provide a data decoding device that is capable of decoding code data of undefined length at high speed and that has a simplified configuration of a conversion table used for decoding. That is, the present invention provides a memory for storing code data of an undefined length, a reading means for reading out a predetermined number of bits of the undefined length code data from the memory in parallel, and an undefined length code data read out in parallel by the reading means of the predetermined number of bits. storage means for successively storing a plurality of pieces of long code data; extraction means for extracting desired n-bit data in parallel from the indefinite length code data stored in the storage means; A detection means for detecting the number of consecutive 0s at the beginning, and accessed by the number of 0s detected by the detection means and n-bit parallel data extracted by the extraction means, and decoded data and a conversion table for outputting the decoded code length; an addition means for sequentially adding the decoded code lengths; A data decoding device characterized by having means for changing a portion of data extracted by the extraction means, and means for storing indefinite length code data from the memory into the storage means according to the addition result of the addition means. . According to the present invention, the configuration is such that desired n-bit parallel data is extracted from a plurality of continuously stored indefinite length code data, the conversion table is accessed, and decoded data is output. There is no need to shift the undefined length code data bit-serially, and the undefined length code data can be decoded at high speed. Furthermore, according to the present invention, the conversion table is accessed by detecting the number of consecutive zeros at the beginning of the stored indefinite length code data and using n-bit parallel data extracted from the stored indefinite length code data. The configuration of the conversion table can be simplified. Moreover, since the n-bit data part to be extracted is changed according to the addition result of the decoded code length and the detection of the number of consecutive 0s, the data extraction at the time of the next indefinite length code data is also appropriate. can be done. Next, the present invention will be explained in detail based on the illustrated embodiments. FIG. 1 is a schematic block diagram of an MH code decoder according to the present invention. In the figure, reference numeral 1 denotes a screen memory in which an MH encoded image signal is stored.
1 is an image file memory. The data from here is output in 24-bit parallel or converted to that format and output. 2 is a read address counter for giving a read address of the screen memory 1; 3 is a parallel/serial converter. The output data line On from the screen memory 1 has a 24-bit configuration to increase relative speed. 3 is a parallel-to-serial converter for dividing 24-bit data into three 8-bit data and serially converting each 8-bit data. Therefore, this conversion circuit 3 converts the ternary counter 1 to increment the read address counter 2 by one after shifting 8-bit data three times.
01 (Figure 2). Therefore, time delays caused by converting 24 bits as they are using a shift register can be prevented. 4 is a tri-state buffer group that performs run length decoding of up to 13 consecutive pieces of data from the serially converted data 14, starting with the data with the offset value 15 indicated by the offset register 9.
This is for inputting to the ROM 5 and code length decoding ROM 7. Here, the offset value is 8
Serial data shifted in parallel bit by bit
This is data indicating from which position of D 0 to D 25 the MH code is extracted. Therefore, specifically, a plurality of 13-bit tri-state buffers (14) are prepared, and their input lines are shifted one bit at a time to the signal line 14.
The output line is configured by wired-OR connection. Any data shift can be performed by selecting one of the tristate buffers. In other words, by enabling one of the buffers for each code length, code data within 13 bits can be obtained instantaneously. An offset decoder 10 converts the offset value 15 into a buffer selection signal line 16. Therefore, even with an 8-bit configuration, the MH variable key code can be read easily and at high speed. The MH code input to the run length decoding ROM is converted into a run length here. That is, the run length decode ROM is a conversion table configured to use the MH code as an address and the corresponding run length as output data. The run length of the ROM output is counted by a run length counter 6, and the number of black or white bits and the number of white bits are output. The next run length is loaded by the signal ripple carry out (RCO) indicating the end of counting in the run length counter 6, and the toggle flip-flop 13 is inverted and the black bit group,
Obtain a video signal in which groups of white bits are alternately continuous. 7 is a code length decode ROM, which is a conversion table configured to use an MH code as an address and the code length of the MH code as output data. Code length 17 is added to offset register 9 via adder group 8. Now input C, D and E are together

〔0〕の時は、もとのオフセツト値15が加算器
群8のA入力に入り、コード長17がB入力に入
つているので、オフセツトレジスタにクロツクが
印加されると新たなオフセツト値15は、 新たなオフセツト値=元のオフセツト値+コ
ード長 となる。この値は今デコードしたMH符号の次の
MH符号の先頭オフセツト値を与える。つまり前
にデコードされたMHの符号長分だけシフトした
所のデータが読めて次のMHが判断できる。この
様にして長さが一定でないMH符号のデコードが
次々に行なえる訳である。 ところでパラレルシリアル変換器3の長さは有
限であるから、補正が必要である。これはオフセ
ツト値15が〔8〕を越えた場合にコンパレータ
11で判定してパラレルシリアル変換器3を8ビ
ツト歩進すると共に加算器群8のE入力に〔−
8〕を印加する。この場合のオフセツト値は 新たなオフセツト値=元のオフセツト値+コ
ード長−8 となつてデータが8ビツトシフトすると共にオフ
セツト値も同じだけシフトするからデータとオフ
セツト値の相対位置は不変である。8ビツト歩進
は前述の如くバツフア、デコーダ、3進カウンタ
で行ない、3進カウンタが〔2〕になる毎にメモ
リを読出す。従つてオフセツトレジスタ9から見
たシリアルデータ14は無限に長いシリアルデー
タであるかの様に見える。 EOL符号(1ライン終了を示す同期信号)に
ついては専用のデコーダでデコードする。すなわ
ちEOLデコーダ群12であり、これは後述の如
く前述バツフア群4と同様13ケのPALで構成し、
1ビツトづつシフトしたシリアルデータをデコー
ドし、どれかのPALがEOLを検出すると13入力
オアゲートによりEOLを出力する。EOLデコー
ダ群のどれかがEOL信号をデコードした時には
EOL検出信号線18がHiレベルになりトグルフ
リツプフロツプ13をリセツトすると共に加算器
群8の入力のうちA,B及びEを無視してC及び
Dのみ加算出力する様にする。CにはEOL符号
の符号表である〔12〕が、またDにはEOL符号
が検出されたオフセツト値19が印加される。こ
の結果オフセツト値15の値は次の様になる。 新たなオフセツト値=EOLデコーダ群のオ
フセツト値+12 EOL符号だけ専用のハードウエアでデコード
するのは誤動作があつた場合にエラーをその行だ
けで食い止め全画面にエラーが波及するのを防止
するためである。もしエラーがなければ加算器群
8の入力はEOL検出時は、BとCは当然等しく、
またDはAとEの和に等しくなる。 この様にしてオフセツトレジスタの再セツトに
よりEOL符号の次のMH符号のぬきとり位置を与
えることができる。 次に第2図を用いて詳細に説明する。 第1図と共通の構成要素には同一の番号を付与
してある。画面メモリ(図示せず)からの出力
(1ワード24ビツト)を一旦Dラツチ100でラ
ツチする。ラツチするタイミングは3進カウンタ
101のリプルキヤリアウトがHiになりかつコ
ンパレータ11のA>B出力がHiになつた時で
ある。ラツチされたデータD0〜D23を8ビツトづ
つ分けトライステートバツフア102,103及
び104を介してDラツチ105にワイヤードオ
アで入力されている。Dラツチ105,106及
び107により8ビツトパラレル、バイトシリア
ルの形でパラレル・シリアル変換される。よつて
バツフア108,109…には各々D0〜D7,D1
〜D8…が格納される。シリアル変換された出力
D0〜D23の内トライステート・バツフア群4で任
意の連続した8ビツトが選択される。たとえばト
ライ・ステート・バツフア110が選択されれば
D2〜D9がラン長デコードROM5及びコード長デ
コードROM7側に伝達される。MH符号のコー
ド長は最大13であるから本来このトライステー
ト・バツフア群は13ビツト長のものが必要だが
MH符号の特徴により先頭の連続した1個,4個
または5個の“0”を別の回路でデコードする事
により8ビツトに節約できる。112が先頭の連
続した“0”をデコードするためのPALである。
PALはプログラマブル・アレー・ロジツクの略
で米国モノリシツタ・メモリーズ社の商標であ
る。ここにたとえばPAL18L4というデバイスを
2個用いて表1に示す様な論理でプログラムすれ
ばオフセツトレジスタ9からのオフセツト値の示
す先頭アドレスから0が1個もなければ0、少な
くとも0が1個ある時は1、0が4個ある時は
2、0が5個ある時は3なる零ビツト判定出力信
号を出力する。この値はデータセレクタ113に
入力されかつ、2つのROMに2つのアドレス選
択データとして入力される。データセレクタ11
3は零ビツト判定信号をもとに2進数
When it is [0], the original offset value 15 is input to the A input of the adder group 8, and the code length 17 is input to the B input, so when a clock is applied to the offset register, the new offset value is input. 15 is the new offset value=original offset value+code length. This value is the next value of the MH code just decoded.
Gives the starting offset value of the MH code. In other words, the next MH can be determined by reading the data shifted by the code length of the previously decoded MH. In this way, MH codes whose lengths are not constant can be decoded one after another. By the way, since the length of the parallel-serial converter 3 is finite, correction is necessary. This means that when the offset value 15 exceeds [8], the comparator 11 determines, and the parallel-serial converter 3 is incremented by 8 bits, and the E input of the adder group 8 is sent to [-].
8] is applied. In this case, the offset value is: new offset value=original offset value+code length-8, so the data is shifted by 8 bits and the offset value is also shifted by the same amount, so the relative position of the data and the offset value remains unchanged. The 8-bit increment is performed by the buffer, decoder, and ternary counter as described above, and the memory is read every time the ternary counter reaches [2]. Therefore, the serial data 14 viewed from the offset register 9 appears to be infinitely long serial data. The EOL code (synchronization signal indicating the end of one line) is decoded by a dedicated decoder. That is, the EOL decoder group 12 is composed of 13 PALs like the buffer group 4, as described later.
The serial data shifted one bit at a time is decoded, and if any PAL detects EOL, it outputs EOL using a 13-input OR gate. When any of the EOL decoders decodes the EOL signal,
The EOL detection signal line 18 becomes Hi level, and the toggle flip-flop 13 is reset, and among the inputs of the adder group 8, A, B, and E are ignored, and only C and D are added and output. The EOL code table [12] is applied to C, and the offset value 19 at which the EOL code is detected is applied to D. As a result, the value of the offset value 15 is as follows. New offset value = Offset value of the EOL decoder group + 12 The reason why only the EOL code is decoded using dedicated hardware is to prevent the error from spreading to the entire screen in the event of a malfunction by limiting the error to that line only. be. If there is no error, the input of adder group 8 will be equal to B and C when EOL is detected.
Also, D is equal to the sum of A and E. In this way, by resetting the offset register, it is possible to provide the cutting position of the MH code next to the EOL code. Next, a detailed explanation will be given using FIG. 2. Components common to those in FIG. 1 are given the same numbers. The output (24 bits per word) from the screen memory (not shown) is once latched by the D latch 100. The timing for latching is when the ripple carryout of the ternary counter 101 becomes Hi and the A>B output of the comparator 11 becomes Hi. The latched data D 0 -D 23 are divided into 8 bits and input to D latch 105 via tristate buffers 102, 103 and 104 by wired OR. D latches 105, 106 and 107 perform parallel-to-serial conversion in 8-bit parallel and byte serial format. Therefore, the buffers 108, 109... have D 0 to D 7 , D 1 respectively.
~D 8 ... is stored. Serialized output
Among D 0 to D 23 , arbitrary consecutive 8 bits are selected in tristate buffer group 4. For example, if tri-state buffer 110 is selected
D 2 to D 9 are transmitted to the run length decode ROM 5 and code length decode ROM 7 sides. Since the maximum code length of the MH code is 13, originally this tri-state buffer group needs to be 13 bits long.
Due to the characteristics of the MH code, it is possible to save 8 bits by decoding the leading 1, 4 or 5 consecutive "0's" using a separate circuit. 112 is a PAL for decoding consecutive "0"s at the beginning.
PAL is an abbreviation for Programmable Array Logic and is a trademark of Monolithic Memories, Inc. in the United States. For example, if two devices called PAL18L4 are used and programmed with the logic shown in Table 1, if there is no 0 from the start address indicated by the offset value from offset register 9, there will be 0, or at least one 0. A zero bit determination output signal is output, which is 1 when there are 4 0s, 2 when there are 4 0s, and 3 when there are 5 0s. This value is input to the data selector 113 and is also input to the two ROMs as two address selection data. Data selector 11
3 is a binary number based on the zero bit judgment signal

〔0〕,
〔1〕,〔4〕及び〔5〕を選択して出力する。デ
ータセレクタ113の出力は加算器114でオフ
セツト値と加算されてオフセツトデコーダ10に
印加される。従つてトライステートバツフア群4
の中から選択されるバツフアは、データセレクタ
113の出力値分だけさらにシフトした所から、
例えば0が1つの時は右へ1つバツフアをとばし
たバツフアから連続して8個のデータを出力す
る。 バツフア群4からのシフト出力によるコード長
の蓄積が8を超えるとオフセツトレジスタ9の出
力が8を越えるのでコンパレータ11がそれを判
断して変換回路3を作動する。つまりラツチ10
5〜107が8ビツト上にシフトする。従つて例
えばラツチ107の1〜8ビツトがバツフア10
8の1〜8ビツト目に、又107の2〜8とラツ
チ106の1ビツト目がバツフア109の1〜8
ビツト目にという具合に各バツフアとラツチとが
ビツト接続されているので、例えば10番目のバツ
フアデータと同じものが2番目のバツフアに格納
される。 ラン長ROM5に書き込まれた数値は、アドレ
ス線にランレングス符号をデータ線にラン長を割
り当てている。A10に黒/白信号入力を、A89
に零ビツト判定信号を、A07にMH符号を入力
する。表2にラン長デコードROMとコード長デ
コードROMのプログラム例を示す。メークアツ
プコードのラン長は64の倍数なのでROMにはラ
ン長を64で割つた値を書いておき、6ビツトシフ
ト回路115で後で64倍して正確なラン長を得
る。つまり6ビツト上位シフトし、下位6ビツト
に0をセツトして出力する。ROMの08をメーク
アツプ・コード/ターミネイト・コード(63以下
のラン長)判定信号出力(M/T)に当ててい
る。メークアツプコードが出力された時はインバ
ータ116、ゲート117によつてトグル・フリ
ツプ・フロツプ13を反転させない。EOL符号
では“白”にリセツトする。この様にしてランレ
ングスROMの容量を少なくできる。 コード長は加算器118でオフセツト値と加算
される。その値は通常はA側が選択されているデ
ータセレクタ119及び加算器120を介してオ
フセツトレジスタ9に印加されている。データセ
レクタ121は通常は
[0],
Select and output [1], [4], and [5]. The output of the data selector 113 is added to an offset value in an adder 114 and applied to the offset decoder 10. Therefore, tristate buffer group 4
The buffer selected from among them is further shifted by the output value of the data selector 113, and then
For example, when there is one 0, eight pieces of data are continuously output from the buffer skipped one buffer to the right. When the accumulated code length due to the shift output from the buffer group 4 exceeds 8, the output of the offset register 9 exceeds 8, so the comparator 11 determines this and operates the conversion circuit 3. In other words, Latch 10
5 to 107 are shifted up 8 bits. Therefore, for example, bits 1 to 8 of latch 107 are buffer 10.
8 bits 1 to 8, 107 bits 2 to 8, and latch 106 bits 1 to 8 of buffer 109
Since each buffer and latch are bit-connected in such a manner that the latches are bit-to-bit, the same data as the 10th buffer data is stored in the second buffer, for example. The numerical value written in the run length ROM 5 assigns a run length code to the address line and a run length to the data line. Black/white signal input to A 10 , A 8 to 9
Input the zero bit judgment signal to A0 to A7, and input the MH code to A0 to A7 . Table 2 shows examples of programs for the run length decode ROM and code length decode ROM. Since the run length of the make-up code is a multiple of 64, the value obtained by dividing the run length by 64 is written in the ROM, and later multiplied by 64 in the 6-bit shift circuit 115 to obtain the accurate run length. In other words, it shifts 6 bits to the upper part, sets 0 to the lower 6 bits, and outputs the result. 08 of the ROM is assigned to the make-up code/termination code (run length of 63 or less) determination signal output (M/T). When the make-up code is output, the toggle flip-flop 13 is not inverted by the inverter 116 and gate 117. Reset to “white” for EOL code. In this way, the capacity of the run length ROM can be reduced. The code length is added to the offset value in adder 118. The value is applied to the offset register 9 via the data selector 119 and the adder 120, in which the A side is normally selected. The data selector 121 is normally

〔0〕を選択していて、コ
ンパレータ11がオフセツト値の8より大なるを
検出したる時に、〔−8〕を選択する。従つて加
算器120により118による過去の蓄積を8だ
け減ずる。同時にゲート122を開きラツチ10
5,106及び107の値を8ビツトシフトす
る。また3進カウンタを1個歩進し、その結果リ
プルキヤリーアウトが出ればリードアドレスカウ
ンタ2を歩進する。 124〜127はEOL符号デコード用のPALである。
たとえばPAL16L6を用いて次の様な論理をプロ
グラムする事によつてEOL符号がデコードでき
る。 E=/A9*/A1*/A2*/A3*/… …*/A10*/A11*/A12 128はどのPALがEOL符号をデコードしたかを
判定して出力するデコーダである。EOLが検出
されるとエンコーダ128によりどのPALで発
生したかを判定しそこからEOLの分だけオフセ
ツト出力をジヤンプする様エンコーダ4の出力に
〔12〕を加えて119を介しオフセツト出力を再
セツトする。 尚ゼロのラン長に対応する方法として本発明は
2ワード程度のF1−F0バツフアを必要とするが
復号器のクロツクを2倍にする事によりこのバツ
フアを不要とすることができる。 又本発明はメモリ等からのB,G,R又はY,
M,Cのカラー画像符号化データをカラー別に復
号することにも応用できる。 以上説明したように、本例によるMH符号の復
号器は1個のMH符号のデコードを1システムク
ロツク以内にデコードする事が可能なのできわめ
て高速なMH符号の復号器が実現できる。従つて
画素が圧縮格納された電子フアイルと高速プリン
タとの対応が可能となる。 又MH符号のデコードに関しては本来は13ビツ
ト長の信号線を見てデコードしなければならない
が、本例では零の連続するコードを分割してデコ
ードする事により、主デコーダは8ビツト長の信
号線を見るだけで可能となり、従つて変換用
ROMは低価格なものですむ。 又本例は、エラーデータが全画面に与える悪影
響を防止することができる。
If [0] is selected and the comparator 11 detects an offset value greater than 8, then [-8] is selected. Therefore, adder 120 subtracts the past accumulation by 118 by eight. At the same time, the gate 122 is opened and the latch 10
Shift the values of 5, 106 and 107 by 8 bits. Further, the ternary counter is incremented by one, and if a ripple carry-out occurs as a result, the read address counter 2 is incremented. 124 to 127 are PALs for EOL code decoding.
For example, EOL codes can be decoded by programming the following logic using PAL16L6. E=/A 9 */A 1 */A 2 */A 3 */… …*/A 10 */A 11 */A 12 128 determines which PAL has decoded the EOL code and outputs it. It is a decoder. When EOL is detected, the encoder 128 determines in which PAL it occurred, and from there, [12] is added to the output of the encoder 4 to jump the offset output by the amount of EOL, and the offset output is reset via 119. . As a method for dealing with a run length of zero, the present invention requires an F1-F0 buffer of about 2 words, but this buffer can be made unnecessary by doubling the decoder clock. The present invention also provides B, G, R or Y from memory etc.
It can also be applied to decoding M and C color image encoded data for each color. As explained above, the MH code decoder according to this example is capable of decoding one MH code within one system clock, so an extremely high-speed MH code decoder can be realized. Therefore, it becomes possible to correspond an electronic file in which pixels are compressed and stored with a high-speed printer. In addition, when decoding an MH code, originally it is necessary to decode it by looking at a 13-bit long signal line, but in this example, by dividing and decoding consecutive zero codes, the main decoder can decode an 8-bit long signal. This is possible just by looking at the line, so for conversion
ROMs can be inexpensive. Furthermore, this example can prevent the adverse effect of error data on the entire screen.

【表】【table】

Claims (1)

【特許請求の範囲】 不定長の符号データを格納するためのメモリ
と、上記メモリから不定長符号データを所定ビツ
ト数パラレルに読み出す読出手段と、 上記所定ビツト数パラレルで上記読出手段によ
り読み出される不定長符号データを複数連続して
記憶する格納手段と、 上記格納手段に記憶された不定長符号データか
ら所望のnビツトのデータをパラレルに抽出する
抽出手段と、 上記格納手段の不定長符号データの先頭の連続
した0の数を検出する検出手段と、 上記検出手段により検出された0の数と、上記
抽出手段により抽出されたnビツトパラレルのデ
ータによりアクセスされ、そのアクセスに応じて
復号データ及び復号化されたコード長を出力する
変換テーブルと、 上記復号化されたコード長を逐次加算する加算
手段と、 上記加算手段の加算結果と上記検出手段により
検出された0の数に応じて、上記抽出手段により
抽出するデータの部分を変更する手段と、 上記加算手段の加算結果に応じて上記メモリか
ら上記格納手段に不定長符号データを記憶させる
手段を有することを特徴とするデータ復号装置。
[Scope of Claims] A memory for storing code data of an undefined length; a reading means for reading out a predetermined number of bits of the undefined length code data in parallel from the memory; storage means for successively storing a plurality of pieces of long code data; extraction means for extracting desired n-bit data in parallel from the indefinite length code data stored in the storage means; a detection means for detecting the number of consecutive 0s at the beginning; accessed by the number of 0s detected by the detection means and n-bit parallel data extracted by the extraction means; and decoded data and a conversion table for outputting the decoded code length; an addition means for sequentially adding the decoded code lengths; A data decoding device comprising: means for changing a portion of data extracted by the extracting means; and means for storing indefinite length code data from the memory into the storing means according to the addition result of the adding means.
JP3117383A 1983-02-25 1983-02-25 Data decoding device Granted JPS59156074A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP3117383A JPS59156074A (en) 1983-02-25 1983-02-25 Data decoding device
CA000447989A CA1228925A (en) 1983-02-25 1984-02-22 Data decoding apparatus
DE19843406624 DE3406624A1 (en) 1983-02-25 1984-02-23 DATA DECODING DEVICE
GB08404879A GB2138604B (en) 1983-02-25 1984-02-24 Data decoding
FR8402961A FR2541836B1 (en) 1983-02-25 1984-02-27 DATA DECODING APPARATUS AND COMPRESSED DATA PROCESSING DEVICE
US07/018,868 US4716471A (en) 1983-02-25 1987-02-25 Data decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3117383A JPS59156074A (en) 1983-02-25 1983-02-25 Data decoding device

Publications (2)

Publication Number Publication Date
JPS59156074A JPS59156074A (en) 1984-09-05
JPH053186B2 true JPH053186B2 (en) 1993-01-14

Family

ID=12324046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3117383A Granted JPS59156074A (en) 1983-02-25 1983-02-25 Data decoding device

Country Status (1)

Country Link
JP (1) JPS59156074A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55102968A (en) * 1979-01-31 1980-08-06 Sharp Corp Run-length decoding system for mh code

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55102968A (en) * 1979-01-31 1980-08-06 Sharp Corp Run-length decoding system for mh code

Also Published As

Publication number Publication date
JPS59156074A (en) 1984-09-05

Similar Documents

Publication Publication Date Title
JP3013381B2 (en) Variable length data decoding device
US5627917A (en) Variable length coding system having a zig-zag FIFO for selectively storing each data coefficient and zero-run count
US4168513A (en) Regenerative decoding of binary data using minimum redundancy codes
US4475174A (en) Decoding apparatus for codes represented by code tree
EP0040025A1 (en) Real time data compression/decompression scheme for facsimile transmission system
US4101934A (en) Coding system
JPH0211064B2 (en)
EP0467678A2 (en) Variable length coding apparatus and variable length decoding apparatus
CA1228925A (en) Data decoding apparatus
JPH0525224B2 (en)
US5309156A (en) Variable-length code decoding device
US4955061A (en) Method and apparatus for processing an image signal
US5067023A (en) Image data coding apparatus
JPH0460391B2 (en)
US6947604B2 (en) Method and hardware to implement two-dimensional compression
US4499498A (en) Run length decoding apparatus
JPH053185B2 (en)
JPH053186B2 (en)
JPH053187B2 (en)
EP0499225B1 (en) Variable-length code decoding device
JPS6341276B2 (en)
JPH07236065A (en) Binary picture compression device
JPS614371A (en) Picture image converting circuit
JPH0116071B2 (en)
JPH06225166A (en) Coding and decoding device