JP2842094B2 - Huffman decoding circuit - Google Patents

Huffman decoding circuit

Info

Publication number
JP2842094B2
JP2842094B2 JP4273925A JP27392592A JP2842094B2 JP 2842094 B2 JP2842094 B2 JP 2842094B2 JP 4273925 A JP4273925 A JP 4273925A JP 27392592 A JP27392592 A JP 27392592A JP 2842094 B2 JP2842094 B2 JP 2842094B2
Authority
JP
Japan
Prior art keywords
output
memory
bits
huffman
address
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 - Fee Related
Application number
JP4273925A
Other languages
Japanese (ja)
Other versions
JPH06125277A (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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to JP4273925A priority Critical patent/JP2842094B2/en
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to DE69329092T priority patent/DE69329092T2/en
Priority to DE69332253T priority patent/DE69332253T2/en
Priority to KR1019930021495A priority patent/KR0138971B1/en
Priority to EP93116585A priority patent/EP0593046B1/en
Priority to EP98120330A priority patent/EP0920136B1/en
Priority to US08/135,448 priority patent/US5467088A/en
Publication of JPH06125277A publication Critical patent/JPH06125277A/en
Application granted granted Critical
Publication of JP2842094B2 publication Critical patent/JP2842094B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、ハフマン符号を復号処
理するハフマン復号回路に関し、特にハフマン復号処理
スピード等を改善するとともに、集積化に適したハフマ
ン復号回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a Huffman decoding circuit for decoding a Huffman code, and more particularly to a Huffman decoding circuit which improves the Huffman decoding processing speed and the like and is suitable for integration.

【0002】[0002]

【従来の技術】従来のハフマン復号回路は、ハフマン符
号に対応する復号語を見つけるために、最大符号語長分
のアドレスを持ったメモリを使用したり、1ビット毎に
復号ツリーを追跡する回路あるいはメモリを分割した復
号回路を用いている。
2. Description of the Related Art A conventional Huffman decoding circuit uses a memory having an address corresponding to the maximum code word length to find a decoded word corresponding to a Huffman code, or tracks a decoding tree for each bit. Alternatively, a decoding circuit obtained by dividing a memory is used.

【0003】図6は従来の一例を示すハフマン復号回路
のブロック図である。図6に示すように、このハフマン
復号回路は最大符号長分のアドレスを持つメモリ9を設
けて構成されるが、このメモリ9は64KW×13ビッ
ト構成である。すなわち、メモリ9のアドレス入力にハ
フマン符号データ列hを与え、そのメモリ9の出力とし
て復号語jおよび符号長kからなる復号結果を得るよう
になっている。今、ハフマン符号データhの最大符号語
長を16ビット、復号語を8ビットとすれば、メモリ9
に復号語8ビットと符号長5ビットを設定する。例え
ば、復号語Aに対するハフマン符号が‘0101’であ
れば、アドレス‘01010…0’から‘01011…
1’の全てに復号語Aと符号長4を設定する。同様に、
各復号語に対するハフマン符号についてのアドレスを設
定する。
FIG. 6 is a block diagram of a Huffman decoding circuit showing an example of the prior art. As shown in FIG. 6, the Huffman decoding circuit is provided with a memory 9 having an address corresponding to the maximum code length. The memory 9 has a configuration of 64 KW × 13 bits. That is, a Huffman code data string h is given to the address input of the memory 9, and a decoding result including a decoded word j and a code length k is obtained as an output of the memory 9. If the maximum code word length of the Huffman code data h is 16 bits and the decoded word is 8 bits, the memory 9
, A decoded word of 8 bits and a code length of 5 bits are set. For example, if the Huffman code for the decoded word A is “0101”, addresses “01010... 0” to “01011.
A decoded word A and a code length of 4 are set for all 1 '. Similarly,
An address for the Huffman code for each decoded word is set.

【0004】このハフマン復号回路においては、まずハ
フマン符号データ列hの先頭から16ビットをメモリ9
のアドレスに入力する。仮に、‘0101…’が送られ
てきたとすると、メモリ9のアドレス上位4ビットに
‘0101’が入力され、下位12ビットには次のハフ
マン符号が入力される。このように、メモリ9のアドレ
ス‘01010…0’から‘01011…1’には全て
復号語A,符号長4を設定してあるので、メモリ9から
復号語A,符号長4が出力される。この符号長4はハフ
マン符号データ列へ送られ、次のハフマン符号データ列
の先頭が決り、先頭から16ビットをメモリ9のアドレ
スへ入力する。以下同様に、この動作を繰り返すことに
よって復号される。
In this Huffman decoding circuit, first, 16 bits from the head of a Huffman code data string h are stored in a memory 9.
Enter the address. Assuming that "0101 ..." has been sent, "0101" is input to the upper 4 bits of the address of the memory 9, and the next Huffman code is input to the lower 12 bits. As described above, since the decoded word A and the code length 4 are all set in the addresses "01010 ... 0" to "01011 ... 1" in the memory 9, the decoded word A and the code length 4 are output from the memory 9. . This code length 4 is sent to the Huffman code data string, the head of the next Huffman code data string is determined, and the 16 bits from the head are input to the address of the memory 9. Similarly, decoding is performed by repeating this operation.

【0005】図7は従来の他の例を示すハフマン復号回
路のブロック図である。図7に示すように、この復号回
路は1ビット毎に復号ツリーを追跡するものである。こ
の復号回路はラッチ10と内部メモリ11とを有する。
内部メモリ11は512W×9ビット構成であり、ハフ
マン符号データ列hの先頭から1ビットを最下位のアド
レス入力とし且つラッチ回路10の出力8ビットを上位
8ビットのアドレス入力とする。また、ラッチ回路10
は内部メモリ11からポインタが出力された場合にラッ
チする。この内部メモリ11の出力9ビットの内8ビッ
トで復号語mもしくはポインタを表わし、他の1ビット
は復号語の出力であれば1、ポインタの出力であれば0
であればフラグnを表わすこの復号回路の動作は、まず
最初にハフマン符号データ列hから入力した1ビットに
よりメモリアドレスを決定し、内部メモリ11の出力を
得る。その出力結果がポインタであれば、そのポインタ
と次のハフマン符号データ列の1ビットで再び内部メモ
リ11をアクセスする。一方、出力が復号語であれば、
1回の復号動作を終了する。以下具体的な1例をとりあ
げて動作を説明する。
FIG. 7 is a block diagram of a Huffman decoding circuit showing another conventional example. As shown in FIG. 7, this decoding circuit tracks a decoding tree for each bit. This decoding circuit has a latch 10 and an internal memory 11.
The internal memory 11 has a configuration of 512 W × 9 bits, in which 1 bit from the head of the Huffman code data string h is used as the lowest address input, and 8 bits output from the latch circuit 10 are used as the upper 8 bits address input. In addition, the latch circuit 10
Latches when a pointer is output from the internal memory 11. Of the 9 bits output from the internal memory 11, 8 bits represent the decoded word m or pointer, and the other 1 bit is 1 if the decoded word is output, and 0 if the pointer is output.
If so, the operation of this decoding circuit representing the flag n first determines the memory address based on one bit input from the Huffman code data string h, and obtains the output of the internal memory 11. If the output result is a pointer, the internal memory 11 is accessed again with the pointer and one bit of the next Huffman code data string. On the other hand, if the output is a decoded word,
One decoding operation ends. The operation will be described below using a specific example.

【0006】図8は図7に示す内部メモリをあらかじめ
設定した状態を表わす図である。図8に示すように、こ
こではハフマン符号が‘0101’の復号語Aを例にし
たが、同様にして各復号語に対するハフマン符号につい
てのアドレスも設定する。
FIG. 8 shows a state where the internal memory shown in FIG. 7 is set in advance. As shown in FIG. 8, here, the decoded word A whose Huffman code is “0101” is taken as an example, but the address of the Huffman code for each decoded word is set in the same manner.

【0007】再び、図7に戻ると、ハフマン符号データ
列の先頭から1ビットとラッチ回路10からの8ビット
の計9ビットのアドレスが内部メモリ11へ送られる。
ハフマン符号データ列hの先頭の1ビットは内部メモリ
11のアドレス最下位ビットに入力される。例えば、復
号語Aに対するハフマン符号‘0101’が送られてき
たとすると、ラッチ回路10はリセットされ、8ビット
全てに‘0’が出力され、ハフマン符号の4ビット目の
‘0’と共に内部メモリ11に送られる。ここで、ハフ
マン符号の‘0’は最下位アドレスに入力される。内部
メモリ11はポインタ‘00000001’とポイント
の出力を表わすフラグ=0が出力される。ポインタ,フ
ラグ=0がラッチ回路10に送られると、ラッチ回路1
0は‘00000001’を出力し、ハフマン符号の3
ビット目の‘1’と共に内部メモリ11に送出する。従
って、内部メモリ11からポインタ‘0000001
0’とポイントの出力を表わすフラグ=0が出力され
る。ポインタ,フラグ=0がラッチ回路10に送られる
ので、ラッチ回路10は‘00000010’を出力
し、ハフマン符号の2ビット目の‘0’と共に内部メモ
リ11に送出する。再び、内部メモリ11はポインタ
‘00000011’とポイントの出力を表わすフラグ
=0を出力し、ポインタ,フラグ=0はラッチ回路10
に転送される。ラッチ回路10は‘00000011’
を出力し、ハフマン符号の1ビット目の‘1’と共に内
部メモリ11に送られる。内部メモリ11で復号語Aと
復号語の出力を表わすフラグ=1を出力する。このフラ
グ=1により、ラッチ回路10はリセットされ、そして
次のハフマン符号データ列の先頭が送られてくる。以下
同様に、この動作を繰り返すことにより復号される。
Returning to FIG. 7, a 9-bit address of 1 bit from the head of the Huffman code data string and 8 bits from the latch circuit 10 is sent to the internal memory 11.
The first bit of the Huffman code data string h is input to the least significant bit of the address of the internal memory 11. For example, if the Huffman code '0101' for the decoded word A is sent, the latch circuit 10 is reset, '0' is output to all eight bits, and the internal memory 11 is output together with the fourth bit '0' of the Huffman code. Sent to Here, the Huffman code “0” is input to the lowest address. The internal memory 11 outputs the pointer “00000001” and the flag = 0 indicating the output of the point. When the pointer and flag = 0 are sent to the latch circuit 10, the latch circuit 1
0 outputs '00000001' and Huffman code 3
It is sent to the internal memory 11 together with the bit “1”. Therefore, the pointer '0000001
0 ′ and a flag = 0 indicating the output of the point are output. Since the pointer and the flag = 0 are sent to the latch circuit 10, the latch circuit 10 outputs "00000010" and sends it to the internal memory 11 together with the second bit "0" of the Huffman code. Again, the internal memory 11 outputs the pointer '00000011' and the flag = 0 indicating the output of the point, and the pointer and flag = 0
Is forwarded to Latch circuit 10 is '00000011'
Is output to the internal memory 11 together with the first bit “1” of the Huffman code. The internal memory 11 outputs the decoded word A and the flag = 1 indicating the output of the decoded word. With this flag = 1, the latch circuit 10 is reset, and the head of the next Huffman code data string is sent. Similarly, decoding is performed by repeating this operation.

【0008】図9は従来のまた別の例を示すハフマン復
号回路のブロック図である。図9に示すように、ここで
はメモリを分割し、ハフマン符号データrの最大符号語
長を16ビットとするとともに、符号長の小さい順に符
号を割り付け直したものとする。この復号回路はハフマ
ン符号データ列rの先頭から10ビットをアドレス入力
とする半導体集積回路内の内部メモリ12と、データ列
rの13ビット目から1ビット目までをアドレス入力と
する半導体集積回路外の外部メモリ13と、これら内部
メモリ12,外部メモリ13の出力を選択する復号語の
セレクタ14および符号長のセレクタ15と、内部メモ
リ12の出力が有効であれば内部メモリ12の出力を選
択するセレクト信号をセレクタ14に送るセレクト信号
生成部16とを有する。内部メモリ12は1KW×13
ビット、外部メモリ13は8KW×13ビット構成であ
る。
FIG. 9 is a block diagram of a Huffman decoding circuit showing another conventional example. As shown in FIG. 9, here, it is assumed that the memory is divided, the maximum codeword length of the Huffman code data r is set to 16 bits, and codes are reassigned in ascending order of code length. This decoding circuit is composed of an internal memory 12 in the semiconductor integrated circuit which receives the first 10 bits of the Huffman code data string r as an address input and an external memory 12 which receives the 13th to first bits of the data string r as an address input. , A decoded word selector 14 and a code length selector 15 for selecting the outputs of the internal memory 12 and the external memory 13, and the output of the internal memory 12 if the output of the internal memory 12 is valid. And a select signal generation unit 16 that sends a select signal to the selector 14. Internal memory 12 is 1KW x 13
The bit and external memory 13 have an 8 KW × 13 bit configuration.

【0009】まず、内部メモリ12,外部メモリ13に
復号語8ビットと符号長5ビットを設定する。内部メモ
リ12には、ハフマン符号データ列rの16ビットのう
ち上位10ビット以下で復号語を表わすものについて復
号語と符号長を設定し、その内部メモリ12の出力が有
効な場合は1、無効な場合は0であるフラグを符号長5
ビット目に設定する。一方、外部メモリ13には11ビ
ット以上16ビットまでのハフマン符号に対する復号語
および符号長を設定する。但し、符号長の順にハフマン
コードが割り当ててあれば、11ビット以上のハフマン
符号の先頭3ビットは必ず‘111’になるので、外部
メモリ13のアドレス入力には先頭3ビットを除いて入
力している。
First, a decoded word of 8 bits and a code length of 5 bits are set in the internal memory 12 and the external memory 13. In the internal memory 12, a decoded word and a code length are set for a word representing a decoded word in the upper 10 bits or less of the 16 bits of the Huffman code data sequence r, and 1 when the output of the internal memory 12 is valid, and invalid. If the flag is 0, the code length is set to 5.
Set to bit number. On the other hand, a decoded word and a code length for the Huffman code of 11 to 16 bits are set in the external memory 13. However, if the Huffman code is assigned in the order of the code length, the first three bits of the Huffman code of 11 bits or more are always "111". I have.

【0010】更に、内部メモリ12には、例えば復号語
Aに対するハフマン符号が‘0101’であれば、アド
レス‘01010…0’から‘01011…1’の全て
に復号語A,符号長4を設定する。外部メモリ13に
は、例えば復号語Bに対するハフマン符号が‘1111
1010001’であれば、アドレス‘1101000
10…0’から‘110100011…1’の全てに復
号語B,符号長11を設定する。同様に、各復号語に対
するハフマン符号についてのアドレスを設定する。
Further, if the Huffman code for the decoded word A is "0101", for example, the decoded word A and the code length 4 are set in all of the addresses "01010 ... 0" to "01011 ... 1" in the internal memory 12. I do. In the external memory 13, for example, the Huffman code for the decoded word B is' 1111.
1010001 ', address'1101000'
A decoded word B and a code length 11 are set for all of "10 ... 0" to "110100011 ... 1". Similarly, an address for the Huffman code for each decoded word is set.

【0011】次に、かかる復号回路の動作は、ハフマン
符号データ列rの先頭から上位10ビット(15:6)
を内部メモリ12のアドレスに、下位13ビット(1
2:0)を外部メモリ13のアドレスに与える。仮に、
ハフマン符号‘0101…’が送られてきたとすると、
内部メモリ12のアドレス上位4ビットに‘0101’
が入力され、復号語A,符号長4を出力する。このと
き、フラグ=1も出力し、内部メモリ12からの出力が
有効であることをセレクト信号生成部16に送る。ま
た、外部メモリ13はアドレス入力された13ビットで
得られた復号語と符号長を出力する。これらメモリ1
2,13から得られた復号語と符号長はそれぞれセレク
タ14,15に送られる。一方、セレクト信号生成部1
6はフラグ=1より内部メモリ12の出力を選択するよ
うにセレクタ14,15にセレクト信号を送る。これに
より、各セレクタ14,15は内部メモリ12からの復
号語A,符号長4を出力する。この符号長4はハフマン
符号データ列に送られ、次のハフマン符号データ列の先
頭が決る。以下同様に、この動作を繰り返すことによっ
て符号データが復号される。
Next, the operation of the decoding circuit is based on the upper 10 bits (15: 6) from the head of the Huffman code data string r.
In the address of the internal memory 12 and the lower 13 bits (1
2: 0) to the address of the external memory 13. what if,
If Huffman code '0101 ...' is sent,
'0101' in upper 4 bits of address of internal memory 12
, And outputs a decoded word A and a code length of 4. At this time, the flag = 1 is also output, and the fact that the output from the internal memory 12 is valid is sent to the select signal generator 16. Further, the external memory 13 outputs a decoded word and a code length obtained by the 13-bit address input. These memories 1
The decoded words and code lengths obtained from 2, 13 are sent to selectors 14, 15, respectively. On the other hand, select signal generator 1
6 sends a select signal to the selectors 14 and 15 so as to select the output of the internal memory 12 from the flag = 1. As a result, each of the selectors 14 and 15 outputs the decoded word A and the code length 4 from the internal memory 12. This code length 4 is sent to the Huffman code data sequence, and the head of the next Huffman code data sequence is determined. Similarly, the code data is decoded by repeating this operation.

【0012】[0012]

【発明が解決しようとする課題】上述した従来のハフマ
ン復号回路は、1ビット毎にコード・ツリーを追跡した
場合、符号ビット数回のメモリ・アクセスを必要とする
ので、処理スピードの時間かかるという欠点がある。
In the conventional Huffman decoding circuit described above, if the code tree is traced bit by bit, it takes several code bits to access the memory, so that it takes a long processing speed. There are drawbacks.

【0013】また、これを避ける回路として、最大符号
語長分のビット・アドレスを持つメモリを使用する回路
を用いることがある。しかしながら、この復号回路は、
例えば16ビットで65536ワードの大きなメモリを
必要とし、このように大きなメモリをチップにのせる
と、面積が大きくなり、価格が高くなるという欠点があ
る。
As a circuit for avoiding this, a circuit using a memory having a bit address corresponding to the maximum code word length may be used. However, this decoding circuit
For example, a large memory of 16536 bits and 65536 words is required, and mounting such a large memory on a chip has a disadvantage that the area becomes large and the price becomes high.

【0014】更に、これらを避ける回路として、メモリ
を分割するものがある。この回路は、前述した復号回路
と比べると、1024ワードの内部メモリですむが、外
部メモリも必要とするため、システム全体では価格が高
くなるという欠点がある。
Further, as a circuit for avoiding these, there is a circuit for dividing a memory. Although this circuit requires an internal memory of 1024 words as compared with the above-described decoding circuit, it requires an external memory, and thus has a disadvantage in that the price of the entire system becomes high.

【0015】本発明の目的は、復号処理スピードを速く
し、必要とするメモリ容量も少なくするとともに、集積
化の容易なハフマン復号回路を提供することにある。
An object of the present invention is to provide a Huffman decoding circuit which can increase the decoding processing speed, reduce the required memory capacity, and can be easily integrated.

【0016】[0016]

【課題を解決するための手段】本発明のハフマン復号回
路は、入力されるハフマン符号データを復号処理するた
めの復号語を保持しフラグによりリセットされるラッチ
手段と、アドレス用データを作成するために、前記ラッ
チ手段の出力の一部または前記ハフマン符号データの一
部を外部からのセレクト信号によって選択する選択手段
と、前記ハフマン符号データの先頭の1ビットを含む残
りのデータと前記ラッチ手段の出力の残りのデータと前
記選択手段から出力される前記アドレス用データをアド
レス入力とし、前記復号語および符号長と前記フラグを
出力するとともに、1ビット追跡に必要な容量を持った
メモリ手段とを有し、前記メモリ手段を前記セレクト信
号が1ビット追跡および複数ビット追跡のいずれの場合
にも使用できるように構成される。また、本発明のハフ
マン復号回路は、入力されるハフマン符号データを復号
処理するための復号語を保持しフラグによりリセットさ
れるラッチ手段と、アドレス用データを作成するため
に、前記ラッチ手段の出力の一部または前記ハフマン符
号データの一部を外部からのセレクト信号によって選択
する第1の選択手段と、前記第1の選択手段の出力およ
び前記ハフマン符号データの一部をアドレス入力とし、
前記復号語および符号長と前記フラグを出力するととも
に、2ビット追跡に必要な容量を持った第1のメモリ手
段と、前記ハフマン符号データのみをアドレス入力と
し、前記第1のメモリ手段の前記復号語および前記符号
長とは別の復号語および符号長を出力する第2のメモリ
手段と、前記第1,第2のメモリ手段から出力される前
記各復号語を選択して出力する第2の選択手段と、前記
第1,第2のメモリ手段から出力される前記各符号長を
選択して出力する第3の選択手段と、前記第1のメモリ
手段の前記符号長とともに出力される前記フラグに基い
て前記第2,第3の選択手段を制御するためのセレクト
信号を作成するセレクト信号生成部とを有し、前記第1
のメモリ手段を前記セレクト信号が2ビット追跡および
それ以外の複数ビット追跡のいずれの場合にも使用でき
るように構成される。
SUMMARY OF THE INVENTION A Huffman decoding circuit according to the present invention has a latch means for holding a decoded word for decoding input Huffman code data and resetting by a flag, and for generating address data. a selecting means for selecting by the select signal from the outside part of part or the Huffman code data of the output of said latch means, the remaining data and said latch means including a first one bit of the Huffman code data The remaining data of the output and the address data output from the selecting means are used as an address input, and the decoded word, the code length and the flag are output , and a capacity necessary for 1-bit tracking is provided. have a memory means, the memory means the select signal
If the signal is one-bit tracking or multi-bit tracking
It is also configured to be usable . Further, the Huffman decoding circuit of the present invention has a latch means for holding a decoded word for decoding input Huffman code data and resetting by a flag, and for creating address data.
, The first selection means for selecting by the select signal from the outside part of part or the Huffman code data of the output of said latch means, a portion of the output and the Huffman code data of the first selection means Is the address input,
Together and outputs the flag to the decoded word and the code length
A first memory means having a capacity necessary for 2-bit tracking, and an address input of only the Huffman code data, and a decoded word and a code length different from the decoded word and the code length of the first memory means. A second memory for outputting a code length, a second selector for selecting and outputting each of the decoded words output from the first and second memory, and the first and second memories Third selecting means for selecting and outputting each of the code lengths output from the means, and the second and third selecting means based on the flag output together with the code length of the first memory means. to create a select signal for controlling the possess a select signal generator, the first
The select signal tracks two bits in the memory means.
Can be used for any other multi-bit tracking
It is configured to be .

【0017】[0017]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。図1は本発明の第1の実施例を示すハフマ
ン復号回路のブロック図である。図1に示すように、本
実施例は4ビットのハフマン符号データ列dの先頭1ビ
ットを最下位のアドレス入力とする512W×9ビット
構成のメモリ3と、このメモリ3からのQFの出力すな
わちフラグcが0である場合にデータQ7−Q0の8ビ
ットをラッチするリセット付ラッチ回路1と、ハフマン
復号を1ビット単位に行う場合はラッチ回路1からの3
ビットを選択し、4ビット単位で行う場合にはハフマン
符号データdの3ビットを選択するセレクタ2とから構
成される。特に、メモリ3は最下位アドレスALのほか
にセレクタ2の出力3ビットをアドレス2ビット目から
4ビット目とし且つラッチ回路1から出力8ビットの内
5ビットを上位5ビットのアドレス入力とし、QDから
復号語aと符号長bを出力し、QFからフラグcを出力
する。このメモリ3のQFの出力は、QDの出力が復号
語であれば1、ポインタであれば0を表わすフラグであ
る。
Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a Huffman decoding circuit showing a first embodiment of the present invention. As shown in FIG. 1, in the present embodiment, a memory 3 having a 512W × 9-bit configuration in which the first one bit of a 4-bit Huffman code data string d is the lowest address input, and a QF output from the memory 3, ie, When the flag c is 0, the latch circuit 1 with a reset latches 8 bits of data Q7-Q0, and when the Huffman decoding is performed in 1-bit units, 3
In the case where bits are selected and performed in units of 4 bits, the selector 2 is configured to select 3 bits of the Huffman code data d. In particular, the memory 3 sets the output 3 bits of the selector 2 to the second to fourth bits of the address in addition to the least significant address AL, and sets 5 bits out of the 8 bits output from the latch circuit 1 to the upper 5 bits of the address input. Output a decoded word a and a code length b, and output a flag c from QF. The output of the QF of the memory 3 is a flag representing 1 if the output of the QD is a decoded word and 0 if it is a pointer.

【0018】図2(a),(b)はそれぞれ図1に示す
メモリの2つの設定例を説明するための図である。図2
(a),(b)に示すように、メモリ3にはあらかじめ
復号語AおよびCのデータが設定されているとする。以
下、ハフマン符号dが‘0101’の復号語Aと、‘1
101000101’の復号語Cとを4ビット単位で復
号した場合について説明する。
FIGS. 2A and 2B are diagrams for explaining two setting examples of the memory shown in FIG. FIG.
As shown in (a) and (b), it is assumed that the data of the decoded words A and C are set in the memory 3 in advance. Hereinafter, the decoded word A whose Huffman code d is “0101” and “1”
The case where the decoded word C of 101000101 ′ is decoded in units of 4 bits will be described.

【0019】まず、図2(a)に示すように、復号語A
に対するハフマン符号‘0101’が送られてくると、
ラッチ回路1はリセットされ、8ビット全て‘0’を出
力する。この8ビットの内上位5ビットはメモリ3のア
ドレス上位5ビットに入力される。また、下位3ビット
はセレクタ2のA0端子に入力されるが、4ビット単位
の時のセレクタ2は外部からのセレクト信号eによりA
1端子側を選択するので、この下位3ビットデータは無
視される。次に、ハフマン符号データdの4ビット目の
‘0’はメモリ3の最下位アドレスに入力される。3ビ
ット目から1ビット目の‘101’はセレクタ2のA1
端子を経由してメモリ3のアドレスAHLに送られる。
結局、メモリ3にはアドレス‘000001010’が
送られるので、メモリ3は復号語A,符号長4と復号語
の出力を表わすフラグ=1を出力する。このフラグ=1
により、ラッチ回路1はリセットされる。そして、次の
ハフマン符号データ列dの先頭が送られてくる。
First, as shown in FIG.
Huffman code '0101' for
The latch circuit 1 is reset and outputs "0" for all eight bits. The upper 5 bits of the 8 bits are input to the upper 5 bits of the address of the memory 3. The lower three bits are input to the A0 terminal of the selector 2. However, the selector 2 in the unit of 4 bits receives an A signal in response to an external select signal e.
Since one terminal side is selected, the lower 3 bits of data are ignored. Next, the fourth bit “0” of the Huffman code data d is input to the lowest address of the memory 3. '101' of the third bit to the first bit is A1 of the selector 2
It is sent to the address AHL of the memory 3 via the terminal.
After all, since the address '00000001010' is sent to the memory 3, the memory 3 outputs the decoded word A, the code length 4, and the flag = 1 indicating the output of the decoded word. This flag = 1
Thereby, the latch circuit 1 is reset. Then, the head of the next Huffman code data sequence d is sent.

【0020】次に、図2(b)に示すように、復号語C
に対するハフマン符号‘1101000101’が送ら
れてきたとする。このときのラッチ回路1はリセットさ
れ、8ビット全て‘0’が出力される。従って、メモリ
アドレスAHHには‘00000’が入力され、一方ハ
フマン符号データdの10ビット目の‘1’はメモリ3
の最下位アドレスALに入力される。また、9ビット目
から7ビット目の‘101’はセレクタのA1を経由
してメモリアドレスAHLに入力される。結局、メモリ
3にはアドレス‘000001011’が入力され、メ
モリ3からポインタ‘00001000’とフラグ=0
が出力される。このメモリ3の出力がポインタであるの
で、このポインタとハフマン符号データ列dの次の4ビ
ットに基づいて再度追跡を行う。
Next, as shown in FIG.
Is assumed to have been sent. At this time, the latch circuit 1 is reset, and "0" is output for all eight bits. Therefore, the memory address AHH inputted is '00000', whereas the '1' 10 bit of the Huffman code data d is memory 3
Is input to the lowest address AL. Also, the 9th bit
The '101 ' of the seventh bit from is input to the memory address AHL via A1 of the selector 2 . Eventually, the address “0000001011” is input to the memory 3, the pointer “00001000” and the flag = 0 from the memory 3.
Is output. Since the output of the memory 3 is a pointer, tracking is performed again based on the pointer and the next four bits of the Huffman code data sequence d.

【0021】次に、ラッチ回路1はポインタをラッチす
るので、‘00001000’を出力する。この出力の
うち、上位5ビット‘00001’はメモリアドレスA
HHに入力される。また、ハフマン符号データdの6ビ
ット目の‘0’はメモリ3の最下位アドレスALに入力
される。更に、5ビット目から3ビット目の‘001’
はセレクタ2のA1を経由してメモリアドレスAHLに
入力される。結局、メモリ3にはアドレス‘00001
1000’が入力され、メモリ3からはポインタ‘00
010000’とフラグ=0が出力される。この出力が
またもポインタであるので、再度追跡を行う。
Next, since the latch circuit 1 latches the pointer, it outputs '00001000'. Of this output, the upper 5 bits '00001' are the memory address A
Input to HH. The sixth bit “0” of the Huffman code data d is input to the lowest address AL of the memory 3. Furthermore, "001" of the 5th bit to the 3rd bit
Is input to the memory address AHL via the selector A1. Eventually, the address “00001” is stored in the memory 3.
1000 'is input, and the pointer '00 is
010000 'and flag = 0 are output. Since this output is a pointer again, tracking is performed again.

【0022】これにより、ラッチ回路1はポインタをラ
ッチするので、‘00010000’を出力する。この
うち、上位5ビット‘00010’はメモリアドレスA
HHに入力され、ハフマン符号データdの2ビット目の
‘0’はメモリ3の最下位アドレスALに入力される。
更に、1ビット目の‘1’と次のハフマン符号データ列
dの先頭2ビット‘××’はセレクタ2のA1端子を経
由し、メモリアドレスAHLに入力される。従って、メ
モリ3にはアドレス‘00010××10’が入力さ
れ、メモリ3からは復号語C,符号長10と復号語の出
力をあらわすフラグ=1が出力される。このフラグによ
ってラッチ回路1はリセットされる。
As a result, since the latch circuit 1 latches the pointer, it outputs '00010000'. Of these, the upper 5 bits '00010' are the memory address A
HH, the second bit “0” of the Huffman code data d is input to the lowest address AL of the memory 3.
Further, the first bit “1” and the first two bits “xx” of the next Huffman code data string d are input to the memory address AHL via the A1 terminal of the selector 2. Accordingly, the address “00010 ×× 10” is input to the memory 3, and the decoded word C, the code length 10 and the flag = 1 indicating the output of the decoded word are output from the memory 3. The latch circuit 1 is reset by this flag.

【0023】以上のように、4ビット単位でハフマン復
号を行うのであるが、復号テーブルの大きさは最悪の場
合1ビット単位に比べ倍の容量が必要になる。このよ
うな場合は、1ビット単位の復号ツリーをメモリ3に設
定し、セレクタ2をA0端子側にして1ビット単位で復
号ツリーを追跡する。
As described above, Huffman decoding is performed in units of 4 bits. In the worst case, the size of the decoding table requires eight times the capacity of the unit of 1 bit. In such a case, a decoding tree in units of 1 bit is set in the memory 3, and the decoding tree is tracked in units of 1 bit by setting the selector 2 to the A0 terminal side.

【0024】図3は本発明の第2の実施例を示すハフマ
ン復号回路のブロック図である。図3に示すように、本
実施例はラッチ1およびセレクタ2と、16ビットのハ
フマン符号データ列hの先頭から2ビットをメモリアド
レス下位2ビットに入力し且つセレクタ2の出力8ビッ
トをアドレス3ビット目から10ビット目のアドレス入
力とする内部メモリ4と、ハフマン符号データ列hの下
位13ビットをアドレス入力とする外部メモリ5と、内
部メモリ4の出力が有効であれば内部メモリ4の出力を
選択するセレクト信号をセレクタ6,7に送るセレクト
信号生成部8とを有する。このうち、ラッチ回路1は内
部メモリ4からのフラグの出力が0である場合にデータ
(Q7−Q0)をラッチする。セレクタ2は2ビット毎
の追跡を行う場合にラッチ回路1からの8ビットを選択
し、それ以外の場合にハフマン符号データ8ビット(1
3−6)を選択する。更に、内部メモリ4は1KW×1
3ビット、外部メモリ5は8KW×13ビットで構成さ
れる。
FIG. 3 is a block diagram of a Huffman decoding circuit showing a second embodiment of the present invention. As shown in FIG. 3, in the present embodiment, the first two bits of the 16-bit Huffman code data string h are input to the lower 2 bits of the memory address, and the output 8 bits of the selector 2 are assigned to the address 3 An internal memory 4 for inputting an address of the 10th to 10th bits, an external memory 5 for inputting the lower 13 bits of the Huffman code data string h as an address, and an output of the internal memory 4 if the output of the internal memory 4 is valid And a select signal generation unit 8 that sends a select signal for selecting the select signal to the selectors 6 and 7. The latch circuit 1 latches the data (Q7-Q0) when the output of the flag from the internal memory 4 is 0. The selector 2 selects 8 bits from the latch circuit 1 when performing tracking for every 2 bits, and otherwise selects 8 bits (1 bit) of Huffman code data.
Select 3-6). Further, the internal memory 4 is 1KW × 1
The external memory 5 is composed of 3 bits and 8 KW × 13 bits.

