JPH0376469A - Decoding circuit for variable length code - Google Patents

Decoding circuit for variable length code

Info

Publication number
JPH0376469A
JPH0376469A JP21346889A JP21346889A JPH0376469A JP H0376469 A JPH0376469 A JP H0376469A JP 21346889 A JP21346889 A JP 21346889A JP 21346889 A JP21346889 A JP 21346889A JP H0376469 A JPH0376469 A JP H0376469A
Authority
JP
Japan
Prior art keywords
code
decoding
data
length
shortest
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
JP21346889A
Other languages
Japanese (ja)
Inventor
Tsuguo Noda
嗣男 野田
Masahiro Fukuda
昌弘 福田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP21346889A priority Critical patent/JPH0376469A/en
Publication of JPH0376469A publication Critical patent/JPH0376469A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PURPOSE:To quicken the decoding without increasing the circuit scale by providing a shortest code group decoding logic circuit decoding a code group with high appearance frequency and short code length through the combination of AND and OR. CONSTITUTION:A shortest code group decoding section has a function of receiving 7 kinds of code groups whose designated code length is 4 or below, for example, and of outputting a decoded data, that is, a fixed length data (EXD1) and a code length (CDS1) and consists of a logic circuit comprising the combination of AND and OR circuits only and has a faster decoding speed than that of a decoding table employing a ROM. For example, the decoding speed of the shortest code group decoding section 2 using the logic circuit is 50ns, which is faster than the access speed of 200ns of the decode table employing a ROM. Thus, when a code data whose code length is less than the designated length is decoded, multiplexers 4, 5 select the decoding result of the shortest code group decoding section 2 and the decoding data (EXD1) is outputted to a latch 7 and the code length (CDS1) is outputted to a code data input section 1.

Description

【発明の詳細な説明】 [概要] 本発明は、出現頻度の高いデータほど短い符号が割り当
てられた可変長符号を入力して元の固定長データを得る
可変長符号の復号回路に関し、回路規模を増加すること
なく復号を高速化することを目的とし、 出現頻度の高い符号長の短い符号群をAND。
Detailed Description of the Invention [Summary] The present invention relates to a variable length code decoding circuit that obtains original fixed length data by inputting a variable length code in which a shorter code is assigned to data that appears more frequently. The purpose of this is to speed up decoding without increasing the code length by ANDing a group of codes with short code lengths that appear frequently.

ORの組合せによって復号する最短符号群解読用論理回
路を設け、最短符号群の論理回路による高速復号により
、簡単な回路で全体的な復号速度を向上させるように構
成する。
A logic circuit for decoding the shortest code group that decodes by a combination of ORs is provided, and the overall decoding speed is improved with a simple circuit by high-speed decoding by the logic circuit for the shortest code group.

[産業上の利用分野] 本発明は、出現頻度の高いデータほど短い符号が割り当
てられた可変長符号の復号回路に関する。
[Industrial Field of Application] The present invention relates to a variable length code decoding circuit in which a shorter code is assigned to data that appears more frequently.

数値データに比べて情報量が桁違いに大きい画像データ
、特に、中間調画像やカラー画像のデータを蓄積し、あ
るいは、高速、高品質で伝送するためには、画素毎の階
調値を高能率に符号化する必要がある。
In order to accumulate image data, which has an order of magnitude larger amount of information than numerical data, especially halftone and color image data, or to transmit it at high speed and high quality, it is necessary to increase the gradation value of each pixel. It is necessary to encode it efficiently.

画像データの高能率な圧縮方式として、例えば多階調適
応形ブロック符号化方式(昭和62年画像電子学会全国
大会予稿6)がある。
As a highly efficient compression method for image data, there is, for example, a multi-gradation adaptive block coding method (Preliminary Draft 6 of the National Conference of the Institute of Image Electronics Engineers, 1988).

多階調適応形ブロック符号化方式(Generalir
ed  Block  Truncation Cod
ing  以下、略してrG B T CJと称する)
について次に説明する。
Multi-gradation adaptive block coding method (Generalir
ed Block Truncation Cod
ing (hereinafter abbreviated as rG B T CJ)
This will be explained next.

GBTCは、画像をNXN画素からなるブロックに分割
し、各画素(Xij)をブロック内の最大・最小画素レ
ベルの内の2° (n=o、  1. 2゜・・・)レ
ベルで量子化すると共に、各画素の量子化レベルをビッ
トプレーン形式で表現し、階調情報とビットプレーン情
報(分解能成分と呼ぶ)を符号化するものである。
GBTC divides an image into blocks consisting of NXN pixels, and quantizes each pixel (Xij) at the 2° (n=o, 1.2°...) level of the maximum and minimum pixel levels within the block. At the same time, the quantization level of each pixel is expressed in a bit plane format, and gradation information and bit plane information (referred to as resolution components) are encoded.

次に、N=4.n=2とした場合につき、詳細に述べる
Next, N=4. The case where n=2 will be described in detail.

第5図にGBTCのアルゴリズムを示す。各ブロックは
、ブロック内の最大画素レベル(Lmax )と最小画
素レベル(Lmin )の差(L maI−L win
)と、骨化パラメータTI 、 T2  (TI <T
2 )により以下の3つの符号化モードA、  B、 
 Cに分類される。
FIG. 5 shows the GBTC algorithm. Each block is determined by the difference (LmaI-Lwin) between the maximum pixel level (Lmax) and the minimum pixel level (Lmin) within the block.
) and the ossification parameters TI, T2 (TI < T
2), the following three encoding modes A, B,
Classified as C.

モードA: Lmax−Lmin≦T、の場合 ブロック内の画素は1レベル(po )に量子化される
Mode A: If Lmax-Lmin≦T, the pixels within the block are quantized to one level (po).

モードB: T、 <Lmax−Lmin≦T2の場合ブロック内の
画素は2レベル(PI、P2)に量子化される。
Mode B: If T, <Lmax-Lmin≦T2, the pixels in the block are quantized to two levels (PI, P2).

モードC: T2<Lmax−Lminの場合 ブロック内の画素は等間隔な4レベル(Q、〜Q4)に
量子化される。
Mode C: When T2<Lmax-Lmin, pixels within a block are quantized into four equally spaced levels (Q, to Q4).

量子化レベルは、ブロックの基準レベルLa。The quantization level is the reference level La of the block.

レベル間隔Ld及び画素毎のレベル指定信号(φILI
+(φ2)1.で記述される。
Level interval Ld and level designation signal for each pixel (φILI
+(φ2)1. It is described in

平均値処理をAVE()とすると、次のように符号化に
必要な各値が算出される。
If the average value processing is AVE(), each value necessary for encoding is calculated as follows.

モードA: Pa =AVE (Xii) =L a(φI)、=O
、(φ2)11=0 (全てのIT  Jに対して) モードB: P 、= A V E (X i j≧(Lmax+I
、m1n)/2)P2 =AVE (Xij< (Lm
ax+Lmin)/2)La=(Pi 十P2)/2 L d =P 1P 2 (φ、)、=0 (Xii≧(Lmax+Lmin)/2の場合)(φI
 ) 、I=1 (Xij< (Lmax+Lmin)/2の場合)(φ
2)、=O(すべてのi、jに対して)モードC: Ql  =AVE  (Xi j≧ (3Lmax+L
min)/4)Q4  =AVE  (Xij<  (
Lmax+31.m1n)/4)L a=  (Ql 
 +04 ) /2Ld=2  (Ql  −Q4)/
3 Q2 =L a +L d/4 Q、=La−Ld/4 (φ+)、+=0.(φ2)、、=0 (Xij≧La+Ld/2の場合) (φ+)、+=0.  (φ2)、=1(La+Ld/
2>Xij≧Laの場合)(φz)z=1.(φ2)、
、=0 (L a >Xij≧La−Ld/2の場合)(φ+)
、=1.(φ2)、、=i (L a−L d/2>Xijの場合)分解能成分(φ
1.φ2)は、ブロック間で接続して2つのビットマツ
プに変換し、それぞれ2値画像の標準符号化方式である
MMR符号化方式で符号化する。レベル間隔Ldは、非
線形量子化後、可変長符号化し、基準レベルLaはDP
CM符号化を用いて前置差分(ΔLa)を非線形量子化
後、可変長符号化する。そして、これらの可変長符号は
伝送ラインを介して伝送される。
Mode A: Pa = AVE (Xii) = L a (φI), = O
, (φ2)11=0 (for all IT J) Mode B: P ,=AV E (X i j≧(Lmax+I
, m1n)/2) P2 =AVE (Xij< (Lm
ax + Lmin) / 2) La = (Pi + P2) / 2 L d = P 1P 2 (φ, ), = 0 (If Xii≧(Lmax+Lmin)/2) (φI
), I=1 (if Xij< (Lmax+Lmin)/2) (φ
2), =O (for all i, j) Mode C: Ql =AVE (Xi j≧ (3Lmax+L
min)/4)Q4 =AVE (Xij< (
Lmax+31. m1n)/4)L a= (Ql
+04) /2Ld=2 (Ql -Q4)/
3 Q2 = L a + L d/4 Q, = La - L d/4 (φ+), +=0. (φ2),,=0 (when Xij≧La+Ld/2) (φ+), +=0. (φ2), = 1(La+Ld/
2>Xij≧La) (φz)z=1. (φ2),
, = 0 (when L a >Xij≧La-Ld/2) (φ+)
,=1. (φ2),,=i (when L a−L d/2>Xij) Resolution component (φ
1. φ2) is connected between blocks and converted into two bitmaps, each of which is encoded using the MMR encoding method, which is a standard encoding method for binary images. The level interval Ld is variable length encoded after nonlinear quantization, and the reference level La is DP
The prefix difference (ΔLa) is nonlinearly quantized using CM encoding and then variable length encoded. These variable length codes are then transmitted via a transmission line.

GBTC方式では、可変長符号としてハフマン符号を使
用する。ハフマン符号では対象となるデータの出現頻度
の多いものに短い符号を割り当て、出現頻度の小さいデ
ータには長い符号を割り当てる。以下に基本的なハフマ
ン符号を作成する手順を示す。
The GBTC method uses a Huffman code as a variable length code. In Huffman codes, short codes are assigned to target data that appear frequently, and long codes are assigned to data that appear less frequently. The procedure for creating a basic Huffman code is shown below.

■予め求めたデータの出現頻度を小さい順に並べる。■ Arrange the appearance frequencies of the data obtained in advance in ascending order.

■出現頻度の小さい方から2つのデータを取り出す。■Extract two pieces of data starting from the one with the lowest frequency of appearance.

■最小のものに符号の末尾として“0”を割り当て、2
番目のデータに“1”を割り当てる。
■Assign “0” as the end of the code to the smallest one, and
Assign “1” to the th data.

■上記2つの出現頻度の合計を新たなデータとし、■で
取り出した2つのデータを削除する。
■The total of the above two appearance frequencies is used as new data, and the two data extracted in (■) are deleted.

■残されたデータで■の操作を行なう。以下、データが
無くなるまでこの操作を繰り返す。
■Perform operation ■ with the remaining data. This operation is then repeated until there is no more data.

■全データを処理後、それぞれの符号語内の順序  を
逆に並べかえて(符号の末尾から決定した  ため)1
0例えば第6図に示すような符号表を  作成する。
■After processing all data, rearrange the order within each code word (because it was determined from the end of the code) 1
0For example, create a code table as shown in Figure 6.

第6図(a)は固定長データの値(入力)a〜fに対す
る可変長符号化データ(出力)を示し、また第6図(b
)は固定長データの値(入力)a〜fに対する可変長符
号化データの符号長を示している。
Figure 6(a) shows variable length encoded data (output) for fixed length data values (input) a to f, and Figure 6(b)
) indicates the code length of variable length encoded data for fixed length data values (input) a to f.

可変長符号データ長は可変長であり、データとデータの
区切りは復号しなければ検出できない。
The variable length code data length is variable, and the delimiter between data cannot be detected without decoding.

そこで、復号時には、最大符号要分の符号データを読み
込んで、復号テーブルを参照する形式をとる。最大符号
長を4とした場合、復号表参照時に読み込まれる符号デ
ータは16(=24)通りある。復号表は、第7図(a
)(b)に示すように、16通りの可変長符号化データ
(入力)に対し固定長データの値及び符号長の各々が求
められる構成としている。
Therefore, at the time of decoding, a format is adopted in which code data for the maximum code length is read and a decoding table is referred to. When the maximum code length is 4, there are 16 (=24) types of code data to be read when referring to the decoding table. The decoding table is shown in Figure 7 (a
) As shown in (b), the configuration is such that each of the fixed length data value and code length is determined for 16 types of variable length encoded data (input).

[従来の技術] 第8図は従来の可変長符号の復号回路の構成図を示し、
入力した可変長符号化データは次の処理動作により元の
固定長データに復号される。
[Prior Art] FIG. 8 shows a configuration diagram of a conventional variable length code decoding circuit.
The input variable length encoded data is decoded into the original fixed length data by the next processing operation.

端子10より入力される符号データは、符、号データ入
力部1に入力される。符号データ入力部1は、入力され
た符号データから順次最大符号要分の有効データ(CO
DE)を切り出して、復号テーブル3に出力する。復号
テーブル3は、第7図に示すように構成され、入力され
た符号データ(CODE)から固定長データ(EXD)
を復号すると共に、符号長(CDS)を出力する。
Code data inputted from the terminal 10 is inputted to the code data input section 1. The code data input unit 1 sequentially inputs effective data (CO
DE) and output it to the decoding table 3. The decoding table 3 is configured as shown in FIG. 7, and converts input code data (CODE) to fixed length data (EXD).
At the same time, the code length (CDS) is output.

ここで、最大符号長が16ビツト、復号される固定長デ
ータが8ビツトとすると、復号テーブル3は64にビッ
ト×8ビットのROM2個で構成される。
Here, assuming that the maximum code length is 16 bits and the fixed length data to be decoded is 8 bits, the decoding table 3 is composed of two ROMs of 64 bits x 8 bits.

復号テーブル3からの復号データ(E X D)は、ラ
ッチ7に出力される。一方、符号長(CDS)は、符号
データ入力部1に出力される。
The decoded data (EXD) from the decode table 3 is output to the latch 7. On the other hand, the code length (CDS) is output to the code data input section 1.

タイミング制御部20は、復号テーブル2を構成するR
OMのアクセス時間を計算し、算出アクセス時間後にラ
ッチ7にデータのラッチ信号を発生する。このラッチ信
号によりラッチ7に復号データがラッチされ、端子11
より出力される。
The timing control unit 20 configures the decoding table 2.
The OM access time is calculated, and a data latch signal is generated in the latch 7 after the calculated access time. This latch signal causes the decoded data to be latched into the latch 7, and the terminal 11
It is output from

1個の符号データの復号が終了したら、タイミング制御
部20は、符号データ入力部1に次の符号データの準備
を指示する。符号データ入力部1は先の符号データから
、既に復号された符号長(CD S)分の符号データを
シフトして破棄し、残された符号データの先頭から最大
符号長針のデータを次の復号用のデータとして切り出し
、同様な復号処理を行なう。
When the decoding of one piece of code data is completed, the timing control section 20 instructs the code data input section 1 to prepare the next code data. The code data input unit 1 shifts and discards code data corresponding to the code length (CDS) that has already been decoded from the previous code data, and decodes the data of the maximum code length from the beginning of the remaining code data for the next decoding. The data is cut out as data for use and the same decoding process is performed.

[発明が解決しようとする課題] しかしながら、このような従来の復号回路においては、
復号を高速に行なうためROM等のメモリで復号表を構
成していているが、一般に復号表の容量は大きく、メモ
リのアクセス速度で復号速度が決定されるため、高速化
が困難であるという問題点があった。
[Problem to be solved by the invention] However, in such a conventional decoding circuit,
In order to perform high-speed decoding, a decoding table is configured using memory such as ROM, but the capacity of the decoding table is generally large, and the decoding speed is determined by the access speed of the memory, so it is difficult to increase the speed. There was a point.

本発明は、このような従来の問題点に鑑みてなされたも
ので、回路規模を増加させることなく復号を高速化でき
るる可変長符号の復号回路を提供することを目的とする
The present invention has been made in view of these conventional problems, and it is an object of the present invention to provide a variable length code decoding circuit that can speed up decoding without increasing the circuit scale.

[課題を解決するための手段] 第1図は本発明の原理説明図である。[Means to solve the problem] FIG. 1 is a diagram explaining the principle of the present invention.

まず本発明は、出現頻度の高いデータほど短い符号が割
り当てられた最大Mビットの可変長符号を入力して元の
固定長データを得る可変長符号の復号回路を対象とする
First, the present invention is directed to a variable-length code decoding circuit that receives a variable-length code of maximum M bits, in which a shorter code is assigned to data that appears more frequently, and obtains original fixed-length data.

このような復号回路につき本発明にあっては、可変長デ
ータを一時的に保持する符号データ入力手段1と;Nピ
ッ) (N≦M)以下の最短符号に対して論理和及び論
理積により該符号の符号長と該符号に対応する元の固定
長データを出力する最短符号群解読手段2と;全ての符
号に対して符号のパターンをアドレスとして該符号の符
号長と該符号に対応する元の固定長データを出力するよ
うに構成された復号テーブル3と;前記最短符号群解読
手段2により出力された固定長データと前記復号テーブ
ル3により出力された固定長データの一方を選択する第
1切替手段4と;前記最短符号群解読手段2により出力
された符号長と前記復号テーブルにより出力された符号
長のうちの一方を選択する第2切替手段5と;入力され
た可変長符号が前記最短符号群解読手段2により解読さ
れたか否かにより復号データのラッチタイミングを決定
してラッチ信号を出力するタイミング制御手段6と;前
記第1切替手段4により選択した固定長データを前記タ
イミング制御手段6で出力したラッチ信号によりラッチ
するラッチ手段7と:を具備し、前記タイミング制御手
段6は入力された可変長符号が前記最短符号群解読手段
2により解読された場合にのみ前記第第1及び第2切替
手段4゜5に最短符号群解読手段2の出力を選択するよ
うに指示すると共に、復号データのラッチタイミングを
、最短符号群解読手段2の処理時間に基づく早目のタイ
ミングに設定するように構成する。
In the present invention, for such a decoding circuit, a code data input means 1 for temporarily holding variable length data and a code data input means 1 for temporarily holding variable length data, and a code data input means 1 for temporarily holding variable length data; a shortest code group decoding means 2 for outputting the code length of the code and the original fixed length data corresponding to the code; for all codes, the code pattern is used as an address to output the code length of the code and the original fixed length data corresponding to the code; a decoding table 3 configured to output original fixed length data; a decoding table 3 configured to select one of the fixed length data outputted by the shortest code group decoding means 2 and the fixed length data outputted by the decoding table 3; 1 switching means 4; a second switching means 5 for selecting one of the code length output by the shortest code group decoding means 2 and the code length output by the decoding table; timing control means 6 for determining the latch timing of the decoded data depending on whether or not it has been decoded by the shortest code group decoding means 2 and outputting a latch signal; a latch means 7 for latching by the latch signal outputted by the means 6; and instructs the second switching means 4.5 to select the output of the shortest code group decoding means 2, and sets the latch timing of the decoded data to an earlier timing based on the processing time of the shortest code group decoding means 2. Configure it to do so.

[作用] このような構成を備えた本発明による可変長符号の復号
回路にあっては、符号長の短い可変長符号のみを高速処
理の可能な論理和および論理積を用いて復号することで
、出現頻度の高い符号を高速に復号でき、簡単な回路で
平均的な復号速度を向上させることができる。
[Operation] In the variable-length code decoding circuit according to the present invention having such a configuration, only variable-length codes with short code lengths can be decoded using logical sum and logical product that can be processed at high speed. , codes that appear frequently can be decoded at high speed, and the average decoding speed can be improved with a simple circuit.

例えば、第9図に示すGBTC方式の基準レベルLa成
分の符号表を用いた場合、全符号の76%が符号長4ビ
ツト以下であり、ROMのアクセス速度を200ns、
AND及びORを用いた論理回路による復号を50ns
とすると、復号速度の平均値は86nsとなり、2.3
倍の高速化を達成できる。
For example, when using the code table for the reference level La component of the GBTC system shown in FIG. 9, 76% of all codes have a code length of 4 bits or less, and the ROM access speed is 200 ns.
Decoding by logic circuit using AND and OR takes 50ns
Then, the average value of decoding speed is 86ns, which is 2.3
You can achieve twice the speed.

[実施例] 第1図は、本発明の係る可変長符号の復号回路の実施例
構成図である。
[Embodiment] FIG. 1 is a block diagram of an embodiment of a variable length code decoding circuit according to the present invention.

第1図において、まず端子10より符号データが順次符
号データ入力部1に入力される。符号データ入力部1は
符号データを最大符号長針の有効データ(COD E)
にまとめて切り出し出力する。
In FIG. 1, first, code data is sequentially input to the code data input section 1 from the terminal 10. The code data input section 1 inputs the code data into the maximum code long hand effective data (COD E).
Cut out and output all at once.

切り出された最大符号長針の符号データ(CODE)は
、復号テーブル3及び最短符号群解読部2の各々に入力
される。最短符号群解読部2と復号テーブル3は、入力
された符号データを並列に復号し、それぞれマルチプレ
クサ4とマルチプレクサ5に出力する。
The extracted code data (CODE) of the longest code length hand is input to each of the decoding table 3 and the shortest code group decoding unit 2. The shortest code group decoder 2 and the decoding table 3 decode the input code data in parallel and output them to the multiplexer 4 and the multiplexer 5, respectively.

ここで、復号テーブル3は従来回路に示したように、全
ての符号に対して符号パターンをアドレスとして各符号
の符号長と各符号に対応する元の固定長データを示す例
えば第9図に示す復号表をROMに格納している。これ
に対し最短符号群解読部2は、例えば指定符号長4以下
となる第9図の枠内に示す7種の符号群を入力して復号
データ、即ち固定長データ(EXDI)と符号長(CD
Sl)を出力する機能をもち、AND回路とOR回路の
組合せのみでなる論理回路で構成されており、ROMを
使用した復号テーブルに比べ復号速度が早い。例えばR
OMを使用した復号テーブルのアクセス速度200ns
に対し論理回路を使用した最短符号群解読部2の復号速
度は50nsと早い。
Here, as shown in the conventional circuit, the decoding table 3 shows the code length of each code and the original fixed length data corresponding to each code using the code pattern as an address for all codes. For example, as shown in FIG. The decoding table is stored in ROM. On the other hand, the shortest code group decoding unit 2 inputs, for example, seven types of code groups shown in the frame of FIG. CD
It has a function of outputting SL) and is composed of a logic circuit consisting only of a combination of an AND circuit and an OR circuit, and has a faster decoding speed than a decoding table using a ROM. For example, R
Decoding table access speed using OM: 200ns
On the other hand, the decoding speed of the shortest code group decoder 2 using a logic circuit is as fast as 50 ns.

このため予め指定しておいた符号長以下の符号データを
復号した時は、マルタプレクサ4とマルチプレクサ5に
おいて、最短符号群解読部2の復号結果を選択し、復号
データ(EXDI)はラッチ7に出力し、また符号長(
CDSI)は符号データ入力部1に出力する。一方、指
定長以上の符号データを復号した時は、マルチプレクサ
4とマルチプレクサ5において、復号テーブル3の復号
結果を選択し、復号データ(EXD2)はラッチ7に出
力し、符号長(CDS2)は符号データ入力部1に出力
する。ラッチ7は、タイミング制御部6からのラッチ信
号により、入力された復号データ(EXDI又は2)を
ラッチし、端子11に出力する。
Therefore, when code data with a pre-specified code length or less is decoded, the decoded result of the shortest code group decoder 2 is selected in the multiplexer 4 and the multiplexer 5, and the decoded data (EXDI) is output to the latch 7. and the code length (
CDSI) is output to the code data input section 1. On the other hand, when code data with a specified length or more is decoded, multiplexers 4 and 5 select the decoding result of the decoding table 3, the decoded data (EXD2) is output to the latch 7, and the code length (CDS2) is Output to data input section 1. The latch 7 latches the input decoded data (EXDI or 2) according to the latch signal from the timing control section 6 and outputs it to the terminal 11.

1個の符号データの復号が終了したら、タイミング制御
部6は、符号データ入力部1に次の符号データの準備を
指示する。符号データ入力部1は先の符号データから、
マルチプレクサ5で選択され、入力された符号長(CD
SI又は2)分の符号データをシフトして切り捨て、最
大符号長針のデータを切り出して次の復号用の信号(C
OD E)を作成し、次の信号の復号を行なう。
When the decoding of one piece of code data is completed, the timing control section 6 instructs the code data input section 1 to prepare the next code data. The code data input unit 1 receives the code data from the previous code data.
The code length (CD
The code data for SI or 2) is shifted and truncated, the data of the maximum code long hand is cut out, and the data for the next decoding signal (C
OD E) and decodes the next signal.

次に、第3図に示すタイミングチャートを用いて、復号
された信号の選択方法と、タイミング制御部6のラッチ
信号発生のタイミングについて具体的に説明する。ここ
で、タイミングチャートにおける1クロツクは、50n
sとする。
Next, the method of selecting a decoded signal and the timing of latch signal generation by the timing control section 6 will be specifically explained using the timing chart shown in FIG. Here, one clock in the timing chart is 50n
Let it be s.

まず、指定長以下の符号データを復号する場合、最短符
号群解読部2は、入力された符号データの各ビットを、
論理積と論理和を用いて復号し、復号データ(EXDI
)と符号長(CDSL)を復号すると共に、復号が有効
に行なわれたことを示す一致検出信号Eを出力する。タ
イミング制御部6は一致検出信号Eを受信すると、マル
チプレクサ4とマルチプレクサ5に対して、最短符号群
解読部2の出力信号を選択するように指示する。マルチ
プレクサ4で選択された復号データ(EXDl)は、復
号対象の復号データ(EXD)としてラッチ7に入力さ
れ、タイミング制御部6からのラッチ信号によりラッチ
7にラッチされ、端子11より出力される。また、マル
チプレクサ5で選択された符号長(CDSI)は、復号
対象の符号長(CDS)として符号データ入力部1に入
力される。
First, when decoding code data of a specified length or less, the shortest code group decoding unit 2 converts each bit of the input code data into
It is decoded using logical product and logical sum, and the decoded data (EXDI
) and code length (CDSL), and outputs a coincidence detection signal E indicating that decoding has been effectively performed. When the timing control section 6 receives the coincidence detection signal E, it instructs the multiplexer 4 and the multiplexer 5 to select the output signal of the shortest code group decoding section 2. The decoded data (EXDl) selected by the multiplexer 4 is input to the latch 7 as the decoded data (EXD) to be decoded, is latched by the latch 7 by a latch signal from the timing control section 6, and is output from the terminal 11. Further, the code length (CDSI) selected by the multiplexer 5 is input to the code data input unit 1 as the code length (CDS) to be decoded.

第3図のタイミングチャートにおける(nl)の部分は
、指定長以下の符号データの復号時におけるタイミング
制御部6からのラッチ信号発生のタイミングを示す。即
ち、符号データが入力され、復号が開始した後、1クロ
ツク以内に一致検出信号Eが最短符号群解読部2から出
力され、この−致検出信号Eに従って、復号開始後、1
クロツク(50ns)でラッチ信号を発生し、50ns
で1回の復号が終了する。
A portion (nl) in the timing chart of FIG. 3 indicates the timing of generation of a latch signal from the timing control section 6 when decoding code data of a specified length or less. That is, after code data is input and decoding is started, a coincidence detection signal E is outputted from the shortest code group decoder 2 within one clock, and according to this coincidence detection signal E, after decoding is started, 1
Generate a latch signal using the clock (50ns),
One round of decoding is completed.

一方、指定長以上の符号データを復号する時は、従来技
術と同様に、復号テーブル3を用いて復号する。復号テ
ーブル3は、入力された符号データから復号データ(E
XD2)と符号長(CDS2)を出力する。そして、タ
イミング制御部6は、−致検出信号Eを受信しないので
、マルチプレクサ4とマルチプレクサ5に対して復号テ
ーブル3の出力信号を選択するように指示する。マルチ
プレクサ4で選択された信号データ(EXD2)は、復
号対象の復号データ(EXD)としてラッチ7に入力さ
れ、タイミング制御部6からのラッチ信号により、ラッ
チ7にラッチされ、端子11より出力される。また、マ
ルチプレクサ5で選択された符号長(CDS2)は、復
号対象の符号長(CDS)として符号データ入力部1に
入力され、従来技術と同様に符号データをシフトして、
次の信号の切り出しを行なう。
On the other hand, when decoding code data having a specified length or more, decoding is performed using the decoding table 3 as in the prior art. The decoding table 3 extracts decoded data (E
XD2) and code length (CDS2) are output. Since the timing control section 6 does not receive the match detection signal E, it instructs the multiplexers 4 and 5 to select the output signal of the decoding table 3. The signal data (EXD2) selected by the multiplexer 4 is input to the latch 7 as the decoded data (EXD) to be decoded, is latched by the latch 7 according to the latch signal from the timing control unit 6, and is output from the terminal 11. . Further, the code length (CDS2) selected by the multiplexer 5 is inputted to the code data input unit 1 as the code length (CDS) to be decoded, and the code data is shifted as in the conventional technology.
Cut out the next signal.

このような復号テーブル3を選択した際のタイミング制
御部6からのラッチ信号発生のタイミングは、第3図に
示すタイミングチャートの(n2)部分となる。即ち、
符号データが入力され、復号が開始した後、タイミング
制御部6は、一致検出信号Eを受信しないので、ROM
のアクセス時間(200ns)を計算し、復号開始後2
00nsでラッチ信号が発生し、200nsで1回の復
号が終了する。
The timing at which the latch signal is generated from the timing control unit 6 when such a decoding table 3 is selected is at part (n2) in the timing chart shown in FIG. That is,
After the code data is input and decoding starts, the timing control unit 6 does not receive the coincidence detection signal E, so the timing control unit 6
2 after the start of decoding.
A latch signal is generated in 00 ns, and one decoding is completed in 200 ns.

このように、符号データ入力部1において、符号データ
を最大符号長針の有効データ(CODE)にまとめ、指
定長以下の符号データの復号は、最短符号群解読部2で
行ない、指定長以上の符号データの復号は、復号テーブ
ル3で行なうことにより、1画面分の符号データが復号
される。
In this way, the code data input unit 1 collects the code data into effective data (CODE) of the maximum code length, and decoding of the code data of the specified length or less is performed by the shortest code group decoding unit 2, and the code data of the specified length or more is decoded. The data is decoded using the decoding table 3, whereby coded data for one screen is decoded.

第4図は第2図に示した最短不幸群解読部2の具体的な
実施例構成図であり、第9図に示した復号表の枠内に示
した指定符号長4以下の場合を例にとっている。
FIG. 4 is a block diagram of a specific embodiment of the shortest unlucky group decoder 2 shown in FIG. I'm keeping it.

第9図の復号表の場合最大符号長は15であるが、第4
図の最短符号群解読部2に対しては先頭から指定符号長
4分となる符号ピッ) (ro r。
In the case of the decoding table in Fig. 9, the maximum code length is 15, but the
For the shortest code group decoder 2 shown in the figure, the code pip whose specified code length is 4 minutes from the beginning) (ro r.

12 I3)のみが入力される。12 I3) is input.

最短符号群解読部2は、プラス、マイナスの極性符号を
解読する符号解読用論理回路12と、符号長(CDSI
)を復号する符号長解読用論理回路14と、復号データ
の値(EXDI)を解読する復号値解読用論理回路16
で構成される。
The shortest code group decoding unit 2 includes a code decoding logic circuit 12 for decoding plus and minus polarity codes, and a code length (CDSI)
) for decoding the code length decoding logic circuit 14 and decoding value decoding logic circuit 16 for decoding the decoded data value (EXDI).
Consists of.

符号解読用論理回路12の論理式は次式で与えられる。The logical formula of the code decoding logic circuit 12 is given by the following formula.

5=Io11 I2 13 +1.I、12 I、+1.I、  I2 また符号長解読用論理回路の論理式は次式で与えられる
5=Io11 I2 13 +1. I, 12 I, +1. I, I2 The logical formula of the code length decoding logic circuit is given by the following formula.

更に復号値解読用論理回路16の論理式は次式で与えら
れる。
Furthermore, the logical formula of the decoded value decoding logic circuit 16 is given by the following formula.

Vo”IoIt V1=IOII V2  =Io  11 I2 Vi  ”Io  II  I2 これらの論理式から明らかなように、論理回路12.1
4はAND回路とOR回路の組合せ、論理回路16はA
ND回路のみで構成することができ、その結果、50n
sという高速の復号速度を実現することができる。
Vo”IoIt V1=IOII V2 =Io 11 I2 Vi ”Io II I2 As is clear from these logical formulas, the logic circuit 12.1
4 is a combination of AND circuit and OR circuit, logic circuit 16 is A
It can be configured with only ND circuits, and as a result, 50n
A decoding speed as high as s can be achieved.

尚、上記の実施例は第5図に示したGBTCの基準レベ
ルLaの符号化データの復号回路を例にとるものであっ
たが、適宜の符号化データの復号につきそのまま適用す
ることができる。
Although the above embodiment takes as an example the decoding circuit for encoded data of the GBTC reference level La shown in FIG. 5, it can be applied as is to decoding appropriate encoded data.

また論理回路で実現する最短符号群解読部2の復号対象
となる符号群を決める指定長は、全体的な復号速度を向
上できる範囲であれば、必要に応じて適宜に定めること
ができる。
Further, the specified length for determining the code group to be decoded by the shortest code group decoding unit 2 implemented by a logic circuit can be appropriately determined as necessary, as long as the overall decoding speed can be improved.

[発明の効果] 以上説明したように本発明によれば、出現頻度の高い符
号に対しては高速復号の可能な論理和および論理積を用
いた復号回路が使用されるため、平均的な復号速度を向
上させることができ、復号回路の性能向上に大きく寄与
できる。
[Effects of the Invention] As explained above, according to the present invention, a decoding circuit using logical sum and logical product that can perform high-speed decoding is used for codes that appear frequently, so that average decoding is possible. The speed can be improved, and this can greatly contribute to improving the performance of the decoding circuit.

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

第1図は本発明の原理説明図; 第2図は本発明に係る可変長符号の復号回路の実施例構
成図; 第3図は第2図に実施例における復号処理のタイミング
チャート; 第4図は第2図の最短符号群解読部の実施例構成図; 第5図はGBTCアルゴリズムの説明図;第6図は符号
表の構成説明図; 第7図は復号表の構成説明図; 第8図は従来の復号回路のブロック図;第9図は実際の
可変長符号の復号表説明図である。 図中、 1:符号データ入力手段 2:最短符号群解読手段 3:復号テーブル 4:第1切替手段(マルチプレクサ) 5:第2切替手段(マルチプレクサ) 6:タイミング制御手段 7:ラッチ手段 10.11:端子 12:符号解読用論理回路 14:符号長解読用論理回路 16:復号値解読用論理回路 今発日月のM暫号眉−?@轟九名下の黄児1ダ[横八起
第4図 368−
FIG. 1 is a diagram explaining the principle of the present invention; FIG. 2 is a configuration diagram of an embodiment of a variable length code decoding circuit according to the present invention; FIG. 3 is a timing chart of decoding processing in the embodiment in FIG. 2; The figure is a diagram of an embodiment of the shortest code group decoding unit in Figure 2; Figure 5 is an explanatory diagram of the GBTC algorithm; Figure 6 is an explanatory diagram of the configuration of the code table; Figure 7 is an explanatory diagram of the configuration of the decoding table; FIG. 8 is a block diagram of a conventional decoding circuit; FIG. 9 is an explanatory diagram of an actual variable length code decoding table. In the figure, 1: code data input means 2: shortest code group decoding means 3: decoding table 4: first switching means (multiplexer) 5: second switching means (multiplexer) 6: timing control means 7: latch means 10.11 : Terminal 12: Logic circuit for code decoding 14: Logic circuit for code length decoding 16: Logic circuit for decoding decoded value Today's date and month's M temporary code eyebrows -? @Koji 1 da under Todoroki 9 [Yokohachi 4th figure 368-

Claims (1)

【特許請求の範囲】[Claims] (1)出現頻度の高いデータほど短い符号が割り、当て
られた最大Mビットの可変長符号を入力して、元の固定
長データを得る可変長符号の復号回路に於いて、 可変長データを一時的に保持する符号データ入力手段(
1)と; Nビット(N≦M)以下の最短符号に対して論理和及び
論理積により該符号の符号長と該符号に対応する元の固
定長データを出力する最短符号群解読手段(2)と; 全ての符号に対して符号のパターンをアドレスとして該
符号の符号長と該符号に対応する元の固定長データを出
力するように構成された復号テーブル(3)と; 前記最短符号群解読手段(2)により出力された固定長
データと前記復号テーブル(3)により出力された固定
長データの一方を選択する第1切替手段(4)と; 前記最短符号群解読手段(2)により出力された符号長
と、前記復号テーブル(3)により出力された符号長の
うちの一方を選択する第2切替手段(5)と; 入力された可変長符号が前記最短符号群解読手段(2)
により解読されたか否かにより復号データのラッチタイ
ミングを決定してラッチ信号を出力するタイミング制御
手段(6)と; 前記第1切替手段(4)により選択した固定長データを
前記タイミング制御手段(6)で出力したラッチ信号に
よりラッチするラッチ手段(7)と; を具備し、前記タイミング制御手段(6)は入力された
可変長符号が前記最短符号群解読手段(2)により解読
された場合にのみ前記第1及び第2切替手段(4)(5
)に最短符号群解読手段(2)の出力選択を指示すると
共に、前記ラッチ手段(7)に対するラッチタイミング
を前記最短符号群解読手段(2)の処理時間に基づく早
目のタイミングに設定することを特徴とする可変長符号
の復号回路。
(1) A shorter code is assigned to data that appears more frequently, and the variable length code decoding circuit inputs the assigned variable length code of maximum M bits to obtain the original fixed length data. Temporarily held code data input means (
1) and; Shortest code group decoding means (2) which outputs the code length of the code and the original fixed length data corresponding to the code by logical sum and logical product for the shortest code of N bits (N≦M) or less; ); and a decoding table (3) configured to output the code length of each code and the original fixed length data corresponding to the code using the code pattern as an address for each code; and the shortest code group. a first switching means (4) for selecting either the fixed length data outputted by the decoding means (2) or the fixed length data outputted by the decoding table (3); by the shortest code group decoding means (2); a second switching means (5) for selecting one of the output code length and the code length output from the decoding table (3); the input variable length code is selected by the shortest code group decoding means (2); )
a timing control means (6) that determines the latch timing of the decoded data depending on whether the data has been decoded by the decoded data and outputs a latch signal; ); and a latch means (7) for latching by a latch signal outputted by the timing control means (6), when the input variable length code is decoded by the shortest code group decoding means (2). Only the first and second switching means (4) (5
) to select the output of the shortest code group decoding means (2), and setting the latch timing for the latch means (7) to an earlier timing based on the processing time of the shortest code group decoding means (2). A variable length code decoding circuit characterized by:
JP21346889A 1989-08-18 1989-08-18 Decoding circuit for variable length code Pending JPH0376469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21346889A JPH0376469A (en) 1989-08-18 1989-08-18 Decoding circuit for variable length code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21346889A JPH0376469A (en) 1989-08-18 1989-08-18 Decoding circuit for variable length code

Publications (1)

Publication Number Publication Date
JPH0376469A true JPH0376469A (en) 1991-04-02

Family

ID=16639706

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21346889A Pending JPH0376469A (en) 1989-08-18 1989-08-18 Decoding circuit for variable length code

Country Status (1)

Country Link
JP (1) JPH0376469A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996042169A1 (en) * 1995-06-12 1996-12-27 S3, Incorporated Video decoder with dedicated mpeg processor
US7233702B2 (en) 2001-03-21 2007-06-19 Ricoh Company, Ltd. Image data compression apparatus for compressing both binary image data and multiple value image data
JP2014116835A (en) * 2012-12-11 2014-06-26 Toshiba Corp Decoding device, encoding device, decoding method and encoding method
JP2017153124A (en) * 2017-04-12 2017-08-31 株式会社東芝 Decoding device and decoding method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996042169A1 (en) * 1995-06-12 1996-12-27 S3, Incorporated Video decoder with dedicated mpeg processor
US5818967A (en) * 1995-06-12 1998-10-06 S3, Incorporated Video decoder engine
US7233702B2 (en) 2001-03-21 2007-06-19 Ricoh Company, Ltd. Image data compression apparatus for compressing both binary image data and multiple value image data
JP2014116835A (en) * 2012-12-11 2014-06-26 Toshiba Corp Decoding device, encoding device, decoding method and encoding method
JP2017153124A (en) * 2017-04-12 2017-08-31 株式会社東芝 Decoding device and decoding method

Similar Documents

Publication Publication Date Title
US6008847A (en) Temporal compression and decompression for video
US4316222A (en) Method and apparatus for compression and decompression of digital image data
EP0448802A2 (en) Dynamic model selection during data compression
JP3007496B2 (en) Variable length decoder
US4101934A (en) Coding system
JPH06141295A (en) Versatile escape run level coder for digital video coder
GB2274224A (en) Image data compression
GB2274956A (en) Run length data compression
JP2831888B2 (en) HDTV decoder
US5648774A (en) Variable length coding with three-field codes
US5663725A (en) VLC decoder with sign bit masking
JP2954438B2 (en) Encoding device
JPH0376469A (en) Decoding circuit for variable length code
JPH08275168A (en) Method and apparatus for run-length coding
JPH10271016A (en) Encoder/decoder
JPH06350854A (en) Picture compression encoding device
JP3231800B2 (en) Image encoding apparatus and image encoding method
JP3389391B2 (en) Variable-length code encoding and division apparatus
US7974484B2 (en) JBIG coding and decoding system
US4782400A (en) System for encoding or decoding analog video signals
JPH033440B2 (en)
JP2002369010A (en) Image coder and image decoder
JPH01272326A (en) Method and system of delta modulation encoder/decoder
US5736945A (en) Circuit for zero-run developing RUN/LEVEL sets and method for zero-run developing the same
JPH04100390A (en) High efficient encoding system