JPH06188743A - Variable length code generating device - Google Patents

Variable length code generating device

Info

Publication number
JPH06188743A
JPH06188743A JP33917092A JP33917092A JPH06188743A JP H06188743 A JPH06188743 A JP H06188743A JP 33917092 A JP33917092 A JP 33917092A JP 33917092 A JP33917092 A JP 33917092A JP H06188743 A JPH06188743 A JP H06188743A
Authority
JP
Japan
Prior art keywords
code
array
shift register
ram
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
Application number
JP33917092A
Other languages
Japanese (ja)
Other versions
JP3078138B2 (en
Inventor
Eiji Komoto
英治 湖本
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP33917092A priority Critical patent/JP3078138B2/en
Publication of JPH06188743A publication Critical patent/JPH06188743A/en
Application granted granted Critical
Publication of JP3078138B2 publication Critical patent/JP3078138B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To increase the processing speed of variable length code generation processing. CONSTITUTION:One-stage algorithm is generated by optimizing algorithm so as to obtain conventional two-stage generation algorithm by hardware, and the variable length code generating device is constituted based on the optimized one-stage algorithm. A control part 1 reads an array L(n) out of a code length RAM 2 and indicates shifting or loading to a shift register 6. The shift register 6 holds a code being generated and makes a left one-bit shift at need. An incrementor 7 adds 1 to the code being and stores the result in the shift register 6. The control part 1 reads an array V(i) out of a code value RAM 3 and sends it in the form of an address to a code RAM 4. The code RAM 4 stores the code outputted from the shift register 6 and code size outputted from the control part 1 according to an address from the code value RAM 3.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像データ圧縮等に用
いられる可変長コード(符号)を生成する可変長コード
生成装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a variable length code generator for generating a variable length code (code) used for image data compression or the like.

【0002】[0002]

【従来の技術】従来、このような分野の技術としては、
例えば次のような文献に記載されるものがあった。 文献1;INTERNATIONAL STANDARD DIS 10918−1
(1991)CCITT RECOMMENDATION T.81 文献2;インターフェース(1991−12)CQ出
版、P.160−182図2は従来の配列L(n),V
(i)の構成例を示す図、及び図3はその配列L
(n),V(i)から生成されるコード配列の例を示す
図である。 従来の可変長コード生成装置は、例えば、データを格納
するシステムメモリと、それを制御する中央処理装置
(以下、CPUという)とで構成されている。この可変
長コード生成装置では、予め与えられた図2の配列L
(n),V(i)から、前記文献1に記載された2段式
の生成アルゴリズムに基づくソフトウェアで、図3に示
すような可変長コードCC及びコードサイズ(コード
長)CSといったコード配列を生成していた。
2. Description of the Related Art Conventionally, as a technique in such a field,
For example, some documents were described in the following documents. Reference 1; INTERNATIONAL STANDARD DIS 10918-1
(1991) CCITT RECOMMENDATION T. 81 Reference 2; Interface (1991-12) CQ Publishing, p. 160-182 FIG. 2 shows a conventional array L (n), V
The figure which shows the structural example of (i), and FIG.
It is a figure which shows the example of the code sequence produced | generated from (n) and V (i). A conventional variable length code generation device is composed of, for example, a system memory that stores data and a central processing unit (hereinafter, referred to as CPU) that controls the system memory. In this variable length code generation device, the array L of FIG.
From (n) and V (i), software based on the two-stage generation algorithm described in Document 1 is used to generate code sequences such as a variable length code CC and a code size (code length) CS as shown in FIG. Was being generated.

【0003】前記文献2に記載されているように、図2
のL(n)は何ビットのコードを幾つ持つかという情報
を示す16個の値群、V(i)はコード長の短いものか
ら順に、どの数値を表すコードであるかの情報を示す値
群である。また、図3のコードサイズCSは、可変長コ
ードCCの有効ビット数を表す情報を示すものである。
As described in the above-mentioned reference 2, FIG.
L (n) of 16 is a group of 16 values indicating information of how many bits of code, and V (i) is a value indicating information of which numerical value represents a code in ascending order of code length. It is a group. Further, the code size CS of FIG. 3 indicates information indicating the number of effective bits of the variable length code CC.

【0004】前記文献1に記載された2段式の生成アル
ゴリズムでは、図2の配列L(n)に従って、順序よ
く、可変長コードCCを生成していき、その可変長コー
ドCCとコードサイズCSをそれぞれHUFFSIZE(k)とHU
FFCODE(k)というバッファに一時格納する。その後、改
めて、図2の配列V(i)の指し示すアドレスに従っ
て、最終的なコードバッファに格納するようになってい
る。
In the two-stage generation algorithm described in Document 1, variable length codes CC are generated in order according to the array L (n) of FIG. 2, and the variable length codes CC and code size CS are obtained. HUFFSIZE (k) and HU respectively
It is temporarily stored in a buffer called FFCODE (k). After that, the data is finally stored in the final code buffer according to the address indicated by the array V (i) in FIG.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
可変長コード生成装置では、次のような問題があった。
従来の可変長コード生成装置では、2段式の生成アルゴ
リズムに基づくソフトウェアで可変長コードを生成して
いる。このようにソフトウェアで処理すると、CPUの
性能、システムメモリの介在、及びプログラミング手法
等、様々な要素によってその処理時間が異なり、一般的
には処理時間が長くかかるのが常であった。本発明は、
前記従来技術が持っていた課題として、処理時間が長い
(遅い)という点について解決するため、従来の2段式
の生成アルゴリズムをハードウェアで実現すべく、アル
ゴリズムの最適化(1段のアルゴリズム)を行い、この
最適化されたアルゴリズムに基づいてハードウェアを構
成し、処理時間の短い性能の優れた可変長コード生成装
置を提供するものである。
However, the conventional variable length code generation device has the following problems.
In the conventional variable length code generation device, the variable length code is generated by software based on a two-stage generation algorithm. When the processing is performed by software as described above, the processing time varies depending on various factors such as the performance of the CPU, the interposition of the system memory, and the programming method, and generally the processing time is usually long. The present invention is
In order to solve the problem that the conventional technique has a long (slow) processing time, the algorithm is optimized to realize the conventional two-stage generation algorithm by hardware (one-stage algorithm). The hardware is configured based on this optimized algorithm to provide a variable-length code generation device with a short processing time and excellent performance.

【0006】[0006]

【課題を解決するための手段】本発明は、前記課題を解
決するために、何ビットのコードを何種類持つかという
情報を示す配列L(n)と、コード長の短い順にそのコ
ードがどの数値に対応するのかの情報を示す配列V
(i)とに基づき、画像データ圧縮等で用いる可変長コ
ードを生成する可変長コード生成装置において、次のよ
うな回路を備えている。即ち、本発明の可変長コード生
成装置では、前記配列L(n)を記憶する第1の記憶回
路と、前記配列V(i)を記憶する第2の記憶回路と、
コード生成途中のコードを保持し、また必要に応じて左
へ1ビットシフトを実行するようなシフトレジスタと、
前記コード生成途中のコードに1を加算する加算回路
と、生成されていくコードとその有効ビット数とを順次
記憶していく第3の記憶回路と、前記第1、第2、第3
の記憶回路及びシフトレジスタを制御する制御部とを、
備えている。
According to the present invention, in order to solve the above-mentioned problems, an array L (n) indicating information of how many kinds of codes of which bits are provided and which code is selected in the order of shorter code length. Array V that indicates the information that corresponds to the numerical value
Based on (i), a variable length code generation device for generating a variable length code used for image data compression or the like is provided with the following circuit. That is, in the variable-length code generation device of the present invention, a first memory circuit that stores the array L (n) and a second memory circuit that stores the array V (i),
A shift register that holds the code that is in the process of code generation and that performs 1-bit shift to the left when necessary,
An adding circuit for adding 1 to the code in the middle of code generation, a third memory circuit for sequentially storing the generated code and the number of effective bits thereof, the first, second and third codes
And a control unit for controlling the memory circuit and the shift register of
I have it.

【0007】[0007]

【作用】本発明によれば、以上のように可変長コード生
成装置を構成したので、制御部の制御に基づき、第1の
記憶回路から配列L(n)が読み出され、その配列L
(n)に基づきシフトレジスタがコード生成途中のコー
ドを保持し、また必要に応じて左へ1ビットシフトを行
う。シフトレジスタに保持されたコード生成途中のコー
ドは加算回路で1を加算されて該シフトレジスタに保持
される。シフトレジスタに保持されたコードとその有効
ビット数とは、第2の記憶回路から読み出された配列L
(n)をアドレスとして、順次第3の記憶回路に記憶さ
れていく。そのため、アドレスによって第3の記憶回路
から可変長コードの読み出しが行える。従って、前記課
題を解決できるのである。
According to the present invention, since the variable length code generation device is configured as described above, the array L (n) is read from the first memory circuit under the control of the control unit and the array L
Based on (n), the shift register holds the code in the middle of code generation, and shifts to the left by 1 bit if necessary. The code in the middle of code generation held in the shift register is incremented by 1 in the adder circuit and held in the shift register. The code held in the shift register and the number of effective bits are the array L read from the second memory circuit.
The data is sequentially stored in the third memory circuit using (n) as an address. Therefore, the variable length code can be read from the third memory circuit by the address. Therefore, the above problem can be solved.

【0008】[0008]

【実施例】図1は本発明の実施例を示す可変長コード生
成装置の構成ブロック図、及び図4は本実施例で用いら
れる1段のアルゴリズムのフローチャートである。本実
施例では、従来の2段式の生成アルゴリズムをハードウ
ェアで実現すべく、その2段式の生成アルゴリズムをモ
ディファイして最適化を行い、図4のような1段のアル
ゴリズムを作成し、可変長コード生成装置をハードウェ
ア化する場合に、より簡素な構成になるような工夫を施
したものである。従って、図1の可変長コード生成装置
の構成を説明する前に、まず、図4に示す1段のアルゴ
リズムについて説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing the configuration of a variable-length code generator showing an embodiment of the present invention, and FIG. 4 is a flow chart of a one-stage algorithm used in this embodiment. In the present embodiment, in order to realize the conventional two-stage generation algorithm by hardware, the two-stage generation algorithm is modified and optimized to create a one-stage algorithm as shown in FIG. When the variable-length code generation device is implemented as hardware, it is devised so as to have a simpler configuration. Therefore, before describing the configuration of the variable-length code generation device of FIG. 1, first, the one-stage algorithm shown in FIG. 4 will be described.

【0009】図4に示す1段のアルゴリズムでは、ステ
ップS1において、図2の配列L(n)の数値n、配列
V(i)の数値i、及びコードcodeを0に初期化
し、さらにステップS2において、カウンタのカウント
値mを0に初期化する。そして、ステップS3におい
て、カウント値mが配列L(n)よりも小さいか否かを
判定し、小さいときには、ステップS4へ進む。ステッ
プS4では、配列V(i)の値によって可変長コードC
C(V(i))=codeを設定し、そのコードcode
に1を加算し、さらに配列V(i)の値によってコード
サイズCS(V(i))=n+1を設定する。そして、配
列V(i)の数値iを1加算すると共に、カウント値m
を1加算し、ステップS3へ戻り、カウント値mが配列
L(n)以上になるまで繰り返す。ステップS3で、カ
ウント値mが配列L(n)以上になると、ステップS5
へ進み、配列L(n)の数値nを1加算する。ステップ
S6で、数値nが配列L(n)の最大個数16よりも小
さいか否かを判定し、小さいときにはステップS2へ戻
り、前記の動作を繰り返す。数値nが配列L(n)の最
大個数16以上になると、可変長コード生成処理を終了
する。
In the one-stage algorithm shown in FIG. 4, the numerical value n of the array L (n), the numerical value i of the array V (i), and the code code of FIG. 2 are initialized to 0 in step S1, and further step S2 is performed. In, the count value m of the counter is initialized to 0. Then, in step S3, it is determined whether or not the count value m is smaller than the array L (n), and when it is smaller, the process proceeds to step S4. In step S4, the variable length code C is changed according to the value of the array V (i).
C (V (i)) = code is set, and its code code
Is incremented by 1, and the code size CS (V (i)) = n + 1 is set according to the value of the array V (i). Then, the value i of the array V (i) is incremented by 1, and the count value m
Is incremented by 1, and the process returns to step S3 and is repeated until the count value m becomes equal to or larger than the array L (n). When the count value m becomes equal to or larger than the array L (n) in step S3, step S5
Then, the process proceeds to and the numerical value n of the array L (n) is incremented by 1. In step S6, it is determined whether or not the numerical value n is smaller than the maximum number 16 of the array L (n). When the numerical value n reaches 16 or more, which is the maximum number of the array L (n), the variable length code generation process is terminated.

【0010】次に、図4に示す1段のアルゴリズムに基
づいて構成された図1の可変長コード生成装置について
説明する。図1の可変長コード生成装置は、図4の1段
のアルゴリズムを実行するために装置全体を制御する制
御部1を備えている。この制御部1は、内部カウンタ1
aによってカウント動作等を行う機能を有し、リセット
信号RTを入力するリセット端子R、データ入力端子B
Q、アドレス出力端子AA,BA、書き込み許可出力端
子CWE、コード長出力端子CWD、及びシフト/ロー
ド出力端子SLを有している。制御部1のアドレス出力
端子BAには、第1の記憶回路(例えば、ランダム・ア
クセス・メモリ(以下、RAMという)で構成されたコ
ード長RAM)2のアドレス入力端子Aが接続され、さ
らに該制御部1のアドレス出力端子AAに、第2の記憶
回路(例えば、コード値RAM)3のアドレス入力端子
Aが接続されている。コード長RAM2は、図2の配列
L(n)を記憶する回路であり、そのデータ出力端子Q
が制御部1のデータ入力端子BQに接続されている。コ
ード値RAM3は、図2の配列V(i)を記憶する回路
であり、そのデータ出力端子Qが、信号選択用のマルチ
プレクサ5を介して第3の記憶回路(例えば、コードR
AM)4のアドレス入力端子Aに接続されている。
Next, the variable length code generator of FIG. 1 constructed based on the one-stage algorithm shown in FIG. 4 will be described. The variable-length code generation device of FIG. 1 includes a control unit 1 that controls the entire device to execute the one-stage algorithm of FIG. The control unit 1 includes an internal counter 1
a reset terminal R for inputting a reset signal RT and a data input terminal B having a function of performing a count operation etc. by a
It has a Q, an address output terminal AA, BA, a write enable output terminal CWE, a code length output terminal CWD, and a shift / load output terminal SL. The address output terminal BA of the control unit 1 is connected to the address input terminal A of a first storage circuit (for example, a code length RAM constituted by a random access memory (hereinafter referred to as RAM)) 2 and further, The address input terminal A of the second storage circuit (for example, code value RAM) 3 is connected to the address output terminal AA of the controller 1. The code length RAM 2 is a circuit for storing the array L (n) of FIG. 2, and its data output terminal Q
Are connected to the data input terminal BQ of the control unit 1. The code value RAM 3 is a circuit for storing the array V (i) of FIG. 2, and its data output terminal Q has a third storage circuit (for example, code R) via the multiplexer 5 for signal selection.
AM) 4 address input terminal A.