【0025】まず、内部メモリ4および外部メモリ5に
それぞれ復号語8ビットと符号長5ビット以下で復号語
をあらわすものについて復号語および符号長を設定す
る。また、内部メモリ4の出力が有効な場合は1、無効
な場合は0であるフラグを符号長5ビット目に設定す
る。一方、外部メモリ5には、11ビット以上16ビッ
トまでのハフマン符号に対する復号語および符号長を設
定する。
First, a decoded word and a code length are set in the internal memory 4 and the external memory 5 for a decoded word having a decoded word of 8 bits and a code length of 5 bits or less. Further, a flag which is 1 when the output of the internal memory 4 is valid and 0 when the output is invalid is set to the fifth bit of the code length. On the other hand, a decoded word and a code length for the Huffman code of 11 bits to 16 bits are set in the external memory 5.

【0026】次に、かかるハフマン復号回路において、
ハフマン符号長が10ビット以内であれば内部メモリ4
だけで高速に復号出来る。復号処理スピードが遅くても
良い場合は、1ビット毎の復号ツリーを追跡して復号す
る。逆に、価格が高くても処理スピードを速くする必要
がある場合は、内部メモリ4と外部メモリ5を用いて復
号する。以下、内部メモリ4の具体的設定例をとり上げ
て説明する。
Next, in such a Huffman decoding circuit,
If the Huffman code length is within 10 bits, the internal memory 4
Can be decoded at high speed. If the decoding processing speed can be low, the decoding tree is tracked and decoded for each bit. Conversely, when the processing speed needs to be increased even if the price is high, decoding is performed using the internal memory 4 and the external memory 5. Hereinafter, a specific setting example of the internal memory 4 will be described.

