JP3255808B2 - Compression / expansion device - Google Patents

Compression / expansion device

Info

Publication number
JP3255808B2
JP3255808B2 JP27357994A JP27357994A JP3255808B2 JP 3255808 B2 JP3255808 B2 JP 3255808B2 JP 27357994 A JP27357994 A JP 27357994A JP 27357994 A JP27357994 A JP 27357994A JP 3255808 B2 JP3255808 B2 JP 3255808B2
Authority
JP
Japan
Prior art keywords
encoding
data
register
line
processing
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
JP27357994A
Other languages
Japanese (ja)
Other versions
JPH08139939A (en
Inventor
等 堀江
Original Assignee
松下電送システム株式会社
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 松下電送システム株式会社 filed Critical 松下電送システム株式会社
Priority to JP27357994A priority Critical patent/JP3255808B2/en
Publication of JPH08139939A publication Critical patent/JPH08139939A/en
Application granted granted Critical
Publication of JP3255808B2 publication Critical patent/JP3255808B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像データまたはその
符号データを扱う圧縮伸長装置に係わり、特にファクシ
ミリ装置などで必要な文書画像やハーフトーン画像デー
タの圧縮、画像符号データの伸長、画像データの変換
(拡大縮小)、画像符号データの他の符号への変換など
を複合した圧縮伸長装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a compression / expansion apparatus for handling image data or its code data, and more particularly to compression of a document image or halftone image data required for a facsimile apparatus, expansion of image code data, image data. The present invention relates to a compression / decompression device that combines conversion (enlargement / reduction) of image code and conversion of image code data into another code.

【0002】[0002]

【従来の技術】この種の圧縮伸長装置は、ファクシミリ
装置その他の画像通信装置、画像ファイルシステムなど
において必要となる。
2. Description of the Related Art This type of compression / decompression device is required in facsimile devices, other image communication devices, image file systems, and the like.

【0003】図23に、従来の圧縮伸長装置の構成を示
す。この圧縮伸長装置は符号化方式としてMH、MR、
MMRを実装し、主に文書画像の圧縮伸長に適してい
る。
FIG. 23 shows a configuration of a conventional compression / decompression device. This compression / decompression device uses MH, MR,
It is equipped with MMR and is suitable mainly for compression and decompression of document images.

【0004】最近のファクシミリ装置では、文書画像だ
けでなく誤差拡散処理などによるハーフトーン画像も圧
縮して伝送することが増えている。ハーフトーン画像の
圧縮には、従来実施例に見られるようなMH、MR、M
MR方式でなく、算術符号の方が圧縮性能が高いことが
知られている。
[0004] In recent facsimile apparatuses, a halftone image by error diffusion processing or the like as well as a document image is compressed and transmitted. For the compression of a halftone image, MH, MR, M
It is known that arithmetic codes have higher compression performance than MR codes.

【0005】[0005]

【発明が解決しようとする課題】ファクシミリ画像など
2値画像の圧縮伸長装置としては、既に広く使われてい
るMH、MR、MMR方式と、ハーフトーン画像の圧縮
にも適した算術符号化を合わせ持った圧縮伸長装置が理
想的である。しかし、これを実現するためにMH、M
R、MMRの圧縮伸長装置と、専用の算術符号器を単に
合わせたのでは、回路規模が増大しコストアップになる
という問題を生じる。また、一度にはどちらか一方のハ
ードウェアしか必要としないため、むだが多く、コスト
パフォーマンスが低いという問題もある。
As a compression / decompression device for a binary image such as a facsimile image, an MH, MR, MMR system which is already widely used is combined with an arithmetic coding which is also suitable for compressing a halftone image. A compression and decompression device is ideal. However, to achieve this, MH, M
The mere combination of the R / MMR compression / decompression device and the dedicated arithmetic encoder causes a problem that the circuit scale increases and the cost increases. In addition, since only one of the hardware is required at a time, there are many problems, and there is a problem that the cost performance is low.

【0006】本発明は上記課題に鑑みて為されたもので
あり、MH/MR/MMR符号化と算術符号化の双方の
圧縮伸長処理を回路規模の増大を極力抑えながら実現
し、しかも高速のスキャナ、プリンタに対する処理のリ
アルタイム性を実現できる画像処理装置における圧縮伸
張装置を提供することを目的とする。
The present invention has been made in view of the above problems, and realizes both MH / MR / MMR encoding and arithmetic encoding / decompression processing while minimizing an increase in circuit scale, and achieves a high-speed operation. It is an object of the present invention to provide a compression / expansion apparatus in an image processing apparatus capable of realizing processing of a scanner and a printer in real time.

【0007】[0007]

【課題を解決するための手段】本発明は上記目的を達成
するために、MH、MR、MMR符号化または復号化を
実行するための専用処理回路と、該専用処理回路の符号
化または復号化を実行させるとともにマルコフモデル算
術符号化処理を実行するマイクロプログラム制御部とを
備えたものである。
In order to achieve the above object, the present invention provides a dedicated processing circuit for performing MH, MR, MMR encoding or decoding, and an encoding or decoding of the dedicated processing circuit. And a microprogram control unit for executing a Markov model arithmetic coding process.

【0008】また、マルコフモデル算術符号化処理の速
度を向上させるために、本発明はMH、MR、MMR符
号化または復号化を実行するための専用処理回路と、該
専用処理回路の符号化または復号化を実行させるととも
にマルコフモデル算術符号化処理を実行するマイクロプ
ログラム制御部とを備え、前記マイクロプログラム制御
部は画像データを所定数ライン分格納する第1のメモリ
と、該第1のメモリのワード幅の少なくとも2倍+所定
数ビット以上の容量を有し、前記第1のメモリより画像
データをワード単位で入力する第2のメモリと、該第2
のメモリに内の画像データを左右にビット単位にシフト
処理することにより、符号化処理のための状態分離信号
を生成する手段と、前記状態分離信号に応じて符号化時
における確率推定データを出力する手段と、前記確率推
定データを用いて符号データを出力する手段とを少なく
とも有したようにしたものである。
In order to improve the speed of the Markov model arithmetic coding process, the present invention provides a dedicated processing circuit for performing MH, MR, MMR coding or decoding, and a coding or decoding of the dedicated processing circuit. A microprogram control unit for executing decoding and executing a Markov model arithmetic coding process, wherein the microprogram control unit stores a first memory for storing a predetermined number of lines of image data; A second memory having a capacity of at least twice the word width + a predetermined number of bits or more, and inputting image data from the first memory in word units;
Means for generating a state separation signal for encoding processing by shifting the image data in the memory left and right in bit units, and outputting probability estimation data at the time of encoding according to the state separation signal. And means for outputting code data using the probability estimation data.

【0009】また、本発明はさらなる上記算術符号化処
理の速度向上のために、画像データを入力し、該画像デ
ータにマルコフモデル算術符号化処理を実行する制御手
段を備え、該制御手段は前記符号化処理におけるコンテ
クスト生成処理を専用ハード回路で実行し、その後の符
号データを算出して出力する処理をマイクロプログラム
で実行するものである。本発明は、かかる構成のみに限
定されるものではない。特許請求の範囲の記載並びに本
明細書全体の記載から理解されるように、本発明は様々
な態様を包含し、それぞれの態様に特徴的な構成を備え
るものである。
In order to further improve the speed of the arithmetic coding process, the present invention further comprises control means for inputting image data and executing a Markov model arithmetic coding process on the image data. The context generation process in the encoding process is executed by a dedicated hardware circuit, and the subsequent process of calculating and outputting encoded data is executed by a microprogram. The present invention is not limited to only such a configuration. As will be understood from the description of the claims and the description throughout the present specification, the present invention includes various aspects, and each aspect has a characteristic configuration.

【0010】[0010]

【作用】本発明の画像処理装置は、上述の構成によっ
て、符号化処理または画像変換と符号化の組み合わせ処
理を実行する圧縮装置としての動作、復号化処理または
復号化と画像変換の組み合わせ処理を実行する伸長装置
としての動作、復号化と符号化の組み合わせ処理または
復号化、画像変換及び符号化の組み合わせ処理を実行す
る符号変換装置としての動作のいづれも可能である。M
H、MR、MMR符号化と算術符号の符号化、復号化機
能によって、文書画像からハーフトーン画像に渡る各種
の画像に対して効率のよい処理が可能である。
According to the image processing apparatus of the present invention, the operation as a compression apparatus for executing the encoding processing or the combined processing of the image conversion and the encoding, the decoding processing or the combined processing of the decoding and the image conversion is performed by the above configuration. Any of the operation as a decompression device to execute, and the operation as a code conversion device to execute a combination process of decoding and encoding or a combination of decoding, image conversion, and encoding is possible. M
The H, MR, and MMR coding and arithmetic coding and decoding functions enable efficient processing of various images ranging from a document image to a halftone image.

【0011】さらに、算術符号化処理を実行するにおい
て、ソフト処理では多大の時間を有するコンテクスト生
成処理を専用のハード回路で実行するようにしたため
に、さらなる速度の向上を得ることができる。
Further, in executing the arithmetic coding process, the context generation process, which requires a lot of time in software processing, is executed by a dedicated hardware circuit, so that a further improvement in speed can be obtained.

【0012】[0012]

【実施例】【Example】

圧縮伸長装置の全体構成 図1は本発明による圧縮伸長装置の一例の概略構成を示
すブロック図である。この圧縮伸長装置は圧縮装置、伸
長装置、画像変換(拡大縮小)装置及び符号変換装置、
DMA転送装置を複合した画像処理装置である。まず、
図1の主な構成要素を説明する。
FIG. 1 is a block diagram showing a schematic configuration of an example of a compression / expansion apparatus according to the present invention. The compression / decompression device includes a compression device, a decompression device, an image conversion (enlargement / reduction) device, and a code conversion device.
This is an image processing device combining a DMA transfer device. First,
The main components of FIG. 1 will be described.

【0013】図1において、100はイメージバス部と
のインタフェース機能を実現するイメージバス制御部で
ある。200はRAMであり、内部処理のためのライン
メモリ及びパラメータレジスタとして使用される。この
RAM200は、プロセッサブロックのMPU6(図2
0)からもアクセスできる。300は内部データバス4
(BEデータバス)1700によるRAM200に対す
るDMA転送を制御する内部バスDMA制御部、400
はMPUとインタフェースするためのシステムバス制御
部である。
In FIG. 1, reference numeral 100 denotes an image bus control unit for realizing an interface function with the image bus unit. A RAM 200 is used as a line memory and a parameter register for internal processing. This RAM 200 is an MPU 6 (FIG. 2) of a processor block.
0). 300 is the internal data bus 4
(BE data bus) Internal bus DMA controller 400 for controlling DMA transfer to RAM 200 by 1700, 400
Is a system bus control unit for interfacing with the MPU.

【0014】500は種々のレジスタとして利用される
レジスタバンクであり、実際的にはRAMが用いられ
る。600〜800は16ビット幅データの変化画素ア
ドレス情報の一時記憶のためのFIFOバッファ、12
00は内部処理の実行に関連して利用される算術論理演
算部、1300はMH/MR/MMR復号器、1400
は画像の主走査方向の画像変換(拡大縮小)を行なう画
像変換部、1500はMH/MR/MMRの符号器、1
600は装置動作の制御のためのマイクロプログラム制
御部である。
Reference numeral 500 denotes a register bank used as various registers, and a RAM is actually used. Reference numerals 600 to 800 denote FIFO buffers for temporarily storing changed pixel address information of 16-bit width data.
00 is an arithmetic and logic operation unit used in connection with execution of internal processing, 1300 is an MH / MR / MMR decoder, 1400
Denotes an image conversion unit for performing image conversion (enlargement / reduction) in the main scanning direction of an image; 1500, an MH / MR / MMR encoder;
Reference numeral 600 denotes a microprogram control unit for controlling the operation of the apparatus.

【0015】1700はDMA制御バスであり、各部か
らのDMA転送要求信号や各部へのDMA転送許可信号
線から成る。内部データバス(BEデータバス)180
0は、主に画像データの転送のために使われる16ビッ
トのバスである。1900も16ビットの内部データバ
ス(BCデータバス)であり、これは主に符号化データ
の転送に利用される。
Reference numeral 1700 denotes a DMA control bus, which comprises a DMA transfer request signal from each section and a DMA transfer permission signal line to each section. Internal data bus (BE data bus) 180
0 is a 16-bit bus mainly used for transferring image data. 1900 is also a 16-bit internal data bus (BC data bus), which is mainly used for transferring encoded data.

【0016】図1には示されていないが、マイクロプロ
グラム制御部1600と装置内各部との間にマイクロプ
ログラム制御バスが存在する。
Although not shown in FIG. 1, there is a microprogram control bus between the microprogram control unit 1600 and each unit in the apparatus.

【0017】MH/MR/MMR符号器の構成 図2はMH/MR/MMR符号器1500のブロック図
である。図2において、変化画素アドレス制御部150
2は、FIFOバッファ900より参照ラインの変化画
素アドレスを、FIFOバッファ1100より符号化ラ
インの変化画素アドレスをそれぞれ取り込み、符号化モ
ード判定部1504に入力する。
Configuration of MH / MR / MMR Encoder FIG. 2 is a block diagram of the MH / MR / MMR encoder 1500. In FIG. 2, the changing pixel address control unit 150
2 receives the changed pixel address of the reference line from the FIFO buffer 900 and the changed pixel address of the coded line from the FIFO buffer 1100, and inputs them to the coding mode determination unit 1504.

【0018】この符号化モード判定部1504は、入力
した変化画素アドレス情報より符号化モード(パス、垂
直、水平)の判定を行なう。符号テーブル検索部150
6は、符号化モードの判定結果に基づいて内部の符号テ
ーブルを検索し符号割当を行なう。
The coding mode determination unit 1504 determines the coding mode (pass, vertical, horizontal) from the input changed pixel address information. Code table search unit 150
6 performs code allocation by searching an internal code table based on the determination result of the coding mode.

【0019】パッキング処理部1508は、符号テーブ
ル検索部1506より出力された可変長の16ビット/
ワードの符号データへの変換(ワードパッキング)を行
ない、ワード単位で内部データバス1900または18
00へ出力する。1510は符号器1500の全体制御
のためのメインシーケンサである。内部RAM200と
のDMA転送の要求は、このメインシーケンサ1510
より出される。1512〜1518はメインシーケンサ
1510の制御下で対応する機能ブロック1502〜1
508を制御するサブシーケンサである。マイクロプロ
グラム制御部1600は、マイクロプログラム制御バス
1602を介し、符号器1500に対する符号化モー
ド、1ライン幅(1ラインの画像データのワード数)の
指定や起動などの制御を行なうことができ、また符号器
1500の状態を取得できる。符号器1500はライン
単位のMH、MR、MMR符号化を実行する専用ユニッ
トである。
The packing processing unit 1508 outputs the variable-length 16 bits / byte output from the code table search unit 1506.
Conversion (word packing) of the word to coded data is performed, and the internal data bus 1900 or 18
Output to 00. Reference numeral 1510 denotes a main sequencer for controlling the entire encoder 1500. A request for DMA transfer with the internal RAM 200 is sent to the main sequencer 1510
Issued by 1512 to 1518 are corresponding functional blocks 1502 to 1 under the control of the main sequencer 1510.
508 is a sub-sequencer for controlling 508. The microprogram control unit 1600 can control the encoding mode for the encoder 1500, the designation of one line width (the number of words of one line of image data), the activation, and the like via the microprogram control bus 1602. The state of the encoder 1500 can be obtained. The encoder 1500 is a dedicated unit that executes MH, MR, and MMR coding in line units.

【0020】MH/MR/MMR復号器の構成 図3は復号器1300のブロック図である。図3におい
て、符号シフト部1302は、内部データバス(BCデ
ータバス)1900より取り込んだ符号データの解読を
終了した符号長分だけシフトし、符号解析部1304に
常に未解読の符号データを与える。符号解析部1304
は、符号データによって内部の復号ROMの検索を行な
い、復号符号を描画部1308へ送る。a0アドレス演
算部1306は、FIFOバッファ900より入力した
参照ラインの変化画素アドレス情報と符号解析部130
4から入力した復号符号とから、参照ラインの基準変化
画素アドレスであるa0アドレス(ITU−T勧告T。
4参照)を計算する。描画部はa0アドレスと色(白/
黒)情報から画像データを生成し、生成した画像データ
をワード(16ビット)単位で内部データバス(BEデ
ータバス)1800へ出力する。
Configuration of MH / MR / MMR Decoder FIG. 3 is a block diagram of the decoder 1300. In FIG. 3, a code shift unit 1302 shifts the code data taken in from an internal data bus (BC data bus) 1900 by the code length for which decoding has been completed, and always supplies undecoded code data to a code analysis unit 1304. Code analysis unit 1304
Searches the internal decoding ROM according to the code data, and sends the decoded code to the drawing unit 1308. The a0 address calculation unit 1306 calculates the reference pixel changing pixel address information input from the FIFO buffer 900 and the code analysis unit 130.
A0 address which is a reference change pixel address of the reference line from the decoded code input from I.T.
4) is calculated. The drawing unit uses the a0 address and color (white /
Black) The image data is generated from the information, and the generated image data is output to the internal data bus (BE data bus) 1800 in word (16 bit) units.

