JPH10126276A - Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder - Google Patents

Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder

Info

Publication number
JPH10126276A
JPH10126276A JP9237499A JP23749997A JPH10126276A JP H10126276 A JPH10126276 A JP H10126276A JP 9237499 A JP9237499 A JP 9237499A JP 23749997 A JP23749997 A JP 23749997A JP H10126276 A JPH10126276 A JP H10126276A
Authority
JP
Japan
Prior art keywords
prediction
bit
symbol
input
bits
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.)
Withdrawn
Application number
JP9237499A
Other languages
Japanese (ja)
Inventor
Masaichi Isomura
政一 礒村
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP9237499A priority Critical patent/JPH10126276A/en
Publication of JPH10126276A publication Critical patent/JPH10126276A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To attain coding and decoding efficiency similar to that by an arithmetic coding system and to improve considerably coding and decoding speed. SOLUTION: The method is made up of a prediction-setting process, in which multi-value information source is divided into bit planes or level planes, and either of '0' or '1' of each plane is used for a superior symbol, n-sets of consecutive symbols are predicted and the value (n) is set as a predicted bit number run, a prediction result output process where either '0' or '1' signal is outputted as a prediction hit signal when the prediction of a noted series is hit, a succeeding bit string is coded, and the other signal is outputted as a blank signal when the prediction is not hit. A similar prediction-setting process and a similar prediction output process are recursively repeated by using a new reduced prediction bit number smaller than the value (n), when the prediction is not hit for a prescribed number of times. When the prediction bit, a similar prediction setting process and a similar prediction output process are repeated by using a new increased prediction bit number. Furthermore, in the case of decoding, similar algorithm is applied to decoding.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、多値情報源を圧縮
するデータ符号化方法およびデータ符号化装置ならびに
圧縮された多値情報源のデータを伸長するデータ復号化
方法およびデータ復号化装置に関する。さらに、詳細に
述べれば、多値情報源を2値のビット列に変換し、その
2値のビット列を圧縮等する方法および装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data encoding method and a data encoding device for compressing a multi-valued information source, and a data decoding method and a data decoding device for expanding data of a compressed multi-valued information source. . More specifically, the present invention relates to a method and apparatus for converting a multi-valued information source into a binary bit string and compressing the binary bit string.

【0002】[0002]

【従来の技術】従来、“0”と“1”からなる2値信号
を扱う情報理論の世界では、算術符号化方式と呼ばれる
ものが知られている。この算術符号化方式は、エントロ
ピー符号化方式であり、本質的に可逆符号化(ロスレ
ス)の性質を持つものである。そして、その原理は、エ
ライアスの符号化として知られている無記憶情報源に対
する理想的符号化方式を実用可能な形に再編成したもの
となっている。すなわち、算術符号とは、“0”と
“1”の直線上の対応区間を各シンボルの生起確率に応
じて不等長に分割していき、対象シンボル系列を対応す
る部分区間に割り当て、再帰的に分割を繰り返していく
ことにより得られた区間内に含まれる点の座標を、少な
くとも他の区間と区別できる2進小数で表現してそのま
ま符号とするものである。
2. Description of the Related Art Conventionally, in the world of information theory dealing with binary signals consisting of "0" and "1", an arithmetic coding system is known. This arithmetic coding method is an entropy coding method and has essentially the property of lossless coding (lossless). The principle then reorganizes the ideal coding scheme for memoryless sources known as Elias coding into a practical form. That is, the arithmetic code means that a corresponding section on a straight line of “0” and “1” is divided into unequal lengths according to the occurrence probability of each symbol, and a target symbol sequence is assigned to a corresponding partial section, and recursion is performed. The coordinates of the points included in the section obtained by repeatedly performing the division are represented by at least binary decimal numbers that can be distinguished from other sections, and are used as codes as they are.

【0003】この算術符号化方式は、有限個の情報源シ
ンボルに特定の符号語を対応させるブロック符号に比
べ、符号器の規模、例えば、必要メモリ量などのハード
ウェアが小さくて済むこと、高い効率を期待できること
および適応符号化が容易なこと等の利点がある。このこ
と等から、2値信号を扱う情報理論の世界では、この算
術符号化方式がその情報の持つエントロピーに最も近い
レベルに圧縮できるとされ、最も効率の良い符号化方式
と言われている。なお、この算術符号化方式は、特に、
マルコフ情報源の符号化に適するものとなっている。
[0003] This arithmetic coding method requires less hardware such as the scale of an encoder, for example, a required memory amount, and is higher than a block code in which a specific codeword corresponds to a finite number of information source symbols. There are advantages such as efficiency can be expected and adaptive coding is easy. For this reason, in the world of information theory dealing with binary signals, this arithmetic coding method is said to be able to compress to the level closest to the entropy of the information, and is said to be the most efficient coding method. In addition, this arithmetic coding method, in particular,
It is suitable for encoding Markov information sources.

【0004】この算術符号化方式として、Qコーダ、算
術符号型MELコード、Mini−Maxコーダ等が提
案されている。そして、これらの算術符号を改善したも
のとして、QMコーダと呼ばれている方式が知られてい
る。このQMコーダは、カラー静止画符号化標準(JP
EG)および2値画像符号化標準(JBIG)の両標準
において、共通に使用されている。なお、このQMコー
ダは、2値情報源用の符号であり、JPEGのような多
値情報源の符号化にあたっては、その多値情報源を2値
化するための前処理を必要としている。このような場
合、符号化すべき2値シンボル数は増大するが、多値情
報源としての情報量を増大させることなしに2値系列に
変換することが可能となっている。
As the arithmetic coding method, a Q coder, an arithmetic code type MEL code, a Mini-Max coder, and the like have been proposed. A system called a QM coder is known as an improved version of these arithmetic codes. This QM coder complies with the Color Still Image Coding Standard (JP
EG) and the Binary Image Coding Standard (JBIG). Note that this QM coder is a code for a binary information source, and when encoding a multi-valued information source such as JPEG, preprocessing for binarizing the multi-valued information source is required. In such a case, although the number of binary symbols to be encoded increases, it is possible to convert the binary symbols into a binary sequence without increasing the information amount as a multi-level information source.

【0005】このQMコーダは、JPEGおよびJBI
Gの規定の中にその仕組みについて詳細に述べられてい
るが、ここでは後述する本発明との比較のために、その
概要を図18に基づき簡単に説明する。なお、算術復号
型のエントロピー復号器の構成は、エントロピー符号器
の構成と実質的に同一であるので、ここではその説明は
省略する。
[0005] This QM coder uses JPEG and JBI.
Although the mechanism is described in detail in the definition of G, the outline thereof will be briefly described here with reference to FIG. 18 for comparison with the present invention described later. Since the configuration of the arithmetic decoding type entropy decoder is substantially the same as the configuration of the entropy encoder, the description thereof is omitted here.

【0006】この算術符号型のエントロピー符号器とな
るQMコーダ101は、算術演算部102と、状態記憶
器として機能する発生確率生成手段103とを含んで構
成される。この発生確率生成手段103内には、符号化
に必要なシンボル発数確率を決定するために必要な状態
パラメータテーブルが書き込まれている。上記の状態パ
ラメータは、入力される状態信号106によって特定さ
れる。そして、この状態信号106によって特定された
状態パラメータのテーブルに対し、算術演算部102は
演算パラメータ更新時のデータを、読出しアドレスとし
て出力し、これにより特定される発生確率生成手段10
3のデータが算術演算部102へ向け出力される。算術
演算部102は、このようにして入力されるデータに基
づき、入力されるデータ104を符号化データ105に
圧縮し、符号化して出力する。なお、発生確率生成手段
103には、状態信号106が入力される。これは例え
ば、マルコフモデルと呼ばれるような手法等により求め
られる参照画素データ等であり、圧縮率を高めるために
利用される信号である。
A QM coder 101 serving as an arithmetic code type entropy encoder includes an arithmetic operation unit 102 and an occurrence probability generation unit 103 functioning as a state storage. In the occurrence probability generation means 103, a state parameter table necessary for determining a symbol occurrence probability required for encoding is written. The above state parameters are specified by the input state signal 106. Then, the arithmetic operation unit 102 outputs, as a read address, the data at the time of updating the operation parameter to the state parameter table specified by the state signal 106, and the occurrence probability generation unit 10
3 is output to the arithmetic operation unit 102. The arithmetic operation unit 102 compresses the input data 104 into encoded data 105 based on the data input in this way, encodes the encoded data 105, and outputs the encoded data 105. The state signal 106 is input to the occurrence probability generation unit 103. This is, for example, reference pixel data obtained by a method called a Markov model or the like, and is a signal used to increase the compression ratio.

【0007】このように構成されるQMコーダの動作に
ついて図19のフローチャートに基づき説明する。ま
ず、QMコーダ101内のレジスタAに0xFFFF
を、レジスタCに0x0000を代入する。また、確率
推定のためのインデックスSTを初期化する(ステップ
S100)。次に、符号化対象のシンボル(1ビット)
を取り込む(ステップS101)。そして、取り込んだ
シンボルが、優勢シンボルか劣勢シンボルかを判定する
(ステップS102)。優勢シンボルの時はステップS
103に進み、劣勢シンボルの時はステップS106に
進む。
The operation of the thus configured QM coder will be described with reference to the flowchart of FIG. First, 0xFFFF is stored in the register A in the QM coder 101.
Is substituted into the register C by 0x0000. Further, an index ST for probability estimation is initialized (step S100). Next, the symbol to be encoded (1 bit)
(Step S101). Then, it is determined whether the fetched symbol is the superior symbol or the inferior symbol (step S102). Step S when the symbol is superior
The process proceeds to step S103, and if the symbol is the inferior symbol, the process proceeds to step S106.

【0008】インデックスSTによって確率推定テーブ
ルLSZを参照し、劣勢シンボルの生起確率を求め、さ
らに、それをレジスタAから減じることにより優勢シン
ボルの生起確率を求め、その値をレジスタAに代入する
(ステップS103)。その後、レジスタAの最上位ビ
ットが“1”かどうか調べる(ステップS104)。
“1”ならステップS105に進み、“0”ならステッ
プS114に進む。そして、“1”のときは、インデッ
クスSTによって確率推定テーブルNMPSを参照し、
次のシンボルの符号化のためのインデックスSTを求め
ておく(ステップS105)。
The probability of occurrence of the inferior symbol is obtained by referring to the probability estimation table LSZ by the index ST, and the occurrence probability of the inferior symbol is obtained by subtracting it from the register A, and the value is substituted into the register A (step S103). Thereafter, it is checked whether or not the most significant bit of the register A is "1" (step S104).
If "1", the process proceeds to step S105, and if "0", the process proceeds to step S114. When the value is “1”, the probability estimation table NMPS is referred to by the index ST,
An index ST for encoding the next symbol is obtained (step S105).

【0009】ステップS102において、劣勢シンボル
のときは、インデックスSTによって確率推定テーブル
LSZを参照し、劣勢シンボルの生起確率を求め、それ
をレジスタAに代入する(ステップS106)。その
後、レジスタCにレジスタAの値を加える(ステップS
107)。そして、インデックスSTによって確率推定
テーブルSWITCHを参照し(ステップS108)、
これが“1”のときはステップS109に進み、優勢シ
ンボルを変更する。
If it is determined in step S102 that the symbol is an inferior symbol, the probability of occurrence of the inferior symbol is obtained by referring to the probability estimation table LSZ using the index ST, and is substituted into the register A (step S106). Thereafter, the value of the register A is added to the register C (step S
107). Then, the probability estimation table SWITCH is referred to by the index ST (step S108),
If this is "1", the flow advances to step S109 to change the dominant symbol.

【0010】一方、ステップS110では、インデック
スSTによって確率推定テーブルNLPSを参照し、次
のシンボルの符号化のためのインデックスSTを求めて
おく。そして、ステップS111ではレジスタA,レジ
スタCを共に1ビット左シフトする。この左シフトによ
り、レジスタCから溢れた最上位ビットを符号語として
出力する(ステップS112)。そして、ステップS1
13において、レジスタAの最上位ビットが“1”かど
うか調べ、“1”のときは、ステップS111に戻って
シフトを繰り返す。最上位ビットが“0”のときはステ
ップS114にいき、符号化したシンボルが最後のシン
ボルなら終了する。そうでなければステップS101に
戻る。
On the other hand, in step S110, an index ST for coding the next symbol is obtained by referring to the probability estimation table NLPS using the index ST. Then, in step S111, both the registers A and C are shifted left by one bit. Due to this left shift, the most significant bit overflowing from the register C is output as a code word (step S112). Then, step S1
At 13, it is checked whether or not the most significant bit of the register A is "1". If it is "1", the process returns to step S111 to repeat the shift. If the most significant bit is "0", the process proceeds to step S114, and the process ends if the encoded symbol is the last symbol. Otherwise, the process returns to step S101.

【0011】このようにして、QMコーダ101は、確
率推定テーブルLSZ,NMPS,NLPSを利用して
入力されてくる2値のビット列を圧縮して符号化する。
As described above, the QM coder 101 compresses and encodes a binary bit string input using the probability estimation tables LSZ, NMPS, and NLPS.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、このQ
Mコーダ101等の算術符号化方式は、符号化効率は良
いものの図19に示すフローチャートに示されるよう
に、1ビットずつ符号化するため符号化速度が遅いもの
となっている。このため、実用面では、レンベル・ジブ
系(=LZ系)の符号化方式が優勢となっている。しか
し、このLZ系の符号化方式は、符号化効率が算術符号
化方式にくらべ、かなり落ちるものとなっている。この
ように、従来の技術には、符号化効率が算術符号化方式
程度に良く、しかも符号加速度がLZ系程度に速いもの
が存在していない状況である。また、画像符号化やユニ
バーサル符号化等多くの符号化方法の対象は、多値情報
源であり、多値情報源の効率の良い圧縮、伸長が要望さ
れている。
However, this Q
The arithmetic coding method of the M coder 101 and the like has a high coding efficiency, but has a low coding speed because the coding is performed one bit at a time as shown in the flowchart of FIG. For this reason, in the practical aspect, the Lenbel-Jib coding system (= LZ coding) is dominant. However, the coding efficiency of the LZ system is considerably lower than that of the arithmetic coding system. As described above, there is no prior art in which the coding efficiency is as good as the arithmetic coding method and the code acceleration is as fast as the LZ system. Further, many coding methods such as image coding and universal coding are targeted for multi-valued information sources, and efficient compression and decompression of multi-valued information sources are demanded.

【0013】本発明は、算術符号化方式とほぼ同程度の
符号化および復号化効率を達成すると共に符号化および
復号化速度を大幅に向上させ、LZ系の速度に近づけた
新しい多値情報源のデータ符号化方法およびのデータ符
号化装置ならびに多値情報源のデータ復号化方法および
データ復号化装置を提供することを目的とする。
The present invention provides a new multi-valued information source that achieves substantially the same encoding and decoding efficiency as an arithmetic encoding system, greatly improves the encoding and decoding speed, and approaches the LZ system speed. It is an object of the present invention to provide a data encoding method and a data encoding device, and a data decoding method and a data decoding device for a multilevel information source.

【0014】[0014]

【課題を解決するための手段】かかる目的を達成するた
め、請求項1記載の多値情報源のデータ符号化方法で
は、複数のビットからなる多値情報源をビット・プレー
ンに分け、各ビット・プレーンの“0”および“1”か
らなる2値のビット列を入力する際、“0”または
“1”のいずれか一方を優勢シンボルとし、いずれか他
方を劣勢シンボルとすると共に、その優勢シンボルがn
個連続すると予測し、そのn個を予測ビット数として設
定する予測設定工程と、入力された予測ビット数からな
る注目系列について予測が当たったときに符号語として
“0”または“1”のいずれか一方の信号を予測当たり
信号として出力し、次のn個のビット列を符号化する作
業に移り、はずれたときに符号語として“0”または
“1”のいずれか他方の信号を予測はずれ信号として出
力する予測結果出力工程と、予測が所定回数はずれたと
きに予測ビット数をn個より少ない新減少予測ビット数
として同様の予測設定工程と予測出力工程とを再帰的に
繰り返して行なうようにしている。
In order to achieve the above object, a multi-valued information source data encoding method according to claim 1 divides a multi-valued information source consisting of a plurality of bits into bit planes, and When inputting a binary bit string consisting of “0” and “1” of a plane, one of “0” and “1” is set as a superior symbol, and the other is set as an inferior symbol, and the superior symbol is used. Is n
A prediction setting step of predicting the number of consecutive bits, and setting the number n as the number of bits to be predicted; One of the signals is output as a signal per prediction, and the operation shifts to a task of encoding the next n bit strings. When the signal deviates, the other signal of either "0" or "1" is used as a codeword and an unpredicted signal. And the same prediction setting step and prediction output step are recursively repeated by setting the number of prediction bits to a new reduced prediction bit number smaller than n when the prediction is deviated a predetermined number of times. ing.

【0015】このように、多値情報源をビット・プレー
ンに分け、しかも各ビットプレーンの優勢シンボルがn
個連続することを予測し、予測が当たったときには、n
個のビットが1つの予測当たり信号等で表示されること
となり、圧縮効率が高まると共に符号化速度が速くな
る。しかも予測がはずれると、予測ビット数を減少さ
せ、次の予測を行うようにしたので、予測がはずれても
圧縮効率や符号化速度はそれ程減少しない。
As described above, the multilevel information source is divided into bit planes, and the dominant symbol of each bit plane is n.
Are predicted to be consecutive, and when the prediction is successful, n
The bits are displayed as one signal per prediction or the like, which increases the compression efficiency and the encoding speed. In addition, when the prediction is incorrect, the number of predicted bits is reduced and the next prediction is performed. Therefore, even if the prediction is lost, the compression efficiency and the encoding speed do not decrease so much.

【0016】また、請求項2記載の発明では、請求項1
記載の多値情報源のデータ符号化方法において、n個を
偶数個とし、予測が所定回数はずれたときに注目系列を
2分割し、その2分割された前半部の前半部注目系列の
みに劣勢シンボルが存在するとき、新減少予測ビット数
を予測ビット数の1/2とし、2分割された後半部の後
半部注目系列に劣勢シンボルが存在するとき新減少予測
ビット数を予測ビット数の1/4としている。
According to the second aspect of the present invention, the first aspect of the present invention is provided.
In the data coding method of the multi-valued information source described above, n is set to an even number, the target sequence is divided into two when prediction is deviated a predetermined number of times, and only the first half target sequence of the divided first half is inferior to the target sequence. When a symbol is present, the new reduced predicted bit number is set to の of the predicted bit number, and when the inferior symbol is present in the latter half target sequence of the second half, the new reduced predicted bit number is set to one of the predicted bit number. / 4.

【0017】一般的に、後半部注目系列に劣勢シンボル
が存在すると、次の注目系列に一層多くの劣勢シンボル
が存在する場合が多いのであるが、この請求項2記載の
発明では、そのような状況への対応ができ、符号化速度
や効率を上げることができる。
In general, if there is a less-significant symbol in the second-half attention sequence, there are many cases where more less-significant symbols exist in the next attention sequence. It is possible to respond to the situation and increase the encoding speed and efficiency.

【0018】さらに、請求項3記載の発明では、請求項
1または2記載の多値情報源のデータ符号化方法におい
て、新減少予測ビット数が1となり、かつそのビットが
劣勢シンボルのとき、以降の符号化において従来の劣勢
シンボルを優勢シンボルとし、従来の優勢シンボルを劣
勢シンボルとして符号化するようにしている。その結
果、入力データの実態に合わせ、適切な予測ができるこ
ととなり、高い符号化速度や効率を維持できることとな
る。
According to a third aspect of the present invention, in the data encoding method for a multi-valued information source according to the first or second aspect, when the new reduced prediction bit number is 1 and the bit is a less significant symbol, , The conventional inferior symbol is set as the superior symbol, and the conventional superior symbol is encoded as the inferior symbol. As a result, appropriate prediction can be performed according to the actual state of the input data, and high coding speed and high efficiency can be maintained.

【0019】加えて、請求項4記載の発明では、請求項
1、2または3記載の多値情報源のデータ符号化方法に
おいて、所定回数を1回としている。このため、予測ビ
ット数を早めに減少させることができ、一定の傾向を有
するビット列の符号化速度を速くできる。
In addition, in the invention according to claim 4, in the data encoding method for a multilevel information source according to claim 1, 2, or 3, the predetermined number of times is one. For this reason, the number of prediction bits can be reduced earlier, and the encoding speed of a bit string having a certain tendency can be increased.

【0020】また、請求項5記載の発明では、請求項
1、2、3または4記載の多値情報源のデータ符号化方
法において、予測が規定回数当たったときに、予測ビッ
ト数をn個より多い新増加予測ビット数としている。こ
のため、予測が当たれば当たる程、圧縮効率が高まりか
つ符号化速度が速くなる。
According to a fifth aspect of the present invention, in the data encoding method for a multi-valued information source according to the first, second, third or fourth aspect, when the number of predictions reaches a predetermined number, the number of predicted bits is n. The number of predicted new increase bits is larger. For this reason, the more the prediction is successful, the higher the compression efficiency and the higher the encoding speed.

【0021】また、請求項6記載の多値情報源のデータ
符号化方法では、複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの“0”お
よび“1”からなる2値のビット列を入力する際、
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個連続すると予測し、そのn個を予測ビ
ット数として設定する予測設定工程と、入力された予測
ビット数からなる注目系列について予測が当たったとき
に符号語として“0”または“1”のいずれか一方の信
号を予測当たり信号として出力し、次のn個のビット列
を符号化する作業に移り、はずれたときに符号語として
“0”または“1”のいずれか他方の信号を予測はずれ
信号として出力する予測結果出力工程と、予測が規定回
数当たったときに、予測ビット数をn個より多い新増加
予測ビット数として同様の予測設定工程と予測結果出力
工程とを繰り返し行わせている。
In the data encoding method for a multi-valued information source according to the present invention, the multi-valued information source comprising a plurality of bits is divided into bit planes, and the bit planes are divided into "0" and "1". When inputting a binary bit string
A prediction setting step of setting one of “0” and “1” as a superior symbol and the other as an inferior symbol, predicting that the n superior symbols are continuous, and setting the n as the number of prediction bits. When a prediction is hit for a sequence of interest consisting of the number of input prediction bits, either a signal of “0” or “1” is output as a signal per prediction as a signal per prediction, and the next n bit strings are output. The operation shifts to encoding, and a prediction result output step of outputting the other signal of either “0” or “1” as a codeword when it is out of order as a prediction error signal. The same prediction setting step and prediction result output step are repeatedly performed with the number of bits being the new increase prediction bit number larger than n.

【0022】この結果、予測が当たると、n個のビット
が1つの予測当たり信号等で表示されることとなり、し
かもビット・プレーン毎に符号化が行われるので、圧縮
効率が高まると共に符号化速度が速くなる。さらに予測
が当たれば当たる程、データの圧縮効率が一層高まると
共に符号化速度が一層速くなる。
As a result, when the prediction is successful, n bits are displayed as one signal per prediction or the like, and the encoding is performed for each bit plane, so that the compression efficiency is increased and the encoding speed is increased. Is faster. The more the prediction is successful, the higher the data compression efficiency and the higher the encoding speed.

【0023】さらに、請求項7記載の発明では、請求項
5または6記載の多値情報源のデータ符号化方法におい
て、規定回数を2回とし、新増加予測ビット数を予測ビ
ット数の2倍としている。このため、予測の当たりが続
くこと、すなわち、一定の傾向が出始めてから予測ビッ
ト数を変えているので、データの圧縮効率を高めること
ができる。しかもその値を従前の2倍としているので、
ちょうど当たりによって連続した優勢シンボルのビット
数と同一となり、次の予測も当たる確率が高くなる。こ
の結果、圧縮効率を高めることができると共に符号化速
度を速くすることができる。
According to a seventh aspect of the present invention, in the data encoding method for a multi-valued information source according to the fifth or sixth aspect, the prescribed number of times is set to two and the number of new increase prediction bits is twice the number of prediction bits. And For this reason, since the number of prediction bits is changed after the prediction hit continues, that is, after a certain tendency starts to appear, the data compression efficiency can be improved. Moreover, since the value is twice that of the previous model,
The number of bits of the consecutive dominant symbol is exactly the same due to the hit, and the probability of winning the next prediction is high. As a result, the compression efficiency can be increased and the encoding speed can be increased.