【0011】マルチプレクサ5は、コード値RAM3の
データ出力端子Qの出力と、外部から与えられる図3の
アドレスADとの、いずれか一方を選択してコードRA
M4のアドレス入力端子Aへ入力する回路である。コー
ドRAM4は、図3の可変長コードCC及びコードサイ
ズCSを記憶する回路であり、アドレス入力端子A、コ
ード入力端子D、ライトイネーブル入力端子WE- 、及
びデータ出力端子Qを有している。このコードRAM4
のアドレス入力端子Aは、マルチプレクサ5の出力端子
に接続され、ライトイネーブル入力端子WE- は制御部
1の書き込み許可出力端子CWEに接続され、さらにコ
ード入力端子Dが、該制御部1のコード長出力端子CW
Dに接続されると共に、シフトレジスタ6のデータ出力
端子Qに接続されている。シフトレジスタ6は、コード
生成途中のコードcodeを保持し、また必要に応じて
それを左へ1ビットシフトする回路であり、リセット信
号RTが入力されるリセット端子R、制御部1のシフト
/ロード出力端子SLに接続されたシフト/ロード入力
端子SL- 、クロックCKが入力されるクロック入力端
子C、コードRAM4のコード入力端子Dに接続された
データ出力端子Q、及びデータ入力端子Dを有してい
る。インクリメンタ7は、シフトレジスタ6のデータ出
力端子Qから出力されるデータに1を加算して該シフト
レジスタ6のデータ入力端子Dに入力する回路であり、
該シフトレジスタ6のデータ出力端子Qに接続されたデ
ータ入力端子D、及び該シフトレジスタ6のデータ入力
端子Dに接続されたデータ出力端子Qを有している。以
上のように構成される図1の可変長コード生成装置の動
作(1)〜(4)を図4のアルゴリズムを参照しつつ説
明する。
The multiplexer 5 selects either the output of the data output terminal Q of the code value RAM 3 or the address AD of FIG. 3 given from the outside to select the code RA.
This is a circuit for inputting to the address input terminal A of M4. The code RAM 4 is a circuit for storing the variable length code CC and the code size CS of FIG. 3, and has an address input terminal A, a code input terminal D, a write enable input terminal WE , and a data output terminal Q. This code RAM4
Address input terminal A is connected to the output terminal of the multiplexer 5, the write enable input terminal WE is connected to the write enable output terminal CWE of the controller 1, and the code input terminal D is connected to the code length of the controller 1. Output terminal CW
It is also connected to D and the data output terminal Q of the shift register 6. The shift register 6 is a circuit that holds a code code in the middle of code generation and shifts it by 1 bit to the left as needed. The shift register 6 is a reset terminal R to which a reset signal RT is input, and shift / load of the control unit 1. output terminal SL connected to shift / load input terminal SL -, a clock input terminal clock CK is input C, the code input terminal D connected to the data output terminal Q of the code RAM 4, and the data input terminal D ing. The incrementer 7 is a circuit that adds 1 to the data output from the data output terminal Q of the shift register 6 and inputs the data to the data input terminal D of the shift register 6,
It has a data input terminal D connected to the data output terminal Q of the shift register 6 and a data output terminal Q connected to the data input terminal D of the shift register 6. The operations (1) to (4) of the variable length code generation device of FIG. 1 configured as above will be described with reference to the algorithm of FIG.

