JP3136573B2 - Decoding device and processing device for variable length code - Google Patents

Decoding device and processing device for variable length code

Info

Publication number
JP3136573B2
JP3136573B2 JP15068792A JP15068792A JP3136573B2 JP 3136573 B2 JP3136573 B2 JP 3136573B2 JP 15068792 A JP15068792 A JP 15068792A JP 15068792 A JP15068792 A JP 15068792A JP 3136573 B2 JP3136573 B2 JP 3136573B2
Authority
JP
Japan
Prior art keywords
length
code data
data
code
shift register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP15068792A
Other languages
Japanese (ja)
Other versions
JPH05327516A (en
Inventor
徳明 土屋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP15068792A priority Critical patent/JP3136573B2/en
Publication of JPH05327516A publication Critical patent/JPH05327516A/en
Application granted granted Critical
Publication of JP3136573B2 publication Critical patent/JP3136573B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、圧縮され可変のビット
幅を持った画像データを高速で復号する装置、及び可変
長の符号語を伝送ビット数にすき間なくアライメントす
る装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for decoding compressed image data having a variable bit width at a high speed, and an apparatus for aligning variable-length codewords with the number of transmission bits without gaps.

【0002】[0002]

【従来の技術とその問題点】従来の技術においては、可
変長符号データの復号は、コードメモリもしくは、受信
線よりシリアルにシフトレジスタへロードし、パラレル
変換後復号を行なっている。この復号を高速化するた
め、特開昭62−135015号公報に開示される装置
は、復号を行っている符号データ長をメモリから読み、
シフトレジスタを符号長に等しい回数シフトを行い、符
号の解読の簡単化及び高速化を図っている。
2. Description of the Related Art In the prior art, decoding of variable-length code data is performed by loading serial data from a code memory or a reception line into a shift register, and performing decoding after parallel conversion. In order to speed up this decoding, an apparatus disclosed in Japanese Patent Application Laid-Open No. 62-135015 reads the code data length being decoded from a memory,
The shift register is shifted a number of times equal to the code length to simplify and speed up decoding of the code.

【0003】しかし、符号データはシリアルにシフトレ
ジスタへ転送され、かつ1ビットずつシフトされるため
符号データがnビットあった場合、最低nクロック復号
開始に必要であり、ラン長が短い符号データが連続した
ときにはリアルタイムに復号できない。つまり、符号1
ケの復号終了と次の符号の復号開始との間に数クロック
必要となってしまうという問題点がある。
However, since the code data is serially transferred to the shift register and shifted one bit at a time, if there are n bits of code data, it is necessary to start decoding at least n clocks and code data having a short run length is required. If they are consecutive, they cannot be decoded in real time. That is, code 1
There is a problem that several clocks are required between the end of decoding of the code and the start of decoding of the next code.

【0004】また、特開平1−99388号公報にはシ
フトレジスタを2段に分け、CPUがシフトとメモリか
らのロードを分割して行う技術が開示されている。しか
し、シフト途中でレジスタが32ビット空いた時点でシ
フトを中断しデータをロードしなければならず、その間
復号が中断されるという問題点があった。さらに、特開
平2−254824号公報では、バレルシフタを用い、
符号の頭出しを1クロックで行う技術を開示している。
図6及び図7にその開示内容を示す。
Japanese Patent Application Laid-Open No. 1-99388 discloses a technique in which a shift register is divided into two stages and a CPU divides a shift and loads from a memory. However, the shift must be interrupted and the data must be loaded when the register becomes 32 bits empty during the shift, and the decoding is interrupted during that time. Further, in Japanese Patent Application Laid-Open No. 2-254824, a barrel shifter is used.
A technique of performing code cueing with one clock is disclosed.
6 and 7 show the contents of the disclosure.

【0005】しかし、この公報に記載された発明の構成
では、バレルシフタを2段に分けているため次のような
問題点があった。すなわち、第1に、2段のラッチが必
要であるので回路構成が大きくなる第2に、データをロ
ードするために片方のバレルシフタをちょうど空ける様
シフトを数回に分けなければならないので復号が一時中
断し、復号全体の処理スピードが落ちる、第3に、デー
タをロードする時はシフトは止まったままであるので復
号が一時中断し、復号全体の処理スピードが落ちるとい
う問題点があった。
However, the configuration of the invention described in this publication has the following problems since the barrel shifter is divided into two stages. That is, first, the circuit configuration becomes large because two-stage latches are required. Second, decoding must be temporarily performed because the shift must be divided into several times just to open one barrel shifter to load data. Interruption reduces the processing speed of the entire decoding. Third, when data is loaded, the shift is stopped, so that decoding is temporarily interrupted, and the processing speed of the entire decoding is reduced.

【0006】一方、可変長符号語をすき間なく詰めて伝
送するために、特開平2−277319号公報、及び特
開平3−106127号公報では、伝送ビット数のシフ
タを2ケ設け、かつ、テンポラリレジスタを設け、デー
タが伝送ビット分そろった時点で外部へ出力する装置を
開示している(図13参照)。しかし、特開平2−27
7319号公報は、クロックの両エッジを使用しなけれ
ばならないため、動作周波数が抑えられてしまうという
問題点がある。
On the other hand, in order to transmit variable-length codewords without gaps, JP-A-2-277319 and JP-A-3-106127 disclose two shifters for the number of transmission bits, A device is disclosed in which a register is provided and the data is output to the outside when the data has been transmitted for the transmission bits (see FIG. 13). However, JP-A-2-27
No. 7319 has a problem that the operating frequency is suppressed because both edges of the clock must be used.

【0007】この問題点は、特開平3−106127号
公報においてOR回路を使用することで解決されている
が、OR回路であるが故にシフタ内の不要なビットは全
てグランドに落とさなければならないため、回路規模が
大きくなるという問題点がある。また、近年の半導体技
術により、伝送ビットは、16又は32ビット等ビット
幅が広がっているが、従来技術ではこの場合シフタで最
大31ビットのシフトが必要となり、シフタの規模増大
及びシフト処理時間の増大という問題点、またシフタ→
OR回路→セレクタ、アダー→セレクタというクリティ
カルパスの遅延増大という問題点がある。
This problem has been solved by using an OR circuit in Japanese Patent Application Laid-Open No. 3-106127. However, all unnecessary bits in the shifter must be grounded because of the OR circuit. However, there is a problem that the circuit scale becomes large. In addition, recent semiconductor technologies have increased the bit width of transmission bits, such as 16 or 32 bits. However, in the conventional technology, a shifter of up to 31 bits is required in this case, which increases the shifter scale and shift processing time. The problem of increase, and the shifter →
There is a problem that the delay of the critical path from the OR circuit to the selector and the adder to the selector increases.

【0008】[0008]

【発明の目的】従って、本発明の目的は、従来の技術の
欠点を解消し、小型の構成により復号の処理を連続に、
かつ、高速に行う復号装置を提供することである。ま
た、本発明の目的は、符号語をすき間なく詰めていく過
程でシフタを使用せず、簡易なデコーダとマルチプレク
サで構成することにより、アライメントの高速処理、及
び伝送ビット数が増大しても、処理スピードをほとんど
低下させることなく、また小規模な回路で可変長符号の
アライメントを行うことである。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to eliminate the drawbacks of the prior art and to make the decoding process continuous with a small configuration.
Another object of the present invention is to provide a high-speed decoding device. Further, an object of the present invention is to use a simple decoder and a multiplexer without using a shifter in a process of packing code words without gaps, thereby achieving high-speed alignment processing and increasing the number of transmission bits. The purpose is to perform variable-length code alignment with little reduction in processing speed and with a small-scale circuit.

【0009】[0009]

【目的を達成するための手段】前記の目的を達成するた
めに、本発明は、シフトレジスタの構成を、シフトレジ
スタ内の任意の位置に複数ビットのデータをロードで
き、かつ、複数ビットを1クロックでシフトできる様に
する。そして1符号の復号が終了した直後に次の復号を
開始できる様にしたものである。
In order to achieve the above object, the present invention provides a shift register having a structure in which a plurality of bits of data can be loaded into an arbitrary position in a shift register and a plurality of bits are set to one. Be able to shift by clock. Then, immediately after the decoding of one code is completed, the next decoding can be started.

【0010】また、前記の第二の目的を達成するため
に、本発明は、可変長の符号語をすき間なく詰めて伝送
するために伝送ビットと同数のラッチを有し、かつ、イ
ネーブル機能を有するレジスタ手段と、前記レジスタ手
段内の符号データを保持しているラッチ数に各符号長を
累算することにより計数する演算器手段と、符号データ
を前記レジスタ手段に上位から詰めて入力するために前
記演算器手段の出力値及び入力された符号データの符号
長より、前記レジスタ手段内ラッチへのイネーブル信号
を生成するデコーダ手段と、前記ラッチへ入力する符号
データを選択するマルチプレクサ手段と、前記レジスタ
手段の出力を選択するセレクタ手段と、を備え前記セレ
クタ手段のセレクト入力は、前記デコーダ手段から構成
される。
Further, in order to achieve the second object, the present invention has the same number of latches as the number of transmission bits for transmitting variable-length codewords without gaps, and has an enable function. Register means, arithmetic means means for counting by accumulating each code length to the number of latches holding the code data in said register means, and inputting the code data to said register means from above. Decoder means for generating an enable signal to the latch in the register means based on the output value of the arithmetic means means and the code length of the input code data; multiplexer means for selecting code data to be input to the latch; Selector means for selecting an output of the register means, and a select input of the selector means is constituted by the decoder means.

【0011】[0011]

【実施例】図1は本発明をブロック図で示す。ここで、
1はnビット符号データ、2はデマルチプレクサ、3は
シフトレジスタ、4はデコーダ、4aは復号用デコー
ダ、4bは符号ビット長デコーダ、5は演算器、6はア
キュムレータ、7はロード信号、8はシフト信号、9は
符号ビット長、10はシフトレジスタ内有効ビット長、
11は符号データ要求信号、12はデータロード位置選
択信号、13は制御信号、14は復号データ又はラン
長、15はデコーダである。
1 shows a block diagram of the present invention. here,
1 is n-bit code data, 2 is a demultiplexer, 3 is a shift register, 4 is a decoder, 4a is a decoding decoder, 4b is a code bit length decoder, 5 is an arithmetic unit, 6 is an accumulator, 7 is a load signal, 8 is Shift signal, 9 is code bit length, 10 is effective bit length in shift register,
11 is a code data request signal, 12 is a data load position selection signal, 13 is a control signal, 14 is decoded data or run length, and 15 is a decoder.

【0012】1のnビットの符号データは、2のデマル
チプレクサを通り3のシフトレジスタに7のロード信号
によりロードされる。この時6のアキュムレータ内に
は、シフトレジスタ3内の有効ビット長が保持される。
最初の符号データをロードする際は、シフトレジスタ3
にはデータは入っていないので0の有効ビット長は0で
あり、15のデコーダからは、シフトレジスタ3の最上
位ビットからデータがロードされる様12の位置選択信
号及び7のロード信号が出力される。
The n-bit code data of 1 is loaded into the shift register of 3 through the demultiplexer of 2 by the load signal of 7. At this time, the effective bit length in the shift register 3 is held in the accumulator 6.
When loading the first sign data, the shift register 3
Since no data is contained in the shift register 3, the effective bit length of 0 is 0, and the 15 decoders output 12 position selection signals and 7 load signals so that data is loaded from the most significant bit of the shift register 3. Is done.

【0013】ロードされたデータは、4のデコーダへ入
力される。4aは復号データ、4bは符号ビット長デコ
ーダを示す。4aでは所定の復号処理もしくはMH符号
等ラン長を持った符号の場合はラン長が出力され、4b
では符号ビット長が出力される。5の演算器では、シフ
トレジスタ内の有効ビット長が計算される。例えば10
の現有効ビット長がm、9の符号ビット長がL、1のシ
フトレジスタにロードした符号データ長がnであった場
合、m+n−Lが計算される。演算結果は6のアキュム
レータに格納され、15デコーダによりシフトレジスタ
3がnビット空いた場合11のデータ要求信号が外部へ
出力される。
The loaded data is input to four decoders. 4a indicates decoded data, and 4b indicates a code bit length decoder. In 4a, a run length is output in the case of a predetermined decoding process or a code having a run length such as an MH code.
Outputs the code bit length. The arithmetic unit of No. 5 calculates the effective bit length in the shift register. For example, 10
If the current effective bit length is m, the code bit length of 9 is L, and the code data length loaded into the 1 shift register is n, m + n-L is calculated. The operation result is stored in the accumulator 6, and when the shift register 3 becomes n bits empty by the 15 decoder, the data request signal 11 is output to the outside.

【0014】これらによりシフトレジスタ3内では常に
最上位ビットに符号データの先頭が位置され、次符号デ
ータもすき間なく詰められており、復号終了と同時にシ
フトレジスタの最上位にシフトされ、次の復号が開始さ
れる。図2は、本発明の実施例を示す。図1と共通の参
照番号についてはその説明を省略する(以下、他の図面
の説明も同様とする)。
As a result, in the shift register 3, the head of the code data is always located at the most significant bit, and the next code data is also packed without gaps. Is started. FIG. 2 shows an embodiment of the present invention. The description of the same reference numerals as those in FIG. 1 is omitted (the same applies to the description of other drawings below).

【0015】ここで、16はクロック、17は符号有効
フラグ、18は符号データ(符号長の最大ビット数)、
23は単位ブロック、24は復号終了信号、25は外部
からのデータロード信号、26は1ブロックのビット数
に分割された符号データを示す。図2は本発明の実施例
を示す。
Here, 16 is a clock, 17 is a code valid flag, 18 is code data (maximum number of bits of code length),
23 indicates a unit block, 24 indicates a decoding end signal, 25 indicates an external data load signal, and 26 indicates coded data divided into the number of bits of one block. FIG. 2 shows an embodiment of the present invention.

【0016】例えば、データ長が4、8、12ビットの
3種であり、かつ、ラン長を含む符号データの復号を考
える。また、1の符号データの転送バス幅を16ビッ
ト、3のシフトレジスタが48ビットであるとする。1
の符号データは2のデマルチプレクサで48ビットに展
開される。3のシフトレジスタは、4ビット×12段で
構成され4ビット度にシフト及びロードが行われる。先
で展開された符号データは、7のロード信号でシフトレ
ジスタ3内の4ブロックへ16ビット同時にロードされ
る。次のクロックでシフトレジスタ3内のデータは最大
符号長である12ビットが4aのラン長デコーダ及び4
bの符号長デコーダヘ出力される。この時、4bのデコ
ーダには6のアキュムレータに保持される現シフトレジ
スタ3内の有効データブロック数が入力され、現在、4
a、4bに入力されているデータが有効であるかどうか
が判定され、17の符号有効フラグが出力される。
For example, consider decoding of coded data having three data lengths of 4, 8, and 12 bits and including a run length. Further, it is assumed that the transfer bus width of the code data of 1 is 16 bits and the shift register of 3 is 48 bits. 1
Is expanded to 48 bits by the demultiplexer of 2. The 3 shift registers are composed of 4 bits × 12 stages, and shift and load are performed every 4 bits. The previously developed code data is simultaneously loaded into four blocks in the shift register 3 by 16 bits with a load signal of 7. At the next clock, the data in the shift register 3 has a maximum code length of 12 bits of 4a and a run length decoder 4a.
b is output to the code length decoder. At this time, the number of valid data blocks in the current shift register 3 held in the accumulator 6 is input to the decoder 4b,
It is determined whether the data input to a and 4b is valid, and a sign valid flag of 17 is output.

【0017】例えば、シフトレジスタ3内に上位から2
ブロック=8ビットのみデータが入っていた場合、6の
アキュムレータから有効ブロック数2が4bへ入力され
る。18の符号データが4または8ビットでない場合
は、17のフラグは立たず、かつ、シフトレジスタは3
ブロック目にデータがロードされるまで停止状態とな
る。逆に、有効ブロック数以下の符号データが4a、4
bのデコーダに入力された場合は、4bから9の符号デ
ータ長が5の演算器に出力され、24の現符号データの
復号終了信号と共に8のシフト値(=符号データ長)が
3のシフトレジスタ3へ送られる。そして、次のクロッ
クでシフトレジスタ3の最上位にシフトされた新しい符
号データが、4a、4bへ出力される。
For example, in the shift register 3,
If the block contains only 8 bits of data, the number of valid blocks 2 is input to 4b from the accumulator of 6. If the code data of 18 is not 4 or 8 bits, the flag of 17 is not set and the shift register is 3 bits.
It stops until data is loaded to the block. Conversely, code data less than the number of effective blocks is 4a, 4
b, the code data length from 4b to 9 is output to the arithmetic unit having the value of 5, and the shift value of 8 (= code data length) is shifted by 3 together with the decoding end signal of the current code data of 24. Sent to register 3. Then, new code data shifted to the top of the shift register 3 at the next clock is output to 4a and 4b.

【0018】この時シフトレジスタ3内の有効ブロック
数は、5の演算器から6のアキュムレータへ転送され
る。次に1の符号データをシフトレジスタ3内の有効ブ
ロックの次ブロックにロードするために15のデコーダ
でロード位置が計算され、25のデータロード信号が入
力されたと同時に7のロード信号が出力される。図3
は、本発明で使用するシフトレジスタ内1ブロックの構
成例を示す。
At this time, the number of effective blocks in the shift register 3 is transferred from the arithmetic unit 5 to the accumulator 6. Next, in order to load one code data into the next block of the effective block in the shift register 3, the load position is calculated by 15 decoders, and 25 data load signals are inputted, and at the same time, 7 load signals are outputted. . FIG.
Shows a configuration example of one block in a shift register used in the present invention.

【0019】ここで、19はデータ線、19−nはnブ
ロック下位のレジスタからのデータ線、20はマルチプ
レクサ、21はセレクタ、22はレジスタ、7−n n
ブロック下位レジスタへのロード信号、26−n nブ
ロック下位レジスタへのロード符号データを示す。8の
シフト値に従い、19−0〜nのデータが、20−1の
マルチプレクサで選択される。例えばシフト値が2であ
った場合、2ブロック下位からのデータ線10−2が選
択される。20−0、20−2は、データをロードする
ためのマルチプレクサである。シフト値が0である場合
は、26−0の符号データが7−0のロード信号により
21のセレクタで選択され、次クロックで22のレジス
タにラッチされる。シフト値がnである場合は、本来n
ブロック下位にロードされるべきデータ26−nが7−
nで選択されることによりロードデータもシフトされた
形でレジスタへラッチされる。これらの構成により、ロ
ードとシフトを同時に行うことができ3のシフトレジス
タは、常に最上位から符号データを出力する。
Here, 19 is a data line, 19-n is a data line from a register lower than n blocks, 20 is a multiplexer, 21 is a selector, 22 is a register, and 7-n n
It shows a load signal to the block lower register and load code data to the 26-nn block lower register. According to the shift value of 8, the data of 19-0 to n is selected by the multiplexer of 20-1. For example, if the shift value is 2, the data line 10-2 from the lower block of the second block is selected. 20-0 and 20-2 are multiplexers for loading data. When the shift value is 0, the code data of 26-0 is selected by the selector 21 by the load signal of 7-0, and is latched in the register 22 by the next clock. When the shift value is n, n
The data 26-n to be loaded in the lower block is 7-n.
By selecting with n, the load data is also latched in the register in a shifted form. With these configurations, loading and shifting can be performed simultaneously, and the shift register 3 always outputs code data from the highest order.

【0020】また、シフトレジスタが1の符号データの
ビット長分空きができた場合15のデコーダから外部へ
11のロード要求が出力される。外部からは、25のロ
ード信号と共に1の符号データが転送され、15のデコ
ーダは、25のロード信号に同期して7のシフトレジス
タロード信号を出力する。同時に5の演算器では、6の
アキュムレータに保持された有効ブロック数に、ロード
したブロック数を加算する。
When the shift register has a vacant space corresponding to the bit length of 1 code data, 15 decoders output 11 load requests to the outside. From the outside, 1 code data is transferred together with 25 load signals, and 15 decoders output 7 shift register load signals in synchronization with 25 load signals. At the same time, in the arithmetic unit of 5, the number of loaded blocks is added to the number of effective blocks held in the accumulator of 6.

【0021】また、5の演算器は、8のシフト信号を出
力し、3のシフトレジスタが符号データを4aのデコー
ダに出力した後、その符号の復号が、終了するまでシフ
ト値φを送出し続ける。そして24の復号終了信号と同
時に、9の符号長をシフト値として8のシフト信号を送
出し、即次符号データがシフトレジスタから出力され
る。これらにより、符号データ間で途切れることなく復
号を行い続けることができる。
The arithmetic unit 5 outputs the shift signal 8 and the shift register 3 outputs the code data to the decoder 4a, and then outputs the shift value φ until the decoding of the code is completed. to continue. At the same time as the decoding end signal of 24, a shift signal of 8 is transmitted with the code length of 9 as a shift value, and immediate code data is output from the shift register. Thus, decoding can be continued without interruption between code data.

【0022】尚、符号データがMH符号の様に1ビット
単位であっても、図3のシフトレジスタの1ブロックを
1ビット単位にし、符号長に合わせ20のマルチプレク
サの入力を操作することにより、対応できる。図4は、
本発明の変形例の一部を示す。ここで、27は32ビッ
トデータロード信号、28はデータ要求信号、29は制
御回路、30はバッファ、31はセレクタ、32は16
ビットデータロード信号、33はデータ選択信号を示
す。
Even if the code data is in 1-bit units like the MH code, one block of the shift register shown in FIG. 3 is made in 1-bit units, and the input of 20 multiplexers is operated according to the code length. Can respond. FIG.
7 shows a part of a modification of the present invention. Here, 27 is a 32-bit data load signal, 28 is a data request signal, 29 is a control circuit, 30 is a buffer, 31 is a selector, and 32 is 16
A bit data load signal 33 indicates a data selection signal.

【0023】外部の符号データのバス幅が32ビットで
あるとする。先の例では、シフトレジスタ内が32ビッ
ト空くまでデータはロードできないため、リアルタイム
に復号を行うにはシフトレジスタの段数を多くとらなけ
ればならない。この解決策が本実施例である。1の32
ビット幅の符号データは一旦30のバッファに格納され
る。11のデータ要求信号により、29の制御回路は、
33のセレクト信号により上位16ビットのデータをま
ず2のデマルチプレクサへ転送し、同時に32のロード
信号を出力する。次にデータ要求信号が来た時は、下位
16ビットデータを転送し、28のデータ要求信号を外
部へ出力する。これにより、16ビットずつデータをシ
フトレジスタへ転送するため、シフトレジスタの段数を
減らすことができる。
It is assumed that the bus width of the external code data is 32 bits. In the above example, since data cannot be loaded until the shift register has 32 bits available, the number of stages of the shift register must be increased in order to perform decoding in real time. This solution is the present embodiment. 1 of 32
The bit width code data is temporarily stored in 30 buffers. By the data request signal of 11, the control circuit of 29
The upper 16 bits of data are first transferred to the demultiplexer 2 by the 33 select signals, and 32 load signals are output at the same time. Next, when a data request signal comes, the lower 16-bit data is transferred and 28 data request signals are output to the outside. Thus, since the data is transferred to the shift register in 16-bit units, the number of stages of the shift register can be reduced.

【0024】尚、本構成は一例であり、30のバッファ
を3段、4段に分け、データ転送ビット数をさらに少な
くすることができる。図5は、シリアルにデータ転送を
行う際の他の変形例を示す。ここで、34はシリパラ変
換器、35はFIFO(First-In First-Out)、36は
シリアル符号データを示す。
This configuration is merely an example, and the number of data transfer bits can be further reduced by dividing the 30 buffers into three and four stages. FIG. 5 shows another modification when serial data transfer is performed. Here, 34 is a serial-parallel converter, 35 is a FIFO (First-In First-Out), and 36 is serial code data.

【0025】36の1ビット符号データは、34のシリ
パラ変換器でnビット長に変換され、35のFIFOへ
送られる。29の制御回路は、11のデータ要求信号に
より、FIFOからデータをリードしデマルチプレクサ
へ転送し、可変長符号の復号に使用するシフトレジスタ
を任意の位置へデータがロードできる様にした。また、
シフトレジスタ内の有効ビット数もしくはブロック数を
アキュムレータに格納し、シフト、ロードを同時に行え
る様にした。
The 36 1-bit code data is converted into an n-bit length by the serial-parallel converter 34 and sent to the FIFO 35. The control circuit 29 reads data from the FIFO in accordance with the data request signal 11 and transfers the data to the demultiplexer so that the shift register used for decoding the variable length code can be loaded into an arbitrary position. Also,
The number of effective bits or blocks in the shift register is stored in the accumulator so that shift and load can be performed simultaneously.

【0026】図8は本発明の概略の構成を示す。符号長
の最大ビット数を8、アライメント後の転送ビット数を
32とする。21の符号データ8ビットは、29のイネ
ーブル信号に同期して22のマルチプレクサへ入力され
る。同時に符号データ長210が25の演算器に入力さ
れ、現在の符号長累計値211と加算され26のレジス
タに保持される。211の符号長累計値29の入力イネ
ーブル信号及び210の符号データ長は、27のデコー
ダによりデコードされ、212のラッチイネーブル信号
が生成される。
FIG. 8 shows a schematic configuration of the present invention. Assume that the maximum number of bits of the code length is 8, and the number of transfer bits after alignment is 32. Eight bits of code data of 21 are input to a multiplexer of 22 in synchronization with an enable signal of 29. At the same time, the code data length 210 is input to the 25 arithmetic units, added to the current accumulated code length value 211, and held in the 26 registers. The input enable signal of the code length accumulated value 29 of 211 and the code data length of 210 are decoded by a decoder of 27 and a latch enable signal of 212 is generated.

【0027】そして、23のラッチには、符号が順に詰
められた形で入力され、保持される。また23のラッチ
は、本実施例では、64ビット用意され、32ビット蓄
えられた時点で24のセレクタで選択され、214のア
ライメント終了信号に同期して外部に出力される。図9
は、図8中の符号データ入力部の実施例を示す。
The symbols are input to and held in the 23 latches in a form in which codes are sequentially packed. Further, in this embodiment, 64 latches are prepared in this embodiment, and when the 32 latches are stored, they are selected by the selector 24 and output to the outside in synchronization with the alignment end signal 214. FIG.
Shows an embodiment of the code data input unit in FIG.

【0028】21の符号データ8ビットをMSB(Most
Significant Bit) からLSB(Least Significant Bi
t)まで7から0で示すことにする。また、22のマルチ
プレクサをMSBから22−0、22−01、・・・、
22−31、・・・22−63として示し、23のラッ
チをMSBから23−0、23−1、・・・23−3
1、・・・23−63と示すことにする。1の符号デー
タは、22−0〜22−63のマルチプレクサへ順に1
bitずらした構成で入力される。マルチプレクサのセ
レクト入力へは、211の累計符号長の下位3ビットが
入力される。
The 8 bits of the code data of 21 are converted to the MSB (Most
Significant Bit) to LSB (Least Significant Bi)
Until t), it is indicated by 7 to 0. Also, 22 multiplexers are changed from MSB to 22-0, 22-01,.
, 22-63, and 23 latches from the MSB to 23-0, 23-1,.
1,... 23-63. The code data of 1 is sequentially sent to multiplexers 22-0 to 22-63 by 1
The data is input in a bit-shifted configuration. The lower three bits of the total code length of 211 are input to the select input of the multiplexer.

【0029】例えば、累計符号長211の3ビットが0
10(b)であった場合、図10に示す通り、23−0
〜23−63への入力順に107654321076・
・・となる。この時の23−0〜23−63のレジスタ
のEN(ENABLE)信号生成図を図11に示す。累
計符号長211の下位3ビットが010(b)であるか
ら累計符号長は2又は10又は18(d)であるが、2
(d)とすると図11から212−2、3、4、・・
・、63がイネーブル(ENABLE)となり、23−
2、3、4、5、・・・、63のレジスタへデータがロ
ードされる。つまり、空いているレジスタの先頭から1
の符号データのMSB−LSBがロードされることにな
る。同時にロードされた符号データのビット数と累計符
号長が加算され6のレジスタへ蓄えられ、次符号データ
のロードに使用される。
For example, when the three bits of the total code length 211 are 0
In the case of 10 (b), as shown in FIG.
1076543221076 in the order of input to ~ 23-63
・ ・FIG. 11 shows an EN (ENABLE) signal generation diagram of the registers 23-0 to 23-63 at this time. Since the lower three bits of the total code length 211 are 010 (b), the total code length is 2 or 10 or 18 (d).
As shown in FIG. 11D, 212-2, 3, 4,...
, 63 are enabled (ENABLE) and 23-
Data is loaded into registers 2, 3, 4, 5,..., 63. That is, 1 from the beginning of the vacant register
The MSB-LSB of the code data is loaded. At the same time, the number of bits of the code data loaded and the total code length are added and stored in the register 6 and used for loading the next code data.

【0030】実施例によると、例えば符号長が4(d)
等であったとしても4bitのみレジスタへデータをロ
ードするのではなく、3の32bitレジスタのそれぞ
れのMSBから埋まっているレジスタのみディセーブル
(DISABLE)とし、他ビット及び他方の32bi
tレジスタは、全てイネーブルとしておく。これによ
り、27のデコーダ回路は、入力されたデータの符号長
に依存せず、図11中の外部への出力については、2つ
の32ビットレジスタのどちらかが埋まった時点で図8
中の14のアライメント終了信号が発生し、外部へアラ
イメントデータが出力される。
According to the embodiment, for example, the code length is 4 (d)
Even if it is the same, data is not loaded into the register only for 4 bits, but only the register buried from the MSB of each of the 3 32-bit registers is disabled (DISABLE), and the other bits and the other 32 bi are used.
All t registers are enabled. As a result, the decoder circuit 27 does not depend on the code length of the input data, and outputs to the outside in FIG. 11 when either of the two 32-bit registers is filled, as shown in FIG.
14 of the alignment end signals are generated, and the alignment data is output to the outside.

【0031】図12は全体のタイミングを示す。図8中
の24のセレクタへのセレクト信号213には、211
の累計符号長のMSBが入力されそして214のアライ
メント終了信号はセレクト信号213の変化点で1パル
ス生成される。本実施例では、3のレジスタは、転送ビ
ット数×2個用意したが、これに限るものではなく、レ
ジスタの1ブロックを細分化し、レジスタ数を減らすこ
とも可能である。例えば、転送ビット小数÷2を1ブロ
ックとし、計3ブロック用意し、その内2つが埋まった
時点で外部へ終了信号と共に出力することも、27のデ
コーダ及び24のセレクタを変更することで可能とな
り、レジスタの数を削減できる。
FIG. 12 shows the overall timing. The select signal 213 to the selector 24 in FIG.
, And an alignment end signal 214 is generated at the transition point of the select signal 213. In this embodiment, three registers are provided for the number of transfer bits × 2. However, the present invention is not limited to this, and one block of registers can be subdivided to reduce the number of registers. For example, it is also possible to prepare a total of three blocks with the transfer bit fraction ÷ 2 as one block, and to output it together with an end signal to the outside when two of them are filled, by changing the decoder of 27 and the selector of 24. , The number of registers can be reduced.

【0032】また、この実施例では、符号データをアラ
イメントするためのバレルシフタ部をn対1のマルチプ
レクサで構成し、アライメントデータをを1時格納する
レジスタをブロック分けし、各レジスタへのイネーブル
信号を生成するデコーダを設けた。
In this embodiment, the barrel shifter for aligning the code data is constituted by an n-to-1 multiplexer, the register for temporarily storing the alignment data is divided into blocks, and the enable signal to each register is transmitted. A decoder for generation is provided.

【0033】[0033]

【発明の効果】本発明によれば、1符号データを復号終
了と同時に符号データ長だけ、シフトレジスタ内でシフ
トが行なわれ、次符号データが、シフトレジスタより出
力されるので、復号を常に連続して行うことができる。
また、復号中に外部よりデータをシフトレジスタへロー
ドできるので、ラン長復号の際ランの無い、符号データ
が連続して入力されても復号が途中で止まることはな
い。
According to the present invention, one code data is shifted by the code data length in the shift register at the same time as the completion of decoding, and the next code data is output from the shift register. You can do it.
Also, since data can be externally loaded into the shift register during decoding, there is no run during decoding of run length, and decoding does not stop halfway even if code data is continuously input.

【0034】さらに、本発明によれば、シフトレジスタ
内の符号データが、1符号分そろっていない場合符号有
効フラグを下げロードされるのを待つので、外部から符
号データを転送する際、何らかの理由に転送が停止して
も復号が途中でエラーを起こすこともなく、動作を停止
させることができる。一方、従来例では、転送ビットが
32であるとすると、まずバレルシフタ部で最大31ビ
ットのシフトが行われる。これは32対1のマルチプレ
クサの処理時間と同等であり、かつ、空ビットには0を
埋めなければならないため回路規模が増大する。またシ
フト後にOR回路とSEL回路を通った後レジスタへ入
力されるので全体の処理時間が遅くなる。
Further, according to the present invention, if the code data in the shift register is not complete for one code, the code valid flag is lowered and the data is waited for being loaded. Even if the transfer is stopped, the operation can be stopped without causing an error during the decoding. On the other hand, in the conventional example, assuming that the number of transfer bits is 32, first, a maximum of 31 bits are shifted in the barrel shifter section. This is equivalent to the processing time of a 32-to-1 multiplexer, and the empty bits must be filled with 0, thus increasing the circuit scale. Further, after the shift, the signal is input to the register after passing through the OR circuit and the SEL circuit, so that the entire processing time is delayed.

【0035】これに対し、本発明では、符号データは8
対1のマルチプレクサを通るだけでレジスタへラッチさ
れるので高速に処理できる。レジスタへのイネーブル信
号についても生成部であるデコーダにおいて、入力され
た符号データの符号長を判断しなくてもよいので簡単な
ゲート回路で構成でき、かつ、高速に処理することがで
きる。従って、全体のアライメント処理時間は本発明に
より短縮され、回路規模も縮少される。
On the other hand, in the present invention, the code data is 8 bits.
Since the signal is latched into the register only by passing through the one-to-one multiplexer, high-speed processing can be performed. As for the enable signal to the register, it is not necessary to judge the code length of the input code data in the decoder as the generation unit, so that it can be configured with a simple gate circuit and can be processed at high speed. Therefore, the entire alignment processing time is shortened by the present invention, and the circuit scale is also reduced.

【0036】また、転送ビット数が増えても処理時間は
ほぼ同じである。
Further, even if the number of transfer bits increases, the processing time is almost the same.

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

【図1】本発明をブロック図で示す。FIG. 1 shows the invention in a block diagram.

【図2】本発明の実施例を示す。FIG. 2 shows an embodiment of the present invention.

【図3】本発明のシフトレジスタ内の1ブロックの構成
例を示す。
FIG. 3 shows a configuration example of one block in a shift register of the present invention.

【図4】本発明のデータ入力部の変形例の一部を示す。FIG. 4 shows a part of a modification of the data input unit of the present invention.

【図5】本発明のデータ入力部の変形例の一部を示す。FIG. 5 shows a part of a modification of the data input unit of the present invention.

【図6】従来技術のバレルシフタの構成を示す。FIG. 6 shows a configuration of a conventional barrel shifter.

【図7】図6の従来技術のバレルシフタの処理内容を示
す。
FIG. 7 shows the processing contents of the conventional barrel shifter of FIG.

【図8】本発明によるアライメント回路の実施例を示
す。
FIG. 8 shows an embodiment of an alignment circuit according to the present invention.

【図9】図1中の符号データ入力部の実施例を示す。FIG. 9 shows an embodiment of a code data input unit in FIG.

【図10】符号データのレジスタ入力部での状態図を示
す。
FIG. 10 shows a state diagram at the register input of the code data.

【図11】レジスタのイネーブル信号生成図を示す。FIG. 11 shows an enable signal generation diagram of a register.

【図12】全体のタイミング図である。FIG. 12 is an overall timing chart.

【図13】従来の符号データアライメント回路の構成例
である。
FIG. 13 is a configuration example of a conventional code data alignment circuit.

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

1 nビット符号データ 2 デマルチプレクサ 3 シフトレジスタ 4a 復号用デコーダ 4b 符号ビット長デコーダ 5 演算器 6 アキュムレータ 7 ロード信号 8 シフト信号 9 符号ビット長 10 シフトレジスタ内有効ビット長 11 符号データ要求信号 12 データロード位置選択信号 13 制御信号 14 復号データ又はラン長 15 デコーダ 21 可変長符号データ 22 マルチプレクサ 23 ラッチ 24 セレクタ 25 演算器 26 レジスタ 27 デコーダ 29 符号データ入力イネーブル信号 210 符号データ長 211 累計符号データ長 212 ラッチイネーブル信号 213 セレクト信号 214 アライメント終了信号 215 アライメントデータ 216 転送ビット長レジスタ Reference Signs List 1 n-bit code data 2 demultiplexer 3 shift register 4a decoding decoder 4b code bit length decoder 5 arithmetic unit 6 accumulator 7 load signal 8 shift signal 9 code bit length 10 effective bit length in shift register 11 code data request signal 12 data load Position selection signal 13 Control signal 14 Decoded data or run length 15 Decoder 21 Variable length code data 22 Multiplexer 23 Latch 24 Selector 25 Operation unit 26 Register 27 Decoder 29 Code data input enable signal 210 Code data length 211 Cumulative code data length 212 Latch enable Signal 213 Select signal 214 Alignment end signal 215 Alignment data 216 Transfer bit length register

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 可変長符号データを全ビット同時にロー
ドできる機能及び符号データ長nビットを1クロックで
シフトできる機能を有し、シフト及びロードを同時に行
なえるシフトレジスタと、 前記シフトレジスタから出力される符号データから符号
ビット及び復号データを出力するデコーダと、前記符号データ長、前記符号ビット長及び現有効ビット
長から、 前記シフトレジスタの有効ビットを計算す
る演算器と、 前記演算器から出力されるシフトレジスタ内の有効ビッ
ト長、現有効ビット長として保持するアキュムレータ
と、 前記アキュムレータの出力値に基づき符号データを前記
シフトレジスタの所定の位置へロードするためのデマル
チプレクサとを備えたことを特徴とする可変長符号の復
号装置。
1. A shift register having a function of simultaneously loading all bits of variable-length code data and a function of shifting n bits of code data length by one clock, and capable of performing shift and load simultaneously, and a shift register output from the shift register. Sign from sign data
A decoder for outputting a bit length and decoded data ; the code data length, the code bit length, and a currently valid bit.
The Editor, a calculator for calculating the effective bit length of the shift register, the effective bit in the shift register output from said arithmetic unit
The door length, variable length code, characterized in that it comprises an accumulator for holding as the current effective bit length, and a demultiplexer for loading code data based on the output value of the accumulator to a predetermined position of said shift register Decoding device.
【請求項2】 前記デマルチプレクサの前段に可変長符
号を一時格納するバッファを設け、このバッファにロー
ドされた符号データを分割してデマルチプレクサに転送
する制御回路を設けることにより、前記シフトレジスタ
の段数を削減したことを特徴とする請求項1記載の復号
装置。
2. A buffer for temporarily storing a variable length code is provided at a stage preceding the demultiplexer, and a control circuit for dividing code data loaded in the buffer and transferring the code data to the demultiplexer is provided. 2. The decoding device according to claim 1, wherein the number of stages is reduced.
【請求項3】 可変長の符号データをすき間なく詰めて
伝送するために伝送ビットと同数のラッチを有し、か
つ、イネーブル機能を有する、累計符号データ長を保持
するためのレジスタ手段と、前記符号データの符号データ長及び現在の累積符号デー
タ長から、累積符号データ長を計算する 演算器手段と、前記 符号データを前記レジスタ手段に上位から詰めて入
力するために、前記符号データ長、前記累積符号データ
長及び入力イネーブル信号から、前記レジスタ手段内
ラッチへのラッチイネーブル信号を生成し、またアライ
メント終了信号を出力するデコーダ手段と、 前記ラッチへ入力する符号データを選択するマルチプレ
クサ手段と、 前記レジスタ手段の出力を選択し、また前記アライメン
ト終了信号に応じてアライメントデータを出力するセレ
クタ手段と、 を備えことを特徴とする可変長符号処理装置。
3. A total number of code data lengths having the same number of latches as the number of transmission bits and having an enable function for transmitting variable-length code data without gaps.
Register means for registering the code data, the code data length of the code data and the current accumulated code data.
From data length, and calculator means for calculating the accumulated code data length, in order to enter the code data packed from the upper to the register means, the code data length, the accumulated code data
From the long and the input enable signal to generate a latch enable signal to <br/> latches in the register means and Arai
A decoder means for outputting an instrument end signal, and a multiplexer means for selecting the code data to be input to the latch, and selects the output of said register means and said Alignment
Variable-length code processing apparatus that a selector means for outputting the alignment data in accordance with the preparative end signal, comprising the.
JP15068792A 1992-03-17 1992-06-10 Decoding device and processing device for variable length code Expired - Lifetime JP3136573B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15068792A JP3136573B2 (en) 1992-03-17 1992-06-10 Decoding device and processing device for variable length code

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP4-60619 1992-03-17
JP6061992 1992-03-17
JP15068792A JP3136573B2 (en) 1992-03-17 1992-06-10 Decoding device and processing device for variable length code

Publications (2)

Publication Number Publication Date
JPH05327516A JPH05327516A (en) 1993-12-10
JP3136573B2 true JP3136573B2 (en) 2001-02-19

Family

ID=13147481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15068792A Expired - Lifetime JP3136573B2 (en) 1992-03-17 1992-06-10 Decoding device and processing device for variable length code

Country Status (1)

Country Link
JP (1) JP3136573B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3014997B2 (en) 1998-02-26 2000-02-28 鐘紡株式会社 Variable length code decoding device

Also Published As

Publication number Publication date
JPH05327516A (en) 1993-12-10

Similar Documents

Publication Publication Date Title
US4593393A (en) Quasi parallel cyclic redundancy checker
JP3294026B2 (en) High-speed variable-length decoding device
JPH06348492A (en) Data pipeline device and data encoding method
KR0179103B1 (en) High speed variable length decoder apparatus
CN111279617A (en) Data decompression device and method
JP3136573B2 (en) Decoding device and processing device for variable length code
JPH0333914A (en) Data unpack equipment
EP0312614B1 (en) Data transfer system
US6496602B2 (en) Sorting device of variable-length code
US5784012A (en) Variable-length code decoder
KR101370606B1 (en) Bus encoding device to minimize the switching and crosstalk delay
EP0499225B1 (en) Variable-length code decoding device
JPH09244873A (en) Fast barrel shifter
US6522690B1 (en) Zero determination signal generating circuit
JP3054787B2 (en) Variable length code decoding device
JP2579696B2 (en) Buffer control device
KR100200489B1 (en) Data interface apparatus
US6941418B1 (en) Integrated circuit and method outputting data
JPH02110728A (en) Statical coding device
KR100200490B1 (en) Data interface apparatus
JP3219571B2 (en) Image coding apparatus and method
KR970002073B1 (en) Vld device using pipe line structure
JP2597041B2 (en) FIFO memory device
JPH03247020A (en) Variable length decoding circuit
JPH04157831A (en) Superposed signal inserting circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071208

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20081208

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20091208

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20101208

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20111208

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20111208

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20121208

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121208

Year of fee payment: 12