【0027】図4は図3に示す内部メモリの一設定例を
表わす図である。図4に示すように、まずハフマン符号
データhが10ビット以内であり、内部メモリだけで十
分な場合について説明する。この内部メモリ4には、復
号語Dと符号長6が設定されているとし、今ハフマン符
号データ列hに‘010101…’が送られてきたとす
る。このとき、ラッチ回路1はリセットされ、8ビット
全て‘0’が出力される。この8ビットはセレクタ2の
A0端子に入力されるが、この場合はセレクタ2が外部
セレクト信号eによりA1端子を選択するので、8ビッ
トは無視される。次に、ハフマン符号データ列hの先頭
2ビット‘01’は内部メモリ4に送られ、3ビット目
から8ビットはセレクタ2のA1端子を経て内部メモリ
4に送られる。この内部メモリ4はアドレス‘××××
101010’が入力されるので、復号語Dと符号長6
およびフラグ=1を出力する。これらのデータは各セレ
クタ6,7に送出される。しかるに、フラグ=1により
内部メモリ4からの出力が有効であることをセレクト信
号生成部8に送出するので、セレクト信号生成部8は内
部メモリ4の出力を選択するように各セレクタ6,7に
セレクト信号を送る。従って、各セレクタ6,7は内部
メモリ4からの復号語Dおよび符号長6を出力する。こ
のうち、符号長6はハフマン符号データ列hに送られ、
次のハフマン符号データ列hの先頭が決まる。
FIG. 4 is a diagram showing a setting example of the internal memory shown in FIG. As shown in FIG. 4, the case where the Huffman code data h is within 10 bits and only the internal memory is sufficient will be described. It is assumed that a decoded word D and a code length 6 are set in the internal memory 4 and that “010101...” Has been sent to the Huffman code data string h. At this time, the latch circuit 1 is reset, and all eight bits of “0” are output. These 8 bits are input to the A0 terminal of the selector 2. In this case, since the selector 2 selects the A1 terminal by the external select signal e, the 8 bits are ignored. Next, the first two bits “01” of the Huffman code data string h are sent to the internal memory 4, and the third to eight bits are sent to the internal memory 4 via the A1 terminal of the selector 2. This internal memory 4 has the address' ××××
Since 101010 ′ is input, the decoded word D and the code length 6
And flag = 1. These data are sent to the selectors 6,7. However, the fact that the output from the internal memory 4 is valid is sent to the select signal generation unit 8 by the flag = 1, so that the select signal generation unit 8 causes each of the selectors 6 and 7 to select the output of the internal memory 4. Send a select signal. Accordingly, each of the selectors 6 and 7 outputs the decoded word D and the code length 6 from the internal memory 4. The code length 6 is sent to the Huffman code data string h,
The head of the next Huffman code data string h is determined.

【0028】図5は図3に示す内部メモリの他の設定例
を表わす図である。図5に示すように、この内部メモリ
4は2ビット単位でハフマン復号が行われる場合であ
り、復号語Bと符号長11が設定されているとする。
今、ハフマン符号データ列‘11111010001
…’が送られてきたとすると、ラッチ回路1はリセット
され、出力8ビットは全て‘0’が出力される。この8
ビットはセレクタ2のA0端子を経て内部メモリ4に入
力される。一方、セレクタ2のA1にはハフマン符号8
ビットが入力されるが、2ビット毎の追跡の場合はセレ
クタ2がA0側を選択するので、無視される。このハフ
マン符号データhの先頭2ビット‘11’は内部メモリ
4のアドレスの下位2ビットに送られる。従って、内部
メモリ4はアドレス‘0000000011’が入力さ
れ、ポインタ‘00000001’とフラグ=0を出力
する。このポインタ8ビットはラッチ回路1でラッチさ
れ、その出力8ビットに‘00000001’を出力す
る。このラッチ1の出力8ビット‘00000001’
はセレクタ2のA0端子を経て内部メモリ4に入力され
る。
FIG. 5 is a diagram showing another example of setting of the internal memory shown in FIG. As shown in FIG. 5, the internal memory 4 is a case where Huffman decoding is performed in units of 2 bits, and it is assumed that a decoded word B and a code length 11 are set.
Now, the Huffman code data string '11111010001
.. Are sent, the latch circuit 1 is reset, and all the output 8 bits output "0". This 8
The bit is input to the internal memory 4 via the A0 terminal of the selector 2. On the other hand, A1 of selector 2 has Huffman code 8
Bits are input, but in the case of tracking every two bits, since the selector 2 selects the A0 side, it is ignored. The first two bits '11' of the Huffman code data h are sent to the lower two bits of the address of the internal memory 4. Therefore, the internal memory 4 receives the address '00000000011' and outputs the pointer '00000001' and the flag = 0. The 8 bits of this pointer are latched by the latch circuit 1, and the output 8 bits output '00000001'. Output 8 bits of this latch 1 '00000001'
Is input to the internal memory 4 via the A0 terminal of the selector 2.

【0029】次に、ハフマン符号データ列hの次の2ビ
ットの‘11’は内部メモリ4のアドレスの下位2ビッ
トに送られる。すなわち、内部メモリ4には、アドレス
‘0000000111’が入力され、その出力側には
ポインタ‘00000010’を出力する。この8ビッ
ト‘00000010’はセレクタ2のA0端子を経て
内部メモリ4に入力される。また、ハフマン符号データ
列hの次の2ビットの‘10’は内部メモリ4のアドレ
スの下位2ビットに送られるので、内部メモリ4にはア
ドレス‘0000001001’が入力され、ポインタ
‘00000011’とフラグ=0を出力する。このポ
インタはラッチ回路1でラッチし、8ビット‘0000
0011’をセレクタ2に出力する。この8ビット‘0
0000011’はセレクタ2のA0端子を経て内部メ
モリ4に入力される。
Next, the next two bits '11' of the Huffman code data string h are sent to the lower two bits of the address of the internal memory 4. That is, the address '0000000111' is input to the internal memory 4, and the pointer '00000010' is output to the output side. The 8-bit '00000010' is input to the internal memory 4 via the A0 terminal of the selector 2. Further, since the next two bits “10” of the Huffman code data string h are sent to the lower two bits of the address of the internal memory 4, the address “00000001001” is input to the internal memory 4, and the pointer “000000011” and the flag = 0 is output. This pointer is latched by the latch circuit 1, and the 8-bit '0000'
0011 ′ is output to the selector 2. This 8-bit '0'
0000011 'is input to the internal memory 4 via the A0 terminal of the selector 2.

【0030】更に、ハフマン符号データ列hの次の2ビ
ットの‘10’は内部メモリ4のアドレスの下位2ビッ
トに送られる。すると、内部メモリ4にはアドレス‘0
000001101’が入力され、ポインタ‘0000
0100’とフラグ=0を出力する。このポインタはラ
ッチ回路1でラッチし、‘00000100’を出力す
る。この8ビット‘00000100’はセレクタ2の
A0端子を経て内部メモリ4に入力される。また、ハフ
マン符号データ列hの次の2ビットの‘00’は内部メ
モリ4のアドレスの下位2ビットに送られる。これによ
り、内部メモリ4には、アドレス‘000001000
0’が入力され、ポインタ‘00000101’とフラ
グ=0を出力する。同様に、ポインタはラッチ回路1で
ラッチされ、‘00000101’をセレクタ2に出力
する。この8ビット‘00000101’はセレクタ2
のA0端子を経て内部メモリ4に入力される。
Further, the next two bits “10” of the Huffman code data string h are sent to the lower two bits of the address of the internal memory 4. Then, the address “0” is stored in the internal memory 4.
000000111 'is input and the pointer' 0000 '
0100 'and flag = 0 are output. This pointer is latched by the latch circuit 1 and outputs '00000100'. The 8-bit '00000100' is input to the internal memory 4 via the A0 terminal of the selector 2. The next two bits “00” of the Huffman code data string h are sent to the lower two bits of the address of the internal memory 4. Thus, the address '000001000' is stored in the internal memory 4.
0 is input, and a pointer '00000101' and flag = 0 are output. Similarly, the pointer is latched by the latch circuit 1 and outputs '00000101' to the selector 2. The 8 bits '000000101' are
Is input to the internal memory 4 through the A0 terminal.

【0031】次に、ハフマン符号データ列hの次の2ビ
ットの‘1×’が内部メモリ4のアドレスの下位2ビッ
トに送られると、内部メモリ4にはアドレス‘0000
0101×1’が入力されるので、復号語Bと符号長1
1およびフラグ=1を出力する。この内部メモリ4の出
力は各セレクタ6,7に送られるとともに、フラグ=1
により内部メモリ4からの出力が有効であることをセレ
クト信号生成部8に送出する。従って、セレクト信号生
成部8は内部メモリ4の出力を選択するように、各セレ
クタ6,7にセレクト信号を送出する。これを受けて各
セレクタ6,7は内部メモリ4からの復号語Bおよび符
号長11を出力する。この符号長11はハフマン符号デ
ータ列hに送られ、次のハフマン符号データ列hの先頭
が決まる。
Next, when the next two bits “1 ×” of the Huffman code data string h are sent to the lower two bits of the address of the internal memory 4, the address “0000” is stored in the internal memory 4.
0101 × 1 ′, the decoded word B and the code length 1
1 and flag = 1 are output. The output of the internal memory 4 is sent to each of the selectors 6 and 7, and the flag = 1
To the select signal generator 8 that the output from the internal memory 4 is valid. Therefore, the select signal generator 8 sends a select signal to each of the selectors 6 and 7 so as to select an output of the internal memory 4. In response, the selectors 6 and 7 output the decoded word B and the code length 11 from the internal memory 4. This code length 11 is sent to the Huffman code data string h, and the head of the next Huffman code data string h is determined.

【0032】次に、内部メモリ4と外部メモリ5の両者
を使用する場合についての回路動作を説明する。まず、
内部メモリ4にはハフマン符号データ列16ビットの上
位10ビット以下で復号語をあらわすものについて復号
語および符号長を設定する。また、内部メモリ4の出力
が有効な場合は1、無効な場合は0であるフラグを符号
長5ビット目に設定する。更に、外部メモリ5には、1
1ビット以上16ビットまでのハフマン符号に対する復
号語および符号長を設定する。但し、符号長の順にハフ
マンコードが割り当ててあれば、11ビット以上のハフ
マン符号の先頭3ビットは必ず‘111’になるので、
外部メモリ5のアドレス入力には先頭3ビットを除いて
入力している。しかも、内部メモリ4には、例えば復号
語Dに対するハフマン符号が‘010101’であれ
ば、アドレス‘××××101010’の全てに復号語
Dと符号長6を設定し、外部メモリ5には、例えば復号
語Bに対するハフマン符号が‘1111101000
1’であれば、アドレス‘×××××10001011
に復号語Bと符号長11を設定する。
Next, the circuit operation when both the internal memory 4 and the external memory 5 are used will be described. First,
A decoded word and a code length are set in the internal memory 4 for a decoded word represented by the upper 10 bits or less of the 16 bits of the Huffman code data string. Further, a flag which is 1 when the output of the internal memory 4 is valid and 0 when the output is invalid is set to the fifth bit of the code length. Further, the external memory 5 has 1
A decoded word and a code length for a Huffman code of 1 bit to 16 bits are set. However, if Huffman codes are assigned in the order of the code length, the first three bits of the Huffman code of 11 bits or more are always '111'.
The address input to the external memory 5 is input except for the first three bits. In addition, if the Huffman code for the decoded word D is “010101” in the internal memory 4, the decoded word D and the code length 6 are set in all of the addresses “xxx10101” , and the external memory 5 is set in the external memory 5. For example, if the Huffman code for the decoded word B is' 1111101000
If it is 1 ', the address is ' xxxxxx10001011
, The decoded word B and the code length 11 are set.

【0033】今、ハフマン符号データ列hに‘0101
01…’が送られてきたとする。このハフマン符号デー
タ列hの先頭ビット‘01’は内部メモリ4に送ら
れ、3ビット目から6ビット目の‘0101’と次のハ
フマン符号データhの先頭4ビットはセレクタ2のA1
端子を経て内部メモリ4に送られる。これら内部メモリ
4と外部メモリ5の両方を用いるときは、セレクタ2が
A1端子を選択するからである。従って、内部メモリ4
には、アドレスアドレス‘××××010101’が入
力され、復号語Dと符号長6およびフラグ=1が出力さ
れる。このフラグ=1により、内部メモリ4からの出力
が有効であることをセレクト信号生成部8に送出する。
一方、外部メモリ5はアドレス入力された13ビットで
得られた復号語と符号長を出力する。これら各メモリ
4,5から得られた復号語と符号長は各セレクタ6,7
に送られるが、セレクト信号生成部8はフラグ=1によ
り内部メモリ4の出力を選択するように各セレクタ6,
7に選択信号を送る。従って、各セレクタ6,7は内部
メモリ4からの復号語Dと符号長6を出力する。この符
号長6はハフマン符号データ列hに送られ、次のハフマ
ン符号データ列hの先頭が決まる。 次に、ハフマン符号
データ列‘11111010001…’が送られてきた
とする。このとき、内部メモリ4には、先頭2ビット
‘11’とセレクタ2のA1端子を経た先頭3ビット目
から10ビット目の‘11101000’が送られる。
従って、アドレス‘0001011111’が入力され
る。また、この内部メモリ4には、フラグ=0が設定さ
れており、このフラグ=0により、内部メモリ4の出力
が無効であることをセレクト信号生成部8に送出する。
一方、外部メモリ5には、先頭3ビット目から13ビッ
トが送られる。従って、外部メモリ5には、アドレス
‘×××××10001011’が入力され、復号語B
と符号長11を出力する。ここで、セレクト信号生成部
8はフラグ=0より外部メモリ5の出力を選択するよう
に各セレクタに選択信号を送る。これにより、各セレク
タは、外部メモリ5からの復号語Bと符号長11を出力
する。この符号長11は、ハフマン符号データ列に送ら
れ、次のハフマン符号データ列の先頭が決まる。 下同
様に、これらの動作を繰り返えすことによってハフマン
符号が復号される。
Now, '0101' is added to the Huffman code data string h.
01 ... 'has been sent. The first two bits “ 01 ” of the Huffman coded data string h are sent to the internal memory 4, and the third to sixth bits “ 0101 ” and the first four bits of the next Huffman coded data h are A1 of the selector 2.
It is sent to the internal memory 4 via the terminal. This is because when both the internal memory 4 and the external memory 5 are used, the selector 2 selects the A1 terminal. Therefore, the internal memory 4
Receives the decoded address D, the code length 6, and the flag = 1. By this flag = 1, the fact that the output from the internal memory 4 is valid is sent to the select signal generator 8.
On the other hand, the external memory 5 outputs the decoded word and the code length obtained et the 13 bits address input. The decoded words and code lengths obtained from the memories 4 and 5 are stored in the selectors 6 and 7 respectively.
To the selectors 6 and 6 so that the output of the internal memory 4 is selected by the flag = 1.
7 is sent a selection signal. Accordingly, each of the selectors 6 and 7 outputs the decoded word D and the code length 6 from the internal memory 4. The code length 6 is sent to the Huffman code data sequence h, the beginning of the next Huffman code data sequence h is Ru Kemah. Next, the Huffman code
Data string '11111010001 ...' has been sent
And At this time, the first two bits are stored in the internal memory 4.
The first 3 bits via '11' and A1 terminal of selector 2
, The 11th bit '11101000' is sent.
Therefore, the address '0001011111' is input.
You. Also, a flag = 0 is set in the internal memory 4.
When the flag = 0, the output of the internal memory 4 is
Is sent to the select signal generator 8.
On the other hand, the external memory 5 has 13 bits from the third bit at the beginning.
Is sent. Therefore, the external memory 5 has the address
'Xxxxxx10001011' is input and the decoded word B
And the code length 11 are output. Here, the select signal generation unit
8 selects the output of the external memory 5 from the flag = 0
To each selector. This allows each select
Outputs the decoded word B and the code length 11 from the external memory 5
I do. This code length 11 is transmitted to the Huffman code data sequence.
The head of the next Huffman code data sequence is determined. Under Similarly following, the Huffman code is decoded by to Kaee repeated the operation of these.

【0034】[0034]

【発明の効果】以上説明したように、本発明のハフマン
復号回路は1ビット追跡に必要な容量のメモリしか持た
ないので、処理スピードが早く、4ビット復号でもコス
トが安くて済むという効果がある。例えば、メモリ容量
は4ビット追跡の場合の最悪のメモリ容量に比べ16分
の1で済む。また、本発明において外部メモリを設ける
場合、ユーザがコストとスピードにより各種方式を選択
できるという効果がある。尚、本発明はハフマン符号の
構成条件によっては1ビット単位の低速の復号ツリー追
跡しか出来なくなるが、静止画符号化等で常用されてい
る符号では4ビット追跡出来る範囲に収まっている。
As described above, since the Huffman decoding circuit of the present invention has only a memory having a capacity necessary for 1-bit tracking, the processing speed is high and the cost can be reduced even with 4-bit decoding. . For example, the memory capacity is only 1/16 of the worst memory capacity for 4-bit tracking. Further, in the case where an external memory is provided in the present invention, there is an effect that a user can select various methods according to cost and speed. In the present invention, only low-speed decoding tree tracing in units of 1 bit can be performed depending on the configuration conditions of the Huffman code, but a code commonly used in still image coding or the like is within the range in which 4 bits can be tracing.

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

【図1】本発明の第1の実施例を示すハフマン復号回路
のブロック図である。
FIG. 1 is a block diagram of a Huffman decoding circuit showing a first embodiment of the present invention.

【図2】図1に示すメモリの2つの設定例を説明するた
めの図である。
FIG. 2 is a diagram for describing two setting examples of a memory shown in FIG. 1;

【図3】本発明の第2の実施例を示すハフマン復号回路
のブロック図である。
FIG. 3 is a block diagram of a Huffman decoding circuit showing a second embodiment of the present invention.

【図4】図3に示す内部メモリの一設定例を表わす図で
ある。
FIG. 4 is a diagram illustrating a setting example of an internal memory illustrated in FIG. 3;

【図5】図3に示す内部メモリの他の設定例を表わす図
である。
FIG. 5 is a diagram showing another example of setting of the internal memory shown in FIG.

【図6】従来の一例を示すハフマン復号回路のブロック
図である。
FIG. 6 is a block diagram of a Huffman decoding circuit showing an example of the related art.

【図7】従来の他の例を示すハフマン復号回路のブロッ
ク図である。
FIG. 7 is a block diagram of a Huffman decoding circuit showing another conventional example.

【図8】図7に示す内部メモリの設定例を表わす図であ
る。
FIG. 8 is a diagram illustrating an example of setting of an internal memory illustrated in FIG. 7;

【図9】従来のまた別の例を示すハフマン復号回路のブ
ロック図である。
FIG. 9 is a block diagram of a Huffman decoding circuit showing still another conventional example.

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

1 リセット付ラッチ回路 2,6,7 セレクタ 3,4 内部メモリ 5 外部メモリ 8 セレクト信号生成部 a,f 復号語 d,g 符号長 c フラグ d,h ハフマン符号データ e 外部セレクト信号 Reference Signs List 1 Latch circuit with reset 2, 6, 7 Selector 3, 4 Internal memory 5 External memory 8 Select signal generator a, f Decoded word d, g Code length c Flag d, h Huffman code data e External select signal

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) H03M 7/40──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 6 , DB name) H03M 7/40

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力されるハフマン符号データを復号処
理するための復号語を保持しフラグによりリセットされ
るラッチ手段と、アドレス用データを作成するために、
前記ラッチ手段の出力の一部または前記ハフマン符号デ
ータの一部を外部からのセレクト信号によって選択する
選択手段と、前記ハフマン符号データの先頭の1ビット
を含む残りのデータと前記ラッチ手段の出力の残りのデ
ータと前記選択手段から出力される前記アドレス用デー
タをアドレス入力とし、前記復号語および符号長と前記
フラグを出力するとともに、1ビット追跡に必要な容量
を持ったメモリ手段とを有し、前記メモリ手段を前記セ
レクト信号が1ビット追跡および複数ビット追跡のいず
れの場合にも使用できるようにしたことを特徴とするハ
フマン復号回路。
1. A latch means for holding a decoded word for decoding input Huffman code data and resetting by a flag, and for creating address data,
Selecting means for selecting a part of the output of the latch means or a part of the Huffman code data by an external select signal; and the remaining data including the first one bit of the Huffman code data and the output of the latch means. The remaining data and the address data output from the selection means are used as an address input, and the decoded word, code length and the flag are output, and the capacity required for 1-bit tracking is output.
Have a memory means having, said the memory means cell
Rect signal is one-bit tracking or multi-bit tracking
A Huffman decoding circuit characterized in that it can be used in both cases .
【請求項2】 入力されるハフマン符号データを復号処
理するための復号語を保持しフラグによりリセットされ
るラッチ手段と、アドレス用データを作成するために、
前記ラッチ手段の出力の一部または前記ハフマン符号デ
ータの一部を外部からのセレクト信号によって選択する
第1の選択手段と、前記第1の選択手段の出力および前
記ハフマン符号データの一部をアドレス入力とし、前記
復号語および符号長と前記フラグを出力するとともに、
2ビット追跡に必要な容量を持った第1のメモリ手段
と、前記ハフマン符号データのみをアドレス入力とし、
前記第1のメモリ手段の前記復号語および前記符号長と
は別の復号語および符号長を出力する第2のメモリ手段
と、前記第1,第2のメモリ手段から出力される前記各
復号語を選択して出力する第2の選択手段と、前記第
1,第2のメモリ手段から出力される前記各符号長を選
択して出力する第3の選択手段と、前記第1のメモリ手
段の前記符号長とともに出力される前記フラグに基いて
前記第2,第3の選択手段を制御するためのセレクト信
号を作成するセレクト信号生成部とを有し、前記第1の
メモリ手段を前記セレクト信号が2ビット追跡およびそ
れ以外の複数ビット追跡のいずれの場合にも使用できる
ようにしたことを特徴とするハフマン復号回路。
2. A latch means for holding a decoded word for decoding input Huffman code data and resetting by a flag, and for creating address data,
First selecting means for selecting a part of the output of the latch means or a part of the Huffman code data by an external select signal; addressing the output of the first selecting means and a part of the Huffman code data to an address; As an input, while outputting the decoded word and the code length and the flag ,
First memory means having a capacity required for 2-bit tracking, and only the Huffman code data as an address input;
A second memory unit for outputting a decoded word and a code length different from the decoded word and the code length of the first memory unit, and the respective decoded words output from the first and second memory units A second selecting means for selecting and outputting the code length, a third selecting means for selecting and outputting each of the code lengths output from the first and second memory means, and the second based on the flag to be output together with the code length, a select signal generator for creating a select signal for controlling the third selection means possess, the first
The select signal is used to track and store two bits in the memory means.
Can be used for any other multi-bit tracking
Huffman decoding circuit, characterized in that the the like.
JP4273925A 1992-10-13 1992-10-13 Huffman decoding circuit Expired - Fee Related JP2842094B2 (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP4273925A JP2842094B2 (en) 1992-10-13 1992-10-13 Huffman decoding circuit
DE69332253T DE69332253T2 (en) 1992-10-13 1993-10-13 Decoding circuit for Huffman codes
KR1019930021495A KR0138971B1 (en) 1992-10-13 1993-10-13 Huffman code decoder
EP93116585A EP0593046B1 (en) 1992-10-13 1993-10-13 Huffman code decoding circuit
DE69329092T DE69329092T2 (en) 1992-10-13 1993-10-13 Huffman code decoding circuit
EP98120330A EP0920136B1 (en) 1992-10-13 1993-10-13 Huffman code decoding circuit
US08/135,448 US5467088A (en) 1992-10-13 1993-10-13 Huffman code decoding circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4273925A JP2842094B2 (en) 1992-10-13 1992-10-13 Huffman decoding circuit

Publications (2)

Publication Number Publication Date
JPH06125277A JPH06125277A (en) 1994-05-06
JP2842094B2 true JP2842094B2 (en) 1998-12-24

Family

ID=17534486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4273925A Expired - Fee Related JP2842094B2 (en) 1992-10-13 1992-10-13 Huffman decoding circuit

Country Status (1)

Country Link
JP (1) JP2842094B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6756381B2 (en) 2002-02-21 2004-06-29 Supergen, Inc. Compositions and formulations of 9-nitrocamptothecin polymorphs and methods of use thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0470012A (en) * 1990-07-09 1992-03-05 Nec Corp Variable length coding/decoding device
JPH04100324A (en) * 1990-08-18 1992-04-02 Ricoh Co Ltd Decoding system for variable length code

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6756381B2 (en) 2002-02-21 2004-06-29 Supergen, Inc. Compositions and formulations of 9-nitrocamptothecin polymorphs and methods of use thereof

Also Published As

Publication number Publication date
JPH06125277A (en) 1994-05-06

Similar Documents

Publication Publication Date Title
KR0138971B1 (en) Huffman code decoder
JP3189876B2 (en) Variable length code decoding circuit
US4800535A (en) Interleaved memory addressing system and method using a parity signal
JPH058835B2 (en)
JPH1013693A (en) Digital information encoding device, digital information decoding device, digital information encoding/decoding device, digital information encoding method and digital information decoding method
US6308249B1 (en) Storing data in a grey code system
JP2842094B2 (en) Huffman decoding circuit
US5859926A (en) Device and method for data coding and decoding
JP3009007B2 (en) Binary code decoding circuit
JPH06276394A (en) Huffman decoding circuit
JP2757716B2 (en) Huffman code decoding circuit
US4719592A (en) Sequence generator
JP2537551B2 (en) Variable length code decoding circuit
JPH05174584A (en) Data memory
KR0153051B1 (en) Progrommable mapping circuit
JP2882714B2 (en) State selection device
US6502179B2 (en) Method and apparatus for compactly storing instruction codes
JPH0377708B2 (en)
JP3270665B2 (en) Encoding / decoding apparatus and method
JPH0490267A (en) Decoding circuit for variable length code
JP2998532B2 (en) Address generation circuit for two-dimensional encoding table
JP3113765B2 (en) Variable length code decoding circuit
JPH03248240A (en) Microcomputer
JPS59117375A (en) Mh coding system
JPS602984A (en) Memory driving circuit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980922

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

Free format text: PAYMENT UNTIL: 20081023

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091023

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20091023

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101023

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20101023

Year of fee payment: 12

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20101023

Year of fee payment: 12

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111023

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees