JPH04207323A - Encoder circuit - Google Patents

Encoder circuit

Info

Publication number
JPH04207323A
JPH04207323A JP2337615A JP33761590A JPH04207323A JP H04207323 A JPH04207323 A JP H04207323A JP 2337615 A JP2337615 A JP 2337615A JP 33761590 A JP33761590 A JP 33761590A JP H04207323 A JPH04207323 A JP H04207323A
Authority
JP
Japan
Prior art keywords
length
input
data
circuit
variable
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
JP2337615A
Other languages
Japanese (ja)
Other versions
JP3083153B2 (en
Inventor
Mitsuo Yamazaki
山崎 充夫
Kazuo Konishi
和夫 小西
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP02337615A priority Critical patent/JP3083153B2/en
Publication of JPH04207323A publication Critical patent/JPH04207323A/en
Application granted granted Critical
Publication of JP3083153B2 publication Critical patent/JP3083153B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To obtain an encoder circuit capable of performing fast encoding by deciding the time interval of input of input data based on the processing time of a variable length-fixed length conversion circuit. CONSTITUTION:The input of the input data to a variable length encoder circuit 3 is controlled by an input control circuit 2, and a control means 12 controls the input control circuit 2 so as to vary the time interval of input of the input data corresponding to the processing time of the variable length-fixed length conversion circuit 4. For example, to what bit length the input data is converted by the variable length encoder circuit 3 is found by a bit length generation circuit 11, and the control means 12 conforms the time interval of input of the input data to the processing time of the variable length-fixed length conversion circuit 4 by controlling the input control circuit 2 based on the bit length. Thereby, it is possible to eliminate null time to interrupt the processing of the variable length-fixed length conversion circuit 4, which accelerates encoding.

Description

【発明の詳細な説明】 1発明の目的] (産業上の利用分野) 本発明は符号化回路に関し、特に2画像圧縮のためのハ
フマン符号を固定長データに変換するものに好適の符号
化回路に関する。
[Detailed Description of the Invention] 1. Object of the Invention] (Industrial Application Field) The present invention relates to an encoding circuit, and particularly to an encoding circuit suitable for converting a Huffman code into fixed length data for two-image compression. Regarding.

〈従来の技術) 近年、電子機器におけるディジタル技術の進歩は著し、
い。ディジタル画像処理技術の分野においては、画像圧
縮技術の進歩に目覚ましいものがある。この画像圧縮技
術は、ディジタル伝送及び記録等、の効率を向」−させ
るために、より小さいビットレイトで画像を符号化する
技術である。この技術としては、予測符号化技術及び直
交符号化技術(ITV画像の多次元信号処理J吹抜敬彦
著、1」刊丁−業新開社刊に詳述)等がある。更に、こ
れらの符号化によって圧縮された符号に対して、可変長
符号化を施すことによって、更に一層の画像圧縮が可能
である。可変長符号化は符号の発生頻度に応じて、符号
化のビット幅を変化させるものであり、固定長符号に比
してビットレイトを小さくすることがてきる。
<Conventional technology> In recent years, digital technology in electronic devices has made remarkable progress.
stomach. In the field of digital image processing technology, there has been remarkable progress in image compression technology. This image compression technique is a technique for encoding images at a smaller bit rate in order to improve the efficiency of digital transmission and recording. Examples of this technology include predictive coding technology and orthogonal coding technology (described in detail in ``Multidimensional Signal Processing of ITV Images'' by Takahiko Fukinuki, 1'' published by Kancho-Gyoshinkaisha). Furthermore, by applying variable length encoding to the codes compressed by these encodings, even further image compression is possible. Variable-length encoding changes the encoding bit width depending on the frequency of code occurrence, and can reduce the bit rate compared to fixed-length encoding.

次に、可変長符号の一例としてハフマン符号の生成方法
を第3図を参照して説明する。第3図(2i)はハフマ
ン符号の生成過程を示し、第3[閘(1))はハフマン
符号の木を示し、ている。
Next, a method for generating a Huffman code as an example of a variable length code will be explained with reference to FIG. FIG. 3 (2i) shows the Huffman code generation process, and the third block (1) shows the Huffman code tree.

いま、1便の固定長符号Sl 、 S2 、・・・、S
lをハフマン杓号に変換するものとする。第3図はt・
・6の場合の例を示している。先ず、これらの箱号S1
乃干S6をその発生頻度(生起確率)が大きい順に並へ
る。符号S1乃至80のべ一起i +;は、第3図<a
)に示ず」、うに、夫々0.3!]、 0.70゜0.
15.0.15.0.10.0.05であり、符号S1
乃な]S6の順に並べられている。次に、生起確率が最
も小さい方から2つの符号を1組どして、七の自成確i
(2つの生起確率の和)を求める。第31図て゛は、符
号S6 、S5の生起確率か小さく、その合成確率は0
.15である。
Now, the fixed length codes Sl, S2,...,S of one flight are
Let l be converted to a Huffman ladle number. Figure 3 shows t.
- An example of case 6 is shown. First, these box numbers S1
The Noji S6 are arranged in descending order of frequency of occurrence (probability of occurrence). The sum i + of the symbols S1 to 80 is shown in FIG.
), sea urchin, 0.3 each! ], 0.70°0.
15.0.15.0.10.0.05, and the code S1
[Nona] S6. Next, we combine the two codes starting from the one with the smallest probability of occurrence to create a set of seven self-probable i
Find (the sum of two occurrence probabilities). In Figure 31, the probability of occurrence of codes S6 and S5 is small, and their combined probability is 0.
.. It is 15.

