JPH04213222A - Decoding circuit for unequal length code data - Google Patents

Decoding circuit for unequal length code data

Info

Publication number
JPH04213222A
JPH04213222A JP40724190A JP40724190A JPH04213222A JP H04213222 A JPH04213222 A JP H04213222A JP 40724190 A JP40724190 A JP 40724190A JP 40724190 A JP40724190 A JP 40724190A JP H04213222 A JPH04213222 A JP H04213222A
Authority
JP
Japan
Prior art keywords
data
code
code data
unequal length
length code
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.)
Pending
Application number
JP40724190A
Other languages
Japanese (ja)
Inventor
Shuji Nishitani
修治 西谷
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP40724190A priority Critical patent/JPH04213222A/en
Publication of JPH04213222A publication Critical patent/JPH04213222A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To reduce the time required for decoding an unequal length code data and to decrease the scale of the software. CONSTITUTION:A shift register 1 converts a serial input MH code data (unequal length code data) into a parallel data and outputs it. A PLA 2 receives the parallel data from the shift register 1 and outputs a decoded run length data and a data representing the code length of the unequal length code data. The run length data outputted from the PLA 2 is used for the processing of a next stage via a latch circuit 4 and inputted to a counter 5. The counter 5 outputs shift clocks SCK by a number represented by the inputted unequal length code data to the shift register 1. Thus, a succeeding unequal length code data is correctly set to the shift register 1.

Description

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

【0001】0001

【産業上の利用分野】この発明は、例えばMH符号(m
odified Huffman code )及びM
R符号(modified READ code)等の
不等長符号データを復号化するための復号化回路に関す
る。
[Industrial Application Field] The present invention is applicable to, for example, MH code (m
modified Huffman code) and M
The present invention relates to a decoding circuit for decoding unequal length code data such as an R code (modified READ code).

【0002】0002

【従来の技術】白黒の2値画像は、一般にランレングス
の系列によってこれを表すことができるが、発生頻度の
高いランレングスに対しては短い符号データを、また、
発生頻度の低いランレングスに対しては長い符号データ
を割り当てることにより、伝送情報を効果的に圧縮する
ことができる。この種の不等長符号データとしては、例
えばG3ファクシミリ等に使用されているMH符号やM
R符号等が周知である。
2. Description of the Related Art A black and white binary image can generally be represented by a series of run lengths, but short code data is used for frequently occurring run lengths.
Transmission information can be effectively compressed by allocating long code data to run lengths that occur less frequently. Examples of this type of unequal length code data include the MH code used in G3 facsimiles, etc.
R code etc. are well known.

【0003】ところで、これらの不等長符号データを復
号化する場合、従来は図2に示すように、ソフトウェア
によって予め定められたツリー構造に1ビットずつデー
タを順次当てはめていき、最終的な復号化データを得る
ようにしていた。
By the way, when decoding these unequal length encoded data, conventionally, as shown in FIG. I was trying to get the conversion data.

【0004】0004

【発明が解決しようとする課題】しかしながら、上述し
た従来の復号化装置では、ビット単位での判定を行って
いるため、復号化に時間がかかるうえ、復号化処理を行
うためのソフトウェアの規模も大きくなってしまうとい
う問題点があった。
[Problems to be Solved by the Invention] However, since the above-mentioned conventional decoding device performs determination on a bit-by-bit basis, decoding takes time and the size of the software for performing the decoding process is also large. The problem was that it got too big.

【0005】この発明は、このような従来の問題点を解
決するためになされたもので、ソフトウェアの規模を縮
小することができると共に、不等長符号データの復号化
処理時間を大幅に短縮することが可能な不等長符号デー
タの復号化回路を提供することを目的とする。
[0005] This invention was made to solve these conventional problems, and it is possible to reduce the scale of software and to significantly shorten the decoding processing time of unequal length code data. An object of the present invention is to provide a decoding circuit for unequal length code data.

【0006】[0006]