【0024】加えて、請求項8記載の発明では、請求項
1、2、3、4、5、6または7記載の多値情報源のデ
ータ符号化方法において、n個を2m(mは0以上の整
数)個としている。このため、予測がはずれたときの分
割を均等分割できると共にどんどん分割でき最後に1個
のビット数とすることができる。
In addition, according to the invention described in claim 8, in the data encoding method for a multi-valued information source according to claim 1, 2, 3, 4, 5, 6, or 7, n is set to 2 m (m is (An integer of 0 or more). For this reason, when the prediction is incorrect, the division can be equally divided, and the division can be performed rapidly, and finally the number of bits can be one.

【0025】また、請求項9記載の発明では、請求項8
記載の多値情報源のデータ符号化方法において、予測が
はずれたとき注目系列を2分割し、2分割された前半部
の前半部注目系列がすべて優勢シンボルのときは符号語
として“0”を出力し、2分割された後半部の後半部注
目系列をさらに2分割し、“0”または“1”の符号語
を出力する前半部当たり工程と、前半部注目系列に劣勢
シンボルが存在するときは符号語として“1”を出力す
ると共に、前半部注目系列をさらに2分割し、“0”ま
たは“1”の符号語を出力する前半部はずれ工程を有
し、各分割された注目系列中に劣勢シンボルが存在する
限り、その注目系列の分割を繰り返し、前半部当たり工
程と前半部はずれ工程を再帰的に繰り返している。
According to the ninth aspect of the present invention, there is provided the eighth aspect of the present invention.
In the data coding method of the multi-valued information source described above, the sequence of interest is divided into two when the prediction is incorrect, and “0” is set as a codeword when all of the two divided first half target sequences are dominant symbols. A first half hitting step of outputting and further dividing the latter half notice sequence of the latter half into two, and outputting a codeword of "0" or "1"; and a case where the inferior symbol exists in the first half notice sequence. Outputs a code word "1", further divides the first half target sequence into two, and outputs a code word "0" or "1". As long as there are inferior symbols, the division of the sequence of interest is repeated, and the first half hitting step and the first half off step are recursively repeated.

【0026】この結果、QMコーダと同様な圧縮効率を
達成できると共にQMコーダの数倍の符号化速度を達成
できることとなる。
As a result, the same compression efficiency as that of the QM coder can be achieved, and the coding speed several times higher than that of the QM coder can be achieved.

【0027】また、請求項10記載の発明では、請求項
8記載の多値情報源のデータ符号化方法において、予測
がはずれたとき注目系列を2分割し、2分割された後半
部の後半部注目系列がすべて優勢シンボルのときは符号
語として“0”を出力し、2分割された前半部の前半部
注目系列をさらに2分割し、“0”または“1”の符号
語を出力する後半部当たり工程と、後半部注目系列に劣
勢シンボルが存在するときは符号語として“1”を出力
すると共に、後半部注目系列をさらに2分割し、“0”
または“1”の符号語を出力する後半部はずれ工程を有
し、各分割された注目系列中に劣勢シンボルが存在する
限り、その注目系列の分割を繰り返し、後半部当たり工
程と後半部はずれ工程を再帰的に繰り返している。
According to a tenth aspect of the present invention, in the data encoding method for a multi-valued information source according to the eighth aspect, when the prediction is incorrect, the sequence of interest is divided into two, and the latter half of the latter half divided into two. When all the noticed sequences are dominant symbols, "0" is output as a code word, the former half noticed sequence of the first half is further divided into two, and the latter half of outputting a code word of "0" or "1" When the inferior symbol exists in the second-stage attention sequence and the second-half attention sequence, "1" is output as a codeword, and the second-half attention sequence is further divided into two to obtain "0".
Alternatively, a second-half offset process for outputting a code word of “1” is performed, and as long as the inferior symbol exists in each of the split target sequences, the split of the target sequence is repeated. Is recursively repeated.

【0028】この結果、QMコーダと同様な圧縮効率を
達成できると共にQMコーダの数倍の符号化速度を達成
できることとなる。
As a result, the same compression efficiency as that of the QM coder can be achieved, and the coding speed several times higher than that of the QM coder can be achieved.

【0029】また、請求項11記載の多値情報源のデー
タ符号化方法では、複数のビットからなる多値情報源を
ビット・プレーンに分け、最上位ビットのビットプレー
ンから請求項1ないし10のいずれか1項記載のデータ
符号化方法によって符号化し、“1”が出現した時点
で、続く下位ビットを符号ビットとして出力している。
このため、下位ビットに確率が集中する入力シンボルの
場合には、一層符号速度を高めることができると共に必
要とするメモリ等を小型化することができる。
In the data encoding method for a multi-valued information source according to the eleventh aspect, the multi-valued information source comprising a plurality of bits is divided into bit planes, and the bit plane of the most significant bit is divided into the bit planes. The data is encoded by the data encoding method described in any one of the above aspects, and when "1" appears, the subsequent lower bits are output as code bits.
Therefore, in the case of an input symbol whose probability is concentrated on the lower bits, the code speed can be further increased and the required memory and the like can be reduced in size.

【0030】また、請求項12記載の発明では、複数の
ビットからなる多値情報源をビット・プレーンに分け、
各ビット・プレーンの“0”および“1”からなる2値
の入力ビット系列を圧縮して符号化する多値情報源のデ
ータ符号化装置において、“0”または“1”のいずれ
か一方を優勢シンボルとし、いずれか他方を劣勢シンボ
ルとすると共にその優勢シンボルがn個連続すると予測
し、そのn個を予測ビット数として設定する予測ビット
長等演算設定部と、入力ビット系列を一時記憶するバッ
ファレジスタと、予測ビット長等演算設定部およびバッ
ファレジスタの各値を入力し、その入力された予測ビッ
ト数からなる注目系列について予測が当たったときに符
号語として“0”または“1”のいずれか一方の信号を
予測当たり信号として出力し、はずれたときに符号語と
して“0”または“1”のいずれか他方の信号を予測は
ずれ信号として出力する判定部とを備え、予測が所定回
数はずれたときに予測ビット数をn個より少ない新減少
予測ビット数を予測ビット長等演算設定部で設定し、予
測が規定回数当たったときに予測ビット数をn個より多
い新増加予測ビット数を予測ビット長等演算設定部で設
定している。
According to the twelfth aspect of the present invention, a multi-valued information source consisting of a plurality of bits is divided into bit planes.
In a data encoding device of a multilevel information source for compressing and encoding a binary input bit sequence consisting of "0" and "1" of each bit plane, either "0" or "1" is used. A predictive bit length and other calculation setting unit for predicting that one of the other symbols is the dominant symbol and that the other is the inferior symbol and that the dominant symbol is n consecutive, and sets the n as the number of predicted bits, and temporarily stores the input bit sequence Each value of the buffer register, the operation setting section for predicting bit length and the like, and the buffer register is input, and when a prediction is hit for a noticed sequence composed of the input number of predicted bits, “0” or “1” is used as a codeword. Either signal is output as a signal per prediction, and when it deviates, the other signal, either “0” or “1”, is output as a code word when it deviates. A prediction unit that sets a new reduced prediction bit number smaller than n by a prediction bit length etc. operation setting unit when the prediction is deviated a predetermined number of times, and sets a prediction bit when the prediction has reached a specified number of times. The number of new increase prediction bits whose number is greater than n is set by a prediction bit length etc. operation setting unit.

【0031】この結果、予測が当たればn個のビットが
1つの予測当たり信号等で表示されることとなり、しか
も、ビット・プレーン毎に符号化が行われるので、圧縮
効率が高まると共に符号化速度が速くなる。さらに、予
測が当たれば当たる程、予測ビット数を多くしているの
で、一層圧縮効率が高まることとなる。加えて、予測が
はずれると、予測ビット数を減少させているので、予測
がはずれても圧縮効率や符号化速度はそれ程減少するこ
とはない。
As a result, if the prediction is successful, n bits will be displayed as one signal per prediction, etc. In addition, since encoding is performed for each bit plane, the compression efficiency is increased and the encoding speed is increased. Is faster. Furthermore, the more the prediction is successful, the greater the number of prediction bits, so that the compression efficiency is further improved. In addition, if the prediction is incorrect, the number of predicted bits is reduced, so that even if the prediction is incorrect, the compression efficiency and the encoding speed do not decrease so much.

【0032】さらに、請求項13記載の多値情報源のデ
ータ符号化装置では、複数のビットからなる多値情報源
をビット・プレーンに分け、各ビット・プレーンの入力
ビット系列を一時記憶するレジスタ群よりなるバッファ
レジスタと、符号化する注目系列の先頭位置を示す変数
ofsを保持するレジスタおよび予測ビット長を示す変
数widthを保持するレジスタを内蔵する予測ビット
長演算部と、この予測ビット長演算部が出力するバッフ
ァレジスタ上のofsの位置およびそのofsからwi
dthにより定まるバッファレジスタ上の入力ビット系
列を選択し、その入力ビット系列がすべて優勢シンボル
のとき符号ビット出力として1つの優勢シンボルを出力
し、劣勢シンボルが含まれるときは1つの劣勢シンボル
を出力する判定部と、バッファレジスタ内の入力ビット
系列の符号化が完了した旨の完了信号を予測ビット長演
算部より受けたとき入力ビット要求を行う入出力制御信
号発生部と、刻々変化するwidthの値を保持してお
くためのメモリとなるスタック・メモリと、予測ビット
長演算部より過去の符号化の状態を入力し、新たに入力
する入力ビット系列の予測ビット長と優勢シンボルを設
定する予測ビット長・優勢シンボル設定部とを備え、入
出力制御信号発生部は完了信号を予測ビット長演算部よ
り受けたとき、バッファレジスタに対して予測ビット長
・演算シンボル設定部によって新たに設定された新予測
ビット長で示される個数の入力ビット系列の取り込みを
指示している。
Further, in the data encoding apparatus for a multi-valued information source according to the thirteenth aspect, the multi-valued information source comprising a plurality of bits is divided into bit planes, and a register for temporarily storing an input bit sequence of each bit plane. A buffer register comprising a group, a register for holding a variable ofs indicating a head position of a target sequence to be encoded, and a register for holding a variable for indicating a predicted bit length, and a prediction bit length calculation unit And the position of ofs on the buffer register output from the
An input bit sequence on the buffer register determined by dth is selected, and when all the input bit sequences are predominant symbols, one predominant symbol is output as a code bit output, and when a predominant symbol is included, one inferior symbol is output. A determination unit, an input / output control signal generation unit that issues an input bit request when receiving a completion signal indicating that encoding of the input bit sequence in the buffer register has been completed from the prediction bit length calculation unit, and a value of the width that changes every moment A stack memory serving as a memory for storing the previous encoding state from the prediction bit length calculation unit, and a prediction bit for setting a prediction bit length and a dominant symbol of an input bit sequence to be newly input A length / dominant symbol setting unit. The prediction bit length and arithmetic operation symbol setting unit relative to buffer registers instructs the input bit sequence of incorporation of the number represented by the newly set new prediction bit length.

【0033】このように、刻々変化するwidthによ
って予測ビット長を変化させているので、予測が当たれ
ばn個のビットが1つの予測当たり信号等で表示される
こととなり、しかも、ビット・ブレーン毎に符号化して
いるので、圧縮効率が高まると共に符号化速度が速くな
る。さらに、予測が当たれば当たる程、予測ビット数を
多くしているので、一層圧縮効率が高まることとなる。
加えて、予測がはずれると、予測ビット数を減少させて
いるので、予測がはずれても圧縮効率や符号化速度はそ
れ程減少することはない。
As described above, since the prediction bit length is changed by the ever-changing width, if the prediction is successful, n bits will be displayed as one signal per prediction and the like. , The compression efficiency is increased and the encoding speed is increased. Furthermore, the more the prediction is successful, the greater the number of prediction bits, so that the compression efficiency is further improved.
In addition, if the prediction is incorrect, the number of predicted bits is reduced, so that even if the prediction is incorrect, the compression efficiency and the encoding speed do not decrease so much.

【0034】また、請求項14記載の発明では、複数の
ビットからなる多値情報源をビット・プレーンに分け、
各ビット・プレーンの符号化されたデータを入力し
“0”および“1”からなる2値のビット列に復号化し
た後、多値情報源を復号するデータ復号化方法におい
て、各ビット・プレーンの“0”または“1”のいずれ
か一方を優勢シンボルとし、いずれか他方を劣勢シンボ
ルとすると共に、その優勢シンボルがn個(nは1以上
の整数)連続すると予測したその予測結果を“0”およ
び“1”からなる2値のビット列で表した符号語を1ビ
ットずつ入力する入力工程を有し、入力された符号語が
予測当たりの値のとき優勢シンボルをn個連続して復号
化すると共に、予測当たりが所定回数連続したときはn
個より多い数の優勢シンボルが連続すると新たに予測す
るようにしている。
In the invention according to claim 14, a multi-valued information source consisting of a plurality of bits is divided into bit planes,
In a data decoding method for inputting coded data of each bit plane and decoding it into a binary bit string consisting of "0" and "1", and then decoding a multi-valued information source, Either “0” or “1” is set as the dominant symbol, and the other is set as the inferior symbol, and the prediction result of predicting that n dominant symbols (n is an integer of 1 or more) is “0”. And an input step of inputting, one bit at a time, a codeword represented by a binary bit string consisting of "1" and "1". When the input codeword is a value per prediction, decoding n consecutive dominant symbols And when the number of prediction hits is a predetermined number of times, n
It is newly predicted that more than the dominant symbols continue.

【0035】この結果、予測が当たっている場合、1つ
の符号語でn個の優勢シンボルを復号できる。しかも、
ビット・プレーン毎に符号化されるので、伸長効率が高
くなり、復号速度が速くなる。さらに予測が当たってい
ればいる程、1つの符号語で復号できる優勢シンボルの
数を多くできるので一層伸長効率が高くなると共に、復
号速度が速くなる。
As a result, when prediction is successful, one codeword can decode n dominant symbols. Moreover,
Since encoding is performed for each bit plane, the decompression efficiency is increased and the decoding speed is increased. Furthermore, as the prediction is more successful, the number of superior symbols that can be decoded by one codeword can be increased, so that the decompression efficiency is further increased and the decoding speed is increased.

【0036】さらに、請求項15記載の多値情報源のデ
ータ復号化方法では、複数のビットからなる多値情報源
をビット・プレーンに分け、各ビット・プレーンの
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個(nは1以上の整数)連続すると予測
したその予測結果を“0”および“1”からなる2値の
ビット列で表した符号語を1ビットずつ入力する入力工
程と、入力された符号語が予測当たりの値のとき、優勢
シンボルをn個連続して復号化すると共に、入力された
符号語が予測はずれの値のとき、次の符号語を入力する
予測結果復号化工程と次の符号語の値が予測当たりの値
のとき優勢シンボルをn−m個連続して復号化し、予測
はずれの値のときは再度次の符号語を入力する工程を再
帰的に繰り返し、0<n−m≦1のときの予測はずれ時
に劣勢シンボルを復号化するようにしている。
In the data decoding method for a multi-valued information source according to the present invention, the multi-valued information source composed of a plurality of bits is divided into bit planes, and each bit plane is set to "0" or "1". One of the symbols is the dominant symbol, and the other is the inferior symbol. The prediction result of predicting that the number of the dominant symbols is n (n is an integer of 1 or more) is composed of “0” and “1”. An input step of inputting a code word represented by a bit string of a value one bit at a time, and when the input code word is a value per prediction, while decoding n dominant symbols continuously, A prediction result decoding step of inputting the next codeword when the value of the prediction error is obtained, and decoding of nm consecutive dominant symbols when the value of the next codeword is a value per prediction, and a prediction error value Again when Repeating the steps of inputting a code word recursively, so that to decode the inferior symbol when prediction off when the 0 <n-m ≦ 1.

【0037】このため、予測が当たっている場合、1つ
の符号語でn個の優勢シンボルを復号でき、しかもビッ
ト・プレーン毎に符号化しているので、伸長効率が高く
なり、復号速度が速くなる。さらに、予測が当たってい
ればいる程、1つの符号語で復号できる優勢シンボルの
数を多くできるので一層伸長効率が高くなると共に、復
号速度が速くなる。加えて、予測はずれのときに予測ビ
ット長を減らす作業を再帰的に繰り返し、最終的に劣勢
シンボルを復号化しているので、予測はずれが生じても
効率的にデータを復号化できる。
For this reason, when the prediction is correct, n dominant symbols can be decoded by one code word, and the encoding is performed for each bit plane, so that the decompression efficiency is increased and the decoding speed is increased. . Furthermore, as the prediction is more successful, the number of superior symbols that can be decoded with one codeword can be increased, so that the decompression efficiency is further increased and the decoding speed is increased. In addition, since the operation of reducing the prediction bit length is recursively repeated at the time of misprediction, and finally the inferior symbol is decoded, data can be efficiently decoded even if misprediction occurs.

【0038】また、請求項16記載の発明では、複数の
ビットからなる多値情報源をビット・プレーンに分け、
各ビット・プレーンの符号化されたデータとなる符号ビ
ットを入力し、“0”および“1”からなる2値のビッ
ト列からなる復号ビットにした後、多値情報源を復号化
する多値情報源のデータ復号化装置において、各ビット
・プレーンの“0”または“1”のいずれか一方を優勢
シンボルとし、いずれか他方を劣勢シンボルとしたとき
符号ビットの優勢シンボルと予測ビット長n個を設定す
る予測ビット長等設定演算部と、この予測ビット長等設
定演算部からの復号ビット出力許可信号を受けて入力中
の符号ビットを所定の形で一時保持すると共に復号ビッ
トを出力する復号ビット設定部とを備え、入力された符
号ビットが優勢シンボルの場合、復号ビット出力許可信
号を出力し復号ビット設定部に優勢シンボルを書き込む
と共に優勢シンボルが所定回数連続したときは予測ビッ
ト長をn個より多い数に変更している。
In the invention according to claim 16, a multi-valued information source consisting of a plurality of bits is divided into bit planes,
A multi-valued information for decoding a multi-valued information source after inputting a code bit as coded data of each bit plane, converting the code bit into a binary bit string consisting of "0" and "1" In the source data decoding apparatus, when one of “0” and “1” of each bit plane is set as a dominant symbol and the other is set as a dominant symbol, the dominant symbol of the code bit and the prediction bit length n are determined. A prediction bit length setting operation unit to be set; and a decoded bit for receiving a decoded bit output permission signal from the prediction bit length etc. setting operation unit, temporarily holding a code bit being input in a predetermined form, and outputting a decoded bit. When the input code bit is a superior symbol, a decoded bit output enable signal is output, the superior symbol is written in the decoded bit setting unit, and the superior symbol is output. There is when a predetermined number of times in succession have changed the prediction bit length of the number larger than n pieces.

【0039】この結果、予測が当たっている場合、1つ
の符号語でn個の優勢シンボルを復号できる。しかも、
ビット・プレーン毎に符号化しているので、伸長効率が
高くなり、復号速度が速くなる。さらに予測が当たって
いればいる程、1つの符号語で復号できる優勢シンボル
の数を多くできるので一層伸長効率が高くなると共に、
復号速度が速くなる。
As a result, when the prediction is correct, one codeword can decode n dominant symbols. Moreover,
Since encoding is performed for each bit plane, the decompression efficiency is increased and the decoding speed is increased. Further, as the prediction is more successful, the number of dominant symbols that can be decoded by one codeword can be increased, so that the decompression efficiency is further increased, and
The decoding speed increases.

【0040】さらに、請求項17記載の発明では、複数
のビットからなる多値情報源をビット・プレーンに分
け、各ビット・プレーンの“0”または“1”のいずれ
か一方を優勢シンボルとし、いずれか他方を劣勢シンボ
ルすると共にそのシンボルがn個(nは1以上の整数)
連続すると予測したその予測結果を“0”および“1”
からなる2値のビット列で表した符号ビットを1ビット
ずつ入力する復号化する復号化装置において、符号ビッ
トの予測ビット長と優勢シンボルを設定する予測ビット
長・優勢シンボル設定部と、この予測ビット長・優勢シ
ンボル設定部から予測ビット長と優勢シンボルならびに
符号ビットを入力し、その符号ビットの値に応じて復号
ビット出力許可信号を出力する予測ビット長演算部と、
復号ビット出力許可信号を入力し、入力中の符号ビット
を所定の形で一時保持すると共に復号ビットを出力する
復号ビット設定部とを備え、予測ビット長演算部に入力
された符号語が予測当たりの値の時、優勢シンボルをn
個連続して復号ビット設定部に書き込むと共に、入力さ
れた符号語が予測はずれのとき次の符号ビットを入力
し、その値が予測当たりの値の時、優勢シンボルをn−
m個(mは1以上の整数でnより小さい値)連続して復
号ビット設定部に書き込み、予測はずれのときは再度次
の符号を予測ビット長演算部に入力するようにしてい
る。
Further, according to the seventeenth aspect of the present invention, a multi-valued information source composed of a plurality of bits is divided into bit planes, and either "0" or "1" of each bit plane is set as a superior symbol, One of the other symbols is the inferior symbol, and the number of the symbols is n (n is an integer of 1 or more)
"0" and "1" represent the results of the prediction that they are predicted to be continuous.
In a decoding apparatus for inputting, one bit at a time, code bits represented by a binary bit string consisting of: a prediction bit length and a superior symbol setting unit for setting a prediction bit length of a code bit and a superior symbol; A prediction bit length calculation unit that inputs a prediction bit length, a superior symbol, and a code bit from the length / dominance symbol setting unit, and outputs a decoded bit output permission signal according to the value of the code bit;
A decoding bit setting unit for receiving a decoded bit output enable signal, temporarily holding the input code bits in a predetermined form, and outputting decoded bits; , The dominant symbol is n
When the input code word is mispredicted, the next code bit is input. When the value is a value per prediction, the dominant symbol is n-
m pieces (m is an integer of 1 or more and smaller than n) are continuously written to the decoding bit setting section, and when the prediction is incorrect, the next code is input to the prediction bit length calculating section again.

【0041】このため、予測が当たっている場合、1つ
の符号語でn個の優勢シンボルを復号でき、しかも、ビ
ット・プレート毎に符号化しているので、伸長効率が高
くなり、復号速度が速くなる。さらに、予測が当たって
いればいる程、1つの符号語で復号できる優勢シンボル
の数を多くできるので一層伸長効率が高くなると共に、
復号速度が速くなる。加えて、予測はずれのときに予測
ビット長を減らす作業を再帰的に繰り返し、最終的に劣
勢シンボルを復号化しているので、予測はずれが生じて
も効率的にデータを復号化できる。
For this reason, when the prediction is correct, n dominant symbols can be decoded with one code word, and since the encoding is performed for each bit plate, the decompression efficiency is high and the decoding speed is high. Become. Furthermore, as the prediction is more successful, the number of dominant symbols that can be decoded with one codeword can be increased, so that the decompression efficiency is further increased, and
The decoding speed increases. In addition, since the operation of reducing the prediction bit length is recursively repeated at the time of misprediction, and finally the inferior symbol is decoded, data can be efficiently decoded even if misprediction occurs.

【0042】また、請求項18記載の多値情報源のデー
タ符号化方法では、複数のビットからなる多値情報源を
レベル・プレーンに分け、各レベル・プレーンの“0”
および“1”からなる2値のビット列を入力する際、
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個連続すると予測し、そのn個を予測ビ
ット数として設定する予測設定工程と、入力された予測
ビット数からなる注目系列について予測が当たったとき
に符号語として“0”または“1”のいずれか一方の信
号を予測当たり信号として出力し、次のn個のビット列
を符号化する作業に移り、はずれたときに符号語として
“0”または“1”のいずれか他方の信号を予測はずれ
信号として出力する予測結果出力工程と、予測が所定回
数はずれたときに予測ビット数をn個より少ない新減少
予測ビット数として同様の予測設定工程と予測出力工程
とを再帰的に繰り返して行なうようにしている。
In the data encoding method for a multi-valued information source according to the eighteenth aspect, the multi-valued information source comprising a plurality of bits is divided into level planes, and "0" of each level plane is divided.
When inputting a binary bit string consisting of
A prediction setting step of setting one of “0” and “1” as a dominant symbol, setting the other as a dominant symbol, predicting that the dominant symbol is continuous n, and setting the n as the number of bits to be predicted And, when prediction is performed on a target sequence consisting of the number of input prediction bits, one of the signals “0” or “1” is output as a signal per prediction as a codeword, and the next n bit strings are output. The encoding operation is started, and a prediction result output step of outputting the other signal of either “0” or “1” as a code word as a de-prediction signal when the prediction is deviated, and a prediction bit when the prediction is deviated a predetermined number of times. The same prediction setting step and prediction output step are recursively repeated by setting the number as the new reduced prediction bit number smaller than n.

【0043】このように、優勢シンボルがn個連続する
ことを予測し、予測が当たったときには、n個のビット
が1つの予測当たり信号等で表示されることとなり、し
かも、レベル・プレーンに分けて符号化しているので、
圧縮効率が高まると共に符号化速度が速くなる。さら
に、予測がはずれると、予測ビット数を減少させ、次の
予測を行うようにしたので、予測がはずれても圧縮効率
や符号化速度はそれ程減少しない。
As described above, it is predicted that n dominant symbols are continuous, and when the prediction is successful, n bits are displayed as one signal per prediction or the like, and are divided into level planes. Encoding
The encoding speed increases as the compression efficiency increases. Further, if the prediction is incorrect, the number of predicted bits is reduced and the next prediction is performed. Therefore, even if the prediction is lost, the compression efficiency and the encoding speed do not decrease so much.

【0044】また、請求項19記載の多値情報源のデー
タ符号化方法では、複数のビットからなる多値情報源を
レベル・プレーンに分け、各レベル・プレーンの“0”
および“1”からなる2値のビット列を入力する際、
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個連続すると予測し、そのn個を予測ビ
ット数として設定する予測設定工程と、入力された予測
ビット数からなる注目系列について予測が当たったとき
に符号語として“0”または“1”のいずれか一方の信
号を予測当たり信号として出力し、次のn個のビット列
を符号化する作業に移り、はずれたときに符号語として
“0”または“1”のいずれか他方の信号を予測はずれ
信号として出力する予測結果出力工程と、予測が規定回
数当たったときに、予測ビット数をn個より多い新増加
予測ビット数として同様の予測設定工程と予測結果出力
工程とを繰り返し行わせている。
In the data encoding method for a multi-valued information source according to the nineteenth aspect, the multi-valued information source composed of a plurality of bits is divided into level planes, and "0" of each level plane is divided.
When inputting a binary bit string consisting of
A prediction setting step of setting one of “0” and “1” as a superior symbol and the other as an inferior symbol, predicting that the n superior symbols are continuous, and setting the n as the number of prediction bits. When a prediction is hit for a sequence of interest consisting of the number of input prediction bits, either a signal of “0” or “1” is output as a signal per prediction as a signal per prediction, and the next n bit strings are output. The operation shifts to encoding, and a prediction result output step of outputting the other signal of either “0” or “1” as a codeword when it is out of order as a prediction error signal. The same prediction setting step and prediction result output step are repeatedly performed with the number of bits being the new increase prediction bit number larger than n.

【0045】この結果、予測が当たると、n個のビット
が1つの予測当たり信号等で表示されることとなり、し
かもレベル・プレーン毎に符号化が行われるので、圧縮
効率が高まると共に符号化速度が速くなる。さらに予測
が当たれば当たる程、データの圧縮効率が一層高まると
共に符号化速度が一層速くなる。
As a result, when the prediction is successful, n bits are displayed as one signal per prediction or the like, and the encoding is performed for each level plane, so that the compression efficiency is increased and the encoding speed is increased. Is faster. The more the prediction is successful, the higher the data compression efficiency and the higher the encoding speed.

【0046】さらに、請求項20記載の多値情報源のデ
ータ符号化方法では、複数のビットからなる多値情報源
をレベル・プレーンに分け、このレベル・プレーンのう
ち、確率が集中するレベル・プレーンを独立に扱い、確
率が低いものは複数のレベル・プレーンとしてまとめる
ようにしたグループに分け、入力された多値情報源が各
グループ番号に該当するか否かの判定ビットを“0”お
よび“1”からなるビットで構成し、この判定ビット列
を入力する際、確率が集中するグループ番号側から入力
する入力工程と、各グループの判定ビットの“0”また
は“1”のいずれか一方を優勢シンボルとし、いずれか
他方を劣勢シンボルとすると共に、その優勢シンボルが
n個連続すると予測し、そのn個を予測ビット数として
設定する予測設定工程と、入力された予測ビット数から
なる注目系列について予測が当たったときに符号語とし
て“0”または“1”のいずれか一方の信号を予測当た
り信号として出力し、次のn個のビット列を符号化する
作業に移り、はずれたときに符号語として“0”または
“1”のいずれか他方の信号を予測はずれ信号として出
力する予測結果出力工程と、予測が所定回数はずれたと
きに予測ビット数をn個より少ない新減少予測ビット数
として同様の予測設定工程と予測出力工程とを再帰的に
繰り返す再帰的工程と、判定ビットが当該グループに該
当する旨の信号のときには当該入力シンボルの符号化を
完了し、そうでない場合には、当該グループより確率が
集中しないグループの判定ビットに対し、予測設定工程
と予測結果出力工程と再帰的工程とを実行するようにし
ている。
Further, in the data encoding method for a multi-level information source according to the twentieth aspect, the multi-level information source comprising a plurality of bits is divided into level planes. The planes are handled independently, and the planes with low probabilities are divided into groups in which they are grouped as a plurality of level planes. The determination bit for determining whether or not the input multi-valued information source corresponds to each group number is “0” and When inputting this judgment bit string, the input step of inputting from the group number side where the probability is concentrated and one of the judgment bits “0” or “1” of each group are input. Prediction setting in which a dominant symbol is set as one and the other is set as a non-dominant symbol, and that n dominant symbols are predicted to be continuous, and that n is set as a prediction bit number. Then, when prediction is performed on a target sequence consisting of the number of input prediction bits, one of the signals “0” or “1” is output as a codeword per prediction, and the next n bit strings are output. A prediction result output step of outputting the other signal of either “0” or “1” as a code word as a prediction error signal when the prediction is deviated, and a prediction result when the prediction is deviated a predetermined number of times. A recursive step of recursively repeating the same prediction setting step and prediction output step with the number of bits being a new reduced prediction bit number less than n; If the encoding is completed, and if not, the prediction setting step, the prediction result output step, and the recursive step It is to be executed.

【0047】このように、レベル・プレーンに分けてか
つ確率が集中するレベル・プレーンのみ独立に扱い、確
率の集中が低いものは複数のプレーンをまとめて取り扱
うようにしているので、符号化すべきレベル・プレーン
数を削減でき、予測ビット数runの管理等のためのメ
モリを削減できる。しかも、符号化効率はそれ程落ちる
ことがない。また、優勢シンボルがn個連続することを
予測し、予測が当たったときには、n個のビットが1つ
の予測当たり信号等で表示されることとなり、圧縮効率
が高まると共に符号化速度が速くなる。さらに、予測が
はずれると、予測ビット数を減少させ、次の予測を行う
ようにしたので、予測がはずれても圧縮効率や符号化速
度はそれ程減少しない。
As described above, only the level planes which are divided into level planes and have a high probability concentration are handled independently, and those having a low probability concentration are handled collectively by a plurality of planes. The number of planes can be reduced, and the memory for managing the predicted bit number run can be reduced. Moreover, the coding efficiency does not decrease so much. Further, it is predicted that n dominant symbols are consecutive, and when the prediction is successful, n bits are displayed as one signal per prediction or the like, so that the compression efficiency increases and the encoding speed increases. Further, if the prediction is incorrect, the number of predicted bits is reduced and the next prediction is performed. Therefore, even if the prediction is lost, the compression efficiency and the encoding speed do not decrease so much.

【0048】加えて、請求項21記載の発明では、請求
項18、19または20記載の多値情報源のデータ符号
化方法において、n個を2m(mは0以上の整数)個と
している。このため、予測がはずれたときの分割を均等
分割できると共にどんどん分割でき最後に1個のビット
数とすることができる。
In addition, in the invention according to claim 21, in the data encoding method for a multilevel information source according to claim 18, 19 or 20, n is 2 m (m is an integer of 0 or more). . For this reason, when the prediction is incorrect, the division can be equally divided, and the division can be performed rapidly, and finally the number of bits can be one.

【0049】また、請求項22記載の発明では、請求項
21記載の多値情報源のデータ符号化方法において、予
測がはずれたとき注目系列を2分割し、2分割された前
半部の前半部注目系列がすべて優勢シンボルのときは符
号語として“0”を出力し、2分割された後半部の後半
部注目系列をさらに2分割し、“0”または“1”の符
号語を出力する前半部当たり工程と、前半部注目系列に
劣勢シンボルが存在するときは符号語として“1”を出
力すると共に、前半部注目系列をさらに2分割し、
“0”または“1”の符号語を出力する前半部はずれ工
程を有し、各分割された注目系列中に劣勢シンボルが存
在する限り、その注目系列の分割を繰り返し、前半部当
たり工程と前半部はずれ工程を再帰的に繰り返してい
る。
According to a twenty-second aspect of the present invention, in the data encoding method for a multi-valued information source according to the twenty-first aspect, when the prediction is incorrect, the sequence of interest is divided into two parts, and the first half part of the first half part is divided. When all the sequences of interest are predominant symbols, "0" is output as a codeword, and the latter half of the half-part sequence of interest is further divided into two, and the first half of outputting a codeword of "0" or "1". When the inferior symbol exists in the first half attention sequence, the codeword outputs “1” and further divides the first half attention sequence into two,
The first half has a step of outputting a code word of “0” or “1”, and as long as the inferior symbol exists in each divided sequence of interest, the division of the sequence of interest is repeated. The part removal process is recursively repeated.

【0050】この結果、QMコーダと同様な圧縮効率を
達成できると共にQMコーダの数倍の符号化速度を達成
できることとなる。
As a result, the same compression efficiency as that of the QM coder can be achieved, and the coding speed several times higher than that of the QM coder can be achieved.

【0051】また、請求項23記載の多値情報源のデー
タ符号化装置では、複数のビットからなる多値情報源を
レベル・プレーンに分け、このレベル・プレーンのう
ち、確率が集中するレベル・プレーンを独立に扱い、確
率が低いものは複数のレベル・プレーンとしてまとめる
ようにしたグループに分け、入力された多値情報源が各
グループ番号に該当するか否かの判定ビットを“0”お
よび“1”からなるビットで構成し、この判定ビットの
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共にその優勢
シンボルがn個連続すると予測し、そのn個を予測ビッ
ト数として設定する予測ビット長等演算設定部と、入力
ビット系列を一時記憶するバッファレジスタと、予測ビ
ット長等演算設定部およびバッファレジスタの各値を入
力し、その入力された予測ビット数からなる注目系列に
ついて予測が当たったときに符号語として“0”または
“1”のいずれか一方の信号を予測当たり信号として出
力し、はずれたときに符号語として“0”または“1”
のいずれか他方の信号を予測はずれ信号として出力する
判定部とを備え、予測が所定回数はずれたときに予測ビ
ット数をn個より少ない新減少予測ビット数を予測ビッ
ト長等演算設定部で設定し、予測が規定回数当たったと
きに予測ビット数をn個より多い新増加予測ビット数を
予測ビット長等演算設定部で設定している。
Further, in the data encoding apparatus for a multi-valued information source according to the present invention, the multi-valued information source comprising a plurality of bits is divided into level planes. The planes are handled independently, and the planes with low probabilities are divided into groups in which they are grouped as a plurality of level planes. The determination bit for determining whether or not the input multi-valued information source corresponds to each group number is “0” and It is composed of bits consisting of “1”, and one of the determination bits “0” or “1” is set as the dominant symbol, the other is set as the inferior symbol, and it is predicted that the number of the dominant symbols is n consecutive. A prediction bit length calculation setting section for setting the n bits as the prediction bit number, a buffer register for temporarily storing an input bit sequence, a prediction bit length calculation setting section, and the like. And the values of the buffer register are input, and when a prediction is hit for the sequence of interest consisting of the input number of prediction bits, one of the signals "0" or "1" is output as a codeword as a signal per prediction. And when it deviates, the code word is "0" or "1".
And a decision unit for outputting one of the other signals as a misprediction signal, and when the prediction is deviated a predetermined number of times, the number of predicted bits is set to a new reduced prediction bit number smaller than n by a prediction bit length etc. calculation setting unit. When the number of predictions reaches a predetermined number, the number of prediction bits is set to a new increase prediction bit number larger than n by a prediction bit length or the like calculation setting unit.

【0052】この結果、予測が当たればn個のビットが
1つの予測当たり信号等で表示されることとなり、しか
も、レベル・ブレーン毎に符号化しているので、圧縮効
率が高まると共に符号化速度が速くなる。しかも、予測
が当たれば当たる程、予測ビット数を多くしているの
で、一層圧縮効率が高まることとなる。加えて、予測が
はずれると、予測ビット数を減少させているので、予測
がはずれても圧縮効率や符号化速度はそれ程減少するこ
とはない。また、確率の集中が低いレベル・プレーンを
複数まとめて取り扱うようにしているので効率の低下を
押さえながら符号化すべきレベル・プレーン数を削減す
ることができる。
As a result, if the prediction is successful, n bits are displayed as one signal per prediction or the like, and the encoding is performed for each level / brain, so that the compression efficiency is increased and the encoding speed is increased. Be faster. Moreover, the more the prediction is successful, the greater the number of predicted bits, so that the compression efficiency is further improved. In addition, if the prediction is incorrect, the number of predicted bits is reduced, so that even if the prediction is incorrect, the compression efficiency and the encoding speed do not decrease so much. In addition, since a plurality of level planes having a low probability concentration are handled collectively, the number of level planes to be encoded can be reduced while suppressing a decrease in efficiency.

【0053】さらに、請求項24記載の多値情報源のデ
ータ符号化装置では、複数のビットからなる多値情報源
をレベル・プレーンに分け、このレベル・プレーンのう
ち、確率が集中するレベル・プレーンを独立に扱い、確
率が低いものは複数のレベル・プレーンとしてまとめる
ようにしたグループに分け、入力された多値情報源が各
グループ番号に該当するか否かの判定ビットを“0”お
よび“1”からなるビットで構成し、この判定ビットか
らなる入力ビット系列を一時記憶するレジスタ群よりな
るバッファレジスタと、符号化する注目系列の先頭位置
を示す変数ofsを保持するレジスタおよび予測ビット
長を示す変数widthを保持するレジスタを内蔵する
予測ビット長演算部と、この予測ビット長演算部が出力
するバッファレジスタ上のofsの位置およびそのof
sからwidthにより定まるバッファレジスタ上の入
力ビット系列を選択し、その入力ビット系列がすべて優
勢シンボルのとき符号ビット出力として1つの優勢シン
ボルを出力し、劣勢シンボルが含まれるときは1つの劣
勢シンボルを出力する判定部と、バッファレジスタ内の
入力ビット系列の符号化が完了した旨の完了信号を予測
ビット長演算部より受けたとき入力ビット要求を行う入
出力制御信号発生部と、刻々変化するwidthの値を
保持しておくためのメモリとなるスタック・メモリと、
予測ビット長演算部より過去の符号化の状態を入力し、
新たに入力する入力ビット系列の予測ビット長と優勢シ
ンボルを設定する予測ビット長・優勢シンボル設定部と
を備え、入出力制御信号発生部は完了信号を予測ビット
長演算部より受けたとき、バッファレジスタに対して予
測ビット長・演算シンボル設定部によって新たに設定さ
れた新予測ビット長で示される個数の入力ビット系列の
取り込みを指示している。
Further, in the data encoding apparatus for a multi-valued information source according to claim 24, the multi-valued information source composed of a plurality of bits is divided into level planes. The planes are treated independently, and the planes with low probabilities are divided into groups in which they are grouped as a plurality of level planes. The determination bit for determining whether or not the input multi-valued information source corresponds to each group number is “0” and A buffer register consisting of a group of registers for temporarily storing an input bit sequence consisting of this determination bit, a register for holding a variable ofs indicating the head position of the target sequence to be encoded, and a prediction bit length And a buffer register output by the predicted bit length operation unit. Position and of the ofs on other
An input bit sequence on the buffer register determined by width from s is selected, and when all the input bit sequences are predominant symbols, one predominant symbol is output as a code bit output, and when a predominant symbol is included, one inferior symbol is output. A determining unit for outputting, an input / output control signal generating unit for issuing an input bit request when receiving a completion signal indicating that encoding of the input bit sequence in the buffer register is completed from the predicted bit length calculating unit, and a constantly changing width A stack memory serving as a memory for holding the value of
Input the past encoding status from the prediction bit length calculation unit,
A predicted bit length of a newly input bit sequence and a predicted bit length / dominant symbol setting unit for setting a superior symbol, wherein the input / output control signal generation unit receives a completion signal from the prediction bit length calculation unit, The register is instructed to take in the number of input bit sequences indicated by the new prediction bit length newly set by the prediction bit length / operation symbol setting unit.

【0054】このように、刻々変化するwidthによ
って予測ビット長を変化させているので、予測が当たれ
ばn個のビットが1つの予測当たり信号等で表示される
こととなり、しかも、レベル・プレーン毎に符号化して
いるので、圧縮効率が高まると共に符号化速度が速くな
る。さらに、予測が当たれば当たる程、予測ビット数を
多くしているので、一層圧縮効率が高まることとなる。
加えて、予測がはずれると、予測ビット数を減少させて
いるので、予測がはずれても圧縮効率や符号化速度はそ
れ程減少することはない。また、確率の集中が低いレベ
ル・プレーンを複数まとめて取り扱うようにしているの
で効率の低下を押さえながら符号化すべきレベル・プレ
ーン数を削減することができる。
As described above, since the prediction bit length is changed by the ever-changing width, if prediction is successful, n bits will be displayed as one signal per prediction, and moreover, each level plane , The compression efficiency is increased and the encoding speed is increased. Furthermore, the more the prediction is successful, the greater the number of prediction bits, so that the compression efficiency is further improved.
In addition, if the prediction is incorrect, the number of predicted bits is reduced, so that even if the prediction is incorrect, the compression efficiency and the encoding speed do not decrease so much. In addition, since a plurality of level planes having a low probability concentration are handled collectively, the number of level planes to be encoded can be reduced while suppressing a decrease in efficiency.

【0055】本発明の多値情報源のデータ符号化方法お
よびデータ符号化装置では、多値情報源をビット・プレ
ーンに分けたり、グループに分けたレベル・プレーンで
示したりすることによって2値のビット列を形成する。
そして、その2値のビット列を入力する際、“0”か
“1”を優勢シンボルと定め、その優勢シンボルがn個
連続すると予測する。この予測が当たったときは、符号
語として“0”または“1”のいずれか一方を出力し、
符号化を完了する。はずれた場合は、“0”または
“1”のいずれか他方を出力すると共に、その注目系列
を分割し、それぞれの分割された系列の信号状態を上述
と同様な方法で確認し符号化していく。そして、予測が
当たるか分割が不可能になるまで、同様の分割と予測を
繰り返し符号化する。また、最初の予測ビット数nを予
測の当たりはずれに応じて変化させ、注目系列の確率変
動に追随させている。
In the data encoding method and data encoding apparatus for a multi-valued information source according to the present invention, the multi-valued information source is divided into bit planes or indicated by level planes divided into groups, so that a binary value is represented. Form a bit string.
Then, when the binary bit string is input, “0” or “1” is determined as a dominant symbol, and it is predicted that n dominant symbols will continue. When this prediction is successful, either “0” or “1” is output as a codeword,
Complete the encoding. If it deviates, either "0" or "1" is output, the target sequence is divided, and the signal state of each divided sequence is confirmed and encoded in the same manner as described above. . Then, the same division and prediction are repeatedly coded until prediction is achieved or division becomes impossible. In addition, the initial number of prediction bits n is changed in accordance with the hit or miss of the prediction to follow the probability fluctuation of the sequence of interest.

【0056】また、本発明の多値情報源のデータ復号化
方法およびデータ復号化装置では、先に示した多値情報
源のデータ符号化方法およびデータ符号化装置とは、逆
のアルゴリズムを使用して復号化している。
Further, in the data decoding method and data decoding apparatus for a multi-valued information source according to the present invention, an inverse algorithm is used for the data coding method and data encoding apparatus for a multi-valued information source described above. And decrypt it.

【0057】[0057]

【発明の実施の形態】以下、本発明の実施の形態の例を
図1から図17に基づき説明する。なお、最初に、多値
情報源が2値化された以後の2値のビット列の圧縮、伸
長について説明し、その後、多値情報源をこの圧縮、伸
長方法に適した2値のビット列にする方法等について説
明することにする。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. First, compression and decompression of a binary bit string after the multi-valued information source is binarized will be described, and then the multi-valued information source will be converted into a binary bit string suitable for this compression and decompression method. The method and the like will be described.

【0058】まず、本発明に使用する基本アルゴリズム
の概要およびその動作等について図1から図10に基づ
いて説明する。この発明のアルゴリズムは、QMコーダ
と同様、2値のビット列を圧縮の対象としている。まず
初期値として、“0”か“1”のいずれかを優勢シンボ
ルと定め、そのシンボルが連続すると予測する個数ru
nを設定する。入力系列の出現確率が不明の場合は、r
unを1に設定するのが良い。その上で、以下に示すよ
うなルールに従い符号化を進める。なお、個数runが
予測ビット数に相当する。
First, the outline of the basic algorithm used in the present invention and its operation will be described with reference to FIGS. The algorithm of the present invention, like the QM coder, compresses a binary bit string. First, as an initial value, either “0” or “1” is determined as a dominant symbol, and the number ru that the symbol is predicted to be continuous is determined.
Set n. If the appearance probability of the input sequence is unknown, r
It is better to set un to 1. Then, the encoding is performed according to the following rules. Note that the number run corresponds to the number of predicted bits.

【0059】図1に示すように、runで示される注目
系列がすべて優勢シンボルであると予測し、予測が当た
ったとき、符号語として“0”を出力し、この系列の符
号化を完了する。はずれた場合は“1”を出力し、次の
分割符号化工程を実行する。予測がはずれた場合は、図
2に示すように注目系列を前半部系列と後半部系列の2
つに分け、前半部がすべて優勢シンボルのときは符号語
として“0”を出力して、前半部系列の符号化を完了す
る。前半部系列に劣勢シンボルが存在するときは、符号
語として“1”を出力し、次の再分割の工程を実行す
る。前半部系列の符号化が完了したら注目系列を後半部
に移し、前半部系列と同様に符号化する。劣勢シンボル
が存在する系列は、可能な限り系列を分割して上述の分
割符号化工程を繰り返す。
As shown in FIG. 1, all the sequences of interest indicated by "run" are predicted to be dominant symbols, and when the prediction is successful, "0" is output as a codeword and the coding of this sequence is completed. . If it deviates, "1" is output, and the next division encoding step is executed. If the prediction is incorrect, as shown in FIG.
When the first half is all dominant symbols, "0" is output as a codeword, and the coding of the first half sequence is completed. When the inferior symbol exists in the first half sequence, "1" is output as a codeword, and the next subdivision process is executed. When encoding of the first half sequence is completed, the sequence of interest is moved to the second half, and encoding is performed in the same manner as the first half sequence. For the sequence in which the inferior symbol exists, the sequence is divided as much as possible, and the above-described division encoding process is repeated.

【0060】なお、分割は必ずしも2つの均等分割とす
る必要はなく、不均等な分割としたり3つ以上の分割と
しても良い。また、予測が当たったとき“0”ではな
く、優勢シンボルを出力し、はずれた場合“1”ではな
く、劣勢シンボルを出力するようにしたり、予測当たり
で“1”を、予測はずれで“0”を出力するようにして
も良い。
Note that the division need not necessarily be two equal divisions, but may be non-uniform divisions or three or more divisions. In addition, when a prediction is successful, a superior symbol is output instead of “0”. When the prediction is incorrect, an inferior symbol is output instead of “1”. "May be output.

【0061】以上がこの発明の基本となる2値化された
ビット列のデータ符号化の基本アルゴリズムであるが、
さらに、入力系列の出現確率の変化に追随し、符号化効
率を向上させるため、以下の処理を加えるようにしても
良い。すなわち、runで予測した系列が続けて所定回
数、例えば、2回当たったとき、runを2倍等に増加
させる。なお、予測が的中し続けた場合、さらに予測範
囲を拡大していくようにしても良い。また、runで予
測した系列の後半部系列に劣勢シンボルが存在すると
き、runを1/4等に減少させるようにしても良い。
これは、後半部に劣勢シンボルが存在するときは、次に
続く系列に劣勢シンボルが多く含まれると判断されてい
るためである。このため、runで予測した系列の前半
部系列のみに劣勢シンボルが存在するときは、後半部に
劣勢シンボルが存在するときより多い値、例えばrun
を1/2倍するようにしても良い。そして、runが1
で、それが劣勢シンボルのときは、以降の入力系列を反
転させる。すなわち、優勢シンボルを変更させる。
The above is the basic algorithm of data encoding of a binary bit string which is the basis of the present invention.
Further, the following processing may be added in order to follow the change in the appearance probability of the input sequence and improve the coding efficiency. That is, when the sequence predicted by run hits a predetermined number of times consecutively, for example, twice, run is increased twice or the like. If the prediction continues to be correct, the prediction range may be further expanded. Further, when the inferior symbol exists in the latter half of the sequence predicted by run, run may be reduced to 1/4 or the like.
This is because, when the inferior symbol exists in the latter half, it is determined that the following sequence includes many inferior symbols. Therefore, when the inferior symbol exists only in the first half sequence of the sequence predicted by run, a value larger than when the inferior symbol exists in the second half, for example, run
May be multiplied by 1 /. And run is 1
If it is a lesser symbol, the subsequent input sequence is inverted. That is, the dominant symbol is changed.

【0062】この発明に使用する2値化されたビット列
の符号化プロセスは、図4の符号化メインルーチンと図
5の符号化サブルーチンにより構成される。なお、図5
中の符号化サブルーチンは、サブルーチンから同じサブ
ルーチンを呼び出すいわゆる関数の再帰読出しを行って
いる。
The encoding process of the binarized bit string used in the present invention comprises an encoding main routine shown in FIG. 4 and an encoding subroutine shown in FIG. FIG.
The encoding subroutine in the figure performs recursive reading of a function that calls the same subroutine from the subroutine.

【0063】まず、図4の符号化メインルーチンの各ス
テップについて説明する。なお、符号化の対象は2値の
ビット列からなる入力系列となっている。最初に、予測
の初期値runの設定と優勢シンボルの選択(“0”ま
たは“1”)を行う(ステップS0)。次に、ローカル
変数ofsに0を、widthにrunを代入する(ス
テップS1)。ここでofsは、符号化のために予め定
義した配列Aのポインタで、予測開始ビット位置を示
す。したがって初期値は0となる。widthはofs
で示したビット位置から何ビットを予測の対象にするか
を示す値で、ここでは、予測の初期値runが代入され
る。その後、予め定義した配列AのA〔ofs〕からA
〔width−1〕までに入力ビットを書き込む(ステ
ップS2)。そして、A〔ofs〕からA〔width
−1〕のすべての要素が優勢シンボルのときステップS
4へ進み、ひとつでも劣勢シンボルが含まれているとき
は、ステップS5へ進む。
First, each step of the encoding main routine of FIG. 4 will be described. The encoding target is an input sequence composed of binary bit strings. First, a prediction initial value run is set and a dominant symbol is selected ("0" or "1") (step S0). Next, 0 is substituted for the local variable ofs and run is substituted for the width (step S1). Here, ofs is a pointer of the array A defined in advance for encoding, and indicates a prediction start bit position. Therefore, the initial value is 0. width is ofs
Is a value indicating how many bits are to be predicted from the bit positions indicated by. In this case, the initial value of prediction run is substituted. Then, from A [ofs] of the predefined sequence A to A
Input bits are written by [width-1] (step S2). Then, from A [ofs] to A [width
-1] when all elements are dominant symbols in step S
The process proceeds to step S4, and if at least one inferior symbol is included, the process proceeds to step S5.

【0064】予測が的中した場合、符号語として予測当
たり信号“0”を出力し、配列Aに取り込んだ系列の符
号化を完了する(ステップS4)。一方、予測はずれた
場合、符号語として予測はずれ信号“1”を出力する
(ステップS5)。そして、widthが1以上か否か
を検出する(ステップS6)。widthが1以下なら
これ以上分割できないので、ステップS7の符号化サブ
ルーチンへは移行せずステップS8へ移行する。一方、
widthが1を超えていると、図5の符号化サブルー
チンを呼び出す(ステップS7)。
If the prediction is correct, a signal "0" is output per prediction as a code word, and the encoding of the sequence taken into array A is completed (step S4). On the other hand, if the prediction is incorrect, a mispredicted signal "1" is output as a code word (step S5). Then, it is detected whether the width is 1 or more (step S6). If the width is equal to or less than 1, the image cannot be further divided, so that the process proceeds to step S8 without going to the encoding subroutine of step S7. on the other hand,
If the width exceeds 1, the encoding subroutine of FIG. 5 is called (step S7).

【0065】ステップS8では、予測runの再設定と
必要ならば優勢シンボルの変更を行う。すなわち、この
ステップS8においては、基本的には予測が的中すれ
ば、runを大きくし、はずれれば小さくする。そして
runを小さくしても予測が所定回数はずれ続けるよう
なら、優勢シンボルの変更を行う。なお、予測の的中や
予測のはずれをどのように評価するかについては、さま
ざまな方法を採用することができる。たとえば、予測が
はずれた場合、直ちにrunを小さくしたり、2回以上
連続してはずれたとき、初めてrunを小さくする等の
方法を採用することができる。さらに、前半部系列もし
くは後半部系列のみはずれた場合と、両方はずれた場合
とでrunの縮小の度合いを異ならせる方法も採用でき
る。また、符号済みビット系列で所定の確率テーブルを
引き、次の予測runを設定する等の方式も採用可能で
ある。
In step S8, the prediction run is reset and, if necessary, the dominant symbol is changed. That is, in this step S8, basically, if the prediction is correct, the run is increased, and if it is off, the run is reduced. If the prediction continues to shift a predetermined number of times even when run is reduced, the dominant symbol is changed. It should be noted that various methods can be adopted as to how to evaluate a hit or a wrong prediction. For example, it is possible to adopt a method in which the run is reduced immediately when the prediction is incorrect, or the run is reduced for the first time when the prediction is incorrectly performed two or more times. Furthermore, a method in which the degree of run reduction differs between when the first half sequence or the second half sequence is deviated and when both are deviated may be adopted. It is also possible to adopt a method of drawing a predetermined probability table with an encoded bit sequence and setting the next prediction run.

【0066】符号化メインルーチンで1次予測がはずれ
た場合は、ステップS7で図5に示す符号化サブルーチ
ンを呼び出す。符号化サブルーチンへ渡す引き数は、o
fsとwidthである。以下、符号化サブルーチンの
各ステップについて説明する。
If the primary prediction deviates in the encoding main routine, the encoding subroutine shown in FIG. 5 is called in step S7. The argument passed to the encoding subroutine is o
fs and width. Hereinafter, each step of the encoding subroutine will be described.

【0067】符号化サブルーチンでは、予測を前半部系
列と後半部系列に分けて行うため、予測の範囲を半分に
する(ステップS10)。すなわち、親ルーチンから引
き数として受け取ったwidthを1/2にする。そし
て、次のステップS11で、前半部系列(配列のA〔o
fs〕からA〔ofs+width−1〕まで)がすべ
て優勢シンボルか否かをチェックする。すべて優勢シン
ボルならステップS12へ進む。ひとつでも劣勢シンボ
ルが存在したら、直ちにステップS14へ進む。
In the encoding subroutine, the prediction is divided into the first half sequence and the second half sequence, so that the prediction range is halved (step S10). That is, the width received as an argument from the parent routine is halved. Then, in the next step S11, the first half series (array A [o
fs] to A [ofs + width-1]) are all checked symbols. If all the symbols are superior, the process proceeds to step S12. If at least one inferior symbol exists, the process immediately proceeds to step S14.

【0068】前半部系列がすべて優勢シンボルなら、符
号語として“0”を出力する(ステップS12)。そし
て、前半部系列の先頭位置を示すポインタofsにwi
dthを加え、後半部系列の先頭位置を示すように変更
する。また、前半部系列がすべて優勢シンボルのとき
は、後半部系列に必ず劣勢シンボルが存在するので、後
半部系列の予測がはずれたことを示す符号語“1”を出
力する必要がない。したがって、後述するステップS2
0はスキップし、ステップS21に進む。
If all the first half sequences are dominant symbols, "0" is output as a codeword (step S12). Then, the pointer ofs indicating the head position of the first half series is set to wi.
dth is added to change to indicate the head position of the latter half series. Further, when the first half sequence is all dominant symbols, since the inferior symbol always exists in the second half sequence, there is no need to output the code word “1” indicating that the prediction of the second half sequence has been lost. Therefore, step S2 described later
0 is skipped, and the process proceeds to step S21.

【0069】一方、前半部系列に劣勢シンボルが存在す
る場合、符号語として“1”を出力する(ステップS1
4)。次に、widthが1を超えているか否かをチェ
ックする(ステップS15)。1以下の場合、これ以上
分割できないので、子の符号化サブルーチン(ステップ
S16)の呼び出しをスキップし、ステップS17へ移
行する。なお、widthが2以上なら、さらに系列を
2つに分け、それぞれを符号化しなければならない。そ
のための子の符号化サブルーチンを呼び出す(ステップ
S16)。子の符号化サブルーチンは、図5に示した符
号化サブルーチンと全く同一となっている。つまり、こ
こでは、同一ルーチン(関数)の再帰呼び出しを行う。
On the other hand, when the inferior symbol exists in the first half sequence, "1" is output as the code word (step S1).
4). Next, it is checked whether or not the width exceeds 1 (step S15). If the value is equal to or less than 1, the image cannot be further divided, so that the call of the child encoding subroutine (step S16) is skipped, and the process proceeds to step S17. If the width is 2 or more, it is necessary to further divide the sequence into two and encode each of them. The child encoding subroutine for that purpose is called (step S16). The child encoding subroutine is exactly the same as the encoding subroutine shown in FIG. That is, here, the same routine (function) is recursively called.