【0021】1310は復号器1300の全体的制御を
行なうメインシーケンサ、1312〜1318はメイン
シーケンサ1310の制御下で対応する機能ブロック1
302〜1318を制御するサブシーケンサである。D
MA転送要求はメインシーケンサ1310より出る。マ
イクロプログラム制御部1600は、マイクロプログラ
ム制御バス1602を介し、復号器1300に対する復
号化モード、1ラインの復元幅幅の指定や起動などの制
御を行なうことができ、また復号器1300の状態を取
得できる。
Reference numeral 1310 denotes a main sequencer for performing overall control of the decoder 1300, and reference numerals 1312 to 1318 denote corresponding functional blocks 1 under the control of the main sequencer 1310.
A sub-sequencer that controls 302 to 1318. D
The MA transfer request is issued from the main sequencer 1310. The microprogram control unit 1600 can control the decoding mode for the decoder 1300, the designation of the restoration width of one line, the activation, and the like via the microprogram control bus 1602, and acquire the state of the decoder 1300. it can.

【0022】復号器1300はライン単位のMH、M
R、MMR復号化を実行する専用ユニットである。この
復号化処理動作は前記文献1に説明した通りである。
The decoder 1300 performs MH, M in line units.
This is a dedicated unit for performing R and MMR decoding. This decoding processing operation is as described in the above-mentioned document 1.

【0023】画像変換部の構成 図4は画像変換部1400のブロック図である。図4に
おいて、レジスタ1402はFIFOバッファ1000
より入力する変化画素アドレスと色情報(B/W)を保
持するもので、レジスタ1404は内部データバス(B
Eデータバス)1800を通じて拡大縮小率をセットさ
れるものである。乗算器1406は、その変化画素アド
レスと拡大縮小率を乗算することによって、拡大縮小後
の変化画素アドレスを求め描画部1408に与える。
FIG. 4 is a block diagram of the image conversion unit 1400. In FIG. 4, a register 1402 stores the FIFO buffer 1000
The register 1404 holds the changed pixel address and the color information (B / W) input from the internal data bus (B / W).
The enlargement / reduction ratio is set through an E data bus (1800). The multiplier 1406 obtains a changed pixel address after scaling by multiplying the changed pixel address by the scaling ratio, and provides the drawing unit 1408 with the changed pixel address.

【0024】描画部1408は、与えられた変化画素ア
ドレスとレジスタ1402より与えられる色情報に基づ
き拡大縮小後の画像データを生成する。この画像データ
はレジスタ1410を介しワード単位で内部データバス
(BEデータバス)1800へ出力される。1412は
内部データバス1800を介し変換前の1ライン幅(ワ
ード数)をカウントするためのレジスタである。141
6は画像変換部1400内各部を制御するシーケンサで
あり、DMA転送要求も出す。
The drawing unit 1408 generates image data after scaling based on the given changed pixel address and the color information given from the register 1402. This image data is output to the internal data bus (BE data bus) 1800 via the register 1410 in word units. Reference numeral 1412 denotes a register for counting one line width (the number of words) before conversion via the internal data bus 1800. 141
Reference numeral 6 denotes a sequencer that controls each unit in the image conversion unit 1400, and also issues a DMA transfer request.

【0025】画像変換部1400の処理動作は前記文献
1に説明した通りである。 算術論理演算部、レジスタバンクなどの構成 図5は算術論理演算部1200及びレジスタバンク50
0とその周辺の構成を示している。図5において、12
02、1204は40ビットのALUとシフタである。
The processing operation of the image conversion unit 1400 is as described in the above reference 1. Configuration of Arithmetic Logic Operation Unit, Register Bank, etc. FIG.
0 and its peripheral configuration are shown. In FIG.
02 and 1204 are a 40-bit ALU and a shifter.

【0026】図から明らかなように、レジスタバンク5
00などからのデータをALU/シフタ部1200にロ
ードして必要な演算を行ない、演算結果をレジスタバン
ク500内のレジスタやバスI/F 1206を介して
BEデータバスに接続される機能ユニット、例えばデー
タRAM200などに書き込むことができる。算術論理
演算部1200の演算機能は加算、減算、ビットシフ
ト、論理AND/ORなどの論理演算である。これらの
処理に必要な制御信号はマイクロプログラム制御部16
00から出力される。
As is apparent from FIG.
00, etc., are loaded into the ALU / shifter unit 1200 to perform necessary calculations, and the calculation results are stored in registers in the register bank 500 or functional units connected to the BE data bus via the bus I / F 1206, for example, The data can be written in the data RAM 200 or the like. The arithmetic function of the arithmetic and logic unit 1200 is a logical operation such as addition, subtraction, bit shift, and logical AND / OR. The control signals required for these processes are provided by the microprogram controller 16.
Output from 00.

【0027】図6はレジスタバンク500内部の一つの
レジスタ502の構成とバスI/F1206を示したも
のである。レジスタ502は3つの部分、即ちビット0
〜ビット15(下位ワード)、ビット16〜ビット31
(上位ワード)、ビット32〜ビット39(拡張バイ
ト)に分けられている。BEデータバス1800に対し
て、下位ワード、上位ワード独立してリード/ライトで
きる構成である。セレクタ504、506とバスI/F
1206内のセレクタはそのためのものである。レジス
タ各部のリード/ライト信号508、510、512と
レジスタの選択信号514は図5のアドレス制御部から
出力される。
FIG. 6 shows the configuration of one register 502 in the register bank 500 and the bus I / F 1206. Register 502 has three parts, bit 0
To bit 15 (lower word), bit 16 to bit 31
(Upper word) and bit 32 to bit 39 (extended byte). In this configuration, the lower word and the upper word can be independently read / written from / to the BE data bus 1800. Selectors 504 and 506 and bus I / F
The selector in 1206 is for that. The read / write signals 508, 510, 512 of each section of the register and the register selection signal 514 are output from the address control section of FIG.

【0028】マイクロプログラム制御部1600、シス
テムバス制御部400、イメージバス制御部100は前
記文献1に説明したものと同一である。
The microprogram control unit 1600, the system bus control unit 400, and the image bus control unit 100 are the same as those described in Reference 1.

【0029】ラインメモリ関連の構成 図7は内部バスDMA制御部300の内部構成、レジス
タバンク500上に定義されるアドレスレジスタ、デー
タRAM200上に定義されるメモリ領域と、それらの
対応関係を説明するための図である。
FIG. 7 illustrates the internal configuration of the internal bus DMA controller 300, the address registers defined on the register bank 500, the memory areas defined on the data RAM 200, and the correspondence between them. FIG.

【0030】データRAM200は、n個のメモリ領域
(MEM#0〜MEM#(n−1))に分割されて使わ
れる。各メモリ領域に対応して、内部バスDMA制御部
300には、n個のアドレスポインタ(ADP0〜AD
P(n−1))があり、レジスタバンク500には、n
個のアドレスレジスタ(ADREG0〜ADREG(n
−1))がある。このn個のアドレスレジスタはレジス
タ502(図6)の下位ワードまたは上位ワードに定義
されるが、図では、これらを16ビットレジスタの連続
した集合体として示している。
The data RAM 200 is used by being divided into n memory areas (MEM # 0 to MEM # (n-1)). The internal bus DMA controller 300 has n address pointers (ADP0 to ADP) corresponding to each memory area.
P (n-1)), and the register bank 500 has n
Address registers (ADREG0 to ADREG (n
-1)). The n address registers are defined as lower words or upper words of the register 502 (FIG. 6), which are shown in the figure as a continuous collection of 16-bit registers.

【0031】i番目のアドレスレジスタADREGi
は、メモリ領域の先頭アドレスを格納するアドレス部分
と、そのメモリ領域に付随したフラグ情報、例えばライ
ンメモリに有効データが有るか否か、などを格納するフ
ラグ部分に分かれている。アドレス部分には、初期値と
してi番目のメモリ領域MEM#iの先頭アドレスがマ
イクロプログラム制御部1600によって、圧縮伸長装
置の初期化時に書き込まれる。MEM#iをアクセスす
るアドレスポインタはADPiである。ADPiの初期
値は、ADREGiの値がBEデータバス1800を通
して書き込まれる。各アドレスポインタはアップダウン
カウンタとして構成され、初期値設定後は、1ワードR
/Wする毎にメモリアドレスがインクリメントまたはデ
クリメントされる。
The i-th address register ADREGi
Are divided into an address portion for storing a head address of a memory area, and a flag portion for storing flag information associated with the memory area, for example, whether or not there is valid data in a line memory. In the address portion, the head address of the i-th memory area MEM # i is written as an initial value by the microprogram control unit 1600 when the compression / decompression device is initialized. The address pointer for accessing MEM # i is ADPi. As the initial value of ADPi, the value of ADREGi is written through the BE data bus 1800. Each address pointer is configured as an up / down counter, and after setting an initial value, one word R
Each time / W, the memory address is incremented or decremented.

【0032】算術符号の概説 本発明の圧縮伸長装置による算術符号の実施例を説明す
る前に、マルコフモデル算術符号化の概要を説明する。
本実施例の算術符号化は、ITU−T勧告T.82記載
の方式に準拠する。
Overview of Arithmetic Code Before describing an embodiment of an arithmetic code by the compression / decompression device of the present invention, an outline of Markov model arithmetic coding will be described.
The arithmetic coding according to the present embodiment conforms to the method described in ITU-T Recommendation T.82.

【0033】図8はマルコフモデルを構築するための参
照画素の配置を示したものである。Yラインを符号化ラ
インとし、その前ライン、前々ラインをそれぞれ(Y−
1)ライン、(Y−2)ラインとする。Yライン上の”
?”が符号化の対象となる符号化シンボル(画素)であ
り、A〜Iの10画素が参照画素である。
FIG. 8 shows an arrangement of reference pixels for constructing a Markov model. The Y line is an encoding line, and the preceding line and the line before the preceding line are respectively (Y-
1) Line and (Y-2) line. On the Y line
? "Is an encoding symbol (pixel) to be encoded, and 10 pixels A to I are reference pixels.

【0034】これらの参照画素を適当な順序に並べて、
例えばABC順に並べて
By arranging these reference pixels in an appropriate order,
For example, arrange them in ABC order

【0035】 とする。Snは各画素が2通りの値をとるので、全部で
210通り存在する。以下では、Sn、n=0、・・・、
(210−1)を状態識別信号またはコンテクストと呼
ぶ。
[0035] And Since each pixel takes two values of Sn, there are a total of 210 types of Sn. In the following, Sn, n = 0,.
(2 10-1) is called a state identification signal or context.

【0036】マルコフモデル算術符号化では、各コンテ
クスト毎に算術符号化処理を行なう。算術符号は、符号
化シンボル系列の発生確率に対応する2進小数点を符号
とする。
In the Markov model arithmetic coding, arithmetic coding is performed for each context. The arithmetic code has a binary point corresponding to the occurrence probability of the coded symbol sequence as a code.

【0037】図9はマルコフモデル算術符号器の概念図
を示したものである。符号器全体はコンテクスト生成
部、コンテクストテーブル、確率推定部、及び算術符号
器から構成され、それらの相互関係を示している。コン
テクスト生成部は、上述したように参照画素の値による
状態分離を行ない、その状態を示すコンテクスト識別番
号Snを出力する。
FIG. 9 is a conceptual diagram of a Markov model arithmetic encoder. The entire encoder is composed of a context generator, a context table, a probability estimator, and an arithmetic encoder, and shows their interrelationships. The context generation unit performs state separation based on the value of the reference pixel as described above, and outputs a context identification number Sn indicating the state.

【0038】コンテクストテーブルはRAMで構成さ
れ、各コンテクスト毎に発生しやすいシンボル(優勢シ
ンボル:MPS)の値(MPS値)と、後述する確率推
定器(またはQeテーブル)の状態番号が書かれてい
る。MPS値は符号化シンボル”?”の予測値として使
われる。確率推定器は、113状態から成るステートマ
シンであり、ROMまたはRAMで構成される。各状態
(ST)は優勢シンボルの逆にあたる劣勢シンボル(以
下LPS)の生起確率の推定値Qe(ST)と、符号化
後の状態遷移先などが書かれている。算術符号器は、符
号化シンボル”?”、MPS値、Qe(ST)を入力情
報として、符号化シンボル”?”のMPS値による予測
結果に応じて、数直線の再帰的分割に相当する処理を実
行し符号を出力する。符号はビットシフト操作によって
生成され、それ以前の符号ビット系列に次々に連結され
る。ここでは、これを
The context table is composed of a RAM, in which a symbol (dominant symbol: MPS) value (MPS value) which is likely to be generated for each context and a state number of a probability estimator (or Qe table) described later are written. I have. The MPS value is used as a predicted value of the encoded symbol “?”. The probability estimator is a state machine including 113 states, and is configured by a ROM or a RAM. In each state (ST), an estimated value Qe (ST) of the probability of occurrence of an inferior symbol (hereinafter, LPS), which is the reverse of the superior symbol, and a state transition destination after encoding are written. The arithmetic coder uses a coded symbol “?”, An MPS value, and Qe (ST) as input information and performs a process corresponding to a recursive division of a number line according to a prediction result based on the MPS value of the coded symbol “?”. And outputs the sign. The code is generated by a bit shift operation, and is successively concatenated to the previous code bit sequence. Here, this

【0039】[0039]

【数2】 Ci=Ci-1+f{MPS予測値、Qe(ST)} =Ci-1+f{*Sn、*[*Sn]} と表わす。ここで+は連結処理、*XはXが示すメモリ
の内容を示す。fは算術符号化処理を表わし、加算、減
算、ビットシフト、論理演算の組み合わせである。ま
た、復号化も符号化の逆演算として同様にして実行でき
る。
## EQU00002 ## Ci = Ci-1 + f {MPS predicted value, Qe (ST)} = Ci-1 + f {* Sn, * [* Sn]}. Here, + indicates the connection processing, and * X indicates the contents of the memory indicated by X. f represents arithmetic coding processing, and is a combination of addition, subtraction, bit shift, and logical operation. Decoding can be performed in the same manner as the inverse operation of encoding.

【0040】マルコフモデル算術符号器の第1の実施例 図10は、本発明の圧縮伸長装置における算術符号化処
理時のデータRAM200の使用方法を示したものであ
る。メモリ領域は、ラインメモリ領域、コンテクストテ
ーブル、確率推定テーブル、符号データバッファに分か
れている。
First Embodiment of Markov Model Arithmetic Encoder FIG. 10 shows a method of using the data RAM 200 at the time of arithmetic encoding processing in the compression / decompression apparatus of the present invention. The memory area is divided into a line memory area, a context table, a probability estimation table, and a code data buffer.

【0041】前記文献1に示したように、MEM#0、
MEM#1は、それぞれ入力ラインメモリと変換前ライ
ンメモリとして使用する。主走査変換後の画像データが
順にMEM#1〜MEM#4に格納される。MEM#4
を符号化ラインとすると、MEM#1〜MEM#3が参
照ラインであり、この領域から参照画素が選ばれる。
As shown in the above document 1, MEM # 0,
MEM # 1 is used as an input line memory and a pre-conversion line memory, respectively. The image data after the main scan conversion is sequentially stored in MEM # 1 to MEM # 4. MEM # 4
Is a coding line, MEM # 1 to MEM # 3 are reference lines, and a reference pixel is selected from this region.

【0042】コンテクストテーブルの各コンテクストは
1ワードで表わされる。例えば、コンテクストSは、2
04のように下位12ビットがQeテーブルのアドレ
ス、上位1ビットが、そのコンテクストでのMPS値が
書かれている。この領域は、符号化の初期状態で全て”
0”が書かれる。確率推定テーブルは、1つの状態を3
ワードで記述する構成である。206に示すように、第
1ワードがLPSの生起確率の推定値Qe、第2ワー
ド、第3ワードはそれぞれ符号化シンボルをMPS、L
PSとして符号化した場合の次の遷移先を示すアドレス
である。SWは符号化シンボルをLPSとして符号化し
た場合、次のMPS値を変更するか否かを示すフラグで
ある。これらの情報は、ITU−T勧告T. 82に規定
されている。
Each context in the context table is represented by one word. For example, the context S is 2
As in 04, the lower 12 bits describe the address of the Qe table, and the upper 1 bit describes the MPS value in the context. This area is all in the initial state of encoding.
0 ”is written. In the probability estimation table, one state is set to 3
The configuration is described in words. As shown at 206, the first word is an estimated value Qe of the probability of occurrence of LPS, and the second and third words are coded symbols MPS and L, respectively.
This is the address indicating the next transition destination when encoded as PS. SW is a flag indicating whether or not to change the next MPS value when the encoded symbol is encoded as LPS. Such information is specified in ITU-T Recommendation T.82.

【0043】符号データバッファは、符号を外部に出力
する前に一時的に符号データを格納する領域である。図
11は復号化時におけるメモリ領域を示す。MEM#0
〜MEM#2に復元ラインを格納する。MEM#3はM
EM#2の復元ラインを変換したライン(変換後ライ
ン)を格納する。MEM#4は外部に出力するラインを
格納する。変換後ラインや出力ラインの生成方法は、参
考文献1記載の実施例と同様にして実現できる。その他
の領域は符号化時と共通である。
The code data buffer is an area for temporarily storing code data before outputting the code to the outside. FIG. 11 shows a memory area at the time of decoding. MEM # 0
.About.MEM # 2. MEM # 3 is M
The converted line of the restored line of EM # 2 (the converted line) is stored. MEM # 4 stores a line to be output to the outside. The method of generating the converted line and the output line can be realized in the same manner as the embodiment described in Reference 1. Other areas are common to those at the time of encoding.

【0044】次に、算術符号化処理を説明する。図12
はコンテクスト生成処理を示す。R1、R2、R3はレ
ジスタバンク500内に定義されたレジスタである。符
号化ラインの画像データはR3に、データRAM200
のMEM#4のデータがロードされる。参照ラインは、
(Y−1)ラインがR2に、(Y−2)ラインがR1に
ロードされる。図中、IMG(Y、i)は、Yラインの
第iワード目の画像データを表わす。
Next, the arithmetic coding process will be described. FIG.
Indicates a context generation process. R1, R2, and R3 are registers defined in the register bank 500. The image data of the coding line is stored in R3,
MEM # 4 data is loaded. The reference line is
The (Y-1) line is loaded into R2, and the (Y-2) line is loaded into R1. In the figure, IMG (Y, i) represents the image data of the i-th word of the Y line.

【0045】IMG(Y、i)をR3の下位ワードにロ
ードし、符号化シンボルをビット15の位置に合わせ
る。参照ラインデータIMG(Y−1、i)、IMG
(Y−2、i)をR2、R1の上位ワードにロードする
と、参照画素A〜Jの配置は図示したようになる(図8
参照)。
Load IMG (Y, i) into the lower word of R3 and align the coded symbol with bit 15. Reference line data IMG (Y-1, i), IMG
When (Y-2, i) is loaded into the upper word of R2 and R1, the arrangement of the reference pixels A to J is as shown in FIG.
reference).

【0046】図13は1ラインの算術符号化処理のフロ
ーを示す。処理2001でR1、R2、R3をクリアす
る。処理2002で画像データIMG(Y、0)をR3
の下位ワードに、IMG(Y−1、0)、IMG(Y−
1、1)をR2の上位、下位ワードに、IMG(Y−
2、0)、IMG(Y−2、1)をR1の上位、下位ワ
ードにロードする。以上の処理は、各ラインの算術符号
化の初期化処理である。この2つの処理を実行すると、
符号化ラインの第1ワードが、R3の下位ワードに、前
ラインの第1ワードがR2の上位ワードに、前々ライン
の第1ワードがR1の上位ワードに入り、その他のビッ
トは”0”になる。
FIG. 13 shows the flow of the arithmetic coding process for one line. In processing 2001, R1, R2, and R3 are cleared. In process 2002, the image data IMG (Y, 0) is
IMG (Y-1, 0) and IMG (Y-
1, 1) as the upper and lower words of R2, and IMG (Y-
2, 0) and IMG (Y-2, 1) are loaded into the upper and lower words of R1. The above process is an initialization process of arithmetic coding of each line. When these two processes are executed,
The first word of the encoding line is in the lower word of R3, the first word of the previous line is in the upper word of R2, the first word of the line before the last is in the upper word of R1, and the other bits are "0". become.

【0047】処理2003〜処理2010が1ワード画
像データの符号化処理である。処理2003はコンテク
スト生成処理であり、後に詳しく説明する。処理200
4で符号化シンボル”?”と予測値MPS(S)の一致
を調べる。このとき、コンテクストはSとする。予測が
一致すれば、符号化シンボルは処理2005でMPSと
して符号化され、そうでなければ処理2006でLPS
として符号化される。
Processes 2003 to 2010 are encoding processes of one-word image data. The process 2003 is a context generation process, which will be described later in detail. Processing 200
In step 4, it is checked whether the encoded symbol "?" Matches the predicted value MPS (S). At this time, the context is S. If the predictions match, the encoded symbol is encoded as MPS in operation 2005; otherwise, the LPS is encoded in operation 2006
Is encoded as

【0048】処理2007〜処理2009でレジスタR
1〜R3を左に1ビットシフトする。そうすることで、
図12から分かるように、符号化シンボルと参照画素が
更新される。
In processing 2007 to processing 2009, register R
1 to R3 are shifted left by one bit. By doing so,
As can be seen from FIG. 12, the encoded symbol and the reference pixel are updated.

【0049】処理2010で、16シンボルの符号化が
終了したかどうか判断する。これは初期値を16とする
カウンタを減算し、それがゼロになることを調べる。1
6シンボルの符号化が終了するまで、処理2003〜処
理2010を繰り返す。
In process 2010, it is determined whether encoding of 16 symbols has been completed. This subtracts the counter whose initial value is 16, and checks that it becomes zero. 1
Steps 2003 to 2010 are repeated until encoding of six symbols is completed.

【0050】16シンボルの符号化が終了すると、処理
2007〜処理2009によって、16ビットシフトさ
れるので、レジスタR1〜R3の下位ワードのデータが
全て上位ワードに移動する。処理2011〜処理201
3でR1〜R3の下位ワードに次の画像データをロード
する。R1LはレジスタR1の下位ワードを表わす。処
理2014で1ライン分の符号化処理の終了を判断し、
終了していなければ処理2003〜処理2013を繰り
返す。
When the encoding of the 16 symbols is completed, the data is shifted by 16 bits in steps 2007 to 2009, so that all the data of the lower words of the registers R1 to R3 move to the upper word. Processing 2011 to processing 201
At 3, the next image data is loaded into the lower words of R1 to R3. R1L represents the lower word of register R1. In process 2014, the end of the encoding process for one line is determined.
If not completed, the processes 2003 to 2013 are repeated.

【0051】図14は処理2003(図13)の詳細を
示すフローである。この図ではコンテクスト識別信号
は、レジスタR0に生成するものとしている。R0は、
R1〜R3と同様にレジスタバンク500内に設けられ
たレジスタである。処理2020は、レジスタR1を右
に17ビットシフトする。その結果、R0は図15の2
100に示すようになる。処理2021は、R2を右に
13ビットシフトし、それをR0の上位ワードにライト
する。R0HはR0の上位ワードを表わす。その結果、
R0は図15の2111になる。処理2022は、R0
を右に5ビットシフトし、R0は図15の2112にな
る。処理2023は、R3の上位ワードをR0の上位ワ
ードにライトする。その結果、R0は図15の2113
になる。処理2024でR0を左に22ビットシフト
し、参照画素Jをビット39の位置に合わせる。処理2
025で、R0を右に30ビットシフトし、参照画素A
をビット0の位置に移動する。このとき、シフタ120
4の上位ビットからは”0”が入るように構成すると、
処理2025の結果、R0は図15の2115になり、
下位ワードにコンテクストが生成される。処理2026
でアドレスポインタADP(n−3)に、このデータを
書き込み、MPS符号化、LPS符号化処理でコンテク
ストテーブルをアクセスすることができる。
FIG. 14 is a flowchart showing details of the processing 2003 (FIG. 13). In this figure, the context identification signal is generated in the register R0. R0 is
These registers are provided in the register bank 500 like R1 to R3. Process 2020 shifts register R1 right by 17 bits. As a result, R0 is 2 in FIG.
As shown in FIG. The process 2021 shifts R2 to the right by 13 bits and writes it to the upper word of R0. R0H represents the upper word of R0. as a result,
R0 becomes 2111 in FIG. The process 2022 is executed in R0
Is shifted right by 5 bits, and R0 becomes 2112 in FIG. The process 2023 writes the upper word of R3 to the upper word of R0. As a result, R0 is 2113 in FIG.
become. In step 2024, R0 is shifted to the left by 22 bits, and the reference pixel J is adjusted to the position of bit 39. Processing 2
025, R0 is shifted right by 30 bits and the reference pixel A
To the position of bit 0. At this time, the shifter 120
If it is configured so that "0" is entered from the upper 4 bits,
As a result of the process 2025, R0 becomes 2115 in FIG.
A context is created in the lower word. Process 2026
Then, this data is written to the address pointer ADP (n-3), and the context table can be accessed by the MPS encoding and the LPS encoding.

【0052】このコンテクストをSとすると、図10に
示すコンテクストテーブルの先頭アドレスからSだけオ
フセットしたアドレスを、アドレスポインタADP(n
−3)にいれて、そのアドレスを読み出すことにより符
号化処理に必要なMPS(S)とQeテーブルのアドレ
ス204が得られる。次に、このQeテーブルのアドレ
スをアドレスポインタADP(n−2)に入れて、その
アドレスを読み出すと図10の206に示すように、Q
e値(Qe(ST))と1シンボルの符号化終了後のQ
eテーブルの状態遷移先(ここではQeテーブルのアド
レス)がMPS、LPSそれぞれの場合について得られ
る。
Assuming that this context is S, an address offset by S from the head address of the context table shown in FIG.
In step -3), by reading the address, the MPS (S) necessary for the encoding process and the address 204 of the Qe table are obtained. Next, by putting the address of this Qe table into the address pointer ADP (n-2) and reading out the address, as shown at 206 in FIG.
e value (Qe (ST)) and Q after encoding of one symbol
The state transition destination of the e table (here, the address of the Qe table) is obtained for each of the MPS and LPS.

【0053】図16は、図13の処理2005のMPS
符号化処理フローである。文献3、4に示されるよう
に、算術符号化の実行には、Aレジスタ、Cレジスタの
2つのレジスタが使われる。本圧縮伸長装置では、A、
Cレジスタは、レジスタバンク500内部に定義されて
いる。
FIG. 16 shows the MPS of the processing 2005 in FIG.
It is an encoding processing flow. As shown in Literatures 3 and 4, two registers, an A register and a C register, are used to execute arithmetic coding. In this compression / decompression device, A,
The C register is defined inside the register bank 500.

【0054】処理2120でAレジスタ値とQe(S
T)との減算を行なう。処理2121で、その値と、A
レジスタの初期値の1/2にあたるX’8000’(X
はヘキサ表示)を比較し、X’8000’よりも大きけ
れば符号化が終了する。Aレジスタ値がX’8000’
よりも小さければ処理2122で、Aレジスタ値とQe
(ST)の比較を行なう。処理2123では、Cレジス
タへの加算、Aレジスタ値のQe(ST)による置き換
え処理を行なう。
In process 2120, the A register value and Qe (S
T). In processing 2121, the value and A
X'8000 '(X which is 1/2 of the initial value of the register)
Is displayed in hexadecimal), and if it is larger than X'8000 ', the encoding is terminated. A register value is X'8000 '
If it is smaller, the value of the A register and Qe
(ST) is compared. In step 2123, addition to the C register and replacement of the A register value by Qe (ST) are performed.

【0055】処理2124では、コンテクストSのQe
テーブルアドレス204を領域206の”次のQeテー
ブルアドレス(MPS)”で置き換える。処理2125
では、Aレジスタ値がX’8000’より大きくなるま
で、A、Cレジスタを左にシフトする。この処理でCレ
ジスタから、吐き出されるビット系列が算術符号にな
る。この符号化データは、16ビット貯まる毎に、デー
タRAMのメモリ領域MEM#(n−1)に書き込ま
れ、この領域からシステムバス制御部400を通して圧
縮伸長装置の外部に出力される。
In step 2124, the Qe of the context S
The table address 204 is replaced with the “next Qe table address (MPS)” in the area 206. Process 2125
Then, the A and C registers are shifted to the left until the A register value becomes larger than X'8000 '. In this process, the bit sequence output from the C register becomes an arithmetic code. This coded data is written to the memory area MEM # (n-1) of the data RAM every time 16 bits are stored, and output from this area to the outside of the compression / decompression device through the system bus control unit 400.

【0056】図17は、図13の処理2006のLPS
符号化処理フローである。処理2126でAレジスタ値
とQe(ST)との減算を行なう。処理2127で、A
レジスタ値とQe(ST)の比較を行なう。処理212
8では、Cレジスタへの加算、Aレジスタ値のQe(S
T)による置き換え処理を行なう。処理2129では、
コンテクストSのQeテーブルアドレス204を領域2
06の”次のQeテーブルアドレス(LPS)”で置き
換える。処理2130は処理2125と同じである。
FIG. 17 shows the LPS of the processing 2006 in FIG.
It is an encoding processing flow. In step 2126, the A register value is subtracted from Qe (ST). In processing 2127, A
The register value is compared with Qe (ST). Process 212
8, the addition to the C register and the Qe (S
T). In process 2129,
The Qe table address 204 of the context S is set to the area 2
06 with the “next Qe table address (LPS)”. Step 2130 is the same as step 2125.

【0057】次に、1ラインの算術復号化処理を説明す
る。復号化処理は、図8に示す画素配置において既に復
号化済みの画素A〜Jを用いてコンテクストを生成し、
その各コンテクスト毎に、シンボル”?”を復号する。
復号化処理においても、図9のコンテクスト生成部、コ
ンテクストテーブル、確率推定部は符号化処理と共通で
ある。シンボル復元の手順は符号化と逆になるが、そこ
で必要となる演算は符号化と同じく加算、減算、ビット
シフトである。
Next, a one-line arithmetic decoding process will be described. The decoding process generates a context using already decoded pixels A to J in the pixel arrangement shown in FIG.
The symbol "?" Is decoded for each context.
Also in the decoding process, the context generation unit, the context table, and the probability estimation unit in FIG. 9 are common to the encoding process. The procedure of symbol restoration is the reverse of encoding, but the necessary operations are addition, subtraction, and bit shift as in the encoding.

【0058】図16は復号化時のレジスタR1〜R3の
使用方法を示す。R1とR2は符号化と同じである。R
3の下位ワードのビット15の位置にシンボル”?”を
復号する。コンテクストがSの時、復元シンボルがMP
Sと判定されると、?にはコンテクストテーブルのMP
S(S)が書き込まれる。逆にLPSと判定されると、
MPS(S)を反転したシンボルが書き込まれる。1シ
ンボルの復号が終了すると、レジスタR1〜R3を左に
1ビットシフトし、参照画素配置を更新し、そこで定義
されるコンテクストで次のシンボルを復号する。これを
16回繰り返すと、R3の上位ワードに復元画像データ
が生成される。
FIG. 16 shows how to use the registers R1 to R3 at the time of decoding. R1 and R2 are the same as the encoding. R
The symbol "?" Is decoded at the position of bit 15 of the lower word of No. 3. When the context is S, the restored symbol is MP
If S is determined, Has a context table MP
S (S) is written. Conversely, if it is determined to be LPS,
A symbol in which MPS (S) is inverted is written. When the decoding of one symbol is completed, the registers R1 to R3 are shifted left by one bit, the reference pixel arrangement is updated, and the next symbol is decoded in the context defined there. When this is repeated 16 times, restored image data is generated in the upper word of R3.

【0059】図19は1ラインの算術復号化処理のフロ
ーである。処理3001は、レジスタR1〜R3をクリ
アする。処理3002で、R1、R2のそれぞれの上
位、下位ワードに参照ラインの先頭の画像データIMG
(Y−2、0)、IMG(Y−2、1)とIMG(Y−
1、0)、IMG(Y−1、1)をロードする。これら
の画像データは、既に復号化済みのデータとして、デー
タRAM200(図11)に格納されている。以上の処
理は復号化の初期化処理である。また、復号化対象にな
る符号化データは、圧縮伸長装置の外部からシステムバ
ス制御部400(図1)を通して、データRAMのメモ
リ領域MEM#(n−1)に所定バイト数分が書き込ま
れている。
FIG. 19 is a flowchart of a one-line arithmetic decoding process. The process 3001 clears the registers R1 to R3. In a process 3002, the upper image data IMG of the reference line is added to the upper and lower words of R1 and R2, respectively.
(Y-2, 0), IMG (Y-2, 1) and IMG (Y-
1,0) and IMG (Y-1,1) are loaded. These image data are stored in the data RAM 200 (FIG. 11) as already decoded data. The above processing is the decryption initialization processing. Also, a predetermined number of bytes of encoded data to be decoded are written to the memory area MEM # (n-1) of the data RAM from outside the compression / decompression device through the system bus control unit 400 (FIG. 1). I have.

【0060】処理3003はコンテクスト生成処理であ
り、図14に説明された内容と同一である。処理300
4で、1シンボルの復号化を行なう。復号化シンボル”
0”または”1”は、R3のビット15の位置に書き込
まれる。1シンボルの復号化が終了すると、処理300
5〜3007によってR1、R2、R3を左に1ビット
シフトする。処理3008によって、16シンボルの復
号化が終了するまで、処理3003〜処理3008を繰
り返す。16シンボルの復号化が終了すると、R1、R
2の下位ワードが空くので、処理3009と処理301
0によって、そこに新しい参照画像データを入力する。
復号化された画像データがR3の上位ワードにできるの
で、それをデータRAMのメモリ領域MEM#2(図1
1の202)に書き込む。それを1ライン分の画像デー
タが復元されるまで繰り返す。処理3012は、そのた
めの判定である。
The process 3003 is a context generation process, which is the same as the content described in FIG. Process 300
In step 4, one symbol is decoded. Decoding symbol "
“0” or “1” is written in the position of bit 15 of R3.
R1, R2, and R3 are shifted one bit to the left by 5 to 3007. Until the decoding of 16 symbols is completed by the process 3008, the processes 3003 to 3008 are repeated. When the decoding of 16 symbols is completed, R1, R
Since the lower word of 2 is empty, processing 3009 and processing 301
With 0, new reference image data is input there.
Since the decoded image data can be used as the upper word of R3, it is stored in the memory area MEM # 2 of the data RAM (FIG. 1).
1 202). This is repeated until one line of image data is restored. The process 3012 is a determination for that.

【0061】図20は、1シンボルの復号化処理の概略
フローであり、図19の処理3004に対応する。処理
3020は、コンテクストテーブルを読み出すために、
アドレスポインタにコンテクストデータSをライトす
る。処理3021は、そのコンテクストに対応する確率
推定テーブルを読み出すために、Qeテーブルアドレス
204(図11)をアドレスポインタADP(n−2)
にライトする。
FIG. 20 is a schematic flow of the one symbol decoding process, and corresponds to the process 3004 in FIG. Process 3020 includes: reading a context table;
Write the context data S to the address pointer. The process 3021 stores the Qe table address 204 (FIG. 11) in the address pointer ADP (n-2) to read the probability estimation table corresponding to the context.
Write to

【0062】処理3022は、MPS(S)、Qe値、
A、Cレジスタを使って復号化演算を行なう。MPS、
LPS判定の詳細は省略するが、加算、減算、ビットシ
フトによって符号化の逆演算として実行できる。
The process 3022 is performed in the following manner: MPS (S), Qe value,
A decoding operation is performed using the A and C registers. MPS,
Although details of the LPS determination are omitted, the LPS determination can be executed as an inverse operation of the encoding by addition, subtraction, and bit shift.

【0063】その結果、復号すべきシンボルがMPSで
あるかLPSであるかの判定が行なわれる。MPSと判
断された場合は、処理3023に示すように、コンテク
ストテーブル204に書かれているMPS(S)の値を
復元シンボルとする。LPSと判定された場合は、処理
3024によって、MPS(S)の反転値(!MPS
(S))を復元シンボルとする。MPS(S)は”0”
または”1”であるから、これらの処理は、R3の下位
ワードにX’0000’またはX’FFFF’を書き込
むことによって実現できる。
As a result, it is determined whether the symbol to be decoded is MPS or LPS. When it is determined that the MPS is the MPS, the value of the MPS (S) written in the context table 204 is set as a restored symbol as shown in a process 3023. If it is determined to be LPS, the inverted value of MPS (S) (! MPS
Let (S)) be a restored symbol. MPS (S) is "0"
Or "1", these processes can be realized by writing X'0000 'or X'FFFF' in the lower word of R3.

【0064】MH、MR、MMR符号と算術符号間の符
号変換 算術符号化データを1ライン復元し(Yライン、図11
の202)、それをMH、MR、MMRの符号器150
0によって符号化することは、容易に実現できる。M
R、MMRの参照ラインとしては、その前ラインであ
る、(Y−1)ラインを使用する。文献1には、MH、
MR、MMR符号間の符号変換の実施例が詳細に示され
ている。それと同様にして、1ライン毎に、算術復号化
とMH、MR、MMR符号化を繰り返すことによって、
1ページ分の算術符号化データを他の符号に変換でき
る。
Code conversion between MH, MR, MMR code and arithmetic code One line of arithmetically encoded data is restored (Y line, FIG. 11).
202), it is converted to an MH, MR, MMR encoder 150
Encoding with 0 can be easily realized. M
As the reference line for R and MMR, the (Y-1) line which is the preceding line is used. Reference 1 states that MH,
An example of code conversion between MR and MMR codes is shown in detail. Similarly, by repeating arithmetic decoding and MH, MR, and MMR encoding line by line,
Arithmetic encoded data for one page can be converted to another code.

【0065】本実施例の算術符号化、算術復号化処理は
マイクロプログラム処理のため、専用のハードウェアに
よる実現方法に比べて処理速度は遅い。しかし、MH、
MR、MMR符号器1500やMH、MR、MMR復号
器1300が高速であれば、算術符号化、算術復号化の
処理は遅くても、上記の符号変換機能によって高速の入
出力装置に対するリアルタイム処理を実現することがで
きる。
The arithmetic encoding and arithmetic decoding processes of the present embodiment are microprogram processes, so that the processing speed is slower than that of a method of realization using dedicated hardware. However, MH,
If the MR / MMR encoder 1500 or the MH / MR / MMR decoder 1300 is fast, even if the arithmetic coding and arithmetic decoding processes are slow, the above-mentioned code conversion function enables real-time processing to a high-speed input / output device. Can be realized.

【0066】マルコフモデル算術符号器の第2の実施例 上述した第1の実施例では、マルコフモデル算術符号化
のための回路を、他の目的のための回路と共有化するの
で、回路規模の増大を抑えることができる。その反面、
すべてがプログラム処理のため処理速度が遅いという問
題がある。図21、図22に示すのは、マルコフモデル
構築のための専用回路のみを有し、処理効率の向上を図
った構成例である。
Second Embodiment of Markov Model Arithmetic Encoder In the above-described first embodiment, a circuit for Markov model arithmetic encoding is shared with a circuit for another purpose. The increase can be suppressed. On the other hand,
There is a problem that the processing speed is slow because everything is a program process. FIGS. 21 and 22 show configuration examples in which only a dedicated circuit for constructing a Markov model is provided to improve processing efficiency.

【0067】図21は圧縮伸長装置の第2の実施例を示
すブロック図である。状態分離処理部2000が、コン
テクストを生成するための専用回路である。その他のブ
ロックは、参考文献1の相当ブロックと同じである。算
術符号化のアルゴリズムは、ALU/シフタ部1200
とマイクロプログラム制御部1600によって実行す
る。
FIG. 21 is a block diagram showing a second embodiment of the compression / decompression device. The state separation processing unit 2000 is a dedicated circuit for generating a context. Other blocks are the same as the corresponding blocks in Reference 1. The algorithm of arithmetic coding is based on the ALU / shifter unit 1200.
Is executed by the microprogram control unit 1600.

【0068】図22は、状態分離処理部2000のブロ
ック図である。図12と対比して説明すると、シフトレ
ジスタ2001〜2003が図12のR1に相当し、こ
のうちシフトレジスタ2001はR1の下位ワードに相
当する。同様にシフトレジスタ2004〜2006がR
2に、シフトレジスタ2007〜2009がR3に相当
する。コンテクストレジスタ2010は、16ビットレ
ジスタで、その下位10ビットが参照画素A〜J、上位
6ビットは”0”に固定されている。参照画素A〜J
は、コンテクストレジスタ2010の対応するビット位
置に、それぞれ接続している。例えば、参照画素Aはシ
フトレジスタ2002の上位2ビット目(ビット位置3
0)から、コンテクストレジスタの最下位ビットに接続
されている。
FIG. 22 is a block diagram of the state separation processing unit 2000. Explaining in comparison with FIG. 12, the shift registers 2001 to 2003 correspond to R1 in FIG. 12, and the shift register 2001 corresponds to the lower word of R1. Similarly, the shift registers 2004 to 2006
2, the shift registers 2007 to 2009 correspond to R3. The context register 2010 is a 16-bit register. The lower 10 bits are fixed to reference pixels A to J, and the upper 6 bits are fixed to “0”. Reference pixels A to J
Are connected to corresponding bit positions of the context register 2010, respectively. For example, the reference pixel A is the second upper bit (bit position 3) of the shift register 2002.
0) to the least significant bit of the context register.

【0069】符号化時は、シフトレジスタ2007の最
上位ビットにある符号化シンボル2011とコンテクス
ト識別信号2012を参照して符号化処理を実行する。
コンテクストの更新は、全てのシフトレジスタを1ビッ
ト左にシフトすることで実行される。図14相当の処理
が1サイクルで実行できる。シフト信号など必要な制御
信号は、命令デコーダ2013から出力される。
At the time of encoding, the encoding process is executed with reference to the encoded symbol 2011 and the context identification signal 2012 in the most significant bit of the shift register 2007.
Updating the context is performed by shifting all shift registers one bit to the left. 14 can be executed in one cycle. A necessary control signal such as a shift signal is output from the instruction decoder 2013.

【0070】復号化時は、シフトレジスタ2007に復
号化シンボルを書き込む。この時、復号化シンボルが”
0”であればX’0000’を、復号化シンボルが”
1”であればX’FFFF’をシフトレジスタ2007
に書き込む。復元画像データは、シフトレジスタ200
8に得られる。それをデータRAM200の所定アドレ
スに書き込むことによって、1ラインの画像データが得
られる。図22の構成自体は特徴的なものではない。
At the time of decoding, a decoded symbol is written in the shift register 2007. At this time, the decoded symbol is "
0 ", X'0000 'and the decoded symbol is"
If the value is 1 ", X'FFFF 'is stored in the shift register 2007.
Write to. The restored image data is stored in the shift register 200.
8 is obtained. By writing it to a predetermined address of the data RAM 200, one line of image data is obtained. The configuration itself in FIG. 22 is not characteristic.

【0071】本発明は、以上説明した実施例に限定され
るものではない。本発明によればMH、MR、MMR符
号化を実行する圧縮伸長装置に、回路の増加を抑えて算
術符号化処理を実装することができる。
The present invention is not limited to the embodiment described above. According to the present invention, an arithmetic coding process can be implemented in a compression / decompression device that performs MH, MR, and MMR coding while suppressing an increase in circuits.

【0072】[0072]

【発明の効果】以上の説明から明らかなように、本発明
の画像処理装置は、MH、MR、MMR符号化または復
号化を実行するための専用処理回路と、該専用処理回路
の符号化または復号化を実行させるとともにマルコフモ
デル算術符号化処理を実行するマイクロプログラム制御
部とを備えたことにより、回路規模の増加をおさえて、
MH、MR、MMR符号器と算術符号器(マイクロプロ
グラム制御部)を統合することができる。さらに、算術
符号化処理を実行するにおいて、ソフト処理では多大の
時間を有するコンテクスト生成処理を専用のハード回路
で実行するようにしたために、さらなる速度の向上を得
ることができる。
As is apparent from the above description, the image processing apparatus according to the present invention includes a dedicated processing circuit for executing MH, MR, and MMR encoding or decoding, and an encoding or decoding of the dedicated processing circuit. By providing a microprogram control unit that executes decoding and performs a Markov model arithmetic encoding process, the circuit scale is reduced,
The MH, MR, MMR encoder and the arithmetic encoder (microprogram control unit) can be integrated. Further, in executing the arithmetic coding process, the context generation process, which requires a lot of time in software processing, is executed by a dedicated hardware circuit, so that a further improvement in speed can be obtained.

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

【図1】本発明の圧縮伸長装置の第1の実施例を示すブ
ロック図
FIG. 1 is a block diagram showing a first embodiment of a compression / decompression device of the present invention.

【図2】MH、MR、MMR符号器のブロック図FIG. 2 is a block diagram of an MH, MR, and MMR encoder;

【図3】MH、MR、MMR復号器のブロック図FIG. 3 is a block diagram of an MH, MR, and MMR decoder;

【図4】画像変換器のブロック図FIG. 4 is a block diagram of an image converter.

【図5】ALU周辺のブロック図FIG. 5 is a block diagram around an ALU.

【図6】レジスタの構成図FIG. 6 is a configuration diagram of a register.

【図7】内部バスDMA制御部とデータRAMとレジス
タバンクの関連を示すブロック図
FIG. 7 is a block diagram showing the relationship among an internal bus DMA control unit, a data RAM, and a register bank;

【図8】参照画素の配置図FIG. 8 is a layout diagram of reference pixels.

【図9】マルコフモデル算術符号器の概略図FIG. 9 is a schematic diagram of a Markov model arithmetic encoder.

【図10】算術符号化時のデータRAM内部のメモリ領
域構成図
FIG. 10 is a configuration diagram of a memory area in a data RAM at the time of arithmetic coding;

【図11】算術復号化時のデータRAM内部のメモリ領
域構成図
FIG. 11 is a configuration diagram of a memory area in a data RAM at the time of arithmetic decoding.

【図12】レジスタ内の画像データの配置図FIG. 12 is a layout diagram of image data in a register.

【図13】1ライン算術符号化処理フロー図FIG. 13 is a flowchart of a one-line arithmetic coding process;

【図14】コンテクスト生成処理フロー図FIG. 14 is a flowchart of context generation processing.

【図15】コンテクスト生成処理時のレジスタ内容を示
す図
FIG. 15 is a diagram showing register contents during context generation processing;

【図16】MPS符号化フロー図FIG. 16 is a flowchart of MPS encoding.

【図17】LPS符号化フロー図FIG. 17 is a flowchart of LPS encoding.

【図18】レジスタ内の画像データの配置図FIG. 18 is a layout diagram of image data in a register.

【図19】1ライン算術復号化処理フロー図FIG. 19 is a flowchart of a one-line arithmetic decoding process.

【図20】シンボル復号化フロー図FIG. 20 is a symbol decoding flowchart.

【図21】第2の実施例を示すブロック図FIG. 21 is a block diagram showing a second embodiment.

【図22】状態分離処理部のブロック図FIG. 22 is a block diagram of a state separation processing unit.

【図23】従来の画像処理装置を示すブロック図FIG. 23 is a block diagram showing a conventional image processing apparatus.

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

100 イメージバス制御部 200 RAM 300 DMA制御部 400 システムバス制御部 1300 MH/MR/MMR復号器 1400 画像変換部 1500 MH/MR/MMR符号器 1600 マイクロプログラム制御部 REFERENCE SIGNS LIST 100 Image bus control unit 200 RAM 300 DMA control unit 400 System bus control unit 1300 MH / MR / MMR decoder 1400 Image conversion unit 1500 MH / MR / MMR encoder 1600 Microprogram control unit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 MH、MR、MMR符号化または復号化
を実行するための専用処理回路と、マルコフモデル算術
符号化処理を実行するマイクロプログラム制御部とを備
え、前記マイクロプログラム制御部と前記専用処理回路
とによりマルコフモデル算術符号とMH、MR、MMR
符号との符号変換を行なう圧縮伸張装置であって、前記
マイクロプログラム制御部は画像データを所定数ライン
分格納する第1のメモリと、該第1のメモリのワード幅
の少なくとも2倍+所定数ビット以上の容量を有し、前
記第1のメモリより画像データをワード単位で入力する
第2のメモリと、該第2のメモリに内の画像データを左
右にビット単位にシフト処理することにより、符号化処
理のための状態分離信号を生成する手段と、前記状態分
離信号に応じて符号化時における確率推定データを出力
する手段と、前記確率推定データを用いて符号データを
出力する手段とを少なくとも有したことを特徴とする圧
縮伸張装置。
1. A dedicated processing circuit for performing MH, MR, MMR encoding or decoding, and a Markov model arithmetic
A microprogram control unit for executing an encoding process , wherein the microprogram control unit and the dedicated processing circuit
, MH, MR, MMR
A micro-program controller for storing a predetermined number of lines of image data, at least twice the word width of said first memory + a predetermined number A second memory having a capacity of more than bits and inputting image data from the first memory in word units, and shifting the image data in the second memory to the left and right in bit units, Means for generating a state separation signal for encoding processing, means for outputting probability estimation data at the time of encoding according to the state separation signal, and means for outputting code data using the probability estimation data. A compression / expansion device characterized by having at least.
JP27357994A 1994-11-08 1994-11-08 Compression / expansion device Expired - Fee Related JP3255808B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27357994A JP3255808B2 (en) 1994-11-08 1994-11-08 Compression / expansion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27357994A JP3255808B2 (en) 1994-11-08 1994-11-08 Compression / expansion device

Publications (2)

Publication Number Publication Date
JPH08139939A JPH08139939A (en) 1996-05-31
JP3255808B2 true JP3255808B2 (en) 2002-02-12

Family

ID=17529771

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27357994A Expired - Fee Related JP3255808B2 (en) 1994-11-08 1994-11-08 Compression / expansion device

Country Status (1)

Country Link
JP (1) JP3255808B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006044045A (en) * 2004-08-04 2006-02-16 Seiko Epson Corp Image forming apparatus and method, and image forming system

Also Published As

Publication number Publication date
JPH08139939A (en) 1996-05-31

Similar Documents

Publication Publication Date Title
US6212234B1 (en) Color image encoding apparatus and color image decoding apparatus
US4843632A (en) Compressed image expansion system
US4760461A (en) Binary data compression and expansion processing apparatus
US20060233444A1 (en) JBIG coding apparatus and method with low cost, high-performance ping-pong buffer arrangement
JPH11122498A (en) Picture processor
JP3255808B2 (en) Compression / expansion device
CA1293818C (en) Data processor
US20020024525A1 (en) Image encoding apparatus and method
JP3461640B2 (en) Arithmetic encoding / decoding device
JP3342380B2 (en) Encoding and decoding apparatus and image processing apparatus to which the same is applied
JPH06217110A (en) Image converting method
JP3223118B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
JP3232533B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
US20020090137A1 (en) Encoding and decoding apparatuses and image processing apparatus using the same
JP2000217005A (en) Data coding method/decoding method, data coder/decoder, and image data recording system using the data coding method/decoding method
JP2614927B2 (en) Image decoding processing method
JP3286898B2 (en) Encoding device, decoding device, image encoding device, and image decoding device
JP3673630B2 (en) Encoding method
JPH05244438A (en) Compression expansion circuit
JP2551397B2 (en) Image signal coding system
JPH09121286A (en) Method and device for compressing picture data
JP3680525B2 (en) Drawing processor
JPH10224639A (en) Image processor and its image coding/decoding method
JPH0575874A (en) Binary data encoding method and decoding method
JPH07129398A (en) Microprocessor

Legal Events

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