【課題を解決するための手段】この発明による不等長符
号データの復号化回路は、シリアル入力される不等長符
号データをパラレルデータに変更するシリアル・パラレ
ル変換手段と、このシリアル・パラレル変換手段の最上
位ビットからのビットデータの組合せに基づいて複合化
データと前記不等長符号データの符号長とを出力するデ
コード手段と、このデコード手段から出力される符号長
だけ前記シリアル・パラレル変換手段に格納された不等
長符号データをシフトさせるシフト制御手段とを備えた
ことを特徴とする。
[Means for Solving the Problems] A decoding circuit for unequal length code data according to the present invention includes a serial-to-parallel conversion means for converting serially input unequal-length code data into parallel data, and a serial-to-parallel conversion means for converting serially input unequal-length code data to parallel data. decoding means for outputting composite data and a code length of the unequal length code data based on a combination of bit data from the most significant bit of the means; and shift control means for shifting the unequal length code data stored in the means.

【0007】[0007]

【作用】この発明によれば、デコード手段が復号化デー
タだけでなく不等長符号データの符号長をも出力する。 従って、この符号長のデータに基づいて、シリアル・パ
ラレル変換手段の格納データをシフト操作すると、シリ
アル・パラレル変換手段には、次にデコードすべき不等
長符号データが、所定のセットポジションに正しくセッ
トされることになる。この結果、デコード手段は、常に
シリアル・パラレル変換手段の最上位ビットからのビッ
トデータの組合せを参照すれば足り、通常のデコード操
作で直ちに復号化データを得ることができる。
According to the present invention, the decoding means outputs not only the decoded data but also the code length of the unequal length code data. Therefore, when the data stored in the serial-to-parallel converter is shifted based on the data of this code length, the serial-to-parallel converter receives the unequal length code data to be decoded next in the correct set position. It will be set. As a result, the decoding means only needs to always refer to the combination of bit data starting from the most significant bit of the serial-to-parallel converting means, and decoded data can be immediately obtained by a normal decoding operation.

【0008】このように、この発明によれば、ビット単
位での判定ではなく、シリアル・パラレル変換回路に格
納されたデータの最上位ビットからの不等長ビットの組
合せ単位での判定を行っているので、復号化に要する処
理時間が短く、また、ソフトウェアの規模も縮小するこ
とができる。
As described above, according to the present invention, the determination is not made in bit units, but in units of combinations of unequal length bits starting from the most significant bit of data stored in the serial/parallel conversion circuit. Therefore, the processing time required for decoding is shortened, and the scale of the software can also be reduced.

【0009】[0009]

【実施例】以下、添付の図面に基づいてこの発明の実施
例について説明する。なお、ここでは、不等長符号デー
タの一例として、G3ファクシミリで使用されるMH符
号を使用した場合について説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Examples of the present invention will be described below with reference to the accompanying drawings. Here, a case will be described in which an MH code used in G3 facsimile is used as an example of unequal length code data.

【0010】MH符号法では、1走査線の画素数172
8に対して、0から1728までのランレングスを64
毎のグループに分け、1つのグループで、白又は黒画素
の長さに応じてターミネート符号を割り当てるようにし
ている。また、64ドットよりも長く続く白又は黒画素
については、64の倍数毎にメークアップ符号を割り当
てるようにしている。白ラン及び黒ランは、必ず交互に
出現するので、走査線の最初は白画素と定めている。ま
た、走査線の最後にはEOL(End of Line
 )符号を挿入するようにしている。
In the MH coding method, the number of pixels in one scanning line is 172.
8, the run length from 0 to 1728 is 64
In each group, a termination code is assigned according to the length of white or black pixels. Furthermore, for white or black pixels that last longer than 64 dots, makeup codes are assigned to each multiple of 64. Since white runs and black runs always appear alternately, the beginning of a scanning line is defined as a white pixel. Also, at the end of the scanning line, there is an EOL (End of Line).
) symbol is inserted.

【0011】表1及び表2に夫々ランレングスとターミ
ネート符号及びメークアップ符号との関係を示す。これ
らの符号データは、2〜13ビットの不等長符号データ
となっている。なお、これら表において、CLで示した
欄は、MH符号長(有効ビット数)を示すデータである
Tables 1 and 2 show the relationship between run length, termination code, and makeup code, respectively. These code data are unequal length code data of 2 to 13 bits. Note that in these tables, the column indicated by CL is data indicating the MH code length (effective number of bits).