【0012】(1) 処理1 図1のコード長RAM2には図2に示す配列L(n)に
属する数値nが記憶されており、さらにコード値RAM
3には配列V(i)に属する数値iが記憶されている。
そこで、制御部1及びシフトレジスタ6の各リセット端
子Rに入力されるリセット信号RTをアクティブにして
それらをリセットすると、図4のステップS1,S2に
示すように、配列L(n)の数値n、配列V(i)の数
値i、コードcode、及び内部カウンタ1aのカウン
ト値mがそれぞれ0に初期化される。その後、リセット
信号RTがノンアクティブに変化した後から、コード生
成の動作が開始される。
(1) Process 1 The code length RAM 2 of FIG. 1 stores the numerical value n belonging to the array L (n) shown in FIG.
Numerical value i belonging to array V (i) is stored in 3.
Therefore, when the reset signal RT input to each reset terminal R of the control unit 1 and the shift register 6 is activated and reset, the numerical values n of the array L (n) are set as shown in steps S1 and S2 of FIG. , The numerical value i of the array V (i), the code code, and the count value m of the internal counter 1a are initialized to 0, respectively. After that, the code generation operation is started after the reset signal RT changes to non-active.

【0013】(2) 処理2 制御部1のアドレス出力端子BAからアドレスが出力さ
れ、コード長RAM2のアドレス入力端子Aへ入力され
る。すると、コード長RAM2から入力アドレスに対す
る記憶データが出力され、制御部1のデータ入力端子B
Qに入力される。リセット直後は、制御部1から出力さ
れるアドレスは0であり、その後順次、1ずつ増加して
いく。制御部1から出力されるアドレスが、図4のステ
ップS6において、コード長RAM2の持つ最大アドレ
スを越えてしまっているときは、可変長コードの生成処
理を終了する。
(2) Process 2 An address is output from the address output terminal BA of the control unit 1 and input to the address input terminal A of the code length RAM 2. Then, the stored data corresponding to the input address is output from the code length RAM 2 and the data input terminal B of the control unit 1 is output.
Input to Q. Immediately after the reset, the address output from the control unit 1 is 0, and then the address is sequentially incremented by 1. If the address output from the control unit 1 exceeds the maximum address held by the code length RAM 2 in step S6 of FIG. 4, the variable length code generation processing ends.

【0014】(3) 処理3 制御部1は、コード長RAM2のデータ出力端子Qから
のデータをデータ入力端子BQで受け取り、内部カウン
タ1aにロードする。制御部1では、コード長RAM2
から受け取ったデータが0であれば、シフト/ロード出
力端子SLから、シフトレジスタ6のシフト/ロード入
力端子SL- を介して該シフトレジスタ6に、シフトを
指示する。シフトレジスタ6は、保持している数値を左
へ1ビットシフトし、その値を保持する。また、このと
き処理2へ移る。
(3) Process 3 The control unit 1 receives the data from the data output terminal Q of the code length RAM 2 at the data input terminal BQ and loads it into the internal counter 1a. In the control unit 1, the code length RAM 2
If the data is 0 received from the shift / load output terminal SL, of the shift register 6 shifts / load input terminal SL - in the shift register 6 via a instructs the shift. The shift register 6 shifts the held numerical value to the left by 1 bit and holds the value. Further, at this time, the process 2 is performed.

【0015】(4) 処理4 制御部1は、コード長RAM2からのデータを受け取
り、それを内部カウンタ1aにロードした数値の回数だ
け、図4のステップS3,S4に従い、次のような処理
(a)〜(d)を実行する。 (a) 制御部1はコード値RAM3を順序よく読み出
すために、アドレス出力端子AAからアドレスを出力
し、該コード値RAM3のアドレス入力端子Aへ送る。
コード値RAM3は、入力されたアドレスに対応するデ
ータを、コードRAM4のアドレスとしてデータ出力端
子Qから出力する。データ出力端子Qから出力されたデ
ータは、マルチプレクサ5を介してコードRAM4のア
ドレス入力端子Aへ送られる。 (b) 制御部1は、書き込み許可出力端子CWEから
書き込み許可信号を出力し、それをコードRAM4のラ
イトイネーブル入力端子WE- へ送り、該コードRAM
4を書き込み可能なアクティブ状態にする。 (c) コードRAM4は、前記(a)の動作によって
コード値RAM3から出力されたアドレスの示す番地
に、シフトレジスタ6のデータ出力端子Qから出力され
たコードcodeと、制御部1のコード長出力端子CW
Dから出力されたコード長CSとを、コード入力端子D
を介して書き込む。 (d) 制御部1は、シフト/ロード出力端子SLから
出力し、シフトレジスタ6のシフト/ロード入力端子S
- を介してロードを指示する。シフトレジスタ6のデ
ータ出力端子Qから出力されるコードcodeは、イン
クリメンタ7で1が加算され、該インクリメンタ7のデ
ータ出力端子Qから出力された加算結果が、再びシフト
レジスタ6のデータ入力端子Dを介して該シフトレジス
タ6にロードされる。
(4) Process 4 The control unit 1 receives the data from the code length RAM 2 and executes the following process according to steps S3 and S4 of FIG. Execute a) to (d). (A) The control unit 1 outputs an address from the address output terminal AA and sends it to the address input terminal A of the code value RAM 3 in order to read the code value RAM 3 in order.
The code value RAM 3 outputs the data corresponding to the input address from the data output terminal Q as the address of the code RAM 4. The data output from the data output terminal Q is sent to the address input terminal A of the code RAM 4 via the multiplexer 5. (B) The control unit 1 outputs a write enable signal from the write enable output terminal CWE and sends it to the write enable input terminal WE of the code RAM 4 to send it to the code RAM.
4 is set to the writable active state. (C) The code RAM 4 outputs the code code output from the data output terminal Q of the shift register 6 and the code length output of the control unit 1 at the address indicated by the address output from the code value RAM 3 by the operation (a). Terminal CW
The code length CS output from D and the code input terminal D
Write through. (D) The control unit 1 outputs from the shift / load output terminal SL, and shift / load input terminal S of the shift register 6
L - indicates the load through. The code code output from the data output terminal Q of the shift register 6 is incremented by 1 in the incrementer 7, and the addition result output from the data output terminal Q of the incrementer 7 is again input to the data input terminal of the shift register 6. It is loaded into the shift register 6 via D.

【0016】以上の(a)〜(d)の動作を制御部1の
内部カウンタ1aの回数(m)だけ繰り返したら、図4
のステップS5へ進む。制御部1は、シフト/ロード出
力端子SLから出力し、シフトレジスタ6のシフト/ロ
ード入力端子SL- を介して該シフトレジスタ6に対し
てシフトを指示する。シフトレジスタ6は、保持してい
る数値を左へ1ビットシフトし、その値を保持する。そ
して、図4のステップS6からS2へ、つまり処理2へ
戻る。以上のように、本実施例では、図4のようにアル
ゴリズムの最適化を行い、この最適化されたアルゴリズ
ムに基づいて可変長コード生成装置を構成したので、可
変長コードの生成処理時間が短くなり、性能の優れた装
置を提供できる。なお、本発明は、上記実施例に限定さ
れず、例えば、コード長RAM2、コード値RAM3、
及びコードRAM4を他の記憶回路で構成したり、ある
いは図4のアルゴリズムを他の処理手順に変更する等、
種々の変形が可能である。
When the above-mentioned operations (a) to (d) are repeated for the number of times (m) of the internal counter 1a of the control unit 1, FIG.
To step S5. The control unit 1 outputs from the shift / load output terminal SL and instructs the shift register 6 to shift via the shift / load input terminal SL of the shift register 6. The shift register 6 shifts the held numerical value to the left by 1 bit and holds the value. Then, the process returns from step S6 of FIG. 4 to S2, that is, the process 2. As described above, in the present embodiment, the algorithm is optimized as shown in FIG. 4 and the variable length code generation device is configured based on this optimized algorithm, so that the variable length code generation processing time is short. Therefore, a device with excellent performance can be provided. The present invention is not limited to the above-mentioned embodiment, and for example, the code length RAM2, the code value RAM3,
And configuring the code RAM 4 with another storage circuit, or changing the algorithm of FIG. 4 to another processing procedure, etc.
Various modifications are possible.

【0017】[0017]

【発明の効果】以上詳細に説明したように、本発明によ
れば、アルゴリズムの最適化を行い、この最適化された
アルゴリズムに基づいて可変長コード生成装置を構成し
のたので、従来のような2段式の生成アルゴリズムに基
づくソフトウェアによる可変長コード生成処理に比べ、
処理速度を速くでき、可変長コード生成装置の性能を向
上できる。
As described above in detail, according to the present invention, the algorithm is optimized, and the variable length code generation device is constructed based on this optimized algorithm. Compared to the variable length code generation processing by software based on a simple two-stage generation algorithm,
The processing speed can be increased and the performance of the variable length code generation device can be improved.

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

【図1】本発明の実施例を示す可変長コード生成装置の
構成ブロック図である。
FIG. 1 is a configuration block diagram of a variable length code generation device according to an embodiment of the present invention.

【図2】配列L(n),V(i)の構成例を示す図であ
る。
FIG. 2 is a diagram showing a configuration example of arrays L (n) and V (i).

【図3】図2から生成されるコード配列の例を示す図で
ある。
FIG. 3 is a diagram showing an example of a code array generated from FIG.

【図4】本発明の実施例を示す1段のアルゴリズムのフ
ローチャートである。
FIG. 4 is a flow chart of a one-stage algorithm showing an embodiment of the present invention.

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

1 制御部 1a 内部カウンタ 2 コード長RAM 3 コード値RAM 4 コードRAM 5 マルチプレクサ 6 シフトレジスタ 7 インクリメンタ 1 Control Unit 1a Internal Counter 2 Code Length RAM 3 Code Value RAM 4 Code RAM 5 Multiplexer 6 Shift Register 7 Incrementer

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 何ビットのコードを何種類持つかという
情報を示す配列L(n)と、コード長の短い順にそのコ
ードがどの数値に対応するのかの情報を示す配列V
(i)とに基づき、可変長コードを生成する可変長コー
ド生成装置において、 前記配列L(n)を記憶する第1の記憶回路と、 前記配列V(i)を記憶する第2の記憶回路と、 コード生成途中のコードを保持し、また必要に応じて左
へ1ビットシフトを実行するようなシフトレジスタと、 前記コード生成途中のコードに1を加算する加算回路
と、 生成されていくコードとその有効ビット数とを順次記憶
していく第3の記憶回路と、 前記第1、第2、第3の記憶回路及びシフトレジスタを
制御する制御部とを、 備えたことを特徴とする可変長コード生成装置。
1. An array L (n) showing information on how many kinds of bit codes there are, and an array V showing information on which numerical value the code corresponds to in order of increasing code length.
A variable-length code generation device that generates a variable-length code based on (i), a first storage circuit that stores the array L (n), and a second storage circuit that stores the array V (i). And a shift register that holds the code that is in the middle of code generation and that shifts one bit to the left as needed, an adder circuit that adds 1 to the code that is in the middle of code generation, and a code that is being generated And a number of effective bits thereof are sequentially stored, and a third storage circuit, and a control unit for controlling the first, second and third storage circuits and the shift register are provided. Long code generator.
JP33917092A 1992-12-18 1992-12-18 Variable length code generator Expired - Fee Related JP3078138B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33917092A JP3078138B2 (en) 1992-12-18 1992-12-18 Variable length code generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33917092A JP3078138B2 (en) 1992-12-18 1992-12-18 Variable length code generator

Publications (2)

Publication Number Publication Date
JPH06188743A true JPH06188743A (en) 1994-07-08
JP3078138B2 JP3078138B2 (en) 2000-08-21

Family

ID=18324906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33917092A Expired - Fee Related JP3078138B2 (en) 1992-12-18 1992-12-18 Variable length code generator

Country Status (1)

Country Link
JP (1) JP3078138B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100968808B1 (en) * 2007-11-30 2010-07-08 한국전자통신연구원 Variable length code decoding system and decoding method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100968808B1 (en) * 2007-11-30 2010-07-08 한국전자통신연구원 Variable length code decoding system and decoding method thereof

Also Published As

Publication number Publication date
JP3078138B2 (en) 2000-08-21

Similar Documents

Publication Publication Date Title
US5563592A (en) Programmable logic device having a compressed configuration file and associated decompression
JP3262602B2 (en) Dictionary-based data compression / decompression system
US4875173A (en) Image enlarging method and device
US6332152B1 (en) Arithmetic unit and data processing unit
EP0113032A2 (en) An apparatus for performing hashing operations using galois field multiplication
JP3166447B2 (en) Image processing apparatus and image processing method
JP2752634B2 (en) Sorting device
JP3032340B2 (en) Address generator for processor data memory
JPH06188743A (en) Variable length code generating device
JP3983451B2 (en) Digital signal sampling frequency converter
US7783691B2 (en) Sharing of a logic operator having a work register
US6433716B2 (en) Data conversion device having mediator for determining data conversion order
US10725789B2 (en) Data generation device for parallel processing
US20070070439A1 (en) Image processing apparatus
US5945657A (en) Constant divider
US4326251A (en) Monitoring system for a digital data processor
US6133860A (en) Variable length decoder with enhanced routing of data to multiplexers
EP0189524A2 (en) Memory unit having arithmetic and logic functions, in particular for graphic processing
JP2638270B2 (en) Binary image coding circuit
EP0513851A2 (en) Memory device having arithmetic and logic functions, in particular for graphic processing
JP3293382B2 (en) Data compression device and data decompression device
US20030039393A1 (en) Image processing apparatus and its method
JP2506018B2 (en) Digital pattern generator
JPH0588848A (en) Device for rearranging data
JPH09172540A (en) Image processor

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: 20000606

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

Free format text: PAYMENT UNTIL: 20080616

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 9

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 9

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees