JP3134398B2 - Variable length coding circuit - Google Patents

Variable length coding circuit

Info

Publication number
JP3134398B2
JP3134398B2 JP03249257A JP24925791A JP3134398B2 JP 3134398 B2 JP3134398 B2 JP 3134398B2 JP 03249257 A JP03249257 A JP 03249257A JP 24925791 A JP24925791 A JP 24925791A JP 3134398 B2 JP3134398 B2 JP 3134398B2
Authority
JP
Japan
Prior art keywords
output
register
code
stage
circuit
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 - Fee Related
Application number
JP03249257A
Other languages
Japanese (ja)
Other versions
JPH0590975A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP03249257A priority Critical patent/JP3134398B2/en
Priority to US07/946,755 priority patent/US5321398A/en
Publication of JPH0590975A publication Critical patent/JPH0590975A/en
Application granted granted Critical
Publication of JP3134398B2 publication Critical patent/JP3134398B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • 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 a variable-length coding circuit used for a high-efficiency coding apparatus of an image signal, for example.

【0002】[0002]

【従来の技術】従来の可変長符号化回路は図4、図5に
示す様に符号化入力に対して可変長符号コード及びその
符号長を出力する符号化テーブルを持ちテーブルからの
可変長符号コードをシフタに入力し、そのシフタの制御
量を符号長の累積により得ており、シフタ出力をゲート
回路を経てレジスタに入力しその出力をゲート回路に帰
還する構成になっていた。この構成の回路では符号化テ
ーブルやバレルシフタ、加算器等の構成要素の動作限界
で最高動作速度が決まり、これ以上高速化を計る事がで
きなかった。
2. Description of the Related Art As shown in FIGS. 4 and 5, a conventional variable length coding circuit has a variable length code code for a coding input and a coding table for outputting the code length thereof. A code is input to a shifter, a control amount of the shifter is obtained by accumulating a code length, an output of the shifter is input to a register via a gate circuit, and an output of the shifter is fed back to the gate circuit. In the circuit having this configuration, the maximum operation speed is determined by the operation limits of the components such as the encoding table, the barrel shifter, and the adder, and the speed cannot be further increased.

【0003】また図6、図7には図4、図5の可変長符
号化回路を基本とし並列化する事により高速化を計った
例である。決まった数の符号化入力毎にFIFOに交互
に書き込み各FIFOから書き込み時の半分の速度で読
み出し図4、図5の可変長符号化回路にそれぞれ入力す
る。各可変長符号化回路出力を再びそれぞれFIFOに
書き込み読出しは2倍の速度で行い交互に合成してい
る。しかしながらこの手法では図6、図7にも示した様
に2ケの可変長符号出力を過不足なくつなぎ合わせる事
ができないのでダミーデータが挿入されてしまい伝送効
率が低下する欠点がある。
FIGS. 6 and 7 show examples in which the speed is increased by parallelizing the circuits based on the variable length coding circuits shown in FIGS. 4 and 5. FIG. The data is alternately written into the FIFO for each predetermined number of coded inputs, and read from each FIFO at half the speed at the time of writing, and input to the variable length coding circuits in FIGS. 4 and 5, respectively. The output of each variable length coding circuit is again written to and read from the FIFO at twice the speed, and are alternately synthesized. However, in this method, as shown in FIGS. 6 and 7, two variable-length code outputs cannot be joined without excess or deficiency, so that there is a disadvantage that dummy data is inserted and transmission efficiency is reduced.

【0004】[0004]

【発明が解決しようとする課題】解決しようとする問題
点は、従来の回路では高速化を計る事ができず、また伝
送効率が低下する欠点があるというものである。
The problems to be solved are that the conventional circuit cannot attain a high speed and has a drawback that the transmission efficiency is reduced.

【0005】[0005]

【課題を解決するための手段】本発明による第1の手段
は、入力データ系列を順次並列化すると共に交互に振り
分け、この並列化及び振り分けられたそれぞれのデータ
系列が可変長符号化のための符号変換テーブル及び符号
長テーブルを持ち、この符号変換テーブル出力はそれぞ
れシフタに供給し、符号長出力はシフト量計算回路へ供
給して並列データ間の可変長符号が過不足なくつながる
様にシフタを制御し、各シフタ出力をレジスタ出力との
ゲート回路を経てこのレジスタに再び格納する構成の可
変長符号化回路である。
According to a first aspect of the present invention, an input data sequence is sequentially parallelized and alternately distributed.
Divided, the parallelism and distribution et respective data sequence was that have code conversion table and the code length table for variable length coding, the code conversion table output is fed to the shifter, respectively, the code length output shift amount Variable length code between parallel data supplied to the calculation circuit is connected without excess or shortage
In this manner, the shifter is controlled as described above, and each shifter output is stored in the register again through a gate circuit for register output.

【0006】本発明による第2の手段は、段の符号長
を加算し累積するレジスタを持ち、この累積レジスタ出
力からシフト量修正の為の減算回路にてその結果が負の
時は累積レジスタ出力を、0以上のときは減算回路出力
を選択して第1段目のシフタ制御量となし、この第1段
目のシフタ制御量と第(R−1)段目までの符号長和を
第1段目のシフタ制御量とするとともにこの減算結果が
0以上になった時にレジスタ出力をバッファに書き込み
ゲート回路への帰還レジスタを切替る構成の可変長符号
化回路である。
A second means according to the present invention has a register for adding and accumulating the code length of each stage, and a subtraction circuit for correcting the shift amount from the output of the accumulation register. When the output is greater than or equal to 0, the output of the subtraction circuit is selected and used as the shifter control amount of the first stage, and the sum of the shifter control amount of the first stage and the code length up to the (R-1) th stage is calculated. A variable-length encoding circuit having a configuration in which the register output is written to a buffer and the feedback register to the gate circuit is switched when the subtraction result becomes 0 or more as the first-stage shifter control amount.

【0007】[0007]

【作用】これによれば、ダミーデータを挿入する事なく
高速な可変長符号化回路を提供する事ができる。
[Action] According to this, it is possible to provide a high-speed variable-length coding circuit without inserting the dummy data.

【0008】[0008]

【実施例】図1、図2に本案の基本構成例を示した。符
号化入力は直並列変換回路1にて2データ毎の並列信号
となりそれぞれ符号化テーブル3、5に入力される。そ
れぞれの符号化テーブル3、5には可変長符号コードと
その符号長が格納されており符号コードはそれぞれのシ
フタ6、7に入力されると共に符号長出力はシフト量計
算に使われる。。
1 and 2 show an example of the basic configuration of the present invention. The coded input becomes a parallel signal for every two data in the serial / parallel conversion circuit 1 and is input to the coding tables 3 and 5, respectively. Each of the encoding tables 3 and 5 stores a variable-length code and its code length. The code is input to each of the shifters 6 and 7 and the output of the code length is used for calculating the shift amount. .

【0009】このシフト量の計算回路では第1段目と第
2段目の符号長を加算(加算器8、9)し、これを累積
するレジスタ10を持ちこのレジスタ10出力で第1段
目のシフト量を制御し、第2段目のシフト量はこのレジ
スタ10出力と第1段目の符号長出力の和で制御する。
この操作により第2段目のシフタ7は常に第1段目のシ
フタ6より第1段目の符号長だけシフト量が増え、オフ
セットをはかせる事ができる。即ち第1段目と第2段目
のシフタ6、7出力をゲート回路11〜14で合成する
と第1段目の可変長符号コードと第2段目の可変長符号
コードがきれいにつながる。
The shift amount calculating circuit adds the code lengths of the first and second stages (adders 8 and 9), and has a register 10 for accumulating the result. Is controlled by the sum of the output of the register 10 and the code length output of the first stage.
By this operation, the shift amount of the second-stage shifter 7 is always increased by the first-stage code length from the first-stage shifter 6, and the offset can be offset. That is, when the outputs of the first-stage and second-stage shifters 6 and 7 are combined by the gate circuits 11 to 14, the first-stage variable-length code and the second-stage variable-length code are connected clearly.

【0010】本案はこの様にシフタ6、7を制御し並列
データ間の可変長符号が過不足なくつながる様にする事
を原理としている。この様に制御されたシフタ6、7出
力は以前の同様に制御されたシフタ6、7出力を格納し
ているレジスタ15〜18群の出力とゲート回路11〜
14にて合成され、再びこのレジスタ15〜18群に入
力する。
The principle of the present invention is to control the shifters 6 and 7 in this way so that variable length codes between parallel data can be connected without excess or deficiency. The outputs of the shifters 6 and 7 controlled in this way are the outputs of a group of registers 15 to 18 storing the outputs of the shifters 6 and 7 controlled in the same manner as before and the gate circuits 11 to 11.
The signals are combined at 14 and input to the registers 15 to 18 again.

【0011】そしてこのレジスタ15〜18群に有効な
可変長符号が図1、図2の例では32ビット以上になっ
た時、即ちレジスタ15、16が満杯になった時にこの
内容を可変長符号化器に続くバッファメモリ19に書き
込むと共にレジスタ15〜18からゲート回路11〜1
4への帰還出力をMUX20、21を用いてレジスタ1
7、18に切替る。
1 and 2, when the effective variable length code for the group of registers 15 to 18 becomes 32 bits or more, that is, when the registers 15 and 16 become full, the contents of the variable length code are stored in the variable length code. And the gate circuits 11-1 from the registers 15-18.
4 is output to register 1 using MUXs 20 and 21.
Switch to 7 and 18.

【0012】シフタ6、7の制御は帰還レジスタ15〜
18出力が切替った事によるシフト量の修正を行わねば
ならないが、この事は符号長の累積結果にレジスタ切替
えによる修正を加える事になる。本例ではレジスタ15
〜18群に32ビット以上の有効な可変長符号データが
蓄積した時、32ビットのデータをバッファメモリ19
に書き込みレジスタ15〜18群からゲート回路11〜
14への帰還ループ切替えを行っているがこのバッファ
メモリ19への書込制御及び帰還ループ切替え制御は符
号長の累積レジスタのMSBによって行っており、次の
シフト量計算にはこのMSBを除いた下位ビットを次符
号長と加算し累積する事によってシフト量の修正を行っ
ている。
The shifters 6 and 7 are controlled by feedback registers 15 to
The shift amount must be corrected due to the switching of the 18 outputs. This means that the cumulative result of the code length is corrected by switching the register. In this example, register 15
When the effective variable length code data of 32 bits or more is accumulated in the groups 18 to 18, the 32-bit data is stored in the buffer memory 19.
To the gate circuits 11 to 18 from the write registers 15 to 18
Although the feedback loop switching to 14 is performed, the write control to the buffer memory 19 and the feedback loop switching control are performed by the MSB of the code length accumulation register, and this MSB is excluded in the next shift amount calculation. The shift amount is corrected by adding and accumulating the lower bits with the next code length.

【0013】図1、図2の例の場合直並列変換回路1以
降は符号化入力速度の1/2の速度で動作しており、図
4、図5の従来例に比較して2倍の速度の符号化入力に
対応できる。また図6、図7の従来例では可変長符号と
可変長符号の間にダミーデータが入いる事があり得ると
の欠点があったが本案では原理的にこの様なダミーデー
タが入いる事はなく伝送効率を劣化させる事はない。
In the case of the examples of FIGS. 1 and 2, the serial-to-parallel conversion circuit 1 and thereafter operate at half the coding input speed, which is twice as large as the conventional example of FIGS. It can correspond to the speed input. Further, in the conventional examples shown in FIGS. 6 and 7, there is a drawback that dummy data may be inserted between variable-length codes. However, in the present invention, such dummy data is theoretically inserted. And there is no deterioration in transmission efficiency.

【0014】こうして上述の装置によれば、ダミーデ
タを挿入する事なく高速な可変長符号化回路を提供する
事ができるものである。
[0014] Thus, according to the above-described apparatus, in which it is possible to provide a high-speed variable length coding circuit without inserting a dummy de chromatography <br/> data.

【0015】なお図1、図2では2並列化した構成例を
示したが一般的にはn並列化して構成する事ができる。
この場合最大符号長の2n倍のシフトが行えるシフタを
n段用意し、ゲート回路後の帰還レジスタも最大符号長
の2n倍用意し、有効データがこの用意した帰還レジス
タの1/2以上になった時逐次バッファに出力し、帰還
レジスタの切替を行う構成となる。
Although FIGS. 1 and 2 show an example of a configuration in which two parallel circuits are used, it is generally possible to use n parallel circuits.
In this case, n stages of shifters capable of shifting by 2n times the maximum code length are prepared, and the feedback register after the gate circuit is also prepared by 2n times the maximum code length, and the effective data becomes 1/2 or more of the prepared feedback register. Then, the data is sequentially output to the buffer and the feedback register is switched.

【0016】そして一回にn個の符号化入力を可変長符
号化してゲート回路で過不足なくつなぎ合わせる。シフ
タの制御は図3に示す様に、各段の符号化テーブルから
の符号長和を累積するレジスタ出力と帰還レジスタ切替
にともなうシフト量修正を行うために固定量を減算する
減算回路22からの出力をMUX23にて適時切替えて
第1段目のシフタを制御し、第k段目のシフタは第1段
目のシフタ制御量に第(k−1)段目までの符号長を加
算して制御する。
Then, the n coded inputs are variable-length coded at a time and are connected by a gate circuit without excess or deficiency. As shown in FIG. 3, the shifter is controlled by a register output that accumulates the sum of the code lengths from the encoding tables of each stage and a subtraction circuit 22 that subtracts a fixed amount in order to correct the shift amount due to the feedback register switching. The output is appropriately switched by the MUX 23 to control the first-stage shifter, and the k-th stage shifter adds the code length up to the (k-1) -th stage to the first-stage shifter control amount. Control.

【0017】図1、図2の場合シフト量の修正が64で
あった事からMSBを無視する事で簡単に行えたが一般
的にはシフト量修正回路を図3の様に持たねばならな
い。そしてシフト量修正回路出力が0以上になった時レ
ジスタ出力をバッファに書込み帰還レジスタを切替える
とともに第1段目のシフタ制御量をこの修正回路出力で
行う様にする。
In FIGS. 1 and 2, since the shift amount was corrected to 64, it could be easily performed by ignoring the MSB. However, generally, a shift amount correcting circuit must be provided as shown in FIG. When the output of the shift amount correction circuit becomes 0 or more, the register output is buffered and the feedback register is switched, and the shifter control amount of the first stage is controlled by the output of the correction circuit.

【0018】[0018]

【発明の効果】この発明によれば、ダミーデータを挿入
する事なく高速な可変長符号化回路を提供する事ができ
るようになった。
Effects of the Invention According to the present invention, it has become possible to provide a high-speed variable-length coding circuit without inserting the dummy data.

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

【図1】本発明による可変長符号化回路の一例の構成図
である。
FIG. 1 is a configuration diagram of an example of a variable length encoding circuit according to the present invention.

【図2】その説明のための図である。FIG. 2 is a diagram for explaining this.

【図3】本発明による可変長符号化回路を一般化した一
例の構成図である。
FIG. 3 is a diagram showing an example of a generalized variable length encoding circuit according to the present invention;

【図4】従来の可変長符号化回路の構成図である。FIG. 4 is a configuration diagram of a conventional variable length encoding circuit.

【図5】その説明のための図である。FIG. 5 is a diagram for explaining this.

【図6】従来の他の可変長符号化回路の構成図である。FIG. 6 is a configuration diagram of another conventional variable-length encoding circuit.

【図7】その説明のための図である。FIG. 7 is a diagram for explaining this.

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

1 直並列変換回路 3、5 符号化テーブル 6、7 シフタ 8、9 加算器 10 レジスタ 11〜14 ゲート回路 15〜18 レジスタ群 19 バッファメモリ 20、21 MUX DESCRIPTION OF SYMBOLS 1 Serial-parallel conversion circuit 3, 5 Coding table 6, 7 Shifter 8, 9 Adder 10 Register 11-14 Gate circuit 15-18 Register group 19 Buffer memory 20, 21 MUX

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力データ系列を順次並列化すると共に
交互に振り分け、この並列化及び振り分けられたそれぞ
れのデータ系列が可変長符号化のための符号変換テーブ
ル及び符号長テーブルを持ち、この符号変換テーブル出
力はそれぞれシフタに供給し、符号長出力はシフト量計
算回路へ供給して並列データ間の可変長符号が過不足な
くつながる様にシフタを制御し、各シフタ出力をレジス
タ出力とのゲート回路を経てこのレジスタに再び格納す
る構成の可変長符号化回路。
1. A with successively parallel input data sequence
Sorting alternately, the parallelism and distribution et respective data sequence was that have code conversion table and the code length table for variable length coding, the code conversion table output is fed to the shifter, respectively, the code length output The variable length code between parallel data supplied to the shift amount calculation circuit is
A variable-length encoding circuit configured to control the shifters so that they are connected to each other, and store the output of each shifter in this register again through a gate circuit with the register output.
【請求項2】 段の符号長を加算し累積するレジスタ
を持ち、この累積レジスタ出力からシフト量修正の為の
減算回路にてその結果が負の時は累積レジスタ出力を、
0以上のときは減算回路出力を選択して第1段目のシフ
タ制御量となし、この第1段目のシフタ制御量と第(R
−1)段目までの符号長和を第1段目のシフタ制御量と
するとともにこの減算結果が0以上になった時にレジス
タ出力をバッファに書き込みゲート回路への帰還レジス
タを切替る構成の可変長符号化回路。
2. A register for adding and accumulating the code length of each stage, and a subtraction circuit for correcting a shift amount from the output of the accumulation register, when the result is negative, outputs the accumulation register output.
If it is 0 or more, the output of the subtraction circuit is selected to be the shifter control amount of the first stage, and the shifter control amount of the first stage and the (R
-1) A variable configuration in which the sum of the code lengths up to the first stage is used as the shifter control amount of the first stage, and when the subtraction result becomes 0 or more, the register output is written into the buffer and the feedback register to the gate circuit is switched. Long encoding circuit.
JP03249257A 1991-09-27 1991-09-27 Variable length coding circuit Expired - Fee Related JP3134398B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP03249257A JP3134398B2 (en) 1991-09-27 1991-09-27 Variable length coding circuit
US07/946,755 US5321398A (en) 1991-09-27 1992-09-17 Variable length coder and data packing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03249257A JP3134398B2 (en) 1991-09-27 1991-09-27 Variable length coding circuit

Publications (2)

Publication Number Publication Date
JPH0590975A JPH0590975A (en) 1993-04-09
JP3134398B2 true JP3134398B2 (en) 2001-02-13

Family

ID=17190273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03249257A Expired - Fee Related JP3134398B2 (en) 1991-09-27 1991-09-27 Variable length coding circuit

Country Status (1)

Country Link
JP (1) JP3134398B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100352284C (en) * 2003-12-27 2007-11-28 三星电子株式会社 Variable length coding apparatus and variable length coding method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100352284C (en) * 2003-12-27 2007-11-28 三星电子株式会社 Variable length coding apparatus and variable length coding method

Also Published As

Publication number Publication date
JPH0590975A (en) 1993-04-09

Similar Documents

Publication Publication Date Title
CA1175154A (en) Shift circuit
JP3231855B2 (en) Data format conversion apparatus and method
US4677499A (en) Digital time base corrector
KR920003754B1 (en) Line memory which convert speed
US5477543A (en) Structure and method for shifting and reordering a plurality of data bytes
US6850579B2 (en) Multiplierless finite impulse response filter
KR0152032B1 (en) Variable length decoder for image signal
JP3276852B2 (en) Code conversion circuit
JP3134398B2 (en) Variable length coding circuit
US7761695B2 (en) Programmable data processor for a variable length encoder/decoder
US6516402B2 (en) Information processing apparatus with parallel accumulation capability
US5657016A (en) Variable length decoder with one of N length indicator
US6195781B1 (en) Error correction code calculator
US5031137A (en) Two input bit-serial multiplier
WO1994005088A1 (en) Comma code generator
JPH0677792A (en) Multiplexer circuit and demultiplexer circuit
US5828906A (en) System for sequentially shifting bits from the next one of the most significant bit and then outputting the most significant bit according a selection signal
JP3386638B2 (en) Variable length code decoding method and apparatus
KR100235537B1 (en) Variable tap of digital filter and multiplier circuit thereof
EP0499225B1 (en) Variable-length code decoding device
JP3134399B2 (en) Variable length coding circuit
JPH043398A (en) Multistage shift register
SU1123034A1 (en) Device for calculating values of functions of two variables
JP3130343B2 (en) Data phase conversion method
US20090138537A1 (en) Address generating circuit and semiconductor memory device

Legal Events

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