次に、この1組と他の符号について、生起確率(又は合
成確率)が大きい順に並べ変える。次いで、生起確率(
又は合成iI率)か鼓も小さい力から2つの符号(又は
組)を新たな1組として、その合成確率を求める。以後
、これらの処理を繰返し5、第3図(a>に示すように
、合成確率が1となるまて並ひ変えを石う。
Next, this set and other codes are rearranged in descending order of probability of occurrence (or composite probability). Next, the probability of occurrence (
From the small force, the two codes (or combinations) are set as a new set, and the combined probability is determined. Thereafter, these processes are repeated 5 until the combined probability becomes 1, as shown in FIG.

次に、第3図<a>に基づいて、第3r間(b)に示す
符号の木を作成する。そして、この符号の木の枝分かれ
に従って′0゛と]“′を割当てる4、第3図()))
ては、−上側の枝を“’0”、l・側の枝を1′°にし
ている。この枝分かれに沿ってハノマ〉′符号を得る。
Next, based on FIG. 3 <a>, a code tree shown in the third r interval (b) is created. Then, according to the branching of this code tree, '0゛ and]' are assigned 4, Figure 3 ()))
In this case, the − upper branch is set to “0” and the l· side branch is set to 1′°. Along this branch, we obtain the Hanoma〉′ code.

例えば、固定長符号84は、第3図(+))の太線で示
すように、“0゛の枝を通り、“1”の枝を通り、最後
に“O゛の枝を通ることによって、”010”″という
ハフマン符号に変換される。このようにして求めた符号
81乃至S6のハフマン符号を下記第1表に示す。
For example, the fixed length code 84 passes through the "0" branch, the "1" branch, and finally the "O" branch, as shown by the thick line in FIG. 3 (+). The Huffman codes of codes 81 to S6 thus obtained are shown in Table 1 below.

第1表 この第1表に示すように、生起確率が高い場合には短い
ビット長のハフマン符号に変換され、生起確率が低い場
合には長いビット長のハフマン符号に変換される9これ
により、全体ではビットレイトを低減することができる
Table 1 As shown in Table 1, when the probability of occurrence is high, it is converted to a Huffman code with a short bit length, and when the probability of occurrence is low, it is converted to a Huffman code with a long bit length.9As a result, The overall bit rate can be reduced.

ところて、最近、画像データの圧縮力法の標準化が検討
されている。この標準的な画像圧縮技術によると、第4
図番ご示ずように、画像データをハフマン符号化し2だ
後に、その下位ビットにイ」加データを付加するように
なっている。付加データとしては有効ビットのみをイ」
加する。例えば、十進表現の“1パと°15“とでは2
進表現におけるビット数が異なる(]ビット、4ビツト
)ように、有効ビットのみによって構成された付加デー
タもハフマン符号と同様に可変長符号である。なお、付
加データは下位ビット側が有効ビットとなることから、
付加データについてはLSB(fi下位ビット)から順
に配列するLSBファーストでハフマン符号に付加して
いる。
Recently, standardization of image data compression force methods has been considered. According to this standard image compression technique, the fourth
As shown in the figure, after the image data is Huffman encoded, additional data is added to the lower bits. Only valid bits are included as additional data.
add For example, “1 pa and °15” in decimal representation are 2
Just as the number of bits in the decimal representation is different (] bit, 4 bits), additional data made up of only effective bits is also a variable length code like the Huffman code. Note that the lower bit side of the additional data is the valid bit, so
The additional data is added to the Huffman code in LSB first order, starting from the LSB (lower bits of fi).

このような可変長の符号化データを記録する場合には、
記録素子の入力フォーマットに基づいて可変長の符号化
データを固定長に変換して記録する必要がある。例えは
、記録素子として1. Cカーニドを採用した場合には
、入出力は]パイ1〜雫イーαで行われており、符号化
データを8ヒッl−の固定長に変換しなければならない
When recording such variable length encoded data,
It is necessary to convert variable-length encoded data into fixed-length data based on the input format of the recording element before recording. For example, as a recording element, 1. When a C carnide is adopted, input/output is performed in ]pi1~shizukueα, and the encoded data must be converted to a fixed length of 8hill−.

第5図はこのような可変長のハフマン符号デー夕を8ヒ
ツトの固定長データに変換して出力する従来の符号化回
路を示すブロック図である。また、第6図は第5図中の
入力クロック発生回路5の動作を説明するためのフロー
チャートである。
FIG. 5 is a block diagram showing a conventional encoding circuit that converts such variable length Huffman code data into 8-hit fixed length data and outputs the converted data. Further, FIG. 6 is a flowchart for explaining the operation of the input clock generation circuit 5 in FIG. 5.

入力端子1を介して画像データ等の入力データを入力し
、て入力制御回I!@2に与える。入力制御回路2は入
力クロックのタイミングで入力データを取り込んでハフ
マン符号化回路3 G: ’pえている。
Input data such as image data is input through the input terminal 1, and the input control circuit I! Give to @2. The input control circuit 2 takes in input data at the timing of the input clock and outputs it to the Huffman encoding circuit 3.

ハフマン符号化回路3は入力されたデータをハフマン符
号に変換すると共に、付加データをイ」加し、て可変長
−固定長変換回路4に出力する。可変長−固定長変換回
B4は入力された可変長データを所定ビットの固定長デ
ータに変換して出力する。
The Huffman encoding circuit 3 converts the input data into a Huffman code, adds additional data, and outputs it to the variable length-fixed length conversion circuit 4. The variable length-fixed length conversion circuit B4 converts the input variable length data into fixed length data of predetermined bits and outputs the converted data.

