JPH06131150A - Encoder - Google Patents

Encoder

Info

Publication number
JPH06131150A
JPH06131150A JP28009092A JP28009092A JPH06131150A JP H06131150 A JPH06131150 A JP H06131150A JP 28009092 A JP28009092 A JP 28009092A JP 28009092 A JP28009092 A JP 28009092A JP H06131150 A JPH06131150 A JP H06131150A
Authority
JP
Japan
Prior art keywords
code
bit string
length code
decoding
code bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP28009092A
Other languages
Japanese (ja)
Inventor
Akihiko Yajima
明彦 矢島
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP28009092A priority Critical patent/JPH06131150A/en
Publication of JPH06131150A publication Critical patent/JPH06131150A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PURPOSE:To improve the using efficiency of a memory, and to save the memory by providing a decoding memory table to deal with decoding in which a variable length code bit string and a fixed length code bit string are made a pair, and outputting the fixed length code bit string of the memory table at the time of the coincidence of it with the variable length code bit string as a decoded value. CONSTITUTION:The values of code table RAMs 440 to 443 are evaluated at a time for the value of a register 460. Then, by switching multiplexers 451 to 452, encoding/decoding is dealt with. When one of comparators makes a hit while increasing gradually the value of an address counter 433, the address counter 433 is stopped immediately, and the multiplexer 455 is controlled by a select control circuit 461 so as to output the correct encoded value/decoded value and code length to code output 465 and code length output 466 respectively. By arranging four set, for instance, of encoding/decoding circuits in this way, and operating them in parallel, the four times higher speed of the encoding/ decoding can be realized.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は符号化装置の構成方式に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a system for constructing an encoding device.

【0002】[0002]

【従来の技術】従来の可変長符号の符号化/復号化装置
について述べる。従来例として、ダイレクトマッピング
方式が挙げられる。
2. Description of the Related Art A conventional variable length code encoding / decoding apparatus will be described. A conventional example is a direct mapping method.

【0003】復号化におけるダイレクトマッピング方式
は、入力される可変長符号をアドレスとし、対応するデ
ータから復号値を得る。また、符号化におけるダイレク
トマッピング方式は、入力される可変長符号をアドレス
とし、対応するデータから復号値を得る。
The direct mapping method in decoding uses a variable length code input as an address and obtains a decoded value from corresponding data. Further, in the direct mapping method in encoding, a variable value code that is input is used as an address and a decoded value is obtained from corresponding data.

【0004】ダイレクトマッピング方式のメリットとし
ては、符号化や復号化が高速にできることが挙げられ
る。ダイレクトマッピング方式での処理時間は、メモリ
アドレスを指定してから読みだすまでの時間に等しく、
多くの場合1システムクロックでの符号化/復号化が可
能である。
One of the merits of the direct mapping method is that encoding and decoding can be performed at high speed. The processing time in the direct mapping method is equal to the time from when the memory address is specified to when it is read,
In many cases, encoding / decoding with one system clock is possible.

【0005】[0005]

【発明が解決しようとする課題】しかし、前述の従来技
術では、復号化テーブルのアドレスが入力ハフマン符号
の最大符号長分必要なため、テーブル容量が非常に大き
くなってしまい、かつ、有効利用されないテーブル領域
ができてしまうことが挙げられる。たとえば、図5は、
本実施例で使用した符号テーブルRAMのデータ内容を
示す図であるが、これと同様の可変長符号テーブルを、
ダイレクトマッピング方式にて作成すると、最大符号長
が11ビットなので、アドレスが11ビット必要で、2
の11乗で2048ワードのテーブルが必要である。こ
れに対して、図5では33ワードなので、いかに大きい
かがわかる。
However, in the above-mentioned prior art, since the address of the decoding table is required for the maximum code length of the input Huffman code, the table capacity becomes very large and is not effectively used. It is possible to create a table area. For example, in Figure 5,
It is a diagram showing the data contents of the code table RAM used in the present embodiment, a variable length code table similar to this,
When created by the direct mapping method, the maximum code length is 11 bits, so 11 bits are required for the address.
We need a table of 2048 words in the 11th power of. On the other hand, since it is 33 words in FIG. 5, it can be seen how large it is.

【0006】また、復号化では、復号化されるべき可変
長符号をテーブルのアドレスとして割り当て、符号化で
は、符号化されるべき固定長データをテーブルのアドレ
スとして割り当てるため、テーブルの構成法がまるで違
う。したがって、符号化と復号化でテーブルの共用はで
きない。
Further, in decoding, a variable length code to be decoded is assigned as a table address, and in coding, fixed length data to be encoded is assigned as a table address. Wrong. Therefore, the table cannot be shared between encoding and decoding.

【0007】つまり、従来技術では、非常に大きなメモ
リの容量と、符号化/復号化で別々の構成を持つテーブ
ルが必要であるという課題を有する。
That is, the conventional technique has a problem that a very large memory capacity and a table having a separate structure for encoding / decoding are required.

