JPH0284882A - Picture encoding device and picture decoding device - Google Patents

Picture encoding device and picture decoding device

Info

Publication number
JPH0284882A
JPH0284882A JP23698588A JP23698588A JPH0284882A JP H0284882 A JPH0284882 A JP H0284882A JP 23698588 A JP23698588 A JP 23698588A JP 23698588 A JP23698588 A JP 23698588A JP H0284882 A JPH0284882 A JP H0284882A
Authority
JP
Japan
Prior art keywords
bits
code word
data
rom
length code
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
JP23698588A
Other languages
Japanese (ja)
Inventor
Yuji Onozawa
雄二 小野澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP23698588A priority Critical patent/JPH0284882A/en
Publication of JPH0284882A publication Critical patent/JPH0284882A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease the input number of addresses by selectively supplying plural variables to the address of a ROM in a ROM sequencer. CONSTITUTION:Processing is executed by a burrel shifter, etc., to convert an indefinite length code, which is packed to a constant bit number, to a form, with which the code can be inputted to an indefinite length code table, a multiplexer 44 is provided before the address input of a ROM45, which controls a burrel shifter 38, and either (l) or (n) is selected out of control variables and inputted. Thus, the number of the address inputs is decreased and the capacity of the ROM can be widely reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、画像情報を情報源符号化する装置及び復号化
する装置に関し、特に不定長符号の符号化及び復号化に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a device for source encoding and a device for decoding image information, and particularly to encoding and decoding of indefinite length codes.

〔従来の技術〕[Conventional technology]

不定長符号語を使用する画像符号化装置、たとえば、M
H(Modified Huffman)符号化装置や
MR(Modified READ)符号化装置では、
たとえば、2〜13ピットの不定長符号語をまとめであ
る一定の長さたとえば8ビツトのデータにパックする、
すなわち、再編成する必要がある。これは、符号化処理
の後処理、たとえば、記憶装置への記憶や通信回線への
出力のためには、ビット長が一定である方が処理が容易
になるからである。
An image encoding device using an indefinite length code word, for example, M
In the H (Modified Huffman) encoding device and the MR (Modified READ) encoding device,
For example, undefined length code words of 2 to 13 pits are packed into data of a certain length, for example, 8 bits.
In other words, it is necessary to reorganize. This is because post-encoding processing, such as storage in a storage device or output to a communication line, is easier if the bit length is constant.

このため、特開昭60−74776号公報に示されるよ
うに、シフトレジスタを使用して不定長符号語を一定の
長さのデータに変換することが知られている。
For this reason, as shown in Japanese Patent Laid-Open No. 60-74776, it is known to use a shift register to convert an indefinite length code word into data of a constant length.

該公報に記載の装置は、第9図にブロック図を示す通り
、画像を不定長符号語に変換する符号発生回路20と、
この符号発生回路20からの不定長符号語を並列に入力
した後、これを直列に出力する第1のシフトレジスタ2
1と、この直列に出力された不定長符号語を直列に入力
した後、これを並列に符号メモリ23に対して出力する
第2のシフトレジスタ22とから構成されている。
As shown in the block diagram of FIG. 9, the device described in the publication includes a code generation circuit 20 that converts an image into an indefinite length code word;
A first shift register 2 inputs the indefinite length code words from the code generation circuit 20 in parallel and then outputs them in series.
1, and a second shift register 22 which serially inputs the serially output indefinite length code words and then outputs them in parallel to the code memory 23.

〔発明が解決しようとする課題〕 しかしながら、上述構成の装置においては、第1のシフ
トレジスタ21から第2のシフトレジスタ22への転送
が1ビット単位で行われている。すなわち、不定長符号
語を1ビツトずつ処理するため、処理に時間がかかり高
速処理に向かないという欠点があった。
[Problems to be Solved by the Invention] However, in the device configured as described above, the transfer from the first shift register 21 to the second shift register 22 is performed in units of one bit. That is, since an indefinite length code word is processed one bit at a time, the processing takes time and is not suitable for high-speed processing.

この問題の解訣策として、バレルシフタとROM(読み
出し専用メモリ)シーケンサを用いて、複数ビットを1
サイクルで゛処理する方法が本出願人から特開昭63−
54067号として提案されている。
A solution to this problem is to use a barrel shifter and a ROM (read-only memory) sequencer to move multiple bits into one.
A method of processing in cycles was proposed by the present applicant in Japanese Patent Application Laid-Open No. 1986-63.
It is proposed as No. 54067.

これは、不定長符号語のうち、既に処理済の部分の長さ
と既に固定長にパックされた部分の長さの差だけ不定長
符号語を一度にシフトするバレルシフタを設け、このバ
レルシフタの動作をROMによるシーケンサにより制御
するものである。
This is done by providing a barrel shifter that shifts the indefinite length codeword at once by the difference between the length of the already processed part of the indefinite length codeword and the length of the part already packed to a fixed length. It is controlled by a sequencer based on ROM.

この特開昭63−54067号公報に記載の方法におい
ては、ROMのアドレス入力として、第8図(a)に示
すように、不定長符号語のビット数l、既にパックされ
たビット数m及び既に符号語が納められたビット数nの
3変数を人力して制御していたため、入力アドレス数が
多くなりROMの容量が大きくなるという欠点があった
。たとえば、MH符号語を8ビット単位でパックし、m
、n及びlを表すのにそれぞれ4.3及び4ビツトが必
要であるとすると、変数入力用のアドレスとして計11
ビット必要となる。
In the method described in Japanese Patent Application Laid-Open No. 63-54067, as shown in FIG. 8(a), the number l of bits of an indefinite length code word, the number m of already packed bits, and Since the three variables of the number n of bits in which code words have already been stored were manually controlled, there was a drawback that the number of input addresses increased and the capacity of the ROM became large. For example, if the MH codeword is packed in 8-bit units, m
, n and l require 4.3 and 4 bits, respectively, then a total of 11 bits are required to represent variables input.
bits are required.

また、一般にROM容量とアクセスタイムは相反関係に
あるので、ROM容量が大きくなるとアクセスタイムが
長(なるという不都合が生じる。
Furthermore, since ROM capacity and access time are generally in a reciprocal relationship, the access time becomes longer as the ROM capacity increases.

更に、LSI化する場合、ROM容量が大きいと実現が
困難となるという問題も生じる。
Furthermore, when converting into an LSI, a problem arises in that it is difficult to implement if the ROM capacity is large.

また、このように一定ピット長にパックされた不定長符
号語を復号する際にも、符号化時と同様にバレルシフタ
及びROMシーケンサが使用されるが、このROMシー
ケンサにおいても同様な問題が生じる。
Also, when decoding such an indefinite length code word packed into a constant pit length, a barrel shifter and a ROM sequencer are used as in encoding, but similar problems occur with this ROM sequencer.

本発明の画像符号化装置は、前記問題点を解決するため
に案出されたものであって、不定長符号語を任意のビッ
ト数単位にパックする処理を高速化するに際し、そのパ
ック制御を行うROMシーケンサのROMのアドレス入
力数を2変数とすることによりアドレス人力数を減らす
ことを目的とする。
The image encoding device of the present invention has been devised to solve the above-mentioned problems, and when speeding up the process of packing an indefinite length code word into units of an arbitrary number of bits, the image encoding device controls the packing control. The purpose is to reduce the number of address manpower by setting the number of ROM address inputs of the ROM sequencer to two variables.

また、本発明の画像復号化装置は、復号処理を制御する
ROMシーケンサのROMのアドレスに複数の変数を選
択的に供給することにより、アドレス人力数を減らすこ
とを目的とする。
Further, the image decoding device of the present invention aims to reduce the number of address manpower by selectively supplying a plurality of variables to the ROM address of a ROM sequencer that controls the decoding process.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は、前記目的を゛達成するため、画像情報を符号
化した不定長符号語を一定長データにパックする画像符
号化装置において、前記不定長符号語を一度に複数ビッ
トシフトする手段と、前記不定長符号語の符号語長β及
びパック処理状態を示す変数aをアドレス入力とし前記
ビットシフトする手段におけるシフト量を決定するシー
ケンサ用のROMと、前記シフトされた不定長符号語を
適切なビット位置へ一時格納する手段とを設け、前記パ
ック処理状態を示す変数aとして、前記格納する手段に
既に符号語が納められたビット数nから前記不定長符号
語の中で既にパックされたビット数mを減算した値を使
用することを特徴とする特また、本発明は、一定長デー
タにパックされた不定長符号語を元の不定長符号語に変
換したのち復号する画像復号化装置において、前記パッ
クされた不定長符号語を一定ビット数単位で読み出す手
段と、前記一定ピット数単位で読み出されたデータを一
度に複数ビットシフトする手段と、前記不定長符号語の
符号語長l又は変換処理状態を示す変数nが選択的に供
給され前記ビットシフトする手段におけるシフト量を決
定するシーケンサ用のROMと、前記シフトされたデー
タを適切なビット位置へ一時格納して元の不定長符号語
に変換する手段とを設けたことを特徴とする。
In order to achieve the above object, the present invention provides an image encoding device that packs an indefinite length code word encoded with image information into constant length data, including means for shifting the indefinite length code word by a plurality of bits at a time; A ROM for a sequencer that receives the code word length β of the indefinite length code word and a variable a indicating the packing processing state as an address input and determines the amount of shift in the bit shifting means; and a means for temporarily storing the code word in the bit position, and as a variable a indicating the packing processing state, bits already packed in the indefinite length code word are set from the number n of bits in which the code word has already been stored in the storing means. Particularly, the present invention provides an image decoding apparatus that uses a value obtained by subtracting a number m. , means for reading out the packed indefinite length code word in units of a fixed number of bits, means for shifting the data read out in units of the fixed number of pits by a plurality of bits at a time, and a code word length l of the indefinite length code word. Alternatively, a ROM for a sequencer to which a variable n indicating the conversion processing state is selectively supplied and determines the shift amount in the bit shifting means, and a ROM for temporarily storing the shifted data in an appropriate bit position and returning it to the original undefined length. The present invention is characterized in that it includes means for converting into a code word.

〔作用〕[Effect]

本発明の画像符号化装置においては、符号化処理の際に
必要となるパック状態を示す複数の変数を直接使用する
のではなく、複数の変数の差をとって新たな変数とし、
これを符号化処理を制御するR OMシーケンサのRO
Mの入力アドレスとしている。これにより、ROMに対
する入力アドレスの本数が減少する。
In the image encoding device of the present invention, instead of directly using a plurality of variables indicating the pack state necessary for encoding processing, the difference between the plurality of variables is calculated and used as a new variable.
This is the ROM sequencer's RO that controls the encoding process.
This is the input address of M. This reduces the number of input addresses to the ROM.

また、本発明の画像符号化装置においては、符号化処理
の際に必要となるパック状態を示す複数の変数を復号化
処理を制御するROMシーケンサに並列的に供給するの
でなく、時分割的に切り換えて供給している。したがっ
て、この場合もROMシーケンサのROMに対する入力
アドレスの本数が減少する。
Furthermore, in the image encoding device of the present invention, a plurality of variables indicating the pack state necessary for encoding processing are not supplied in parallel to a ROM sequencer that controls decoding processing, but in a time-sharing manner. It is supplied by switching. Therefore, in this case as well, the number of input addresses to the ROM of the ROM sequencer is reduced.

〔実施例〕〔Example〕

以下、図面を参照しながら実施例に基づいて本発明の特
徴を具体的に説明する。
DETAILED DESCRIPTION OF THE INVENTION Hereinafter, features of the present invention will be specifically described based on examples with reference to the drawings.

先ず、本実施例の基本的構成を、第1図の基本ブロック
図を参照して説明する。
First, the basic configuration of this embodiment will be explained with reference to the basic block diagram of FIG.

本実施例の画像符号化装置は、第1図に示すように、不
定長符号語を発生する符号発生回路1と、前記不定長符
号語を任意のビット数単位にパックする処理を複数ビッ
ト単位で行うバレルシフタ及び記憶素子からなる単位ビ
ットパック手段2と、前記単位ビットパック手段2の発
生する任意ビット数単位にパックされた符号語を格納す
るメモリ3と、これらを制御する制御シーケンサ4とか
ら構成されている。
As shown in FIG. 1, the image encoding device of this embodiment includes a code generation circuit 1 that generates an indefinite length code word, and a process of packing the indefinite length code word into units of an arbitrary number of bits in units of multiple bits. unit bit packing means 2 consisting of a barrel shifter and a storage element, a memory 3 for storing code words packed into units of an arbitrary number of bits generated by the unit bit packing means 2, and a control sequencer 4 for controlling these. It is configured.

前記制御シーケンサ4は、符号語長及び次処理制御情報
をアドレスとしたROMシーケンサで構成され、複数の
加減算を1サイクルで行うようになっている。
The control sequencer 4 is composed of a ROM sequencer whose address is the code word length and next processing control information, and is configured to perform a plurality of additions and subtractions in one cycle.

第2図は本実施例における不定長符号語のパック状態を
示す説明図であり、図において、lは不定長符号語のビ
ット数、mは既にパックされたビット数、dはパックす
べきビット数、nは既に符号語が納められたビット数を
示している。たとえば、以下の実施例においては、βは
2〜13であるので4ビツトで表現される。また、本実
施例では、(n−m)をaとおき5ビツトで表現する。
FIG. 2 is an explanatory diagram showing the packing state of an indefinite length code word in this embodiment. In the figure, l is the number of bits of the indefinite length code word, m is the number of already packed bits, and d is the bit to be packed. The number n indicates the number of bits in which the code word has already been stored. For example, in the following example, β is between 2 and 13, so it is expressed with 4 bits. Further, in this embodiment, (n-m) is expressed with 5 bits, with a being a.

制御シーケンサ4のアドレス人力に、第2図に示す各変
数R,m、d、nのうち、最低限R,aを人力すれば、
以下に説明するように、処理速度を落とすことなく変換
処理を実行できる。
If at least R and a of the variables R, m, d, and n shown in FIG. 2 are manually input to the address of the control sequencer 4,
As explained below, conversion processing can be performed without reducing processing speed.

第3図は本発明実施例の画像符号化装置のブロックを示
している。本実施例では、符号語長2ビツト〜13ビツ
トの不定長符号語のMH符号を、8ピット単位にパック
して符号化メモリへ蓄える装置を例に挙げて説明する。
FIG. 3 shows a block diagram of an image encoding device according to an embodiment of the present invention. In this embodiment, an example of an apparatus will be described in which an MH code of an undefined length code word with a code word length of 2 bits to 13 bits is packed in units of 8 pits and stored in a coding memory.

符号発生回路5において、MH符号化された結果は、第
4図のように1符号(同図(a)参照)当たり16ビツ
トの1符号データ、4ビツトの1符号長データpの形で
各1符号が順番に出力され(同図(b)参照)、20ビ
ツトのF I F 0(first−in first
−outmemory)  6へ書き込まれ゛ていく。
In the code generation circuit 5, the MH encoded result is divided into one code data of 16 bits and one code length data p of 4 bits per code (see (a) in the same figure) as shown in Fig. 4. 1 code is output in order (see (b) in the same figure), and a 20-bit F I F 0 (first-in-first
-outmemory) 6.

すなわち、符号が12ピツトのデータr0000011
01001Jであるときは、符号データはr00000
1101001XXXXJトナF)、符号長データlは
rllooJすなわちlO進数で12となる。なお、符
号データ中のrXJ は、rOJ、mの値を問わないド
ントケアビットである。
In other words, data r0000011 with a code of 12 pits
When it is 01001J, the code data is r00000
1101001XXXXJtonaF), the code length data l is rllooJ, that is, 12 in the lO base. Note that rXJ in the code data is a don't care bit regardless of the values of rOJ and m.

なお、FIFO6に何も書き込まれていないときは、P
IFO6からはエンプティフラグEFが出力され、また
、後述するFIFOll)がフルであるときは、FIF
OIOからはフルフラグFFが出力されるものとする。
Note that when nothing is written to FIFO6, P
Empty flag EF is output from IFO6, and when FIFOll (described later) is full, FIF
It is assumed that a full flag FF is output from OIO.

FIFO6へ書き込まれたデータのうち、16ビツトの
符号データrOO0001101001XXXXJは、
16ピットのバレルシフタ7.8ビツトのピットセレク
タ8で操作され、符号部分子000001101001
Jのみ切り出され、8ビツトのラッチ9に蓄えられる。
Among the data written to FIFO6, the 16-bit code data rOO0001101001XXXXJ is
16-pit barrel shifter 7. Operated by 8-bit pit selector 8, code molecule 000001101001
Only J is extracted and stored in the 8-bit latch 9.

もう一方のデータである4ビツトの符号長データ1rl
100Jは、ROM12のアドレス入力の一部に使用さ
れる。
The other data is 4-bit code length data 1rl
100J is used for part of the address input of the ROM12.

ROM12は、第5図(a)に示すように、アドレス入
力として、エンプティフラグεF、フルフラグFF。
As shown in FIG. 5(a), the ROM 12 has an empty flag εF and a full flag FF as address inputs.

既に符号が納められたビット数nと既にバックされたビ
ット数mとの差a及び不定長符号のビット数lとを有し
ている。また、ROM12のデータ出力として、第5図
(5)に示すように、前記差a、バレルシフタ7におけ
るシフト量X、ビットセレクタ8における選択位置Y、
FIFO6に対するクロックフラグCI、  ラッチ9
に対するクロックフラグC2及びPIFOIOに対する
クロックフラグC3を備えている。
It has a difference a between the number n of bits already stored in the code and the number m of bits already backed up, and the number l of bits of the indefinite length code. Further, as data output from the ROM 12, as shown in FIG. 5 (5), the difference a, the shift amount X in the barrel shifter 7, the selected position Y in the bit selector 8,
Clock flag CI for FIFO6, latch 9
A clock flag C2 for PIFOIO and a clock flag C3 for PIFOIO are provided.

ROM12の出力はラッチ13に一時格納され、このラ
ッチ13から出力X、Yがバレルシフタ7、ピットセレ
クタ8に供給され、変数aがROM12のアドレス人力
として帰還される。また、ラッチ13の出力のうちクロ
ックフラグC1,C2,C3はクロック発生回路14に
供給され、対応するクロックを発生させる。なお、RO
M12.  ラッチ13及びクロック発生回路14によ
り、ROMシーケンサ15が構成されている。
The output of the ROM 12 is temporarily stored in a latch 13, from which the outputs X and Y are supplied to the barrel shifter 7 and pit selector 8, and the variable a is returned as the address input of the ROM 12. Further, among the outputs of the latch 13, the clock flags C1, C2, and C3 are supplied to a clock generation circuit 14, which generates a corresponding clock. In addition, R.O.
M12. The latch 13 and the clock generation circuit 14 constitute a ROM sequencer 15.

バレルシフタ7は、入力されるシフトIXに基づいてデ
ータを指定力げにシフトさせるもので、Xが正であると
き左シフトを行い、負であるときは右シフトを行う。ま
た、ピットセレクタ8は、人力Yに応じてラッチ9の人
力を選択するもので、M S B(Most 51gn
1ficant Bit)から数えてY番目のピットま
ではラッチ9の出力を選び、それ以下のピットはバレル
シフタ7の出力を選ぶものである。
The barrel shifter 7 shifts the data to a specified force based on the input shift IX, and performs a left shift when X is positive, and performs a right shift when X is negative. Further, the pit selector 8 selects the human power of the latch 9 according to the human power Y, and the pit selector 8 selects the human power of the latch 9 according to the human power Y.
The output of the latch 9 is selected for pits up to the Y-th pit counting from 1ficant bit, and the output of the barrel shifter 7 is selected for pits below that.

ここで16ヒツトの符号データが、順次バレルシフタ7
、ピットセレクタ8により操作されてラッチ9に蓄えら
れていく過程を第6図のフローチャート及び第7図の符
号例によって説明する。なお、第6図のフローチャート
のCKI、 Cに2及びCに3はFIFO6からの読み
出し、ラッチ9及びFIFOloへの書き込みが行われ
ることを意味している。
Here, the 16 bits of code data are sequentially transferred to the barrel shifter 7.
, the process of being operated by the pit selector 8 and stored in the latch 9 will be explained with reference to the flowchart in FIG. 6 and the code example in FIG. Note that CKI, 2 for C, and 3 for C in the flowchart of FIG. 6 mean that reading from FIFO 6 and writing to latch 9 and FIFO lo are performed.

先ず、第3図のブロック図に示すPIFO6゜バレルシ
フタ7等の各構成要素の状態が初期設定される(ステッ
プ101)。
First, the states of each component such as the PIFO 6° barrel shifter 7 shown in the block diagram of FIG. 3 are initialized (step 101).

いま、PIFO6に第7図(a)に示すようなデータP
L、 P2. P3が順次書き込まれると、データP1
が書き込まれた時点でエンプティフラグl1iFはなく
なり、ステップ102からステップ103に進み、ラッ
チ9は第7図(b)のQlの状態となる。すなわち、X
=o、y=oであるので、バレルシフタ7におけるシフ
トはなく、また、ピットセレクタ8はバレルシフタ7の
出力のみを選択するので、最初の16ビツトの符号デー
タP1r011XXXXXXXXXXXXXJ(7)M
 S B側の8ビツトの符号データ01r011XXX
XXJがラッチ9に書き込まれる。
Now, data P as shown in FIG. 7(a) is stored in PIFO6.
L, P2. When P3 is written sequentially, data P1
When the empty flag l1iF is written, the process proceeds from step 102 to step 103, and the latch 9 enters the state of Ql in FIG. 7(b). That is, X
=o, y=o, so there is no shift in the barrel shifter 7, and the pit selector 8 selects only the output of the barrel shifter 7, so the first 16 bits of code data P1r011XXXXXXXXXXXXXJ(7)M
SB side 8-bit code data 01r011XXX
XXJ is written to latch 9.

また、ROM12のアドレス人力には、a=0゜z=3
が入力されているので、a+β=3く8となり、ステッ
プ104からステップ105へ進む。なお、説明の都合
上、エンプティフラグEF及びフルフラグFFは常にク
リアされているものとする。したがって、次のサイクル
は、ステップ106へ進み、a=a+1=3.X=−a
−1=−3,Y=a+1=3となる。すなわち、次の1
6ビツトの符号データP2[000011000xxx
xxxx」カハレルシフタ7ニオイて右へ3ビツトシフ
トしrrXXXOOOOlloooXXXXJ トなる
。また、Y=3であるから、ピットセレクタ8は、ラッ
チ9のデーグロ1r011XXXXXJの上位3ビツト
roll Jを出力する。したがって、ラッチ9は第7
図(b)のQ2の状態ro1100001Jとなる。
Also, in the address manual of ROM12, a=0゜z=3
has been input, so a+β=3×8, and the process advances from step 104 to step 105. For convenience of explanation, it is assumed that the empty flag EF and the full flag FF are always cleared. Therefore, the next cycle goes to step 106 where a=a+1=3. X=-a
-1=-3, Y=a+1=3. In other words, the following 1
6-bit code data P2 [000011000xxx
xxxx'' Caharel shifter 7 is detected and shifted 3 bits to the right. Furthermore, since Y=3, the pit selector 8 outputs the upper 3 bits roll J of the data log 1r011XXXXXJ of the latch 9. Therefore, latch 9 is the seventh
The state of Q2 in Figure (b) becomes ro1100001J.

また、2番目の符号データP2の符号長lはrlool
JすなわちlO進数で9であり、ROM12のアドレス
人力には、a=3.f=9が人力されているので、a+
j!=12>8となり、ステップ104.107.11
0と進む。したがって、次のサイクルはステップ111
を実行する。すなわち、まず第7図(b)のQ2のデー
タr0110(100IJをFIFOIOへ書き込む。
Further, the code length l of the second code data P2 is rlool
J, that is, 9 in lO base, and the address of the ROM 12 is a=3. Since f=9 is manually generated, a+
j! =12>8, so step 104.107.11
Proceed to 0. Therefore, the next cycle is step 111
Execute. That is, first, data r0110 (100IJ) of Q2 in FIG. 7(b) is written to the FIFOIO.

また、X=8−a=5であるので、符号データP2r0
00011000XXXXXXXJがバレルシフタ7に
おいて左へ5ビツトシフトしrrlOooXXXXXX
XXXXXXJとなる。また、Y=Qであるから、ビッ
トセレクタ8は、バレルシフタ7の出力のみを出力する
。したがって、ラッチ9は第7図(b)(7)Q3ノ状
H「1000xxxx」トナル。
Also, since X=8-a=5, code data P2r0
00011000XXXXXXJ is shifted 5 bits to the left in barrel shifter 7 and becomes rrlOooXXXXXX
It becomes XXXXXXXJ. Further, since Y=Q, the bit selector 8 outputs only the output of the barrel shifter 7. Therefore, the latch 9 has the shape H "1000xxxx" in FIG. 7(b) (7) Q3.

また、ROM12のアドレス入力には、a=a−8=−
5,1=9が入力されているので、a+!=4く8とな
り、次のサイクルはステップ106 を実行し、ラッチ
9は第7図(社)のQ4の状態となる。
Also, for the address input of the ROM 12, a=a-8=-
Since 5,1=9 is input, a+! =4×8, and in the next cycle step 106 is executed, and the latch 9 is in the state of Q4 in FIG. 7 (Company).

また、ROM12のアドレス人力には、a=4゜1=1
2が入力されているので、a+j7−=16>8となり
、次のサイクルはステップ111 を実行し、ラッチ9
の第7図(b)の05の状態となる。
Also, in the address manual of ROM12, a=4゜1=1
2 has been input, so a+j7-=16>8, and in the next cycle, step 111 is executed and latch 9 is
The state becomes 05 in FIG. 7(b).

また、ROM12のアドレス人力には、a=−4゜!=
12が入力されているので、a+f=8となり、次のサ
イクルはステップ109 を実行し、ラッチ9の第7図
ら)の05のデータをF I F 010へ書き込む。
Also, for the address of ROM12, a=-4°! =
Since 12 has been input, a+f=8, and in the next cycle, step 109 is executed and data 05 of latch 9 (FIG. 7, etc.) is written to F IF 010.

このように、次々に特定長データを8ビット単位にパッ
クしていく。これにより、符号発生回路5からの符号長
2ビツト〜13ピツトの不定長符号のMH符号は、8ビ
ット単位にパックされ、符号メモリ11へ蓄積される。
In this way, specific length data is packed into 8-bit units one after another. As a result, the MH code, which is an indefinite length code having a code length of 2 bits to 13 bits, from the code generation circuit 5 is packed into 8-bit units and stored in the code memory 11.

なお、上述の処理は、ROM12. ラッチ13及びク
ロック発生回路14により、第6図に示されたフローチ
ャートに基づいて実行される。
Note that the above processing is performed in the ROM 12. The latch 13 and the clock generation circuit 14 execute the process based on the flowchart shown in FIG.

以上述べたように、バレルシフタ7を使用してパック処
理を高速に行うに際し、ROMシーケンサ15により、
バレルシフタ7におけるシフト量。
As described above, when performing high-speed pack processing using the barrel shifter 7, the ROM sequencer 15
Shift amount in barrel shifter 7.

ピットセレクタ8の選択位置を計算しているが、本実施
例によれば、新だな変数aを導入することにより、パッ
ク制御を行うROMシーケンサ15のアドレス人力数を
従来の3変数から2変数に減少させることができ、RO
M12の容量を削減することができる。
The selection position of the pit selector 8 is calculated, and according to this embodiment, by introducing a new variable a, the number of addresses for the ROM sequencer 15 that performs pack control is changed from the conventional three variables to two variables. can be reduced to RO
The capacity of M12 can be reduced.

すなわち、ROM12に対するアドレスとして、従来は
第8図(a)示す3変数m、n、1の11ビツトとこの
他にエンプティフラグEF、  フルフラグFFの2ビ
ツトの計13ピット必要であったものが、本実施例によ
れば、5ビツトの変数aと4ビツトの変数lの2変数の
9ビツトとフラグEF、 FFの2ピツトの計11ビッ
トに低減できる。また、この低減量は、変数l、dの値
が太き(なればなるほど、より大きくなる。
In other words, the address for the ROM 12 used to require 11 bits for the three variables m, n, and 1 shown in Figure 8(a), plus 2 bits for the empty flag EF and full flag FF, for a total of 13 pits. According to this embodiment, the number of bits can be reduced to 11 bits in total, consisting of 9 bits for two variables, the 5-bit variable a and the 4-bit variable l, and 2 bits for the flags EF and FF. Further, this reduction amount becomes larger as the values of the variables l and d become thicker.

次に、上述の画像符号化装置において生成された符号を
復号する画像復号化装置の一例について以下説明する。
Next, an example of an image decoding device that decodes the code generated by the above-described image encoding device will be described below.

先ず、本実施例の画像復号化装置の基本的構成を、第1
0図の基本ブロック図を参照して説明する。
First, the basic configuration of the image decoding device of this embodiment will be explained as follows.
This will be explained with reference to the basic block diagram shown in FIG.

本実施例は、同図に示すように、基本的に不定長符号語
を任意ビット数単位にパックして蓄えておくメモリ31
と、前記パックされたデータから1不定長符号語を生成
し、復号テーブル33のアドレス入力に合う形にする処
理を複数ビット単位で行うためのバレルシフタ及び記憶
素子からなる単位ビット処理手段32とから構成されて
いる。また、これらを制御するための制御シーケンサ3
4を設けている。
In this embodiment, as shown in the figure, a memory 31 basically stores an indefinite length code word by packing it into units of an arbitrary number of bits.
and a unit bit processing means 32 consisting of a barrel shifter and a storage element for generating one indefinite length code word from the packed data and converting it into a form that matches the address input of the decoding table 33 in units of multiple bits. It is configured. In addition, a control sequencer 3 for controlling these
There are 4.

前記制御シーケンサ34は、ROMシーケンサで構成さ
れ、複数の加減算を1サイクルで行う。
The control sequencer 34 is composed of a ROM sequencer and performs a plurality of additions and subtractions in one cycle.

第11図、第12図は、任意ビット数単位でパックされ
た不定長符号語を処理する工程を説明するための図であ
る。
FIGS. 11 and 12 are diagrams for explaining the process of processing an indefinite length code word packed in units of an arbitrary number of bits.

第11図において、lは4ビツトβ3〜j!。で表現さ
れる不定長符号のビット数、mは3ビツトm2〜m0で
表現される既に使われたビット数すなわち既にパックさ
れたビット数、nは5ビツトn4〜n0で表現される既
に符号が納められたビット数、dはパックすべきビット
数、eは復号テーブル33に入力すべきビット数を示し
ている。但し、eは不定長符号語のピッ゛ト数lが取り
得る最大値より大きくなければならない。
In FIG. 11, l is 4 bits β3~j! . The number of bits of the indefinite length code expressed as The number of stored bits, d indicates the number of bits to be packed, and e indicates the number of bits to be input into the decoding table 33. However, e must be larger than the maximum value that the number of pits l of an indefinite length code word can take.

そして、ROMシーケンサのROMには、アドレス人力
として不定長符号語のビット数1.符号が納められたビ
ット数n等が供給され、これらの変数に基づいて、パッ
クされた不定長符号語を元の不定長符号語に変換する。
In the ROM of the ROM sequencer, the number of bits of an indefinite length code word is 1. The number n of bits in which the code is stored is supplied, and based on these variables, the packed indefinite length codeword is converted into the original indefinite length codeword.

ここで本実施例では、ROMのアドレス入力の前にマル
チプレクサ44を設け、第11図及び第12図で示した
制御変数のうち、Il(βコルLの4ピツト)或いはn
(但し、5ピツトn4〜no中の4ピツ)ns〜no)
のいずれかを選択して入力することにより、アドレス人
力を減らすようにしている。
In this embodiment, a multiplexer 44 is provided before the ROM address input, and among the control variables shown in FIGS. 11 and 12, Il (4 pits of β col L) or n
(However, 4 pits out of 5 pits n4~no) ns~no)
By selecting and inputting one of the addresses, it is possible to reduce the amount of manpower required.

すなわち、ROMのアドレス人力として、nl。That is, as the address of the ROM, nl.

R4,m2〜mOの部分が共通に供給され、これに加え
て、Tla〜no或いは13〜1゜の何れかが選択的に
供給される。なお、nlはマルチプレクサ44の切り換
えを制御するピットであり、n1=0のときn3〜no
側を選択し、nj!=1のときl、〜β。
The portions R4, m2 to mO are commonly supplied, and in addition, either Tla to no or 13 to 1° is selectively supplied. Note that nl is a pit that controls switching of the multiplexer 44, and when n1=0, n3 to no
Choose a side, nj! When =1, l, ~β.

側を選択する。Choose a side.

前記復号テーブル33は、不定長符号の最大層をアドレ
ス入力に持ち、最大層より短い符号が入力された場合は
、アドレス入力部のMSBから順に符号が入力され、そ
れ以下のピットはドントケアでアクセスされる。また、
復号テーブル33からの復号データは、その不定長符号
の長さ!も出力する。
The decoding table 33 has the maximum layer of the indefinite length code as the address input, and when a code shorter than the maximum layer is input, the code is input in order from the MSB of the address input section, and the pits below are accessed as don't care. be done. Also,
The decoded data from the decoding table 33 is the length of the indefinite length code! is also output.

本発明実施例の画像復号化装置を、第13図の機能図と
第14図のフローチャートに従って説明する。
An image decoding device according to an embodiment of the present invention will be explained according to the functional diagram of FIG. 13 and the flowchart of FIG. 14.

なお、本実施例では、MH符号化された符号長2ビツト
〜13ビツトの不定長符号をパックして蓄えである符号
メモリ35から、8ピット単位でデータを読み出して、
復号テーブル42に入力する装置を例に挙げて説明する
。なお、復号テーブル42のアクセスは、16ビツト符
号がラッチ40に蓄えられてから実行されるものとする
In this embodiment, data is read out in units of 8 pits from the code memory 35, which stores and packs MH-encoded indefinite-length codes with a code length of 2 bits to 13 bits.
An example of a device that inputs data into the decoding table 42 will be described. It is assumed that the decoding table 42 is accessed after the 16-bit code is stored in the latch 40.

符号メモリ35内には、不定長符号が第15図(a)の
ような8ビット単位でパックされた形態で蓄えられてお
り、P I F 036へリードライト制御回路48に
よって8ビット単位に書き込みが行われる。な右、第1
5図(5)は元の不で長符号の形態を示している。
In the code memory 35, indefinite length codes are stored in a packed form in 8-bit units as shown in FIG. will be held. Na right, 1st
Figure 5 (5) shows the form of the original long code.

そして、符号メモリ35からF I F 036へ書き
込みが行われて、FIFO36のエンプティフラグEF
がクリアされると、以下に説明するROMシーケンサ4
9が起動され、第14図のフローチャートに示す処理が
実行される。
Then, writing is performed from the code memory 35 to the FIFO 036, and the empty flag EF of the FIFO 36 is
When cleared, ROM sequencer 4 explained below
9 is activated, and the processing shown in the flowchart of FIG. 14 is executed.

まず、各変数m、n、nl、X、Yがリセットされ、P
IFO6の内容が読み出される(ステップ201)。な
お、Xは16ビツトのバレルシフタ38におけるシフト
量を示しており、正値が左シフト。
First, each variable m, n, nl, X, Y is reset, and P
The contents of IFO 6 are read out (step 201). Note that X indicates the shift amount in the 16-bit barrel shifter 38, and a positive value is a left shift.

負値が右シフトである。また、Yは、ピットセレクタ3
9における選択位置を示し、MSBからYビット分をラ
ッチ40側からとり、それ以下はバレルシフタ38側か
らとる。
A negative value is a right shift. Also, Y is pit selector 3
Y bits from the MSB are taken from the latch 40 side, and the rest are taken from the barrel shifter 38 side.

最初は、n=0であるので、ステップ202.209と
進み、ステップ210 の処理を行う。なお、ここでの
説明では、エンプティフラグEF及び後述するフラグ付
ラッチ43からのラッチ完了フラグPGは、それぞれオ
フになっていると仮定する。また、ラッチフラグFGは
、フラグ付ラッチ43のデータが外部から読まれるとク
リアされるものとする。
Initially, since n=0, the process proceeds to steps 202 and 209, and the process of step 210 is performed. In the description here, it is assumed that the empty flag EF and the latch completion flag PG from the flagged latch 43, which will be described later, are both turned off. Further, it is assumed that the latch flag FG is cleared when the data in the flagged latch 43 is read from the outside.

コノときの各変数は、m=Q、n=3.n1=0(マル
チプレクサ44でn、〜n0側を選択する)。
Each variable in this case is m=Q, n=3. n1=0 (multiplexer 44 selects n, to n0 side).

X=0.Y=0である。゛また、データl1i1により
スリーステートラッチ37をイネーブルとするとともに
、データE2によりスリーステートバッファ41をディ
セーブルとする。更に、クロックCK5. CK6及び
Cに7により、F I F 036.  スリーステー
トラッチ37及びラッチ40への書き込みを行う。
X=0. Y=0. Furthermore, the three-state latch 37 is enabled by the data l1i1, and the three-state buffer 41 is disabled by the data E2. Furthermore, clock CK5. By CK6 and C7, F IF 036. Writing to the three-state latch 37 and latch 40 is performed.

これにより、先に読み出されていたデータは、スリース
テートラッチ37にラッチされ、バレルシフタ38.ピ
ットセレクタ39を通り、ラッチ40にラッチされる。
As a result, the previously read data is latched into the three-state latch 37, and the barrel shifter 38. It passes through the pit selector 39 and is latched by the latch 40.

このとき、x=0であるのでバレルシフタ38でのシフ
トはなく、また、Y=0であるので、ピットセレクタ3
9はバレルシフタ38の出力のみを選択する。したがっ
て、ラッチ40の出力は第16図のR2に示すような構
成になる。すなわち、13ビツトの最初の不定長符号語
ro000001110111JのMSB側の8ビツト
ro0000011Jが選択され、16ビツトの出力r
 00000011fXXXXXXXjとなる。なお、
初期状態では、ラッチ40のデータは、第16図のR1
に示すように不定である。
At this time, since x=0, there is no shift with the barrel shifter 38, and since Y=0, the pit selector 3
9 selects only the output of the barrel shifter 38. Therefore, the output of the latch 40 has a configuration as shown by R2 in FIG. That is, the 8 bits ro0000011J on the MSB side of the first 13-bit indefinite length code word ro000001110111J are selected, and the 16-bit output r
00000011fXXXXXXXj. In addition,
In the initial state, the data in the latch 40 is R1 in FIG.
As shown in , it is indeterminate.

次に、上述と同様に、PIFO6からの次のデータを読
み出す。
Next, the next data from PIFO 6 is read out in the same manner as described above.

今度も、n≠16なので、やはり、ステップ202゜2
09と進み、ステップ210を実行する。各変数は、m
=0.n=16.n1=0.X=−8,Y=8で、前に
読み出したデータが上記ルートでラッチ40にラッチさ
れ、第16図のR3になる。また、FIFO6から次の
データを読み出す。
This time too, since n≠16, step 202゜2
09 and execute step 210. Each variable is m
=0. n=16. n1=0. When X=-8 and Y=8, the previously read data is latched by the latch 40 through the above route, becoming R3 in FIG. Also, the next data is read from the FIFO 6.

次は、n=16及びn1=口なので、ステップ202゜
203と進み、ステップ204を実行する。各変数は、
m=o、n=16.nj!=1.X=O,Y=0で、前
サイクルでラッチ40に蓄えられたデータ (第16図
のR3)  により、復号テーブル42がアクセスされ
ているので、フラグ付ラッチ43にその復号結果並びに
不定長符号の長さlが蓄えられる。
Next, since n=16 and n1=mouth, the process proceeds to steps 202 and 203, and step 204 is executed. Each variable is
m=o, n=16. nj! =1. When X=O, Y=0, the decoding table 42 is accessed by the data stored in the latch 40 in the previous cycle (R3 in FIG. 16), so the flagged latch 43 stores the decoding result and the indefinite length code. The length l of is stored.

次は、PIFO6からはデータを読まずに、ラッチ40
の出力を第16図のR4としてそのまま出力する。
Next, without reading data from PIFO6, latch 40
The output is output as is as R4 in FIG.

次は、nj!=lがマルチプレクサ44へ人力されるの
で、nの下位4ビツトn3〜no側に代わってβの4ビ
ツトft3〜Ilo側が選ばれる。また、m=0である
ので、ステップ206を実行し、m=Q。
Next is nj! =l is manually input to the multiplexer 44, so the 4 bits ft3 to Ilo side of β are selected instead of the lower 4 bits n3 to no side of n. Also, since m=0, step 206 is executed and m=Q.

n=16−13=3.nj!=0  (マルチプレクサ
44の出力は1からnに変わる)、X=13.Y=Oで
、スリーステートバッファ41がイネーブルとなり、ラ
ッチ40は第16図のR5のようなデータがラッチされ
る。
n=16-13=3. nj! =0 (output of multiplexer 44 changes from 1 to n), X=13. When Y=O, the three-state buffer 41 is enabled, and the latch 40 latches data such as R5 in FIG.

次は、n≠16なので、また′ステップ210が実行さ
れ、m=Q、n=11.n1=0.X=−3,Y=3と
なり、再びスリースチードラフチ37がイネーブルとな
り、ラッチ40には第16図のR6のようなデータがラ
ッチされる。また、FIFO36からは次のデータが読
み出される。
Next, since n≠16, step 210 is executed again, m=Q, n=11. n1=0. X=-3, Y=3, the three-steed raft 37 is enabled again, and the data like R6 in FIG. 16 is latched into the latch 40. Further, the following data is read from the FIFO 36.

次もn≠16なので、またステップ210が実行され、
m=5.n=1(i、nj!=O,X=−11,Y=1
1となり、ラッチ40は第16図のR7のようなデータ
がラッチされる。また、FIFO6からは次のデータが
読み出される。
Next, since n≠16, step 210 is executed again,
m=5. n=1(i, nj!=O, X=-11, Y=1
1, and the latch 40 latches data such as R7 in FIG. Further, the following data is read from the FIFO 6.

次は、n=16なので、ステップ204が実行され、m
=5.n=16.nR=l  X=0.Y=Oとなり、
前サイクルでラッチ40に蓄えられたデータにより復号
テーブル42がアクセスされているので、フラグ付ラッ
チ43にその復号結果並びに不定長符号の長さが蓄えら
れる。
Next, since n=16, step 204 is executed and m
=5. n=16. nR=lX=0. Y=O,
Since the decoding table 42 has been accessed by the data stored in the latch 40 in the previous cycle, the decoding result and the length of the indefinite length code are stored in the latch with flag 43.

次もni!=lがマルチプレクサ44へ入力されるので
、13〜no側に代わってfls〜L側が選ばれる。ま
た、m≠0であるので、ステップ207 を実行し、m
=5.m=o、n1=1.X=5.Y=0でスリーステ
ートバッファ41がイネーブルとな“□す、ラッチ40
には第16図のR6のようなデータがラッチされる。
Next time too! Since =l is input to the multiplexer 44, the fls~L side is selected instead of the 13~no side. Also, since m≠0, step 207 is executed and m
=5. m=o, n1=1. X=5. When Y=0, the three-state buffer 41 is enabled.
Data such as R6 in FIG. 16 is latched.

次はステップ208 を実行し、m=Q、n=14゜n
1=0.X=−6,Y=11でスリーステートラッチ3
7がイネーブルとなり、ラッチ40の出力は第16図の
R9のようになる。
Next, execute step 208, m=Q, n=14゜n
1=0. Three-state latch 3 with X=-6, Y=11
7 is enabled, and the output of the latch 40 becomes like R9 in FIG.

次はn≠16なので、ステップ210を実行し、m=2
.n=16.n1=o、X=−14,Y=14となり、
ラッチ40には第16図のRIOのようなデータがラッ
チされる。また、PIFO6からは、次のデータが読み
出される。
Next, since n≠16, execute step 210 and m=2
.. n=16. n1=o, X=-14, Y=14,
Data such as RIO in FIG. 16 is latched into the latch 40. Further, the following data is read from the PIFO6.

なお、第16図のRIOのデータでは、ラッチ40の出
力1: 2 (=16−14)ピットの不定があるので
、次に新たなデータをFIFO6から2ビツト付は加え
て第16図のR11に示すデータとする。
Note that in the RIO data in FIG. 16, there is an undefined pit value of 1:2 (=16-14) from the latch 40, so new data is added from FIFO 6 with 2 bits and R11 in FIG. The data shown in

このような操作を繰り返し、1ペ一ジ分の復号を行う。Such operations are repeated to decode one page.

ここで、本実施例におけるR OM2Sのアドレス人力
及びデータ出力を第17図に示す。また、従来方式のR
OMのアドレス入力及びデータ出力を第18図に示す。
Here, FIG. 17 shows the address input and data output of the ROM2S in this embodiment. In addition, the conventional method R
FIG. 18 shows the address input and data output of OM.

本実施例のような仕様、すなわち、パックされたMH符
号を8ビット単位で読み出して復号する場合には、従来
方式ではアドレス入力が、nが5ビツト、mが3ビツト
、lが4ビツト。
In the case of reading and decoding a packed MH code in units of 8 bits according to the specifications of this embodiment, in the conventional method, the address input is 5 bits for n, 3 bits for m, and 4 bits for l.

フラグEF、 FGが2ビツトの計14ビットである。The flags EF and FG are 2 bits, a total of 14 bits.

これに対して、本実施例ではアドレス入力が、n。On the other hand, in this embodiment, the address input is n.

とn3〜n0或いは13〜10の5ビツト、mの3ピツ
ト、マルチプレクサ44の切り換え信号の1ビツト、フ
ラグEF、 FGが2ビツトの計11ビットに減少する
。すなわち、3ビツト減少するため、ROM容量が約8
 (=23>分の1になることが判る。
and 5 bits of n3 to n0 or 13 to 10, 3 bits of m, 1 bit of the switching signal of the multiplexer 44, and 2 bits of flags EF and FG, reducing the total to 11 bits. In other words, since the number of bits decreases by 3, the ROM capacity becomes approximately 8.
(It turns out that =23>1/1.

上述のように、本実施例の画像復号化装置においては、
任意のビット数でバックされている不定長符号から元の
不定長符号を変換するに際し、ピット処理用のバレルシ
フタ38の制御を行うROM45のアドレス入力を切り
換えて使用することによりROM2Sのアドレス数を減
少することができる。
As mentioned above, in the image decoding device of this embodiment,
When converting an undefined length code backed by an arbitrary number of bits to the original undefined length code, the number of addresses in the ROM 2S is reduced by switching and using the address input of the ROM 45 that controls the barrel shifter 38 for pit processing. can do.

なお、上述の実施例においては、画像符号化装置と画像
復号化装置とを独立の装置として説明したが、回路構成
を共通化し、接続を変更することにより画像符号化装置
及び画像復号化装置とじて使用することができる。たと
えば、第3図の画像符号化装置に示されるFIFO6,
バレルシフタ7、ビットセレクタ8.ラッチ9.符号メ
モリ11゜ROM2R,ラッチ13及びクロック発生回
路14を、第13図の画像復号化装置に示されるF I
 F 036゜バレルシフタ38.ビットセレクタ39
.ラッチ40゜符号メモリ35.  ROM2S、  
ラッチ46.クロック発生回路47と対応させて共用す
ることができる。但し、この場合、完全に共用できるも
のもあれば、一部分のみを共用できるものもある。
In the above embodiment, the image encoding device and the image decoding device were described as independent devices, but the image encoding device and the image decoding device can be made the same by sharing the circuit configuration and changing the connections. can be used. For example, the FIFO6 shown in the image encoding device of FIG.
Barrel shifter 7, bit selector 8. Latch9. The code memory 11° ROM2R, latch 13, and clock generation circuit 14 are connected to the FI circuit shown in the image decoding device of FIG.
F 036° Barrel Shifter 38. Bit selector 39
.. Latch 40° code memory 35. ROM2S,
Latch 46. It can be shared in correspondence with the clock generation circuit 47. However, in this case, some items can be completely shared, while others can only partially be shared.

また、上述の実施例のROM12.45の代わりにPL
A(プログラマブルロジックアレイ)等のマイクロプロ
グラム制御論理ICをシーケンサとして使用することも
できる。
Also, in place of the ROM12.45 in the above embodiment, the PL
A microprogram control logic IC such as A (programmable logic array) can also be used as a sequencer.

〔発明の効果〕〔Effect of the invention〕

本発明の画像符号化装置は、不定長符号をバレルシフタ
等の不定長符号を一度に複数ビットシフトする手段を使
用して一定長符号にパックするに際し、複数の変数に基
づいてパック処理の際に必要なシフト量等の計算をRO
Mにより行っている。
The image encoding device of the present invention packs an indefinite length code into a constant length code using a means for shifting multiple bits of the indefinite length code at once, such as a barrel shifter. RO calculates the required shift amount, etc.
This is done by M.

ここで、このROMに対するアドレスとして、直接複数
の変数を人力するのではなく、変数の差を新たな変数と
して入力するようにしたので、アドレス数が減少する。
Here, instead of directly inputting a plurality of variables manually as an address for this ROM, the difference between the variables is input as a new variable, so the number of addresses is reduced.

したがって、ROMの容量が削減でき、また、動作もよ
り高速化する。更に、ROMの容量を小さ(することが
できるので、容易にLSI化することがでる。
Therefore, the capacity of the ROM can be reduced and the operation speed can be increased. Furthermore, since the capacity of the ROM can be reduced, it can be easily integrated into an LSI.

また、本発明の画像ぼ帰化装置は、一定ビツト数にパッ
クされた不定長符号を不定長符号テーブルに人力できる
形に変換する処理をバレルシフタ等により行うに際し、
このバレルシフタを制御するROMのアドレス人力の前
に切り換え手段を設け、複数の変数を選択的にROMに
供給している。
In addition, the image naturalization device of the present invention uses a barrel shifter or the like to convert an indefinite length code packed into a fixed number of bits into an indefinite length code table into a form that can be performed manually.
A switching means is provided in front of the ROM address input that controls the barrel shifter, and a plurality of variables are selectively supplied to the ROM.

これにより、アドレス入力数が減少し、ROMの容量が
大きく削減できる。したがって、より高速化したり、容
易にLSI化することが可能となる。
This reduces the number of address inputs and greatly reduces the ROM capacity. Therefore, it is possible to increase the speed and easily implement it into an LSI.

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

第1図は本発明の画像符号化装置の基本構成を示すブロ
ック図、第2図は同画像符号化装置のROMにおいて使
用される変数の説明図、第3図は本発明実施例の画像符
号化装置の機能図、第4図は符号自体と符号データ及び
符号長データとの関係を示す説明図、第5図は本実施例
のROMのアドレス入力とデータ出力の関係を示す説明
図、第6図は第3図に示す画像符号化装置の動作を説明
するためのフローチャート、第7図は不定長符号語の符
号データを一定長にパックする工程を示す説明図、第8
図は従来例のアドレス入力数と本実施例のアドレス入力
数を比較した説明図、第9図は従来の画像符号化装置の
構成例を示すブロック図である。また、第10図は本発
明の画像復号化装置の基本構成を示すブロック図、第1
1図は同画像復号化装置のROMにおいて使用される変
数の説明図、第12図は同ROMの入力アドレスの切り
換えを示す説明図、第13図は本発明実施例の画像復号
化装置のブロック図、第14図は第13図に示す画像復
号化装置の動作を説明するためのフローチャート、第1
5図はパック処理されたデータと不定長符号との関係を
示す説明図、第16図は本実施例における各ステップで
の復号テーブルへの入力データ及び各制御パラメータの
値を示す説明図、第17図は本実施例におけるROMの
アドレス人力とデータ出力の関係を示す説明図、第18
図は従来例におけるROMのアドレス入力とデータ出力
の関係を示す説明図である。 1.5,20:符号発生回路  2:単位ビットパック
手段3.31:メモリ      4.34:制御シー
ケンサ6.10.36:FIFO−7,aa:バレルシ
フタ8.39:ビットセレクタ  9.13.40.4
6:ラッチ11、23.35:符号メモリ  12.4
5: ROM14.47:クロツク発生回路15.49
F ROMシーケンサ21゜22:シフトレジスタ 3
2:単位ビット処理手段33.42:復号テーブル 37:スリーステートラッチ 41ニスリーステートバツフア 43:フラグ付ラッチ   44:マルチプレクサ48
:リードライト制御回路 特許出願人    富士ゼロックス株式会社代 理 人
     小 堀  益  (ほか2名)アドレス入力 (b) データ出力 第 図 第 図 第 図 第 1゜ 図 第 図 第 図 第 図 第 図 ((1)メモリ内のテ゛−タ (b)T一定&′t!号 第 図 第 図
FIG. 1 is a block diagram showing the basic configuration of the image encoding device of the present invention, FIG. 2 is an explanatory diagram of variables used in the ROM of the image encoding device, and FIG. 3 is an image code of the embodiment of the present invention. FIG. 4 is an explanatory diagram showing the relationship between the code itself, code data, and code length data; FIG. 5 is an explanatory diagram showing the relationship between address input and data output of the ROM of this embodiment; 6 is a flowchart for explaining the operation of the image encoding device shown in FIG. 3, FIG. 7 is an explanatory diagram showing the process of packing code data of an indefinite length code word into a fixed length,
The figure is an explanatory diagram comparing the number of address inputs in the conventional example and the number of address inputs in this embodiment, and FIG. 9 is a block diagram showing an example of the configuration of a conventional image encoding device. FIG. 10 is a block diagram showing the basic configuration of the image decoding device of the present invention.
Fig. 1 is an explanatory diagram of variables used in the ROM of the image decoding device, Fig. 12 is an explanatory diagram showing switching of input addresses of the ROM, and Fig. 13 is a block diagram of the image decoding device according to the embodiment of the present invention. 14 is a flowchart for explaining the operation of the image decoding device shown in FIG.
5 is an explanatory diagram showing the relationship between packed data and indefinite length codes, FIG. 16 is an explanatory diagram showing input data to the decoding table and the values of each control parameter at each step in this embodiment, Figure 17 is an explanatory diagram showing the relationship between ROM address input and data output in this embodiment;
The figure is an explanatory diagram showing the relationship between address input and data output of a ROM in a conventional example. 1.5, 20: Code generation circuit 2: Unit bit pack means 3.31: Memory 4.34: Control sequencer 6.10.36: FIFO-7, aa: Barrel shifter 8.39: Bit selector 9.13.40 .4
6: Latch 11, 23.35: Code memory 12.4
5: ROM14.47: Clock generation circuit 15.49
F ROM sequencer 21゜22: Shift register 3
2: Unit bit processing means 33. 42: Decoding table 37: Three-state latch 41 Three-state buffer 43: Latch with flag 44: Multiplexer 48
: Read/write control circuit patent applicant Fuji Xerox Co., Ltd. Agent Masu Kobori (and 2 others) Address input (b) Data output 1) Data in memory (b) T constant &'t!

Claims (1)

【特許請求の範囲】 1、画像情報を符号化した不定長符号語を一定長データ
にパックする画像符号化装置において、前記不定長符号
語を一度に複数ビットシフトする手段と、前記不定長符
号語の符号語長l及びパック処理状態を示す変数aをア
ドレス入力とし前記ビットシフトする手段におけるシフ
ト量を決定するシーケンサ用のROMと、前記シフトさ
れた不定長符号語を適切なビット位置へ一時格納する手
段とを設け、前記パック処理状態を示す変数aとして、
前記格納する手段に既に符号語が納められたビット数n
から前記不定長符号語の中で既にパックされたビット数
mを減算した値を使用することを特徴とする画像符号化
装置。 2、一定長データにパックされた不定長符号語を元の不
定長符号語に変換したのち復号する画像復号化装置にお
いて、前記パックされた不定長符号語を一定ビット数単
位で読み出す手段と、前記一定ビット数単位で読み出さ
れたデータを一度に複数ビットシフトする手段と、前記
不定長符号語の符号語長l又は変換処理状態を示す変数
nが選択的に供給され前記ビットシフトする手段におけ
るシフト量を決定するシーケンサ用のROMと、前記シ
フトされたデータを適切なビット位置へ一時格納して元
の不定長符号語 に変換する手段とを設けたことを特徴
とする画像復号化装置。
[Scope of Claims] 1. In an image encoding device that packs an indefinite length code word encoded with image information into constant length data, means for shifting the indefinite length code word by a plurality of bits at a time, and the indefinite length code a ROM for a sequencer that takes a variable a indicating the code word length l of a word and a packing processing state as an address input and determines the amount of shift in the bit shifting means; as a variable a indicating the pack processing state;
the number n of bits in which the code word has already been stored in the storage means;
An image encoding device characterized in that a value obtained by subtracting the number m of bits already packed in the indefinite length code word from is used. 2. In an image decoding device that converts an undefined length code word packed into constant length data into the original undefined length code word and then decodes the same, a means for reading out the packed undefined length code word in units of a constant number of bits; means for shifting the data read out in units of a certain number of bits by a plurality of bits at a time; and means for selectively supplying the variable n indicating the code word length l of the indefinite length code word or the conversion processing state and shifting the bits. An image decoding device comprising: a ROM for a sequencer that determines the amount of shift in the data; and means for temporarily storing the shifted data in an appropriate bit position and converting it into the original indefinite length code word. .
JP23698588A 1988-09-20 1988-09-20 Picture encoding device and picture decoding device Pending JPH0284882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23698588A JPH0284882A (en) 1988-09-20 1988-09-20 Picture encoding device and picture decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23698588A JPH0284882A (en) 1988-09-20 1988-09-20 Picture encoding device and picture decoding device

Publications (1)

Publication Number Publication Date
JPH0284882A true JPH0284882A (en) 1990-03-26

Family

ID=17008685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23698588A Pending JPH0284882A (en) 1988-09-20 1988-09-20 Picture encoding device and picture decoding device

Country Status (1)

Country Link
JP (1) JPH0284882A (en)

Similar Documents

Publication Publication Date Title
US5524256A (en) Method and system for reordering bytes in a data stream
JPS6148298B2 (en)
US4545032A (en) Method and apparatus for character code compression and expansion
JPH07177039A (en) Huffman coding / decoding device
US5832037A (en) Method of compressing and expanding data
JPH08314690A (en) Data compression method of individual string sequencers of data stream and its execution processor
JP2746109B2 (en) Huffman code decoding circuit
JPH10341167A (en) Variable length code decoding circuit
US20040021593A1 (en) Apparatus and method for decoding variable length code
US4583199A (en) Apparatus for aligning and packing a first operand into a second operand of a different character size
US5309156A (en) Variable-length code decoding device
US4128872A (en) High speed data shifter array
JPH02503981A (en) Methods for encoding and decoding data in blocks and encoding and decoding devices for performing this method
US5729725A (en) Mask data generator and bit field operation circuit
JPH0284882A (en) Picture encoding device and picture decoding device
JP3014999B2 (en) Huffman decoding device
US20050256996A1 (en) Register read circuit using the remainders of modulo of a register number by the number of register sub-banks
EP0499225B1 (en) Variable-length code decoding device
JPH03179562A (en) Data recorder and data editing
JPH09246990A (en) Variable length coder/decoder
JPH08316847A (en) Decoder for variable length code
JPH09284142A (en) Variable length decoder
JPH04215321A (en) Variable length code decoding circuit
JPS59112334A (en) Sequence generator
JPH11163736A (en) Processor