いま、例えば、ハフマン符号化回路3から連続し、て出
力される2つのり変長データA、Bが、第7図(a)、
(b)の斜線部に示すように、人々21ピッ1.12ビ
ットで構成されているものとする。0I変長−固定長変
換回n4が、入力し、た可変長データP例えば1クロツ
ク毎に8ヒツト長の固定長データに変換して出力するも
のとすると、可変1(データAは2クロツクで21ビッ
ト中の16ピツトか固定長に変換されて出力される98
ヒツトに満たないことから固定具に変換されずに残った
可変長データAの残りの5ヒッl−(息子、余すビット
という)は、次の可変長データBの先頭に付加される。
Now, for example, two variable length data A and B successively output from the Huffman encoding circuit 3 are as shown in FIG. 7(a).
As shown in the shaded area in (b), it is assumed that the data is composed of 21 bits and 1.12 bits. 0I variable length-fixed length conversion circuit n4 converts the input variable length data P into fixed length data of 8 hits every 1 clock and outputs it. 16 pits out of 21 bits or 98 converted to fixed length and output
The remaining five bits (referred to as "sons" or "remaining bits") of the variable length data A, which are not converted into fixed data because they are less than a hit, are added to the beginning of the next variable length data B.

こうして、可変長−固定長変換回路4は次に第7図(b
)に示す]7ビ・y、 t−iのl可変長データを固定
長に変換する。この場合には、2クロツクで17ビツト
中の16ビツトが固定長に変換されて出力され、残りの
1ビットは次のデータの先頭に付加される。こうして、
=ir変長−固定長変換回路4は順次8ピッl−長の固
定長データを出力する。
In this way, the variable length-fixed length conversion circuit 4 is then configured as shown in FIG.
) Converts the variable length data of 7biy, ti to fixed length. In this case, 16 bits out of 17 bits are converted to a fixed length in two clocks and output, and the remaining 1 bit is added to the beginning of the next data. thus,
=ir The variable length-fixed length conversion circuit 4 sequentially outputs fixed length data of 8-pill length.

このように、可変長データを1バイト単位の固定長デー
タに変換するために必要とする時間は可変長データのデ
ータ長に基づくものとなる。なお、可変長−固定+、、
S:、換回路4が1り1]ツタ毎に8ビツト長の固定長
データに変換する場合でも、実際には余りヒツトを次の
データにイ」加づる処理等が必要であり、例えば25ビ
ット長のデータを固定長に変換するためには5クロツク
の時間が必要である。
In this way, the time required to convert variable length data into fixed length data in 1-byte units is based on the data length of the variable length data. In addition, variable length - fixed +,,
S:, even when converting circuit 4 converts data into fixed length data of 8 bit length for each data, it is actually necessary to add the remaining data to the next data, for example, 25 bits. It takes five clocks to convert bit length data to fixed length data.

ここで、入力データの最大ビット数が25ビットである
ものとする。この場合には、可変長−固定長変換回路4
の処理時間を考慮して、入力クロック発生回路らからの
入力クロックによって、入力データを5クロツク毎に入
力させるように制御している。この入力クロック発生回
路5はダウンカウンタ6、フリップフロップ(以下、F
Fという)7及びインバータ8によって構成している。
Here, it is assumed that the maximum number of bits of input data is 25 bits. In this case, the variable length-fixed length conversion circuit 4
In consideration of the processing time, the input data is controlled to be input every five clocks using the input clock from the input clock generation circuit. This input clock generation circuit 5 includes a down counter 6, a flip-flop (hereinafter referred to as F
7 and an inverter 8.

ダウンカウンタ6は、入力端子りに“3゛が入力され、
ロード端LDがローレベル(以下、“L”という)にな
ると、カウント出力を“3”にプリセットする。ダウン
カウンタ6は第6図(a、 )に示すクロックCKがI
j−えられて、ブリセラ1〜値“3′″からダウンカウ
ントを開始して、第6図(d)に示ずカウント出力を出
力端イQから出力する。
The down counter 6 receives "3" from the input terminal, and
When the load terminal LD becomes low level (hereinafter referred to as "L"), the count output is preset to "3". The down counter 6 is connected to the clock CK shown in FIG.
J- is counted, the counter starts counting down from the value 1 to 3', and outputs a count output from the output terminal Q, not shown in FIG. 6(d).

カウント出力がOになると、ダウンカウンタ6は第6図
(b)に示すリップルキャリーをFドアの入力端子りに
出力する。F’ F 7は、第6図り(コ)に示すよう
に、次のクロックCKのタイミングで入力クロックを出
力する。この人力クロ・ツクを入力制御回B2に墜える
と共に、インバータ8を介してロード端10に与える。
When the count output reaches O, the down counter 6 outputs the ripple carry shown in FIG. 6(b) to the input terminal of the F door. F'F7 outputs the input clock at the timing of the next clock CK, as shown in the sixth diagram (c). This human power clock is input to the input control circuit B2 and is applied to the load end 10 via the inverter 8.

以後同様の動作が縁り返さ1L、第6図(a)。Thereafter, the same operation is repeated at 1L, Fig. 6(a).

<c>に示すように、5クロツク毎に大力クロックが発
生ずる。入力制御回路2は、この入力クロックに同期し
て、入力データをハフマン符号化回路3に与えている。
As shown in <c>, a high power clock is generated every 5 clocks. The input control circuit 2 provides input data to the Huffman encoding circuit 3 in synchronization with this input clock.

ところで、前述したように、可変長データのデータ長か
比較的短い場合には、可変長−固定長変換に要する時間
も短い。例えば、入力データが入力されてから3クロツ
ク後に可変長−固定長変換が終了することもある。この
場合でも2次の入力クロックが入力されるまては次の入
力データは入力されない。したがって、この場合には、
2クロツク期間たけ処理が行われない空き時間が可変長
−固定長変換回路4に発生ずることになり、高速に初号
化を行っことができない6 例えば、電、子メチ/lカメラの画像データH−縮用と
して採用した場合には、メモリカードに対する書込みに
長時間を要してしまうことから、比較的¥い速度で速写
することができないという間8点があった。
By the way, as described above, when the data length of variable length data is relatively short, the time required for variable length to fixed length conversion is also short. For example, variable length to fixed length conversion may be completed three clocks after input data is input. Even in this case, the next input data will not be input until the secondary input clock is input. Therefore, in this case,
This results in vacant time in which no processing is performed for two clock periods in the variable-length/fixed-length conversion circuit 4, making it impossible to perform initial encoding at high speed6. When used for H-reduction, it took a long time to write to the memory card, so it was rated 8 points, meaning that it was not possible to take quick pictures at a relatively fast speed.

(発明が解決15ようとする課題) このように、」−述し、た従来の符号化回路においては
、可変長−同定長変換処理に空き時間が発生してしてお
り、変換処理に長時間を要するという問題点があった。
(Problems to be Solved by the Invention 15) As described above, in the conventional encoding circuit mentioned above, there is idle time in the variable length-to-identified length conversion process, and the conversion process takes a long time. There was a problem that it took time.

本発明はかかる問題点に鑑みてなされたものであ・−)
で、高速処理を可能にすることができる符号化回路を提
供することを目的とする。
The present invention was made in view of such problems.
The present invention aims to provide an encoding circuit that can perform high-speed processing.