【0070】符号化サブルーチンの再帰呼び出しによっ
て前半部系列の符号化を終了すると、前半部系列の先頭
位置を示すポインタofsにステップS10で設定した
widthを加え、後半部系列の先頭位置を示すように
変更する(ステップS17)。その後、後半部系列(配
列のA〔ofs〕からA〔ofs+width−1〕ま
で)がすべて優勢シンボルか否かをチェックする(ステ
ップS18)。すべて優勢シンボルならステップS19
へ進む。ひとつでも劣勢シンボルが存在したら、直ちに
ステップS20へ進む。そして、後半部系列がすべて優
勢シンボルなら、符号語として“0”を出力する(ステ
ップS19)。
When the encoding of the first half sequence is completed by recursive calling of the encoding subroutine, the width set in step S10 is added to the pointer ofs indicating the head position of the first half sequence, and the start position of the second half sequence is indicated. It is changed (step S17). Thereafter, it is checked whether or not all the latter half sequences (from A [ofs] to A [ofs + width-1] in the arrangement) are all the dominant symbols (step S18). If all symbols are superior, step S19
Proceed to. If at least one inferior symbol exists, the process immediately proceeds to step S20. If all of the latter half sequences are dominant symbols, "0" is output as a codeword (step S19).

【0071】一方、前半部系列に劣勢シンボルが存在す
る場合、符号語として“1”を出力する(ステップS2
0)。そして、次に、widthが1を超えているか否
かをチェックする(ステップS21)。1以下の場合、
これ以上分割できないので、子の符号化サブルーチンを
実行するステップS22をスキップし、次の注目系列の
符号化工程へリターンする。なお、後半部系列について
も、widthが2以上なら、さらに系列を2つに分
け、それぞれ符号化する。そのため図5に示す符号化サ
ブルーチンと同一の子の符号化サブルーチンを呼び出す
(ステップS22)。この符号化サブルーチンの再帰呼
び出しによって後半部系列の符号化を実行する。
On the other hand, when the inferior symbol exists in the first half sequence, "1" is output as the code word (step S2).
0). Then, it is checked whether the width exceeds 1 (step S21). If less than 1,
Since the image cannot be further divided, the step S22 of executing the child encoding subroutine is skipped, and the process returns to the encoding process of the next sequence of interest. If the width of the latter half sequence is 2 or more, the sequence is further divided into two and encoded. Therefore, an encoding subroutine of the same child as the encoding subroutine shown in FIG. 5 is called (step S22). By the recursive call of this encoding subroutine, encoding of the latter half part series is executed.

【0072】以上のような2値化ビット列の符号化プロ
セスの具体例を次に説明する。すなわち、符号化の具体
例として、予測の初期値runを8、優勢シンボルを
“0”として、“00001001”として表される入
力ビットを符号化する場合について説明する。
A specific example of the above-described encoding process of a binary bit string will be described below. That is, as a specific example of encoding, a case will be described where the initial value of prediction run is 8, the dominant symbol is "0", and the input bit represented as "000000101" is encoded.

【0073】まず、図4の符号化メインルーチンのステ
ップS2で、A
First, in step S2 of the encoding main routine of FIG.

〔0〕からA〔7〕に、上記の入力ビッ
トを入力する。ステップS3では、A
The above input bits are input from [0] to A [7]. In step S3, A

〔0〕からA
〔7〕のすべてが“0”かどうか判定する。上の例の場
合、ビット列に“1”が含まれているので、ステップS
5に移行し、まず符号語として“1”を出力する。続い
てステップS6では、widthの大きさをチェックす
るが、widthはこのとき8なので、符号化サブルー
チン(ステップS7)に進む。
[0] to A
It is determined whether all of [7] are “0”. In the case of the above example, since “1” is included in the bit string, step S
Then, the process proceeds to step 5, where "1" is output as a codeword. Subsequently, in step S6, the size of the width is checked. Since the width is 8 at this time, the process proceeds to the encoding subroutine (step S7).

【0074】符号化サブルーチンでは、まずステップS
10で、widthを1/2の4に設定する。そしてス
テップS11で、入力ビットの前半部、つまりA
In the encoding subroutine, first, in step S
At 10, the width is set to 1/2, ie, 4. Then, in step S11, the first half of the input bit, that is, A

〔0〕
からA〔3〕がすべて0かどうかチェックする。この場
合、すべて“0”なのでステップS12に進み、符号語
として“0”を出力する。以上で前半部系列の符号化が
完了する。続いてステップS13を実行し、後半部系列
の符号化に移るが、前半部系列がすべて“0”の場合、
後半部系列に“1”が含まれるのは明らかである。した
がって、ステップS21でwidthが1以下でない限
り後半部系列をさらに分割して符号化しなければならな
い。そこで、符号化サブルーチンを子プロセスとしてス
テップS22で再び呼び出す。なお、そのための前処理
として、上述したようにステップS13では、ofsに
widthを加え、ofsを後半部系列の先頭位置にセ
ットする。
[0]
To A [3] are all 0. In this case, since all are "0", the process proceeds to step S12, and "0" is output as a codeword. Thus, the encoding of the first half sequence is completed. Subsequently, step S13 is executed, and the process shifts to the encoding of the latter half part sequence.
Obviously, the latter half series includes "1". Therefore, unless the width is not less than 1 in step S21, the latter half sequence must be further divided and encoded. Therefore, the encoding subroutine is called again in step S22 as a child process. As a pre-process for that purpose, in step S13, the width is added to ofs, and ofs is set to the head position of the latter half series, as described above.

【0075】ステップS22では、ofsとwidth
を引き数として子の符号化サブルーチンを呼び出す。子
の符号化サブルーチンを実行するステップS22では、
まず、図5に示す符号化サブルーチンのステップS10
でwidthをさらに半分にして2に変更する。次のス
テップS11では、前半部系列、すなわちA〔4〕とA
〔5〕が共に“0”であるか否かをチェックする。この
場合、A〔4〕が“1”なので、次のステップS14に
移行し、符号語として“1”を出力する。そしてステッ
プS15でwidthが1を超えていると判断し、孫プ
ロセスをステップS16で呼び出す。孫の符号化サブル
ーチンでは、まずステップS10においてwidthが
1となる。A〔4〕は“1”なのでステップS11から
ステップS14へ処理が移り、符号語“1”を出力す
る。ステップS15では、widthが1以下なので、
ステップS16をスキップし、ステップS17でofs
を5に変更する。A〔5〕は“0”なのでステップS1
8からステップS19に処理が移り、符号語“0”を出
力する。
At step S22, ofs and width
Is called as an argument, and the child encoding subroutine is called. In step S22 of executing the child encoding subroutine,
First, step S10 of the encoding subroutine shown in FIG.
The width is further halved and changed to 2. In the next step S11, the first half sequence, that is, A [4] and A
It is checked whether [5] is both "0". In this case, since A [4] is "1", the process proceeds to the next step S14, where "1" is output as a codeword. Then, in step S15, it is determined that the width exceeds 1, and the grandchild process is called in step S16. In the grandchild encoding subroutine, first, the width is set to 1 in step S10. Since A [4] is "1", the process shifts from step S11 to step S14 to output the code word "1". In step S15, since the width is 1 or less,
Step S16 is skipped.
To 5. Since A [5] is "0", step S1
From 8 the process moves to a step S19, where the codeword "0" is output.

【0076】次に、この孫の符号化サブルーチンから抜
けて、子の符号化サブルーチンのステップS17に戻
る。子の符号化サブルーチンのofsは4、width
は2であるから、ステップS17でofsは6に変更さ
れる。したがってステップS18では、A〔6〕とA
〔7〕をチェックすることになる。この場合、A〔7〕
が“1”なのでステップS20へ移行し、符号語“1”
を出力する。そして、再び孫の符号化サブルーチンをス
テップS22で呼び出す。孫の符号化サブルーチンで
は、A〔6〕が“0”なのでステップS12で符号語
“0”を出力する。そして、widthが1なので、ス
テップS22をスキップして子の符号化サブルーチンに
復帰する。
Next, the process exits from the grandchild encoding subroutine and returns to step S17 of the child encoding subroutine. Ofs of child encoding subroutine is 4, width
Is 2, so ofs is changed to 6 in step S17. Therefore, in step S18, A [6] and A
[7] will be checked. In this case, A [7]
Is "1", the process moves to step S20, and the code word "1"
Is output. Then, the grandchild encoding subroutine is called again in step S22. In the grandchild encoding subroutine, since A [6] is "0", the code word "0" is output in step S12. Since the width is 1, the process skips step S22 and returns to the child encoding subroutine.

【0077】子の符号化サブルーチンに復帰したプロセ
スは、さらに符号化メインルーチンに復帰し、ステップ
S8で予測runの再設定と、優勢シンボルの再設定を
行う。この例の場合、1次予測ははずれたが、2次予測
で前半部が的中したので、runを8から4に変更し、
優勢シンボルは引き続き“0”とする処理を施す。な
お、予測runの設定は、2回続けてはずれたときに変
更する等の設定にしても良い。
The process that has returned to the child encoding subroutine further returns to the encoding main routine, and resets the predicted run and the dominant symbol in step S8. In this example, the primary prediction was missed, but the first half was hit by the secondary prediction, so run was changed from 8 to 4,
The process of making the superior symbol continue to be “0” is performed. Note that the setting of the predicted run may be changed, for example, when the prediction run is missed twice.

【0078】以上のような2値化ビット列の符号化プロ
セスによって、入力ビットである“00001001”
が“1011010”の符号化系列となる。したがって
この場合、8ビットの入力系列が7ビットに圧縮された
ことになる。
According to the encoding process of the binary bit string as described above, the input bits “00001001”
Is the encoded sequence of “1011010”. Therefore, in this case, the 8-bit input sequence is compressed to 7 bits.

【0079】次に、以上のような2値化ビット列の符号
化プロセスを行わせるデータ符号化装置を図6に基づい
て説明する。
Next, a data encoding apparatus for performing the above-described encoding process of a binary bit string will be described with reference to FIG.

【0080】この2値化ビット列のデータ符号化装置
は、図4および図5で説明した入力ビットに相当する入
力ビット系列1を、後述する入出力制御信号発生部5の
指示により、一時記憶するレジスタ群であるバッファレ
ジスタ2と、このバッファレジスタ2のデータおよび後
述する予測ビット長演算部4のデータを入力し比較する
判定部3と、図4および図5で説明した2つの変数of
sとwidthを保持するレジスタAとレジスタBを内
蔵する予測ビット長演算部4と、入出力を制御する入出
力制御信号発生部5と、刻々変化するwidthの値を
保持しておくためのメモリであるスタック・メモリ6
と、予測ビット長となるrunと優勢シンボルを設定す
る予測ビット長・優勢シンボル設定部7とから主に構成
される。
This binary bit string data encoding device temporarily stores an input bit sequence 1 corresponding to the input bits described in FIGS. 4 and 5 in accordance with an instruction from an input / output control signal generation unit 5 described later. A buffer register 2 which is a register group, a determination unit 3 which inputs and compares data of the buffer register 2 and data of a prediction bit length calculation unit 4 described later, and two variables of described in FIG. 4 and FIG.
a predicted bit length operation unit 4 containing a register A and a register B for holding s and width, an input / output control signal generation unit 5 for controlling input / output, and a memory for holding a constantly changing width value Stack memory 6
And a run of a predicted bit length and a predicted bit length / dominant symbol setting unit 7 for setting a superior symbol.

【0081】バッファレジスタ2は、少なくとも、予測
ビット長・優勢シンボル設定部7が設定する最大予測ビ
ット長runに対応するビット数の入力ビット系列1を
記憶する容量を持っている。また、予測ビット長・優勢
シンボル設定部7の指示で、入力ビット系列1を反転さ
せて入力する機能も持っている。
The buffer register 2 has a capacity to store at least the input bit sequence 1 having the number of bits corresponding to the maximum predicted bit length run set by the predicted bit length / dominant symbol setting unit 7. Also, it has a function of inverting and inputting the input bit sequence 1 according to an instruction of the predicted bit length / dominant symbol setting unit 7.

【0082】判定部3は、予測ビット長演算部4が出力
するバッファレジスタ2上の位置ofsと、そのofs
から予測の対象となるビット数を示すwidthにより
定まるバッファレジスタ2上の入力ビット系列1を選択
し、それらがすべて“0”のとき、符号ビット10とし
て、すなわち予測当たり信号の符号語として“0”を出
力し、“1”が含まれるとき予測はずれ信号として
“1”を出力する。
The determination section 3 determines the position ofs on the buffer register 2 output from the prediction bit length calculation section 4 and the ofs of the position ofs.
, The input bit sequence 1 on the buffer register 2 determined by the width indicating the number of bits to be predicted is selected, and when they are all “0”, “0” is set as the code bit 10, that is, “0” And outputs "1" as a misprediction signal when "1" is included.

【0083】予測ビット長演算部4は、上述のとおり2
つの変数ofsとwidthを保持するレジスタAとレ
ジスタBを内蔵する。これらの変数のうちwidth
は、入出力制御信号発生部5より入力する符号化開始信
号を受けて、予測ビット長・優勢シンボル設定部7が出
力する1次予測のためのビット長runに設定され、一
方、ofsは0に初期化される。
The prediction bit length calculation unit 4 performs the
A register A and a register B that hold two variables ofs and width are incorporated. Of these variables, width
Is set to the bit length run for primary prediction output from the prediction bit length / dominant symbol setting unit 7 in response to the encoding start signal input from the input / output control signal generation unit 5, while ofs is 0 Is initialized to

【0084】この初期化後、次のサイクルより、予測ビ
ット長演算部4は、このofsとwidthで定まるバ
ッファレジスタ2上の入力ビット系列1の論理を判定部
3に調べさせ、その判定結果を取り込む。判定結果が
“1”のとき、すなわち、予測がはずれたときは、レジ
スタBのwidthを1/2にすると同時に、その値を
スタック・メモリ6に書き込む。ただし、widthが
すでに1のときはこの限りでなく、このときは、レジス
タAのofsにレジスタBのwidth、すなわち1を
加算し、さらに、スタック・メモリ6より直前に書き込
んだwidthの値を読み出し、レジスタBにストアす
る。
After this initialization, from the next cycle, the prediction bit length calculation unit 4 causes the determination unit 3 to check the logic of the input bit sequence 1 on the buffer register 2 determined by the ofs and the width, and to determine the determination result. take in. When the determination result is "1", that is, when the prediction is incorrect, the width of the register B is reduced to 1/2 and the value is written to the stack memory 6. However, this does not apply when the width is already 1, and in this case, the width of the register B, that is, 1 is added to the ofs of the register A, and the value of the width written immediately before from the stack memory 6 is read. , Stored in the register B.

【0085】判定結果が“0”の場合、すなわち、予測
が的中したときは、レジスタAのofsにレジスタBの
widthを加算し、さらに、スタック・メモリ6より
直前に書き込んだwidthの値を読み出し、レジスタ
Bにストアする。上述の処理は各サイクル毎に、入力ビ
ット系列1を判定しながら進められる。また、上述の符
号化処理を進めるにつれ、レジスタAのofsが徐々に
大きくなって行くが、このofsが一時予測runと等
しくなったとき、バッファレジスタ2に取り込んだ入力
ビット系列1の符号化が完了する。したがってこの時、
符号化完了の旨を伝える信号を入出力制御信号発生部5
に送り、入出力制御信号発生部5は、これを受けて、入
力ビット要求信号8をアクティブにし、同時にバッファ
レジスタ2に新たな入力ビット系列1の取り込みを指示
する。
When the judgment result is "0", that is, when the prediction is correct, the width of the register B is added to the ofs of the register A, and the value of the width written immediately before from the stack memory 6 is added. Read and store in register B. The above-described processing is performed while determining the input bit sequence 1 for each cycle. Further, as the above-described encoding process proceeds, the ofs of the register A gradually increases. When this ofs becomes equal to the temporary prediction run, the encoding of the input bit sequence 1 fetched into the buffer register 2 is performed. Complete. Therefore, at this time
An input / output control signal generator 5 sends a signal indicating completion of encoding.
Then, the input / output control signal generator 5 receives this, activates the input bit request signal 8, and simultaneously instructs the buffer register 2 to take in a new input bit sequence 1.

【0086】入出力制御信号発生部5は、初期状態もし
くはバッファレジスタ2内の入力ビット系列1の符号化
が完了した旨の信号を予測ビット長演算部4より受けた
とき、入力ビット要求信号8をアクティブにすると共
に、バッファレジスタ2に対して、予測ビット長・優勢
シンボル設定部7により入力する予測runで示される
個数の入力ビット系列1の取り込みを指示する。そし
て、バッファレジスタ2に予測runで示される個数の
ビットが入力されると、今度は、符号化開始信号を予測
ビット長演算部4に対して出力する。また、その出力と
1サイクル遅れで符号化完了まで、同期信号となるスト
ローブ信号9をアクティブにする。
The input / output control signal generator 5 receives the input bit request signal 8 At the same time, and instructs the buffer register 2 to take in the number of input bit sequences 1 indicated by the prediction run inputted by the prediction bit length and dominant symbol setting unit 7. Then, when the number of bits indicated by the prediction run is input to the buffer register 2, the encoding start signal is output to the prediction bit length calculator 4. Also, the strobe signal 9 serving as a synchronization signal is activated until the encoding is completed with a delay of one cycle from the output thereof.

【0087】スタック・メモリ6は、上述のように刻々
変化するwidthの値を保持しておくためのメモリ
で、いわゆる先入れ後出しメモリである。すなわち、一
番最初に書き込んだ値を一番最後に出力するメモリ、逆
に言えば、一番最近書き込んだ値を一番最初に出力する
メモリである。このスタック・メモリ6には刻々変化す
るwidthの値が書き込まれる。
The stack memory 6 is a memory for holding the value of the width that changes every moment as described above, and is a so-called first-in last-out memory. That is, it is a memory that outputs the value written first at the end, or conversely, a memory that outputs the value written most recently at the beginning. The value of the width that changes every moment is written in the stack memory 6.

【0088】予測ビット長・優勢シンボル設定部7は、
予測ビット長演算部4から、過去の符号化の状態(予測
がどの程度的中したか、あるいは、どの程度はずれたか
等)を入力し、新たに入力するビット系列1の予測ビッ
ト長runと優勢シンボルを設定する。予測ビット長r
unは、予測ビット長演算部4へ入力し、優勢シンボル
設定信号はバッファレジスタ2へ入力する。
The predicted bit length / dominant symbol setting unit 7
From the prediction bit length calculation unit 4, the past coding state (how much the prediction was correct or how much the prediction is incorrect, etc.) is input, and the prediction bit length run of the newly input bit sequence 1 and the superiority Set the symbol. Prediction bit length r
un is input to the prediction bit length calculator 4, and the dominant symbol setting signal is input to the buffer register 2.

【0089】以上のような構成の2値化ビット列のデー
タ符号化装置によって先に示した2値化ビット列の符号
化プロセスが実行される。そして、この符号化プロセス
の圧縮率と符号化時間を図7に示す。この図7は、4種
類のファイルについて本発明に使用する2値化ビット列
の符号化プロセスを使用した場合の圧縮率と符号化時間
を示すと共に参考として、従来のQMコーダの圧縮率と
符号化時間も示すものとなっている。図7に示されるよ
うに本発明に使用する2値化ビット列の符号化方法は、
圧縮率がQMコーダと同レベルであり、符号化時間は大
幅に短縮されたものとなっている。
The binary bit string encoding process described above is executed by the binary bit string data encoding apparatus having the above configuration. FIG. 7 shows the compression ratio and the encoding time of this encoding process. FIG. 7 shows the compression ratio and the encoding time when the binary bit string encoding process used in the present invention is used for the four types of files, and also shows the compression ratio and the encoding of the conventional QM coder for reference. The time is also shown. As shown in FIG. 7, the encoding method of the binary bit string used in the present invention is as follows.
The compression ratio is at the same level as the QM coder, and the encoding time is greatly reduced.

【0090】次に、本発明の2値化ビット列の復号化プ
ロセスについて説明する。2値化ビット列の復号化プロ
セスは、図8の復号化メインルーチンと図9の復号化サ
ブルーチンにより構成される。なお、図9の復号化サブ
ルーチンは、図5の符号化サブルーチンと同様、同じル
ーチン内で再帰呼び出しがおこなわれる。
Next, the process of decoding a binary bit string according to the present invention will be described. The decoding process of the binary bit string includes a decoding main routine of FIG. 8 and a decoding subroutine of FIG. The decoding subroutine of FIG. 9 is recursively called in the same routine as the encoding subroutine of FIG.

【0091】まず図8の復号化メインルーチンの各ステ
ップについて説明する。最初に、予測の初期値runの
設定と優勢シンボルの選択を行う(ステップS30)。
なお、これらの値は当然符号化側と同じ値に設定する。
次に、ローカル変数ofsに0を、widthにrun
を代入する(ステップS31)。そして、符号ビット出
力10となる符号語を1ビット入力する(ステップS3
2)。次に、ステップS33で、符号語の論理をチェッ
クする。“0”ならステップS34へ移り、“1”なら
ステップS35へ進む。ここで、符号語“0”は予測が
的中したことを示す予測当たり信号となる。
First, each step of the decoding main routine of FIG. 8 will be described. First, setting of an initial value run of prediction and selection of a dominant symbol are performed (step S30).
These values are naturally set to the same values as those on the encoding side.
Next, 0 is set to the local variable ofs, and run is set to the width.
Is substituted (step S31). Then, one bit of a code word to be the code bit output 10 is input (step S3).
2). Next, in step S33, the logic of the code word is checked. If "0", the process proceeds to step S34, and if "1", the process proceeds to step S35. Here, the code word “0” is a signal per prediction indicating that the prediction was successful.

【0092】符号語が“0”のときは、A〔ofs〕か
らA〔width−1〕まで優勢シンボルを書き込む
(ステップS34)。一方、符号語“1”は、予測がは
ずれたことを示す。そして、このときは、まず、wid
thの大きさをチェックし、1を超えていれば分割し、
再予測可能なのでステップS37に進み、復号化サブル
ーチンを呼び出す。1以下ならステップS36へ進み、
劣勢シンボルをA〔ofs〕に書き込む。
If the codeword is "0", the dominant symbol is written from A [ofs] to A [width-1] (step S34). On the other hand, the code word “1” indicates that the prediction has been lost. Then, at this time, first, wid
Check the size of th and divide it if it exceeds 1,
Since re-prediction is possible, the flow advances to step S37 to call a decoding subroutine. If it is 1 or less, proceed to step S36,
Write the inferior symbol to A [ofs].

【0093】ステップS38では、予測runの再設定
と必要ならば優勢シンボルの変更を行う。この再設定お
よび変更は、当然符号化側と同じ規則にしたがって実行
される。ステップS38の次に、ステップS39におい
て、A〔ofs〕からA〔width−1〕の復号デー
タを出力する。
In step S38, the predicted run is reset and, if necessary, the dominant symbol is changed. The resetting and changing are naturally performed according to the same rules as those on the encoding side. Subsequent to step S38, in step S39, decoded data of A [ofs] to A [width-1] is output.

【0094】図8に示す復号化メインルーチンにおける
ステップS33の1次予測の判定で、予測がはずれた場
合は、ステップS37で、図9の復号化サブルーチンを
呼び出す。この復号化サブルーチンへ渡す引き数は、o
fsとwidthである。以下、復号化サブルーチンの
各ステップについて説明する。
If the primary prediction at step S33 in the decoding main routine shown in FIG. 8 is incorrect, the decoding subroutine shown in FIG. 9 is called at step S37. The argument passed to this decryption subroutine is o
fs and width. Hereinafter, each step of the decoding subroutine will be described.

【0095】まずwidthを1/2にして予測範囲を
2分割する(ステップS40)。次に、符号語を1ビッ
ト入力する(ステップS41)。なお、このビットは前
半部系列の予測結果である。次のステップS42におい
て入力した符号語の論理をチェックする。“0”の場合
はステップS43へ、“1”の場合はステップS45へ
移る。ここで符号語“0”は、予測が的中したことを示
す。したがって、前半部系列、すなわちA〔ofs〕か
らA〔ofs+width−1〕に優勢シンボルを書き
込む(ステップS43)。次に、ステップS44におい
て、前半部系列の先頭位置を示すポインタofsにwi
dthを加え、後半部系列の先頭位置を示すように変更
する。また、前半部系列の予測が的中した場合、後半部
系列に必ず劣勢シンボルが存在する。したがって、後半
部系列の予測判定を行うステップS49と、ステップS
50をスキップしてステップS52へ進む。
First, the prediction range is divided into two by setting the width to 1 / (step S40). Next, one bit of a code word is input (step S41). This bit is the prediction result of the first half sequence. In the next step S42, the logic of the input code word is checked. If "0", the process proceeds to step S43, and if "1", the process proceeds to step S45. Here, the codeword “0” indicates that the prediction was successful. Therefore, the dominant symbol is written into the first half sequence, that is, from A [ofs] to A [ofs + width−1] (step S43). Next, in step S44, the pointer ofs indicating the head position of the first half series is set to wi.
dth is added to change to indicate the head position of the latter half series. In addition, when the prediction of the first half sequence is correct, the inferior symbol always exists in the second half sequence. Therefore, step S49 for making a prediction determination of the second half series and step S49
The process skips 50 and proceeds to step S52.

【0096】一方、符号語が“1”のとき、ステップS
42からステップS45へ移行し、widthの大きさ
をチェックする。1以下の場合、これ以上分割予測する
必要がない、すなわち復号ビットが確定したのでステッ
プS46に進む。2以上の場合は、さらに分割し予測す
る必要があるため、ステップS47で復号化サブルーチ
ンを呼び出す。ステップS46では、A〔ofs〕に劣
勢シンボルを書き込む。また、ステップS47では子プ
ロセスとして復号化サブルーチンを再帰呼び出しする。
On the other hand, when the code word is "1", the step S
The process proceeds from S42 to step S45, and the width is checked. When the value is 1 or less, it is not necessary to perform the division prediction any more, that is, since the decoded bit is determined, the process proceeds to step S46. In the case of two or more, since it is necessary to further divide and predict, a decoding subroutine is called in step S47. In step S46, the inferior symbol is written to A [ofs]. In step S47, the decoding subroutine is recursively called as a child process.

【0097】ステップS46またはステップS47に続
いて、ステップS48が実行される。このステップS4
8では、前半部系列の先頭位置を示すポインタofsに
widthを加え、後半部系列の先頭位置を示すように
変更する。次に、符号語を1ビット入力する(ステップ
S49)。このビットは後半部系列の予測結果である。
ステップS50で、入力した符号語の論理をチェックす
る。“0”の場合はステップS51へ、“1”の場合は
ステップS52へ進む。
[0097] Subsequent to step S46 or step S47, step S48 is executed. This step S4
In 8, the width is added to the pointer ofs indicating the head position of the first half series, and the pointer is changed to indicate the head position of the second half series. Next, a 1-bit code word is input (step S49). This bit is the prediction result of the latter half sequence.
In step S50, the logic of the input code word is checked. If “0”, the process proceeds to step S51, and if “1”, the process proceeds to step S52.

【0098】ここで符号語“0”は、予測が的中したこ
とを示す。したがって、後半部系列、すなわちA〔of
s〕からA〔ofs+width−1〕に優勢シンボル
を入力する(ステップS51)。一方、符号語が“1”
のとき、ステップS52へ進み、widthの大きさを
チェックする。“1”以下の場合、これ以上分割予測す
る必要がない、すなわち復号ビットが確定したので、ス
テップS53に移り、A〔ofs〕に劣勢シンボルを書
き込む。2以上の場合は、さらに分割し予測する必要が
あるため、ステップS54で子プロセスとして復号化サ
ブルーチンを呼び出す。
Here, the code word "0" indicates that the prediction was successful. Therefore, the second half sequence, that is, A [of
s] to A [ofs + width−1] to input a dominant symbol (step S51). On the other hand, if the code word is "1"
In step S52, the flow advances to step S52 to check the width. If it is equal to or less than "1", it is not necessary to divide and predict any more, that is, the decoded bit is determined. In the case of two or more, since it is necessary to further divide and predict, a decoding subroutine is called as a child process in step S54.

【0099】次に、この2値化ビット列の復号化プロセ
スを具体例に基づいて説明する。すなわち、先ほどの2
値化ビット列の符号化の具体例で得られた“10110
10”の符号ビット出力10を用いて、具体的に復号化
プロセスを説明する。なお、符号化時と同様、予測の初
期値runを8、優勢シンボルを0として復号を実行す
る。
Next, the decoding process of the binary bit string will be described based on a specific example. That is, 2
“10110” obtained in a specific example of encoding of a coded bit string
The decoding process will be specifically described using the code bit output 10 of 10 ″. As in the case of the encoding, the decoding is executed with the initial value of prediction run being 8 and the dominant symbol being 0.

【0100】まず、ステップS32で最初の符号ビット
を入力する。これは“1”なのでステップS35に進
み、widthの大きさをチェックする。このときwi
dthは8だからステップS37で、復号化サブルーチ
ンを呼び出す。この復号化サブルーチンでは、ステップ
S40でwidthを半分の4に変更した後、ステップ
S41で2番目の符号ビットを入力する。これは“0”
なのでステップS43に進み、ここで前半部系列、すな
わちA
First, in step S32, the first code bit is input. Since this is "1", the flow advances to step S35 to check the width. At this time wi
Since dth is 8, the decryption subroutine is called in step S37. In this decoding subroutine, after changing the width to 4 in half in step S40, the second code bit is input in step S41. This is "0"
Therefore, the process proceeds to step S43, where the first half series, that is, A

〔0〕からA〔3〕に“0”を書き込む。続くス
テップS44でofsを4に変更した後、ステップS5
2からステップS54へと進む。このステップS54に
おいて、子プロセスとして子の復号化サブルーチンを呼
び出す。
"0" is written from [0] to A [3]. After changing ofs to 4 in the following step S44, step S5
The process proceeds from Step 2 to Step S54. In this step S54, a child decoding subroutine is called as a child process.

【0101】子の復号化サブルーチンでは、ステップS
40でwidthをさらに半分にし2に変更した後、ス
テップS41で3番目の符号ビットを入力する。これは
“1”なのでステップS45を経由してステップS47
で、孫プロセスとして孫の復号化サブルーチンを呼び出
す。この孫の復号化サブルーチンでは、ステップS40
でwidthが1に変更された後、ステップS41で4
番目の符号ビットを入力する。これは“1”なのでステ
ップS45へ進む。このときwidthが1なので、ス
テップS46へ進み、ここでA〔4〕に1を書き込む。
続いてステップS48で、ofsを5に変更した後、ス
テップS49で5番目の符号ビットを入力する。これは
“0”なのでステップS51に進み、ここでA〔5〕に
“0”を書き込む。
In the child decoding subroutine, step S
After the width is further halved at 40 and changed to 2, the third code bit is input at step S41. Since this is "1", the process proceeds to step S47 via step S45.
Then, a grandchild decoding subroutine is called as a grandchild process. In this grandchild decryption subroutine, step S40
After the width is changed to 1 in step S4, 4 is set in step S41.
Enter the th sign bit. Since this is "1", the process proceeds to step S45. At this time, since the width is 1, the process proceeds to step S46, where 1 is written to A [4].
Subsequently, after changing ofs to 5 in step S48, the fifth code bit is input in step S49. Since this is "0", the process proceeds to step S51, where "0" is written to A [5].

【0102】その後、子の復号化サブルーチンへ復帰
し、ステップS48でofsを4から6に変更する。続
くステップS49では6番目の符号ビットを入力する。
これは“1”なので、ステップS52を経由してステッ
プ54へ進み、ここで再び孫プロセスとして孫の復号化
サブルーチンを呼び出す。孫の復号化サブルーチンは、
まずステップS40でwidthが1に変更された後、
ステップS41で7番目の符号ビットを入力する。この
ビットは“0”なのでステップS43でA〔6〕に0を
書き込む。続くステップS44でofsを7に変更し、
ステップS52では、widthが“1”なので、ステ
ップS53に進み、ここでA〔7〕に1を書き込む。
Thereafter, the process returns to the child decoding subroutine, and ofs is changed from 4 to 6 in step S48. In a succeeding step S49, a sixth sign bit is inputted.
Since this is "1", the process proceeds to step S54 via step S52, where the grandchild decoding subroutine is called again as a grandchild process. The grandchild decryption subroutine
First, after the width is changed to 1 in step S40,
In step S41, the seventh code bit is input. Since this bit is "0", 0 is written to A [6] in step S43. In the following step S44, ofs is changed to 7,
In step S52, since the width is "1", the process proceeds to step S53, where 1 is written to A [7].

【0103】この後、子の復号化サブルーチンおよび復
号化サブルーチンに復帰し、さらに復号化メインルーチ
ンに復帰する。復帰した復号化メインルーチンでは、ス
テップS38で予測runの再設定と優勢シンボルの再
設定を行う。そして、ステップS39で復号化データを
Thereafter, the process returns to the child decoding subroutine and the decoding subroutine, and further returns to the decoding main routine. In the restored decoding main routine, the prediction run is reset and the dominant symbol is reset in step S38. Then, in step S39, the decrypted data is

〔0〕からA〔7〕より出力する。Output from [0] to A [7].

【0104】以上の2値化ビット列の復号化プロセスに
より得られた復号化データは、“00001001”で
あり、もとの入力ビット系列1が復元されることとな
る。
The decoded data obtained by the above-described decoding process of the binary bit string is “000010001”, and the original input bit sequence 1 is restored.

【0105】次に、以上のような2値化ビット列の復号
化プロセスを行わせる2値化ビット列のデータ復号化装
置について、図10に基づいて説明する。
Next, a binary bit string data decoding apparatus for performing the above-described binary bit string decoding process will be described with reference to FIG.

【0106】この2値化ビット列のデータ復号化装置
は、予測ビット長であるrunと優勢シンボルを設定す
る予測ビット長・優勢シンボル設定部11と、2つの変
数ofsとwidthを保持するレジスタAとレジスタ
Bを内蔵する予測ビット長演算部12と、刻々変化する
widthの値を保持しておくためのメモリであるスタ
ック・メモリ13と、入出力を制御する入出力制御信号
発生部14と、復号ビットを設定する復号ビット設定部
15とから主に構成されている。
The binary bit string data decoding apparatus includes a predicted bit length run and a predicted bit length / dominant symbol setting unit 11 for setting a superior symbol, a register A for holding two variables ofs and width, and A prediction bit length calculation unit 12 having a register B therein, a stack memory 13 as a memory for holding an ever-changing width value, an input / output control signal generation unit 14 for controlling input / output, and decoding It mainly comprises a decoding bit setting unit 15 for setting bits.

【0107】ここで、予測ビット長・優勢シンボル設定
部11は、予測ビット長演算部12より、過去の復号の
状態(予測がどの程度的中したか、あるいは、どの程度
はずれたか等)を入力し、新たに入力する符号ビット1
0の予測ビット長runと優勢シンボルを設定する。予
測ビット長runは、予測ビット長演算部12へ入力
し、優勢シンボル設定信号は復号ビット設定部15に入
力する。
Here, the prediction bit length / dominant symbol setting unit 11 receives from the prediction bit length calculation unit 12 the past decoding state (how much prediction has been achieved or how much the prediction has deviated, etc.). And newly input sign bit 1
A predicted bit length run of 0 and a dominant symbol are set. The predicted bit length run is input to the predicted bit length calculation unit 12, and the dominant symbol setting signal is input to the decoded bit setting unit 15.

【0108】予測ビット長演算部12は、上述したとお
り、2つの変数ofsとwidthを保持するレジスタ
AとレジスタBを内蔵するものとなっている。widt
hは、予測ビット長・優勢シンボル設定部11が設定す
る1次予測のためのビット長runが設定され、ofs
は0に初期化される。レジスタB、すなわちwidth
の値は、入出力制御信号発生部14に供給される。一
方、初期化後、入力した符号ビット10が“1”で、か
つwidthが2以上の時、widthを1/2して、
スタック・メモリ13に書き込む。ただし、width
が1の場合は、復号ビット出力許可信号を復号ビット設
定部15と入出力制御信号発生部14に出力し、同時に
レジスタAのofsにレジスタBのwidthを加算
後、スタック・メモリ13から直前に書き込んだwid
thを読み出し、レジスタBに保持させる。
As described above, the prediction bit length calculation unit 12 has a built-in register A and a register B for holding two variables ofs and width. widt
In h, the bit length run for primary prediction set by the prediction bit length / dominant symbol setting unit 11 is set, and ofs
Is initialized to 0. Register B, ie width
Is supplied to the input / output control signal generator 14. On the other hand, after the initialization, when the input code bit 10 is “1” and the width is 2 or more, the width is halved,
Write to the stack memory 13. However, width
Is 1, a decoded bit output permission signal is output to the decoded bit setting unit 15 and the input / output control signal generating unit 14. At the same time, the width of the register B is added to the ofs of the register A, and Wid written
th is read and held in the register B.

【0109】また、符号ビット10が“0”の場合、復
号ビット出力許可信号を復号ビット設定部15と入出力
制御信号発生部14に出力し、同時にレジスタAのof
sにレジスタBのwidthを加算後、スタック・メモ
リ13から直前に書き込んだwidthを読み出し、レ
ジスタBに保持させる。そして、ofsは復号が進むに
つれ、徐々に大きくなって行く。そこで、このofsと
runが等しくなったとき、ひとつの予測単位の符号ビ
ット10の復号が完了したことを示す信号を発生し、こ
の信号を予測ビット長・優勢シンボル設定部11に出力
する。予測ビット長・優勢シンボル設定部11は、この
信号を受けて、次の符号ビット10のための予測ビット
長runの再設定や優勢シンボルの再設定を行う。
When the sign bit 10 is "0", the decoding bit output enable signal is output to the decoding bit setting unit 15 and the input / output control signal generation unit 14, and at the same time,
After adding the width of the register B to s, the width written immediately before is read from the stack memory 13 and held in the register B. Then, ofs gradually increases as decoding progresses. Therefore, when ofs and run become equal, a signal indicating that decoding of the code bit 10 of one prediction unit is completed is generated, and this signal is output to the prediction bit length / dominant symbol setting unit 11. Receiving this signal, the predicted bit length / dominant symbol setting unit 11 resets the predicted bit length run for the next code bit 10 and resets the superior symbol.

【0110】スタック・メモリ13は、上述のように刻
々変化するwidthの値を保持しておくためのメモリ
で、いわゆる先入れ後出しメモリである。すなわち、一
番最初に書き込んだ値を一番最後に出力するメモリ、逆
に言えば、一番最近書き込んだ値を一番最初に出力する
メモリとなっている。
The stack memory 13 is a memory for holding the value of the width that changes every moment as described above, and is a so-called first-in last-out memory. That is, it is a memory that outputs the value written first at the end, or conversely, a memory that outputs the value written most recently at the beginning.

【0111】入出力制御信号発生部14は、有効な復号
ビット20を出力中であることを示すストローブ信号1
6を発生するブロックである。予測ビット長演算部12
より、復号ビット出力許可信号を受けて、そのときwi
dthで指定された期間、ストローブ信号16を出力す
る。また、ストローブ信号16が、2サイクル以上アク
ティブとなる場合は、2サイクル目から符号ビット要求
信号17をノン・アクティブにして、新たな符号ビット
10の入力を抑制すると同時に、予測ビット長演算部1
2の動作も一時停止させる。
The input / output control signal generator 14 outputs the strobe signal 1 indicating that the valid decoded bit 20 is being output.
6 is generated. Predicted bit length calculator 12
Receiving the decoded bit output permission signal,
The strobe signal 16 is output for a period specified by dth. When the strobe signal 16 is active for two or more cycles, the code bit request signal 17 is made non-active from the second cycle to suppress the input of a new code bit 10 and, at the same time, the predicted bit length calculation unit 1
Operation 2 is also temporarily stopped.

【0112】復号ビット設定部15は、予測ビット長演
算部12からの復号ビット出力許可信号を受けて、その
とき入力中の符号ビット10を一時保持するレジスタで
構成される。また、予測ビット長・優勢シンボル設定部
11の指示により、必要に応じて復号ビット20を反転
させる。
The decoding bit setting section 15 is constituted by a register which receives the decoding bit output permission signal from the prediction bit length calculating section 12 and temporarily holds the code bit 10 being input at that time. In addition, the decoding bit 20 is inverted as required according to the instruction of the prediction bit length / dominant symbol setting unit 11.

【0113】以上のような構成の2値化ビット列のデー
タ復号化装置によって先に示した復号化プロセスが実行
される。この復号化プロセスを使用した場合の復号化時
間は、図7に示す符号化時間と同様、QMコーダに比べ
非常に短くなっている。すなわち、2値化ビット列の復
号化プロセスは、符号化プロセスと逆のアルゴリズムを
使用するため、符号化時間が短縮されれば、復号化時間
も短縮されることとなる。
The above-described decoding process is executed by the binary bit string data decoding apparatus having the above-described configuration. The decoding time when this decoding process is used is much shorter than that of the QM coder, like the encoding time shown in FIG. That is, since the decoding process of the binary bit string uses an algorithm reverse to that of the encoding process, if the encoding time is reduced, the decoding time is also reduced.

【0114】このような2値化ビット列のデータ符号化
および復号化は、いわば、予測ランレングス符号化方式
および復号化方式といえるものである。そして、この予
測ランレングス符号化(Predictive Run
−length Codingと英訳され、以下PRL
Cという)を多値情報源に適用することができ、以下そ
の適用について説明する。
The data encoding and decoding of such a binary bit string can be said to be, so to speak, a predictive run-length encoding method and a decoding method. Then, the predictive run-length coding (Predictive Run
-Length Coding and translated into English
C) can be applied to a multi-valued information source, and its application will be described below.

【0115】多値情報源は、一般に各ビット・プレーン
毎に、“0”と“1”の出現確率が異なり、多値情報源
を単純に2値化しても、このPRLCでは、それらを一
律に扱ってしまうため、効率の良い符号化はできない。
そこで、多値予測ランレングス符号化(以下多値PRL
Cという)の第1の方法としては、ビット・プレーンに
分けて、すなわち、例えば8ビットの多値情報源の場合
であれば、8つのビット・プレーンに分けて、各ビット
・プレーンのデータをそれぞれ符号化することが考えら
れ、シミュレーションでも高い符号化効率を示してい
る。
In general, the appearance probabilities of “0” and “1” are different for each bit plane in a multi-valued information source. Therefore, efficient encoding cannot be performed.
Thus, multi-value prediction run-length coding (hereinafter multi-value PRL)
C) is divided into bit planes, that is, in the case of, for example, an 8-bit multi-valued information source, divided into eight bit planes, and the data of each bit plane is divided. It is conceivable that each is coded, and the simulation shows high coding efficiency.

【0116】ビット・プレーンに分けて行うこの多値P
RLCの第1の方法では、高い符号化効率を示すもの
の、プレーン間の相関性を無視することとなっており、
QMコーダ利用の場合に比べ若干効率が悪くなってい
る。そこで、多値情報源の各値が下位のビットに集中す
るようなものを考えたとき、次のような多値PRLCの
第2の方法が考えられる。
This multi-valued P which is divided into bit planes
In the first method of RLC, although high coding efficiency is indicated, correlation between planes is ignored.
The efficiency is slightly lower than when using a QM coder. Therefore, when considering a case where each value of the multi-valued information source is concentrated on lower bits, the following second method of the multi-valued PRLC can be considered.

【0117】この多値PRLCの第2の方法は、第1の
方法と同様に、ビット・プレーン毎にPRLCを適用す
るものであるが、最上位ビットからプレーン毎にPRL
Cを行うものである。そして、“1”が出現した時点
で、続く下位ビットを直接ストリームに出力するもので
ある。この第2の方法を図11のフローダイアグラムお
よび図12の具体例に基づいて説明する。
The second method of the multi-value PRLC is to apply the PRLC for each bit plane similarly to the first method.
C is performed. Then, when "1" appears, the subsequent lower bits are directly output to the stream. This second method will be described based on the flow diagram of FIG. 11 and the specific example of FIG.

【0118】例えば、多値情報源となる入力シンボルが
図12に示すように、「0」「1」「4」「9」「2
3」「60」「224」「0」「3」と続く場合、最上
位のビット・プレーンは「000000100…」とな
る。そして、この最上位のビット・プレーンを先に示し
たPRLCにより、所定の予測ビット長runによって
符号化する(ステップS55)。このとき、“1”が出
現するか否か確定し(ステップS56)、“1”が出現
した「224」の入力シンボルについては、下位の7つ
のビット・プレーンの値である「1100000」を直
接ストリームに出力し(ステップS57)、符号化す
る。
For example, as shown in FIG. 12, input symbols serving as multi-value information sources are "0", "1", "4", "9", and "2".
In the case where “3”, “60”, “224”, “0”, and “3” continue, the most significant bit plane is “00000000100...”. Then, the uppermost bit plane is coded by the above-described PRLC with a predetermined prediction bit length run (step S55). At this time, it is determined whether or not "1" appears (step S56). For the "224" input symbol in which "1" appears, the value of the lower seven bit planes "1100000" is directly input. The data is output to a stream (step S57) and encoded.

【0119】次に、最上位ビットが“1”でないものに
ついて、その第2ビットをPRLCする(ステップS5
8)。図12の具体的例でいえば、「00000000
…」をPRLCすることになる。このとき、「224」
の第2ビットである“1”は、既に出力されているの
で、飛ばされることになる。また、PRLCを行うとき
の予測ビット長runの数は、最上位ビットに使用され
る予測ビット長の数とは無関係かつ独立して決められる
値となっている。ここで、第2ビットに“1”があるか
否かを検知し(ステップS59)、“1”があると下位
6ビットをストリームに出力する(ステップS60)。
図12の具体例では、“1”がないので、ステップS6
0は行わず、次の第3ビットをまた独自の予測ビット長
runでPRLCすることとなる(ステップS61)。
Next, for the bit whose most significant bit is not "1", the second bit is subjected to PRLC (step S5).
8). In the specific example of FIG. 12, "00000000
... "is to be PRLC. At this time, "224"
The second bit "1" is skipped because it has already been output. Further, the number of predicted bit lengths run when performing PRLC is a value determined independently and independently of the number of predicted bit lengths used for the most significant bit. Here, it is detected whether or not the second bit has "1" (step S59). If "1" is present, the lower 6 bits are output to the stream (step S60).
In the specific example of FIG. 12, since there is no “1”, step S6
0 is not performed, and the next third bit is subjected to PRLC with its own prediction bit length run (step S61).

【0120】そして、第3ビットに“1”があるか否か
確認する(ステップS62)。このとき、第3ビットは
「00000100…」となっており、シンボル「6
0」については、そのまま下位5ビット「11100」
をストリームに出力する(ステップS63)。その後、
第3ビットが“1”でないものの第4ビットを独自の予
測ビット長runでPRLCをする(ステップS6
4)。そして、第4ビットに“1”があるか否か確認す
る(ステップS65)。このとき、第4ビットは「00
00100…」となっており、シンボル「23」につい
ては、そのまま下位4ビット「0111」をストリーム
に出力する(ステップS66)。
Then, it is confirmed whether or not "1" is present in the third bit (step S62). At this time, the third bit is “00000100...” And the symbol “6
For "0", the lower 5 bits "11100"
Is output to the stream (step S63). afterwards,
Although the third bit is not "1", the fourth bit is subjected to PRLC with a unique prediction bit length run (step S6).
4). Then, it is determined whether the fourth bit has "1" (step S65). At this time, the fourth bit is “00”.
00100..., And for the symbol “23”, the lower 4 bits “0111” are output to the stream as it is (step S66).

【0121】以下同様なフローによって、第5ビット、
第6ビット、第7ビットおよび最下位ビットをそれぞれ
独自の予測ビット長runによってPRLCする(ステ
ップS67からステップS76)。なお、図12の例で
は、ステップS76の最下位ビットのPRLCでは、入
力シンボル「0」の“0”,続く「1」の“1”が対象
となり、続く入力シンボル「4」「9」「23」「6
0」「224」の最下位ビットは既に出力されており対
象外となる。そして、続く「0」の“0”が対象とな
り、次の「3」は対象外となる。このため、ステップS
76では、「010…」がPRLCの対象となる。な
お、各ビット・プレーンを符号化する際、バッファ内の
該当する条件に合うビットの数が、予測ビット長run
に満たなかった場合、ダミーの優勢シンボルを不足分だ
け挿入して符号化を行う。この場合、復号側では、余計
な優勢シンボルが復号されるが、符号化時のバッファの
容量が既知ならば、復号されたビットが有意なものか、
ダミーで挿入されたものかの判別ができる。なお、この
ようなダミーの優勢シンボルを利用する方法を避けるに
は、バッファを十分大きく取るか、さらには、圧縮の対
象となるファイル全体を蓄えれるだけの容量を有するよ
うにすれば良い。
The fifth bit,
The sixth bit, the seventh bit, and the least significant bit are subjected to PRLC with their own predicted bit lengths run (steps S67 to S76). In the example of FIG. 12, in the least significant bit PRLC of step S76, “0” of the input symbol “0” and “1” of the subsequent “1” are targets, and the subsequent input symbols “4”, “9”, and “9” 23 ”,“ 6 ”
The least significant bits of “0” and “224” have already been output and are out of scope. Then, “0” of the following “0” is targeted, and the next “3” is not targeted. Therefore, step S
At 76, "010 ..." is the target of PRLC. Note that when encoding each bit plane, the number of bits in the buffer that satisfies the corresponding condition depends on the predicted bit length run.
If the number of symbols is less than the predetermined value, encoding is performed by inserting a dummy dominant symbol in an insufficient amount. In this case, on the decoding side, an extra dominant symbol is decoded, but if the capacity of the buffer at the time of encoding is known, whether the decoded bits are significant or not.
It is possible to determine whether a dummy has been inserted. In order to avoid such a method of using the dummy dominant symbols, it is sufficient to make the buffer large enough or to have a capacity enough to store the entire file to be compressed.

【0122】次に、さらなる効率アップが期待できる多
値PRLCの第3の方法について説明する。これは、先
に示したように情報源を無記憶として扱った場合、圧縮
率としてはPRLCとQMコーダの性能量がほとんどな
いことを利用するものである。すなわち、PRLCに、
QMコーダで利用されるマルコフ・モデルをうまく適応
させれば、QMコーダと同様な圧縮率が得られるはずと
の推論に着目したたものである。QMコーダの場合、コ
ンテキストによって確率推定テーブルを引き、劣勢シン
ボルの出現確率を求めているが、これをPRLCに当て
はめれば、コンテキスト毎に符号化シンボルを分類して
複数の系列を作り、それらを別々にPRLCすることに
相当する。つまり、ビット・プレーンではなく、レベル
・プレーン(=多値情報源の異なる値一個一個に相当す
るもの)に分けて符号化すれば、さらなる圧縮効率のア
ップとなる。
Next, a description will be given of a third method of multi-valued PRLC in which further improvement in efficiency can be expected. This uses the fact that PRLC and the QM coder have little performance as the compression ratio when the information source is treated as non-memory as described above. That is, in PRLC,
The focus is on the inference that if the Markov model used in the QM coder is well adapted, a compression rate similar to that of the QM coder should be obtained. In the case of the QM coder, the probability estimation table is subtracted according to the context, and the occurrence probability of the inferior symbol is obtained. If this is applied to PRLC, a plurality of sequences are created by classifying the coded symbols for each context, and This is equivalent to separately performing PRLC. In other words, if the coding is performed separately on the level plane (= one corresponding to each different value of the multi-valued information source) instead of the bit plane, the compression efficiency is further improved.

【0123】すなわち、それぞれの入力シンボルの出現
率には偏りが生ずるが、この偏りは、それぞれの入力シ
ンボル、すなわちレベル・プレーンを符号化する際、圧
縮効率を高めることとなる。例えば、4ビットの入力シ
ンボルの場合、計16種類の入力シンボルとなるが、そ
の中で「0001」が0に近い確率で「1010」が1
に近い確率で発生することとする。すると、「000
1」という入力シンボルは、発生数には“0”が多く続
くこととなる一方、「1010」という入力シンボル
は、“1”が多く続くこととなる。この結果、PRLC
を使用することにより圧縮率が高まることとなる。
That is, the appearance rate of each input symbol is biased, and this bias increases the compression efficiency when encoding each input symbol, that is, the level plane. For example, in the case of a 4-bit input symbol, there are a total of 16 types of input symbols, of which "0001" is 1 with a probability that "0001" is close to 0.
It is assumed to occur with a probability close to. Then, "000
The input symbol “1” has many occurrences of “0”, while the input symbol “1010” has many occurrences of “1”. As a result, PRLC
The compression ratio is increased by using.

【0124】上述した多値PRLCの第3の方法は、入
力シンボルのビット数が少ない場合は関係ないが、多く
なるとメモリが大きくなり問題となる。例えば、入力シ
ンボルが8ビットの場合、レベル・プレーンの数が25
6となり、各プレーン毎の予測ビット長runの管理や
何個の入力シンボルをバッファに蓄めるかの予測管理等
が大変となると共に、その管理のためのメモリが大きく
なり、装置が大型化しコストアップする。次にこの問題
を解決した多値PRLCの第4の方法を説明する。
The third method of the multi-valued PRLC described above does not matter when the number of bits of the input symbol is small, but when the number is large, the memory becomes large and poses a problem. For example, when the input symbol is 8 bits, the number of level planes is 25.
6, the management of the prediction bit length run for each plane and the prediction management of how many input symbols are stored in the buffer become difficult, the memory for the management becomes large, and the device becomes large. Increase costs. Next, a fourth method of the multi-value PRLC that solves this problem will be described.

【0125】まず、入力される入力シンボルを先頭移動
辞書方式によって変換して、出現確率が偏るものとす
る。すなわち、下位ビットまたは上位ビットに偏るもの
とする。この出現確率を偏よらせるものとしては、その
他にDPCMやIHT等の量子化係数等がある。いずれ
にしても、入力シンボルが下位ビットまたは上位ビット
等に集中するようにするかもしくはそのように集中した
入力シンボルを扱うこととする。そして、確率が集中す
るレベル・プレーンのみ独立に扱い、確率の集中が低い
ものは、複数のレベル・プレーンをまとめて取り扱いよ
うにする。このようになることによってメモリが大きく
なることを防止する一方、圧縮効率の低下を最小限に抑
えることができる。
First, it is assumed that the input symbols to be input are converted by the head moving dictionary method so that the appearance probabilities are biased. That is, it is biased toward lower bits or upper bits. Other factors that bias the appearance probability include quantization coefficients such as DPCM and IHT. In any case, the input symbols are concentrated on the lower bits, the upper bits, or the like, or the input symbols concentrated in such a manner are handled. Then, only the level planes with a high concentration of probabilities are handled independently, and those with a low concentration of probabilities are handled collectively with a plurality of level planes. This prevents the memory from becoming large, while minimizing the reduction in compression efficiency.

【0126】この多値PRLCの第4の方法を図13か
ら図15に基づいて説明する。なお、この具体例は、第
2の方法と同様に下位ビットに入力シンボルが集中する
場合に好適なものとなっている。多値PRLCの第4の
方法では、まず入力シンボルをグループに分ける。例え
ば、8ビットの入力シンボルの場合、図13に示すよう
に9つのグループに分ける。そして、このグループ番号
(詳しく述べれば、後述するグループに該当するか否か
の判定ビット)をPRLCする。このPRLCの具体的
方法を図14のフローダイアグラムおよび図15の具体
例に基づいて説明する。
A fourth method of the multi-value PRLC will be described with reference to FIGS. This specific example is suitable for a case where input symbols are concentrated on lower bits, as in the second method. In the fourth method of multi-value PRLC, input symbols are first divided into groups. For example, in the case of an 8-bit input symbol, it is divided into nine groups as shown in FIG. Then, this group number (specifically, a bit for determining whether or not the group corresponds to a group described later) is subjected to PRLC. A specific method of this PRLC will be described based on a flow diagram of FIG. 14 and a specific example of FIG.

【0127】例えば、多値情報源となる入力シンボルが
図15に示すように、「0」「1」「4」「9」「2
3」「60」「224」「0」「3」と続く場合を考え
ると、第1番目の入力シンボル「0」は、グループ番号
「0」に入るので、グループ番号「0」に該当するか否
かの判定ビットは、該当する旨の“0”となる。また
「1」は、グループ番号「0」ではないので、グループ
番号「0」の部分の判定ビットは “1”となり、グル
ープ番号「1」の判定ビットが“0”となる。続く
「4」の判定ビットは「1110」となり、「9」の判
定ビットは「11110」となり、「23」の判定ビッ
トは「111110」となり、「60」の判定ビットは
「1111110」となり、「224」の判定ビットは
「111111110」となる。
For example, as shown in FIG. 15, input symbols serving as multi-value information sources are "0", "1", "4", "9", and "2".
Considering the case where “3”, “60”, “224”, “0”, and “3” continue, the first input symbol “0” falls into the group number “0”. The determination bit of whether or not it is set to “0” to the effect. Also, since “1” is not the group number “0”, the determination bit of the group number “0” part is “1”, and the determination bit of the group number “1” is “0”. The subsequent determination bit of “4” is “1110”, the determination bit of “9” is “11110”, the determination bit of “23” is “111110”, the determination bit of “60” is “1111110”, and “ The determination bit of “224” is “111111110”.

【0128】以上のような判定ビットをPRLCするこ
とになる。この具体的な順序は、まず入力シンボルがグ
ループ番号「0」に該当するか否かを示す判定ビットを
PRLCする(ステップS77)。図15の例では、一
番上に示される判定ビットの列「011111101
…」を独自の予測ビット長runでPRLCする。そし
て、グループ番号「0」に該当するものがあるか否かを
判定し(ステップS78)、“0”があると、その値は
入力シンボルは「0」であるので、符号化が完了する。
このため、第1番目と第8番目の入力シンボル「0」の
符号化が完了する。ここでグループ番号が“0”でない
ものがあるとき、グループ番号「1」に該当するか否か
の判定ビットをPRLCする(ステップS79)。図1
5の例では、二番目に示される判定ビットの列「011
1111…」を独自の予測ビット長runでPRLCす
る。
The above decision bits are subjected to PRLC. In this specific order, first, a determination bit indicating whether the input symbol corresponds to the group number “0” is PRLC (step S77). In the example of FIG. 15, the determination bit string “011111101”
... "Are PRLCed with a unique prediction bit length run. Then, it is determined whether or not there is a group corresponding to the group number “0” (step S78). If there is “0”, the value is the input symbol “0”, and the encoding is completed.
Thus, the encoding of the first and eighth input symbols “0” is completed. If there is a group number other than "0", PRLC is performed on a determination bit as to whether or not the group number is "1" (step S79). FIG.
In the example of No. 5, the second determination bit string “011”
., 1111... With a unique prediction bit length run.

【0129】そして、グループ番号が「1」に該当する
ものがあるか否かを判定する(ステップS80)。この
グループ番号「1」に該当するものがあると、符号化は
完了する。ここでは該当する符号は、“0”であるの
で、第2番目の入力シンボル「1」が該当する。よって
入力シンボル「1」の符号化が完了する。
Then, it is determined whether or not there is a group whose group number corresponds to "1" (step S80). If there is one corresponding to the group number “1”, the encoding is completed. Here, since the corresponding code is “0”, the second input symbol “1” corresponds. Therefore, the encoding of the input symbol “1” is completed.

【0130】次に、グループ番号が「1」でないものが
まだ存在していると、グループ番号「2」に該当するも
のがあるか否かを示す判定ビットをPRLCする(ステ
ップS81)。図15の例では、入力シンボル「4」
「9」「23」「60」「224」「3」に対応する判
定ビットの列「111110…」を独自の予測ビット長
runでPRLCすることとなる。そして、グループ番
号が「2」に該当するものがあるか否かを確認する(ス
テップS82)。グループ番号「2」に該当するものが
あると、1ビットの付加ビット“0”または“1”をス
トリームに出力し(ステップS83)、符号化は完了す
る。図15の例では、第9番目の入力シンボル「3」が
該当し、付加ビット“1”をストリームに出力する。な
お、入力シンボルが「2」の場合、グループ番号は入力
シンボル「3」と同じで、「2」となるが付加ビットは
“0”となる。
Next, if there still exists a group whose group number is not “1”, the judgment bit indicating whether there is a group corresponding to the group number “2” is PRLC (step S81). In the example of FIG. 15, the input symbol "4"
The sequence of decision bits “111110...” Corresponding to “9”, “23”, “60”, “224”, and “3” is subjected to PRLC with a unique prediction bit length run. Then, it is confirmed whether or not there is a group whose group number corresponds to "2" (step S82). If there is one corresponding to the group number “2”, one additional bit “0” or “1” is output to the stream (step S83), and the encoding is completed. In the example of FIG. 15, the ninth input symbol “3” corresponds, and the additional bit “1” is output to the stream. When the input symbol is “2”, the group number is the same as the input symbol “3”, which is “2”, but the additional bit is “0”.

【0131】次に、グループ番号が「2」でないものが
まだ存在していると、グループ番号「3」に該当するも
のがあるか否かを示す判定ビットをPRLCする(ステ
ップS84)。図15の例では、判定ビット列「011
11…」を独自の予測ビット長runでPRLCする。
そして、グループ番号の「3」に該当するものがあるか
否かを判定する(ステップS85)。グループ番号
「3」に該当するものがあると、2ビットの付加ビット
“00”“01”“10”“11”のいずれかをストリ
ームに出力する(ステップS86)。図15の例では、
第3番目の入力シンボルを「4」が該当し、付加ビット
“00”をストリームに出力する。なお、入力シンボル
が「5」のとき付加ビットは“01”で、「6」のとき
は“10”で、「7」のときは“11”としている。
Next, if there is still a group whose group number is not "2", a judgment bit indicating whether there is a group corresponding to the group number "3" is PRLC (step S84). In the example of FIG. 15, the determination bit string “011
11... With a unique prediction bit length run.
Then, it is determined whether or not there is a group corresponding to the group number “3” (step S85). If there is one corresponding to the group number "3", one of the two additional bits "00", "01", "10", and "11" is output to the stream (step S86). In the example of FIG.
"3" corresponds to the third input symbol, and an additional bit "00" is output to the stream. The additional bit is "01" when the input symbol is "5", "10" when it is "6", and "11" when it is "7".

【0132】以下同様なフローによって処理を実行する
(ステップS87からステップS99)。すなわち、グ
ループ番号「4」,「5」,「6」,「7」に該当する
ものがあるか否かを示す判定ビットをそれぞれPRLC
する(ステップS87,S90,S93,S96)と共
に該当番号のものがあると、それぞれ3ビット、4ビッ
ト、5ビット、6ビットの付加ビットをストリームに出
力する(ステップS89,S92,S95,S98)。
最後に、グループ番号「7」でないものが存在している
と、7ビットの付加ビットをストリームに出力し(ステ
ップS99)、1サイクルの符号化が完了する。
The processing is executed according to a similar flow (steps S87 to S99). That is, the determination bits indicating whether or not there are groups corresponding to the group numbers “4”, “5”, “6”, and “7” are respectively set in PRLC.
(Steps S87, S90, S93, S96) and if there is a corresponding number, additional bits of 3, 4, 5, and 6 bits are output to the stream (steps S89, S92, S95, S98). .
Finally, if there is a group other than the group number "7", 7 additional bits are output to the stream (step S99), and one cycle of encoding is completed.

【0133】この多値PRLCの第4の方法は、第2の
方法に比べ処理速度が向上している。すなわち、この第
4の方法は、グループ番号が確定した時点で、上位の判
定ビットの符号化を行わないようにしているためであ
る。一方、この第4の方法は、第2の方法と同様に、各
グループ番号の判定ビットを符号化する際、バッファ内
の該当する条件に合うビットの数が、予測ビット長ru
nに満たなかった場合、ダミーの優勢シンボルを不足分
だけ挿入して符号化を行う。この場合、復号側では、余
計な優勢シンボルが復号されるが、符号化時のバッファ
の容量が既知ならば、復号されたビットが有意なもの
か、ダミーで挿入されたものかの判別ができる。なお、
このようなダミーの優勢シンボルを利用する方法を避け
るには、バッファを十分大きく取るか、さらには、圧縮
の対象となるファイル全体を蓄えれるだけの容量を有す
るようにすれば良い。
The processing speed of the fourth method of the multi-value PRLC is higher than that of the second method. That is, in the fourth method, when the group number is determined, the encoding of the higher-order determination bits is not performed. On the other hand, in the fourth method, as in the second method, when encoding the determination bits of each group number, the number of bits in the buffer that satisfies the corresponding condition is equal to the predicted bit length ru.
If n is less than n, encoding is performed by inserting a dummy dominant symbol by the shortage. In this case, on the decoding side, an extra dominant symbol is decoded, but if the capacity of the buffer at the time of encoding is known, it is possible to determine whether the decoded bit is significant or inserted as a dummy. . In addition,
In order to avoid such a method of using the dummy dominant symbol, the buffer may be made sufficiently large, or may have a capacity sufficient to store the entire file to be compressed.

【0134】以上のような各方法を従来の方法とを比較
したデータを下記の表1および表2ならびに図16およ
び図17に示す。なお、図16は、圧縮率の比較を示す
表1をグラフ化したものであり、図17はデコードの処
理速度の比較を示す表2をグラフ化したものとなってい
る。
Data obtained by comparing each of the above methods with the conventional method are shown in Tables 1 and 2 below and FIGS. 16 and 17. FIG. 16 is a graph of Table 1 showing a comparison of compression ratios, and FIG. 17 is a graph of Table 2 showing a comparison of decoding processing speeds.

【0135】[0135]

【表1】 [Table 1]

【0136】[0136]

【表2】 [Table 2]

【0137】比較するための元となるファイルは、25
6色画像のビットマップ・ファイルを先頭移動辞書によ
りインデックス変換した多値情報源を用いている。ここ
で、先頭移動辞書は、256エントリーの辞書を256
個設け、直前の符号化シンボルにより辞書を切り替える
方式で、辞書の先頭移動は1/2先頭移動としている。
そして、従来の方法として採用したものはQMコーダに
よって8ビットのインデックスを直接符号化した「Q
M」と、多値データをそのまま算術符号により符号化し
た「AC」と、2パス式のハフマンを採用した「Huf
fman」との3種類で、本発明の方法として採用した
ものは、上述した多値PRLCの第2の方法の「TM8
E4」と第4の方法の「TM8E5」となっている。
The source file for comparison is 25 files.
A multi-valued information source is used in which a bitmap file of a six-color image is index-converted by a head moving dictionary. Here, the leading moving dictionary is a 256-entry dictionary of 256 entries.
In this method, the dictionary is switched according to the immediately preceding coded symbol, and the leading movement of the dictionary is 先頭 leading movement.
The method adopted as the conventional method is that the 8-bit index is directly encoded by the QM coder.
M "," AC "in which multi-valued data is encoded as it is by arithmetic coding, and" Huf using two-pass Huffman.
fman ", which is adopted as the method of the present invention is" TM8 "of the second method of the multi-valued PRLC described above.
E4 "and" TM8E5 "of the fourth method.

【0138】なお、「TM8E4」と「TM8E5」は
ともに、予測ビット長runの初期値を1とし、最大予
測ビット長runの値を256としている。そして、予
測ビット長runを2倍にする条件は、予測が2個以上
連続して的中したときとし、runを半分にする条件
は、予測が外れたときとする。さらに、優勢シンボルを
変更する条件は、予測ビット長runが1でかつ予測が
外れたときとしている。圧縮率は、表1および図16に
示すように「TM8E4」と「TM8E5」がQMコー
ダと同等の圧縮効率を達成している。特に「TM8E
5」は、4つの評価ファイルのうち、3つまでがQMコ
ーダの圧縮率を上回っている。また、デコードに要した
処理時間は、表2および図17に示すように、「TM8
E4」がQMコーダの約1/2となっており、「TM8
E5」がQMコーダの約1/3となっている。特に、エ
ントロピーの小さいファイルBE256.BMPでは、
「TM8E5」が「Huffman」に匹敵する処理速
度を達成している。なお、「TM8E4」や「TM8E
5」等のPLRCでは、2,4,8など予測ビット長が
比較的小さい場合、後述するように、符号テーブルを予
め作っておくことにより符号化および復号化することも
可能であり、一層の処理速度の向上が期待できる。さら
には、予測ビット長runの制御を最適化すれば、さら
なる効率アップが可能となる。
[0138] In both "TM8E4" and "TM8E5", the initial value of the predicted bit length run is 1 and the value of the maximum predicted bit length run is 256. Then, the condition for doubling the prediction bit length run is when two or more predictions are hit consecutively, and the condition for halving the run is when the prediction is missed. Further, the condition for changing the dominant symbol is that the prediction bit length run is 1 and the prediction is incorrect. As for the compression ratio, as shown in Table 1 and FIG. 16, "TM8E4" and "TM8E5" achieve the same compression efficiency as the QM coder. In particular, "TM8E
“5” indicates that up to three of the four evaluation files exceed the compression rate of the QM coder. The processing time required for decoding is “TM8” as shown in Table 2 and FIG.
E4 "is about 1/2 of the QM coder, and" TM8
E5 "is about 1/3 of the QM coder. In particular, the file BE256. In BMP,
“TM8E5” achieves a processing speed comparable to “Huffman”. Note that “TM8E4” and “TM8E
In a PLRC such as "5", when the prediction bit length is relatively small, such as 2, 4, and 8, coding and decoding can be performed by creating a code table in advance, as described later. An improvement in processing speed can be expected. Furthermore, if the control of the prediction bit length run is optimized, the efficiency can be further increased.

【0139】なお、上述の各実施の形態は、本発明の好
適な実施の形態の例であるが、これに限定されるもので
はなく、本発明の要旨を逸脱しない範囲において、種々
変形実施可能である。例えば、予測が当たったときに出
力する符号語としては“0”ではなく“1”とし、予測
がはずれたときは“1”ではなく“0”としたり、予測
が当たったときは優勢シンボルを出力し、予測がはずれ
たときは劣勢シンボルを出力するようにしても良い。ま
た、新減少予測ビット数を元の予測ビット数の1/2で
はなく、1/3や1/4等にしたり、元の予測ビット数
から所定数を差し引いた数等とすることができる。一
方、新増加予測ビット数も元の予測ビット数の2倍では
なく、3倍や4倍等にしたり、元の予測ビット数に所定
数を加えた数等とすることができる。なお、新増加予測
ビット数を無制限とせず、所定の値、例えば256ビッ
ト等、2の倍数を最大値とするようにしても良い。ま
た、新減少予測ビット数の最小値としては1ではなく、
2や3等他の数値としても良い。
Each of the above embodiments is an example of a preferred embodiment of the present invention. However, the present invention is not limited to this, and various modifications can be made without departing from the scope of the present invention. It is. For example, the codeword to be output when the prediction is successful is set to "1" instead of "0", and when the prediction is incorrect, it is set to "0" instead of "1". It is also possible to output the inferior symbol when the prediction is incorrect. Further, the new reduced predicted bit number can be set to 1/3, 1/4 or the like instead of 1/2 of the original predicted bit number, or a number obtained by subtracting a predetermined number from the original predicted bit number. On the other hand, the new increase prediction bit number is not twice the original prediction bit number, but may be tripled or quadrupled, or may be a number obtained by adding a predetermined number to the original prediction bit number. Note that the new increase prediction bit number is not limited, and a predetermined value, for example, 256 bits or a multiple of 2 may be set as the maximum value. Also, the minimum value of the new decrease prediction bit number is not 1, but
Other numerical values such as 2 and 3 may be used.

【0140】また、分割符号化工程において、分割を2
分割ではなく、3分割や4分割等にしたり、前半部注目
系列と後半部注目系列とを不均等に分割しても良い。さ
らに、予測がはずれたときの分割等の再帰的繰り返しを
ビット数が1になるまで行うのではなく、ビット数が2
や3等の数になったら終了させ、その後は、入力ビット
系列1をそのまま出力させたり、QMコーダで符号化し
たりするようにしても良い。
Also, in the division encoding step, the division is
Instead of the division, the target sequence may be divided into three, four, or the like, or the first half target sequence and the second half target sequence may be unequally divided. Furthermore, instead of performing recursive repetition such as division when prediction is missed until the number of bits becomes 1, the number of bits becomes 2
The processing may be terminated when the number reaches 3 or 3, and thereafter, the input bit sequence 1 may be output as it is, or may be encoded by a QM coder.

【0141】さらに、上述の実施の形態では、予測がは
ずれた場合、まず、前半部に注目して前半部の符号化を
行い、続いて後半部の符号化を行っているが、まず後半
部から符号化や復号化を行うようにしても良い。すなわ
ち、すべて、後半部を優先して、符号化および復号化を
行うようにしても良い。また、優先部分を前半部にした
り、後半部にしたり、適宜混ぜ合わせて符号化および復
号化を行うようにしても良い。
Further, in the above-described embodiment, when the prediction is incorrect, first, the first half is coded by paying attention to the first half, and then the second half is coded. May be used to perform encoding and decoding. That is, encoding and decoding may be performed with priority given to the latter half. Further, the encoding and decoding may be performed by setting the priority portion to the first half or the second half, or by appropriately mixing them.

【0142】さらに、上述の実施の形態では、予測ビッ
ト数runで定まる注目系列がすべて優勢シンボルと予
測し、予測が当たった場合は、符号語として、“0”等
を出力し、はずれた場合は、“1”等を出力すると共
に、さらに系列を2分割し、予測が的中するか分割が不
可能になるまで、同様の操作を行い、符号化を行ってい
る。しかし、予測ビット数が比較的短いもの、例えば、
1、2、4、8等の場合は、予め、符号化テーブルを用
意しておき、そのテーブルを参照することによって、1
サイクルで符号化を行うようにしても良い。例えば、予
測ビット数が2のときで、優勢シンボルを“0”とした
場合、入力ビット系列1が“00”のとき、符号ビット
10は“0”となり、“01”のときは“10”とな
り、“10”のときは“110”となり、“11”のと
きは“111”となるので、この関係を予め符号化テー
ブルとして用意しておくようにするものである。このよ
うな方法を交えることにより、さらに符号化時間を短縮
することができる。この場合、予測ビット数runによ
って、符号化テーブルを選択し符号化を行えば、上述の
実施の形態と同様な符号ビット10が得られる。また、
復号化においても同様に、復号化テーブルを用意し、予
測ビット数runで選択されるテーブルを参照すること
で、復号化時間を短縮した復号化を行うことができる。
Further, in the above-described embodiment, all the noticed sequences determined by the number of prediction bits run are predicted as dominant symbols, and if the prediction is successful, "0" or the like is output as a codeword, Outputs "1" and the like, further divides the sequence into two parts, performs the same operation until the prediction is correct or the division becomes impossible, and performs encoding. However, if the number of predicted bits is relatively short, for example,
In the case of 1, 2, 4, 8, etc., an encoding table is prepared in advance, and by referring to the table, 1
Encoding may be performed in cycles. For example, when the number of predicted bits is 2, the dominant symbol is “0”, when the input bit sequence 1 is “00”, the sign bit 10 is “0”, and when it is “01”, it is “10”. Since "10" is "110" and "11" is "111", this relationship is prepared in advance as an encoding table. By using such a method, the encoding time can be further reduced. In this case, if an encoding table is selected and encoded according to the number of prediction bits run, code bits 10 similar to those in the above-described embodiment can be obtained. Also,
Similarly, in decoding, by preparing a decoding table and referring to the table selected by the predicted bit number run, decoding can be performed with the decoding time reduced.

【0143】以上のような、多値情報源への本発明の適
用は、データ符号化の場合に限らず当然のことながら、
データ復号化の場合にも同様なアルゴリズムによって適
用することができる。また、多値PRLCの第2の方法
や第4の方法は、PRLCではなく通常のランレングス
符号化にも適用できる。
As described above, the application of the present invention to a multi-valued information source is not limited to the case of data encoding, and it goes without saying that
The same algorithm can be applied to data decoding. Also, the second and fourth methods of multi-value PRLC can be applied to ordinary run-length coding instead of PRLC.

【0144】[0144]

【発明の効果】以上説明したように、本発明の多値情報
源のデータ符号化方法およびデータ符号化装置では、Q
Mコーダ並みの符号化効率が得られる一方、符号化速度
がQMコーダに比べ非常に速いものとなる。このため、
現在使用されている各種の多値情報源の圧縮方式の中で
最も実用性の面で優れたものとなる。
As described above, in the data encoding method and data encoding apparatus for a multilevel information source according to the present invention, Q
While coding efficiency comparable to that of the M coder is obtained, the coding speed is much higher than that of the QM coder. For this reason,
It is the most practical in terms of the compression method of various multi-valued information sources currently used.

【0145】また、本発明の多値情報源のデータ復号化
方法およびデータ復号化装置では、同様に、QMコーダ
並みの伸長効率が得られる一方、復号化速度がQMコー
ダに比べ非常に速いものとなる。このため、現在利用さ
れている各種の多値情報源の復号方式の中で、実用上最
も優れたものとなり、利便性が向上する。
Further, in the data decoding method and the data decoding apparatus for a multi-valued information source according to the present invention, a decompression efficiency similar to that of a QM coder can be obtained, but the decoding speed is much higher than that of a QM coder. Becomes For this reason, it is the most practically practical decoding method among various multi-valued information sources currently used, and the convenience is improved.

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

【図1】本発明にて使用する予測ランレングス符号化の
アルゴリズムの概要を説明するための図で、注目系列と
予測ビット数runとの関係を示す図である。
FIG. 1 is a diagram for explaining an outline of an algorithm for predictive run-length encoding used in the present invention, and is a diagram illustrating a relationship between a sequence of interest and a predicted bit number run.

【図2】本発明にて使用する予測ランレングス符号化の
アルゴリズムの概要を説明するための図で、図1の注目
系列を分割した状態を示す図である。
FIG. 2 is a diagram for explaining an outline of an algorithm for predictive run-length coding used in the present invention, and is a diagram showing a state in which a sequence of interest in FIG. 1 is divided.

【図3】本発明にて使用する予測ランレングス符号化の
アルゴリズムの概要を説明するための図で、図2の前半
部注目系列をさらに分割した状態を示す図である。
FIG. 3 is a diagram for explaining an outline of a prediction run-length encoding algorithm used in the present invention, and is a diagram showing a state in which the first half attention sequence in FIG. 2 is further divided.

【図4】本発明にて使用する予測ランレングス符号化の
符号化プロセスを説明するためのフローチャートで、符
号化メインルーチンを示すフローチャートである。
FIG. 4 is a flowchart for explaining an encoding process of predictive run-length encoding used in the present invention, and is a flowchart showing an encoding main routine.

【図5】本発明にて使用する予測ランレングス符号化の
符号化プロセスを説明するためのフローチャートで、符
号化サブルーチンを示すフローチャートである。
FIG. 5 is a flowchart for explaining an encoding process of predictive run-length encoding used in the present invention, and is a flowchart showing an encoding subroutine.

【図6】本発明にて使用する予測ランレングス符号化の
データ符号化装置の実施の形態の構成を示すブロック図
である。
FIG. 6 is a block diagram showing a configuration of an embodiment of a data encoding device for predictive run-length encoding used in the present invention.

【図7】本発明にて使用する予測ランレングス符号化の
データ符号化方法およびデータ符号化装置による圧縮率
と符号化時間を示す図である。
FIG. 7 is a diagram illustrating a data encoding method of prediction run-length encoding used in the present invention and a compression rate and an encoding time by the data encoding device.

【図8】本発明にて使用する予測ランレングス符号化の
復号化プロセスを説明するためのフローチャートで、復
号化メインルーチンを示すフローチャートである。
FIG. 8 is a flowchart for explaining a decoding process of predictive run-length encoding used in the present invention, and is a flowchart showing a decoding main routine.

【図9】本発明にて使用する予測ランレングス符号化の
復号化プロセスを説明するためのフローチチャートで、
復号化サブルーチンを示すフローチャートである。
FIG. 9 is a flowchart illustrating a decoding process of predictive run-length encoding used in the present invention;
It is a flowchart which shows a decoding subroutine.

【図10】本発明にて使用する予測ランレングス符号化
のデータ復号化装置の実施の形態の構成を示すブロック
図である。
FIG. 10 is a block diagram showing a configuration of an embodiment of a data decoding device for predictive run-length encoding used in the present invention.

【図11】本発明の多値情報源のデータ符号化方法の第
2の方法を示すフロー・ダイアグラムである。
FIG. 11 is a flow diagram showing a second method of encoding data of a multi-level information source according to the present invention.

【図12】図11に示す第2の方法の具体的な動作を説
明するための図である。
FIG. 12 is a diagram for explaining a specific operation of the second method shown in FIG. 11;

【図13】本発明の多値情報源のデータ符号化方法の第
4の方法におけるグループ化を説明するための図であ
る。
FIG. 13 is a diagram for explaining grouping in a fourth method of the data encoding method of the multilevel information source according to the present invention.

【図14】本発明の多値情報源のデータ符号化方法の第
4の方法を示すフロー・ダイアグラムである。
FIG. 14 is a flow diagram illustrating a fourth method of the multi-level information source data encoding method according to the present invention.

【図15】図14に示す第4の方法の具体的な動作を説
明するための図である。
FIG. 15 is a diagram for explaining a specific operation of the fourth method shown in FIG. 14;

【図16】本発明の多値情報源のデータ符号化方法の第
2の方法および第4の方法を使用したものの圧縮率を示
すと共に従来の方法のものと比較した図である。
FIG. 16 is a diagram showing a compression ratio of a data encoding method using a second method and a fourth method of a multi-valued information source according to the present invention, and comparing with a conventional method.

【図17】本発明の多値情報源のデータ符号化方法の第
2の方法および第4の方法を使用したもののデコードに
要した処理時間を示すと共に従来の方法のものと比較し
た図である。
FIG. 17 is a diagram showing processing time required for decoding of the data encoding method of the multi-valued information source using the second method and the fourth method according to the present invention, and comparing with the conventional method. .

【図18】従来の算術符号型のエントロピー符号器であ
るQMコーダの構成を示す図である。
FIG. 18 is a diagram illustrating a configuration of a QM coder which is a conventional arithmetic code type entropy encoder.

【図19】図18のQMコーダの動作を示すフローチャ
ートである。
FIG. 19 is a flowchart showing the operation of the QM coder in FIG. 18;

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

1 入力ビット系列 2 バッファレジスタ 3 判定部 4 予測ビット長演算部 5 入出力制御信号発生部 6 スタック・メモリ 7 予測ビット長・優勢シンボル設定部 8 入力ビット要求信号 9 ストローブ信号 10 符号ビット 11 予測ビット・優勢シンボル設定部 12 予測ビット長演算部 13 スタック・メモリ 14 入出力制御信号発生部 15 復号ビット設定部 16 ストローブ信号 17 符号ビット要求信号 20 復号ビット run 予測ビット数 DESCRIPTION OF SYMBOLS 1 Input bit sequence 2 Buffer register 3 Judgment part 4 Prediction bit length calculation part 5 I / O control signal generation part 6 Stack memory 7 Prediction bit length and dominant symbol setting part 8 Input bit request signal 9 Strobe signal 10 Sign bit 11 Prediction bit Dominant symbol setting unit 12 Predicted bit length calculation unit 13 Stack memory 14 I / O control signal generation unit 15 Decoding bit setting unit 16 Strobe signal 17 Code bit request signal 20 Decoded bit run Predicted bit number

Claims (24)

【特許請求の範囲】[Claims] 【請求項1】 複数のビットからなる多値情報源をビッ
ト・プレーンに分け、各ビット・プレーンの“0”およ
び“1”からなる2値のビット列を入力する際、“0”
または“1”のいずれか一方を優勢シンボルとし、いず
れか他方を劣勢シンボルとすると共に、その優勢シンボ
ルがn個連続すると予測し、そのn個を予測ビット数と
して設定する予測設定工程と、入力された上記予測ビッ
ト数からなる注目系列について予測が当たったときに符
号語として“0”または“1”のいずれか一方の信号を
予測当たり信号として出力し、次のn個のビット列を符
号化する作業に移り、はずれたときに符号語として
“0”または“1”のいずれか他方の信号を予測はずれ
信号として出力する予測結果出力工程と、予測が所定回
数はずれたときに上記予測ビット数をn個より少ない新
減少予測ビット数として同様の予測設定工程と予測出力
工程とを再帰的に繰り返すことを特徴とする多値情報源
のデータ符号化方法。
1. A multi-valued information source composed of a plurality of bits is divided into bit planes, and when a binary bit string composed of “0” and “1” of each bit plane is inputted, “0” is input.
A prediction setting step of predicting that one of “1” is a dominant symbol and the other is a inferior symbol, predicts that the dominant symbol is continuous n, and sets the n as the number of prediction bits; When prediction is performed on the target sequence composed of the predicted number of bits, either one of "0" and "1" is output as a codeword as a signal per prediction, and the next n bit strings are coded. A prediction result output step of outputting the other signal of either “0” or “1” as a code word as a prediction error signal when the prediction is deviated, and the prediction bit number when the prediction is deviated a predetermined number of times. Wherein the same prediction setting step and prediction output step are recursively repeated with n being the new reduced prediction bit number less than n.
【請求項2】 前記n個を偶数個とし、前記予測が所定
回数はずれたときに前記注目系列を2分割し、その2分
割された前半部の前半部注目系列のみに劣勢シンボルが
存在するとき、前記新減少予測ビット数を前記予測ビッ
ト数の1/2とし、2分割された後半部の後半部注目系
列に劣勢シンボルが存在するとき前記新減少予測ビット
数を前記予測ビット数の1/4としたことを特徴とする
請求項1記載の多値情報源のデータ符号化方法。
2. The method according to claim 1, wherein said n number is an even number, and said sequence of interest is divided into two when said prediction is deviated by a predetermined number of times, and when there is a inferior symbol only in the first half of the sequence of interest. , The new reduced prediction bit number is set to の of the prediction bit number, and when the inferior symbol exists in the latter half target sequence of the second half, the new reduction prediction bit number is set to 1 / 1 / of the prediction bit number. 4. The data encoding method for a multi-valued information source according to claim 1, wherein the number is set to 4.
【請求項3】 前記新減少予測ビット数が1となり、か
つそのビットが劣勢シンボルのとき、以降の符号化にお
いて従来の劣勢シンボルを優勢シンボルとし、従来の優
勢シンボルを劣勢シンボルとして符号化するようにした
ことを特徴とする請求項1または2記載の多値情報源の
データ符号化方法。
3. When the new reduced prediction bit number is 1 and the bit is a inferior symbol, in the subsequent encoding, the conventional inferior symbol is set as the superior symbol and the conventional superior symbol is encoded as the inferior symbol. 3. A data encoding method for a multi-valued information source according to claim 1, wherein:
【請求項4】 前記所定回数を1回としたことを特徴と
する請求項1、2または3記載の多値情報源のデータ符
号化方法。
4. The data encoding method according to claim 1, wherein the predetermined number of times is one.
【請求項5】 前記予測が規定回数当たったときに、前
記予測ビット数をn個より多い新増加予測ビット数とす
ることを特徴とする請求項1、2、3または4記載の多
値情報源のデータ符号化方法。
5. The multi-valued information according to claim 1, wherein the number of predicted bits is set to a new increased predicted bit number larger than n when the predetermined number of predictions are performed. Source data encoding method.
【請求項6】 複数のビットからなる多値情報源をビッ
ト・プレーンに分け、各ビット・プレーンの“0”およ
び“1”からなる2値のビット列を入力する際、“0”
または“1”のいずれか一方を優勢シンボルとし、いず
れか他方を劣勢シンボルとすると共に、その優勢シンボ
ルがn個連続すると予測し、そのn個を予測ビット数と
して設定する予測設定工程と、入力されたn個のビット
列からなる注目系列について予測が当たったときに符号
語として“0”または“1”のいずれか一方の信号を予
測当たり信号として出力し、次のn個のビット列を符号
化する作業に移り、はずれたときに符号語として“0”
または“1”のいずれか他方の信号を予測はずれ信号と
して出力する予測結果出力工程と、予測が規定回数当た
ったときに、上記予測ビット数をn個より多い新増加予
測ビット数として同様の予測設定工程と予測結果出力工
程とを繰り返し行うことを特徴とする多値情報源のデー
タ符号化方法。
6. A multi-valued information source composed of a plurality of bits is divided into bit planes, and when a binary bit string consisting of “0” and “1” of each bit plane is input, “0” is input.
A prediction setting step of predicting that one of “1” is a dominant symbol and the other is a inferior symbol, predicts that the dominant symbol is continuous n, and sets the n as the number of prediction bits; When prediction is performed on the noticed sequence consisting of n bit strings, one of "0" and "1" is output as a codeword as a signal per prediction, and the next n bit strings are encoded. Work, and when deviated, codeword "0"
Or a prediction result output step of outputting either one of the signals “1” as a non-predicted signal, and a similar prediction in which the number of predicted bits is set to a new increased predicted bit number larger than n when the prediction is performed a specified number of times. A data encoding method for a multi-valued information source, wherein a setting step and a prediction result output step are repeatedly performed.
【請求項7】 前記規定回数を2回とし、前記新増加予
測ビット数を前記予測ビット数の2倍としたことを特徴
とする請求項5または6記載の多値情報源のデータ符号
化方法。
7. The data encoding method for a multi-valued information source according to claim 5, wherein the prescribed number of times is set to two times, and the new increase prediction bit number is set to twice the prediction bit number. .
【請求項8】 前記n個を2m(mは0以上の整数)と
したことを特徴とする請求項1、2、3、4、5、6ま
たは7記載のデータ符号化方法。
8. The data encoding method according to claim 1, wherein n is 2 m (m is an integer of 0 or more).
【請求項9】 前記予測がはずれたとき前記注目系列を
2分割し、2分割された前半部の前半部注目系列がすべ
て前記優勢シンボルのときは符号語として“0”を出力
し、2分割された後半部の後半部注目系列をさらに2分
割し、“0”または“1”の符号語を出力する前半部当
たり工程と、上記前半部注目系列に前記劣勢シンボルが
存在するときは符号語として“1”を出力すると共に、
上記前半部注目系列をさらに2分割し、“0”または
“1”の符号語を出力する前半部はずれ工程とを有し、
各分割された注目系列中に劣勢シンボルが存在する限
り、その注目系列の分割を繰り返し、前記前半部当たり
工程と前記前半部はずれ工程を再帰的に繰り返すことを
特徴とする請求項8記載の多値情報源のデータ符号化方
法。
9. When the prediction is deviated, the sequence of interest is divided into two, and when the first half sequence of interest in the first half is entirely the dominant symbol, “0” is output as a codeword, The second half of the generated second half sequence of interest is further divided into two, and a codeword of “0” or “1” is output, and a codeword is generated when the inferior symbol exists in the first half of the sequence of interest. And outputs “1” as
The first-half target sequence is further divided into two, and a first-half departure step of outputting a code word of “0” or “1” is provided.
9. The method according to claim 8, wherein, as long as the inferior symbol exists in each divided sequence of interest, division of the sequence of interest is repeated, and the first half hitting step and the first half separating step are recursively repeated. Data encoding method for value information source.
【請求項10】 前記予測がはずれたとき前記注目系列
を2分割し、2分割された後半部の後半部注目系列がす
べて前記優勢シンボルのときは符号語として“0”を出
力し、2分割された前半部の前半部注目系列をさらに2
分割し、“0”または“1”の符号語を出力する後半部
当たり工程と、上記後半部注目系列に前記劣勢シンボル
が存在するときは符号語として“1”を出力すると共
に、上記後半部注目系列をさらに2分割し、“0”また
は“1”の符号語を出力する後半部はずれ工程とを有
し、各分割された注目系列中に劣勢シンボルが存在する
限り、その注目系列の分割を繰り返し、前記後半部当た
り工程と前記後半部はずれ工程を再帰的に繰り返すこと
を特徴とする請求項8記載の多値情報源のデータ符号化
方法。
10. When the prediction is deviated, the target sequence is divided into two, and when all the latter half target sequences of the latter half are the dominant symbols, “0” is output as a codeword, and The first half attention series of the first half is further increased by 2
The latter half step of dividing and outputting a code word of “0” or “1”; and outputting the code word “1” when the inferior symbol exists in the latter half notice sequence, The target sequence is further divided into two, and the latter half-off step of outputting a code word of “0” or “1” is performed. As long as the inferior symbol exists in each divided target sequence, the division of the target sequence is performed. 9. The data encoding method for a multi-level information source according to claim 8, wherein the step of repeating the latter half part and the step of separating the latter half part are recursively repeated.
【請求項11】 複数のビットからなる多値情報源を
ビット・プレーンに分け、最上位ビットのビットプレー
ンから請求項1ないし10のいずれか1項記載のデータ
符号化方法によって符号化し、“1”が出現した時点
で、続く下位ビットを符号ビットとして出力するように
したことを特徴とする多値情報源のデータ符号化方法。
11. A multi-valued information source consisting of a plurality of bits is divided into bit planes, and the bit plane of the most significant bit is encoded by the data encoding method according to any one of claims 1 to 10, wherein "1" A data encoding method for a multi-valued information source, wherein the following lower bits are output as code bits when "" appears.
【請求項12】 複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの“0”お
よび“1”からなる2値の入力ビット系列を圧縮して符
号化する多値情報源のデータ符号化装置において、
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共にその優勢
シンボルがn個連続すると予測し、そのn個を予測ビッ
ト数として設定する予測ビット長等演算設定部と、入力
ビット系列を一時記憶するバッファレジスタと、上記予
測ビット長等演算設定部および上記バッファレジスタの
各値を入力し、その入力された上記予測ビット数からな
る注目系列について予測が当たったときに符号語として
“0”または“1”のいずれか一方の信号を予測当たり
信号として出力し、はずれたときに符号語として“0”
または“1”のいずれか他方の信号を予測はずれ信号と
して出力する判定部とを備え、上記予測が所定回数はず
れたときに上記予測ビット数をn個より少ない新減少予
測ビット数を上記予測ビット長等演算設定部で設定し、
上記予測が規定回数当たったときに、上記予測ビット数
をn個より多い新増加予測ビット数を上記予測ビット長
等演算設定部で設定することを特徴とする多値情報源の
データ符号化装置。
12. A multi-level information source which divides a multi-level information source consisting of a plurality of bits into bit planes and compresses and encodes a binary input bit sequence consisting of “0” and “1” of each bit plane In the data encoding device of the information source,
Either “0” or “1” is set as a dominant symbol, and the other is set as a dominant symbol, and it is predicted that n dominant symbols are continuous, and the set n is set as the number of bits to be predicted. An operation setting unit, a buffer register for temporarily storing an input bit sequence, and input of each value of the operation setting unit and the buffer register for the prediction bit length, etc., and a prediction is performed for a target sequence consisting of the input prediction bit number. Either "0" or "1" is output as a per-prediction signal as a codeword when hit, and "0" is output as a codeword when deviated.
Or a determination unit that outputs the other signal of “1” as an out-of-prediction signal, and when the prediction deviates by a predetermined number of times, sets the predicted bit number smaller than n to the new reduced predicted bit number Set in the length calculation setting section,
A data encoding device for a multi-valued information source, wherein when the number of predictions reaches a prescribed number of times, the number of predicted bits is set to a new increased predicted bit number greater than n by the predicted bit length etc. operation setting unit. .
【請求項13】 複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの入力ビッ
ト系列を一時記憶するレジスタ群よりなるバッファレジ
スタと、符号化する注目系列の先頭位置を示す変数of
sを保持するレジスタおよび予測ビット長を示す変数w
idthを保持するレジスタを内蔵する予測ビット長演
算部と、この予測ビット長演算部が出力する上記バッフ
ァレジスタ上のofsの位置およびそのofsから上記
widthにより定まる上記バッファレジスタ上の入力
ビット系列を選択し、その入力ビット系列がすべて優勢
シンボルのとき符号ビット出力として1つの優勢シンボ
ルを出力し、劣勢シンボルが含まれるときは1つの劣勢
シンボルを出力する判定部と、上記バッファレジスタ内
の入力ビット系列の符号化が完了した旨の完了信号を上
記予測ビット長演算部より受けたとき入力ビット要求を
行う入出力制御信号発生部と、刻々変化する上記wid
thの値を保持しておくためのメモリとなるスタック・
メモリと、上記予測ビット長演算部より過去の符号化の
状態を入力し、新たに入力する入力ビット系列の予測ビ
ット長と優勢シンボルを設定する予測ビット長・優勢シ
ンボル設定部とを備え、上記入出力制御信号発生部は上
記完了信号を上記予測ビット長演算部より受けたとき上
記バッファレジスタに対して上記予測ビット長・演算シ
ンボル設定部によって新たに設定された新予測ビット長
で示される個数の入力ビット系列の取り込みを指示する
ことを特徴とする多値情報源のデータ符号化装置。
13. A multi-valued information source comprising a plurality of bits is divided into bit planes, and a buffer register comprising a group of registers for temporarily storing an input bit sequence of each bit plane, and a head position of a sequence of interest to be encoded are defined. The variable of which to indicate
register holding s and variable w indicating the predicted bit length
a prediction bit length calculation unit including a register for holding the id, and an input bit sequence on the buffer register determined by the width based on the position of ofs on the buffer register output from the prediction bit length calculation unit and the ofs thereof A determination unit that outputs one superior symbol as a code bit output when all the input bit sequences are superior symbols, and outputs one inferior symbol when the inferior symbol is included, and an input bit sequence in the buffer register. And an input / output control signal generator for requesting an input bit when receiving a completion signal from the prediction bit length calculator from the prediction bit length calculator,
stack as a memory for holding the value of th
A memory, and a prediction bit length / predominant symbol setting unit for inputting a past encoding state from the prediction bit length calculation unit and setting a prediction bit length and a superior symbol of an input bit sequence to be newly inputted; The entry output control signal generator, when receiving the completion signal from the predicted bit length calculator, indicates the number indicated by the new predicted bit length newly set by the predicted bit length / calculated symbol setting unit for the buffer register. A data encoding apparatus for a multi-valued information source, which instructs to take in an input bit sequence.
【請求項14】 複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの符号化さ
れたデータを入力し“0”および“1”からなる2値の
ビット列に復号化した後、多値情報源を復号する多値情
報源のデータ復号化方法において、各ビット・プレーン
の“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個(nは1以上の整数)連続すると予測
したその予測結果を“0”および“1”からなる2値の
ビット列で表した符号語を1ビットずつ入力する入力工
程を有し、入力された符号語が予測当たりの値のとき上
記優勢シンボルをn個連続して復号化すると共に、予測
当たりが所定回数連続したときは上記n個より多い数の
優勢シンボルが連続すると新たに予測するようにしたこ
とを特徴とする多値情報源のデータ復号化方法。
14. A multi-valued information source consisting of a plurality of bits is divided into bit planes, and encoded data of each bit plane is input and decoded into a binary bit string consisting of "0" and "1". Then, in the multi-level information source data decoding method for decoding the multi-level information source, one of "0" and "1" of each bit plane is set as a superior symbol and the other is set as an inferior symbol. And an input step of inputting, one bit at a time, a codeword representing a prediction result of predicting that the dominant symbol is continuous n (n is an integer of 1 or more) as a binary bit string consisting of “0” and “1”. When the input codeword is a value per prediction, the above-mentioned n predominant symbols are consecutively decoded, and when the number of per-prediction is continuous a predetermined number of times, the number of more than n predominant symbols is consecutive. Then, a data decoding method for a multi-valued information source is newly predicted.
【請求項15】 複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの“0”ま
たは“1”のいずれか一方を優勢シンボルとし、いずれ
か他方を劣勢シンボルとすると共に、その優勢シンボル
がn個(nは1以上の整数)連続すると予測したその予
測結果を“0”および“1”からなる2値のビット列で
表した符号語を1ビットずつ入力する入力工程と、入力
された符号語が予測当たりの値のとき、上記優勢シンボ
ルをn個連続して復号化すると共に、入力された符号語
が予測はずれの値のとき、次の符号語を入力する予測結
果復号化工程と上記次の符号語の値が予測当たりの値の
とき上記優勢シンボルをn−m個連続して復号化し、予
測はずれの値のときは再度次の符号語を入力する工程を
再帰的に繰り返し、0<n−m≦1のときの予測はずれ
時に劣勢シンボルを復号化するようにしたことを特徴と
する多値情報源のデータ復号化方法。
15. A multi-valued information source comprising a plurality of bits is divided into bit planes, and one of “0” and “1” of each bit plane is set as a superior symbol and the other is set as an inferior symbol. And an input step of inputting, one bit at a time, a codeword representing a prediction result of predicting that the dominant symbol is continuous n (n is an integer of 1 or more) as a binary bit string consisting of “0” and “1”. And when the input code word is a value per prediction, decodes the n dominant symbols consecutively, and when the input code word is a non-prediction value, predicts the next code word. A result decoding step and a step of consecutively decoding nm the dominant symbols when the value of the next codeword is a value per prediction, and inputting the next codeword again when the value of the prediction error is obtained. Recursively, A data decoding method for a multi-valued information source, characterized by decoding the inferior symbol at the time of misprediction when 0 <nm ≦ 1.
【請求項16】 複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの符号化さ
れたデータとなる符号ビットを入力し、“0”および
“1”からなる2値のビット列からなる復号ビットにし
た後、多値情報源を復号化する多値情報源のデータ復号
化装置において、各ビット・プレーンの“0”または
“1”のいずれか一方を優勢シンボルとし、いずれか他
方を劣勢シンボルとしたとき上記符号ビットの優勢シン
ボルと予測ビット長n個を設定する予測ビット長等設定
演算部と、この予測ビット長等設定演算部からの復号ビ
ット出力許可信号を受けて入力中の符号ビットを所定の
形で一時保持すると共に復号ビットを出力する復号ビッ
ト設定部とを備え、入力された符号ビットが上記優勢シ
ンボルの場合、復号ビット出力許可信号を出力し上記復
号ビット設定部に上記優勢シンボルを書き込むと共に、
上記優勢シンボルが所定回数連続したときは上記予測ビ
ット長をn個より多い数に変更することを特徴とする多
値情報源のデータ復号化装置。
16. A multi-valued information source consisting of a plurality of bits is divided into bit planes, and code bits serving as coded data of each bit plane are inputted, and a binary value consisting of "0" and "1" is inputted. In the data decoding device of the multi-valued information source for decoding the multi-valued information source after converting the decoded bits into the decoded bits composed of the following bit strings, one of “0” and “1” of each bit plane is set as the dominant symbol, When one of them is the inferior symbol, it receives a superior symbol of the code bit and a prediction bit length setting operation unit for setting n prediction bit lengths, and receives a decoded bit output permission signal from the prediction bit length etc operation unit. A decoding bit setting unit for temporarily holding the input code bit in a predetermined form and outputting a decoded bit, and when the input code bit is the above dominant symbol, Output an output enable signal and write the superior symbol to the decoded bit setting unit,
A data decoding apparatus for a multi-valued information source, wherein the prediction bit length is changed to a number greater than n when the dominant symbol continues for a predetermined number of times.
【請求項17】 複数のビットからなる多値情報源をビ
ット・プレーンに分け、各ビット・プレーンの“0”ま
たは“1”のいずれか一方を優勢シンボルとし、いずれ
か他方を劣勢シンボルすると共にそのシンボルがn個
(nは1以上の整数)連続すると予測したその予測結果
を“0”および“1”からなる2値のビット列で表した
符号ビットを1ビットずつ入力する復号化する復号化装
置において、上記符号ビットの予測ビット長と上記優勢
シンボルを設定する予測ビット長・優勢シンボル設定部
と、この予測ビット長・優勢シンボル設定部から予測ビ
ット長と優勢シンボルならびに上記符号ビットを入力
し、その符号ビットの値に応じて復号ビット出力許可信
号を出力する予測ビット長演算部と、上記復号ビット出
力許可信号を入力し、入力中の符号ビットを所定の形で
一時保持すると共に復号ビットを出力する復号ビット設
定部とを備え、上記予測ビット長演算部に入力された符
号語が予測当たりの値の時、上記優勢シンボルをn個連
続して上記復号ビット設定部に書き込むと共に、上記入
力された符号語が予測はずれのとき次の符号ビットを入
力し、その値が予測当たりの値の時、上記優勢シンボル
をn−m個(mは1以上の整数でnより小さい値)連続
して上記復号ビット設定部に書き込み、予測はずれのと
きは再度次の符号を予測ビット長演算部に入力するよう
にしたことを特徴とする多値情報源のデータ復号化装
置。
17. A multi-valued information source composed of a plurality of bits is divided into bit planes, one of “0” and “1” of each bit plane is set as a superior symbol, and the other is set as an inferior symbol. Decoding for decoding by inputting, one bit at a time, code bits that represent the result of predicting that the symbol is continuous (n is an integer of 1 or more) as a binary bit string consisting of “0” and “1”. In the apparatus, a prediction bit length and a superior symbol setting unit for setting the prediction bit length of the code bit and the superior symbol, and a prediction bit length and a superior symbol and the code bit from the prediction bit length and superior symbol setting unit are input. A prediction bit length calculation unit for outputting a decoded bit output permission signal in accordance with the value of the code bit, and the decoded bit output permission signal, A decoding bit setting unit that temporarily holds the current code bit in a predetermined form and outputs a decoded bit, wherein when the code word input to the prediction bit length calculation unit is a value per prediction, the superior symbol Are successively written to the decoding bit setting unit, and when the input code word is mispredicted, the next code bit is input. When the value is a value per prediction, the dominant symbol is set to n− m pieces (m is an integer of 1 or more and smaller than n) are continuously written to the above-mentioned decoded bit setting section, and when the prediction is incorrect, the next code is again inputted to the prediction bit length calculating section. A data decoding device for a multi-valued information source.
【請求項18】 複数のビットからなる多値情報源をレ
ベル・プレーンに分け、各レベル・プレーンの“0”お
よび“1”からなる2値のビット列を入力する際、
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個連続すると予測し、そのn個を予測ビ
ット数として設定する予測設定工程と、入力された上記
予測ビット数からなる注目系列について予測が当たった
ときに符号語として“0”または“1”のいずれか一方
の信号を予測当たり信号として出力し、次のn個のビッ
ト列を符号化する作業に移り、はずれたときに符号語と
して“0”または“1”のいずれか他方の信号を予測は
ずれ信号として出力する予測結果出力工程と、予測が所
定回数はずれたときに上記予測ビット数をn個より少な
い新減少予測ビット数として同様の予測設定工程と予測
出力工程とを再帰的に繰り返すことを特徴とする多値情
報源のデータ符号化方法。
18. A multi-level information source composed of a plurality of bits is divided into level planes, and when a binary bit string composed of “0” and “1” of each level plane is input,
A prediction setting step of setting one of “0” and “1” as a dominant symbol, setting the other as a dominant symbol, predicting that the dominant symbol is continuous n, and setting the n as the number of bits to be predicted And when a prediction is hit for the input sequence of interest consisting of the number of prediction bits, one of "0" and "1" is output as a codeword as a per-prediction signal, and the next n bit strings are output. And a prediction result output step of outputting the other signal of either “0” or “1” as a codeword as a mispredicted signal when the prediction is deviated. Data coding of a multi-valued information source characterized by repeating the same prediction setting step and prediction output step recursively with the number of predicted bits being a new reduced predicted number of bits less than n Law.
【請求項19】 複数のビットからなる多値情報源をレ
ベル・プレーンに分け、各レベル・プレーンの“0”お
よび“1”からなる2値のビット列を入力する際、
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共に、その優
勢シンボルがn個連続すると予測し、そのn個を予測ビ
ット数として設定する予測設定工程と、入力されたn個
のビット列からなる注目系列について予測が当たったと
きに符号語として“0”または“1”のいずれか一方の
信号を予測当たり信号として出力し、次のn個のビット
列を符号化する作業に移り、はずれたときに符号語とし
て“0”または“1”のいずれか他方の信号を予測はず
れ信号として出力する予測結果出力工程と、予測が規定
回数当たったときに、上記予測ビット数をn個より多い
新増加予測ビット数として同様の予測設定工程と予測結
果出力工程とを繰り返し行うことを特徴とする多値情報
源のデータ符号化方法。
19. When dividing a multi-valued information source consisting of a plurality of bits into level planes and inputting a binary bit string consisting of "0" and "1" of each level plane,
A prediction setting step of setting one of “0” and “1” as a dominant symbol, setting the other as a dominant symbol, predicting that the dominant symbol is continuous n, and setting the n as the number of bits to be predicted And, when prediction is performed on the input sequence of interest consisting of n bit strings, one of "0" and "1" is output as a codeword as a per-prediction signal, and the next n bit strings are output. And a prediction result output step of outputting the other signal of either “0” or “1” as a codeword as a de-prediction signal when the prediction is deviated. A data encoding method for a multi-valued information source, wherein the same prediction setting step and prediction result output step are repeatedly performed with the number of predicted bits being a new increased predicted bit number larger than n. .
【請求項20】 複数のビットからなる多値情報源をレ
ベル・プレーンに分け、このレベル・プレーンのうち、
確率が集中するレベル・プレーンを独立に扱い、確率が
低いものは複数のレベル・プレーンとしてまとめるよう
にしたグループに分け、入力された多値情報源が各グル
ープ番号に該当するか否かの判定ビットを“0”および
“1”からなるビットで構成し、この判定ビット列を入
力する際、確率が集中するグループ番号側から入力する
入力工程と、各グループの判定ビットの“0”または
“1”のいずれか一方を優勢シンボルとし、いずれか他
方を劣勢シンボルとすると共に、その優勢シンボルがn
個連続すると予測し、そのn個を予測ビット数として設
定する予測設定工程と、入力された上記予測ビット数か
らなる注目系列について予測が当たったときに符号語と
して“0”または“1”のいずれか一方の信号を予測当
たり信号として出力し、次のn個のビット列を符号化す
る作業に移り、はずれたときに符号語として“0”また
は“1”のいずれか他方の信号を予測はずれ信号として
出力する予測結果出力工程と、予測が所定回数はずれた
ときに上記予測ビット数をn個より少ない新減少予測ビ
ット数として同様の予測設定工程と予測出力工程とを再
帰的に繰り返す再帰的工程と、上記判定ビットが当該グ
ループに該当する旨の信号のときには当該入力シンボル
の符号化を完了し、そうでない場合には、当該グループ
より確率が集中しないグループの判定ビットに対し、上
記予測設定工程と上記予測結果出力工程と上記再帰的工
程とを実行するようにしたことを特徴とする多値情報源
のデータ符号化方法。
20. A multi-valued information source composed of a plurality of bits is divided into level planes, and among the level planes,
Level planes with high probabilities are treated independently, and low-probability ones are grouped into multiple level planes, and it is determined whether the input multi-valued information source corresponds to each group number The bits are composed of bits consisting of "0" and "1". When this determination bit string is input, the input step is performed from the group number side where the probability is concentrated, and the determination bit "0" or "1" of each group is input. Is set as the superior symbol, and the other is set as the inferior symbol, and the superior symbol is n
A prediction setting step of predicting the number of consecutive bits and setting the number n as the number of bits to be predicted; One of the signals is output as a signal per prediction, and the operation shifts to the operation of encoding the next n bit strings. When the signal deviates, the other signal of "0" or "1" is de-predicted as a codeword. A prediction result output step of outputting as a signal, and a similar prediction setting step and a prediction output step of recursively repeating the same prediction setting step and the prediction output step as a new reduced prediction bit number smaller than n when the prediction is deviated a predetermined number of times. And if the determination bit is a signal indicating that the input signal belongs to the group, the encoding of the input symbol is completed; otherwise, the probability is more concentrated than the group. To determine bit have groups, the prediction set step and the prediction result output process and the data encoding method of the multi-level information source, characterized in that so as to perform the above recursive steps.
【請求項21】 前記n個を2m(mは0以上の整数)
としたことを特徴とする請求項18、19または20記
載の多値情報源のデータ符号化方法。
21. The above-mentioned n number is 2 m (m is an integer of 0 or more).
21. The data encoding method for a multilevel information source according to claim 18, 19, or 20.
【請求項22】 前記予測がはずれたとき前記注目系列
を2分割し、2分割された前半部の前半部注目系列がす
べて前記優勢シンボルのときは符号語として“0”を出
力し、2分割された後半部の後半部注目系列をさらに2
分割し、“0”または“1”の符号語を出力する前半部
当たり工程と、上記前半部注目系列に前記劣勢シンボル
が存在するときは符号語として“1”を出力すると共
に、上記前半部注目系列をさらに2分割し、“0”また
は“1”の符号語を出力する前半部はずれ工程とを有
し、各分割された注目系列中に劣勢シンボルが存在する
限り、その注目系列の分割を繰り返し、前記前半部当た
り工程と前記前半部はずれ工程を再帰的に繰り返すこと
を特徴とする請求項21記載の多値情報源のデータ符号
化方法。
22. When the prediction is deviated, the noted sequence is divided into two, and when all the divided first-half first-half target sequences are the dominant symbols, “0” is output as a codeword, and The second half attention series of the second half of the
A first half hitting step of dividing and outputting a code word of “0” or “1”; and outputting a “1” as a code word when the inferior symbol exists in the first half attention sequence, The target sequence is further divided into two, and a first half off step of outputting a code word of “0” or “1” is performed. As long as the inferior symbol exists in each divided target sequence, the division of the target sequence is performed. 22. The data encoding method for a multi-valued information source according to claim 21, wherein the first half contact step and the first half separation step are recursively repeated.
【請求項23】 複数のビットからなる多値情報源をレ
ベル・プレーンに分け、このレベル・プレーンのうち、
確率が集中するレベル・プレーンを独立に扱い、確率が
低いものは複数のレベル・プレーンとしてまとめるよう
にしたグループに分け、入力された多値情報源が各グル
ープ番号に該当するか否かの判定ビットを“0”および
“1”からなるビットで構成し、この判定ビットの
“0”または“1”のいずれか一方を優勢シンボルと
し、いずれか他方を劣勢シンボルとすると共にその優勢
シンボルがn個連続すると予測し、そのn個を予測ビッ
ト数として設定する予測ビット長等演算設定部と、入力
ビット系列を一時記憶するバッファレジスタと、上記予
測ビット長等演算設定部および上記バッファレジスタの
各値を入力し、その入力された上記予測ビット数からな
る注目系列について予測が当たったときに符号語として
“0”または“1”のいずれか一方の信号を予測当たり
信号として出力し、はずれたときに符号語として“0”
または“1”のいずれか他方の信号を予測はずれ信号と
して出力する判定部とを備え、上記予測が所定回数はず
れたときに上記予測ビット数をn個より少ない新減少予
測ビット数を上記予測ビット長等演算設定部で設定し、
上記予測が規定回数当たったときに、上記予測ビット数
をn個より多い新増加予測ビット数を上記予測ビット長
等演算設定部で設定することを特徴とする多値情報源の
データ符号化装置。
23. A multi-valued information source comprising a plurality of bits is divided into level planes, and among the level planes,
Level planes with high probabilities are treated independently, and low-probability ones are grouped into multiple level planes, and it is determined whether the input multi-valued information source corresponds to each group number Bits are composed of bits consisting of "0" and "1", and either "0" or "1" of the determination bit is set as a superior symbol, and the other is set as an inferior symbol, and the superior symbol is n. A prediction bit length calculation setting unit that predicts that the number of bits is continuous and sets n as the number of prediction bits; a buffer register that temporarily stores an input bit sequence; When a value is input and a prediction is successful for a target sequence consisting of the input prediction bit number, either "0" or "1" is used as a codeword. One of the signal outputs as a prediction hit signal or Re, as a code word when off "0"
Or a determination unit that outputs the other signal of “1” as an out-of-prediction signal, and when the prediction deviates by a predetermined number of times, sets the predicted bit number smaller than n to the new reduced predicted bit number Set in the length calculation setting section,
A data encoding device for a multi-valued information source, wherein when the number of predictions reaches a prescribed number of times, the number of predicted bits is set to a new increased predicted bit number greater than n by the predicted bit length etc. operation setting unit. .
【請求項24】 複数のビットからなる多値情報源をレ
ベル・プレーンに分け、このレベル・プレーンのうち、
確率が集中するレベル・プレーンを独立に扱い、確率が
低いものは複数のレベル・プレーンとしてまとめるよう
にしたグループに分け、入力された多値情報源が各グル
ープ番号に該当するか否かの判定ビットを“0”および
“1”からなるビットで構成し、この判定ビットからな
る入力ビット系列を一時記憶するレジスタ群よりなるバ
ッファレジスタと、符号化する注目系列の先頭位置を示
す変数ofsを保持するレジスタおよび予測ビット長を
示す変数widthを保持するレジスタを内蔵する予測
ビット長演算部と、この予測ビット長演算部が出力する
上記バッファレジスタ上のofsの位置およびそのof
sから上記widthにより定まる上記バッファレジス
タ上の入力ビット系列を選択し、その入力ビット系列が
すべて優勢シンボルのとき符号ビット出力として1つの
優勢シンボルを出力し、劣勢シンボルが含まれるときは
1つの劣勢シンボルを出力する判定部と、上記バッファ
レジスタ内の入力ビット系列の符号化が完了した旨の完
了信号を上記予測ビット長演算部より受けたとき入力ビ
ット要求を行う入出力制御信号発生部と、刻々変化する
上記widthの値を保持しておくためのメモリとなる
スタック・メモリと、上記予測ビット長演算部より過去
の符号化の状態を入力し、新たに入力する入力ビット系
列の予測ビット長と優勢シンボルを設定する予測ビット
長・優勢シンボル設定部とを備え、上記入出力制御信号
発生部は上記完了信号を上記予測ビット長演算部より受
けたとき上記バッファレジスタに対して上記予測ビット
長・演算シンボル設定部によって新たに設定された新予
測ビット長で示される個数の入力ビット系列の取り込み
を指示することを特徴とする多値情報源のデータ符号化
装置。
24. A multi-valued information source composed of a plurality of bits is divided into level planes, and among the level planes,
Level planes with high probabilities are treated independently, and low-probability ones are grouped into multiple level planes, and it is determined whether the input multi-valued information source corresponds to each group number The bits are composed of bits consisting of "0" and "1", and hold a buffer register consisting of a group of registers for temporarily storing an input bit sequence consisting of the determination bits, and a variable ofs indicating the head position of the target sequence to be encoded. Bit length calculation unit including a register to be executed and a register holding a variable width indicating the prediction bit length, a position of ofs on the buffer register output by the prediction bit length calculation unit, and its off
s, selects an input bit sequence on the buffer register determined by the width, outputs one dominant symbol as a code bit output when all of the input bit sequences are dominant symbols, and outputs one dominant symbol when a dominant symbol is included. A determination unit that outputs a symbol, an input / output control signal generation unit that issues an input bit request when receiving a completion signal indicating that encoding of the input bit sequence in the buffer register has been completed from the prediction bit length calculation unit, A stack memory serving as a memory for holding the value of the width that changes every moment, and a prediction bit length of an input bit sequence newly input by inputting a past encoding state from the prediction bit length calculation unit And a predictive bit length and dominant symbol setting unit for setting a dominant symbol. When the signal is received from the prediction bit length calculation unit, the buffer register is instructed to fetch the number of input bit sequences indicated by the new prediction bit length newly set by the prediction bit length / operation symbol setting unit. A data encoding device for a multi-valued information source.
JP9237499A 1996-09-02 1997-09-02 Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder Withdrawn JPH10126276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9237499A JPH10126276A (en) 1996-09-02 1997-09-02 Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP23232496 1996-09-02
JP8-232324 1996-09-02
JP9237499A JPH10126276A (en) 1996-09-02 1997-09-02 Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder

Publications (1)

Publication Number Publication Date
JPH10126276A true JPH10126276A (en) 1998-05-15

Family

ID=26530395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9237499A Withdrawn JPH10126276A (en) 1996-09-02 1997-09-02 Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder

Country Status (1)

Country Link
JP (1) JPH10126276A (en)

Similar Documents

Publication Publication Date Title
EP1832000B1 (en) Device and data method for selective compression and decompression and data format for compressed data
JP5221047B2 (en) CABAC encoding method and apparatus using improved context model selection for improved compression ratio, and CABAC decoding method and apparatus
JP3017379B2 (en) Encoding method, encoding device, decoding method, decoder, data compression device, and transition machine generation method
US7079057B2 (en) Context-based adaptive binary arithmetic coding method and apparatus
US5045852A (en) Dynamic model selection during data compression
JP2011066557A (en) Data processing apparatus and method
US6546053B1 (en) System and method for decoding signal and method of generating lookup table for using in signal decoding process
JPH07336237A (en) System and method for compressing data information
US6055273A (en) Data encoding and decoding method and device of a multiple-valued information source
JP3593884B2 (en) Encoding device and decoding device
JPH1013693A (en) Digital information encoding device, digital information decoding device, digital information encoding/decoding device, digital information encoding method and digital information decoding method
CN110602498A (en) Self-adaptive finite state entropy coding method
US5991340A (en) Method and system for encoding and decoding data using run prediction
GB2310345A (en) Data coder/decoder for compression
JPH10126276A (en) Data-coding method for multi-value information source, data coder, data-decoding method for multi-value information source and data decoder
JP3482820B2 (en) Data encoding method, data encoding device, data decoding method, and data decoding device
JP7305609B2 (en) A device that processes received data
KR100207428B1 (en) Variable length coding apparatus and method adaptive to changes of the hoffman codes
JP3648944B2 (en) Data encoding method, data encoding device, data decoding method, and data decoding device
JP2005217871A (en) Arithmetic decoding apparatus and arithmetic decoding program
JPH0723238A (en) Picture data compression and decoding device
JPS6364948B2 (en)
KR100462060B1 (en) UVLC Multiple Decoding Method
CN115865098A (en) Data compression method based on Huffman coding
JP3332630B2 (en) Decoding device and decoding table generation method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20041102