JPH07106981A - Variable length code decoding circuit - Google Patents
Variable length code decoding circuitInfo
- Publication number
- JPH07106981A JPH07106981A JP25088693A JP25088693A JPH07106981A JP H07106981 A JPH07106981 A JP H07106981A JP 25088693 A JP25088693 A JP 25088693A JP 25088693 A JP25088693 A JP 25088693A JP H07106981 A JPH07106981 A JP H07106981A
- Authority
- JP
- Japan
- Prior art keywords
- code
- length
- variable
- length code
- variable length
- 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.)
- Granted
Links
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
(57)【要約】
【目的】データ伸張変換テーブルの規模を削減してメモ
リ容量を少なくし、コストの低減を図ること。
【構成】1〜2n ビット長の可変長符号をデコードする
可変長符号デコード回路であって、可変長符号の各長さ
の最小の符号を符号長の順番に保持するテーブル及び2
m −1(但し、m=1,2,……)個の比較器を有し、
前記テーブルから1度に2m −1個の要素を読み出し、
前記各比較器で可変長符号入力との大小比較を行うと共
にその比較動作をn/m回繰り返して、i番目のテーブ
ル要素 ≦ 可変長符号入力 < i+1番目のテーブル要
素という条件を満たすi番目のテーブル要素を発見する
ことで、可変長符号入力の先頭の符号の長さを求めるよ
うにしたことを特徴とする。
(57) [Abstract] [Purpose] To reduce the size of the data expansion conversion table to reduce the memory capacity and cost. A variable-length code decoding circuit for decoding a variable-length code having a length of 1 to 2 n bits, wherein a table holding the smallest code of each length of the variable-length code in the order of the code length and 2
It has m −1 (where m = 1, 2, ...) Comparators,
Reading 2 m -1 elements at a time from the table,
Each of the comparators performs a magnitude comparison with the variable length code input and repeats the comparison operation n / m times to satisfy the condition that i-th table element ≦ variable length code input <i + 1th table element. The feature is that the length of the leading code of the variable-length code input is obtained by finding the table element.
Description
【0001】[0001]
【産業上の利用分野】本発明は、可変長符号化して圧縮
したデータを元符号に変換する可変長符号デコード回路
に関する。近時、データ処理、画像処理又は情報通信等
の分野で取り扱われるデータ量はますます増加する傾向
にあり、転送効率の改善や記憶装置の効率的な使用とい
った点で、有効なデータ圧縮/伸張技術が求められてい
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a variable length code decoding circuit which converts variable length coded and compressed data into an original code. In recent years, the amount of data handled in fields such as data processing, image processing or information communication tends to increase more and more, and effective data compression / expansion is performed in terms of improving transfer efficiency and efficient use of storage devices. Technology is required.
【0002】[0002]
【従来の技術】M個の情報源記号(以下「元符号」と言
う){A}(A=0,1,……,M−1)の生起確率に
偏りがある場合、長さnの元符号列をn′<nの短い系
列に写像すること、すなわち圧縮することが可能であ
り、この原理を利用した以下に示すデータ圧縮技術が知
られている。2. Description of the Related Art If there are imbalances in the occurrence probabilities of M information source symbols (hereinafter referred to as "original codes") {A} (A = 0, 1, ..., M-1), a length n It is possible to map the original code sequence into a short sequence of n '<n, that is, to compress the sequence, and the following data compression techniques utilizing this principle are known.
【0003】図7のデータ圧縮変換テーブルにおいて、
符号1〜符号256は256個(個数は一例)の元符号
であり、出現頻度(生起確率)に従って符号1、符号
2、……、符号256の順に並べられている。符号1の
出現頻度が最も高く、符号256が最も低い。各符号に
割り当てられた可変長符号(2進数)は、元符号毎の変
換系列であり、それぞれのビット数は、 となっている。すなわち、可変長符号のビット数は、元
符号の出現頻度の高い方から低い方へと順次に増加して
いる。In the data compression conversion table of FIG.
Codes 1 to 256 are 256 (the number is an example) original code, and are arranged in the order of code 1, code 2, ..., Code 256 according to the appearance frequency (occurrence probability). The code 1 has the highest appearance frequency, and the code 256 has the lowest frequency. The variable length code (binary number) assigned to each code is a conversion sequence for each original code, and the number of bits of each is Has become. That is, the number of bits of the variable-length code sequentially increases from the higher appearance frequency of the original code to the lower appearance frequency.
【0004】今、元符号列が[符号30,符号1,符号
7]で構成されているとき、変換後の系列を[abc]
で表わすと、aは[1111111010112 ]、b
は[02 ]、cは[11110102 ]となり、最終的
に、20ビットの長さを有する系列[11111110
1011011110102 ](16進表現ではFEB
7A16)に変換される。Now, when the original code string is composed of [code 30, code 1, code 7], the sequence after conversion is [abc].
Is represented by [1111111101011 2 ], b
Becomes [0 2 ] and c becomes [1111010 2 ], and finally the sequence [11111110] having a length of 20 bits is obtained.
1011011111010 2 ] (hexadecimal representation is FEB
7A 16 ).
【0005】従って、実際の元符号列は、はるかに多量
の符号から構成されるから、元符号列中の例えば符号1
の割合が多いほど変換後の系列長が短くなり、効率的な
データ圧縮が可能になる。図8はデータ圧縮部及び伸張
部を含むデータ処理、画像処理又は情報通信等のシステ
ム要部構成図である。71はデータ圧縮部、72はデー
タ伸張部であり、これらは、データバス73を介してホ
ストCPU(Central Processing Unit )74や大容量
記憶装置(例えばハードディスク)75に接続されると
共に、図示を略した通信制御部や各種入出力制御部に接
続されている。Therefore, since the actual original code sequence is composed of a much larger number of codes, for example, code 1 in the original code sequence is used.
The greater the ratio of, the shorter the sequence length after conversion and the more efficient data compression becomes possible. FIG. 8 is a configuration diagram of a main part of a system including a data compression unit and a decompression unit for data processing, image processing, information communication and the like. Reference numeral 71 is a data compression unit, and 72 is a data decompression unit, which are connected to a host CPU (Central Processing Unit) 74 and a mass storage device (for example, a hard disk) 75 via a data bus 73 and are not shown. The communication control unit and various input / output control units are connected.
【0006】データ圧縮部71は、可変長符号化回路7
1aとパック回路71bとを含み、可変長符号化回路7
1aは前述のデータ圧縮変換テーブル(図7参照)を内
部に有し、元符号を可変長符号に変換すると共に、変換
後の可変長符号の長さ情報(可変長符号のビット数;以
下「符号長情報」と言う)を出力する。パック回路71
bは全ての可変長符号を連結した系列(以下「可変長符
号列」と言う)を生成するもので、この系列は、記憶装
置75に書き込まれたり、又は、通信制御部や各種入出
力制御部を介してシステム外部に転送されたりする。The data compression section 71 includes a variable length coding circuit 7
Variable length coding circuit 7 including 1a and pack circuit 71b
1a internally has the above-mentioned data compression conversion table (see FIG. 7), converts the original code into a variable-length code, and converts the length information of the variable-length code after conversion (the number of bits of the variable-length code; Code length information ") is output. Pack circuit 71
b is a sequence for generating a concatenation of all variable-length codes (hereinafter referred to as “variable-length code sequence”), and this sequence is written in the storage device 75, or a communication control unit or various input / output controls. It may be transferred to the outside of the system via the department.
【0007】データ伸張部72は、可変長符号列を16
ビット単位(又は符号長情報で指定されたビット単位)
に分解するアンパック回路72aと、アンパック回路7
2aの出力を元符号に変換すると共に、分割ビット数を
指定するための符号長情報を再生する可変長符号デコー
ド回路72bとを含む。ここで、可変長符号デコード回
路72bは、図9に示すように、16ビットアドレスの
メモリであり、可変長符号をアドレス入力として、8ビ
ットの元符号と4ビットの符号長情報を出力するもので
ある。The data decompression unit 72 converts the variable length code sequence into 16
Bit unit (or bit unit specified by code length information)
An unpack circuit 72a and an unpack circuit 7
And a variable length code decoding circuit 72b for converting the output of 2a into the original code and reproducing the code length information for designating the number of division bits. Here, as shown in FIG. 9, the variable-length code decoding circuit 72b is a 16-bit address memory, which receives the variable-length code as an address input and outputs an 8-bit original code and 4-bit code length information. Is.
【0008】図10は、可変長符号デコード回路72b
の内部に記憶されるデータ伸張変換テーブルであり、テ
ーブル容量は、16進表現で[000016]から[FF
BB 16]までのおよそ64KW(キロワード)もの大容
量である。テーブルの最下位アドレスの2進表現は[0
000000000000000 2 ]、最上位アドレス
の2進表現は[11111111101110112 ]
であり、ビット中のxは0又は1であることを表わして
いる。例えば[0xxxxxxxxxxxxxxx2 ]
は、[00000000000000002 ]から[0
1111111111111112 ]までのアドレスを
含むことを意味している。FIG. 10 shows a variable length code decoding circuit 72b.
Is a data decompression conversion table stored inside
The table capacity is hexadecimal [000016] To [FF
BB 16] Up to about 64 kW (kiloword)
Is the amount. The binary representation of the lowest address in the table is [0
000000000000000000 2], The highest address
The binary representation of [111111111101110112]
And x in the bit is 0 or 1
There is. For example, [0xxxxxxxxxxxxxxxxxxx2]
Is [00000000000000002] To [0
1111111111111112] Up to
It is meant to include.
【0009】今、変換対象の可変長符号列が、先のデー
タ圧縮の例で示した[111111101011011
110102 ]であったとすると、まず、この可変長符
号列の先頭からmビット(mは変換テーブルのアドレス
ビット数)を取り込む。ここでは、m=16であるか
ら、[11111110101101112 ]を取り込
む。そして、この取り込みデータによって図10の変換
テーブルを参照し、取り込みデータと一致するアドレス
[111111101011xxxx2 ]内から「符号
30」及び「符号長情報11」(但し、符号長情報の値
は4ビット表現のために実際の符号長から−1されてい
る;すなわち実際の符号長は1210)を読み出す。Now, the variable length code string to be converted is shown in the above example of data compression [111111101011011].
11010 2 ], first, m bits (m is the number of address bits in the conversion table) are fetched from the beginning of this variable length code string. Here, because it is m = 16, captures the 1111111010110111 2]. Then, the conversion table of FIG. 10 is referred to by the captured data, and “code 30” and “code length information 11” (however, the value of the code length information is represented by 4 bits) from the address [111111101011xxxx 2 ] matching the captured data. Is subtracted from the actual code length by 1; that is, the actual code length is 12 10 ).
【0010】次に、可変長符号列の先頭の12ビット
(符号長情報で示されたビット数)を除く16ビット
[01111010000000002 ](下位の8ビ
ットは桁合わせ用追加ビット)を取り込む。そして、こ
の取り込みデータによって図10の変換テーブルを再び
参照し、取り込みデータと一致するアドレス[0xxx
xxxxxxxxxxxx2 ]内から「符号1」及び
「符号長情報0」(実際の符号長は110)を読み出す。Next, 16 bits [0111101000000000 2 ] (the lower 8 bits are additional bits for digit alignment) are taken in, excluding the leading 12 bits (the number of bits indicated by the code length information) of the variable length code string. Then, the conversion table of FIG. 10 is referred to again by this fetched data, and the address [0xxx
“Code 1” and “code length information 0” (actual code length is 1 10 ) are read out from within xxxxxxxxxxxxxx 2 ].
【0011】最後に、残りの可変長符号列の先頭の1ビ
ット(符号長情報で示されたビット数)を除く16ビッ
ト[11110100000000002 ](下位の9
ビットは桁合わせ用追加ビット)を取り込む。そして、
この取り込みデータによって図10の変換テーブルを再
び参照し、取り込みデータと一致するアドレス[111
1010xxxxxxxxx2 ]内から「符号7」及び
「符号長情報6」(実際の符号長は710)を読み出す。Finally, 16 bits [1111010000000000000 2 ] (lower 9 bits of the remaining variable length code string excluding the first 1 bit (the number of bits indicated by the code length information))
Bits are additional bits for digit alignment). And
The conversion table of FIG. 10 is referred to again by the captured data, and the address [111
“Code 7” and “code length information 6” (actual code length is 7 10 ) are read out from within 1010xxxxxxxxxx 2 ].
【0012】以上の操作によって、可変長符号列[11
1111101011011110102 ]を元符号列
[符号30,符号1,符号7]に再生して、データ伸張
することができる。By the above operation, the variable length code string [11
1111101011011111010 2 ] can be reproduced into the original code string [code 30, code 1, code 7] to decompress the data.
【0013】[0013]
【発明が解決しようとする課題】しかしながら、かかる
従来の可変長符号デコード回路にあっては、16進表現
で[000016]から[FFBB16]までのおよそ64
KWものデータ伸張変換テーブルを必要とするものであ
ったため、メモリ容量が増大してコストが嵩むといった
問題点があった。 [目的]そこで、本発明は、データ伸張変換テーブルの
規模を削減してメモリ容量を少なくし、コストの低減を
図ることを目的とする。However, in such a conventional variable length code decoding circuit, in hexadecimal representation, about 64 bits from [0000 16 ] to [FFBB 16 ] are used.
Since the data decompression conversion table of KW is required, there is a problem that the memory capacity increases and the cost increases. [Purpose] Therefore, an object of the present invention is to reduce the scale of the data expansion conversion table to reduce the memory capacity and to reduce the cost.
【0014】[0014]
【課題を解決するための手段】本発明では、上記目的を
達成するために、1〜2n ビット長の可変長符号をデコ
ードする可変長符号デコード回路であって、可変長符号
の各長さの最小の符号を符号長の順番に保持するテーブ
ル及び2m −1(但し、m=1,2,……)個の比較器
を有し、前記テーブルから1度に2m −1個の要素を読
み出し、前記各比較器で可変長符号入力との大小比較を
行うと共にその比較動作をn/m回繰り返して、 i番目のテーブル要素 ≦ 可変長符号入力 < i+1番
目のテーブル要素 という条件を満たすi番目のテーブル要素を発見するこ
とで、可変長符号入力の先頭の符号の長さを求めるよう
にしたことを特徴とする。In order to achieve the above object, the present invention provides a variable length code decoding circuit for decoding a variable length code having a length of 1 to 2 n bits, wherein each length of the variable length code is Has a table that holds the smallest code in the order of code length and 2 m −1 (where m = 1, 2, ...) Comparator, and 2 m −1 The element is read out, the magnitude comparison with the variable-length code input is performed in each of the comparators, and the comparison operation is repeated n / m times to satisfy the condition that the i-th table element ≦ the variable-length code input <i + 1-th table element. The feature is that the length of the leading code of the variable-length code input is obtained by finding the i-th table element that satisfies the condition.
【0015】又は、1〜16ビット長の可変長符号をデ
コードする可変長符号デコード回路であって、可変長符
号の各長さの最小の符号を符号長の順番に保持するテー
ブル及び3、個の比較器を有し、前記テーブルから1度
に3個の要素を読み出し、前記各比較器で可変長符号入
力との大小比較を行うと共にその比較動作を2回繰り返
して、 i番目のテーブル要素 ≦ 可変長符号入力 < i+1番
目のテーブル要素 という条件を満たすi番目のテーブル要素を発見するこ
とで、可変長符号入力の先頭の符号の長さを求めるよう
にしたことを特徴とする。Alternatively, there is provided a variable length code decoding circuit for decoding a variable length code having a length of 1 to 16 bits, in which a table holding the smallest code of each length of the variable length code in the order of the code length and 3, Of the i-th table element by reading out three elements at a time from the table, performing a magnitude comparison with the variable-length code input in each of the comparators, and repeating the comparison operation twice. <Variable-length code input <i + 1th table element The condition is that the length of the code at the beginning of the variable-length code input is found by finding the i-th table element.
【0016】又は、可変長符号をデコードする可変長符
号デコード回路であって、元符号を保持するFCテーブ
ル、可変長符号の各長さの最小の符号を符号長の順番に
保持するVCテーブル、VCテーブルに対応する符号長
を保持するVLテーブル、VCテーブルに対応するFC
テーブルのアドレスを保持するBPテーブル、3個の比
較器、シフタ、加算器及び減算器を含み、第1段階で
は、VCテーブルから3個の要素を同時に読み出して3
個の比較器で可変長符号入力との大小比較を行い、可変
長符号入力がVCテーブルの4つのグループのどれに属
するかを判別し、第2段階では、VCテーブル内の第1
段階で確定したグループの3個の要素を読出し、3個の
比較器で可変長符号入力との大小比較を行い、可変長符
号入力がVCテーブルのどの要素に対応するかを判別
し、第3段階では、可変長符号入力に対応するVCテー
ブルの要素とVLテーブルの要素とBPテーブルの要素
とを読出し、可変長符号入力の値とVCテーブルの読出
し値の差を前記減算器で求め、さらに、前記シフタでV
Lテーブルの読出し値に応じたシフトを行い、そのシフ
ト結果にBPテーブルの読出し値を前記加算器で加算し
てFCテーブルのアドレスを求め、そのアドレスのFC
テーブルの要素を読み出すことで元符号を求めると共
に、VLテーブルの読出し値から次の可変長符号の開始
位置を判断することを特徴とする。Alternatively, a variable length code decoding circuit for decoding a variable length code, which is an FC table holding the original code, a VC table holding the smallest code of each length of the variable length code in the order of the code length, VL table holding code length corresponding to VC table, FC corresponding to VC table
It includes a BP table that holds the address of the table, three comparators, a shifter, an adder, and a subtracter. At the first stage, three elements are read from the VC table at the same time, and
The number of comparators compares the variable length code input with that of the variable length code input to determine which of the four groups of the VC table the variable length code input belongs to.
The three elements of the group determined at the stage are read out, and the magnitude comparison with the variable length code input is performed by the three comparators to determine which element of the VC table the variable length code input corresponds to. In the step, the elements of the VC table, the elements of the VL table and the elements of the BP table corresponding to the variable length code input are read, the difference between the value of the variable length code input and the read value of the VC table is obtained by the subtractor, and , V in the shifter
A shift is performed according to the read value of the L table, the read value of the BP table is added to the shift result by the adder to obtain the address of the FC table, and the FC of the address is calculated.
It is characterized in that the original code is obtained by reading the elements of the table and the start position of the next variable length code is determined from the read value of the VL table.
【0017】又は、図1、図2にその原理構成図を示す
ように、M個の元符号と1対1に対応する可変長符号の
うち、他の全ての可変長符号と符号長が一致しない可変
長符号、及び、同一符号長集団の中で最小値を有する可
変長符号を昇順に配列し、且つ配列された可変長符号を
グループ単位に格納する第一テーブル1と、第一テーブ
ル1の各要素に対応する符号長情報を示すと共に、第一
テーブル1の各要素に所定の識別情報を割り当てて格納
する第二テーブル2と、入力された可変長符号列の先頭
から又は指定された符号長+1から最大符号長に相当す
る長さを切り出す切出し手段3と、切出し手段3の出力
と第一テーブル1に格納されたグループ内最小値の可変
長符号とを比較し、切出し手段3の出力と値が一致する
可変長符号又は切出し手段3の出力よりも値が小さく且
つその差が最小の可変長符号を含む第一テーブル1のグ
ループを特定する第一比較手段4と、第一比較手段4で
特定されたグループ内の全ての可変長符号を選択する第
一選択手段5と、第一比較手段4で特定されたグループ
内の全ての符号長情報を選択する第二選択手段6と、第
一比較手段4で特定されたグループ内の全ての識別情報
を選択する第三選択手段7と、切出し手段3の出力と第
一選択手段4の出力とを比較し、切出し手段3の出力と
値が一致する可変長符号又は切出し手段3の出力よりも
値が小さく且つその差が最小の可変長符号を特定する第
二比較手段8と、第二比較手段8で特定された可変長符
号を第一選択手段5の出力中から選択する第四選択手段
9と、第二比較手段8で特定された可変長符号に対応す
る1つの符号長情報を第二選択手段6の出力中から選択
する第五選択手段10と、第二比較手段8で特定された
可変長符号に対応する1つの識別情報を第三選択手段7
の出力中から選択する第六選択手段11と、切出し手段
3の出力と第四選択手段9の出力との差を演算する差演
算手段12と、差演算手段12の出力のビット長を第五
選択手段10の出力に応じて調節するビット長調節手段
13と、ビット長調節手段13の出力と第六選択手段1
1の出力との和を演算する和演算手段14と、全ての元
符号を格納する第三テーブル15とを備え、第三テーブ
ル15の元符号は、対応する可変長符号語の長さが等し
いものが連続したアドレスのメモリ領域に可変長符号の
値が小さい順に格納され、所定の情報は、第三テーブル
15で各符号長に対応するメモリ領域の最初のアドレス
を示すように決定され、第三テーブル15のアドレスは
和演算手段14により決定されることを特徴とする。Alternatively, as shown in the principle configuration diagram in FIGS. 1 and 2, among the variable length codes corresponding to the M original codes and the one-to-one correspondence, all other variable length codes have the same code length. A first table 1 in which variable length codes that do not exist and variable length codes having the minimum value in the same code length group are arranged in ascending order, and the arranged variable length codes are stored in group units; Of the second table 2 which stores the code length information corresponding to each element of the first table 1 by assigning predetermined identification information to each element of the first table 1 and the beginning of the input variable length code string or designated. The cutout unit 3 that cuts out a length corresponding to the maximum code length from the code length +1 is compared with the output of the cutout unit 3 and the variable length code of the minimum value in the group stored in the first table 1, and the output of the cutout unit 3 is compared. A variable-length code or a value whose value matches the output First comparison means 4 for specifying the group of the first table 1 including the variable length code having a smaller value than the output of the means 3 and the difference between them is small, and all of the groups specified by the first comparison means 4. Of the variable length code of No. 1, the second selection unit 6 of selecting all code length information in the group specified by the first comparison unit 4, and the first comparison unit 4 The third selection means 7 for selecting all the identification information in the group is compared with the output of the cutout means 3 and the output of the first selection means 4, and the output of the cutout means 3 is a variable-length code or a cutout whose value matches. From the output of the first selecting means 5, the second comparing means 8 for specifying the variable length code having a smaller value than the output of the means 3 and the difference between them is the smallest, and the variable length code specified by the second comparing means 8 are outputted. Specified by the fourth selecting means 9 for selecting and the second comparing means 8. Fifth selecting means 10 for selecting one piece of code length information corresponding to the variable length code from the output of the second selecting means 6 and one piece of identification information corresponding to the variable length code specified by the second comparing means 8. Third selection means 7
The sixth selecting means 11 for selecting among the outputs of the above, the difference calculating means 12 for calculating the difference between the output of the cutting means 3 and the output of the fourth selecting means 9, and the bit length of the output of the difference calculating means 12 are the fifth. Bit length adjusting means 13 for adjusting according to the output of the selecting means 10, the output of the bit length adjusting means 13 and the sixth selecting means 1.
The sum calculation means 14 for calculating the sum with the output of 1 and the third table 15 for storing all the source codes are provided, and the source codes of the third table 15 have the same variable length codeword length. Objects are stored in the memory area of consecutive addresses in ascending order of the value of the variable length code, and the predetermined information is determined in the third table 15 so as to indicate the first address of the memory area corresponding to each code length. The addresses of the three tables 15 are determined by the sum calculation means 14.
【0018】[0018]
【作用】このような構成によれば、まず、第一比較手段
4の比較結果から第一テーブル1内のグループが特定さ
れ、次いで、第二比較手段8の比較結果から1つの可変
長符号が特定され、そして、この1つの可変長符号、そ
れに関連付けられた符号長情報及び識別情報によって、
最終的に第三テーブル15内の1つの元符号が特定され
る。According to this structure, first, the group in the first table 1 is specified from the comparison result of the first comparing means 4, and then one variable length code is determined from the comparison result of the second comparing means 8. Identified and by this one variable length code, code length information and identification information associated with it,
Finally, one original code in the third table 15 is specified.
【0019】ここで、第一テーブル1に格納された可変
長符号は、他の全ての可変長符号と符号長が一致しない
可変長符号及び同一符号長集団の中で最小値を有する可
変長符号のみであり、その格納数は、元符号の最大個数
(M)よりも確実に少ない。従って、64KW(M=2
56の場合)もの容量が必要であった従来例に比べて、
遥かにテーブル容量を削減できる。Here, the variable-length code stored in the first table 1 is a variable-length code whose code length does not match with all other variable-length codes and a variable-length code having the smallest value in the same code-length group. The number of stored codes is certainly smaller than the maximum number (M) of original codes. Therefore, 64 kW (M = 2
(In the case of 56), compared with the conventional example that required a large capacity,
The table capacity can be reduced significantly.
【0020】[0020]
【実施例】以下、本発明の実施例を図面に基づいて説明
する。図3〜図6は本発明に係る可変長符号デコード回
路の一実施例を示す図である。図3において、20はV
Cメモリ、21はVLメモリ、22はBPメモリ、23
〜25は比較器、26はアドレス決定回路、27はRA
レジスタ、28はRBレジスタ、29はRCレジスタ、
30はRDレジスタ、31は減算器、32はシフタ、3
3は加算器、34はFCメモリ、35はホストCPU
(図示略)につながるデータバス、36は同じくホスト
CPUにつながるアドレスバスである。なお、図中に記
載した16、8又は4の数字は入出力データのビット数
を表している。Embodiments of the present invention will be described below with reference to the drawings. 3 to 6 are diagrams showing an embodiment of the variable length code decoding circuit according to the present invention. In FIG. 3, 20 is V
C memory, 21 is VL memory, 22 is BP memory, 23
25 to 25 are comparators, 26 is an address determination circuit, and 27 is RA
Register, 28 is RB register, 29 is RC register,
30 is an RD register, 31 is a subtractor, 32 is a shifter, 3
3 is an adder, 34 is an FC memory, 35 is a host CPU
A data bus connected to (not shown), and 36 is an address bus also connected to the host CPU. The numbers 16, 8, or 4 shown in the figure represent the number of bits of input / output data.
【0021】まず、4つのメモリについて説明すると、
VC(Variable Length Code)メモリ20は16W(ワ
ード)の容量を持つ4ポート(ポートA〜D)メモリで
あり、内部には後述の第一テーブルが格納されている。
VL(Variable Length )メモリ21は16Wの容量を
持つ2ポート(ポートA、B)メモリであり、内部には
後述の第二テーブルの一部分(符号長情報の部分)が格
納されている。BP(Base Pointer)メモリ22は16
Wの容量を持つ2ポート(ポートA、B)メモリであ
り、内部には後述の第二テーブルの残りの部分(識別情
報の部分)が格納されている。FC(Fixed Code)メモ
リ34は256Wの容量を持つ2ポート(ポートA、
B)メモリであり、後述の第三テーブルが格納されてい
る。First, the four memories will be described.
A VC (Variable Length Code) memory 20 is a 4-port (ports A to D) memory having a capacity of 16 W (word), and has a first table described later stored therein.
A VL (Variable Length) memory 21 is a 2-port (port A, B) memory having a capacity of 16 W, and a part of a second table (code length information part) described later is stored therein. BP (Base Pointer) memory 22 has 16
It is a 2-port (port A, B) memory having a capacity of W, and stores the remaining portion (identification information portion) of a second table described later inside. The FC (Fixed Code) memory 34 has 2 ports (port A,
B) A memory, which stores a third table described later.
【0022】ここで、図4を参照しながら、第一、第二
及び第三テーブルの構造を説明する。図4において、第
一テーブルには、多数の可変長符号が格納されている。
但し、格納された可変長符号は、M個(ここではM=2
56)の元符号毎に規定された全ての可変長符号ではな
く、所定の条件に従って選別された一部の可変長符号で
ある。The structure of the first, second and third tables will now be described with reference to FIG. In FIG. 4, a large number of variable length codes are stored in the first table.
However, the stored variable length codes are M (here, M = 2).
56) Not all variable length codes defined for each original code, but some variable length codes selected according to a predetermined condition.
【0023】すなわち、第一テーブル内の可変長符号
は、M個の元符号毎に規定された全ての可変長符号のう
ち、他の全ての可変長符号と符号長が一致しない可変長
符号、及び、同一符号長集団の中で最小値を有する可変
長符号だけであり、これによって、第一テーブルの容量
を16W以内に収めることができる。因みに、元符号の
数が256個(図7参照)であれば、実際には256W
の容量を必要とするが、上記選別を行うことによって、
ここで示す可変長符号例ではアドレス0〜13までの1
4Wで済ませることができる。なお、図4の第一テーブ
ルでは余った2W分(アドレス14、15)にダミーの
可変長符号(オール1)を格納している。That is, the variable-length code in the first table is a variable-length code whose code length does not match with all the other variable-length codes among all the variable-length codes defined for each of the M original codes. Also, it is only the variable length code having the minimum value in the same code length group, which allows the capacity of the first table to be within 16 W. By the way, if the number of original codes is 256 (see FIG. 7), it is actually 256W.
However, by performing the above selection,
In the variable length code example shown here, 1 from address 0 to 13
It can be done with 4W. In the first table of FIG. 4, a dummy variable length code (all 1) is stored in the remaining 2W (addresses 14 and 15).
【0024】また、第一テーブル内の可変長符号は、値
の小さい方から大きい方へと昇順に整列(ソート)して
格納されており、例えばアドレス0には[000000
00000000002 ]が、アドレス1には[100
0000000000000 2 ]が、……、アドレス1
3には[11111110110111102 ]が格納
されている。The variable length code in the first table is a value
Sort in ascending order from smallest to largest
It is stored, for example, at address 0 [000000
00000000002], But at address 1 [100
0000000000 2], ..., address 1
3 includes [111111110110111102] Is stored
Has been done.
【0025】さらに、第一テーブル内の可変長符号は複
数グループ(ここではG0〜G3の4グループ)に分け
られており、各グループの先頭(最小アドレス)には、
そのグループ内で最小値を有する可変長符号が位置して
いる。第二テーブルには、上記第一テーブル内の可変長
符号のそれぞれにアドレス一致で関連付けられた符号長
情報及び所定の識別情報が格納されている。符号長情報
は、対応する可変長符号のビット数(1〜16ビットま
で)を表す情報であるが、1〜16ビットを4ビットの
データで表現するために実際のビット数から1を引いた
値を有している。例えば、アドレス9の可変長符号[1
1111101111000002 ]に対応する符号長
は[1110]であるがこれは実際には[1210]を意味
している。Furthermore, the variable length codes in the first table are divided into a plurality of groups (here, four groups G0 to G3), and the head (minimum address) of each group is:
The variable length code having the minimum value is located within the group. The second table stores code length information and predetermined identification information associated with each variable length code in the first table by address matching. The code length information is information indicating the number of bits (1 to 16 bits) of the corresponding variable length code, but 1 is subtracted from the actual number of bits in order to express 1 to 16 bits by 4-bit data. Has a value. For example, the variable length code [1
The code length corresponding to 1111101111000002 2 ] is [11 10 ] but this actually means [12 10 ].
【0026】識別情報は、次に述べる第三テーブルのア
ドレス参照情報であり、例えば、16は第三テーブルの
アドレス16を示している。第三テーブルは、256個
の元符号を出現頻度順にアドレス0〜255を付して配
列したもので、符号1の出現頻度が最も高く、符号25
6の出現頻度が最も低い。但し、出現頻度順に並べると
いうのは、本発明の必須要件ではない。第二テーブルに
登録されたアドレスと第三テーブルの対応がつけば、順
番は出現頻度順である必要はない。The identification information is the address reference information of the third table described below. For example, 16 indicates the address 16 of the third table. In the third table, 256 original codes are arranged in order of appearance frequency with addresses 0 to 255. Code 1 has the highest appearance frequency and code 25
6 has the lowest appearance frequency. However, arranging in order of appearance frequency is not an essential requirement of the present invention. If the addresses registered in the second table correspond to the addresses in the third table, the order does not have to be the frequency of appearance.
【0027】第三テーブルの中で、符号1、2、3、
4、14、15、16、32、33又は34は、対応す
る可変長符号の符号長が他の全ての可変長符号と一致し
ないもの、符号5〜8、符号9〜13又は符号35〜2
56は、対応する可変長符号の符号長がそれぞれの集団
内で同一のものである。図5はアドレス決定回路26の
構成図である。このアドレス決定回路26は、3個のイ
ンバータゲート37〜39と2個の複合ゲート40、4
1を次表2の真理値表に従って論理を組んだゲート回路
42と、 ゲート回路42の2ビットの出力g0、g1を保持する
REレジスタ43及びRFレジスタ44と、これら2個
のレジスタ43、44の出力に応じてアドレスI、J及
びK(但し、Iはi0 〜i3 、Jはj0 〜j3 、Kはk
0 〜k3 の各4ビット)を発生する3個のセレクタ45
〜47とを備える。上段と中段のセレクタ45、46は
2つの入力(A、B)を選択するタイプ、下段のセレク
タ47は3つの入力(A、B、C)を選択するタイプ
で、何れのセレクタも後述するフェーズ1(第1段階)
の動作で入力Aを選択し、フェーズ2(第2段階)で入
力Bを選択し、さらに、下段のセレクタ47にあっては
フェーズ3(第3段階)で入力Cを選択する。In the third table, reference numerals 1, 2, 3,
4, 14, 15, 16, 32, 33, or 34, the code length of the corresponding variable-length code does not match all other variable-length codes, code 5-8, code 9-13, or code 35-2.
56 is the code length of the corresponding variable length code is the same in each group. FIG. 5 is a block diagram of the address determination circuit 26. The address determination circuit 26 includes three inverter gates 37 to 39 and two composite gates 40 and 4.
1 is a gate circuit 42 that forms a logic according to the truth table of Table 2 below, The RE register 43 and the RF register 44 that hold the 2-bit outputs g0 and g1 of the gate circuit 42, and the addresses I, J, and K (where I is i 0 to i 3 , J is j 0 to j 3 , and K is k
3 selectors 45 for generating 0 to k 3 (4 bits each)
~ 47. The upper and middle selectors 45 and 46 are of a type that selects two inputs (A, B), and the lower selector 47 is a type that selects three inputs (A, B, C). 1 (first stage)
The input A is selected by this operation, the input B is selected in the phase 2 (second step), and the input C is selected in the lower selector 47 in the phase 3 (third step).
【0028】上段のセレクタ45の入力Aには固定値
[01002 ](410)が与えられ、中段のセレクタ4
6の入力Aには固定値[10002 ](810)が与えら
れ、下段のセレクタ47の入力Aには固定値[1100
2 ](1210)が与えられている。また、上段のセレク
タ45の入力Bには[(RE)012 ](但しREはR
Eレジスタ43の値)が入力され、中段のセレクタ46
の入力Bには[(RE)102 ]が入力され、下段のセ
レクタ47の入力Bには[(RE)112 ]が与えられ
ている。さらに、下段のセレクタ47の入力Cには
[(RE)(RF)2](但しRFはRFレジスタ44
の出力)が与えられている。A fixed value [0100 2 ] (4 10 ) is given to the input A of the upper selector 45, and the middle selector 4
A fixed value [1000 2 ] (8 10 ) is given to the input A of 6 and a fixed value [1100 is given to the input A of the lower selector 47.
2 ] (12 10 ) is given. In addition, [(RE) 01 2 ] is input to the input B of the upper selector 45 (where RE is R
The value of the E register 43) is input, and the selector 46 in the middle stage is input.
[(RE) 10 2 ] is input to the input B of the above, and [(RE) 11 2 ] is input to the input B of the lower selector 47. Further, [(RE) (RF) 2 ] (where RF is the RF register 44
Output) is given.
【0029】従って、このアドレス決定回路26から
は、後述のフェーズ1で、 i3 =0 i2 =1 i1 =0 i0 =0 すなわち、第一テーブルのグループG1の先頭アドレス
(410)がアドレスIとして出力され、 j3 =1 j2 =0 j1 =0 j0 =0 すなわち、第一テーブルのグループG2の先頭アドレス
(810)がアドレスJとして出力され、 k3 =1 k2 =1 k1 =0 k0 =0 すなわち、第一テーブルのグループG3の先頭アドレス
(1210)がアドレスKとして出力される。Therefore, from the address determination circuit 26, i 3 = 0 i 2 = 1 i 1 = 0 i 0 = 0 in phase 1 described later, that is, the head address (4 10 ) of the group G1 of the first table. Is output as the address I, and j 3 = 1 j 2 = 0 j 1 = 0 j 0 = 0 That is, the head address (8 10 ) of the group G2 in the first table is output as the address J, and k 3 = 1 k 2 = 1 k 1 = 0 k 0 = 0 That is, the head address (12 10 ) of the group G3 in the first table is output as the address K.
【0030】また、後述のフェーズ2で、 i3 =(g1) i2 =(g0) i1 =0 i0 =1 すなわち、ゲート回路42の出力g1、g0で指定され
た1つのグループの先頭アドレス+1がアドレスIとし
て出力され、 j3 =(g1) j2 =(g0) j1 =1 j0 =0 すなわち、ゲート回路42の出力g1、g0で指定され
た1つのグループの先頭アドレス+2がアドレスJとし
て出力され、 k3 =(g1) k2 =(g0) k1 =1 k0 =1 すなわち、ゲート回路42の出力g1、g0で指定され
た1つのグループの先頭アドレス+3がアドレスKとし
て出力される。In phase 2 to be described later, i 3 = (g1) i 2 = (g0) i 1 = 0 i 0 = 1 That is, the head of one group designated by the outputs g1 and g0 of the gate circuit 42. The address +1 is output as the address I, and j 3 = (g1) j 2 = (g0) j 1 = 1 j 0 = 0 That is, the start address +2 of one group designated by the outputs g1 and g0 of the gate circuit 42. Is output as the address J, and k 3 = (g1) k 2 = (g0) k 1 = 1 k 0 = 1 That is, the start address +3 of one group designated by the outputs g1 and g0 of the gate circuit 42 is the address. It is output as K.
【0031】さらに、後述のフェーズ3で、 k3 =(g1;フェーズ2のときの値) k2 =(g0;フェーズ2のときの値) k1 =(g1;フェーズ3の値) k0 =(g0;フェーズ3の値) すなわち、フェーズ2で特定されたグループ内の1つの
可変長符号のアドレスがアドレスKとして出力される。Further, in phase 3 described later, k 3 = (g 1; value in phase 2) k 2 = (g 0; value in phase 2) k 1 = (g 1 ; value in phase 3) k 0 = (G0; value of phase 3) That is, the address of one variable-length code in the group specified in phase 2 is output as the address K.
【0032】次に、作用を説明する。図6は本実施例の
回路動作を説明するための流れ図であり、この動作はフ
ェーズ1、フェーズ2及びフェーズ3に分けられる。な
お、流れ図の中の矢印(←)は、右辺の式の結果を左辺
の変数(又はレジスタ)に代入するという意味であり、
また、等符号(=)は右辺の式の結果を左辺の信号名で
出力するという意味であり、さらに、VC[I、J又は
K]は、アドレスI、J又はKで指定された第一テーブ
ル内の要素を意味する。Next, the operation will be described. FIG. 6 is a flow chart for explaining the circuit operation of the present embodiment, and this operation is divided into phase 1, phase 2 and phase 3. The arrow (←) in the flow chart means that the result of the expression on the right side is assigned to the variable (or register) on the left side.
Further, the equal sign (=) means that the result of the expression on the right side is output with the signal name on the left side, and VC [I, J or K] is the first specified by the address I, J or K. Means an element in a table.
【0033】フェーズ1の動作 このフェーズでは、まず、ステップ50で、第一テーブ
ルのグループG1、G2及びG3の先頭アドレス4、
8、12をアドレスI、J及びKとして発生する。この
動作は、前述のとおり、アドレス決定回路26で行われ
る。次いで、ステップ51〜53で、入力された16ビ
ットの可変長符号列(図では「入力」)とVC[K]、
VC[J]及びVC[I]とを比較し、その比較結果
(cp2、cp1、cp0)の組み合せに応じて、ステ
ップ54〜57で、REレジスタ43に、010、110、
210又は310を代入する。 Operation of Phase 1 In this phase, first, at step 50, the head addresses 4 of the groups G1, G2 and G3 of the first table are
8 and 12 are generated as addresses I, J and K. This operation is performed by the address determination circuit 26 as described above. Next, in steps 51 to 53, the input 16-bit variable length code string (“input” in the figure) and VC [K],
Comparing the VC [J] and VC [I], according to the combination of the comparison result (cp2, cp1, cp0), at step 54-57, the RE register 43, 0 10, 1 10,
Substitute 2 10 or 3 10 .
【0034】入力≧VC[K]であれば、REレジスタ
43に[112 ](310)が代入され(グループG3選
択)、VC[K]>入力≧VC[J]であれば、REレ
ジスタ43に[102 ](210)が代入され(グループ
G2選択)、VC[J]>入力≧VC[I]であれば、
REレジスタ43に[012 ](110)が代入され(グ
ループG1選択)、VC[I]>入力であれば、REレ
ジスタ43に[002](010)が代入される(グルー
プG0選択)。If input ≧ VC [K], [11 2 ] (3 10 ) is substituted into the RE register 43 (group G3 selection), and if VC [K]> input ≧ VC [J], then RE [10 2 ] (2 10 ) is assigned to the register 43 (group G2 selection), and if VC [J]> input ≧ VC [I],
[01 2 ] (1 10 ) is assigned to the RE register 43 (group G1 selection), and if VC [I]> input, [00 2 ] (0 10 ) is assigned to the RE register 43 (group G0). Choice).
【0035】すなわち、この選択動作は、入力された1
6ビットの可変長符号列と、第一テーブルのグループG
0〜G3内最小値の可変長符号([000000000
00000002 ][111100000000000
02 ]、[11111101110000002 ]及び
[11111110110111002 ])とを比較
し、値が一致する可変長符号、又は、入力された16ビ
ットの可変長符号列よりも値が小さく且つその差が最小
の可変長符号を含む第一テーブルのグループを特定する
ことに他ならない。That is, this selection operation is performed by inputting 1
6-bit variable length code string and group G of the first table
0 to G3 minimum variable length code ([0000000000
0000000 2] [111100000000000
0 2 ], [11111111111000000 2 ] and [1111111011011100 2 ]), and the value is smaller than the variable-length code having the same value or the input 16-bit variable-length code string and its difference is the smallest. It is nothing but specifying the group of the first table containing the variable length code.
【0036】なお、上記ステップ51〜53における3
つの比較動作は、比較器23〜25によって同時に行わ
れる。較器23からは、入力≧VC[K]の条件を満た
したときに1となる信号cp2が出力され、比較器24
からは、入力≧VC[J]の条件を満たしたときに1と
なる信号cp1が出力され、さらに、比較器25から
は、入力≧VC[I]の条件を満たしたときに1となる
信号cp0が出力される。Incidentally, 3 in steps 51 to 53 above.
One comparison operation is performed by the comparators 23 to 25 at the same time. The comparator 23 outputs a signal cp2 which becomes 1 when the condition of input ≧ VC [K] is satisfied, and the comparator 24
Outputs a signal cp1 which becomes 1 when the condition of input ≧ VC [J] is satisfied, and further, a signal which becomes 1 when the condition of input ≧ VC [I] is satisfied from the comparator 25. cp0 is output.
【0037】例えば、入力された16ビットの可変長符
号列が、冒頭の従来例と同様に、[111111101
01101112 ]とすると、この入力系列と完全に一
致するグループ内最小値の可変長符号は1つも存在しな
いが、この入力系列よりも値が小さく且つその差が最小
となる条件に当てはまるグループ内最小値可変長符号と
しては、グループG2の[1111110111000
0002 ]が該当する。For example, the input 16-bit variable length code string is [111111101] as in the conventional example at the beginning.
0110111 2 ], there is no variable length code of the minimum value in the group that completely matches this input sequence, but the minimum value in the group that satisfies the condition that the value is smaller than this input sequence and the difference between them is the minimum. The value variable length code is [1111110111000] of group G2.
000 2 ] is applicable.
【0038】従って、この例の場合には(cp2,cp
1,cp0)=(0,1,1)となり、上表2より(g
1,g0)=(1,0)となる結果、REレジスタ43
に、特定されたグループG2を示す[102 ](すなわ
ち210)がセットされる。フェーズ2の動作 このフェーズでは、入力された可変長符号列がフェーズ
1で特定されたグループ内のどの位置にあるかを決定す
る。すなわち、 VC[n]≦入力<VC[n+1] の条件が成立するVC[K]を確定する。Therefore, in the case of this example, (cp2, cp
1, cp0) = (0,1,1), and from Table 2 above, (g
1, g0) = (1,0), the RE register 43
Is set to [10 2 ] (that is, 2 10 ) indicating the identified group G2. Operation of Phase 2 In this phase, it is determined at which position within the group specified in Phase 1 the input variable length code string is located. That is, VC [K] that satisfies the condition of VC [n] ≦ input <VC [n + 1] is determined.
【0039】まず、ステップ58で比較のためアドレス
I、J及びKを次のように決定する。 I=RE×4+1 J=RE×4+2 K=RE×4+3 但し、REはフェーズ1のときのREレジスタ43の値
であり、RE×4はフェーズ1で特定されたグループの
先頭アドレスそのものとなる。例えば、フェーズ1でグ
ループG2が特定されていた場合には、REは210であ
り、RE×4は8 10となるから、結局、アドレスIは9
10となる。同様に、アドレスJは1010、アドレスKは
1110となり、第一テーブルのグループG2内のアドレ
ス9〜11までの3つの可変長符号VC[9]、Vc
[10]及びVC[11]が参照されることになる。こ
れらの可変長符号はステップ59〜61で入力と比較さ
れ、その比較結果(cp2、cp1、cp0)の組み合
せに応じて、ステップ62〜65で、RFレジスタ44
に、010、110、210又は310を代入する。First, in step 58, the address is compared for comparison.
Determine I, J and K as follows. I = RE × 4 + 1 J = RE × 4 + 2 K = RE × 4 + 3 However, RE is the value of the RE register 43 at the time of phase 1.
And RE × 4 is of the group identified in Phase 1
It is the start address itself. For example, in Phase 1
If loop G2 was specified, RE is 2TenAnd
RE × 4 is 8 TenTherefore, after all, the address I is 9
TenBecomes Similarly, the address J is 10Ten, Address K is
11TenThen, the address in the group G2 of the first table
Three variable length codes VC [9], Vc
[10] and VC [11] will be referenced. This
These variable length codes are compared with the input in steps 59-61.
And the combination of the comparison results (cp2, cp1, cp0)
Depending on the situation, in steps 62 to 65, the RF register 44
To 0Ten1TenTwoTenOr 3TenIs substituted.
【0040】入力≧VC[K]であれば、RFレジスタ
44に[112 ](310)が代入され(特定グループ内
の先頭+3番目を選択)、VC[K]>入力≧VC
[J]であれば、RFレジスタ44に[102 ]
(210)が代入され(特定グループ内の先頭+2番目を
選択)、VC[J]>入力≧VC[I]であれば、RF
レジスタ44に[012 ](110)が代入され(特定グ
ループ内の先頭+1番目を選択)、VC[I]>入力で
あれば、RFレジスタ44に[002 ](010)が代入
される(特定グループ内の先頭+0番目を選択)。If input ≧ VC [K], [11 2 ] (3 10 ) is assigned to the RF register 44 (first + 3rd in the specific group is selected), and VC [K]> input ≧ VC
If [J], [10 2 ] is set in the RF register 44.
If (2 10 ) is substituted (first + second in the specific group is selected) and VC [J]> input ≧ VC [I], then RF
[01 2 ] (1 10 ) is assigned to the register 44 (first + first in the specific group is selected), and if VC [I]> input, [00 2 ] (0 10 ) is assigned to the RF register 44. (The first + 0th in the specific group is selected).
【0041】すなわち、この選択動作は、入力された1
6ビットの可変長符号列と、特定グループ内の可変長符
号(例えば、特定グループがG2の場合は[11111
101110000002 ]、[1111110111
1000002 ][1111111011010000
2 ]及び[11111110110110002 ])と
を比較し、値が一致する可変長符号、又は、入力された
16ビットの可変長符号列よりも値が小さく且つその差
が最小となる1つの可変長符号を特定することに他なら
ない。That is, this selection operation is performed by inputting 1
A 6-bit variable length code string and a variable length code in a specific group (for example, [11111 when the specific group is G2].
1011000000 2 ], [1111110111
100000 2 ] [11111111011010000
2 ] and [1111111011011000 2 ]), and a variable length code having a matching value, or a variable length code having a smaller value than the input 16-bit variable length code string and the difference between them is the smallest. It is nothing but specifying.
【0042】例えば、入力された16ビットの可変長符
号列がフェーズ1と同様に[111111101011
01112 ]とすると、この入力系列と完全に一致する
グループG2内の可変長符号は1つも存在しないが、こ
の入力系列よりも値が小さく且つその差が最小となる条
件に当てはまるグループG2内の可変長符号としては、
アドレス9の[11111101111000002 ]
が該当する。For example, the input 16-bit variable length code string is [111111101011] as in the case of phase 1.
[0111 2 ], there is no variable length code in the group G2 that completely matches this input sequence, but within the group G2 that satisfies the condition that the value is smaller than this input sequence and the difference between them is the smallest. As a variable length code,
Address 9 [11111111111100000 2 ]
Is applicable.
【0043】従って、この例の場合には(cp2,cp
1,cp0)=(0,0,1)となり、上表2より(g
1,g0)=(0,1)となる結果、RFレジスタ44
に、アドレス9の可変長符号のグループ内位置(先頭+
1番目)を示す[012 ](すなわち110)がセットさ
れる。フェーズ3の動作 このフェーズでは、上記のフェーズ1、2の結果を用い
て元符号を求める。Therefore, in the case of this example, (cp2, cp
1, cp0) = (0,0,1), and from Table 2 above, (g
1, g0) = (0,1), the RF register 44
At the position within the group of the variable length code at address 9 (start +
[01 2 ] (that is, 1 10 ) indicating the first) is set. Operation of Phase 3 In this phase, the original code is obtained using the results of Phases 1 and 2 above.
【0044】まず、ステップ66で、フェーズ2で特定
された可変長符号のアドレスを生成する。生成式は、 K=RE×4+RF である。但し、RE×4はフェーズ1で特定されたグル
ープの先頭アドレス、RFはフェーズ2で特定された可
変長符号のグループ内位置である。例えば、フェーズ1
でグループG2が特定され、さらに、フェーズ2でグル
ープG2内の先頭+1番目の可変長符号が特定されてい
た場合には、RE×4は810、RFは110であるから、
アドレスKは910となる。First, in step 66, the address of the variable length code specified in phase 2 is generated. The generation formula is K = RE × 4 + RF. However, RE × 4 is the start address of the group specified in phase 1, and RF is the position within the group of the variable length code specified in phase 2. For example, Phase 1
In the case where the group G2 is specified in step 1 and the first + 1th variable length code in the group G2 is specified in phase 2, RE × 4 is 8 10 and RF is 1 10 .
The address K becomes 9 10 .
【0045】次いで、ステップ67では、このアドレス
Kに従って第一テーブル及び第二テーブルから、VC
[K]、VL[K]及びBP[K]を読み出し、VC
[K]をRBレジスタ28にセットし、VL[K]をR
Cレジスタ29にセットし、BP[K]をRDレジスタ
30にセットするとともに、入力系列をRAレジスタ2
7にセットする。Then, in step 67, VC is read from the first table and the second table according to the address K.
Read [K], VL [K] and BP [K], and
[K] is set in the RB register 28 and VL [K] is set to R
The C register 29 is set, BP [K] is set in the RD register 30, and the input sequence is set to the RA register 2
Set to 7.
【0046】次いで、ステップ68で、第三テーブルの
アドレスを生成する。生成式は、 (RA−RB)×2RC-15 +RD 但し、RA:RAレジスタ27の値(入力系列) RB:RBレジスタ28の値(特定された可変長符号) RC:RCレジスタ29の値(符号長情報) RD:RDレジスタ30の値(識別情報) であり、この生成式は、入力系列(RA)と特定された
可変長符号(RB)との差を演算し、その差のビット長
を符号長情報(RC)に応じて調節し、且つ、ビット長
調節後の差と識別情報(RD)との和を求めることに他
ならない。Next, at step 68, the address of the third table is generated. The generation formula is (RA-RB) × 2 RC-15 + RD where RA: value of RA register 27 (input sequence) RB: value of RB register 28 (specified variable length code) RC: value of RC register 29 (Code length information) RD: The value (identification information) of the RD register 30, and this generation formula calculates the difference between the input sequence (RA) and the specified variable length code (RB), and the bit of the difference. The length is adjusted according to the code length information (RC), and the sum of the difference after the bit length adjustment and the identification information (RD) is obtained.
【0047】実際には、差演算は図3の減算器(差演算
手段)31で行われ、ビット長調節は同じく図3のシフ
タ(ビット長調節手段)32で行われ、和演算は同じく
図3の加算器(和演算手段)33で行われる。例えば、
入力系列(RA)がフェーズ1、2と同様に[1111
1110101101112 ](16進でFEB716)
とすると、特定された可変長符号(RB)は[1111
1101111000002 ](16進でFDE016)
であり、この場合の符号長情報(RC)は1110、識別
情報(RD)は1610であるから、(RA−RB)×2
RC-15 の項は、D716×2-4=D16となる。In practice, the difference calculation is performed by the subtracter (difference calculation means) 31 of FIG. 3, the bit length adjustment is also performed by the shifter (bit length adjustment means) 32 of FIG. 3 adder (sum operation means) 33. For example,
The input sequence (RA) is the same as in Phases 1 and 2 [1111
111010110111 2] (hexadecimal FEB7 16)
Then, the specified variable length code (RB) is [1111
110111100000 2] (hexadecimal FDE0 16)
Since the code length information (RC) in this case is 11 10 and the identification information (RD) is 16 10 , (RA-RB) × 2
The RC-15 term is D7 16 × 2 -4 = D 16 .
【0048】従って、D16は10進で1310であるか
ら、 K=1310+RD=1310+1610=2910 となり、第三テーブルのアドレス29、すなわち符号3
0が読み出される。以上のフェーズ1〜3の動作は可変
長符号列の全ビットがなくなるまで繰返して行われる
が、2回目以降の動作では、可変長符号列の先頭からy
ビット(yはその前の回のRCレジスタ29の値+1)
だけ捨てた残りのうちの16ビットを新たな入力系列と
して扱う。なお、残りの可変長符号が16ビットに満た
ない場合にはダミービット(0)を入力系列の後ろに付
加する。Therefore, since D 16 is 13 10 in decimal, K = 13 10 + RD = 13 10 +16 10 = 29 10 and the address 29 of the third table, that is, the code 3
0 is read. The operations of the above phases 1 to 3 are repeated until all the bits of the variable length code string are exhausted. However, in the second and subsequent operations, y is calculated from the beginning of the variable length code string.
Bit (y is the value of RC register 29 of the previous round + 1)
Only the remaining 16 bits discarded are treated as a new input sequence. If the remaining variable length code is less than 16 bits, dummy bit (0) is added after the input sequence.
【0049】例えば、元々の可変長符号列が[1111
1110101101111010 2 ]である場合、先
回のRCレジスタ29の値(符号長情報)は1110であ
るから、1110+1、すなわち先頭から12ビットを捨
てた残り[01111010 2 ]のうちの16ビットを
2回目の新たな入力系列とする。ここでは、16ビット
に満たないので、8個のダミービット(0)を後ろに追
加して[01111010000000002 ]とす
る。For example, if the original variable length code string is [1111]
1110101101111010 2], Then
The value (code length information) of the RC register 29 is 11 times.TenAnd
11Ten+1, that is, discard 12 bits from the beginning
Left over [01111010 216 bits of
This is the second new input sequence. Here, 16 bits
8 dummy bits (0) are added to the back.
In addition, [011110100000000000002]
It
【0050】この入力系列によれば、まず、フェーズ1
で(cp2,cp1,cp0)=(0,0,0)が得ら
れ、前表2より(g1,g0)=(0,0)、従って、
特定グループがG0となってREレジスタ43に[00
2 ]がセットされ、次のフェーズ2で(cp2,cp
1,cp0)=(0,0,0)が得られ、前表2より
(g1,g0)=(0,0)、従って、特定可変長符号
がグループG0の先頭+0番目(アドレス0)となって
RFレジスタ44に[002 ]がセットされる。そし
て、最後のフェーズ3で第一テーブルのVC[0]と、
第二テーブルのVL[0]及びBP[0]が参照され、
RAレジスタ27、RBレジスタ28、RCレジスタ2
9及びRDレジスタ30に以下の値がセットされる。According to this input sequence, first, the phase 1
(Cp2, cp1, cp0) = (0,0,0) is obtained with (2) and (g1, g0) = (0,0) from the previous table 2,
The specific group becomes G0 and [00
2 ] is set, and in the next phase 2, (cp2, cp
1, cp0) = (0,0,0) is obtained, and from Table 2 above, (g1, g0) = (0,0), so that the specific variable length code is the first + 0th (address 0) of the group G0. Then, [00 2 ] is set in the RF register 44. Then, in the last phase 3, VC [0] of the first table,
VL [0] and BP [0] of the second table are referred to,
RA register 27, RB register 28, RC register 2
9 and the RD register 30 are set to the following values.
【0051】 RA=[01111010000000002 ](16
進で7A0016) RB=[00000000000000002 ](16
進で000016) RC=010 RD=010 従って、2回目の動作における第三テーブルの参照アド
レスKは、 K=(RA−RB)×2RC-15 +RD=7A0016×2-15+0=0 となり、結局、第三テーブルから符号1が取り出され
る。RA = [0111101000000000 2 ] (16
7A00 16 ) RB = [0000000000000000 2 ] (16
0000 16 ) RC = 0 10 RD = 0 10 Therefore, the reference address K of the third table in the second operation is K = (RA-RB) × 2 RC-15 + RD = 7A00 16 × 2 -15 +0 = 0, and eventually the code 1 is extracted from the third table.
【0052】3回目の動作では、先回のRCレジスタ2
9の値(符号長情報)は010であるから、010+1、す
なわち先頭から1ビットを捨てた残り[1111010
2 ]のうちの16ビットを3回目の新たな入力系列とす
る。ここでは、16ビットに満たないので、9個のダミ
ービット(0)を後ろに追加して[111101000
00000002 ]とする。In the third operation, the RC register 2 of the previous operation is used.
Since the value of 9 (code length information) is 0 10 , 0 10 +1, that is, the remaining 1 bit from the beginning [1111010
16 bits of 2 ] are used as a new input sequence for the third time. Here, since it is less than 16 bits, 9 dummy bits (0) are added at the end of [111101000
0000000 2] and.
【0053】この入力系列によれば、まず、フェーズ1
で(cp2,cp1,cp0)=(0,0,1)が得ら
れ、前表2より(g1,g0)=(0,1)、従って、
特定グループがG1となってREレジスタ43に[01
2 ]がセットされ、次のフェーズ2で(cp2,cp
1,cp0)=(0,0,0)が得られ、前表2より
(g1,g0)=(0,0)、従って、特定可変長符号
がグループG1の先頭+0番目(アドレス4)となって
RFレジスタ44に[002 ]がセットされる。そし
て、最後のフェーズ3で第一テーブルのVC[4]と、
第二テーブルのVL[4]及びBP[4]が参照され、
RAレジスタ27、RBレジスタ28、RCレジスタ2
9及びRDレジスタ30に以下の値がセットされる。According to this input sequence, first, the phase 1
(Cp2, cp1, cp0) = (0, 0, 1) is obtained from (2) and (g1, g0) = (0, 1) from the previous table 2,
The specific group becomes G1 and [01
2 ] is set, and in the next phase 2, (cp2, cp
1, cp0) = (0,0,0) is obtained, and from Table 2 above, (g1, g0) = (0,0). Therefore, the specific variable-length code is the first + 0th (address 4) of the group G1. Then, [00 2 ] is set in the RF register 44. Then, in the final phase 3, VC [4] in the first table,
VL [4] and BP [4] of the second table are referred to,
RA register 27, RB register 28, RC register 2
9 and the RD register 30 are set to the following values.
【0054】 RA=[11110100000000002 ](16
進でF40016) RB=[11110000000000002 ](16
進でF00016) RC=610 RD=410 従って、3回目の動作における第三テーブルの参照アド
レスKは、 K=(RA−RB)×2RC-15 +RD=040016×2-9 +4=6 となり、結局、第三テーブルから符号7が取り出され
る。RA = [1111010000000000000 2 ] (16
F400 16 in radix RB = [1111000000000000000 2 ] (16
Proceeds in F000 16) RC = 6 10 RD = 4 10 Therefore, the reference address K of the third table in the third operation, K = (RA-RB) × 2 RC-15 + RD = 0400 16 × 2 -9 +4 = 6, and eventually the code 7 is extracted from the third table.
【0055】以上、本実施例によれば、例として挙げた
入力系列[11111110101101111010
2 ](16進表現ではFEB7A16)に対し、3回の動
作を繰り返すことによって、元符号列[符号30,符号
1,符号7]を正しく再生でき、従来例と同様のデータ
伸張機能が得られる他、テーブル容量を格段に削減でき
るという特有の効果が得られる。As described above, according to the present embodiment, the input sequence [11111110101101101111010] given as an example is used.
To (FEB7A 16 in hexadecimal representation) 2], by repeating 3 times of operations, the original code sequence [code 30, code 1, correctly reproduced code 7], obtained similar data decompression function and the conventional example In addition to the above, a unique effect that the table capacity can be significantly reduced can be obtained.
【0056】すなわち、図4に示すように、第一テーブ
ルには13種類の可変長符号を格納するだけでよく、ま
た、第二テーブルにも同種類の符号長情報及び識別情報
を格納するだけでよい。これは、第一及び第二テーブル
として用いられるVCメモリ20、VLメモリ21及び
BPメモリ23の容量が16Wもあれば充分であること
を示している。なお、第三メモリとして用いられるFC
メモリ34については、全ての元符号の種類分の容量を
必要とするが、それでも高々256Wであり、これら4
つのメモリの容量を合わせても16+16+16+25
6=304Wであるから、従来例の64KWに比べて遥
かに容量を削減できる。That is, as shown in FIG. 4, only 13 types of variable length codes need to be stored in the first table, and the same type of code length information and identification information can be stored in the second table. Good. This indicates that the VC memory 20, the VL memory 21, and the BP memory 23 used as the first and second tables have a capacity of 16 W, which is sufficient. FC used as the third memory
The memory 34 needs a capacity for all kinds of original codes, but the capacity is 256 W at most.
16 + 16 + 16 + 25 even if the capacity of one memory is combined
Since 6 = 304 W, the capacity can be much reduced compared to the conventional 64 kW.
【0057】なお、本実施例では、比較器23〜25、
アドレス決定回路26、レジスタ27〜30、減算器3
1、シフタ32及び加算器33といった付加回路を必要
とするが、これら付加回路によるコストアップを加味し
ても、メモリのコストダウン効果の方が断然に大きいの
で、明らかに装置全体のコストダウンを図ることができ
る。In this embodiment, the comparators 23 to 25,
Address determination circuit 26, registers 27 to 30, subtractor 3
1, an additional circuit such as the shifter 32 and the adder 33 is required. However, even if the cost increase due to these additional circuits is taken into consideration, the cost reduction effect of the memory is remarkably large, so that the cost reduction of the entire device is obviously reduced. Can be planned.
【0058】[0058]
【発明の効果】本発明によれば、以上のように構成した
ので、データ伸張変換テーブルの規模を削減してメモリ
容量を少なくし、コストの低減を図ることができる。According to the present invention, since it is configured as described above, the scale of the data expansion conversion table can be reduced, the memory capacity can be reduced, and the cost can be reduced.
【図1】本発明の原理構成図(1/2)である。FIG. 1 is a principle configuration diagram (1/2) of the present invention.
【図2】本発明の原理構成図(2/2)である。FIG. 2 is a principle configuration diagram (2/2) of the present invention.
【図3】一実施例の全体構成図である。FIG. 3 is an overall configuration diagram of an embodiment.
【図4】一実施例の第一テーブル、第二テーブル及び第
三テーブルの概念図である。FIG. 4 is a conceptual diagram of a first table, a second table and a third table according to an embodiment.
【図5】一実施例のアドレス決定回路の構成図である。FIG. 5 is a configuration diagram of an address determination circuit according to an embodiment.
【図6】一実施例の動作を示す流れ図である。FIG. 6 is a flowchart showing the operation of one embodiment.
【図7】可変長符号を用いたデータ圧縮変換テーブルの
概念図である。FIG. 7 is a conceptual diagram of a data compression conversion table using a variable length code.
【図8】データ圧縮部及び伸張部を含むデータ処理、画
像処理又は情報通信等のシステム要部構成図である。FIG. 8 is a configuration diagram of a main part of a system including a data compression unit and a decompression unit, such as data processing, image processing, or information communication.
【図9】従来の可変長符号デコード回路の概念図であ
る。FIG. 9 is a conceptual diagram of a conventional variable length code decoding circuit.
【図10】従来のデータ伸張変換テーブル図である。FIG. 10 is a conventional data expansion conversion table diagram.
1:第一テーブル 2:第二テーブル 3:切出し手段 4:第一比較手段 5:第一選択手段 6:第二選択手段 7:第三選択手段 8:第二比較手段 9:第四選択手段 10:第五選択手段 11:第六選択手段 12:差演算手段 13:ビット長調節手段 14:和演算手段 15:第三テーブル 1: First table 2: Second table 3: Cutting means 4: First comparing means 5: First selecting means 6: Second selecting means 7: Third selecting means 8: Second comparing means 9: Fourth selecting means 10: Fifth selecting means 11: Sixth selecting means 12: Difference calculating means 13: Bit length adjusting means 14: Sum calculating means 15: Third table
Claims (4)
する可変長符号デコード回路であって、可変長符号の各
長さの最小の符号を符号長の順番に保持するテーブル及
び2m −1(但し、m=1,2,……)個の比較器を有
し、 前記テーブルから1度に2m −1個の要素を読み出し、
前記各比較器で可変長符号入力との大小比較を行うと共
にその比較動作をn/m回繰り返して、 i番目のテーブル要素 ≦ 可変長符号入力 < i+1番
目のテーブル要素 という条件を満たすi番目のテーブル要素を発見するこ
とで、可変長符号入力の先頭の符号の長さを求めるよう
にしたことを特徴とする可変長符号デコード回路。1. A variable-length code decoding circuit for decoding a variable-length code having a length of 1 to 2 n bits, a table for holding the smallest code of each length of the variable-length code in the order of the code length, and 2 m. -1 (however, m = 1, 2, ...) Comparators are provided, and 2 m −1 elements are read from the table at one time,
Each of the comparators performs a magnitude comparison with the variable length code input and repeats the comparison operation n / m times to obtain the i th table element ≦ the variable length code input <i + 1 th table element. A variable-length code decoding circuit characterized in that the length of the code at the beginning of a variable-length code input is obtained by finding a table element.
する可変長符号デコード回路であって、可変長符号の各
長さの最小の符号を符号長の順番に保持するテーブル及
び3、個の比較器を有し、 前記テーブルから1度に3個の要素を読み出し、前記各
比較器で可変長符号入力との大小比較を行うと共にその
比較動作を2回繰り返して、 i番目のテーブル要素 ≦ 可変長符号入力 < i+1番
目のテーブル要素 という条件を満たすi番目のテーブル要素を発見するこ
とで、可変長符号入力の先頭の符号の長さを求めるよう
にしたことを特徴とする可変長符号デコード回路。2. A variable-length code decoding circuit for decoding a variable-length code having a length of 1 to 16 bits, wherein a table holding the smallest code of each length of the variable-length code in the order of the code length and 3, Of the i-th table element by reading out three elements at a time from the table, performing a magnitude comparison with the variable-length code input in each comparator, and repeating the comparison operation twice. <Variable-length code input <i + 1th table element The variable-length code is characterized in that the length of the leading code of the variable-length code input is found by finding the i-th table element that satisfies the condition. Decoding circuit.
ード回路であって、元符号を保持するFCテーブル、可
変長符号の各長さの最小の符号を符号長の順番に保持す
るVCテーブル、VCテーブルに対応する符号長を保持
するVLテーブル、VCテーブルに対応するFCテーブ
ルのアドレスを保持するBPテーブル、3個の比較器、
シフタ、加算器及び減算器を含み、 第1段階では、VCテーブルから3個の要素を同時に読
み出して3個の比較器で可変長符号入力との大小比較を
行い、可変長符号入力がVCテーブルの4つのグループ
のどれに属するかを判別し、 第2段階では、VCテーブル内の第1段階で確定したグ
ループの3個の要素を読出し、3個の比較器で可変長符
号入力との大小比較を行い、可変長符号入力がVCテー
ブルのどの要素に対応するかを判別し、 第3段階では、可変長符号入力に対応するVCテーブル
の要素とVLテーブルの要素とBPテーブルの要素とを
読出し、可変長符号入力の値とVCテーブルの読出し値
の差を前記減算器で求め、さらに、前記シフタでVLテ
ーブルの読出し値に応じたシフトを行い、そのシフト結
果にBPテーブルの読出し値を前記加算器で加算してF
Cテーブルのアドレスを求め、そのアドレスのFCテー
ブルの要素を読み出すことで元符号を求めると共に、V
Lテーブルの読出し値から次の可変長符号の開始位置を
判断することを特徴とする可変長符号デコード回路。3. A variable length code decoding circuit for decoding a variable length code, comprising an FC table holding an original code, a VC table holding the smallest code of each length of the variable length code in order of code length, A VL table holding the code length corresponding to the VC table, a BP table holding the address of the FC table corresponding to the VC table, three comparators,
It includes a shifter, an adder, and a subtracter. In the first stage, three elements are read from the VC table at the same time, and three comparators perform a magnitude comparison with the variable length code input. It is determined which of the four groups belongs to, and in the second stage, the three elements of the group determined in the first stage in the VC table are read out and the three comparators compare the size with the variable length code input. The comparison is performed to determine which element of the VC table the variable length code input corresponds to. In the third stage, the VC table element, the VL table element and the BP table element corresponding to the variable length code input are determined. Read, the difference between the input value of the variable length code and the read value of the VC table is obtained by the subtracter, and further, the shifter performs a shift according to the read value of the VL table, and the shift result is read by the BP table. F was value by adding in the adder
The address of the C table is obtained, and the original code is obtained by reading the element of the FC table at that address.
A variable length code decoding circuit, characterized in that the start position of the next variable length code is determined from the read value of the L table.
号のうち、他の全ての可変長符号と符号長が一致しない
可変長符号、及び、同一符号長集団の中で最小値を有す
る可変長符号を昇順に配列し、且つ配列された可変長符
号をグループ単位に格納する第一テーブル(1)と、 第一テーブル(1)の各要素に対応する符号長情報を示
すと共に、第一テーブル(1)の各要素に所定の識別情
報を割り当てて格納する第二テーブル(2)と、 入力された可変長符号列の先頭から又は指定された符号
長+1から最大符号長に相当する長さを切り出す切出し
手段(3)と、 切出し手段(3)の出力と第一テーブル(1)に格納さ
れたグループ内最小値の可変長符号とを比較し、切出し
手段(3)の出力と値が一致する可変長符号又は切出し
手段(3)の出力よりも値が小さく且つその差が最小の
可変長符号を含む第一テーブル(1)のグループを特定
する第一比較手段(4)と、 第一比較手段(4)で特定されたグループ内の全ての可
変長符号を選択する第一選択手段(5)と、 第一比較手段(4)で特定されたグループ内の全ての符
号長情報を選択する第二選択手段(6)と、 第一比較手段(4)で特定されたグループ内の全ての識
別情報を選択する第三選択手段(7)と、 切出し手段(3)の出力と第一選択手段(4)の出力と
を比較し、切出し手段(3)の出力と値が一致する可変
長符号又は切出し手段(3)の出力よりも値が小さく且
つその差が最小の可変長符号を特定する第二比較手段
(8)と、 第二比較手段(8)で特定された可変長符号を第一選択
手段(5)の出力中から選択する第四選択手段(9)
と、 第二比較手段(8)で特定された可変長符号に対応する
1つの符号長情報を第二選択手段(6)の出力中から選
択する第五選択手段(10)と、 第二比較手段(8)で特定された可変長符号に対応する
1つの識別情報を第三選択手段(7)の出力中から選択
する第六選択手段(11)と、 切出し手段(3)の出力と第四選択手段(9)の出力と
の差を演算する差演算手段(12)と、 差演算手段(12)の出力のビット長を第五選択手段
(10)の出力に応じて調節するビット長調節手段(1
3)と、 ビット長調節手段(13)の出力と第六選択手段(1
1)の出力との和を演算する和演算手段(14)と、 全ての元符号を格納する第三テーブル(15)とを備
え、 前記第三テーブル(15)の元符号は、対応する可変長
符号語の長さが等しいものが連続したアドレスのメモリ
領域に可変長符号の値が小さい順に格納され、 前記所定の情報は、第三テーブル(15)で各符号長に
対応するメモリ領域の最初のアドレスを示すように決定
され、第三テーブル(15)のアドレスは和演算手段
(14)により決定されることを特徴とする可変長符号
デコード回路。4. A variable-length code whose code length does not match with all other variable-length codes among the variable-length codes corresponding to M original codes in a one-to-one correspondence, and the smallest in the same code-length group. A first table (1) in which variable-length codes having values are arranged in ascending order and the arranged variable-length codes are stored in group units, and code length information corresponding to each element of the first table (1) is shown. At the same time, a second table (2) in which predetermined identification information is assigned to each element of the first table (1) and stored, and from the beginning of the input variable length code string or from a specified code length +1 to a maximum code length The cutting-out means (3) for cutting out the length corresponding to the above, the output of the cutting-out means (3) and the variable length code of the minimum value in the group stored in the first table (1) are compared, and the cutting-out means (3) Variable length code or cut-out means (3 First comparing means (4) for specifying a group of the first table (1) including a variable length code having a smaller value than the output of the above and a difference therebetween is the group specified by the first comparing means (4). First selecting means (5) for selecting all variable length codes in the group, and second selecting means (6) for selecting all code length information in the group specified by the first comparing means (4), The output of the cutting means (3) and the output of the first selecting means (4) are compared with the third selecting means (7) for selecting all the identification information in the group specified by the first comparing means (4). And a second comparing means (8) for specifying a variable length code whose value matches the output of the cutting means (3) or a variable length code having a smaller value than the output of the cutting means (3) and a minimum difference. , Is the variable length code specified by the second comparing means (8) being output by the first selecting means (5)? Fourth selecting means for selecting from (9)
A fifth selecting means (10) for selecting one code length information corresponding to the variable length code specified by the second comparing means (8) from the output of the second selecting means (6); Sixth selection means (11) for selecting one piece of identification information corresponding to the variable length code specified by the means (8) from the output of the third selection means (7), the output of the cutout means (3) and the Difference calculating means (12) for calculating the difference from the output of the fourth selecting means (9), and bit length for adjusting the bit length of the output of the difference calculating means (12) according to the output of the fifth selecting means (10). Adjustment means (1
3), the output of the bit length adjusting means (13) and the sixth selecting means (1
1) is provided with a sum calculation means (14) for calculating the sum with the output, and a third table (15) for storing all the original codes, and the original code of the third table (15) is a corresponding variable Those having the same length of the long code word are stored in the memory area of consecutive addresses in ascending order of the value of the variable length code, and the predetermined information is stored in the memory area corresponding to each code length in the third table (15). A variable length code decoding circuit characterized in that it is determined so as to indicate the first address, and the address of the third table (15) is determined by the sum operation means (14).
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP05250886A JP3113765B2 (en) | 1993-10-07 | 1993-10-07 | Variable length code decoding circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP05250886A JP3113765B2 (en) | 1993-10-07 | 1993-10-07 | Variable length code decoding circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH07106981A true JPH07106981A (en) | 1995-04-21 |
| JP3113765B2 JP3113765B2 (en) | 2000-12-04 |
Family
ID=17214489
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP05250886A Expired - Fee Related JP3113765B2 (en) | 1993-10-07 | 1993-10-07 | Variable length code decoding circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3113765B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010258532A (en) * | 2009-04-21 | 2010-11-11 | Internatl Business Mach Corp <Ibm> | Circuit and method for converting bit length into code |
-
1993
- 1993-10-07 JP JP05250886A patent/JP3113765B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010258532A (en) * | 2009-04-21 | 2010-11-11 | Internatl Business Mach Corp <Ibm> | Circuit and method for converting bit length into code |
| US8018359B2 (en) | 2009-04-21 | 2011-09-13 | International Business Machines Corporation | Conversion of bit lengths into codes |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3113765B2 (en) | 2000-12-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6876774B2 (en) | Method and apparatus for compressing data string | |
| US5406278A (en) | Method and apparatus for data compression having an improved matching algorithm which utilizes a parallel hashing technique | |
| US3675211A (en) | Data compaction using modified variable-length coding | |
| JP2534465B2 (en) | Data compression apparatus and method | |
| US6982661B2 (en) | Method of performing huffman decoding | |
| JP3262602B2 (en) | Dictionary-based data compression / decompression system | |
| EP0628228A1 (en) | Data compression using hashing | |
| JPH0799812B2 (en) | Signal coding apparatus, signal decoding apparatus, and signal coding / decoding apparatus | |
| JPH0645950A (en) | Apparatus and method for generation of signal | |
| JPS6148298B2 (en) | ||
| JPH0879092A (en) | Mevhod for compressing and compression-releasing data and device therefor | |
| EP0471518A1 (en) | Data compression method and apparatus | |
| US5832037A (en) | Method of compressing and expanding data | |
| US5617089A (en) | Huffman code decoding circuit | |
| JPH09511375A (en) | Encoding device for encoding (N-1) bit information word sequence into N-bit channel word sequence and decoding device for decoding N-bit channel word sequence into (N-1) bit information word sequence | |
| JPH1132328A (en) | Data compression method, data compression apparatus, and recording medium for multi-valued image data | |
| JPH03204234A (en) | Restoration of compressed data | |
| JP3113765B2 (en) | Variable length code decoding circuit | |
| CN1766830B (en) | Binary representation of number based on processor word size | |
| US20030052802A1 (en) | Method and apparatus for huffman decoding technique | |
| JP3038233B2 (en) | Data compression and decompression device | |
| JPH03262331A (en) | Data compression system | |
| JP2003273746A (en) | Variable length code decoding device | |
| JP3384844B2 (en) | Data compression method and apparatus and data decompression method and apparatus | |
| JP3038234B2 (en) | Dictionary search method for data compression equipment |
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: 20000912 |
|
| LAPS | Cancellation because of no payment of annual fees |