1発明の構成] (課題を解決するだめの一1′811)本発明の請求項
1に係る符号化回路は、人力データを用変長符ぢ化して
可変長データを出力″4る可変長符号化回路と、前記り
変長データを所定のし・・・1・長の固定長データに変
換して出力するilJ変長−固定長変換回路とを↓A備
した右回化回路において、前記入力う一一夕の前記■1
変長符号化回路への入力を制御棒る入力制御回路と、i
iJ記可変艮−固定長変換回路の処理時間に応し5て前
記入力データの入力の時間間隔を変化させるように前記
入力制御回路を制御する制御1段とを貝偏しまたことを
特徴とするものてあり、 本発明の請求項2に係る符号化回路は、入力データを6
■変長符号化して+1!変長データを出力する可変長符
号化回路と、前記vU変長データを所定のビット長の固
定長データに変換して出力する可変長−固定長変換回路
とを具備し、た符号化回路において、前記入力データの
′i+1」記i”T変長符号化回路への入力を制御する
入力制御回路と、前記入力制御回路の出力がうえられ°
ζ人人力−タが′ii1」記q変長符↓じ化回路により
右回化された場合のビ・i、 l・長を求めるビット1
(発生回路と、このし′ツl−長発牛回路が求めたしツ
l−長に基ついて荊記入)J制御回路を制御することに
よりWii記入内入力データ力の時間間隔を前記n]変
長 固定長変換回路の処理時m1に一致させる制御手段
とを具備し、たものて′ある。
1. Configuration of the Invention] (Part 1 of the Solution to the Problem 1'811) The encoding circuit according to claim 1 of the present invention converts manual data into a variable length code and outputs variable length data. In a clockwise conversion circuit comprising an encoding circuit and an ilJ variable length-fixed length conversion circuit that converts the variable length data into fixed length data of a predetermined length of 1 and outputs it, The above-mentioned input is done overnight (■1)
an input control circuit for controlling input to the variable length encoding circuit;
5. A control stage for controlling the input control circuit so as to vary the input time interval of the input data according to the processing time of the variable length to fixed length conversion circuit. The encoding circuit according to claim 2 of the present invention converts input data into 6
■+1 for variable length encoding! An encoding circuit comprising: a variable length encoding circuit that outputs variable length data; and a variable length-fixed length conversion circuit that converts the vU variable length data into fixed length data of a predetermined bit length and outputs the converted length data. , an input control circuit for controlling the input of the input data to the i''T variable length encoding circuit, and an output of the input control circuit.
Bit 1 to find the bi-i and l-length when the ζhuman power data is right-handed by the q variable length sign ↓ conversion circuit.
(Enter the time interval of the input data in the Wii input by controlling the J control circuit.) The variable length and fixed length conversion circuits are equipped with control means for matching m1 during processing.

(作用) 本発明においては、入力制御回路によって、入力データ
のIjJ−変長符号化回路への入力が制御されている6
制御手段は、入力データの入力の時間間隔を可変長−固
定長変換回路の処理時間に応じて変化させるように入力
制御回路を制御している。
(Function) In the present invention, input of input data to the IjJ-variable length encoding circuit is controlled by the input control circuit6.
The control means controls the input control circuit so as to change the input time interval of the input data according to the processing time of the variable length-fixed length conversion circuit.

例えば、可変長符号化回路により入力データが何ピッ)
・長に変換されるかをビット長発生回銘によって求め、
このビット長に基づいて制御手段が入力制御回路を制御
して、入力データの入力の時間間隔を可変長−固定長変
換回路の処理時間に一致させる。これにより、可変長−
固定長変換回路の処理が中断する空き時間がなくなり、
高速の符号化かり能となる。
For example, how many bits of input data is processed by a variable length encoding circuit?
・Determine whether it is converted to a long bit length by the bit length generation record,
Based on this bit length, the control means controls the input control circuit to match the input time interval of the input data with the processing time of the variable length-fixed length conversion circuit. This allows variable length −
There is no longer any free time for the fixed length conversion circuit to interrupt processing.
This enables high-speed encoding.

(実施例) 以1・゛、図面を参照して本発明の実施例について説明
する。第1図は本発明に保る符号化回路の一実施例を示
すブロック図である。第1図において第5図と同一の構
成索累には同一符号を(=t してある。
(Embodiments) 1. Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of an encoding circuit according to the present invention. In FIG. 1, the same constituent elements as in FIG. 5 are designated by the same symbols (=t).

入力端子1には画像データ等の入力データを入力揮−る
。この人カデ゛−夕を入力制御回路2に与える8人力制
御回路2は人カクllTlツクのタイミングで入力デー
タを取り込んでハフマン符号化回路3に与えると共に、
ビット長発件回路11にも与える。
An input terminal 1 receives input data such as image data. The human power control circuit 2, which provides this person data to the input control circuit 2, takes in the input data at the timing of the person start and provides it to the Huffman encoding circuit 3.
It is also given to the bit length generating circuit 11.

ハフマン符号化回路3は入力されたデータをハフマン符
号に変換すると共に、変換し/ごハフマン符号にイ・1
加データを付加してil変長−固定((変換回路4に出
力する。可変長−固定長変換回路4は入力されたh]変
長データを8ピッ1−のパラレル固定長データに変換し
て出力するようになっている。
The Huffman encoding circuit 3 converts the input data into a Huffman code, and also converts the input data into a Huffman code.
Adding the additional data, il variable length-fixed ((output to the conversion circuit 4. The variable length-fixed length conversion circuit 4 converts the input h] variable length data into 8-pips 1-parallel fixed length data. It is designed to be output as follows.

本実施例においては入カク17ツクは入力クロック発生
回路12によって発生する、入力タロツク発生回路12
はダウンカウンタ(〉、FF7及びインバータ8の外に
、FF13.1/i、 15及び加算器16を有し、て
いる。F’ F 13にはビット長発生回路11の出力
が入力される。ビット長介在回路11は、T’(、OM
等によって構成しており、入力データによって示される
アドレスに、この人力データをハフマン符すに変換し、
て+r加じットを付加(、た場合のじツト長を示すデー
タを格納している。ピッl−に発件回路11は入力デー
タが入力されると、この入力データに対するハフマン符
号化回路3の出力のピット長のデータを出力するように
なっている、FF13は入力クロックのタイミングでし
ツ)−長発生回giiの出力を加算器16に出力する。
In this embodiment, the input clock 17 is generated by the input clock generation circuit 12.
In addition to the down counter (>), FF 7 and inverter 8, it has FFs 13.1/i and 15 and an adder 16. The output of the bit length generation circuit 11 is input to F'F 13. The bit length intervening circuit 11 has T'(, OM
etc., and converts this human data into a Huffman code to the address indicated by the input data,
When input data is input to the input data, the output circuit 11 stores data indicating the length when +r is added (,). The FF 13 outputs the pit length data of the output of 3, and outputs the output of the long generation time gii to the adder 16 at the timing of the input clock.

加算器16はi’FI3.ff5の出力を加算し2、加
算結果の1位3ビツトをFF14に与え、下位3ピツI
へをFF15に与える。FF15は入力クロックのタイ
ミングで加算器16出力の下位3ビツトを加算器16に
出力する。FF14は入力クロックのタイミンクで加算
器16出力の上位3ビツトをダウンカウンタ6の入力端
子りにhえるようになっている。
Adder 16 includes i'FI3. The outputs of ff5 are added together, the first three bits of the addition result are given to FF14, and the lower three bits I
Give to FF15. The FF 15 outputs the lower three bits of the output of the adder 16 to the adder 16 at the timing of the input clock. The FF 14 is configured to input the upper three bits of the output of the adder 16 to the input terminal of the down counter 6 at the timing of the input clock.

いま、可変長−固定長変換回路4がIIJ変長データを
2のT)乗ピッ)・長の固定長データに変換するものと
憚ると、加算器16出力の下位T1ピッ)〜によ−)で
余りピッ)・数か示される。例えば、可変長−1i′+
1定長変換回路4が8ビツトの固定長データを出力する
場合には、加り器16出力の下位3ヒ゛ツトによ−〕で
余りヒッj−散が示さ1することになる。@述したよう
に、加算器16は、F F 13からハフマン符号北回
83の出力ビツト数を入力し、F F 15から余りビ
ット数を入力している。すなわち、加算器16出力は、
次に可変長データが入力されるまでに可変長−固定長変
換回14が可変長−固定長変換処理によって変換しよう
とする可変長データのデータ長を示している。
Now, suppose that the variable-length to fixed-length conversion circuit 4 converts IIJ variable-length data to fixed-length data with a length of 2 to the power of T). -) indicates the remainder (pi) or number. For example, variable length −1i′+
When the fixed length conversion circuit 4 outputs 8-bit fixed length data, the lower three bits of the output of the adder 16 result in a remainder hit of 1. @As mentioned above, the adder 16 inputs the number of output bits of the Huffman code north circuit 83 from FF 13, and inputs the remainder bit number from FF 15. That is, the output of the adder 16 is
It shows the data length of variable length data that the variable length to fixed length conversion circuit 14 attempts to convert by variable length to fixed length conversion processing until the next variable length data is input.

一方、加算器16出力の上位3ビツトは、可変長データ
が何個の固定長データに変換されるか、すなわち、何ク
ロックで可変長−固定長変換が処理が終了するかを示し
ている。可変長−固定長変換に必要な時間はく下位3ビ
ットによって示される値)+2クロック期間である。本
実施例においては、この上位3ビットをタウンカウンタ
6のプリセット値とすることで、入力データの入力の時
間m1隔を決定している。
On the other hand, the upper three bits of the output of the adder 16 indicate how many pieces of fixed length data the variable length data is converted into, that is, how many clocks it takes to complete the variable length to fixed length conversion process. The time required for variable length-fixed length conversion is +2 clock periods (the value indicated by the lower 3 bits). In this embodiment, the upper three bits are used as a preset value of the town counter 6 to determine the time m1 interval between input data inputs.

ダウンカウンタ6、F F7及びインバータ8の構成は
従来と同一である61なわち、タウンカウンタ6はイン
バータ8を介して“1、°′の入力クロックが与えらノ
′tて、入力端子L)のデータをロードする。ダウンカ
ウンタ6はクロックCKをタウンカウントし2、カウン
ト値が最小になると、リップルNヤリ−をFF7の入力
端子りに出力する。FF7はりップルキャリー人力後の
タロツクCKのタイミングで入力クロックを発生して入
力制御回路2及びインバータ8に出力するようになって
いる。
The configurations of the down counter 6, F F7, and inverter 8 are the same as the conventional ones61.In other words, the town counter 6 is not supplied with an input clock of "1,°" via the inverter 8, and is connected to the input terminal L). The down counter 6 counts the clock CK 2, and when the count value becomes the minimum, it outputs the ripple N Yary to the input terminal of FF7.FF7 is clocked at the timing of the clock CK after the ripple carry. An input clock is generated and output to the input control circuit 2 and the inverter 8.

次に、このように精成された符号化回路の動作について
第2図のタイミングチャー)・を参照し7て説明する。
Next, the operation of the encoding circuit refined in this way will be explained with reference to the timing chart in FIG.

第2図(a)はクロックCKを示し、第21J(b)は
ダウンカウンタ6がらのリップルNヤリ−を示し、第2
D16(c)は入力クロックを示し5、第2図(d)は
FF13の出力をボL5、第2図(e)はr;Fi5の
出力を示し、第2図(f)は加ロー器16の出力を示し
、第2図(g)はFF14の出力を示し、第2図(h 
)はタウンカウンタ6のカウント出力を示している。
FIG. 2(a) shows the clock CK, No. 21J(b) shows the ripple Nyari from the down counter 6, and the second
D16 (c) shows the input clock 5, Fig. 2 (d) shows the output of FF13, Bo L5, Fig. 2 (e) shows the output of r; Fig. 2(g) shows the output of FF14, Fig. 2(h) shows the output of FF16.
) indicates the count output of the town counter 6.

入力制御回&!82を介し、’−(入力した入力データ
を、ハフマン符号化回路3に与えてハフマン符号化し、
史にイI加データを付加して可変長−固定長変換回路4
に与える。可変長−固定長変換回路4は入力された可変
長データを1クロツク毎に8ビツトの固定長データに変
換して出力する。可変長−固定長変換回路4は余りビッ
トを次に入力される可変長データの先頭に付加し、て順
次可変長−固定長変換を行う。
Input control times &! 82, '-(The input data is given to the Huffman encoding circuit 3 and Huffman encoded,
Variable length-fixed length conversion circuit 4 by adding additional data to the history
give to The variable length-fixed length conversion circuit 4 converts the input variable length data into 8-bit fixed length data every clock and outputs the converted data. The variable-length to fixed-length conversion circuit 4 adds the remaining bits to the beginning of the next input variable-length data, and sequentially performs variable-length to fixed-length conversion.

一方、入力制御回B2がらの入力データはビット長発生
回B11にも入力される。ビット長発生回路11は、こ
の入力データがハフマン符号化されて刊加データが付加
された場合のビット長を示すデータをF F 13に出
力する。いJ、一連の複数の入力データがハフマン符号
化回路3によって、13゜9.20,11.・・・ビッ
トに変換されるものとする。例えは、第2図(C)の入
力クロックKlのタイミングで入力されたデータがハフ
マン符号化回路3によ−)で13ビツト長のデータに変
換されるものとする。なお、この時点では余りビットは
発件し5ていないものとする。
On the other hand, the input data from the input control circuit B2 is also input to the bit length generation circuit B11. The bit length generation circuit 11 outputs to F F 13 data indicating the bit length when this input data is Huffman encoded and the addition data is added. A series of a plurality of input data are processed by the Huffman encoding circuit 3 at 13°9.20,11 . ... shall be converted into bits. For example, assume that data input at the timing of the input clock Kl in FIG. 2(C) is converted into 13-bit data by the Huffman encoding circuit 3. It is assumed that, at this point, there are no remaining bits.

この場合には、F F 13.15は夫々ビット数13
゜0を示すデータを加算器16に与える(第2図(d)
、(e))、加算器16は2人力を加算し、上位3ビツ
ト(“1“)をFF14に与え、下位3ビツト(°゛5
″)をF F i5に与える(第2図(g)。
In this case, F F 13.15 each has a number of bits of 13
Data indicating 0 is given to the adder 16 (Fig. 2(d)
, (e)), the adder 16 adds the two inputs, gives the upper 3 bits (“1”) to the FF 14, and gives the lower 3 bits (°5
'') to F F i5 (Fig. 2(g)).

(e))、FF14はプリセット値”1”をダウンカウ
ンタ6に与える。入力クロックに2のタイミングでダウ
ンカウンタ6はこの値をロードし、次のクロックCKで
ダウンカウントを開始する。入力クロックに2から2ク
ロツク後にカウント値は“0”となり、ダウンカウンタ
6は、第2図(b)に示すように、リップルキャリーを
FF7に出力する0次のクロックCK″C″FF7は第
2図(e)に示す入力クロックに3を発生して入力制御
回路2、FF13.14.15及びインバータ8に与え
る。
(e)), the FF 14 gives a preset value "1" to the down counter 6. The down counter 6 loads this value into the input clock at timing 2, and starts counting down at the next clock CK. After 2 to 2 clocks from the input clock, the count value becomes "0", and the down counter 6 outputs the ripple carry to FF7 as shown in FIG. 2(b). 2 is generated as the input clock shown in FIG.

また、入力クロックに2のタイミングでは、入力制御回
路2はハフマン符号化によってデータ長が9ビツトとな
る入力データを取り入れる。この入力データに対する可
変長−固定長変換は入力クロックに3発生後に行われる
。入力クロックに2によってFF13,15は夫々“9
”、“5″゛のデータを加算器16に出力する。加p器
16は2人力を加算して得た値“14′のうちの上位3
とット(“1”)をFF14に出力し、下位3ビツト〈
“6”)をFF15に出力する。前回と同様に、入力ク
ロックに3によって“1′がタウンカウンタ6にロード
され(第2図(tl) ) 、入力タロツクに3から3
クロツク後にFF7から入力クロックに4が発生する。
Further, at timing 2 of the input clock, the input control circuit 2 takes in input data having a data length of 9 bits by Huffman encoding. Variable length-fixed length conversion for this input data is performed after three input clocks occur. 2 to the input clock causes FF13 and FF15 to become "9" respectively.
”, “5”” are output to the adder 16.The adder 16 outputs the top three of the values “14” obtained by adding the two human forces
Outputs (“1”) to FF14, lower 3 bits
“6”) is output to the FF15. As before, "1" is loaded into the town counter 6 by 3 in the input clock (Figure 2 (tl)), and the input clock is changed from 3 to 3.
After the clock, 4 is generated as an input clock from FF7.

入力クロックに3のタイミングでは、入力制御回路2は
ハフマン符号化によってデータ長が20ビツトとなる入
力データを取り入れている。入力クロックに3乃至に4
の期間の可変長−固定長変換処理における余りビット数
は6ビツトであり、加算器16は“26°゛のデータを
出力する。加算器16の上位3ビツト(“3”)はF 
F 14に出力され、下位3ビツト(°“2゛)はFF
1!lに出力される。
At timing 3 of the input clock, the input control circuit 2 takes in input data having a data length of 20 bits by Huffman encoding. 3 to 4 for input clock
The number of remaining bits in the variable length-fixed length conversion process during the period is 6 bits, and the adder 16 outputs "26°" data.The upper 3 bits ("3") of the adder 16 are F
Output to F14, lower 3 bits (°"2") are FF
1! output to l.

F F 14からのプリセット値“3”は入力タロツク
に4のタイミングでダウンカウンタ6にo−iされる。
The preset value "3" from the FF 14 is o-i'd to the down counter 6 at the timing of 4 in the input tarlock.

こうして、FF7からは入力クロックに4から5クロツ
ク後に次の入力クロックが発生ずる。
In this way, the next input clock is generated from FF7 four to five clocks after the input clock.

以後、同様の処理が繰り返され、可変長−固定長変換の
処理時間に応じて入力の時間間隔が切換えられる。
Thereafter, the same process is repeated, and the input time interval is switched according to the processing time of variable length to fixed length conversion.

このように、本実施例においては、ビット長発生回路1
1によって可変長符号化によるビット長を求め、このビ
ット長と前回の余りビット数とを加算器16によって加
算することにより今回可変長−固定長変換しようとする
可変長データのビット長を得ており、加算器16の出力
の上位ビットをダウンカウンタ6のプリセット値とする
ことによって、次のデータを入力するタイミングを可変
長データ長及び余りビット数に基づくものにしている。
In this way, in this embodiment, the bit length generation circuit 1
1 to obtain the bit length by variable length encoding, and by adding this bit length and the number of remaining bits from the previous time using an adder 16, the bit length of the variable length data to be converted from variable length to fixed length this time is obtained. By using the upper bits of the output of the adder 16 as the preset value of the down counter 6, the timing for inputting the next data is made based on the variable length data length and the number of remaining bits.

これにより、次のデータが入力されるまでの時間間隔は
可変長−固定長変換の処理時間と等しくなり、可変長−
固定長変換回路4において処理を行わない空き時間が発
生することはなく、高速な符号化が可能である。
As a result, the time interval until the next data is input is equal to the processing time of variable length - fixed length conversion, and the time interval until the next data is input is equal to the processing time of variable length - fixed length conversion.
There is no idle time during which no processing is performed in the fixed length conversion circuit 4, and high-speed encoding is possible.

[発明の効果コ 以上説明したように本発明によれば、入力データの入力
の時間間隔を可変長−固定長変換回路の処理時間に基づ
゛くものにしているので、高速な符号化が可能であると
いう効果を有する。
[Effects of the Invention] As explained above, according to the present invention, the input time interval of input data is made based on the processing time of the variable length-fixed length conversion circuit, so high-speed encoding is possible. It has the effect that it is possible.

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

第1図は本発明に係る符号化回路の一実施例を示すブロ
ック図、第2図は実施例の動作を説明するためのタイミ
ングチャート、第3図はハフマン符号を説明するための
説明図、第4図は画像データを示す説明図、第5図は従
来の符号化回路を示すブロック図、第6図は従来例の動
作を説明するためのタイミングチャート、第7図は従来
例の動作を説明するための説明図である6 2・・・入力制御回路、3・・・ハフマン符号化回路、
4・・可変長−固定長変換回路、 12・・・入力クロック発生回路。 −N1寸0Φ C/)CQ  ω の ψ の 第7図 (b)
FIG. 1 is a block diagram showing an embodiment of the encoding circuit according to the present invention, FIG. 2 is a timing chart for explaining the operation of the embodiment, and FIG. 3 is an explanatory diagram for explaining Huffman codes. FIG. 4 is an explanatory diagram showing image data, FIG. 5 is a block diagram showing a conventional encoding circuit, FIG. 6 is a timing chart to explain the operation of the conventional example, and FIG. 7 is an illustration of the operation of the conventional example. 6 is an explanatory diagram for explaining 2... input control circuit, 3... Huffman encoding circuit,
4...Variable length-fixed length conversion circuit, 12...Input clock generation circuit. -N1 dimension 0Φ C/)CQ ω of ψ Fig. 7(b)

Claims (2)

【特許請求の範囲】[Claims] (1)入力データを可変長符号化して可変長データを出
力する可変長符号化回路と、前記可変長データを所定の
ビット長の固定長データに変換して出力する可変長−固
定長変換回路とを具備した符号化回路において、 前記入力データの前記可変長符号化回路への入力を制御
する入力制御回路と、 前記可変長−固定長変換回路の処理時間に応じて前記入
力データの入力の時間間隔を変化させるように前記入力
制御回路を制御する制御手段とを具備したことを特徴と
する符号化回路。
(1) A variable-length encoding circuit that variable-length encodes input data and outputs variable-length data, and a variable-length-fixed-length conversion circuit that converts the variable-length data into fixed-length data of a predetermined bit length and outputs it. An encoding circuit comprising: an input control circuit that controls input of the input data to the variable length encoding circuit; and an input control circuit that controls input of the input data according to a processing time of the variable length-fixed length conversion circuit. An encoding circuit comprising: control means for controlling the input control circuit so as to change a time interval.
(2)入力データを可変長符号化して可変長データを出
力する可変長符号化回路と、前記可変長データを所定の
ビット長の固定長データに変換して出力する可変長−固
定長変換回路とを具備した符号化回路において、 前記入力データの前記可変長符号化回路への入力を制御
する入力制御回路と、 前記入力制御回路の出力が与えられて入力データが前記
可変長符号化回路により符号化された場合のビット長を
求めるビット長発生回路と、このビット長発生回路が求
めたビット長に基づいて前記入力制御回路を制御するこ
とにより前記入力データの入力の時間間隔を前記可変長
−固定長変換回路の処理時間に一致させる制御手段とを
具備したことを特徴とする符号化回路。
(2) A variable-length encoding circuit that variable-length encodes input data and outputs variable-length data; and a variable-length-fixed-length conversion circuit that converts the variable-length data into fixed-length data with a predetermined bit length and outputs it. an input control circuit for controlling input of the input data to the variable length encoding circuit; and an input control circuit for controlling input of the input data to the variable length encoding circuit; A bit length generation circuit that calculates the bit length when encoded, and the input control circuit based on the bit length calculated by this bit length generation circuit, so that the input time interval of the input data is changed to the variable length. - a control means for matching the processing time of the fixed length conversion circuit.
JP02337615A 1990-11-29 1990-11-29 Encoding circuit Expired - Fee Related JP3083153B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02337615A JP3083153B2 (en) 1990-11-29 1990-11-29 Encoding circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02337615A JP3083153B2 (en) 1990-11-29 1990-11-29 Encoding circuit

Publications (2)

Publication Number Publication Date
JPH04207323A true JPH04207323A (en) 1992-07-29
JP3083153B2 JP3083153B2 (en) 2000-09-04

Family

ID=18310319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02337615A Expired - Fee Related JP3083153B2 (en) 1990-11-29 1990-11-29 Encoding circuit

Country Status (1)

Country Link
JP (1) JP3083153B2 (en)

Also Published As

Publication number Publication date
JP3083153B2 (en) 2000-09-04

Similar Documents

Publication Publication Date Title
EP0426429B1 (en) Variable length code demodulating apparatus and address control method thereof
JP3332619B2 (en) Decoding device and method thereof
JPH0645950A (en) Apparatus and method for generation of signal
JPS63148717A (en) Data compression and restoration processor
JPH04207323A (en) Encoder circuit
GB1597468A (en) Conversion between linear pcm representation and compressed pcm
JPH02272970A (en) Data processing circuit
JPH05227440A (en) Device and method of coding data
JPH07200252A (en) Burrel shifter circuit
JPH04133522A (en) Variable-length code decoding circuit
JP3034293B2 (en) Fixed length conversion circuit for variable length code
JPS6276931A (en) Data compressor
JP3937463B2 (en) Huffman coding apparatus and method
JPS6291081A (en) Facsimile encoder
JPH04207324A (en) Encoder circuit
JPH05206870A (en) Encoding circuit
JPS6228113Y2 (en)
JPH05122085A (en) Encoding circuit
JPS60247374A (en) Decoding processor of run length code
JP3622473B2 (en) Variable length code decoding device
JPH06164417A (en) Encoding device
JPH05304480A (en) Fixed length converting circuit
JPS58121844A (en) Signal compander
JPS61274425A (en) Digital compressing curcuit
JPH0214620A (en) Variable length coding circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees