JPH0936749A - Encoding / decoding apparatus and encoding method used therefor - Google Patents

Encoding / decoding apparatus and encoding method used therefor

Info

Publication number
JPH0936749A
JPH0936749A JP18509295A JP18509295A JPH0936749A JP H0936749 A JPH0936749 A JP H0936749A JP 18509295 A JP18509295 A JP 18509295A JP 18509295 A JP18509295 A JP 18509295A JP H0936749 A JPH0936749 A JP H0936749A
Authority
JP
Japan
Prior art keywords
symbol
code
recessive
dominant
encoding
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
JP18509295A
Other languages
Japanese (ja)
Inventor
Tatsuki Inuzuka
達基 犬塚
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP18509295A priority Critical patent/JPH0936749A/en
Publication of JPH0936749A publication Critical patent/JPH0936749A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【目的】符号化復号化装置において、非ブロック符号の
持つ圧縮効率の良さを損なわず、しかも、簡単なアルゴ
リズムにより、符号化復号化をおこなえる方法を用い、
複雑な装置も必要とせず、しかも、演算速度の速い符号
化復号化をおこえるようにする。 【構成】符号化をおこなうに際して、入力信号のシンボ
ルの生起確率を予測して、シンボルを優勢シンボル、劣
性シンボルに区分し、劣性シンボルの生起予測確率を、
2のR乗分の1(1/2**R、Rは、正の整数)で表わして、劣
性シンボルが入力されたときには、符号レジスタを上位
にRビットシフトする。優勢シンボルが入力されたとき
には、連続生起回数だけ、前記符号レジスタの下位のR
個の0をインクレメントして、一つの劣性シンボルと0
個以上の優勢シンボルとを一組として、符号レジスタ上
で符号化していく。
(57) [Abstract] [Purpose] In a coding / decoding apparatus, a method capable of performing coding / decoding by a simple algorithm without impairing the good compression efficiency of a non-block code,
A complicated device is not required, and encoding / decoding with a high operation speed can be performed. [Configuration] When encoding, the occurrence probability of a symbol of an input signal is predicted, the symbol is divided into a dominant symbol and a recessive symbol, and the occurrence prediction probability of the recessive symbol is
Expressed by 1 / (2 ** R, R is a positive integer) to the R-th power of 2, when a recessive symbol is input, the code register is shifted by R bits to the upper position. When the dominant symbol is input, the lower R of the code register is
Increments each 0 to give one recessive symbol and 0
Encoding is performed on the code register with one or more dominant symbols as a set.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、符号化復号化装置およ
びこれに用いられ符号化方法に係り、画像情報、音声情
報等の膨大なデータを高能率にデータ圧縮をおこなうこ
とのできる装置であって、その圧縮のアルゴリズムを簡
易かつ高速におこなうことのできる符号化復号化装置お
よびこれに用いられ符号化方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding / decoding device and a coding method used for the same, and is a device capable of efficiently compressing enormous data such as image information and audio information. Therefore, the present invention relates to an encoding / decoding device capable of performing the compression algorithm easily and at high speed, and an encoding method used for the same.

【0002】[0002]

【従来の技術】従来、MH(モデファイドハフマン、Mo
dified Huffman)あるいはMR(モデイファイドリー
ド、Modified Read)と呼ばれる符号化方式が、ファク
シミリ等の画像符号化方式として広く利用されている。
これらの方式は、符号化対象のシンボルに対応した符号
語(ハフマン符号、Huffman Code)をあらかじめ定めて
おき、実際に生起したシンボルを該当する符号語に置き
換えていく。これは「ブロック符号(Block Code)」に
分類される方式の一つである。例えば、ITU-T勧告T.4に
はMH方式の詳細が定められており、この方式に基づく装
置がファクシミリのみならず数多く開発されている。
2. Description of the Related Art Conventionally, MH (Modified Huffman, Mo
An encoding method called dified Huffman) or MR (Modified Read) is widely used as an image encoding method for facsimiles and the like.
In these methods, a code word (Huffman Code) corresponding to a symbol to be encoded is determined in advance, and the actually generated symbol is replaced with the corresponding code word. This is one of the methods classified into “Block Code”. For example, ITU-T Recommendation T.4 defines the details of the MH system, and many devices based on this system have been developed in addition to facsimiles.

【0003】一方、「非ブロック符号」に分類される方
式があり、シンボルの生起確率を逐次に予測しながら符
号語を生成していく。この方式については、下記の文
献、解説等がある。
On the other hand, there is a method classified into "non-block code", and code words are generated while sequentially predicting the occurrence probability of symbols. Regarding this method, there are the following documents and explanations.

【0004】 McGRAW-HILL社発行(1963)、N.Abramso
n著、「INFORMATION THEORY AND CODING」の第61ペー
ジから62ページに、一般にエリアスの符号(Elias Co
de)と呼ばれている方法が記載されている。
Published by McGRAW-HILL (1963), N. Abramso
n, "INFORMATION THEORY AND CODING", pages 61 to 62, the Elias code (Elias Co
The method called de) is described.

【0005】 画像電子学会誌、第20巻、第2号
(1991)の第113ページから120ページに「カラー
静止画符号化標準化方式(JPEG)の概説(その2:算術符
号)」と題する技術解説が記載されている。
A technique entitled "Outline of Color Still Image Coding Standardization Method (JPEG) (Part 2: Arithmetic Code)" on pages 113 to 120 of Journal of Image Electronics Engineers of Japan, Volume 20, Issue 2 (1991). The explanation is described.

【0006】いずれも、基本的には、符号化対象とする
シンボルの生起確率の比に対応して[0,1)区間(0を含
み1を含まない)の分割を繰り返していき、最終的に分
割された[0,1)区間上のポイントを示す数値を符号語と
して利用するものである。
In both cases, basically, the division of the [0,1) section (including 0 and not 1) is repeated corresponding to the ratio of the occurrence probabilities of the symbols to be encoded, and the final The numerical value indicating the point on the [0,1) section divided into is used as a code word.

【0007】[0007]

【発明が解決しようとする課題】上述の様に広く利用さ
れているブロック符号は、装置構成が容易であるという
特徴も持つが、符号化効率の点で、非ブロック符号に劣
るとされている。
The block code widely used as described above has a feature that the device configuration is easy, but it is said that the block code is inferior to the non-block code in terms of coding efficiency. .

【0008】一方、非ブロック符号の方は、ブロック符
号と比較すると符号化効率の点で優れるが、次に示す問
題点がある。
On the other hand, the non-block code is superior in coding efficiency to the block code, but has the following problems.

【0009】(1)高い演算精度が要求されること 複数のシンボルの発生確率を掛け合わせていくことか
ら、小数点以下の高い演算精度が要求される場合があ
る。したがって、レジスタやメモリに要するビット数が
大きくなったり、演算時間が長くなる。
(1) High calculation accuracy is required Since the occurrence probabilities of a plurality of symbols are multiplied, high calculation accuracy below the decimal point may be required in some cases. Therefore, the number of bits required for the register and the memory becomes large, and the operation time becomes long.

【0010】(2)条件判断が多く複雑な信号処理手順
であること 上記演算精度の問題を解決すべく開発された方式が、従
来技術の例として参照したの方式である。これらは、
生成した符号語自体に必要な演算を、新たな換算値を設
定することで単純な加算に留めている。
(2) Complicated signal processing procedure in which many condition judgments are made The method developed to solve the above-mentioned problem of calculation accuracy is the method referred to as an example of the prior art. They are,
The calculation required for the generated codeword itself is limited to simple addition by setting a new conversion value.

【0011】しかし、演算そのものは単純化されたが条
件判断が多く、また換算値を導入するために変数が増え
ていることから、信号処理手順は一層複雑になってい
る。
However, although the calculation itself is simplified, many condition judgments are made and the number of variables is increased to introduce the converted value, so that the signal processing procedure becomes more complicated.

【0012】(3)復号生成速度が不均一であること レイテンシ(復号出力の潜伏)と呼ばれる、復号生成速
度の不均一性が問題点として指摘されている。
(3) Non-uniform Decoding / Generation Rate It is pointed out that the non-uniformity of the decoding / generation rate, which is called latency (latency of decoded output).

【0013】本発明は、上記問題点を解決するためにな
されたもので、その目的は、データを圧縮して符号と
し、また、それを復号するための符号化復号化装置にお
いて、非ブロック符号の持つ圧縮効率の良さを損なわ
ず、しかも、簡単なアルゴリズムにより、符号化復号化
をおこなえる方法であって、複雑な装置も必要とせず、
演算速度の速い符号化復号化をおこなう符号化復号化装
置を提供することにある。
The present invention has been made to solve the above-mentioned problems, and an object thereof is to compress a data into a code, and in a coding / decoding device for decoding the same, a non-block code. It is a method that can perform encoding and decoding with a simple algorithm without compromising the good compression efficiency of, and does not require a complicated device.
An object of the present invention is to provide an encoding / decoding device that performs encoding / decoding with high calculation speed.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に、本発明の符号化復号化装置に係る発明の第一の構成
は、入力信号の符号化とその逆の過程である復号化をお
こなう符号化復号化装置において、シンボルの生起確率
を予測する手段と、入力信号のシンボルを判別する手段
と、符号レジスタと、シフト制御手段とを有し、符号化
をおこなうに際して、前記生起確率を予測する手段によ
って、入力信号のシンボルの生起確率を予測して、前記
入力信号のシンボルを判別する手段によって、前記生起
確率を予測する手段により求まったシンボルの予測生起
確率の内で、大きい方の予測生起確率を持つシンボルを
優勢シンボル、小さい方の予測生起確率を持つシンボル
を劣性シンボルと判別して、劣性シンボルの生起予測確
率を、2のR乗分の1(1/2**R、Rは、正の整数)で表わし
て、前記劣性シンボルが入力されたときには、その一つ
の劣性シンボルに対し、前記シフト制御手段により、前
記符号レジスタを上位にRビットシフトして、しかも、
下位にR個の0を挿入するようにしたものである。
In order to achieve the above object, the first configuration of the invention relating to the coding / decoding apparatus of the present invention is to perform coding of an input signal and decoding which is the reverse process. In the encoding / decoding device for performing, it has a means for predicting the probability of occurrence of symbols, a means for determining the symbols of the input signal, a code register, and a shift control means, and when performing the encoding, the occurrence probability is By predicting the occurrence probability of the symbol of the input signal by the predicting means, by the means for discriminating the symbol of the input signal, of the predicted occurrence probability of the symbol obtained by the means for predicting the occurrence probability, the larger one of The symbol with the predicted occurrence probability is determined as the dominant symbol, and the symbol with the smaller predicted occurrence probability is determined as the recessive symbol, and the occurrence probability of the recessive symbol is divided by 2 R 1/2 ** R, R is a positive integer), and when the recessive symbol is input, the shift control means shifts the R bit to the upper bit of the one recessive symbol. And moreover,
It is configured such that R zeros are inserted in the lower order.

【0015】また、上記目的を達成するために、本発明
の符号化復号化装置に係る発明の第二の構成は、入力信
号の符号化とその逆の過程である復号化をおこなう符号
化復号化装置において、シンボルの生起確率を予測する
手段と、入力信号のシンボルを判別する手段と、符号レ
ジスタと、カウンタとを有し、符号化をおこなうに際し
て、前記生起確率を予測する手段によって、入力信号の
シンボルの生起確率を予測して、前記入力信号のシンボ
ルを判別する手段によって、前記生起確率を予測する手
段により求まったシンボルの予測生起確率の内で、大き
い方の予測生起確率を持つシンボルを優勢シンボル、小
さい方の予測生起確率を持つシンボルを劣性シンボルと
判別して、劣性シンボルの生起予測確率を、2のR乗分の
1(1/2**R、Rは、正の整数)で表わして、前記優勢シン
ボルが入力されたときには、前記カウンタにより、その
優勢シンボルの連続生起回数をカウントし、そのカウン
トされた数だけ、前記符号レジスタをインクレメントす
るようにしたものである。
In order to achieve the above object, the second structure of the invention relating to the coding / decoding apparatus of the present invention is a coding / decoding for performing coding which is a process of coding an input signal and vice versa. The encoding device has means for predicting the occurrence probability of symbols, means for discriminating the symbols of the input signal, a code register, and a counter, and when encoding, the means for predicting the occurrence probability inputs The symbol having the larger predicted occurrence probability among the predicted occurrence probabilities of the symbols obtained by the means for predicting the occurrence probability by the means for predicting the occurrence probability of the signal symbol and determining the symbol of the input signal Is the dominant symbol and the symbol with the smaller predicted occurrence probability is the recessive symbol, and the occurrence prediction probability of the recessive symbol is divided by 2 R
Expressed by 1 (1/2 ** R, R is a positive integer), when the dominant symbol is input, the counter counts the number of consecutive occurrences of the dominant symbol, and only the counted number The code register is incremented.

【0016】上記第一の構成と第二の構成から導かれる
本発明の符号化復号化装置に係る別の構成は、上記第一
の構成と第二の構成の符号化復号化装置の機能を持つ符
号化復号化装置において、符号化をおこなうに際して、
前記劣性シンボルが入力されたときに、上記記載のよう
にして、符号レジスタ上に生成したR個の0から成る第
一の符号語と、前記優勢シンボルが入力されたときに、
上記記載のようにして、符号レジスタをインクレメント
して生成された第二の符号語とを生成し、前記第一の符
号語と前記第二の符号語とを合成して、符号を生成する
ようにしたものである。
Another structure relating to the encoding / decoding device of the present invention, which is derived from the first structure and the second structure, has the functions of the encoding / decoding device of the first structure and the second structure. In the encoding / decoding device that has, when performing encoding,
When the recessive symbol is input, the first code word composed of R 0s generated on the code register as described above and when the dominant symbol is input,
As described above, the second codeword generated by incrementing the code register is generated, and the first codeword and the second codeword are combined to generate a code. It was done like this.

【0017】また、本発明の符号化復号化装置に係る発
明の別の構成は、入力信号の符号化とその逆の過程であ
る復号化をおこなう符号化復号化装置において、シンボ
ルの生起確率を予測する手段と、入力信号のシンボルを
判別する手段と、符号レジスタと、シフト制御手段と、
カウンタとを有し、符号化をおこなうに際して、前記生
起確率を予測する手段によって、入力信号のシンボルの
生起確率を予測して、前記入力信号のシンボルを判別す
る手段によって、前記生起確率を予測する手段により求
まったシンボルの予測生起確率の内で、大きい方の予測
生起確率を持つシンボルを優勢シンボル、小さい方の予
測生起確率を持つシンボルを劣性シンボルと判別して、
劣性シンボルの生起予測確率を、2のR乗分の1(1/2**
R、Rは、正の整数)で表わして、前記劣性シンボルが入
力されたときには、その一つの劣性シンボルに対し、前
記シフト制御手段により、前記符号レジスタを上位にR
ビットシフトして、しかも、下位にR個の0を挿入し
て、前記優勢シンボルが入力されたときには、前記カウ
ンタにより、その優勢シンボルの連続生起回数をカウン
トし、そのカウントされた数だけ、前記符号レジスタの
下位のR個の0をインクレメントして、このように入力
信号を、一つの劣性シンボルと0個以上の優勢シンボル
とを一組として、前記符号レジスタ上で符号化していく
ようにしたものである。
Another structure of the invention relating to the coding / decoding apparatus of the present invention is that the probability of occurrence of a symbol is determined in a coding / decoding apparatus that performs coding which is the reverse process of coding an input signal. Predicting means, means for discriminating the symbols of the input signal, code register, shift control means,
A counter and predicting the occurrence probability of the symbol of the input signal by means of predicting the occurrence probability when performing encoding, and predicting the occurrence probability by means of determining the symbol of the input signal Among the predicted occurrence probabilities of the symbols obtained by the means, the symbol having the larger predicted occurrence probability is determined as the dominant symbol, and the symbol having the smaller predicted occurrence probability is determined as the recessive symbol,
The probability of occurrence of a recessive symbol is calculated by dividing the R power of 2 by 1 (1/2 **
R and R are represented by positive integers, and when the recessive symbol is input, the shift control means causes the shift register to move the code register to the upper R for one recessive symbol.
When the number of consecutive occurrences of the dominant symbol is counted by the counter when the dominant symbol is input by bit-shifting and by inserting R zeros in the lower order, the counter is counted by the counted number. Incrementing the lower R 0s of the code register and thus encoding the input signal as a set of one recessive symbol and zero or more dominant symbols on the code register. It was done.

【0018】また詳しくは、上記符号化復号化装置にお
いて、前記入力される優勢シンボルの連続生起回数をN
とし、かつ、劣性シンボルの生起予測確率が、2のR乗分
の1(1/2**R、Rは、正の整数)で表わされているとき
に、(2**R-1)>Nであれば、劣性シンボルの符号語として
生成される前記符号レジスタ上のR個の0をNだけ、イン
クレメントし、(2**R-1)≦Nであれば、劣性シンボルの
符号語として生成される前記符号レジスタ上のR個の0
を全て1にして、a=N-(2**R-1)を意味する符号語を生
成して、これらを結合し、前記劣性シンボルの符号語と
前記優勢シンボルの符号語を合成した符号語とするよう
にしたものである。
More specifically, in the above coding / decoding apparatus, the number of consecutive occurrences of the input dominant symbol is N
, And the probability of occurrence of recessive symbols is represented by 1 of 2 R (1/2 ** R, R is a positive integer), (2 ** R-1 )> N, the R 0s on the code register generated as the codeword of the recessive symbol are incremented by N, and if (2 ** R-1) ≦ N, the recessive symbol R 0s on the code register generated as code words
With all 1s to generate a code word meaning a = N- (2 ** R-1), combine these, and combine the code word of the recessive symbol and the code word of the dominant symbol. It is meant to be a word.

【0019】より詳しくは、上記符号化復号化装置にお
いて、前記a=N-(2**R-1)を意味する符号語が、前記R個
づつからなる連続したブロックで構成され、最後のブロ
ック以外は、全てのビットが1からなるようにしたもの
である。
More specifically, in the above coding / decoding apparatus, the code word that means a = N- (2 ** R-1) is composed of a continuous block consisting of each R, and the last Except for blocks, all bits are made up of 1.

【0020】また、装置構成について詳しくは、上記符
号化復号化装置において、プロセッサと、メモリとを有
し、前記符号レジスタが、プロセッサ内にあるレジスタ
であって、前記優勢シンボルまたは劣性シンボルを、こ
のレジスタ上で符号化していく手順を、前記メモリに蓄
えられたプログラムに従って、前記プロセッサが実行し
ていくようにしたものである。
Further, regarding the device configuration in detail, in the above-mentioned coding / decoding device, the code register has a processor and a memory, and the code register is a register in the processor. The procedure of encoding on this register is executed by the processor according to the program stored in the memory.

【0021】また、本発明の符号化復号化装置に係る別
の構成は、上記符号化復号化装置において、上記記載の
ようにして、一つの劣性シンボルと0個以上の優勢シン
ボルとを一組として、符号レジスタ上の下位に生成され
る符号語を、予め作成しておき、前記一つの劣性シンボ
ルと、0個以上の優勢シンボルと、それと対応する前記
符号語とを一つの項目としたテーブルを備え、このテー
ブルによって、入力される信号を一つの劣性シンボルと
0個以上の優勢シンボルとを一組として、対応する符号
語を検索し、符号化していくようにしたものである。
Another configuration according to the encoding / decoding apparatus of the present invention is, in the encoding / decoding apparatus, a set of one recessive symbol and zero or more dominant symbols as described above. As a table, a code word generated in the lower order on the code register is created in advance, and one recessive symbol, zero or more dominant symbols, and the code word corresponding to the one recessive symbol are set as one item. With this table, one input recessive symbol and zero or more dominant symbols are set as a set, and corresponding code words are searched and encoded.

【0022】さらに、本発明の符号化復号化装置を応用
した他の構成は、上記符号化復号化装置において、入力
信号が複数の状態を取りうるシンボルから構成される場
合であって、前記予測生起確率手段によって予測される
予測生起確率に基づき、それらのシンボルの取りうる状
態を優勢グループおよび劣勢グループの二つのグループ
に分け、前記劣性グループの状態が入力されたときは、
上記記載の劣性シンボルが入力されたときのように処理
をし、前記優勢グループの状態が入力されたときは、上
記記載の優勢シンボルが入力されたときのように処理を
し、上記記載のように前記第一の符号語と前記第二の符
号語とを合成して、一組の符号語として、また、そのシ
ンボルが、属する前記グループ内のシンボルの状態を特
定する符号語をブロック符号を用いて作成し、前記第一
の符号語と前記第二の符号語とが合成された一組の符号
語と、そのシンボルが、属する前記グループ内のシンボ
ルの状態を特定する符号語との結合が、この入力信号の
とりうる状態の符号語とするようにしたものである。
Further, another configuration to which the coding / decoding apparatus of the present invention is applied is a case where the input signal is composed of symbols which can take a plurality of states in the above coding / decoding apparatus. Based on the predicted occurrence probability predicted by the occurrence probability means, divide the possible states of those symbols into two groups, the dominant group and the inferior group, when the state of the recessive group is input,
When the recessive symbol described above is input, and when the state of the dominant group is input, the process is performed as when the dominant symbol described above is input, and as described above. The first code word and the second code word are combined into a set of code words, and a code word that identifies the state of the symbol in the group to which the symbol belongs is a block code. A combination of a set of code words created by using the first code word and the second code word, and a code word specifying the state of the symbol in the group to which the symbol belongs. Is a code word in a state that this input signal can take.

【0023】また、装置構成について他の構成は、上記
符号化復号化装置において、入力信号が複数の信号特性
を有する場合であって、この各々の信号特性に対応した
複数の生起確率予測手段を備えるようにしたものであ
る。
Another configuration of the apparatus is a case where the input signal has a plurality of signal characteristics in the encoding / decoding apparatus, and a plurality of occurrence probability predicting means corresponding to the respective signal characteristics are provided. It was prepared.

【0024】次に、上記目的を達成するために本発明の
符号化方法に係る発明の構成は、入力信号の符号化とそ
の逆の過程である復号化をおこなう符号化方法におい
て、符号化装置が、シンボルの生起確率を予測する手段
と、入力信号のシンボルを判別する手段と、符号レジス
タと、シフト制御手段と、カウンタとを有し、前記生起
確率を予測する手段により求まったシンボルの予測生起
確率の内で、大きい方の予測生起確率を持つシンボルを
優勢シンボル、小さい方の予測生起確率を持つシンボル
を劣性シンボルとして、前記シンボルの生起確率を予測
する手段によって求まるシンボルの予測生起確率の内
で、大きい方のシンボルを優勢シンボル、小さい方のシ
ンボルを劣性シンボルとしたときに、劣性シンボルの生
起予測確率を、2のR乗分の1(1/2**R、Rは、正の整数)
で表わして、(1)前記生起確率を予測する手段によっ
て、入力信号のシンボルの生起確率を予測する手順、
(2)前記入力信号のシンボルを判別する手段によっ
て、前記入力信号を優勢シンボルと劣性シンボルとに判
別する手順、(3)前記劣性シンボルを入力する手順、
(4)その一つの劣性シンボルに対し、前記シフト制御
手段により、前記符号レジスタを上位にRビットシフト
して、しかも、下位にR個の0を挿入した第一の符号語
を生成する手順、(5)前記優勢シンボルを入力する手
順、(6)前記カウンタにより、その優勢シンボルの連
続生起回数をカウントし、そのカウントされた数だけ、
前記符号レジスタをインクレメントして第二の符号語を
生成する手順、(7)前記第一の符号語と前記第二の符
号語を合成する手順を有し、前記(1)ないし前記
(7)の手順をこの順に繰返しおこなって、入力信号
を、一つの劣性シンボルと0個以上の優勢シンボルとを
一組として、符号語を生成していくようにしたものであ
る。
Next, in order to achieve the above-mentioned object, the structure of the invention relating to the encoding method of the present invention is the encoding method for performing the encoding of the input signal and the decoding which is the reverse process. Has a means for predicting the probability of occurrence of a symbol, a means for determining the symbol of an input signal, a code register, a shift control means, and a counter, and the prediction of the symbol obtained by the means for predicting the probability of occurrence. Among the occurrence probabilities, the symbol having the larger predicted occurrence probability is the dominant symbol, the symbol having the smaller predicted occurrence probability is the recessive symbol, and the predicted occurrence probability of the symbol obtained by the means for predicting the occurrence probability of the symbol. Where the larger symbol is the dominant symbol and the smaller symbol is the recessive symbol, the probability of occurrence of the recessive symbol is the R power of 2 Of 1 (1/2 ** R, R is a positive integer)
And (1) a procedure of predicting the occurrence probability of a symbol of an input signal by the means for predicting the occurrence probability,
(2) a step of discriminating the input signal into a dominant symbol and a recessive symbol by means for discriminating the symbol of the input signal, (3) a step of inputting the recessive symbol,
(4) For the one recessive symbol, the shift control means shifts the code register to the upper bit by R bits, and further, generates a first code word in which R number of 0's are inserted. (5) The procedure of inputting the dominant symbol, (6) The number of consecutive occurrences of the dominant symbol is counted by the counter, and only the counted number,
A step of incrementing the code register to generate a second code word; and (7) a step of synthesizing the first code word and the second code word, wherein (1) to (7) ) Is repeated in this order, and the input signal is generated as a set of one recessive symbol and zero or more dominant symbols as a set of code words.

【0025】また、上記目的を達成するために本発明の
符号化方法に係る発明の別の構成は、入力信号の符号化
とその逆の過程である復号化をおこなう符号化方法にお
いて、符号化装置が、シンボルの生起確率を予測する手
段と、入力信号のシンボルを判別する手段と、符号レジ
スタと、シフト制御手段と、カウンタとを有し、前記生
起確率を予測する手段により求まったシンボルの予測生
起確率の内で、大きい方の予測生起確率を持つシンボル
を優勢シンボル、小さい方の予測生起確率を持つシンボ
ルを劣性シンボルとして、前記シンボルの生起確率を予
測する手段によって求まるシンボルの予測生起確率の内
で、大きい方のシンボルを優勢シンボル、小さい方のシ
ンボルを劣性シンボルとしたときに、劣性シンボルの生
起予測確率を、2のR乗分の1(1/2**R、Rは、正の整数)
で表わして、(1)前記生起確率を予測する手段によっ
て、入力信号のシンボルの生起確率を予測する手順、
(2)前記入力信号のシンボルを判別する手段によっ
て、前記入力信号を優勢シンボルと劣性シンボルとに判
別する手順、(3)前記劣性シンボルを入力する手順、
(4)´その一つの劣性シンボルに対し、前記シフト制
御手段により、前記符号レジスタを上位にRビットシフ
トして、しかも、下位にR個の0を挿入する手順、
(5)前記優勢シンボルを入力する手順、(6)´前記
カウンタにより、その優勢シンボルの連続生起回数をカ
ウントし、そのカウントされた数だけ、前記符号レジス
タの下位のR個をインクレメントする手順を有し、前記
(1)ないし(3)、(4)´、(5)、(6)´の手
順をこの順に繰返しおこなって、入力信号を、一つの劣
性シンボルと0個以上の優勢シンボルとを一組として、
前記符号レジスタ上で符号化していくようにしたもので
ある。
In order to achieve the above object, another structure of the invention relating to the coding method of the present invention is a coding method for carrying out coding of an input signal and decoding which is the reverse process. The device has means for predicting the probability of occurrence of symbols, means for discriminating the symbols of the input signal, a code register, shift control means, and a counter, and the means for predicting the probability of occurrence of the symbols Of the predicted occurrence probabilities, the symbol having the larger predicted occurrence probability is the dominant symbol and the symbol having the smaller predicted occurrence probability is the recessive symbol, and the predicted occurrence probability of the symbol obtained by the means for predicting the occurrence probability of the symbol When the larger symbol is the dominant symbol and the smaller symbol is the recessive symbol, the occurrence probability of the recessive symbol is set to 2. 1 to the Rth power (1/2 ** R, R is a positive integer)
And (1) a procedure of predicting the occurrence probability of a symbol of an input signal by the means for predicting the occurrence probability,
(2) a step of discriminating the input signal into a dominant symbol and a recessive symbol by means for discriminating the symbol of the input signal, (3) a step of inputting the recessive symbol,
(4) ′ With respect to the one recessive symbol, the shift control means shifts the code register to the upper bit by R bits, and further inserts R zeros in the lower bit,
(5) A step of inputting the dominant symbol, (6) ′ A step of counting the number of consecutive occurrences of the dominant symbol by the counter, and incrementing the lower R pieces of the code register by the counted number. And repeating the steps (1) to (3), (4) ′, (5), and (6) ′ in this order, and inputting the input signal to one recessive symbol and zero or more dominant symbols. And as a set,
The encoding is performed on the code register.

【0026】また詳しくは、上記符号化方法において、
前記符号化していくときの優勢シンボルの連続生起回数
をNとし、かつ、劣性シンボルの生起予測確率が、2のR
乗分の1(1/2**R、Rは、正の整数)で表わされていると
きに、(2**R-1)>Nであれば、劣性シンボルの符号語とし
て生成される前記符号レジスタのR個の0をNだけ、イン
クレメントし、(2**R-1)≦Nであれば、劣性シンボルの
符号語として生成される前記符号レジスタの下位のR個
の0を全て1にして、a=N-(2**R-1)を意味する符号語
を生成して、これらを結合する手順を(O)としたとき
に、上記記載の(6)、(7)の手順をこの手順(O)
で置き換えるか、または、上記記載の(6)´をこの手
順(O)で置き換えるようにしたものである。
More specifically, in the above encoding method,
The number of consecutive occurrences of the dominant symbol at the time of encoding is N, and the occurrence probability of recessive symbols is R of 2.
When expressed as a power of 1 (1/2 ** R, R is a positive integer), if (2 ** R-1)> N, it is generated as a codeword of a recessive symbol. Incrementing R 0s of the code register by N, and if (2 ** R-1) ≦ N, the lower R 0s of the code register generated as the code word of the recessive symbol are incremented. When all are 1, and a code word that means a = N- (2 ** R-1) is generated and the procedure for combining these is (O), (6), ( Follow the procedure in 7) to this procedure (O).
, Or (6) ′ described above is replaced by this procedure (O).

【0027】より詳しくは、前記a=N-(2**R-1)を意味
する符号語が、前記R個づつからなる連続したブロック
で構成され、最後のブロック以外は、全てのビットが1
からなるようにしたものである。
More specifically, the code word meaning a = N- (2 ** R-1) is composed of a continuous block consisting of R units, and all bits except for the last block. 1
It is made up of.

【0028】また、上記目的を達成するために本発明の
符号化方法に係る発明の他の構成は、上記符号化方法に
おいて、上記記載のようにして生成される劣性シンボル
の符号語と優勢シンボルの符号語を合成した符号語を、
予め作成しておき、前記一つの劣性シンボルと、0個以
上の優勢シンボルと、それと対応する合成した符号語と
を一つの項目としたテーブルを備え、このテーブルによ
って、入力される信号を一つの劣性シンボルと0個以上
の優勢シンボルとを一組として、対応する符号語を検索
する手順を(T)としたときに、上記記載の(1)ない
し(3)、(5)の手順において、(1)ないし
(3)、(5)、(T)の手順をこの順に繰り返して、
符号化していくようにしたものである。
In order to achieve the above object, another aspect of the invention relating to the encoding method of the present invention is that the code word of the recessive symbol and the dominant symbol generated as described above in the encoding method. A codeword that is a combination of the codewords of
It is prepared in advance and is provided with a table in which one recessive symbol, zero or more dominant symbols, and corresponding codewords combined therewith are set as one item. When the procedure for searching the corresponding codeword is set as (T) with a set of recessive symbols and 0 or more dominant symbols, in the above-mentioned procedures (1) to (3) and (5), Repeat steps (1) to (3), (5), and (T) in this order,
It is designed to be encoded.

【0029】また、本発明の符号化方法を応用した他の
構成は、上記符号化方法において、入力信号が複数の状
態を取りうるシンボルから構成される場合であって、前
記予測生起確率手段によって予測される予測生起確率に
基づき、それらのシンボルの取りうる状態を優勢グルー
プおよび劣勢グループの二つのグループに分け、そのシ
ンボルが、属する前記グループ内のシンボルの状態を特
定する符号語をブロック符号を用いて作成する手順を
(B)、一つの劣性グループと0個以上の優勢グループ
とを一組として、前記符号レジスタ上で符号化された符
号語と、そのシンボルが、属する前記グループ内のシン
ボルの状態を特定する符号語との結合する手順を(C)
としたときに、上記記載の(1)ないし(6)の手順
で、前記優勢シンボルを前記優勢グループと、前記劣性
シンボルを前記劣性グループと読み替えて、劣性グルー
プの符号語と優勢グループの符号語を合成した符号語を
生成する処理をおこない、その後に、(B)、(C)を
この順におこない、これら一連の処理を繰返して、符号
化していくようにしたものである。
Another configuration to which the coding method of the present invention is applied is a case where the input signal is composed of symbols capable of assuming a plurality of states in the above coding method, and the prediction occurrence probability means is used. Based on the predicted occurrence probability of prediction, the possible states of those symbols are divided into two groups, a dominant group and an inferior group, and the symbol is a code word that identifies the state of the symbol in the group to which the block code is assigned. (B) is a procedure in which one recessive group and zero or more dominant groups are combined as a set, and a code word encoded on the code register and a symbol in the group to which the symbol belongs (C) the procedure for combining with the codeword that specifies the state of
Then, in the procedure of (1) to (6) described above, the dominant symbol is read as the dominant group and the recessive symbol is read as the recessive group, and the codeword of the recessive group and the codeword of the dominant group are read. Is performed to generate a code word, and then (B) and (C) are performed in this order, and a series of these processes are repeated to perform encoding.

【0030】[0030]

【作用】本発明によれば、符号化する場合に、劣性シン
ボルのときは、符号レジスタを所定ビット数分、シフト
し、優勢シンボルのときは、シンボルの連続回数分、符
号レジスタをインクレメントする。また、復号化する場
合には、この逆操作をおこなう。
According to the present invention, when encoding, in the case of a recessive symbol, the code register is shifted by a predetermined number of bits, and in the case of a dominant symbol, the code register is incremented by the number of consecutive symbols. . In the case of decoding, the reverse operation is performed.

【0031】そのため、符号化復号化のために特別な装
置を必要とせず、レジスタの基本演算のみで、符号化復
号化を高速に実行できる。しかも、予測生起確率を用い
る非ブロック符号であるために、ブロック符号に基づく
符号化方式(例えばハフマン符号)に比べて、データの
圧縮効率の良い方法である。しかも、情報源のデータを
可逆的に(ロスレス)符号化することができる。
Therefore, a special device is not required for the encoding / decoding, and the encoding / decoding can be executed at high speed by only the basic arithmetic operation of the register. Moreover, since it is a non-block code that uses the prediction occurrence probability, it is a method with a higher data compression efficiency than a coding method based on a block code (for example, Huffman code). Moreover, the data of the information source can be losslessly encoded.

【0032】また、従来の算術符号の様に、復号時にレ
イテンシが生じることもない。
Further, unlike the conventional arithmetic code, latency does not occur at the time of decoding.

【0033】[0033]

【実施例】以下、本発明の各実施例を、図1ないし図1
8を用いて説明する。 〔本発明の基本原理〕先ず、図1を用いて本発明に係る
符号化復号化装置における符号化方法の基本となる原理
について説明する。図1は、本発明に係る符号化復号化
装置における符号化方法の基本原理図である。
Embodiments of the present invention will now be described with reference to FIGS.
8 will be described. [Basic Principle of the Present Invention] First, the basic principle of the encoding method in the encoding / decoding device according to the present invention will be described with reference to FIG. FIG. 1 is a basic principle diagram of an encoding method in an encoding / decoding device according to the present invention.

【0034】先ず、符号化対象とするシンボルの生起確
率が予測される(S101)。これは、信号が入力され
て求める場合もあるし、他の統計的な手段により求める
場合もある。
First, the occurrence probability of a symbol to be encoded is predicted (S101). This may be obtained by inputting a signal, or may be obtained by other statistical means.

【0035】次に、入力したシンボルが優勢シンボルで
あるか、劣性シンボルであるかを判定する(S10
2)。
Next, it is determined whether the input symbol is a dominant symbol or a recessive symbol (S10).
2).

【0036】劣性シンボルのときは、所定ビット、符号
レジスタをシフトする(S103)。 優勢シンボルの
ときは、連続生起回数だけ、カウントして(S10
4)、その数だけ、符号レジスタをインクレメントとす
る(S105)。
If the symbol is a recessive symbol, the code register is shifted by a predetermined number of bits (S103). When the symbol is the dominant symbol, the number of consecutive occurrences is counted (S10
4) The code registers are incremented by that number (S105).

【0037】劣性シンボルの処理と優勢シンボルの処理
が、一組が符号化の単位である。なお、劣性シンボルの
次に、劣性シンボルが来るときには、優勢シンボルの連
続生起回数は、0であると考えると良い。そして、しか
るべきタイミングで、符号を出力する。
One set of the processing of the recessive symbol and the processing of the dominant symbol is a unit of coding. When the recessive symbol is next to the recessive symbol, the number of consecutive occurrences of the dominant symbol may be considered to be zero. Then, the code is output at an appropriate timing.

【0038】以下、これを詳細に説明していこう。Hereinafter, this will be described in detail.

【0039】(I)生起確率の予測 一般に、算術符号に基づく符号化方法では、符号化の前
に生起確率を予測し、それによって符号化する符号の内
容を決定する。本発明においても、同様の考え方により
一つ以上のシンボルの列の生起確率の予測をおこなう。
(I) Prediction of Occurrence Probability In general, in the coding method based on arithmetic code, the occurrence probability is predicted before coding, and the content of the code to be coded is determined accordingly. Also in the present invention, the occurrence probability of a sequence of one or more symbols is predicted by the same idea.

【0040】今、符号化対象とするシンボルを、Xi(i=
0,1)とし、優勢シンボルをX0、対する劣勢シンボルをX1
とする。ここで、優勢シンボルとは、あらわれる確率の
大きいシンボルであり、劣性シンボルとは、あらわれる
確率の小さいシンボルである。そして、優勢シンボルの
生起確率の予測値をP0、劣勢シンボルの生起確率の予測
値をP1とする。また、ある一つ以上のシンボルの列に対
する生起確率の予測値を「予測生起確率」、あるいは、
単に、そのシンボルの「生起確率」ということにする。
Now, the symbol to be encoded is Xi (i =
0,1), the superior symbol is X0, and the inferior symbol is X1.
And Here, the dominant symbol is a symbol having a high probability of appearing, and the recessive symbol is a symbol having a low probability of appearing. The predicted value of the occurrence probability of the dominant symbol is P0, and the predicted value of the occurrence probability of the inferior symbol is P1. In addition, the predicted value of the occurrence probability for a sequence of one or more symbols is "predicted occurrence probability", or
We simply call it the "probability of occurrence".

【0041】さて、本発明に係る符号化方法において
は、既に符号化処理が終了したシンボルを参照して、次
の符号化対象となるシンボルの生起確率を予測する。こ
のためには、あらかじめ同様の符号化対象についてシン
ボルの発生を統計的に解析した結果を利用することがで
きる。
In the coding method according to the present invention, the occurrence probability of the next symbol to be coded is predicted by referring to the symbol which has already been coded. For this purpose, it is possible to use the result of statistically analyzing the occurrence of symbols in advance for the same coding target.

【0042】逆に、本発明に係る復号化方法において
は、符号化装置と同一の手順で、既に復号済みのシンボ
ルを参照して、生起確率を予測する。
On the contrary, in the decoding method according to the present invention, the occurrence probability is predicted by referring to the already-decoded symbols in the same procedure as the coding device.

【0043】このための具体的な予測の方法、装置構成
例は後述するが、本発明は、そのような生起確率値の予
測方法また予測のための装置構成に依存するものではな
く、信号源の特性に基づき、具体的な生起確率の予測手
段を構成すれば良い。例えば、符号化処理に先立ち、符
号化対象シンボルのプリスキャンをおこない、その特性
を検出する手段を備えることもできる。また、その検出
結果を符号語の先頭に付加すれば、復号処理においても
同一の検出結果を利用することができる。さらに、信号
処理を実行しながら信号源の特性を学習する手段を備え
ることもできる。
Although a specific prediction method and device configuration example for this purpose will be described later, the present invention does not depend on such a prediction method of occurrence probability value or a device configuration for prediction, and a signal source. A specific occurrence probability predicting means may be configured based on the characteristic of. For example, it is possible to provide a unit for performing pre-scanning of the symbol to be encoded and detecting its characteristic prior to the encoding process. If the detection result is added to the beginning of the code word, the same detection result can be used in the decoding process. Further, it is possible to provide a means for learning the characteristics of the signal source while executing the signal processing.

【0044】なお、予測生起確率と符号化効率の関係に
ついて、つけ加えておく。予測生起確率は、未来に生起
するシンボルの予測値であることから、確実な値が得ら
れる訳ではない。したがって、分解能高く生起確率を算
出することが、符号化効率の向上に役立つとは限らな
い。確率値の取りうる値の範囲内(0≦P1≦0.5、0.5≦P
0≦1.0)をカバーするように予測値を設定すれば良い。
The relationship between the prediction occurrence probability and the coding efficiency will be added. Since the predicted occurrence probability is a predicted value of a symbol that will occur in the future, a reliable value cannot be obtained. Therefore, calculating the occurrence probability with high resolution does not always help improve the coding efficiency. Within the range of possible probability values (0 ≦ P1 ≦ 0.5, 0.5 ≦ P
The prediction value may be set so as to cover 0 ≦ 1.0).

【0045】本発明は、上記事実に鑑み、生起確率の予
測については、ある程度ラフにおこなって、その部分の
演算処理を効率的に取り扱うことに特徴がある。
In view of the above facts, the present invention is characterized in that the occurrence probability is roughly predicted to handle the arithmetic processing of that portion efficiently.

【0046】(II)符号生成の原理 (II-1)生起確率の決定 次に、図2を用いて本発明に係る符号生成の生起確率決
定の原理を、従来の算術符号の生起確率決定の原理と対
比して説明する。図2は、従来の算術符号の生起確率決
定の原理と本発明に係る符号生成の生起確率決定の原理
を、対比して示した模式図である。
(II) Principle of Code Generation (II-1) Determination of Occurrence Probability Next, the principle of determining the occurrence probability of code generation according to the present invention will be described with reference to FIG. This will be explained in comparison with the principle. FIG. 2 is a schematic diagram showing the principle of determining the probability of occurrence of a conventional arithmetic code and the principle of determining the probability of occurrence of code generation according to the present invention.

【0047】図2(a)に示す用に、従来の算術符号の
原理(Elias符号)によれば、[0,1)区間上のポイント
を分割して、符号化するために座標を求める。この分割
されていく座標を「確率座標」ということにする。
As shown in FIG. 2A, according to the principle of the conventional arithmetic code (Elias code), the points on the [0,1) section are divided and the coordinates for encoding are obtained. The coordinates thus divided will be referred to as “probability coordinates”.

【0048】この確率座標の幅が、生起確率として評価
できる値であって、これをCとする。ここで、確率座標
の初期値は、[0,1)故、Cの初期値は1となる。
The width of this probability coordinate is a value that can be evaluated as the occurrence probability, and this is C. Here, since the initial value of the probability coordinate is [0,1), the initial value of C is 1.

【0049】そして、このとき、入力した符号化対象が
優勢シンボルX0のときは、次の(式1)で、劣勢シンボ
ルX1のときは、次の(式2)で計算していく。
At this time, when the input encoding target is the dominant symbol X0, the following (Equation 1) is used, and when it is the inferior symbol X1, the following (Equation 2) is used.

【0050】[0050]

【数1】 Xi=X0の場合: C ← C・P0 …(式1) Xi=X1の場合: C ← C・P1 …(式2) ここで、P0は優勢シンボルX0の予測生起確率、一方P1
は、優勢シンボルX1の予測生起確率である。上式を、符
号化対象を入力しながら順次繰り返して演算することに
よって、図2(a)に示すように小数点以下の数値で表
される数直線上のポイントが求められ、この値を符号語
として利用する。そして、この算術符号の生起確率によ
る符号化を、原理的な限界であるエントロピーに近づく
圧縮率を実現できる。ところが、一方でこの符号化方法
は、小数点以下の数値の高い演算精度が必要であること
が問題点とされている。
[Equation 1] When Xi = X0: C ← C · P0 (Equation 1) When Xi = X1: C ← C · P1 (Equation 2) where P0 is the predicted occurrence probability of the dominant symbol X0. P1
Is the predicted occurrence probability of the dominant symbol X1. By sequentially calculating the above equation while inputting the encoding target, the point on the number line represented by the numerical value after the decimal point is obtained as shown in FIG. To use as. Then, the encoding by the occurrence probability of the arithmetic code can realize a compression rate that approaches the entropy which is the theoretical limit. On the other hand, however, this encoding method has a problem in that it requires a high calculation accuracy for the numbers below the decimal point.

【0051】次に、これと対比して本発明による符号生
成の原理による生起確率の決定について説明する。本発
明の特徴で上記従来例と原理的に異なる所は、図2
(b)に示すように、生起確率によって分割される数直
線上の区間を常に「1」に正規化することにある。
Next, in contrast to this, the determination of the occurrence probability based on the code generation principle according to the present invention will be described. The feature of the present invention, which is different in principle from the conventional example, is shown in FIG.
As shown in (b), the interval on the number line divided by the occurrence probability is always normalized to "1".

【0052】従来例の算術符号に基づいて、確率座標を
求めていく方法では、図2(a)に示すように確率座標
は符号座標上でどんどん幅が狭くなっていき、生起確率
によって分割される区間の幅は、小数点以下の非常に小
さな値となる。
In the method of obtaining the probability coordinates based on the arithmetic code of the conventional example, the probability coordinates are gradually narrowed on the code coordinates as shown in FIG. 2A, and are divided by the occurrence probability. The width of the section is very small after the decimal point.

【0053】このように分割された区間が小さくなって
行くのを防ぐために、本発明では、各シンボル毎に定め
られている生起確率の幅の逆数を乗じるようにする。具
体的には、確率座標の初期値を[0,1)とし、入力した
符号化対象が優勢シンボルX0のときは、次の(式3)
で、劣勢シンボルX1のときは、次の(式4)で計算し
ていく。
In order to prevent the section thus divided from becoming smaller, the present invention multiplies the reciprocal of the width of the occurrence probability determined for each symbol. Specifically, when the initial value of the probability coordinate is [0,1) and the input encoding target is the dominant symbol X0, the following (Equation 3)
Then, in the case of the inferior symbol X1, calculation is performed by the following (formula 4).

【0054】[0054]

【数2】 Xi=X0の場合: C ← C/P0 …(式3) Xi=X1の場合: C ← C/P1 …(式4) ここで言う「正規化」の意味は、選択されたシンボルの
予測正規確率を1として、確率座標の幅との比を与える
ことである。
[Formula 2] When Xi = X0: C ← C / P0 (Equation 3) When Xi = X1: C ← C / P1 (Equation 4) The meaning of “normalization” here is selected The ratio of the predicted normal probability of the symbol to the width of the probability coordinate is given as 1.

【0055】すなわち、言い替えれば、選択されたシン
ボルをPi(i=0,1)、j番目の確率座標の幅をCjとする
と、以下の比例式が成立するようにすることである。
In other words, if the selected symbol is Pi (i = 0,1) and the width of the j-th probability coordinate is C j , the following proportional expression is to be established.

【0056】[0056]

【数3】Pi : Cj = 1 : Cj+1 …(式5) このようにすれば、初期値が1であった確率座標の幅
は、予測生起確率の逆数に比例して拡大していくことに
なる。
[Equation 3] Pi: C j = 1: C j + 1 (Equation 5) In this way, the width of the probability coordinate whose initial value was 1 expands in proportion to the reciprocal of the predicted occurrence probability. I will go.

【0057】(II-2)符号化の具体的方法 次に、図3ないし図5を用いて、上記本発明の生起確率
決定の原理に基づく符号化の具体的方法について説明す
る。図3は、本発明に係る符号化方法の一例を示す模式
図である。図4は、符号レジスタと符号バッファの内容
を時系列に示した模式図である。図5は、優勢シンボル
の符号化の例を示した模式図である。
(II-2) Specific Encoding Method Next, a specific encoding method based on the principle of determining the occurrence probability of the present invention will be described with reference to FIGS. 3 to 5. FIG. 3 is a schematic diagram showing an example of the encoding method according to the present invention. FIG. 4 is a schematic diagram showing the contents of the code register and the code buffer in time series. FIG. 5 is a schematic diagram showing an example of encoding of a dominant symbol.

【0058】本発明では、上記符号生成の生起確率の決
定に従って、符号化するものである。これを具体的に、
レジスタにおける計算手順も考慮に入れて説明していこ
う。
In the present invention, the encoding is performed according to the determination of the occurrence probability of the code generation. Specifically,
Let us also consider the calculation procedure in the register.

【0059】ここで、符号化するために符号を蓄えられ
るレジスタを符号レジスタと言うことにし、前記Cの値
がここに入るものとする。
Here, a register that can store a code for encoding is referred to as a code register, and the value of C is assumed to be in this range.

【0060】先ず、優勢シンボルの予測生起確率P0を、
1以下であるが、極めて1に近い値であると仮定する。
そして、前記(式3)において、次のような近似をす
る。
First, the predicted occurrence probability P0 of the dominant symbol is
It is assumed that the value is 1 or less, but extremely close to 1.
Then, in the above (formula 3), the following approximation is performed.

【0061】[0061]

【数4】 すなわち、Cを計算するときに、優勢シンボルの発生確
率を一定として演算を単純化するのである。このように
すれば、発生確率P0による割り算は、現在の符号レジス
タの値Cに1を加算(インクレメント)することに置き
換えることができる。
(Equation 4) That is, when calculating C, the probability of occurrence of the dominant symbol is kept constant to simplify the calculation. In this way, the division by the occurrence probability P0 can be replaced by adding (incrementing) 1 to the current value C of the code register.

【0062】一方、劣勢シンボルの予測生起確率P1は、
1/(2**R)で表現できる値を設定する。ここで、Rは1以
上の正の整数であり、劣勢シンボルP1に基づき設定され
る値である。また、2**Rは、2のR乗を表わす。このと
き、
On the other hand, the predicted occurrence probability P1 of the inferior symbol is
Set the value that can be expressed as 1 / (2 ** R). Here, R is a positive integer of 1 or more, and is a value set based on the inferior symbol P1. Further, 2 ** R represents 2 to the power of R. At this time,

【0063】[0063]

【数5】 このようにすれば、上の(式7)でおこなっている演算
は、2進法によって符号レジスタの値Cが表現されてい
るときには、その値をRビットシフトすることによって
実現できる。言い換えれば、現在の符号レジスタの値C
の下位に、R個の「0」を付加すれば良いことになる。
(Equation 5) With this configuration, when the value C of the code register is represented by the binary system, the operation performed by the above (formula 7) can be realized by shifting the value C by R bits. In other words, the current code register value C
It is only necessary to add R "0" s to the lower order of.

【0064】例えば、この具体的な計算例(R=1から4ま
で)を10進数表示で示すと以下のようになる。
For example, this concrete calculation example (R = 1 to 4) is shown in decimal notation as follows.

【0065】[0065]

【数6】 R = 1 P1 = 0.5 C = C・2 R = 2 P1 = 0.25 C = C・4 R = 3 P1 = 0.125 C = C・8 R = 4 P1 = 0.0625 C = C・16 ここで、R個の「0」で表される符号語を、「長さRの劣
勢シンボルの基本符号」と呼ぶことにする。すなわち、
長さRの劣勢シンボルの基本符号とは、劣性シンボルの
予測生起確率P1が、1/(2**R)であるときに、符号レジス
タ下位につけ加えるビット列である。
[Equation 6] R = 1 P1 = 0.5 C = C ・ 2 R = 2 P1 = 0.25 C = C ・ 4 R = 3 P1 = 0.125 C = C ・ 8 R = 4 P1 = 0.0625 C = C ・ 16 where , R codewords represented by “0” will be referred to as “basic code of inferior symbol of length R”. That is,
The basic code of the inferior symbol of length R is a bit string added to the lower order of the code register when the predicted occurrence probability P1 of the inferior symbol is 1 / (2 ** R).

【0066】さて、以下具体的な信号列に基づいて、図
3ないし図5により本発明の符号化手順について説明し
よう。
Now, the coding procedure of the present invention will be described below with reference to FIGS. 3 to 5 based on a specific signal sequence.

【0067】先ず、この手順の原理は、以下の(劣符号
手順)、(優符号手順)を繰り返すものである。なお、
入力信号の先頭には、劣性シンボルを付加するものと約
束しておく。
First, the principle of this procedure is to repeat the following (inferior code procedure) and (excellent code procedure). In addition,
We promise that a recessive symbol will be added to the beginning of the input signal.

【0068】『(劣符号手順)先ず、劣性シンボルが入
力されたものとする。このとき、符号レジスタの下位ビ
ットにR個の0を挿入する。すなわち、符号レジスタに
長さRの基本符号を挿入する。』 『(優符号手順)次に、優勢シンボルの数をカウントす
る。ここで、劣性シンボルの次に、劣性シンボルが来た
ときは、優勢シンボルの数が0であったと考える。そし
て、符号レジスタをこの数分だけ、インクレメントす
る。
"(Inferior code procedure) First, it is assumed that a recessive symbol is input. At this time, R zeros are inserted in the lower bits of the code register. That is, the basic code of length R is inserted into the code register. ] "(Excellent sign procedure) Next, the number of superior symbols is counted. Here, when the recessive symbol comes next to the recessive symbol, it is considered that the number of dominant symbols is zero. Then, the code register is incremented by this number.

【0069】ただし、優勢シンボルの連続回数が大きく
なり、符号レジスタに長さRの基本符号だけでは、表現
できないこともある。
However, the number of consecutive dominant symbols becomes large, and it may not be possible to represent only the basic code of length R in the code register.

【0070】したがって、ここで、優勢シンボルの連続
個数が基本符号のR個の「0」部分のみでは表しきれな
い場合には、新たにブロック符号を終端に接続し、この
新たなブロック符号内に残りの優勢シンボルの連続生起
回数を符号化する必要がある。
Therefore, here, when the number of consecutive dominant symbols cannot be represented only by the R "0" portions of the basic code, a block code is newly connected to the end and the new block code is added to this new block code. The number of consecutive occurrences of the remaining dominant symbols needs to be encoded.

【0071】すなわち、長さRの劣性シンボルの基本符
号がインクレメントされて、ビットが全て「1」になっ
たときにブロック符号をつけ加えるものとして、例え
ば、この付け加える固定的なMビット長のブロック符号
とする。このブロック符号の値は、Mビット長で、残り
の優勢シンボルの連続生起回数を2進数で表現したもの
とする。
That is, when the basic code of the recessive symbol of the length R is incremented and all the bits become "1", the block code is added. For example, this fixed block of M bit length is added. The sign. The value of this block code is M bits long, and the number of consecutive occurrences of the remaining dominant symbols is expressed in binary.

【0072】このようにして、Mビット長では、優勢シ
ンボルの連続生起回数が表現できないこともある。この
場合は、前記Mビット長のブロック符号が全て「1」で
置き換えられた場合であって、さらなるNビット長のブ
ロック符号を終端に付加するという手順を、回数に制限
なく繰り返していくことができる。すなわち、付加する
ブロック符号のビットが全て「1」のときは、さらにそ
の後に、ブロック符号を付加すれば良い。
In this way, the number of consecutive occurrences of the dominant symbol may not be represented by the M bit length. In this case, in the case where all the M-bit length block codes are replaced with "1", the procedure of adding a further N-bit length block code to the terminal end may be repeated without limitation. it can. That is, when all the bits of the block code to be added are “1”, the block code may be added after that.

【0073】ここで、付加するブロック符号のビット長
(上記例ではM、N)は固定的に定めても良く、あるい
は先立つシンボルの予測生起確率に基づいて可変長とす
ることもでき、あるいは、残りの優勢シンボルの連続生
起回数を表す可変長のハフマン符号とすることができ
る。
Here, the bit length (M, N in the above example) of the block code to be added may be fixedly set, or may be variable based on the predicted occurrence probability of the preceding symbol, or It may be a variable-length Huffman code representing the number of consecutive occurrences of the remaining dominant symbols.

【0074】なお、上記のブロック符号の付加は、劣勢
シンボルの基本符号をインクレメントすることだけで
は、その後に来る優勢シンボルの連続生起回数を表現で
きないときであって、そのインクレメントから生じるオ
ーバーフローを防止するための処理と解釈することがで
きる。
The above block code is added only when the basic code of the inferior symbol cannot be incremented to represent the number of consecutive occurrences of the superior symbol that follows, and the overflow caused by the increment is generated. It can be interpreted as a process for preventing.

【0075】このような思想に基づきより詳細に記述す
ると以下のようになる。
A more detailed description based on this idea is as follows.

【0076】符号レジスタの下位ビットにある長さRの
基本符号をインクレメントして行き、全てのビットが1
になったとき、その後にブロック符号を付加するものと
する。このブロック符号は、一意に復号できるものにす
ることができる。付加するブロック符号としては、やは
りRビットの符号とするのがアルゴリズムとして簡明で
あるので、以下の説明では、Rビットのブロック符号を
付加するものとする。
The basic code of length R in the lower bit of the code register is incremented and all bits are set to 1
When, the block code is added after that. This block code can be uniquely decodable. As the block code to be added, it is simple as an algorithm to use an R-bit code, so in the following description, an R-bit block code will be added.

【0077】また、優勢シンボルの連続回数が大きく
て、一つのブロック符号で表現し切れないときは、さら
にこの後にブロック符号を付加していく。このように、
優勢シンボルの連続回数を表現できるまで、ブロック符
号を付加することを繰り返していく。
If the number of consecutive dominant symbols is too large to be represented by one block code, a block code is added after this. in this way,
The block code is added repeatedly until the number of consecutive dominant symbols can be expressed.

【0078】このように、優勢シンボルの連続回数をR
ビットのブロック符号で表わしていくアルゴリズムを数
式で表現して見ると以下のようになる。
In this way, the number of consecutive superior symbols is set to R
The algorithm expressed by the block code of bits is expressed as follows by mathematical expressions.

【0079】優勢シンボルの連続回数を、Nとする。Let N be the number of consecutive dominant symbols.

【0080】次の(式8)が成り立つときには、符号レ
ジスタを単純に、N回インクレメントすれば良い。
When the following (Equation 8) is established, the code register is simply incremented N times.

【0081】[0081]

【数7】N < 2**R-1 …(式8) (式8)が、成り立たないときは、次の(式9)を満足
するような最大の正の整数mをとる。
[Equation 7] N <2 ** R-1 (Equation 8) When (Equation 8) does not hold, the maximum positive integer m that satisfies the following (Equation 9) is taken.

【0082】[0082]

【数8】N ≧ 2**mR-1 …(式9) そして、(1)で挿入されたR個の0をすべて1にし、
さらに、m ≧ 2のときは、符号レジスタに、(m−1)R
個のビットを1にしたものを、符号レジスタの下位につ
け加える。
[Equation 8] N ≧ 2 ** mR-1 (Equation 9) Then, all the 0s of the R inserted in (1) are set to 1, and
Further, when m ≥ 2, the sign register stores (m-1) R
The bit set to 1 is added to the lower order of the code register.

【0083】さらに、長さRの劣性シンボルの基本符号
に対し、N - (2**mR-1)の数だけ、インクレメントして
符号レジスタの下位ビットに付け加える。すなわち、符
号レジスタをRビットシフトして、N - (2**mR-1)回イン
クレメントする。なお、N = (2**mR-1)のときは、単
に、符号レジスタに長さRの劣性シンボルの基本符号を
つけ加えるのみである。』 ここで、劣性シンボルを「1」と仮定し、優勢シンボル
を「0」とする。さて、図3においては、(イ)の入力
信号「1」は、劣性シンボルで、このときのRの値は、3
と仮定しているので、対応する符号語は、「000」で
ある((ロ))。このときは、図4(a)に示すよう
に、(劣符号手順)によって、符号レジスタを3ビット
シフトする。
Further, the basic code of the recessive symbol of length R is incremented by N- (2 ** mR-1) and added to the lower bits of the code register. That is, the code register is shifted by R bits and is incremented N-(2 ** mR-1) times. When N = (2 ** mR-1), the basic code of the recessive symbol of length R is simply added to the code register. Here, it is assumed that the recessive symbol is “1” and the dominant symbol is “0”. Now, in FIG. 3, the input signal “1” of (a) is a recessive symbol, and the value of R at this time is 3
Therefore, the corresponding codeword is “000” ((b)). At this time, as shown in FIG. 4A, the code register is shifted by 3 bits by the (inferior code procedure).

【0084】次に、優勢シンボル「0」が、4回続いて
いる((ハ))。これに対応する符号語は、「100」
であり((ニ))、これと、前の長さ3の劣性シンボル
の基本符号と合成する。実際には、(優符号手順)によ
り、図4(b)に示したように、符号レジスタを4回イ
ンクレメントすれば良い。
Next, the dominant symbol "0" continues four times ((c)). The code word corresponding to this is "100".
((D)), which is combined with the basic code of the preceding recessive symbol of length 3. Actually, the code register may be incremented four times as shown in FIG. 4B by the (excellent code procedure).

【0085】次の劣性シンボル(ホ)では、Rを4と仮定
しているので、対応する符号語は、「0000」である
((ト))。ここでは、劣性シンボル(ホ)の次に、す
ぐ劣性シンボル(ト)が来ているので、符号レジスタの
状態は、図4(c)から図4(d)へ移行する。
In the next recessive symbol (e), R is assumed to be 4, so the corresponding code word is "0000" ((g)). Here, since the recessive symbol (e) immediately follows the recessive symbol (e), the state of the code register shifts from FIG. 4C to FIG. 4D.

【0086】次は、優勢シンボルが8回連続する
((リ))。直前のRの値は、3なので対応する符号語
は、「111001」である((ヌ))。
Next, the dominant symbol continues eight times ((ri)). Since the value of R immediately before is 3, the corresponding codeword is "111001" ((nu)).

【0087】これは、(優符号手順)にしたがって、符
号レジスタの値を7インクレメントし(図4(e))、
その後、符号レジスタを3ビットシフトし(図4
(f))、最後に、この値を1インクレメントする(図
4(g))。
This is to increment the value of the code register by 7 in accordance with the (excellent sign procedure) (FIG. 4 (e)).
After that, the code register is shifted by 3 bits (see FIG.
(F)) Finally, this value is incremented by 1 (FIG. 4 (g)).

【0088】なお、(優符号手順)の所に記述したよう
に、優勢シンボルの符号への具体的な置き換えは、図5
に示すようになる。
As described in the section (superior code procedure), the concrete replacement of the dominant symbol with the code is shown in FIG.
It becomes as shown in.

【0089】また、上記説明では、符号レジスタの下位
ビットを直接インクレメントしたが、カウントを別の所
でおこなって、その後、符号レジスタ上にある長さRの
劣性シンボルの基本符号とビット毎のORを取るなどし
て合成する手順をとっても良い。
Further, in the above description, the lower bits of the code register are incremented directly. However, counting is performed at another place, and then the basic code of the recessive symbol of length R on the code register and the bitwise It is also possible to take a procedure of combining such as taking an OR.

【0090】(III)復号の原理 次に、上の様にして生成した符号を復号するときの原理
について説明する。
(III) Principle of Decoding Next, the principle of decoding the code generated as described above will be described.

【0091】上記符号化処理では、劣性シンボルの符号
語から始めて、劣性シンボルの符号語と優勢シンボルの
符号語を合成して、一つの符号語として生成していっ
た。今、この合成された符号語を合成符号語ということ
にする。
In the above encoding process, the code word of the recessive symbol and the code word of the dominant symbol are combined and generated as one code word, starting from the code word of the recessive symbol. Now, the synthesized codeword is referred to as a synthesized codeword.

【0092】復号化処理では、この合成符号語を、劣性
シンボルの符号語と優勢シンボルの符号語に分離して行
かなければならない。そのため、今、合成符号語の先頭
が識別できているものする。そのときに、以下の場合に
わけて、それに続く符号語を認識していく。そして、こ
れらを復号が終わるまで繰り返していけば良い。また、
Rの値は、その劣勢シンボルの予測生起確率から求めら
れる。
In the decoding process, the composite code word must be separated into the code word of the recessive symbol and the code word of the dominant symbol. Therefore, it is assumed that the beginning of the composite codeword can be identified now. At that time, the following codewords are recognized in the following cases. Then, these may be repeated until the decoding is completed. Also,
The value of R is obtained from the predicted occurrence probability of the inferior symbol.

【0093】(復号ケース1)その合成符号語がR個
が、全て「0」で表されているならば、それは、劣勢シ
ンボルの符号語のみで構成されている場合である。復号
するときは、劣性シンボルのみを復号すれば良い。
(Decoding Case 1) If all R of the composite codewords are represented by "0", it means that the codewords are composed of only the codewords of the inferior symbol. When decoding, only the recessive symbols need to be decoded.

【0094】(復号ケース2)その合成符号語R個の中
で、「0」と「1」が混在しているとき、劣勢シンボル
の符号語と優勢シンボルの符号語が混在している場合で
ある。 そのときは、劣性シンボルを1つと、そのRビ
ットの符号語を2進数で解釈したときの数分だけ、優勢
シンボルを復号する。
(Decoding Case 2) When "0" and "1" are mixed in the combined R codewords, the codeword of the inferior symbol and the codeword of the dominant symbol are mixed. is there. In that case, the dominant symbol is decoded by one recessive symbol and by the number of times when the R-bit codeword is interpreted in binary.

【0095】(復号ケース3)その合成符号語R個が、
全て「1」で表わされているならば、次の、符号語をR
ビットを調べる。
(Decoding Case 3) The R composite code words are
If all are represented by "1", the next code word is R
Examine the bits.

【0096】その符号語も、全て「1」なら、次のR個
の符号語を調べる。この様に、R個単位のブロックで見
ていって、「0」を含むブロックが現われるまで繰り返
す。
If all the code words are "1", the next R code words are checked. In this way, it is repeated for each block of R units and repeated until a block including "0" appears.

【0097】ここで、R個単位のブロックで、全て
「1」のものが、m回現われ、また、その直後の、R個単
位のブロックを2進数にしたとき、bであるとする。こ
のときは、劣性シンボル1つと、優勢シンボルを(2**m
R-1)+b個復号する。
Here, it is assumed that all R-unit blocks of "1" appear m times, and when the immediately following R-unit block is converted into a binary number, it is b. In this case, one recessive symbol and a superior symbol (2 ** m
R-1) + b are decoded.

【0098】(IV)本発明の特徴 本発明では、上記のように劣性シンボルが現われたとき
には、符号レジスタを予測生起確率より算出されるビッ
ト数だけシフトし、優勢シンボルが現われたときには、
符号レジスタをインクレメントする。このような原理に
基づき、簡易な処理手順で、効率の高い符号化復号化処
理を実現することができる。なお、本発明の説明で用い
ている劣性と優勢のシンボルとして仮定した「0」と
「1」とを置き換えて、符号化復号化処理をおこなって
も同様の効果が得られることはもとよりである。
(IV) Features of the Present Invention In the present invention, when the recessive symbol appears as described above, the code register is shifted by the number of bits calculated from the predicted occurrence probability, and when the dominant symbol appears,
Increment the sign register. Based on such a principle, highly efficient encoding / decoding processing can be realized with a simple processing procedure. It is needless to say that similar effects can be obtained by performing the encoding / decoding process by replacing "0" and "1" assumed as the recessive and dominant symbols used in the description of the present invention. .

【0099】〔符号化復号化手順〕 (I)符号化手順 次に、上記原理に基づく符号化処理の手順を、図6の順
を追って説明する。図6は、本発明に係る符号化処理の
手順を示すフローチャートである。なお、この説明で
も、入力信号のレベルは、「0」、「1」の2値レベル
であったとする。
[Encoding / Decoding Procedure] (I) Encoding Procedure Next, the procedure of the encoding process based on the above principle will be described in order of FIG. FIG. 6 is a flowchart showing the procedure of the encoding process according to the present invention. Also in this description, it is assumed that the level of the input signal is a binary level of “0” and “1”.

【0100】(1)初期化 演算をおこなう符号レジスタを用意する。この符号レジ
スタは、信号を入力する前に、符号語の開始位置を明確
にするため、初期化する必要がある(S601)。
(1) Initialization A code register for performing the calculation is prepared. Before inputting a signal, this code register needs to be initialized in order to clarify the start position of the code word (S601).

【0101】この初期化の具体的な例としては、例え
ば、初期値「1」を符号レジスタCに設定する。また
は、仮想的な劣勢シンボルを設定し、例えば1個の
「0」を符号語の先頭に配置しても良い。また、符号化
/復号化処理をおこなう装置の双方で約束を決めておく
ならば、上記例に限らず先頭符号を設定して良く、ある
いは、何らの符号を付加しなくてもよい。
As a concrete example of this initialization, for example, an initial value "1" is set in the code register C. Alternatively, a virtual inferior symbol may be set and, for example, one “0” may be placed at the beginning of the codeword. Further, if the promise is decided by both of the devices that perform the encoding / decoding processing, the head code may be set without being limited to the above example, or no code may be added.

【0102】(2)確率値の推定 信号となるデータを統計的に調べたり、予め定められた
なんらかのアルゴリズムによって、符号化対象の予測生
起確率を推定する(S602)。これは、例えば、既に
入力されている信号値に従って、次に来る信号の生起確
率を予測する方法が代表的なものである。各々の生起確
率は、優勢シンボルX0についてはP0、劣勢シンボルX1に
ついてはP1と推定されたものとする。
(2) Estimation of Probability Value Data to be a signal is statistically examined or the prediction occurrence probability of the encoding target is estimated by some predetermined algorithm (S602). For example, a typical method is to predict the occurrence probability of the next signal according to the already input signal value. It is assumed that the respective occurrence probabilities are estimated to be P0 for the dominant symbol X0 and P1 for the inferior symbol X1.

【0103】(3)信号入力 次に、信号を入力する(S603)。上記(2)の予測
生起確率の推定手順によって、信号の生起確率を予測す
る。
(3) Signal Input Next, a signal is input (S603). The occurrence probability of the signal is predicted by the above-mentioned procedure (2) of estimating the predicted occurrence probability.

【0104】(4)符号の作成 ここで、高い予測生起確率P0をとる信号値(「0」、
「1」のどちらか)を優勢シンボルX0、低い予測生起確
率P1をとる信号レベル(優勢シンボルX0と逆の値)を劣
勢シンボルX1とする。また、現在の符号レジスタの値を
Cとしたときに、以下の様に判定する(S604)。
(4) Creation of code Here, a signal value ("0", which has a high predicted occurrence probability P0,
It is assumed that either "1") is the dominant symbol X0, and the signal level having a low predicted occurrence probability P1 (value opposite to the dominant symbol X0) is the inferior symbol X1. Also, the current value of the sign register is
When C is set, the following judgment is made (S604).

【0105】[0105]

【数9】 Xi=X0の場合: C ← C + 1 …(式10) すなわち現在の符号に1を加算する(S6082)。[Formula 9] Xi = X0: C ← C + 1 (Equation 10) That is, 1 is added to the current code (S6082).

【0106】[0106]

【数10】 Xi=X1の場合: C ← C・2**R …(式11) すなわち、符号レジスタの値をRビット分、左にシフト
する(S6081)。
When Xi = X1: C ← C · 2 ** R (Equation 11) That is, the value of the code register is shifted to the left by R bits (S6081).

【0107】ここで、上記符号生成の原理で述べたよう
に、Rは、劣勢シンボルの予測生起確率P1により定まる
値である。
Here, as described in the principle of code generation, R is a value determined by the predicted occurrence probability P1 of the inferior symbol.

【0108】この手順によれば、劣勢シンボルに引き続
き、優勢シンボルが連続して生起した場合には、符号レ
ジスタの下位ビットにおかれた、先立つ劣勢シンボルの
基本符号を構成するR個の「0」部分(「長さRの劣性
シンボルの基本符号」)を、優勢シンボルの連続個数分だ
け符号レジスタをインクレメントすることにより、優勢
シンボルの連続を表す2進数で置き換えることになる。
According to this procedure, in the case where the dominant symbol is successively generated following the inferior symbol, the R "0" s constituting the basic code of the preceding inferior symbol placed in the lower bit of the code register are generated. The "part"("the basic code of the recessive symbol of length R") is replaced with the binary number representing the succession of the dominant symbol by incrementing the code register by the number of successive dominant symbols.

【0109】また、符号レジスタの下位ビットに置かれ
た長さRの劣性シンボルの基本符号が、インクレメント
されて、全て「1」になったときは、(優符号手順)で
記載したようにブロック符号を付加する(S608
3)。
When the basic code of the recessive symbol of length R placed in the lower bit of the code register is incremented to all "1", as described in (excellent code procedure). A block code is added (S608)
3).

【0110】(5)符号出力 予め定めたシンボルの符号化が終了した時点、予め定め
たビット数の符号が符号レジスタCに作成された、ある
いは、符号レジスタに作成されたビットが溢れて収容で
きなくなった等の条件が発生したときに、符号レジスタ
の内容を、例えば、符号バッファ、メモリ等に出力する
(S609)。
(5) Code Output At the time when the coding of the predetermined symbol is completed, the code of the predetermined number of bits is created in the code register C, or the bits created in the code register overflow and can be accommodated. When a condition such as disappearance occurs, the content of the code register is output to, for example, the code buffer, the memory, or the like (S609).

【0111】符号出力後、レジスタ初期値の再設定が必
要になるときもある。
After the code is output, the initial value of the register may need to be reset.

【0112】(6)終了判断 対象の符号化処理が終了した場合には(S610)、そ
の時点のレジスタCの内容を出力し、終了処理を終了す
る。
(6) Termination Judgment When the target encoding process is completed (S610), the contents of the register C at that time are output, and the termination process is completed.

【0113】符号化処理をさらに継続する場合には、次
のシンボルの処理を繰り返す。
To continue the coding process, the process for the next symbol is repeated.

【0114】(II)復号化手順 次に、上記原理によってなされた符号の復号化手順につ
いて、図7の順を追って説明する。図7は、本発明に係
る復号化手順を示すフローチャートである。なお、この
復号化処理においても、もと信号が「0」、「1」の2
値であると仮定する。
(II) Decoding Procedure Next, the decoding procedure of the code performed according to the above principle will be described in the order of FIG. FIG. 7 is a flowchart showing a decoding procedure according to the present invention. Even in this decoding process, the original signal is "0" or "1".
Assume it is a value.

【0115】(1)符号語の先頭位置の検出 レジスタCに符号語を入力する。(1) Detection of the start position of a code word The code word is input to the register C.

【0116】ここで、符号化/復号化処理をおこなう装
置の双方で決めた約束に基づき、符号語の先頭位置を検
出し、確定する(S701)。
Here, the head position of the code word is detected and determined based on the promise determined by both the devices that perform the encoding / decoding processing (S701).

【0117】(2)生起確率の予測 符号化のときにおこなった予測生起確率を推定手順と同
じ方法により、符号化対象の予測生起確率を推定する
(S702)。各々の予測生起確率は、符号化のときと
同様に、優勢シンボルX0についてはP0、劣勢シンボルX1
についてはP1とする。
(2) Prediction of Occurrence Probability The prediction occurrence probability of the encoding target is estimated by the same method as the estimation procedure of the prediction occurrence probability performed at the time of encoding (S702). Each predicted occurrence probability is P0 for the superior symbol X0 and the inferior symbol X1 as in the case of encoding.
Is P1.

【0118】(3)符号語入力 次に、符号語を入力する(S703)。そして、(2)
の予測生起確率の推定手順に従って、個々の符号語に対
応する生起確率を予測する。
(3) Input of Code Word Next, the code word is input (S703). And (2)
The occurrence probability corresponding to each codeword is predicted according to the procedure of estimating the predicted occurrence probability of.

【0119】(4)符号語の検出と劣性シンボルの再生
処理 先ず、生起確率の推定値に基づいて、符号語を優勢シン
ボルのものと劣性シンボルと分離したときの、劣性シン
ボルの長さRを求める(S704)。
(4) Codeword Detection and Recessive Symbol Reproduction Processing First, the length R of the recessive symbol when the codeword is separated into the dominant symbol and the recessive symbol based on the estimated value of the occurrence probability. Ask (S704).

【0120】長さRの符号語の中に、優勢シンボルの符
号語があるかを検出する(S704)。すなわち、こ
れは、長さRの符号語の中に、シンボル「1」が登場し
ないか否かを調べることである。
It is detected whether or not there is a code word of the dominant symbol in the code words of length R (S704). That is, this is to check whether or not the symbol "1" appears in the codeword of length R.

【0121】次に、R個の符号語に対して、劣性シンボ
ルを一つ再生する(S704)。
Next, one recessive symbol is reproduced for the R code words (S704).

【0122】(5)優勢シンボルの検出と優勢シンボル
の再生処理 長さRの符号の内で、一つでもシンボル「1」が含まれ
るときは(S705)、この符号語は、劣性シンボルの
後に、優勢シンボルが引き続き生起したものである。こ
のときは、S706に進む。
(5) Detecting Dominant Symbol and Reproducing Process of Dominant Symbol If at least one symbol "1" is included in the code of the length R (S705), this code word follows the recessive symbol. , The dominance symbol continues to occur. At this time, the process proceeds to S706.

【0123】全て、シンボル「0」のときは、優勢シン
ボルが現われなかったときであるから、優勢シンボル
は、再生されない。
In all cases, when the symbol is "0", the dominant symbol does not appear, so the dominant symbol is not reproduced.

【0124】優勢シンボルが引き続き生起されたものと
されるときは、優勢シンボルの連続回数を検出し(S7
06)、その数だけ優勢シンボルを再生する必要があ
る(S706)。
When it is determined that the dominant symbol is continuously generated, the number of consecutive dominant symbols is detected (S7).
06), it is necessary to reproduce as many dominant symbols as that number (S706).

【0125】このとき、長さRの符号語の全てが、シン
ボル「1」であったときは、以下に引き続くブロック符
号を考慮する必要がある。そのブロック符号の後に、ま
たブロック符号が続くときにも、以下同様にし、優勢シ
ンボルの連続回数を求めなければならない。
At this time, if all of the code words of length R are the symbols "1", it is necessary to consider the following block code. When the block code is followed by the block code, the number of consecutive dominant symbols must be obtained in the same manner.

【0126】なお、信号を再生するときには、高い予測
生起確率P0をとる信号レベル(「0」「1」のどちら
か)は、優勢シンボルX0、低い予測生起確率P1をとる信
号レベル(優勢シンボルX0と逆の値)は、劣勢シンボル
X1と対応付けられているから、復号して得られた優勢シ
ンボルと劣勢シンボルとの区別を、予測生起確率と対応
させるれば良い。
When the signal is reproduced, the signal level having the high predicted occurrence probability P0 (either "0" or "1") is the dominant symbol X0, and the signal level having the low predicted occurrence probability P1 (the dominant symbol X0 (The opposite value) is the inferior symbol
Since it is associated with X1, the distinction between the superior symbol and the inferior symbol obtained by decoding may be associated with the predicted occurrence probability.

【0127】(6)終了判断 全ての符号語の復号が終了したならば終了し(S70
7)、そうでなければ次の符号語の復号を繰り返す。
(6) Termination judgment If the decoding of all codewords is completed, the processing is terminated (S70).
7) Otherwise, the decoding of the next codeword is repeated.

【0128】(III)符号出力について 符号語を出力するタイミングとして、作成された符号語
が一定の長さに達した時点、符号化処理したシンボルの
個数が一定に達した時点、符号化対象シンボルが終了し
た時点等を利用できる。
(III) About Code Output As timings to output a codeword, the time when the generated codeword reaches a certain length, the time when the number of encoded symbols reaches a certain amount, and the symbol to be encoded Can be used when

【0129】出力する符号語は、そのままのビット系列
でも、あるいは何らかのフレーム構造に内蔵するため分
割してもよい。例えば、フレーム内の情報フィールドが
58バイトの大きさであるならば、生成した符号語をそ
のバイト数分に区切って出力する。
The code word to be output may be a bit sequence as it is, or may be divided because it is incorporated in some frame structure. For example, if the information field in the frame has a size of 58 bytes, the generated codeword is divided into the number of bytes and output.

【0130】符号データを蓄積、伝送する場合には、C
RC(Cyclic Redundancy Check)などのデータ誤りを
排除する手段を利用することが望ましい。本発明は、デ
ータ誤りをなくす手段を限定するものではなく、様々な
手段と組み合わせることができる。
When storing and transmitting code data, C
It is desirable to use a means for eliminating data errors such as RC (Cyclic Redundancy Check). The present invention does not limit the means for eliminating the data error and can be combined with various means.

【0131】また、符号語のビット列に先立ち何らかの
情報を含むヘッダ情報を付加することができる。例え
ば、本発明に基づき符号生成したことを明示的に示す情
報、符号化対象のシンボル数(すなわち復号すべきシン
ボル数)等を、ヘッダ情報としてに設定することができ
る。
Header information including some information can be added prior to the bit string of the code word. For example, information that explicitly indicates that the code has been generated according to the present invention, the number of symbols to be encoded (that is, the number of symbols to be decoded), and the like can be set as the header information.

【0132】さらに、一定の符号化シンボル個数あるい
は一定の符号語ビット毎に何らかの情報を含む同期信号
を挿入することもできる。例えば、特定のビットパター
ンをいわゆるエスケープ符号として設定し、その符号に
引き続き何らかの制御信号を挿入することができる。こ
のエスケープ符号として、例えば、実際の符号化処理に
は使わない極めて生起確率の低い劣勢シンボルに対応し
た符号語を利用すれば良い。
Furthermore, it is also possible to insert a synchronization signal containing some information for each fixed number of coded symbols or fixed codeword bits. For example, a specific bit pattern can be set as a so-called escape code, and some control signal can be inserted subsequently to the code. As the escape code, for example, a code word corresponding to an inferior symbol having a very low occurrence probability, which is not used in the actual encoding process, may be used.

【0133】〔符号化復号化装置の構成〕 (I)符号化装置の構成 次に、図8および図10を用いて本発明に係る符号化装
置の構成について説明する。図8は、本発明に係る符号
化装置の構成を示すブロック図である。図10は、本発
明に係る符号化装置の符号レジスタと符号バッファとを
模式的に示した図である。
[Configuration of Encoding / Decoding Device] (I) Configuration of Encoding Device Next, the configuration of the encoding device according to the present invention will be described with reference to FIGS. 8 and 10. FIG. 8 is a block diagram showing the configuration of the encoding device according to the present invention. FIG. 10 is a diagram schematically showing a code register and a code buffer of the encoding device according to the present invention.

【0134】生起確率予測装置101は、符号化対象シ
ンボルの生起確率を予測する。すなわち、メモリ装置1
00には、既に符号化処理を終了したシンボルが一時的
に蓄積されるが、それからの出力を用いて、次の符号化
対象であるシンボルの生起確率を予測し、シンボルの内
でどのシンボルが、優勢シンボルになるか劣勢シンボル
になるかを設定する。
The occurrence probability prediction device 101 predicts the occurrence probability of the symbol to be coded. That is, the memory device 1
At 00, symbols that have already undergone encoding processing are temporarily accumulated. The output from that is used to predict the occurrence probability of the next symbol to be encoded, and which of the symbols is , Set whether to become the dominant symbol or the inferior symbol.

【0135】そして、この判断に基づく優勢シンボルと
劣勢シンボルと、符号化対象シンボルである実際に生起
したシンボルとを比較器102を用いて比較する。生起
確率予測装置101の出力である予測確率と比較器10
2とから出力される結果に従って、劣勢シンボルに対応
する符号語を生成するビットシフト制御装置103、優
勢シンボルの生起回数をカウントする計測装置104を
用いて作る。そして、各々が生成した符号語を符号レジ
スタ105を用いて合成する。また、出力した符号語を
一時的に蓄積するため、符号バッファ106を用意す
る。
Then, the dominant symbol and the inferior symbol based on this judgment are compared with the actually generated symbol which is the symbol to be encoded, by using the comparator 102. Prediction probability output from the occurrence probability prediction device 101 and the comparator 10
2 and the bit shift control device 103 for generating a code word corresponding to the inferior symbol and the measuring device 104 for counting the number of occurrences of the dominant symbol. Then, the code words generated by each are combined using the code register 105. Further, the code buffer 106 is prepared in order to temporarily store the output codeword.

【0136】ここで、前記従来方式が小数点以下の数値
を扱うレジスタを複数個必要としていることに対して、
図10に示すように、本発明の符号レジスタ105は
「0」を含む正の整数値を表現できる2進レジスタであ
れば良い。
Here, the conventional method requires a plurality of registers for handling numerical values below the decimal point,
As shown in FIG. 10, the sign register 105 of the present invention may be a binary register capable of expressing a positive integer value including "0".

【0137】また、符号レジスタ105は、以下の様に
様々な構成が考えられる。
The code register 105 can have various configurations as follows.

【0138】(1)単一のレジスタ (2)複数のレジスタを接続して構成する (3)単一のレジスタと汎用メモリを組み合わせて構成
する ここで、符号レジスタ105のビット構成は、処理の簡
易化、処理速度の向上の観点から、劣勢シンボルの最大
符号語長を最低限の長さとして備えることが望ましい。
(1) Single register (2) Multiple registers are connected and configured (3) Single register and general-purpose memory are combined Here, the bit configuration of the code register 105 is From the viewpoint of simplification and improvement of processing speed, it is desirable to provide the maximum codeword length of the inferior symbol as the minimum length.

【0139】なお、汎用メモリを符号語の蓄積のために
使うためには、蓄積した符号の最終位置を指示するポイ
ンタ、あるいは蓄積した符号のビット数を計測するカウ
ンタと組み合わせることで、その汎用メモリのビット構
成に依存することなく利用することができる。
In order to use the general-purpose memory for accumulating the code word, the general-purpose memory is combined with a pointer for indicating the final position of the accumulated code or a counter for measuring the number of bits of the accumulated code. It can be used without depending on the bit configuration of.

【0140】(II)復号化装置の構成 次に、図9を用いて本発明に係る復号化装置の構成につ
いて説明する。図9は、本発明に係る復号化装置の構成
のブロック図である。
(II) Configuration of Decoding Device Next, the configuration of the decoding device according to the present invention will be described with reference to FIG. FIG. 9 is a block diagram of the configuration of the decoding device according to the present invention.

【0141】先ず、入力した符号語を一時的に蓄積した
符号バッファ206から、符号レジスタ205に転送す
る。生起確率予測装置201は、既に復号化処理を終了
したシンボルを一時的に蓄積するメモリ装置200の出
力を用いて次の復号化対象であるシンボルの生起確率を
予測し、シンボルの内で、どのシンボルが優勢シンボル
となるか劣勢シンボルとなるかを設定する。
First, the input codeword is transferred from the code buffer 206, which temporarily stores the codeword, to the code register 205. The occurrence probability prediction device 201 predicts the occurrence probability of the next symbol to be decoded using the output of the memory device 200 that temporarily stores the symbols that have already undergone the decoding process. Set whether the symbol will be the dominant symbol or the inferior symbol.

【0142】符号レジスタ205の符号、および生起確
率予測装置201の出力であるシンボルの予測生起確率
の結果に従って、劣勢シンボルを劣勢シンボル再生装置
203、優勢シンボルを優勢シンボル再生装置204を
用いて各々の再生を実行し、信号合成出力装置202を
用いてシンボルを復元する。
In accordance with the code of the code register 205 and the result of the predicted occurrence probability of the symbol output from the occurrence probability prediction device 201, the inferior symbol is used by the inferior symbol reproduction device 203 and the superior symbol by the superior symbol reproduction device 204. The reproduction is executed and the symbol is restored using the signal synthesis output device 202.

【0143】(III)処理速度の向上 信号処理速度の観点からは、一つのマシンサイクルで一
つのシンボルを符号化処理、あるいは復号化処理するが
望ましい。このためには、上記符号生成装置と符号分析
装置の動作をマシンサイクルに同期してシンボルを処理
するように構成すれば良い。
(III) Improvement of Processing Speed From the viewpoint of signal processing speed, it is desirable to encode or decode one symbol in one machine cycle. To this end, the operations of the code generation device and the code analysis device may be configured to process symbols in synchronization with the machine cycle.

【0144】このような一つのマシンサイクルで一つの
シンボルを符号化処理、あるいは復号化処理をおこなう
ことのできる符号化復号化装置を組み込むことで、高速
な信号処理を特長とする画像信号の処理装置を実現する
ことができる。
By incorporating a coding / decoding device capable of coding or decoding one symbol in one machine cycle, image signal processing characterized by high-speed signal processing is incorporated. The device can be realized.

【0145】〔符号テーブルを用いた符号化復号化処理
の高速化〕次に、図11および図12を用いて符号テー
ブルにより、本発明に係る符号化復号化処理を高速化で
きることについて説明する。図11は、符号テーブルの
模式図である。図12は、符号テーブルを用いた符号化
装置および復号化装置のブロック図である。
[Speeding Up of Encoding / Decoding Process Using Code Table] Next, it will be described with reference to FIGS. 11 and 12 that the speed of the encoding / decoding process according to the present invention can be increased by using the code table. FIG. 11 is a schematic diagram of a code table. FIG. 12 is a block diagram of an encoding device and a decoding device using a code table.

【0146】本発明による符号化処理は、前記符号化処
理手順によって、入力したシンボル毎に符号語を生成し
ていくことになる。また、復号化処理では、入力した符
号を復号して、信号を生成するものであった。しかしな
がら、連続して生起したシンボルの組み合わせに対応し
た符号語(復号の場合は、入力符号に対する信号)を、
予め作成しておいてもよい。
In the encoding process according to the present invention, the code word is generated for each input symbol by the encoding process procedure. In the decoding process, the input code is decoded to generate a signal. However, the code word (in the case of decoding, the signal for the input code) corresponding to the combination of symbols that occur consecutively is
It may be created in advance.

【0147】例えば、一つの劣勢シンボルと、一つもし
くは複数の優勢シンボルが連続した場合、図11に示す
様に、そのシンボルの組み合わせに対応した符号語を予
め定めてテーブルにまとめておくことができる。この符
号テーブルを作成するパラメータは、劣勢シンボルの生
起確率と引き続く優勢シンボルの連続個数である。
For example, when one inferior symbol and one or a plurality of superior symbols are consecutive, as shown in FIG. 11, the code words corresponding to the combination of the symbols may be predetermined and collected in a table. it can. The parameters for creating the code table are the probability of occurrence of the inferior symbol and the number of consecutive succeeding dominant symbols.

【0148】以下これを、「符号テーブル」と呼ぶこと
にしよう。この符号テーブルによれば、これまで説明し
てきた符号化復号化処理をテーブルを検索するのみでお
こなうことができるので、処理速度が向上することが期
待できる。
Hereinafter, this will be referred to as a "code table". According to this code table, the coding / decoding processing described so far can be performed only by searching the table, so that it can be expected that the processing speed is improved.

【0149】このような符号テーブルを使った符号化処
理復号化処理の構成例は、図12に示す如くである。
An example of the configuration of the encoding process and the decoding process using such a code table is as shown in FIG.

【0150】この装置は、基本的には図8および図9に
示した構成と同じであるが、演算をおこなための符号レ
ジスタ105および205の代わりに、上記図11のよ
うな符号テーブル110および210を備える。
This apparatus has basically the same configuration as that shown in FIGS. 8 and 9, but instead of the code registers 105 and 205 for performing the calculation, the code table 110 as shown in FIG. 11 is used. And 210.

【0151】このように符号テーブルを使うメリット
は、符号語を演算するための符号レジスタをなくすこと
ができ、シンボル毎の符号生成手順および復号手順を簡
略化でき、符号化復号化処理の高速化を実現できる点に
ある。
As described above, the advantage of using the code table is that the code register for calculating the code word can be eliminated, the code generation procedure and the decoding procedure for each symbol can be simplified, and the speed of the encoding / decoding processing can be increased. There is a point that can be realized.

【0152】特に、復号処理において、一つの劣勢シン
ボルの符号語長に相当する符号語をテーブル検索するこ
とによって、一つの劣勢シンボルと複数(0以上)の優
勢シンボルを復号できる。すなわち、シンボル単位の信
号処理速度は、一般的には、比較すると符号化処理より
も復号化処理の方が高速に実行できると言える。
In particular, in the decoding process, one inferior symbol and a plurality (0 or more) of superior symbols can be decoded by performing a table search for a codeword corresponding to the codeword length of one inferior symbol. That is, it can be said that, in terms of the signal processing speed in symbol units, in general, the decoding process can be executed at a higher speed than the encoding process in comparison.

【0153】上記符号テーブルによる符号化復号化の考
え方は、本発明の非ブロック符号の生成プロセスが有限
の状態遷移で表すことができることに基づいている。言
い換えれば、原理的には異なるものの、ブロック符号と
同様に、予め作成した符号語を接続していくことで、符
号化処理を実現できることを示している。
The concept of encoding / decoding by the code table is based on the fact that the non-block code generation process of the present invention can be represented by a finite state transition. In other words, although it is different in principle, it is shown that the encoding process can be realized by connecting the codewords created in advance, like the block code.

【0154】なお、ブロック符号による符号化処理は、
複数の対象シンボルをまとめて符号語に変換する処理を
採用することができるが、生起確率の予測に参照できる
のは、その符号語に対応する対象シンボル以前に処理が
済んでいるシンボルである。
The coding process using the block code is as follows.
Although a process of collectively converting a plurality of target symbols into a code word can be adopted, what can be referred to in predicting the occurrence probability is a symbol that has been processed before the target symbol corresponding to the code word.

【0155】一方、本発明の符号化処理では、基本的
に、対象シンボル毎に符号語を作成していくことから、
直前のシンボルまで生起確率の予測のために参照でき
る。
On the other hand, in the encoding processing of the present invention, since the code word is basically created for each target symbol,
Up to the last symbol can be referred to for the prediction of the occurrence probability.

【0156】〔プログラムとプロセッサとによる実施
例〕これまで説明したきた符号化復号化処理の基本手順
は、一般的なプロセッサを用いたプログラム手続きで容
易に実現することができる。
[Embodiment by Program and Processor] The basic procedure of the encoding / decoding processing described so far can be easily realized by a program procedure using a general processor.

【0157】ここでいうプロセッサとは、いわゆる汎用
プロセッサであり、構造的には、数個の汎用レジスタ、
アドレスレジスタなどを持ち、汎用メモリと接続して用
いて、汎用メモリに蓄えられたプログラムを解釈して実
行して、メモリに蓄えられたデータの入出力をおこなう
ものである。
The processor mentioned here is a so-called general-purpose processor, and structurally consists of several general-purpose registers,
It has an address register and the like and is used by being connected to a general-purpose memory, interpreting and executing a program stored in the general-purpose memory, and inputting / outputting data stored in the memory.

【0158】これまで述べてきた符号レジスタは、この
プロセッサが内蔵する汎用レジスタを利用することがで
きる。また、符号を蓄積するメモリとしては、プロセッ
サがアクセスできる汎用メモリを利用することができ
る。プロセッサに内蔵する複数の汎用レジスタを接続し
た使い方をすることで、ビット長尺化を計ることもでき
る。
As the code register described above, a general-purpose register incorporated in this processor can be used. A general-purpose memory that can be accessed by the processor can be used as the memory that stores the code. Bit length can also be increased by connecting multiple general-purpose registers built into the processor.

【0159】また、この場合であっても、信号処理の高
速化のため、上記したように、符号テーブルとして、複
数のシンボルの組み合わせに対応した符号語をあらかじ
めメモリ上にテーブルとして配置しておくことができる
のはもとよりである。このとき、メモリ上の符号テーブ
ルを検索するのは、検索用データをメモリアドレスに変
換することで容易に実行できる。
Even in this case, in order to speed up the signal processing, as described above, code words corresponding to a combination of a plurality of symbols are arranged in advance in the memory as a table as a code table. Of course, you can do it. At this time, the code table on the memory can be searched easily by converting the search data into a memory address.

【0160】また、当然のことながら、本発明を汎用プ
ロセッサによるプログラム手続きで実行させた場合であ
っても、信号処理を実行するプロセッサの種別、プログ
ラム言語の種類等に依存するものではない。
Further, as a matter of course, even when the present invention is executed by a program procedure by a general-purpose processor, it does not depend on the type of processor that executes signal processing, the type of programming language, or the like.

【0161】〔多値レベルの符号化処理〕次に、図13
および図14を用いて本発明に係る符号化復号化処理手
順を、入力シンボルが多値レベルである場合にも適用で
きることを説明する。すなわち、これまで説明してきた
手順は、入力される対象シンボルの取りうる信号レベル
が2値の場合であったが、ここでは、他の処理と併用す
ることによって、多値レベルの信号を符号化できること
を説明する。図13は、多値レベルの符号化をおこなう
ときの二つの方法を模式的に説明する図である。図14
は、符号混在方式による符号化装置のブロック図であ
る。
[Multilevel Encoding Processing] Next, referring to FIG.
It will be described with reference to FIG. 14 and FIG. 14 that the encoding / decoding processing procedure according to the present invention can also be applied to the case where the input symbol has a multi-value level. That is, the procedure described so far is for the case where the signal level that the input target symbol can take is a binary value, but here, the multilevel signal is encoded by being used in combination with other processing. Explain what you can do. FIG. 13 is a diagram schematically illustrating two methods for performing multilevel coding. FIG.
FIG. 3 is a block diagram of an encoding device according to a mixed code system.

【0162】(I)符号混在方式 最初に、符号混在方式の例による符号化復号化方法につ
いて説明する。
(I) Code Mixed Method First, an encoding / decoding method according to an example of the code mixed method will be described.

【0163】この方法は、これまで説明してきた算術符
号とブロック符号とを組み合わせた方法なので、「符号
混在方式」と言うことにした。
Since this method is a method in which the arithmetic code and the block code explained so far are combined, it is called "code mixed method".

【0164】この方法による符号化の場合には、図13
(a)に示されるように、先ず、対象シンボルの取りう
る状態(2以上)を、予測生起確率に基づき優勢と劣勢
の二つのグループに分ける。そして、次に、各々のグル
ープ内でのシンボルの状態の区別をブロック符号で表す
ものである。
In the case of encoding by this method, FIG.
As shown in (a), first, the possible states (2 or more) of the target symbol are divided into two groups, the dominant and the inferior, based on the predicted occurrence probability. Then, next, the distinction of the state of the symbol in each group is represented by a block code.

【0165】すなわち、この方法によれば、一つのシン
ボルに対応した符号語は、優勢と劣勢を区別するための
算術符号に基づく符号語と、各グループ内のシンボルを
区別するためのブロック符号に基づく符号語の2種類の
組み合わせとなる。
That is, according to this method, the code word corresponding to one symbol is divided into a code word based on an arithmetic code for distinguishing between superiority and inferiority and a block code for distinguishing symbols in each group. There are two types of combinations of code words based on each other.

【0166】算術符号とブロック符号を結合するときに
は、例えば、符号レジスタに算術符号があるときには、
それを必要分だけ、左シフトさせて、ブロック符号をシ
フトさせた領域に符号語に付加すれば良い。あるいは、
符号レジスタのビットシフトを伴わずに複数のブロック
符号を付加する場合には、順番に接続していくことにな
る。このようにして、算術符号に基づく符号語とブロッ
ク符号を混在した符号語を作ることができる。
When an arithmetic code and a block code are combined, for example, when the code register has an arithmetic code,
It suffices to shift it by the required amount to the left and add it to the code word in the shifted area of the block code. Alternatively,
When a plurality of block codes are added without bit shift of the code register, they are connected in order. In this way, it is possible to create a codeword in which the codeword based on the arithmetic code and the block code are mixed.

【0167】また逆に、復号側では、一つのシンボルに
対応した2種類の符号語、すなわち、算術符号に基づく
符号語と引き続くブロック符号を解析する。
On the contrary, on the decoding side, two types of code words corresponding to one symbol, that is, a code word based on an arithmetic code and a subsequent block code are analyzed.

【0168】なお、ここで、上記グループ分けの方法の
一例として、優勢グループには一つの状態のみを割り当
て、残りの状態は全て劣勢グループに割り当てることが
できる。例えば、図13(a)の場合で、s1のみを優
勢グループにして、s2〜sKを劣性グループとして場
合分けするときである。
Here, as an example of the above grouping method, it is possible to assign only one state to the dominant group and assign all the remaining states to the inferior group. For example, in the case of FIG. 13A, only s1 is a dominant group and s2 to sK are recessive groups.

【0169】この場合においては、優勢グループはシン
ボル状態を区別する必要はないので、劣勢グループのみ
にブロック符号を作成し、算術符号に基づく符号語とブ
ロック符号を混在した符号語を作ることができる。
In this case, since it is not necessary for the dominant group to distinguish the symbol states, it is possible to create the block code only in the inferior group and to create the code word in which the code word based on the arithmetic code and the block code are mixed. .

【0170】この符号混在方式による符号化装置の構成
を示せば、図14に示す如くになる。
FIG. 14 shows the structure of the coding apparatus based on this code mixing method.

【0171】すなわち、算術符号に基づく符号語とブロ
ック符号に基づく符号語を格納するバッファメモリを別
々に用意する。そして、両者の符号語を接続するビット
位置を表す位置情報を蓄積しておき、これらのメモリか
ら両者の符号語を出力するときに、この位置情報を用い
て両者の符号語の組み合わせ処理をおこななうことで一
つの符号列を出力することができる。
That is, a buffer memory for storing a code word based on the arithmetic code and a code memory based on the block code is separately prepared. Then, position information indicating the bit position connecting both codewords is stored, and when the codewords of both are output from these memories, the combination process of both codewords is performed using this position information. By doing so, one code string can be output.

【0172】また、算術符号に基づく符号語とブロック
符号に基づく符号語の組み合わせのテーブルを、予め全
て作成しておき、これを符号化復号化のための符号テー
ブルとしておくことで、生起した状態に基づき、この符
号テーブル検索することで、高速に符号語に変換するこ
ともできる。
In addition, a table of combinations of code words based on arithmetic codes and code words based on block codes is created in advance, and this table is used as a code table for encoding / decoding. It is also possible to convert to a code word at a high speed by searching this code table based on.

【0173】(II)トリー展開方式 このトリー展開方式においては、図13(b)に示され
るように対象シンボルの取りうる状態(2以上)を2分
岐トリーに展開して、各分岐ノード●に分かれるとき
に、シンボルの「0」、「1」を対応させる。このよう
にすれば、多値の状態が、2値のシンボルにマッピング
できることになる。そして、この各分岐点で予測生起確
率を求めながら、枝に至るまで繰り返し、これまで述べ
てきた算術符号に基づき符号化をおこなうことで、一つ
のシンボルに対応した符号語を作ることができる。な
お、2分岐トリーのルートから枝までの分岐の数は、全
てのシンボル状態に均一であっても不均一であっても良
い。
(II) Tree expansion method In this tree expansion method, as shown in FIG. 13B, the states (2 or more) that the target symbol can take are expanded into two branch trees, and each branch node ●. When dividing, the symbols "0" and "1" are made to correspond. By doing so, the multi-valued state can be mapped to the binary symbol. Then, while obtaining the predicted occurrence probability at each branch point, the process is repeated until reaching the branch, and encoding is performed based on the arithmetic code described so far, whereby a code word corresponding to one symbol can be created. Note that the number of branches from the root of the two-branch tree to the branches may be uniform or non-uniform in all symbol states.

【0174】〔本発明の符号化復号化方法の具体的応用
例〕最後に、図15ないし図18を用いて、本発明に係
る符号化復号化方法が、具体的にどのようなシステムに
応用されるかについて説明する。図15は、静止画像の
画像データを符号化する場合に、予測生起確率の求め方
を示す模式図である。図16は、画像のサブサンプリン
グと予測生起確率の関係と、複数のプレーンを持つ場合
の符号化の順序を説明するための模式図である。図17
は、波形信号の符号化処理、線画情報の符号化処理の方
を説明するための模式図である。図18は、符号化処理
装置の基本構成とマルチメディアの符号化処理装置の基
本構成を対比して示した模式図である。
[Specific Application Example of Encoding / Decoding Method of the Present Invention] Finally, the encoding / decoding method of the present invention is specifically applied to any system with reference to FIGS. 15 to 18. Explain what is done. FIG. 15 is a schematic diagram showing how to calculate the predicted occurrence probability when the image data of a still image is encoded. FIG. 16 is a schematic diagram for explaining the relationship between image subsampling and predicted occurrence probabilities, and the order of encoding when there are multiple planes. FIG.
[Fig. 3] is a schematic diagram for explaining one of a waveform signal coding process and a line drawing information coding process. FIG. 18 is a schematic diagram showing the basic configuration of the encoding processing device and the basic configuration of the multimedia encoding processing device in comparison.

【0175】(I)静止画像 静止画像に限らず、一般に、画像データは、画素の集合
として表される。
(I) Still Image Not limited to a still image, image data is generally represented as a set of pixels.

【0176】このときの生起確率の予測方法の一例につ
いて説明しよう。
An example of a method of predicting the occurrence probability at this time will be described.

【0177】例えば、符号化対象とする注目画素に隣接
し、既に符号化処理の終了した画素の信号値を参照画素
として用いることで、注目画素の信号値を予測すること
ができる。本発明は、予測の方法、装置構成に依存する
ものではないが、図15を用いて、画像データの生起確
率の予測方法の有力な方法として説明しておこう。
For example, the signal value of the pixel of interest can be predicted by using the signal value of the pixel adjacent to the pixel of interest to be coded and for which the encoding process has already been completed as the reference pixel. The present invention does not depend on the prediction method and device configuration, but will be described as a powerful method of predicting the occurrence probability of image data with reference to FIG.

【0178】図15(a)に示すように、参照画素をY
A、YB、YCとし、注目画素をYとして、それぞれ0と1の
2値レベルを取るものとする。
As shown in FIG. 15A, the reference pixel is set to Y.
It is assumed that A, YB, and YC are set, the target pixel is set to Y, and binary levels of 0 and 1 are taken.

【0179】注目画素Yの信号レベルは、隣接する参照
画素の信号レベルと関連があることから、あらかじめY
A、YB、YCと、Yの信号レベルの出現頻度を、一般的な画
像を対象として統計にまとめる。こうして、図15
(b)に示されるように、三つの参照画素の取りうる8
個の状態における注目画素の信号レベル(0あるいは
1)の生起確率を設定できる。この結果を用いて、実際
の画像データの符号化処理において、参照画素を用い
て、注目画素の生起確率を予測することができる。
Since the signal level of the target pixel Y is related to the signal level of the adjacent reference pixel, Y
The appearance frequencies of the signal levels of A, YB, YC and Y are summarized in statistics for general images. Thus, FIG.
As shown in (b), three reference pixels can take 8
The occurrence probability of the signal level (0 or 1) of the pixel of interest in each state can be set. Using this result, the occurrence probability of the pixel of interest can be predicted using the reference pixel in the actual encoding process of the image data.

【0180】本発明の符号化復号化方法は、当然のこと
ながら、この例における参照画素の設定個数、設定場所
を限定するものではなく、また、参照画素の設定個数、
設定場所を適応的に可変させることもできる。
Naturally, the encoding / decoding method of the present invention does not limit the set number of reference pixels and the set place in this example, and the set number of reference pixels
The setting location can be changed adaptively.

【0181】また、一画素あたり多値レベルをとる濃淡
画像の符号化処理は、その信号を2値レベルの信号に変
換することで、前記本発明の符号化復号化手順を適用す
ることができる。例えば、多値レベルの信号をバイナリ
コード、グレイコード等で表し、ビットプレーン毎にス
キャンをおこなって、各画素2値レベルの信号になった
ものに、本発明の符号化復号化方法を適用することで効
率の良い符号化処理を実現することができる。ここで、
図16(b)は、ビットプレーンを符号化するときの順
序の一例を示した図である。
Further, in the encoding processing of a grayscale image having a multi-valued level per pixel, the encoding / decoding procedure of the present invention can be applied by converting the signal into a binary level signal. . For example, the encoding / decoding method of the present invention is applied to a multilevel signal represented by a binary code, a gray code, or the like, which is scanned for each bit plane to become a binary level signal for each pixel. As a result, efficient encoding processing can be realized. here,
FIG. 16B is a diagram showing an example of the sequence when encoding the bit plane.

【0182】また、図16(a)に示すように、ビット
プレーン毎に、画素の飛び越しスキャンによるサブサン
プリングをおこななうこともできる。注目画素の周囲に
参照画素を設定することができることから、注目画素の
信号の生起確率を精度高く求めることができ、圧縮率の
向上を実現することができる。サブサンプリングして符
号化したデータは、とびとびの場所から復号されていく
ので、じわじわ絵が浮かびあがるような階層的な復号再
生をおこなうに適しており、画像の検索を効率良く実行
することができる。従って、例えば医用画像のように、
高精細、高階調であり、多種多様の画像検索が容易であ
り、劣化なくデータ保存が必要な場合において、本発明
は有効に利用できる。
Further, as shown in FIG. 16A, sub-sampling can be performed by interlaced scanning of pixels for each bit plane. Since the reference pixels can be set around the target pixel, the occurrence probability of the signal of the target pixel can be obtained with high accuracy, and the compression rate can be improved. The data that is sub-sampled and coded is decoded from different places, so it is suitable for hierarchical decoding and reproduction that makes a picture appear gradually, and it is possible to efficiently search for images. . So, for example, in medical images,
The present invention can be effectively used in the case of high definition, high gradation, easy retrieval of a wide variety of images, and data storage without deterioration.

【0183】また、カラー画像の符号化復号化手順につ
いて説明する。
The encoding / decoding procedure of a color image will be described.

【0184】このようなカラー画像の符号化復号化を定
める勧告としては、ITU-T勧告T.81がある。この勧告に
おいては、入力信号にDCT(離散コサイン変換、Discret
e Cosign Transform)をおこなった後の周波数成分の符
号化処理にハフマン符号を使うことが規定されている。
そして、このハフマン符号の代わりに算術符号を適用す
ることがオプション機能として規定されている。この算
術符号の代わりに、本発明による符号化処理を適用する
ことができる。
ITU-T Recommendation T.81 is given as a recommendation for defining encoding / decoding of such a color image. In this Recommendation, DCT (Discrete Cosine Transform, Discret
It is stipulated that the Huffman code be used for the encoding process of the frequency component after performing the e Cosign Transform.
Applying an arithmetic code instead of the Huffman code is defined as an optional function. Instead of the arithmetic code, the encoding process according to the present invention can be applied.

【0185】一画素あたり複数のカラー信号で表される
カラー画像の符号化処理においても、前記濃淡画像の符
号化処理方法を各色毎に適用することで、同様に効率の
良い符号化処理を実現することができる。この際、各色
の信号の生起確率は、隣接する画素の色信号と、各色を
座標軸とする色空間における信号発生の特異性を利用し
て求めることができる。
Even in the encoding process of a color image represented by a plurality of color signals per pixel, the same efficient encoding process is realized by applying the above-mentioned grayscale image encoding process method for each color. can do. At this time, the occurrence probability of the signal of each color can be obtained by utilizing the color signal of the adjacent pixel and the peculiarity of signal generation in the color space having each color as the coordinate axis.

【0186】(II)動画像 動画像では、同一フレーム内の画素のみならず、画像の
時間軸方向の相関性を利用した信号予測が可能である。
例えば、MPEG(Moving Picture Experts Group)と呼ば
れる動画像符号化方式では、時間的に連続する複数のフ
レーム間で動き予測等の信号処理を行ない、またフレー
ム内でDCT(離散コサイン変換)をおこななって、その
結果を符号語に変換する。
(II) Moving picture In a moving picture, not only pixels in the same frame but also signal prediction utilizing the correlation in the time axis direction of the picture is possible.
For example, in a moving picture coding method called MPEG (Moving Picture Experts Group), signal processing such as motion prediction is performed between a plurality of temporally consecutive frames, and DCT (discrete cosine transform) is performed in each frame. Then, the result is converted into a code word.

【0187】本発明の符号化復号化処理は、このような
信号処理に依存することなく、符号化対象シンボルの生
起確率をあらかじめ予測できる場合に適用できる。
The coding / decoding processing of the present invention can be applied to the case where the occurrence probability of the symbol to be coded can be predicted in advance without depending on such signal processing.

【0188】従来の技術の所の説明でも指摘したよう
に、算術符号に基づく符号化復号化処理装置の問題点の
一つにレイテンシ(復号出力の潜伏)と呼ばれる復号生
成速度の不均一性がある。特に動画像の符号化復号化の
ように実時間処理が要求される場合において、この問題
が重要視される。
As pointed out in the description of the prior art, one of the problems of the encoding / decoding processing device based on arithmetic codes is the non-uniformity of the decoding generation rate called latency (latency of decoded output). is there. This problem is emphasized especially when real-time processing is required such as coding and decoding of moving images.

【0189】本発明は、前記したように、従来方式に比
べて判断に基づく信号処理の分岐回数が少なく、復号出
力の潜伏が、原理的にありえないので、実時間処理が必
要なシステムにおいて、特に有用な技術である。
As described above, according to the present invention, the number of branches of signal processing based on judgment is smaller than that of the conventional method, and latency of decoded output is theoretically impossible. Therefore, the present invention is particularly useful in a system requiring real-time processing. This is a useful technique.

【0190】(III)音声等の波形信号 音声信号は、時間軸方向に1次元で表される信号変化、
すなわち波形信号である。同様な信号として、例えば、
電圧等の電気信号波形、地震等の振動波形、心電図波形
等がある。
(III) Waveform signal of voice, etc. A voice signal is a one-dimensional signal change in the time axis direction,
That is, it is a waveform signal. As a similar signal, for example,
There are electric signal waveforms such as voltage, vibration waveforms such as earthquakes, and electrocardiogram waveforms.

【0191】これらの様な波形信号に対しては、図17
(a)に示すように、サンプリングした信号レベルの差
分値を算出し、過去の信号レベルを参照して差分値の生
起確率を予測し、多値レベルの符号化処理をおこなうこ
とができる。
For such waveform signals as shown in FIG.
As shown in (a), it is possible to calculate the difference value of the sampled signal levels, predict the occurrence probability of the difference value by referring to the past signal levels, and perform the multi-value level encoding process.

【0192】(IV)地図等の線画像 地図画像等を構成する、線図形の効率的な符号化方法を
説明する。一般に線図形は、ベクトルの連続として表現
することができる。この場合における符号化処理の例と
して、図14(b))に示すように線をベクトルに分解
し、ベクトルの取りうる角度範囲をバイナリトリ−で順
次分割して表し、各分割範囲の生起確率を予測すること
で、本発明を容易に利用することができる。
(IV) Line Image of Map etc. [0192] An efficient encoding method of a line figure constituting a map image etc. will be described. In general, a line figure can be expressed as a series of vectors. As an example of the encoding process in this case, a line is decomposed into a vector as shown in FIG. 14B, the angular range that the vector can take is sequentially divided and represented by a binary tree, and the occurrence probability of each divided range is represented. By predicting, the present invention can be easily utilized.

【0193】また、ベクトルは角度と長さの二つの情報
の組み合わせで表される。ここで、角度情報を上記のよ
うに算術符号を用いて符号語に変換し、長さ情報をブロ
ック符号を用いて符号語に変換し、両者を前記の多値レ
ベルの符号化方式と同様に、一つの符号列に混在させる
ことも可能である。
Further, the vector is represented by a combination of two pieces of information of the angle and the length. Here, the angle information is converted into a code word by using the arithmetic code as described above, the length information is converted into a code word by using the block code, and both are converted in the same manner as the above-mentioned multilevel coding method. It is also possible to mix them in one code string.

【0194】(V)復号処理のみを実行する信号処理装
置 例えば、ネットワークからダウンロードした符号化デー
タ、CD-ROMあるいは半導体メモリ等に蓄積された符号化
データを復号して利用するため、復号処理のみを備える
信号処理装置を構成することができる。
(V) Signal processing device for executing only decoding process For example, only decoding process is performed because the coded data downloaded from the network or the coded data stored in the CD-ROM or the semiconductor memory is decoded and used. It is possible to configure a signal processing device including.

【0195】符号化処理を必要としないことから、信号
処理をおこなう部分を本発明の復号処理のみをおこなう
装置のみで構成することができる。
Since the encoding process is not required, the part that performs the signal process can be configured only by the device that performs only the decoding process of the present invention.

【0196】(VI)従来の算術符号に基づく符号化復号
化装置を、本発明の符号化復号化装置に置き換えること 国際標準として規格化されているITU勧告T.81およびT.8
2に基づく符号化復号化装置において、算術符号に基づ
く符号化復号化処理を実行する部分を、本発明の符号化
復号化装置で置き換えることができる。このような符号
化復号化装置の置き換えが容易にできることも、本発明
に係る符号化復号化処理の特長の一つである。
(VI) Replacing the conventional coding / decoding device based on arithmetic codes with the coding / decoding device of the present invention. ITU Recommendations T.81 and T.8 standardized as an international standard.
In the coding / decoding device based on 2, the part that executes the coding / decoding process based on the arithmetic code can be replaced with the coding / decoding device of the present invention. It is also one of the features of the encoding / decoding processing according to the present invention that the encoding / decoding device can be easily replaced.

【0197】(VII)マルチメディアの符号化復号化 昨今、様々なメディアを統合的に扱おうというマルチメ
ディアについて関心が高まってきている。
(VII) Encoding and Decoding of Multimedia Recently, there has been an increasing interest in multimedia in which various media are handled in an integrated manner.

【0198】本発明の符号化復号化方法によっても、様
々なメディアから得られる2値画像、多値画像、カラー
画像、音声信号、線画像等の複数種類の信号源からの信
号を、簡易な装置構成で効率良く符号化復号化処理する
マルチメディアの符号化復号化装置として利用すること
ができる。
Also according to the encoding / decoding method of the present invention, signals from a plurality of types of signal sources such as binary images, multi-valued images, color images, audio signals, line images, etc. obtained from various media can be easily converted. It can be used as a multimedia encoding / decoding device that efficiently performs encoding / decoding with the device configuration.

【0199】すなわち、図18(a)に示されるよう
に、符号化処理は、モデリングと生起確率の予測、符号
生成と概念的に分かれることになるが、モデリングと生
起確率の予測をおこなう部分を複数個、図18(b)に
示すように用意して、マルチメディアの複数種類のそれ
ぞれの信号の特性に基づき、生起確率の予測を並列的に
接続して、符号生成のための手段は共通に動作させるこ
とで実現できる。
That is, as shown in FIG. 18 (a), the encoding process is conceptually divided into modeling, occurrence probability prediction, and code generation. A plurality of units are prepared as shown in FIG. 18B, the prediction of the occurrence probability is connected in parallel based on the characteristics of each signal of a plurality of types of multimedia, and the means for code generation is common. It can be realized by operating the.

【0200】ここで、多値画像、カラー画像、音声信
号、線画像等については、上記したように、サブサンプ
リング、ビットプレ−ン展開、トリー展開等を実行する
ための生起確率の予測手段を用意することができる。
Here, with respect to multi-valued images, color images, audio signals, line images, etc., as described above, means for predicting the occurrence probability for performing subsampling, bit plane expansion, tree expansion, etc. are prepared. can do.

【0201】ここで、図18(b)におけるモデリング
をおこなう装置は、符号化対象シンボルから参照シンボ
ルおよび注目シンボルを組み合わせ、両者の信号特性の
相関関係を求めるための装置であり、符号化対象の複数
の信号源の種類に対応して構成する。ここで、参照シン
ボルを用意するためには、既に信号処理済みのシンボル
を一時的に蓄積するメモリが必要となるが、この目的の
ためには、一つのメモリ装置を共通に利用することがで
きる。
Here, the device for modeling in FIG. 18B is a device for combining a reference symbol and a symbol of interest from a symbol to be coded to obtain a correlation between signal characteristics of both, and Configure according to the types of multiple signal sources. Here, in order to prepare the reference symbols, a memory for temporarily storing the already signal-processed symbols is required, but for this purpose, one memory device can be commonly used. .

【0202】生成した符号語には、信号源の種類を区別
するための符号を付加することができる。また、符号化
の種類を区別するための符号を付加することも可能であ
る。
A code for distinguishing the type of signal source can be added to the generated code word. It is also possible to add a code for distinguishing the type of coding.

【0203】また、複数種類の信号源の符号を、一定の
ルールに基づき多重化することもできるが、本発明の符
号化復号化方法は、多重化の手段に依存するものではな
い。
Further, the codes of a plurality of types of signal sources can be multiplexed based on a certain rule, but the coding / decoding method of the present invention does not depend on the multiplexing means.

【0204】このようにして、いわゆるマルチメデイア
と呼ばれる複数の信号源を組み合わせた、表示装置、蓄
積装置、伝送装置等において本発明を有効に利用するこ
とが期待される。
In this way, it is expected that the present invention can be effectively used in a display device, a storage device, a transmission device, and the like, which are a combination of a plurality of signal sources called so-called multimedia.

【0205】[0205]

【発明の効果】本発明によれば、データを圧縮して符号
とし、また、それを復号するための符号化復号化装置に
おいて、非ブロック符号の持つ圧縮効率の良さを損なわ
ず、しかも、簡単なアルゴリズムにより、符号化復号化
をおこなえる方法であって、複雑な装置も必要とせず、
演算速度の速い符号化復号化をおこなう符号化復号化装
置を提供することができる。
According to the present invention, in a coding / decoding device for compressing data into a code and decoding the data, the compression efficiency of the non-block code is not impaired, and the coding is simple. It is a method that can perform encoding and decoding by various algorithms, and does not require a complicated device,
It is possible to provide an encoding / decoding device that performs encoding / decoding with a high calculation speed.

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

【図1】本発明に係る符号化復号化装置における符号化
方法の基本原理図である。
FIG. 1 is a basic principle diagram of an encoding method in an encoding / decoding device according to the present invention.

【図2】従来の算術符号の生起確率決定の原理と本発明
に係る符号生成の生起確率決定の原理を、対比して示し
た模式図である。
FIG. 2 is a schematic diagram showing a principle of determining a probability of occurrence of a conventional arithmetic code and a principle of determining a probability of occurrence of code generation according to the present invention.

【図3】本発明に係る符号化方法の一例を示す模式図で
ある。
FIG. 3 is a schematic diagram showing an example of an encoding method according to the present invention.

【図4】符号レジスタと符号バッファの内容を時系列に
示した模式図である。
FIG. 4 is a schematic diagram showing the contents of a code register and a code buffer in time series.

【図5】優勢シンボルの符号化の例を示した模式図であ
る。
FIG. 5 is a schematic diagram showing an example of encoding of a dominant symbol.

【図6】本発明に係る符号化処理の手順を示すフローチ
ャートである。
FIG. 6 is a flowchart showing a procedure of an encoding process according to the present invention.

【図7】本発明に係る復号化手順を示すフローチャート
である。
FIG. 7 is a flowchart showing a decoding procedure according to the present invention.

【図8】本発明に係る符号化装置の構成を示すブロック
図である。
FIG. 8 is a block diagram showing a configuration of an encoding device according to the present invention.

【図9】本発明に係る復号化装置の構成のブロック図で
ある。
FIG. 9 is a block diagram of a configuration of a decoding device according to the present invention.

【図10】本発明に係る符号化装置の符号レジスタと符
号バッファとを模式的に示した図である。
FIG. 10 is a diagram schematically showing a code register and a code buffer of the encoding device according to the present invention.

【図11】符号テーブルの模式図である。FIG. 11 is a schematic diagram of a code table.

【図12】符号テーブルを用いた符号化装置および復号
化装置のブロック図である。
FIG. 12 is a block diagram of an encoding device and a decoding device using a code table.

【図13】多値レベルの符号化をおこなうときの二つの
方法を模式的に説明する図である。
[Fig. 13] Fig. 13 is a diagram schematically illustrating two methods for performing multilevel coding.

【図14】符号混在方式による符号化装置のブロック図
である。
[Fig. 14] Fig. 14 is a block diagram of an encoding device according to a mixed code system.

【図15】静止画像の画像データを符号化する場合に、
予測生起確率の求め方を示す模式図である。
FIG. 15 is a diagram showing a case where image data of a still image is encoded,
It is a schematic diagram which shows how to calculate a prediction occurrence probability.

【図16】画像のサブサンプリングと予測生起確率の関
係と、複数のプレーンを持つ場合の符号化の順序を説明
するための模式図である。
[Fig. 16] Fig. 16 is a schematic diagram for explaining a relationship between image subsampling and a predicted occurrence probability, and an encoding order when a plurality of planes are included.

【図17】波形信号の符号化処理、線画情報の符号化処
理の方を説明するための模式図である。
FIG. 17 is a schematic diagram for explaining the encoding process of the waveform signal and the encoding process of the line drawing information.

【図18】符号化処理装置の基本構成とマルチメディア
の符号化処理装置の基本構成を対比して示した模式図で
ある。
FIG. 18 is a schematic diagram showing the basic configuration of the encoding processing device and the basic configuration of the multimedia encoding processing device in comparison.

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 入力信号の符号化とその逆の過程である
復号化をおこなう符号化復号化装置において、 シンボルの生起確率を予測する手段と、 入力信号のシンボルを判別する手段と、 符号レジスタと、 シフト制御手段とを有し、 符号化をおこなうに際して、 前記生起確率を予測する手段によって、入力信号のシン
ボルの生起確率を予測して、 前記入力信号のシンボルを判別する手段によって、前記
生起確率を予測する手段により求まったシンボルの予測
生起確率の内で、大きい方の予測生起確率を持つシンボ
ルを優勢シンボル、小さい方の予測生起確率を持つシン
ボルを劣性シンボルと判別して、 劣性シンボルの生起予測確率を、2のR乗分の1(1/2**
R、Rは、正の整数)で表わして、 前記劣性シンボルが入力されたときには、 その一つの劣性シンボルに対し、 前記シフト制御手段により、前記符号レジスタを上位に
Rビットシフトして、 しかも、下位にR個の0を挿入することを特徴とする符
号化復号化装置。
1. A coding / decoding device for performing coding of an input signal and decoding which is a reverse process of the input signal, means for predicting a probability of occurrence of a symbol, means for discriminating a symbol of an input signal, and a code register. And a shift control means, and when performing the encoding, by the means for predicting the occurrence probability of the input signal, the means for predicting the occurrence probability of the symbol of the input signal, the means for determining the symbol of the input signal, Among the predicted occurrence probabilities of the symbols obtained by the means for predicting the probability, the symbol with the larger predicted occurrence probability is determined to be the dominant symbol, and the symbol with the smaller predicted occurrence probability is determined to be the recessive symbol. Occurrence prediction probability, which is the R-th power of 2 (1/2 **
R and R are represented by positive integers, and when the recessive symbol is input, the shift control means sets the code register to a higher order for one recessive symbol.
An encoding / decoding device characterized by shifting R bits and inserting R zeros in the lower order.
【請求項2】 入力信号の符号化とその逆の過程である
復号化をおこなう符号化復号化装置において、 シンボルの生起確率を予測する手段と、 入力信号のシンボルを判別する手段と、 符号レジスタと、 カウンタとを有し、 符号化をおこなうに際して、 前記生起確率を予測する手段によって、入力信号のシン
ボルの生起確率を予測して、 前記入力信号のシンボルを判別する手段によって、前記
生起確率を予測する手段により求まったシンボルの予測
生起確率の内で、大きい方の予測生起確率を持つシンボ
ルを優勢シンボル、小さい方の予測生起確率を持つシン
ボルを劣性シンボルと判別して、 劣性シンボルの生起予測確率を、2のR乗分の1(1/2**
R、Rは、正の整数)で表わして、 前記優勢シンボルが入力されたときには、 前記カウンタにより、その優勢シンボルの連続生起回数
をカウントし、 そのカウントされた数だけ、前記符号レジスタをインク
レメントすることを特徴とする符号化復号化装置。
2. A coding / decoding device for performing coding of an input signal and decoding which is a reverse process thereof, means for predicting a symbol occurrence probability, means for discriminating a symbol of an input signal, and a code register. And a counter, and at the time of encoding, predicting the occurrence probability of the symbol of the input signal by the means for predicting the occurrence probability, and determining the occurrence probability by the means for determining the symbol of the input signal. Among the predicted occurrence probabilities of the symbols obtained by the predicting means, the symbol with the larger predicted occurrence probability is determined as the dominant symbol, and the symbol with the smaller predicted occurrence probability is determined as the recessive symbol, and the occurrence prediction of the recessive symbol is predicted. Probability is the R-th power of 2 (1/2 **
R and R are represented by positive integers, and when the dominant symbol is input, the counter counts the number of consecutive occurrences of the dominant symbol and increments the code register by the counted number. An encoding / decoding device characterized by:
【請求項3】 請求項1および請求項2記載の符号化復
号化装置の機能を持つ符号化復号化装置において、 符号化をおこなうに際して、 前記劣性シンボルが入力されたときに、請求項1記載の
ようにして、符号レジスタ上に生成したR個の0から成
る第一の符号語と、 前記優勢シンボルが入力されたときに、請求項2記載の
ようにして、符号レジスタをインクレメントして生成さ
れた第二の符号語とを生成し、 前記第一の符号語と前記第二の符号語とを合成して、符
号を生成することを特徴する符号化復号化装置。
3. The coding / decoding device having the functions of the coding / decoding device according to claim 1, wherein, when performing the coding, when the recessive symbol is input, When the first codeword consisting of R 0s generated on the code register and the dominant symbol are input, the code register is incremented as described in claim 2. An encoding / decoding device, which generates a generated second codeword and combines the first codeword and the second codeword to generate a code.
【請求項4】 入力信号の符号化とその逆の過程である
復号化をおこなう符号化復号化装置において、 シンボルの生起確率を予測する手段と、 入力信号のシンボルを判別する手段と、 符号レジスタと、 シフト制御手段と、 カウンタとを有し、 符号化をおこなうに際して、 前記生起確率を予測する手段によって、入力信号のシン
ボルの生起確率を予測して、 前記入力信号のシンボルを判別する手段によって、前記
生起確率を予測する手段により求まったシンボルの予測
生起確率の内で、大きい方の予測生起確率を持つシンボ
ルを優勢シンボル、小さい方の予測生起確率を持つシン
ボルを劣性シンボルと判別して、 劣性シンボルの生起予測確率を、2のR乗分の1(1/2**
R、Rは、正の整数)で表わして、 前記劣性シンボルが入力されたときには、 その一つの劣性シンボルに対し、 前記シフト制御手段により、前記符号レジスタを上位に
Rビットシフトして、 しかも、下位にR個の0を挿入して、 前記優勢シンボルが入力されたときには、 前記カウンタにより、その優勢シンボルの連続生起回数
をカウントし、 そのカウントされた数だけ、前記符号レジスタの下位の
R個の0をインクレメントして、 このように入力信号を、一つの劣性シンボルと0個以上
の優勢シンボルとを一組として、前記符号レジスタ上で
符号化していくことを特徴とする符号化復号化装置。
4. A coding / decoding device for performing coding of an input signal and decoding which is the reverse process, means for predicting a probability of occurrence of a symbol, means for discriminating a symbol of an input signal, and a code register. A shift control means, a counter, and when performing encoding, by means for predicting the occurrence probability of the input signal, by means for predicting the occurrence probability of the symbol of the input signal, and by means for determining the symbol of the input signal Among the predicted occurrence probabilities of the symbols obtained by the means for predicting the occurrence probability, a symbol having a larger predicted occurrence probability is determined as a dominant symbol, and a symbol having a smaller predicted occurrence probability is determined as a recessive symbol, The probability of occurrence of a recessive symbol is calculated by dividing the R power of 2 by 1 (1/2 **
R and R are represented by positive integers, and when the recessive symbol is input, the shift control means sets the code register to a higher order for one recessive symbol.
When the R number is shifted by R bits and the R zeros are inserted in the lower order and the dominant symbol is input, the counter counts the number of consecutive occurrences of the dominant symbol, and only the counted number is generated. The lower part of the sign register
Encoding R number of 0s and encoding the input signal on the code register in this way, with one recessive symbol and zero or more dominant symbols as a set. Decoding device.
【請求項5】 前記入力される優勢シンボルの連続生起
回数をNとし、 かつ、劣性シンボルの生起予測確率が、2のR乗分の1(1
/2**R、Rは、正の整数)で表わされているときに、 (2**R-1)>Nであれば、劣性シンボルの符号語として生成
される前記符号レジスタ上のR個の0をNだけ、インクレ
メントし、 (2**R-1)≦Nであれば、劣性シンボルの符号語として生
成される前記符号レジスタ上のR個の0を全て1にし
て、a=N-(2**R-1)を意味する符号語を生成して、これ
らを結合し、 前記劣性シンボルの符号語と前記優勢シンボルの符号語
を合成した符号語とすることを特徴とする請求項3およ
び請求項4記載のいずれかの符号化復号化装置。
5. The number of consecutive occurrences of the input dominant symbol is N, and the occurrence prediction probability of a recessive symbol is 1 (1
/ 2 ** R, R is a positive integer), and if (2 ** R-1)> N, it is generated as a codeword of a recessive symbol on the code register. Increment R 0s by N, and if (2 ** R-1) ≤ N, set all 0s on the code register generated as codewords of recessive symbols to 1, A code word that means a = N- (2 ** R-1) is generated, these are combined, and a code word is generated by combining the code word of the recessive symbol and the code word of the dominant symbol. The encoding / decoding device according to any one of claims 3 and 4.
【請求項6】 前記a=N-(2**R-1)を意味する符号語
が、前記R個づつからなる連続したブロックで構成さ
れ、最後のブロック以外は、全てのビットが1からなる
ことを特徴とする請求項5記載の符号化復号化装置。
6. The code word meaning a = N- (2 ** R-1) is composed of a continuous block consisting of the R number, and all bits are from 1 except for the last block. The encoding / decoding device according to claim 5, wherein
【請求項7】 プロセッサと、 メモリとを有し、 前記符号レジスタが、プロセッサ内にあるレジスタであ
って、 前記優勢シンボルまたは劣性シンボルを、このレジスタ
上で符号化していく手順を、 前記メモリに蓄えられたプログラムに従って、 前記プロセッサが実行していくことを特徴とする請求項
1ないし請求項6記載のいずれかの符号化復号化装置。
7. A processor having a processor and a memory, wherein the code register is a register in the processor, and a procedure for coding the dominant symbol or the recessive symbol on the register is stored in the memory. The encoding / decoding device according to any one of claims 1 to 6, wherein the processor executes the program in accordance with a stored program.
【請求項8】 請求項3または請求項4記載のようにし
て、一つの劣性シンボルと0個以上の優勢シンボルとを
一組として、符号レジスタ上の下位に生成される符号語
を、予め作成しておき、 前記一つの劣性シンボルと、0個以上の優勢シンボル
と、それと対応する前記符号語とを一つの項目としたテ
ーブルを備え、 このテーブルによって、入力される信号を一つの劣性シ
ンボルと0個以上の優勢シンボルとを一組として、対応
する符号語を検索し、符号化していくことを特徴とする
符号化復号化装置。
8. The code word generated in the lower order on the code register is preliminarily created with one recessive symbol and zero or more dominant symbols as a set as set forth in claim 3 or claim 4. It should be noted that a table having the one recessive symbol, zero or more dominant symbols, and the corresponding codeword as one item is provided, and an input signal is treated as one recessive symbol by this table. An encoding / decoding device, characterized in that a set of zero or more dominant symbols is searched for corresponding codewords and encoded.
【請求項9】 入力信号が複数の状態を取りうるシンボ
ルから構成される場合であって、 前記予測生起確率手段によって予測される予測生起確率
に基づき、それらのシンボルの取りうる状態を優勢グル
ープおよび劣勢グループの二つのグループに分け、 前記劣性グループの状態が入力されたときは、請求項1
記載の劣性シンボルが入力されたときのように処理を
し、 前記優勢グループの状態が入力されたときは、請求項2
記載の優勢シンボルが入力されたときのように処理を
し、 請求項3記載のように前記第一の符号語と前記第二の符
号語とを合成して、一組の符号語として、 また、そのシンボルが、属する前記グループ内のシンボ
ルの状態を特定する符号語をブロック符号を用いて作成
し、 前記第一の符号語と前記第二の符号語とが合成された一
組の符号語と、そのシンボルが、属する前記グループ内
のシンボルの状態を特定する符号語との結合が、この入
力信号のとりうる状態の符号語とすることを特徴とする
請求項3ないし請求項8記載のいずれかの符号化復号化
装置。
9. A case where an input signal is composed of symbols that can take a plurality of states, and states that the symbols can take are determined by a dominant group based on the predicted occurrence probability predicted by the prediction occurrence probability means. It divides into two groups of a recessive group, When the state of the recessive group is input,
The processing is performed as when the recessive symbol described in the above is input, and when the state of the dominant group is input,
The processing is performed as when the above-described dominant symbol is input, and the first code word and the second code word are combined as described in claim 3 to form a set of code words, and , A symbol is created by using a block code to specify a state of a symbol in the group to which the symbol belongs, and a set of code words in which the first code word and the second code word are combined. 9. The combination of a code word with a code word that specifies the status of a symbol in the group to which the symbol belongs belongs to a code word that can take the input signal. Any encoding / decoding device.
【請求項10】 入力信号が複数の信号特性を有する場
合であって、この各々の信号特性に対応した複数の生起
確率予測手段を備えることを特徴とする請求項1ないし
請求項9記載のいずれかの符号化復号化装置。
10. The method according to claim 1, wherein when the input signal has a plurality of signal characteristics, a plurality of occurrence probability predicting means corresponding to the respective signal characteristics are provided. The encoding / decoding device.
【請求項11】 入力信号の符号化とその逆の過程であ
る復号化をおこなう符号化方法において、 符号化装置が、 シンボルの生起確率を予測する手段と、 入力信号のシンボルを判別する手段と、 符号レジスタと、 シフト制御手段と、 カウンタとを有し、 前記生起確率を予測する手段により求まったシンボルの
予測生起確率の内で、大きい方の予測生起確率を持つシ
ンボルを優勢シンボル、小さい方の予測生起確率を持つ
シンボルを劣性シンボルとして、 前記シンボルの生起確率を予測する手段によって求まる
シンボルの予測生起確率の内で、大きい方のシンボルを
優勢シンボル、小さい方のシンボルを劣性シンボルとし
たときに、 劣性シンボルの生起予測確率を、2のR乗分の1(1/2**
R、Rは、正の整数)で表わして、(1)前記生起確率を
予測する手段によって、入力信号のシンボルの生起確率
を予測する手順、(2)前記入力信号のシンボルを判別
する手段によって、前記入力信号を優勢シンボルと劣性
シンボルとに判別する手順、(3)前記劣性シンボルを
入力する手順、(4)その一つの劣性シンボルに対し、
前記シフト制御手段により、前記符号レジスタを上位に
Rビットシフトして、しかも、下位にR個の0を挿入した
第一の符号語を生成する手順、(5)前記優勢シンボル
を入力する手順、(6)前記カウンタにより、その優勢
シンボルの連続生起回数をカウントし、 そのカウントされた数だけ、前記符号レジスタをインク
レメントして第二の符号語を生成する手順、(7)前記
第一の符号語と前記第二の符号語を合成する手順を有
し、 前記(1)ないし前記(7)の手順をこの順に繰返しお
こなって、入力信号を、一つの劣性シンボルと0個以上
の優勢シンボルとを一組として、符号語を生成していく
ことを特徴とする符号化方法。
11. An encoding method for performing encoding of an input signal and decoding which is a reverse process thereof, wherein an encoding device predicts a probability of occurrence of a symbol, and a device that determines a symbol of an input signal. , A code register, a shift control means, and a counter, among the predicted occurrence probabilities of the symbols obtained by the means for predicting the occurrence probability, the symbol having the larger predicted occurrence probability is the dominant symbol and the smaller one. When the symbol having the predicted occurrence probability of is a recessive symbol and the predicted occurrence probability of the symbol obtained by the means for predicting the occurrence probability of the symbol is the larger symbol as the dominant symbol and the smaller symbol as the recessive symbol. Then, the probability of occurrence of recessive symbols is calculated by dividing the R power of 2 by 1 (1/2 **
R and R are represented by positive integers, and (1) by the means for predicting the occurrence probability, the procedure for predicting the occurrence probability of the symbol of the input signal, (2) by the means for determining the symbol of the input signal. , A procedure for discriminating the input signal into a dominant symbol and a recessive symbol, (3) a procedure for inputting the recessive symbol, (4) for one recessive symbol,
By the shift control means, the code register
R bit-shifted, and further, generating a first codeword in which R 0s are inserted in the lower order, (5) inputting the dominant symbol, (6) continuation of the dominant symbol by the counter A procedure of counting the number of occurrences and incrementing the code register to generate a second code word by the counted number, (7) combining the first code word and the second code word The above procedure (1) to (7) is repeated in this order to generate a code word by using one recessive symbol and zero or more dominant symbols as a set as an input signal. An encoding method characterized by going.
【請求項12】 入力信号の符号化とその逆の過程であ
る復号化をおこなう符号化方法において、 符号化装置が、 シンボルの生起確率を予測する手段と、 入力信号のシンボルを判別する手段と、 符号レジスタと、 シフト制御手段と、 カウンタとを有し、 前記生起確率を予測する手段により求まったシンボルの
予測生起確率の内で、大きい方の予測生起確率を持つシ
ンボルを優勢シンボル、小さい方の予測生起確率を持つ
シンボルを劣性シンボルとして、 前記シンボルの生起確率を予測する手段によって求まる
シンボルの予測生起確率の内で、大きい方のシンボルを
優勢シンボル、小さい方のシンボルを劣性シンボルとし
たときに、 劣性シンボルの生起予測確率を、2のR乗分の1(1/2**
R、Rは、正の整数)で表わして、(1)前記生起確率を
予測する手段によって、入力信号のシンボルの生起確率
を予測する手順、(2)前記入力信号のシンボルを判別
する手段によって、前記入力信号を優勢シンボルと劣性
シンボルとに判別する手順、(3)前記劣性シンボルを
入力する手順、(4)´その一つの劣性シンボルに対
し、前記シフト制御手段により、前記符号レジスタを上
位にRビットシフトして、しかも、下位にR個の0を挿入
する手順、(5)前記優勢シンボルを入力する手順、
(6)´前記カウンタにより、その優勢シンボルの連続
生起回数をカウントし、そのカウントされた数だけ、前
記符号レジスタの下位のR個をインクレメントする手順
を有し、 前記(1)ないし(3)、(4)´、(5)、(6)´
の手順をこの順に繰返しおこなって、入力信号を、一つ
の劣性シンボルと0個以上の優勢シンボルとを一組とし
て、前記符号レジスタ上で符号化していくことを特徴と
する符号化方法。
12. An encoding method for performing encoding of an input signal and decoding, which is the reverse process, wherein an encoding device predicts a probability of occurrence of a symbol, and means for determining a symbol of an input signal. , A code register, a shift control means, and a counter, among the predicted occurrence probabilities of the symbols obtained by the means for predicting the occurrence probability, the symbol having the larger predicted occurrence probability is the dominant symbol and the smaller one. When the symbol having the predicted occurrence probability of is a recessive symbol and the predicted occurrence probability of the symbol obtained by the means for predicting the occurrence probability of the symbol is the larger symbol as the dominant symbol and the smaller symbol as the recessive symbol. Then, the probability of occurrence of recessive symbols is calculated by dividing the R power of 2 by 1 (1/2 **
R and R are represented by positive integers, and (1) by the means for predicting the occurrence probability, the procedure for predicting the occurrence probability of the symbol of the input signal, (2) by the means for determining the symbol of the input signal. , A step of discriminating the input signal into a dominant symbol and a recessive symbol, (3) a step of inputting the recessive symbol, (4) 'with respect to the one recessive symbol, the shift control means sets the code register to a higher order. R bits are shifted to, and R number of 0s are inserted in the lower order, (5) The above-mentioned dominant symbol is input,
(6) ′ The counter has a procedure of counting the number of consecutive occurrences of the dominant symbol and incrementing the lower R number of the code register by the counted number. ), (4) ', (5), (6)'
The coding method is characterized in that the above procedure is repeated in this order, and the input signal is coded on the code register as a set of one recessive symbol and zero or more dominant symbols.
【請求項13】 前記符号化していくときの優勢シンボ
ルの連続生起回数をNとし、 かつ、劣性シンボルの生起予測確率が、2のR乗分の1(1
/2**R、Rは、正の整数)で表わされているときに、(2**R
-1)>Nであれば、劣性シンボルの符号語として生成され
る前記符号レジスタのR個の0をNだけ、インクレメント
し、 (2**R-1)≦Nであれば、劣性シンボルの符号語として生
成される前記符号レジスタの下位のR個の0を全て1に
して、a=N-(2**R-1)を意味する符号語を生成して、こ
れらを結合する手順を(O)としたときに、 請求項11記載の(6)、(7)の手順をこの手順
(O)で置き換えるか、 または、請求項12記載の(6)´をこの手順(O)で
置き換えることを特徴とする請求項11および請求項1
2記載のいずれかの符号化方法。
13. The number of consecutive occurrences of a dominant symbol at the time of encoding is N, and the probability of occurrence of a recessive symbol is 1 (1
/ 2 ** R, R is a positive integer)
If -1)> N, increment the R 0s of the code register generated as codewords of the recessive symbol by N, and if (2 ** R-1) ≤N, A procedure for generating a code word meaning a = N- (2 ** R-1) by setting all the lower R 0s of the code register generated as the code word of 1 to 1, and combining these. Is defined as (O), the procedure of (6) and (7) described in claim 11 is replaced with this procedure (O), or (6) ′ of claim 12 is defined as this procedure (O). 11. The method according to claim 11 and claim 1, wherein
2. The encoding method according to any one of 2 above.
【請求項14】 前記a=N-(2**R-1)を意味する符号語
が、前記R個づつからなる連続したブロックで構成さ
れ、最後のブロック以外は、全てのビットが1からなる
ことを特徴とする請求項13記載の符号化方法。
14. The code word meaning a = N- (2 ** R-1) is composed of consecutive blocks of R each, and all bits are 1 to 1 except for the last block. The encoding method according to claim 13, wherein
【請求項15】 請求項11ないし請求項14記載のよ
うにして生成される劣性シンボルの符号語と優勢シンボ
ルの符号語を合成した符号語を、予め作成しておき、 前記一つの劣性シンボルと、0個以上の優勢シンボル
と、それと対応する合成した符号語とを一つの項目とし
たテーブルを備え、 このテーブルによって、入力される信号を一つの劣性シ
ンボルと0個以上の優勢シンボルとを一組として、対応
する符号語を検索する手順を(T)としたときに、 請求項11記載の(1)ないし(3)、(5)の手順に
おいて、 (1)ないし(3)、(5)、(T)の手順をこの順に
繰り返して、符号化していくことを特徴とする符号化方
法。
15. A code word, which is a combination of a code word of a recessive symbol and a code word of a dominant symbol, generated in accordance with claim 11, is created in advance, and the code word of the one recessive symbol is generated. , A table in which 0 or more dominant symbols and the corresponding codewords corresponding thereto are set as one item is used, and by this table, an input signal is classified into one recessive symbol and 0 or more dominant symbols. 12. When the procedure for searching the corresponding codewords as a set is (T), in the procedures (1) to (3) and (5) according to claim 11, (1) to (3), (5) ) And (T) are repeated in this order to perform encoding.
【請求項16】 入力信号が複数の状態を取りうるシン
ボルから構成される場合であって、 前記予測生起確率手段によって予測される予測生起確率
に基づき、それらのシンボルの取りうる状態を優勢グル
ープおよび劣勢グループの二つのグループに分け、 そのシンボルが、属する前記グループ内のシンボルの状
態を特定する符号語をブロック符号を用いて作成する手
順を(B)、 一つの劣性グループと0個以上の優勢グループとを一組
として、前記符号レジスタ上で符号化された符号語と、
そのシンボルが、属する前記グループ内のシンボルの状
態を特定する符号語との結合する手順を(C)としたと
きに、 請求項11記載の(1)ないし(6)の手順で、前記優
勢シンボルを前記優勢グループと、前記劣性シンボルを
前記劣性グループと読み替えて、劣性グループの符号語
と優勢グループの符号語を合成した符号語を生成する処
理をおこない、その後に、(B)、(C)をこの順にお
こない、 これら一連の処理を繰返して、符号化していくことを特
徴とする符号化方法。
16. A case where an input signal is composed of symbols that can take a plurality of states, and states that the symbols can take are determined by a dominant group based on the predicted occurrence probability predicted by the prediction occurrence probability means. (B) a procedure of creating a codeword that identifies a state of a symbol in the group to which the symbol belongs by dividing it into two groups of inferior groups (B), one recessive group and zero or more superior groups A group and a code word encoded on the code register as a set,
12. The procedure of (1) to (6) according to claim 11, wherein when the procedure of combining the symbol with a codeword that specifies the state of the symbol in the group to which the symbol belongs is (C). Is read as the dominant group and the recessive symbol is read as the recessive group, and a process of generating a code word in which the code word of the recessive group and the code word of the dominant group are combined is performed, and then (B) and (C). Is performed in this order, and a series of these processes is repeated to perform encoding.
JP18509295A 1995-07-21 1995-07-21 Encoding / decoding apparatus and encoding method used therefor Pending JPH0936749A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18509295A JPH0936749A (en) 1995-07-21 1995-07-21 Encoding / decoding apparatus and encoding method used therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18509295A JPH0936749A (en) 1995-07-21 1995-07-21 Encoding / decoding apparatus and encoding method used therefor

Publications (1)

Publication Number Publication Date
JPH0936749A true JPH0936749A (en) 1997-02-07

Family

ID=16164709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18509295A Pending JPH0936749A (en) 1995-07-21 1995-07-21 Encoding / decoding apparatus and encoding method used therefor

Country Status (1)

Country Link
JP (1) JPH0936749A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008032589A1 (en) * 2006-09-11 2008-03-20 Olympus Corporation Imaging device, image processing device, imaging system, and image processing program
US8593662B2 (en) 2006-06-29 2013-11-26 Ricoh Company, Ltd. Compound image-forming method and compound image-forming apparatus
CN107565974A (en) * 2017-08-14 2018-01-09 同济大学 A kind of parallel full coding implementation method of static Huffman
CN107623524A (en) * 2017-07-01 2018-01-23 中山大学 A hardware-based Huffman encoding method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8593662B2 (en) 2006-06-29 2013-11-26 Ricoh Company, Ltd. Compound image-forming method and compound image-forming apparatus
WO2008032589A1 (en) * 2006-09-11 2008-03-20 Olympus Corporation Imaging device, image processing device, imaging system, and image processing program
US8203613B2 (en) 2006-09-11 2012-06-19 Olympus Corporation Image acquisition apparatus, image processing apparatus, image acquisition system, and image processing program
CN107623524A (en) * 2017-07-01 2018-01-23 中山大学 A hardware-based Huffman encoding method and system
CN107565974A (en) * 2017-08-14 2018-01-09 同济大学 A kind of parallel full coding implementation method of static Huffman
CN107565974B (en) * 2017-08-14 2020-06-12 同济大学 A Static Huffman Parallel Full Coding Implementation Method

Similar Documents

Publication Publication Date Title
RU2125765C1 (en) Symbol compression method and device, statistical coder (options)
US5045852A (en) Dynamic model selection during data compression
JP3978478B2 (en) Apparatus and method for performing fixed-speed block-unit image compression with estimated pixel values
US6014095A (en) Variable length encoding system
US6677869B2 (en) Arithmetic coding apparatus and image processing apparatus
US5818877A (en) Method for reducing storage requirements for grouped data values
US4903317A (en) Image processing apparatus
US6373412B1 (en) Fast JPEG huffman encoding and decoding
US6292114B1 (en) Efficient memory mapping of a huffman coded list suitable for bit-serial decoding
US5696507A (en) Method and apparatus for decoding variable length code
KR100241792B1 (en) Method and apparatus for encoding and decoding image data
KR0167092B1 (en) Method and apparatus for statistically encoding digital data
WO1995014350A1 (en) Quadtree-structured walsh transform coding
US4870695A (en) Compression and de-compression of column-interlaced, row-interlaced graylevel digital images
US5857036A (en) System and method for the fractal encoding of datastreams
EP1627345A2 (en) Fast loss less image compression system based on neighborhood comparisons
US7277585B2 (en) Image encoding method, image encoding apparatus and storage medium
US4967196A (en) Apparatus for decoding variable-length encoded data
US6055273A (en) Data encoding and decoding method and device of a multiple-valued information source
JPH0936749A (en) Encoding / decoding apparatus and encoding method used therefor
JPH04343576A (en) High-efficiency encoding method and high-efficiency code decoding method
JPH0918350A (en) Encoding / decoding device and encoding / decoding method
KR100207428B1 (en) An apparatus and method for fast variable length decoding adaptive to Huffman code conversion
JP3407588B2 (en) Encoding / decoding device
JP2934603B2 (en) Method and apparatus for decoding variable length code