【0012】0012

【表1】[Table 1]

【表2】[Table 2]

【0013】図1は、この実施例の復号化回路の構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of the decoding circuit of this embodiment.

【0014】シリアルデータとして入力されるMH符号
データは、シフトレジスタ1にシリアルに入力されてい
る。シフトレジスタ1は、シリアル入力されたMH符号
データを13ビットのパラレルデータに変換して出力す
る。
The MH code data inputted as serial data is serially inputted to the shift register 1. The shift register 1 converts serially inputted MH code data into 13-bit parallel data and outputs it.

【0015】シフトレジスタ1からのパラレルデータは
、PLA(Plogramable Logic Ar
ray )2に入力されている。PLA2は、13ビッ
トのパラレルMH符号データとフリップフロップ3から
出力される1ビットの白黒情報とを入力し、MH符号デ
ータをデコードして、復号化された7ビットのランレン
グスデータと入力された不等長符号化データの符号長を
示す4ビットの符号長データとを出力する。
Parallel data from shift register 1 is processed by PLA (Programmable Logic Ar).
ray)2. PLA2 inputs 13-bit parallel MH code data and 1-bit monochrome information output from flip-flop 3, decodes the MH code data, and inputs the decoded 7-bit run length data. 4-bit code length data indicating the code length of unequal length encoded data is output.

【0016】PLA2から出力されたランレングスデー
タは、ラッチ回路4に一旦格納されたのち、次段の処理
に供されるようになっている。一方、PLA2から出力
される符号長データは、カウンタ5にプリセットされる
。カウンタ5は、与えられた符号長データで示される数
だけシフトクロックSCKをシフトレジスタ1に出力す
るようになっている。
The run length data outputted from the PLA 2 is once stored in the latch circuit 4 and then subjected to the next stage of processing. On the other hand, the code length data output from the PLA 2 is preset in the counter 5. The counter 5 outputs the shift clock SCK to the shift register 1 by the number indicated by the given code length data.

【0017】次に、このように構成されたこの実施例の
復号化回路の動作について説明する。
Next, the operation of the decoding circuit of this embodiment configured as described above will be explained.

【0018】MH符号データがシフトレジスタ1にセッ
トされると、PLA2がアクセスされる。これにより、
PLA2は、シフトレジスタ1から与えられる2〜13
ビットの符号データと、フリップフロップ3から与えら
れる1ビットの白黒情報とから、7ビットのランレング
スデータと4ビットの符号長データとを出力する。
When MH code data is set in shift register 1, PLA2 is accessed. This results in
PLA2 is 2 to 13 given from shift register 1.
From the bit code data and the 1-bit black and white information given from the flip-flop 3, 7-bit run length data and 4-bit code length data are output.

【0019】PLA2から1回データが出力されると、
フリップフロップ3は、その出力を反転させる。また、
PLA2でEOLがデコードされると、フリップフロッ
プ3の出力は白情報にリセットされる。PLA2から出
力されるランレングスデータはラッチ回路4にロードさ
れ、符号長データはカウンタ5にロードされる。ラッチ
回路4にロードされたランレングスデータは、次段以後
の図示しない手段による処理に供されることになる。
[0019] When data is output from PLA2 once,
Flip-flop 3 inverts its output. Also,
When EOL is decoded by PLA2, the output of flip-flop 3 is reset to white information. The run length data output from the PLA 2 is loaded into the latch circuit 4, and the code length data is loaded into the counter 5. The run length data loaded into the latch circuit 4 is subjected to processing by means not shown in the subsequent stages.

【0020】また、符号長データがカウンタ5にロード
されると、カウンタ5はクロック信号CLKに基づいて
そのデータをダウンカウントし、カウント値が0になる
までシフトレジスタ1にシフトクロックSCKを供給す
る。これにより、シフトレジスタ1には、次に復号化す
べきMH符号データが所定のセットポジションに正しく
セットされることになる。
Further, when the code length data is loaded into the counter 5, the counter 5 counts down the data based on the clock signal CLK, and supplies the shift clock SCK to the shift register 1 until the count value becomes 0. . As a result, the MH code data to be decoded next is correctly set in the shift register 1 at a predetermined set position.

【0021】以上の処理を更に具体的に説明すると、例
えば、シフトレジスタ1から入力される13ビットのデ
ータとして、“1100101011000 ”が与え
られ、白黒情報として“白”が与えられたとすると、P
LA2は出力データとしてランレングスデータ“5”、
符号長データ“4”を出力する。このとき、下位7ビッ
トは出力データに何ら影響を与えない。
To explain the above processing in more detail, for example, if "1100101011000" is given as 13-bit data input from shift register 1 and "white" is given as monochrome information, P
LA2 has run length data “5” as output data,
Output code length data “4”. At this time, the lower 7 bits have no effect on the output data.

【0022】次に、シフトレジスタ1に格納されたデー
タが符号長データ“4”だけシフトされ、シフトレジス
タ1には、“101011000**** ”(* は
0又は1)がセットされる。従って、PLA2からは、
出力データとしてランレングスデータ“3”、符号長デ
ータ“2”が出力されることになる。このとき、下位9
ビットは出力データに何ら影響を与えない。
Next, the data stored in the shift register 1 is shifted by the code length data "4", and the shift register 1 is set to "101011000***" (* is 0 or 1). Therefore, from PLA2,
Run length data "3" and code length data "2" are output as output data. At this time, the bottom 9
The bits have no effect on the output data.

【0023】以上の動作を繰り返すことにより、速やか
な復号化処理が可能になる。
By repeating the above operations, rapid decoding processing becomes possible.

【0024】このように、この実施例によれば、PLA
2からMH符号データの符号長データが出力され、この
符号長データに基づいてシフトレジスタ1のデータがシ
フト操作されるので、PLA2は、常に先頭ビットから
の組合せによって容易に復号化を行うことができる。
[0024] Thus, according to this embodiment, PLA
Since the code length data of the MH code data is output from 2 and the data in shift register 1 is shifted based on this code length data, PLA 2 can always perform decoding easily by combining from the first bit. can.

【0025】なお、PLA2は、前述した表1及び表2
に示すデータに基づき、通常の論理回路合成手順によっ
て容易に作成可能であるため、その具体的構成について
は省略する。例えば、MH符号の場合、PLA2の積項
(テーブルの大きさ)は195、和項(出力ビット数)
は11ビットとなる。
[0025] PLA2 is based on Table 1 and Table 2 mentioned above.
Since it can be easily created by a normal logic circuit synthesis procedure based on the data shown in , the detailed structure will be omitted. For example, in the case of MH code, the product term (table size) of PLA2 is 195, and the sum term (number of output bits)
is 11 bits.

【0026】また、このようなデコード手段としては、
他の構成によるROMテーブルを用いても良い。更に、
上記実施例では、不等長符号データとしてMH符号を例
にとったが、この発明は、MR符号、MMR符号等、他
の不等長符号データの復号にも適用可能であることはい
うまでもない。
[0026] Further, as such a decoding means,
ROM tables with other configurations may also be used. Furthermore,
In the above embodiment, an MH code is taken as an example of unequal length code data, but it goes without saying that the present invention is also applicable to decoding other unequal length code data such as MR code and MMR code. Nor.

【0027】[0027]

【発明の効果】以上述べたように、この発明によれば、
デコード手段から出力される不等長符号データに基づい
て、シリアル・パラレル変換手段の格納データを所定の
セットポジションに正しくセットすることにより、ビッ
ト単位での判定ではなく、シリアル・パラレル変換回路
に格納されたデータの最上位ビットからの不等長ビット
の組合せ単位での判定を行うことができるので、復号化
に要する処理時間を短縮することができ、ソフトウェア
の規模を縮小することができるという効果を奏する。
[Effects of the Invention] As described above, according to the present invention,
Based on the unequal length code data output from the decoding means, by correctly setting the stored data of the serial/parallel converting means to a predetermined set position, the data is stored in the serial/parallel converting circuit instead of making a bit-by-bit determination. Since it is possible to perform judgments in units of combinations of unequal length bits starting from the most significant bit of the data, the processing time required for decoding can be shortened and the size of the software can be reduced. play.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】この発明の実施例によるMH符号データの復号
化回路を示すブロック図である。
FIG. 1 is a block diagram showing an MH code data decoding circuit according to an embodiment of the present invention.

【図2】従来の不等長符号データの符号化処理を説明す
るための模式図である。
FIG. 2 is a schematic diagram for explaining conventional encoding processing of unequal length code data.

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

1  シフトレジスタ 2  PLA 3  フリップフロップ 4  ラッチ回路 5  カウンタ 1 Shift register 2 PLA 3 Flip-flop 4 Latch circuit 5 Counter

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  シリアル入力される不等長符号データ
をパラレルデータに変換するシリアル・パラレル変換手
段と、このシリアル・パラレル変換手段の最上位ビット
からのビットデータの組合せに基づいて復号化データと
前記不等長符号データの符号長とを出力するデコード手
段と、このデコード手段から出力される符号長だけ前記
シリアル・パラレル変換手段に格納された不等長符号デ
ータをシフトさせるシフト制御手段とを備えたことを特
徴とする不等長符号データの復号化回路。
1. Serial/parallel converting means for converting serially input unequal length code data into parallel data, and decoded data and decoded data based on a combination of bit data from the most significant bit of the serial/parallel converting means. a decoding means for outputting the code length of the unequal length code data; and a shift control means for shifting the unequal length code data stored in the serial-to-parallel conversion means by the code length output from the decoding means. What is claimed is: 1. A decoding circuit for unequal length code data.
JP40724190A 1990-12-07 1990-12-07 Decoding circuit for unequal length code data Pending JPH04213222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP40724190A JPH04213222A (en) 1990-12-07 1990-12-07 Decoding circuit for unequal length code data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP40724190A JPH04213222A (en) 1990-12-07 1990-12-07 Decoding circuit for unequal length code data

Publications (1)

Publication Number Publication Date
JPH04213222A true JPH04213222A (en) 1992-08-04

Family

ID=18516860

Family Applications (1)

Application Number Title Priority Date Filing Date
JP40724190A Pending JPH04213222A (en) 1990-12-07 1990-12-07 Decoding circuit for unequal length code data

Country Status (1)

Country Link
JP (1) JPH04213222A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61125283A (en) * 1984-11-20 1986-06-12 Mitsubishi Electric Corp Decoding device of modified hafman code

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61125283A (en) * 1984-11-20 1986-06-12 Mitsubishi Electric Corp Decoding device of modified hafman code

Similar Documents

Publication Publication Date Title
US4316222A (en) Method and apparatus for compression and decompression of digital image data
JP2766302B2 (en) Variable length code parallel decoding method and apparatus
JPH0211064B2 (en)
US4809081A (en) Method and apparatus for decompressing encoded data
US5304995A (en) Variable lengthcoding apparatus and variable length decoding apparatus
US5751233A (en) Decoding apparatus and method therefor
JPH0326947B2 (en)
JPS59178077A (en) Method for compressing data of binary picture
US4618846A (en) Data coding
KR930006750B1 (en) Coding appalatus of video data
EP0349677B1 (en) Image coding system
US5274719A (en) Image data coding apparatus
US7085415B2 (en) Image display apparatus
JPH04270564A (en) Serial picture data compression system having color information
JPH04213222A (en) Decoding circuit for unequal length code data
JP3676078B2 (en) Run-length encoding method and compression apparatus
JPH04298164A (en) Data compression/release circuit for facsimile apparatus
JPH0255987B2 (en)
JP2833743B2 (en) MH code decoder
JPH04270569A (en) Data compression system for picture processor
JPS6343473A (en) Modified huffman code decoding circuit
JP3108243B2 (en) Encoding and decoding device
JP2995740B2 (en) Facsimile image density converter
JPH053185B2 (en)
KR0153967B1 (en) Run length decoder