【0008】そこで、このような課題を解決するため、
本発明の請求項1の構成によれば、ひとつの符号を、ひ
とつのワードに納められるので、メモリの使用効率を上
げ、メモリの節約をすることを目的とする。また、テー
ブル内データを発生頻度の大きい符号の順に配置し、評
価してゆくことにより、復号化時間を極めて合理的に短
縮することを目的とする。
Therefore, in order to solve such a problem,
According to the configuration of claim 1 of the present invention, since one code can be stored in one word, it is an object of the present invention to improve the memory usage efficiency and save the memory. Another object of the present invention is to arrange the data in the table in the order of the code having the highest frequency of occurrence and to evaluate the data in order to extremely shorten the decoding time.

【0009】本発明の請求項2の構成によれば、復号化
のテーブルと同一の符号テーブルにて符号化を行うこと
を目的とする。
According to the second aspect of the present invention, it is an object of the present invention to perform encoding using the same code table as the decoding table.

【0010】本発明の請求項3の構成によれば、復号化
のテーブルと同一の符号テーブルにて符号化を行い、ま
た、同一の回路で、復号化、符号化を行うことを目的と
する。
According to the third aspect of the present invention, it is an object of the present invention to perform encoding using the same code table as the decoding table, and to perform decoding and encoding using the same circuit. .

【0011】本発明の請求項4の構成によれば、符号化
/復号化回路を複数セット組み込み、並列に動作させる
ことにより、符号化/復号化の高速化を実現することを
目的とする。
According to the structure of claim 4 of the present invention, it is an object to realize a high-speed encoding / decoding by incorporating a plurality of sets of encoding / decoding circuits and operating them in parallel.

【0012】[0012]

【課題を解決するための手段】本発明の請求項1の符号
化装置は、入力可変長符号ビット列を、メモリテーブル
を参照しながら、固定長符号ビット列に復号化する可変
長復号化装置において、復号化に対応する可変長符号ビ
ット列と固定長符号ビット列が、対になり配置されてい
る復号化メモリテーブルと、さらに前記メモリテーブル
の出力と、入力可変長符号ビット列を比較する比較器を
持ち、前記比較器において可変長符号ビット列が一致し
た時の、メモリテーブルの固定長符号ビット列を復号値
として出力することを特徴とする。
According to a first aspect of the present invention, there is provided a variable length decoding device for decoding an input variable length code bit string into a fixed length code bit string by referring to a memory table. A variable-length code bit string and a fixed-length code bit string corresponding to decoding are arranged in pairs, and a decoding memory table is further provided, and an output of the memory table and a comparator for comparing the input variable-length code bit string are provided, It is characterized in that the comparator outputs the fixed-length code bit string of the memory table as a decoded value when the variable-length code bit string matches.

【0013】本発明の請求項2の符号化装置は、入力固
定長符号ビット列を、メモリテーブルを参照しながら、
可変長符号ビット列に符号化する可変長符号化装置にお
いて、符号化に対応する固定長符号ビット列と可変長符
号ビット列が、対になり配置されている符号化メモリテ
ーブルと、さらに前記メモリテーブルの出力と、入力固
定長符号ビット列を比較する比較器を持ち、前記比較器
において固定長符号ビット列が一致した時の、メモリテ
ーブルの可変長符号ビット列を符号化値として出力する
ことを特徴とする。
According to a second aspect of the present invention, an encoding device refers to an input fixed length code bit string while referring to a memory table,
In a variable-length coding device for coding into a variable-length code bit string, a coding memory table in which a fixed-length code bit string and a variable-length code bit string corresponding to coding are arranged in pairs, and the output of the memory table And a comparator for comparing the input fixed-length code bit strings, and when the fixed-length code bit strings match in the comparator, the variable-length code bit string of the memory table is output as an encoded value.

【0014】本発明の請求項3の符号化装置は、前記請
求項1および請求項2の符号化装置において、メモリテ
ーブルの固定長符号ビット列と可変長符号ビット列を選
択して比較器に入力する選択器を持ち、選択器により、
比較器に入力するメモリテーブルの固定長符号ビット列
と可変長符号ビット列を切り替え可能としたことを特徴
とする。
According to a third aspect of the present invention, in the encoding apparatus according to the first and second aspects, the fixed length code bit string and the variable length code bit string of the memory table are selected and input to the comparator. It has a selector,
It is characterized in that a fixed length code bit string and a variable length code bit string of the memory table input to the comparator can be switched.

【0015】本発明の請求項4の符号化装置は、 前記
請求項1、請求項2および請求項3の符号化装置におい
て、メモリテーブルと、比較器を複数セット搭載するこ
とを特徴とする。
An encoding apparatus according to a fourth aspect of the present invention is characterized in that, in the encoding apparatus according to the first, second and third aspects, a memory table and a plurality of sets of comparators are mounted.

【0016】[0016]

【実施例】以下、実施例により本発明の詳細を示す。The details of the present invention will be described below with reference to Examples.

【0017】(実施例1)本実施例は、特許請求の範囲
の請求項1に関する。
(Embodiment 1) This embodiment relates to claim 1 of the claims.

【0018】図2は、本実施例の構成を示すブロック図
である。符号テーブルRAM(510)には、固定長デ
ータ(511)と可変長符号(512)が同一アドレス
に対になり書き込まれている。
FIG. 2 is a block diagram showing the configuration of this embodiment. In the code table RAM (510), fixed length data (511) and variable length code (512) are written in pairs at the same address.

【0019】さらに、可変長符号(512)に対応する
符号長(513)も同一アドレスに対になり書き込まれ
ている。
Further, the code length (513) corresponding to the variable length code (512) is also written in pairs at the same address.

【0020】予め符号表で、固定長データに対応する可
変長符号とその符号長をテーブルに書き込んでおけば、
あるアドレスを指定した時に、ある固定長データとこれ
に対応する可変長符号および、符号長が得られることに
なる。
If a variable length code corresponding to fixed length data and its code length are written in the code table in advance,
When a certain address is designated, a certain fixed length data, a variable length code corresponding to it, and a code length are obtained.

【0021】図5は、本実施例で使用した符号テーブル
RAMのデータ内容を示す図である。たとえば、アドレ
ス4を指定したときに、固定長データ5(10進表示)
と、これに対応する可変長符号 0010 (2進表示)およ
び、符号長4(10進表示)が得られる。
FIG. 5 is a diagram showing the data contents of the code table RAM used in this embodiment. For example, when address 4 is specified, fixed length data 5 (decimal display)
And a variable length code 0010 (binary display) and a code length 4 (decimal display) corresponding thereto are obtained.

【0022】あるいは、アドレス27を指定したとき
に、固定長データ28(10進表示)と、これに対応す
る可変長符号 0000 0011 101(2進表示)および、符号
長11(10進表示)が得られることになる。
Alternatively, when the address 27 is designated, the fixed length data 28 (decimal display) and the corresponding variable length code 0000 0011 101 (binary display) and the code length 11 (decimal display) are displayed. Will be obtained.

【0023】(510)符号テーブルRAMには、これ
らのデータを、(501)ダウンロード用データバスよ
りダウンロードすることにより、いろいろな可変長符号
テーブルに対応可能となっている。
By downloading these data to the (510) code table RAM from the (501) download data bus, various variable length code tables can be supported.

【0024】また、RAM容量の許容する限り、複数の
テーブルを一度にダウンロードして、使い分けることも
できる。
Further, as long as the RAM capacity allows, a plurality of tables can be downloaded at once and used properly.

【0025】本実施例は、可変長符号の復号に関するの
で、復号動作について説明する。
Since this embodiment relates to decoding of variable length codes, the decoding operation will be described.

【0026】(508)アドレスカウンタは、(51
0)符号テーブルRAMのアドレス入力につながってお
り、符号テーブルRAMのアドレスを指定する。
(508) The address counter is (51
0) It is connected to the address input of the code table RAM and specifies the address of the code table RAM.

【0027】まず、(503)セット用アドレスバスか
ら、復号すべき符号テーブルの先頭アドレスを(50
8)アドレスカウンタへロードする。
First, the start address of the code table to be decoded is set to (50) from the (503) set address bus.
8) Load to the address counter.

【0028】一方、(507)符号入力より、復号化す
べき可変長符号のビット列が入力される。このビット列
は、(514)符号入力レジスタに保持される。
On the other hand, the bit string of the variable length code to be decoded is input from the (507) code input. This bit string is held in the (514) code input register.

【0029】(514)符号入力レジスタはシフトレジ
スタになっており、任意のビット数をシフトすることが
できる。(514)符号入力レジスタに保持されている
可変長符号と、(510)符号テーブルRAMから出力
する(512)可変長符号は、それぞれ(515)比較
器に入力される。ここで、(508)アドレスカウンタ
の値を増加させていき、(510)符号テーブルRAM
の出力である(512)可変長符号を、テーブルの頭か
ら、1ワードずつ(515)比較器で比較していく。も
し、(510)符号テーブルRAMと、(514)符号
入力レジスタの値の一致が(515)比較器により検出
されれば、そのときの、(511)固定長データの値
が、復号値ということになる。
(514) The code input register is a shift register and can shift an arbitrary number of bits. The variable length code held in the (514) code input register and the (512) variable length code output from the (510) code table RAM are respectively input to the (515) comparator. Here, the value of the (508) address counter is increased, and (510) the code table RAM.
The (512) variable-length code that is the output of the above is compared word by word from the head of the table by the (515) comparator. If a match between the values of the (510) code table RAM and the (514) code input register is detected by the (515) comparator, it means that the value of the (511) fixed length data at that time is the decoded value. become.

【0030】したがって、(515)比較器の出力で、
(516)固定長データ出力レジスタをアクティブに
し、(511)固定長データを保持し、さらに、(51
6)固定長データ出力レジスタの値を復号値とする。
Therefore, at the output of the (515) comparator,
(516) The fixed length data output register is activated, (511) the fixed length data is held, and (51)
6) The value of the fixed length data output register is used as the decoded value.

【0031】同時に、(515)比較器の出力で、(5
17)符号長出力レジスタをアクティブにし、(51
3)符号長を保持する。
At the same time, the output of the (515) comparator is
17) Activate the code length output register and set (51
3) Hold the code length.

【0032】この値は、(514)符号入力レジスタ
へ、シフトビット数として与えられ、(514)符号入
力レジスタの入力可変長符号を、復号化した符号のビッ
ト数分シフトする。これは、新しい入力可変長符号をセ
ットし、次の復号化に備えるためである。
This value is given to the (514) code input register as the number of shift bits, and the input variable length code of the (514) code input register is shifted by the number of bits of the decoded code. This is to set a new input variable length code and prepare for the next decoding.

【0033】以上で1回の復号化は完了であり、以下、
可変長符号の続く限り、同じサイクルを繰り返す。
With the above, one decoding is completed.
The same cycle is repeated as long as the variable length code continues.

【0034】以上の動作を整理したものが、図6の、本
発明の実施例1の構成の状態遷移図である。
FIG. 6 is a state transition diagram of the configuration of the first embodiment of the present invention in which the above operations are arranged.

【0035】本実施例で、図5の符号化テーブルを搭載
した場合、必要なメモリ量は、33ワード(深さ32ビ
ット)で、1056ビットとなる。また、ひとつの符号
が、ひとつのワードに納められているので、メモリの使
用上、まったく無駄がないことがわかる。したがって、
メモリの使用効率を上げ、メモリの節約をすることがで
きた。
In the present embodiment, when the encoding table of FIG. 5 is installed, the required memory amount is 33 words (depth 32 bits), which is 1056 bits. Further, since one code is stored in one word, it can be seen that there is no waste in using the memory. Therefore,
We were able to improve memory usage efficiency and save memory.

【0036】また、固定長データを可変長符号に併記す
るので、符号の並び順はアドレスに依存せず、自由に配
置できる。こうして、図5のように符号をに発生頻度順
に並べたることができる。復号化の時に、テーブルの頭
から評価してゆくので、発生頻度の大きい符号の順に評
価してゆくことができ、復号化時間を極めて合理的に短
縮することができた。
Further, since the fixed length data is written together with the variable length code, the arrangement order of the codes does not depend on the address and can be freely arranged. In this way, the codes can be arranged in the order of occurrence frequency as shown in FIG. At the time of decoding, since the evaluation is performed from the head of the table, it is possible to evaluate in the order of the code with the highest occurrence frequency, and the decoding time can be shortened extremely reasonably.

【0037】(実施例2)本実施例は、特許請求の範囲
の請求項2に関する。
(Embodiment 2) This embodiment relates to claim 2 of the claims.

【0038】図3は、本実施例の構成を示すブロック図
である。
FIG. 3 is a block diagram showing the configuration of this embodiment.

【0039】(実施例1)と同様に、符号テーブルRA
M(610)には、固定長データ(611)と可変長符
号(612)が同一アドレスに対になり書き込まれてい
る。
Similar to (Example 1), the code table RA
In M (610), fixed length data (611) and variable length code (612) are written in pairs at the same address.

【0040】さらに、可変長符号(612)に対応する
符号長(613)も同一アドレスに対になり書き込まれ
ている。
Further, the code length (613) corresponding to the variable length code (612) is also written in pairs at the same address.

【0041】図5は、(実施例1)と同様に本実施例で
使用した符号テーブルRAMのデータ内容を示す図であ
る。
FIG. 5 is a diagram showing the data contents of the code table RAM used in this embodiment as in the case of the first embodiment.

【0042】(610)符号テーブルRAMには、これ
らのデータを、(601)ダウンロード用データバスよ
りダウンロードすることにより、いろいろな可変長符号
テーブルに対応可能となっている。
(610) By downloading these data to the code table RAM from the (601) download data bus, various variable length code tables can be supported.

【0043】また、RAM容量の許容する限り、(実施
例1)と同様に複数のテーブルを一度にダウンロードし
て、使い分けることもできる。
Also, as long as the RAM capacity allows, a plurality of tables can be downloaded at once and used differently as in the case of the first embodiment.

【0044】本実施例は、可変長符号の符号化に関する
ので、符号化動作について説明する。
Since the present embodiment relates to the coding of variable length codes, the coding operation will be described.

【0045】(608)アドレスカウンタは、(61
0)符号テーブルRAMのアドレス入力につながってお
り、符号テーブルRAMのアドレスを指定する。
(608) The address counter is (61)
0) It is connected to the address input of the code table RAM and specifies the address of the code table RAM.

【0046】まず、(603)セット用アドレスバスか
ら、復号すべき符号テーブルの先頭アドレスを(60
8)アドレスカウンタへロードする。
First, from the (603) set address bus, the start address of the code table to be decoded is (60
8) Load to the address counter.

【0047】一方、(607)符号入力より、符号化す
べき固定長データのビット列が入力される。このビット
列は、(614)データ入力レジスタに保持される。
On the other hand, from (607) code input, a bit string of fixed length data to be encoded is input. This bit string is held in the (614) data input register.

【0048】(614)データ入力レジスタに保持され
ている可変長符号と、(610)符号テーブルRAMか
ら出力する(611)固定長データは、それぞれ(61
5)比較器に入力される。ここで、(608)アドレス
カウンタの値を増加させていき、(610)符号テーブ
ルRAMの出力である(611)固定長データを、テー
ブルの頭から、1ワードずつ(615)比較器で比較し
ていく。
(614) The variable length code held in the data input register and (610) the fixed length data output from the code table RAM are (61)
5) Input to the comparator. Here, the value of the (608) address counter is increased, and (610) the fixed-length data output from the code table RAM (611) is compared word by word from the head of the table with a (615) comparator. To go.

【0049】もし、(610)符号テーブルRAMと、
(614)データ入力レジスタの値の一致が(615)
比較器により検出されれば、そのときの、(612)可
変長符号が、符号化値ということになる。
If (610) code table RAM,
(614) If the values in the data input register match (615)
If detected by the comparator, the (612) variable-length code at that time is the encoded value.

【0050】したがって、(615)比較器の出力で、
(616)可変長符号出力レジスタをアクティブにし、
(612)可変長符号を保持し、さらに、(616)可
変長符号出力レジスタの値を符号化値とする。
Therefore, at the output of the (615) comparator,
(616) Activate the variable length code output register,
(612) Holds the variable length code, and further sets the value of the (616) variable length code output register as the encoded value.

【0051】同時に、(615)比較器の出力で、(6
17)符号長出力レジスタをアクティブにし、(61
3)符号長を保持する。この値は、(618)可変長符
号出力レジスタの後段のデータバッファへ、シフトビッ
ト数として与えられる。 以上で1回の復号化は完了で
あり、以下、可変長符号の続く限り、同じサイクルを繰
り返す。
At the same time, the output of the (615) comparator is
17) Activate the code length output register, and
3) Hold the code length. This value is given as the number of shift bits to the data buffer in the subsequent stage of the (618) variable length code output register. The above is one decoding, and the same cycle is repeated as long as the variable length code continues.

【0052】以上の動作を整理したものが、図7の、本
発明の実施例2の構成の状態遷移図である。
A summary of the above operation is a state transition diagram of the configuration of the second embodiment of the present invention in FIG.

【0053】本実施例で、図5の符号化テーブルを搭載
でき、これは、(実施例1)のテーブル構成とまったく
同じである。
In this embodiment, the encoding table shown in FIG. 5 can be mounted, which is exactly the same as the table structure of (Embodiment 1).

【0054】本実施例の構成により、復号化のテーブル
と同一の符号テーブルにて符号化を行うことができた。
With the configuration of this embodiment, it was possible to perform encoding with the same code table as the decoding table.

【0055】(実施例3)本実施例は、特許請求の範囲
の請求項3に関する。
(Embodiment 3) This embodiment relates to claim 3 of the claims.

【0056】図4は、本実施例の構成を示すブロック図
である。
FIG. 4 is a block diagram showing the configuration of this embodiment.

【0057】(実施例1)および(実施例2)と同様
に、符号テーブルRAM(710)には、固定長データ
(711)と可変長符号(712)が同一アドレスに対
になり書き込まれている。さらに、可変長符号(71
2)に対応する符号長(713)も同一アドレスに対に
なり書き込まれている。
Similar to (Embodiment 1) and (Embodiment 2), fixed length data (711) and variable length code (712) are written in pairs at the same address in the code table RAM (710). There is. Furthermore, a variable length code (71
The code length (713) corresponding to 2) is also written in pairs at the same address.

【0058】図5は、(実施例1)および(実施例2)
と同様に本実施例で使用した符号テーブルRAMのデー
タ内容を示す図である。
FIG. 5 shows (Example 1) and (Example 2).
FIG. 7 is a diagram showing data contents of a code table RAM used in the present embodiment similarly to FIG.

【0059】まず、可変長符号の復号動作について説明
する。
First, the decoding operation of the variable length code will be described.

【0060】(720)マルチプレクサの出力を、(7
12)可変長符号に選択し、(721)マルチプレクサ
の出力を、(711)固定長データに選択すれば、回路
の構成は、(実施例1)と同様になり、復号動作が可能
となる。
(720) The output of the multiplexer is changed to (7
12) If the variable length code is selected and the output of the (721) multiplexer is selected as the (711) fixed length data, the circuit configuration becomes similar to that of the first embodiment, and the decoding operation becomes possible.

【0061】次に、可変長符号への符号化動作について
説明する。
Next, the encoding operation for the variable length code will be described.

【0062】(720)マルチプレクサの出力を、(7
11)固定長データに選択し、(721)マルチプレク
サの出力を、(712)可変長符号に選択すれば、回路
の構成は、(実施例2)と同様になり、符号化動作が可
能となる。
(720) The output of the multiplexer is changed to (7
11) If fixed length data is selected and the output of the (721) multiplexer is selected as (712) variable length code, the circuit configuration becomes similar to that of the second embodiment, and the encoding operation becomes possible. .

【0063】このように、本実施例では、復号化、符号
化とも、図5の符号化テーブルを共通に使用でき、ま
た、同一の回路で、復号化、符号化を行うことができ
た。
As described above, in this embodiment, the coding table shown in FIG. 5 can be commonly used for decoding and coding, and decoding and coding can be performed by the same circuit.

【0064】(実施例4)本実施例は、特許請求の範囲
の請求項4に関する。
(Embodiment 4) This embodiment relates to claim 4 of the claims.

【0065】図1は、本実施例の構成を示すブロック図
である。
FIG. 1 is a block diagram showing the configuration of this embodiment.

【0066】実施例3で使用した(710)符号テーブ
ルRAMと、(715)比較器、(720)マルチプレ
クサ、(721)マルチプレクサなどの周辺回路を4セ
ット設け、(715)比較器における符号化、復号化の
処理を4ワードずつ並列に行う。図8は、本実施例で使
用した符号テーブルRAMのデータ内容を示す図であ
る。図5の符号テーブルRAMのデータ内容を、4個の
テーブルに頭から振り分けていった形になっている。
The (710) code table RAM used in the third embodiment and four sets of peripheral circuits such as the (715) comparator, the (720) multiplexer, and the (721) multiplexer are provided, and the encoding in the (715) comparator is performed. The decoding process is performed in parallel every 4 words. FIG. 8 is a diagram showing the data contents of the code table RAM used in this embodiment. The data contents of the code table RAM of FIG. 5 are distributed from the head to four tables.

【0067】また、テーブルを4分割するので、テーブ
ルの総量は変わらない。
Further, since the table is divided into four, the total amount of the table does not change.

【0068】(460)レジスタの値に対して、(44
0)符号テーブルRAM0、(441)符号テーブルR
AM1、(442)符号テーブルRAM2および(44
3)符号テーブルRAM3の値を一度に評価する。
With respect to the value of the (460) register, (44
0) code table RAM0, (441) code table R
AM1, (442) code table RAM2 and (44)
3) Evaluate the values in the code table RAM3 at once.

【0069】(451)マルチプレクサ、(452)マ
ルチプレクサを(実施例3)と同様に切り替えることに
より、符号化/復号化に対応する。
Coding / decoding is supported by switching the (451) multiplexer and (452) multiplexer in the same manner as in the third embodiment.

【0070】(433)アドレスカウンタの値を増加さ
せていって、どれかひとつの(715)比較器がヒット
すると、だだちにアドレスカウンタを停止し、(46
1)セレクトコントロール回路により、(454)マル
チプレクサ、(455)マルチプレクサを制御して、正
しい符号化値/復号化値を(465)符号出力に、符号
長を(466)符号長出力へ出力する。
(433) When the value of the address counter is increased and one of the (715) comparators hits, the address counter is stopped, and (46)
1) The select control circuit controls the (454) multiplexer and the (455) multiplexer to output the correct encoded value / decoded value to the (465) code output and the code length to the (466) code length output.

【0071】このように本実施例では、(実施例1〜
3)で述べた符号化/復号化回路を4セット組み込み、
並列に動作させることにより、符号化/復号化の4倍の
高速化を実現することができた。
As described above, in this embodiment,
Incorporating 4 sets of encoding / decoding circuits described in 3),
By operating in parallel, it was possible to realize four times faster speed than encoding / decoding.

【0072】また、本発明の上記の構成をとれば、符号
化復号化回路を何セットでも組み込むことができ、セッ
ト数の分だけ高速化が可能である。
Further, with the above configuration of the present invention, any number of sets of encoding / decoding circuits can be incorporated, and the speed can be increased by the number of sets.

【0073】[0073]

【発明の効果】本発明の、特許請求の範囲の請求項1に
よれば、ひとつの符号を、ひとつのワードに納められる
ので、メモリの使用上の無駄を無くし、メモリの使用効
率を上げ、メモリの節約をすることができた。
According to claim 1 of the present invention, since one code can be stored in one word, waste of memory usage can be eliminated and memory usage efficiency can be improved. I was able to save memory.

【0074】また、固定長データを可変長符号に併記す
るので、符号の並び順はアドレスに依存せず、自由に配
置でき、符号をに発生頻度順に並べることができる。し
たがって、復号化の時に、テーブルの頭から評価してゆ
くので、発生頻度の大きい符号の順に評価してゆくこと
ができ、復号化時間を極めて合理的に短縮することがで
きた。
Further, since the fixed-length data is written together with the variable-length code, the code can be arranged freely without depending on the address, and the codes can be arranged in the order of occurrence frequency. Therefore, at the time of decoding, since the evaluation is performed from the head of the table, it is possible to evaluate in the order of the code having the highest occurrence frequency, and the decoding time can be shortened extremely reasonably.

【0075】本発明の、特許請求の範囲の請求項2の構
成によれば、復号化のテーブルと同一の符号テーブルに
て符号化を行うことができた。
According to the configuration of claim 2 of the present invention, the encoding can be performed by the same code table as the decoding table.

【0076】本発明の、特許請求の範囲の請求項3の構
成によれば、復号化のテーブルと同一の符号テーブルに
て符号化を行うことができ、また、同一の回路で、復号
化、符号化を行うことができた。
According to the configuration of claim 3 of the present invention, it is possible to perform encoding with the same code table as the decoding table, and to perform decoding with the same circuit, The encoding could be done.

【0077】本発明の、特許請求の範囲の請求項4の構
成によれば、符号化/復号化回路を4セット組み込み、
並列に動作させることにより、符号化/復号化の4倍の
高速化を実現することができた。また、本発明の上記の
構成をとれば、符号化復号化回路を何セットでも組み込
むことができ、セット数の分だけ高速化が可能である。
According to the structure of claim 4 of the present invention, four sets of encoding / decoding circuits are incorporated,
By operating in parallel, it was possible to realize four times faster speed than encoding / decoding. Further, with the above configuration of the present invention, any number of sets of encoding / decoding circuits can be incorporated, and the speed can be increased by the number of sets.

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

【図1】本発明の実施例4の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of a fourth embodiment of the present invention.

【図2】本発明の実施例1の構成を示すブロック図。FIG. 2 is a block diagram showing the configuration of the first embodiment of the present invention.

【図3】本発明の実施例2の構成を示すブロック図。FIG. 3 is a block diagram showing a configuration of a second embodiment of the present invention.

【図4】本発明の実施例3の構成を示すブロック図。FIG. 4 is a block diagram showing a configuration of a third embodiment of the present invention.

【図5】本発明の実施例1、実施例2および実施例3の
符号テーブルRAMのデータ内容を示す図。
FIG. 5 is a diagram showing data contents of a code table RAM according to the first, second and third embodiments of the present invention.

【図6】本発明の実施例1の構成の状態遷移図。FIG. 6 is a state transition diagram of the configuration of the first embodiment of the present invention.

【図7】本発明の実施例2の構成の状態遷移図。FIG. 7 is a state transition diagram of the configuration of the second embodiment of the present invention.

【図8】本発明の実施例4の符号テーブルRAMのデー
タ内容を示す図。
FIG. 8 is a diagram showing data contents of a code table RAM according to a fourth embodiment of the present invention.

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

60 待機/アドレスカウンタクリアステート 61 アドレス増加/比較ステート 62 レジスタ(516)(517)でラッチステ
ート 63 レジスタ(514)で値シフトステート 70 待機/アドレスカウンタクリアステート 71 アドレス増加/比較ステート 72 レジスタ(616)(617)でラッチステ
ート 73 データバッファへ値入力ステート 401 ダウンロード用データバス 402 ライトイネーブル 403 セット用アドレスバス 404 カウンタイネーブル 405 カウンタロード 406 カウンタクリア 407 符号化/復号化選択 408 符号入力 409 強制選択 410 データ無視 431 ライトコントロール 432 ライトイネーブル 433 アドレスカウンタ 434 アドレスバス 435 リードイネーブル 440 符号テーブルRAM0 441 符号テーブルRAM1 442 符号テーブルRAM2 443 符号テーブルRAM3 451 マルチプレクサ 452 マルチプレクサ 453 比較器 454 マルチプレクサ 455 マルチプレクサ 460 レジスタ 461 セレクトコントロール回路 465 符号出力 466 符号長出力 501 ダウンロード用データバス 502 ライトイネーブル 503 セット用アドレスバス 504 カウンタイネーブル 505 カウンタロード 506 カウンタクリア 507 符号入力 508 アドレスカウンタ 509 リードイネーブル 510 符号テーブルRAM 511 固定長データ 512 可変長符号 513 符号長 514 符号入力レジスタ 515 比較器 516 固定長データ出力レジスタ 517 符号長出力レジスタ 518 固定長データ出力 601 ダウンロード用データバス 602 ライトイネーブル 603 セット用アドレスバス 604 カウンタイネーブル 605 カウンタロード 606 カウンタクリア 607 符号入力 608 アドレスカウンタ 609 リードイネーブル 610 符号テーブルRAM 611 固定長データ 612 可変長符号 613 符号長 614 符号入力レジスタ 615 比較器 616 可変長符号出力レジスタ 617 符号長出力レジスタ 618 可変長符号出力 619 符号長出力 701 ダウンロード用データバス 702 ライトイネーブル 703 セット用アドレスバス 704 カウンタイネーブル 705 カウンタロード 706 カウンタクリア 707 符号入力 708 アドレスカウンタ 709 リードイネーブル 710 符号テーブルRAM 711 固定長データ 712 可変長符号 713 符号長 714 符号入力レジスタ 715 比較器 716 可変長符号出力レジスタ 717 符号長出力レジスタ 718 可変長符号出力 719 符号長出力 720 マルチプレクサ 721 マルチプレクサ
60 Wait / Address Counter Clear State 61 Address Increment / Compare State 62 Register (516) (517) Latch State 63 Register (514) Value Shift State 70 Standby / Address Counter Clear State 71 Address Increment / Compare State 72 Register (616 ) (617) Latch state 73 Value input state to data buffer 401 Data bus for download 402 Write enable 403 Address bus for set 404 Counter enable 405 Counter load 406 Counter clear 407 Encoding / decoding selection 408 Code input 409 Forced selection 410 Ignore data 431 Write control 432 Write enable 433 Address counter 434 Address bus 435 Read enable 440 Code test Bull RAM0 441 Code table RAM1 442 Code table RAM2 443 Code table RAM3 451 Multiplexer 452 Multiplexer 453 Comparator 454 Multiplexer 455 Multiplexer 460 Register 461 Select control circuit 465 Code output 466 Code length output 501 Download data bus 502 Write enable 503 Set address Bus 504 Counter enable 505 Counter load 506 Counter clear 507 Code input 508 Address counter 509 Read enable 510 Code table RAM 511 Fixed length data 512 Variable length code 513 Code length 514 Code input register 515 Comparator 516 Fixed length data output register 517 Code length Output register 518 fixed Data output 601 Download data bus 602 Write enable 603 Set address bus 604 Counter enable 605 Counter load 606 Counter clear 607 Code input 608 Address counter 609 Read enable 610 Code table RAM 611 Fixed length data 612 Variable length code 613 Code length 614 Code Input register 615 Comparator 616 Variable length code output register 617 Code length output register 618 Variable length code output 619 Code length output 701 Download data bus 702 Write enable 703 Set address bus 704 Counter enable 705 Counter load 706 Counter clear 707 Code input 708 address counter 709 read enable 710 code table RAM 11 fixed length data 712 variable-length code 713 code length 714 code input register 715 comparator 716 variable-length code output registers 717 code length output register 718 variable-length code output 719 code length output 720 multiplexer 721 multiplexer

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 入力可変長符号ビット列を、メモリテー
ブルを参照しながら、固定長符号ビット列に復号化する
可変長復号化装置において、復号化に対応する可変長符
号ビット列と固定長符号ビット列が、対になり配置され
ている復号化メモリテーブルと、さらに前記メモリテー
ブルの出力と、入力可変長符号ビット列を比較する比較
器を持ち、前記比較器において可変長符号ビット列が一
致した時の、メモリテーブルの固定長符号ビット列を復
号値として出力することを特徴とする符号化装置。
1. A variable-length decoding device for decoding an input variable-length code bit string into a fixed-length code bit string with reference to a memory table, wherein the variable-length code bit string and the fixed-length code bit string corresponding to decoding are: Decoding memory tables arranged in pairs, further having a comparator for comparing the output of the memory table and the input variable length code bit string, and the memory table when the variable length code bit strings match in the comparator A fixed-length coded bit string of is output as a decoded value.
【請求項2】 入力固定長符号ビット列を、メモリテー
ブルを参照しながら、可変長符号ビット列に符号化する
可変長符号化装置において、符号化に対応する固定長符
号ビット列と可変長符号ビット列が、対になり配置され
ている符号化メモリテーブルと、さらに前記メモリテー
ブルの出力と、入力固定長符号ビット列を比較する比較
器を持ち、前記比較器において固定長符号ビット列が一
致した時の、メモリテーブルの可変長符号ビット列を符
号化値として出力することを特徴とする符号化装置。
2. A variable-length coding device for coding an input fixed-length code bit string into a variable-length code bit string with reference to a memory table, wherein the fixed-length code bit string and the variable-length code bit string corresponding to coding are: A memory table having a pair of coded memory tables and a comparator for comparing the output of the memory table and the input fixed-length code bit string, and when the fixed-length code bit string matches in the comparator An encoding device which outputs the variable-length code bit string of 1 as an encoded value.
【請求項3】 前記請求項1および請求項2の符号化装
置において、メモリテーブルの固定長符号ビット列と可
変長符号ビット列を選択して比較器に入力する選択器を
持ち、選択器により、比較器に入力するメモリテーブル
の固定長符号ビット列と可変長符号ビット列を切り替え
可能としたことを特徴とする符号化装置。
3. The encoding device according to claim 1 or 2, further comprising a selector for selecting a fixed length code bit string and a variable length code bit string of a memory table and inputting them to a comparator. An encoding device capable of switching between a fixed-length code bit string and a variable-length code bit string of a memory table to be input to the device.
【請求項4】 前記請求項1、請求項2および請求項3
の符号化装置において、メモリテーブルと、比較器を複
数セット搭載することを特徴とする符号化装置。
4. The claim 1, claim 2 and claim 3.
The encoding device of claim 1, wherein a plurality of sets of memory tables and comparators are mounted.
JP28009092A 1992-10-19 1992-10-19 Encoder Pending JPH06131150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28009092A JPH06131150A (en) 1992-10-19 1992-10-19 Encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28009092A JPH06131150A (en) 1992-10-19 1992-10-19 Encoder

Publications (1)

Publication Number Publication Date
JPH06131150A true JPH06131150A (en) 1994-05-13

Family

ID=17620180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28009092A Pending JPH06131150A (en) 1992-10-19 1992-10-19 Encoder

Country Status (1)

Country Link
JP (1) JPH06131150A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7324022B2 (en) 2005-01-28 2008-01-29 Nec Corporation Data encoding apparatus, data decoding apparatus and data encoding/decoding system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7324022B2 (en) 2005-01-28 2008-01-29 Nec Corporation Data encoding apparatus, data decoding apparatus and data encoding/decoding system

Similar Documents

Publication Publication Date Title
US20050198471A1 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
JP2007508653A (en) High-speed table lookup memory and low power consumption mechanism
KR940006020A (en) Decoding apparatus for signals encoded with variable length code
US20080320271A1 (en) Hashing and Serial Decoding Techniques
US6332152B1 (en) Arithmetic unit and data processing unit
US5651123A (en) Program execution control device having addressability in accordance with M series pseudo-random number sequence
US4591829A (en) Run length code decoder
JPH0479421A (en) Variable length encoder and decoder
US4800535A (en) Interleaved memory addressing system and method using a parity signal
JPH06131150A (en) Encoder
JPS59112334A (en) Sequence generator
JP3792633B2 (en) Microcontroller and microcontroller device
JPH11163736A (en) Processor
JPH0918352A (en) Parallel input / series output device and parallel input / series output methods
JPH06164417A (en) Encoding device
KR940000221B1 (en) Ladder command processor apparatus
JPH10116226A (en) Address array device of semiconductor storage device
JPH0588848A (en) Device for rearranging data
JPH06140939A (en) Coder
JP2764024B2 (en) Storage device table indexing method and indexing device
JPH0437316A (en) Variable length coding/decoding device
KR950003884B1 (en) Personal computer bus interface circuit
JP3087488B2 (en) Data restoration circuit
JPH0644039A (en) Variable-length code decoding device
KR101175680B1 (en) Driving method of bitstream processor