JP3119027B2 - Coding method and decoding method and coding / decoding method - Google Patents

Coding method and decoding method and coding / decoding method

Info

Publication number
JP3119027B2
JP3119027B2 JP05098047A JP9804793A JP3119027B2 JP 3119027 B2 JP3119027 B2 JP 3119027B2 JP 05098047 A JP05098047 A JP 05098047A JP 9804793 A JP9804793 A JP 9804793A JP 3119027 B2 JP3119027 B2 JP 3119027B2
Authority
JP
Japan
Prior art keywords
code
decoding
sequence
encoding
arithmetic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP05098047A
Other languages
Japanese (ja)
Other versions
JPH06311046A (en
Inventor
智広 木村
文孝 小野
茂徳 木野
雅之 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP05098047A priority Critical patent/JP3119027B2/en
Publication of JPH06311046A publication Critical patent/JPH06311046A/en
Application granted granted Critical
Publication of JP3119027B2 publication Critical patent/JP3119027B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】この発明は文字データ、画像デー
タ等のデータの冗長な部分を算術符号化を用いて抑圧す
符号化方式および復号方式および符号化/復号方式
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding system, a decoding system, and an encoding / decoding system for suppressing a redundant portion of data such as character data and image data by using arithmetic coding.

【0002】[0002]

【従来の技術】データ符号化およびデータ復号に適用で
きる1つの方法として算術符号化が知られている。一般
に算術符号化では、0以上1未満の数直線上に有効領域
を設けて入力シンボル系列の入力シンボルの出現確率比
に分割し、新たな系列に対する有効領域を割り当て更新
する操作を繰り返し、最終的な入力シンボル系列に対応
する有効領域内の2進小数値を符号とすることによりシ
ンボルの出現頻度が既知または予測可であるときにエン
トロピーに限りなく近い高い符号化効率を得ることがで
きる。
2. Description of the Related Art Arithmetic coding is known as one method applicable to data coding and data decoding. Generally, in arithmetic coding, an operation is performed in which an effective area is provided on a number line from 0 to less than 1 to divide the input symbol sequence into input symbol appearance probability ratios, and an effective area is assigned and updated for a new sequence. By using a binary decimal value in the effective area corresponding to the input symbol sequence as a code, it is possible to obtain high encoding efficiency as close as possible to entropy when the appearance frequency of the symbol is known or predictable.

【0003】例えば、「特開平4−277933、デー
タ圧縮および復元方式」を用いて説明する。上記公報で
は、符号化を圧縮、復号を復元、入力シンボル系列を入
力データまたは元データ、符号系列を圧縮データ、出力
シンボル系列を出力データまたは復元データと称してい
るが、同一のものである。従来例では、入力シンボル系
列を入力して得られる出現シンボルを出難いシンボル
(以下、劣勢シンボルLPS:Less Probable Symbolと
称する。LPSの出現確率pとする。)と出易いシンボ
ル(以下、優勢シンボルMPS:More Probable Symbol
と称する。MPSの出現確率1−pとする。)に区別し
ている。劣勢シンボルが出現したときの入力をFalse
(F)、優勢シンボルが出現したときの入力をTrue
(T)とする2値算術符号化について、符号を有効領域
の下界値の座標としている。また、劣勢シンボルの出現
確率pを2の負のべき乗(=2-SK ;SKはSKew numbe
r でここでは整数1,2,3,4をとるものとする。)
で近似し、有効領域内において劣勢シンボルに対する領
域は優勢シンボルに対する領域より下位に配置する。
[0003] For example, a description will be given using "JP-A-4-277933, data compression and decompression method". In the above publication, the encoding is compressed, the decoding is decompressed, the input symbol sequence is called input data or original data, the code sequence is called compressed data, and the output symbol sequence is called output data or decompressed data, but they are the same. In the conventional example, an appearance symbol obtained by inputting an input symbol sequence is a symbol that is difficult to appear (hereinafter referred to as a less probable symbol LPS: Less Probable Symbol; an appearance probability p of LPS) and a symbol that is likely to appear (hereinafter a superior symbol). MPS: More Probable Symbol
Called. The appearance probability of MPS is 1-p. ). False input when inferior symbol appears
(F), True input when dominant symbol appears
In the binary arithmetic coding of (T), the code is the lower limit value coordinate of the effective area. Also, the appearance probability p of inferior symbol 2 negative powers (= 2 -SK; SK is SKEW numbe
Here, it is assumed that r takes integers 1, 2, 3, and 4 here. )
In the effective area, the area for the inferior symbol is arranged lower than the area for the superior symbol.

【0004】算術符号化は、符号化済みの入力シンボル
系列sと符号化する入力(TまたはF)に対する有効領
域幅をA、符号をCとすると次に示す算術演算を最終入
力シンボルまで繰り返すことにより有効領域の下界値に
基づく符号が得られる。 初期状態 A(null)=1.0 C(null)=0.0 領域演算(乗算はシフト演算で実現可) 劣勢シンボル領域幅:A(s,F)=A(s)×2-SK 優勢シンボル領域幅:A(s,T)=A(s)−A(s,F) 符号化演算 劣勢シンボル符号化:C(s,F)=C(s) 優勢シンボル符号化:C(s,T)=C(s)+A(s,F)
[0004] Arithmetic coding is to repeat the following arithmetic operation up to the last input symbol, where A is the effective area width for the input symbol sequence s already coded and the input (T or F) to be coded, and C is the code. As a result, a code based on the lower bound of the effective area is obtained. Initial state A (null) = 1.0 C (null) = 0.0 Area operation (multiplication can be realized by shift operation) Inferior symbol area width: A (s, F) = A (s) × 2 -SK superior Symbol area width: A (s, T) = A (s) −A (s, F) Coding operation Less-than symbol encoding: C (s, F) = C (s) Dominant symbol encoding: C (s, T) = C (s) + A (s, F)

【0005】算術符号化のアルゴリズムのフローを図8
に示す。図において、Cは符号レジスタ、Bは送り出す
符号を格納する出力バッファレジスタ、Aは有効領域幅
レジスタ、MINは入力シンボルと予測値の一致(T)
・不一致(F)の判定結果、SKはSKew number (1,
2,3,4)である。SK値は、入力シンボルと予測値
を比較し、一致した回数に応じて更新される。shlは
1ビット左論理シフト、shlN はNビット左論理シフ
ト(Nは整数値または整数変数値)を示し、シフト処理
の結果として空いた下位ビットにはビット‘0’が入
る。なお、BレジスタとCレジスタ(5ビット)は同一
レジスタ上に配置され、Bレジスタの最下位ビットに続
いてCレジスタの最上位ビットがくる。また、符号出力
単位はバイトとする。
FIG. 8 shows the flow of the algorithm of arithmetic coding.
Shown in In the figure, C is a code register, B is an output buffer register for storing a code to be sent, A is an effective area width register, and MIN is a match between an input symbol and a predicted value (T).
SK is SKew number (1,
2, 3, 4). The SK value is compared with the input symbol and the predicted value, and is updated according to the number of times of matching. shl indicates a 1-bit left logical shift, shl N indicates an N-bit left logical shift (N is an integer value or an integer variable value), and the lower bits emptied as a result of the shift processing contain bit '0'. The B register and the C register (5 bits) are arranged on the same register, and the least significant bit of the B register is followed by the most significant bit of the C register. The code output unit is a byte.

【0006】図示の番号に従って説明する。処理S1
は、B,CおよびAレジスタ値の初期化であり、B,C
レジスタをクリアし、Aレジスタ値を1.0とする。処
理S2は、入力シンボルを取り込み、予測されるSK値
(初期値は1)をセットする。処理S3は、入力シンボ
ルと予測値の一致(T)・不一致(F)の判定し、その
結果であるMIN値により処理を切り替える。
The description will be made according to the numbers shown in the figure. Processing S1
Is the initialization of the B, C and A register values, and B, C
Clear the register and set the A register value to 1.0. The process S2 takes in the input symbol and sets a predicted SK value (initial value is 1). In the process S3, a match (T) / mismatch (F) between the input symbol and the predicted value is determined, and the process is switched according to the MIN value that is the result.

【0007】S4の処理は、処理S3において不一致
(F)と判定された場合であり、劣勢シンボルの符号化
処理を示す。処理S4は、B,CレジスタをSKビット
左論理シフトし、Cレジスタの最上位からあふれた符号
ビットはその上位に配置されたBレジスタの最下位ビッ
トへ移る。Aレジスタ値は2-SK をSKビット左論理シ
フトするので必ず1.0となる。このようにAレジスタ
値が1.0未満となったときシフト処理により1.0以
上に拡大する処理を正規化処理という。処理S4の正規
化処理終了後は処理S8に進む。
The process in S4 is a case where it is determined that the values do not match (F) in the process S3, and indicates a process of encoding the inferior symbol. In the process S4, the B and C registers are logically shifted left by SK bits, and the sign bit overflowing from the most significant bit of the C register is shifted to the least significant bit of the B register arranged at the higher level. A register value is always 1.0 Since SK-bit left logic shift 2 -SK. The process of expanding the A register value to 1.0 or more by the shift process when the value of the A register becomes less than 1.0 is called normalization process. After the end of the normalization process in step S4, the process proceeds to step S8.

【0008】S5〜S7の処理は、処理S3において一
致(T)と判定された場合であり、優勢シンボルの符号
化処理を示す。処理S5は、有効領域下界値であるB,
Cレジスタ、有効領域幅であるAレジスタの更新を行
い、優勢シンボルに対する有効領域は劣勢シンボルに対
する有効領域より上位に配置されることから、B,Cレ
ジスタには劣勢シンボルの有効領域幅である2-SK を加
え、Aレジスタからは2-SK を減じる。Cレジスタに2
-SK を加えたときに発生する桁上がりは、Bレジスタに
最下位ビットから上位へ伝播される。処理S6は、Aレ
ジスタ値を1.0と比較し、Aレジスタ値が1.0以上
であれば処理S8へ進み、1.0未満であれば処理S7
へ進む。処理S7は、B,CおよびAレジスタを1ビッ
ト左論理シフトする正規化処理を行った後、処理S8へ
進む。
[0008] The processing of S5 to S7 is a case where it is determined that they match (T) in the processing S3, and indicates the encoding processing of the dominant symbol. The process S5 is performed on the lower bound B of the effective area,
The C register and the A register, which is the effective area width, are updated, and the effective area for the superior symbol is located higher than the effective area for the inferior symbol. Therefore, the effective area width of the inferior symbol is 2 in the B and C registers. Add -SK and subtract 2 -SK from the A register. 2 in the C register
The carry generated when -SK is added is propagated to the B register from the least significant bit to the most significant bit. In step S6, the A register value is compared with 1.0. If the A register value is equal to or greater than 1.0, the process proceeds to step S8.
Proceed to. In the process S7, after performing a normalization process of shifting the B, C and A registers left by one bit, the process proceeds to a process S8.

【0009】処理S8は、すべての入力シンボル系列に
ついて符号化処理を行ったかどうかを判断し、データの
入力が終わっていなければ処理S2からの各処理を繰り
返し、終わっていれば処理S9へ進む。処理S9は、す
べての入力シンボル系列について符号化処理終了後Cレ
ジスタに残った符号をBレジスタに出力するためにCレ
ジスタ幅である5ビットの左論理シフト処理を行った
後、出力単位であるバイト境界までダミービット‘0’
を詰めて符号を出力し算術符号化を終了する。
In step S8, it is determined whether or not encoding processing has been performed for all input symbol sequences. If data input has not been completed, each processing from step S2 is repeated. If data input has been completed, processing proceeds to step S9. The process S9 is a unit of output after performing a left logical shift process of 5 bits, which is the width of the C register, to output the codes remaining in the C register to the B register after the encoding process is completed for all input symbol sequences. Dummy bit '0' up to byte boundary
, And outputs a code to end the arithmetic coding.

【0010】算術復号は、復号済みの出力シンボル系列
sと復号される出力シンボル(TまたはF)に対する有
効領域幅をA、符号をD(符号初期値は算術符号化にお
ける符号C)とすると次に示す算術演算を最終出力シン
ボルまで繰り返すことにより有効領域の下界値に基づく
復号を行うことができる。符号Dは次に示す算術演算に
より常に有効領域下界値から符号C(初期値)までの変
位に逐次更新される。 初期状態 A(null)=1.0 D(null)=C 領域演算(乗算はシフト演算で実現可) 劣勢シンボル領域幅:A(s,F)=A(s)×2-SK 優勢シンボル領域幅:A(s,T)=A(s)−A(s,F) 復号演算(出力X) D(s,X)<A(s,F)ならば、劣勢シンボル復号 X=F; D(s,F)=D(s) D(s,X)≧A(s,F)ならば、優勢シンボル復号 X=T; D(s,T)=D(s)−A(s,F)
In arithmetic decoding, the effective area width for the decoded output symbol sequence s and the decoded output symbol (T or F) is A, and the code is D (the code initial value is the code C in arithmetic coding). The decoding based on the lower bound of the effective area can be performed by repeating the arithmetic operation shown in (1) until the final output symbol. The code D is always updated sequentially from the lower bound of the effective area to the code C (initial value) by the following arithmetic operation. Initial state A (null) = 1.0 D (null) = C Area operation (multiplication can be realized by shift operation) Inferior symbol area width: A (s, F) = A (s) × 2 -SK superior symbol area Width: A (s, T) = A (s) -A (s, F) Decoding operation (output X) If D (s, X) <A (s, F), decoding of less-probable symbol X = F; D (S, F) = D (s) If D (s, X) ≧ A (s, F), dominant symbol decoding X = T; D (s, T) = D (s) −A (s, F) )

【0011】算術復号のアルゴリズムのフローを図9に
示す。図において、Dは復号レジスタ、Bは受け取った
符号を格納する入力バッファレジスタ、Aは有効領域幅
レジスタ、MOUTは出力シンボルと予測値の一致
(T)・不一致(F)の判定結果、SKはSKew number
(1,2,3,4)である。SK値は、一致(T)とし
て復号された回数に応じて更新される。shlは1ビッ
ト左論理シフト、shlNはNビット左論理シフト(N
は整数値または整数変数値)を示し、シフト処理の結果
として空いたDレジスタの下位ビットにはBレジスタか
ら次なる符号ビットが供給される。なお、Bレジスタと
Dレジスタ(5ビット)は同一レジスタ上に配置され、
Dレジスタの最下位ビットに続いてBレジスタの最上位
ビットがくる。また、符号入力単位はバイトとする。
FIG. 9 shows the flow of the algorithm of arithmetic decoding. In the figure, D is a decoding register, B is an input buffer register for storing a received code, A is an effective area width register, MOUT is a determination result (T) / mismatch (F) between an output symbol and a predicted value, and SK is a determination result. SKew number
(1, 2, 3, 4). The SK value is updated according to the number of times of decoding as a match (T). shl is a 1-bit left logical shift, shl N is an N-bit left logical shift (N
Indicates an integer value or an integer variable value), and the next sign bit is supplied from the B register to the lower bits of the D register vacated as a result of the shift processing. The B register and D register (5 bits) are arranged on the same register.
Following the least significant bit of the D register, the most significant bit of the B register comes. The code input unit is a byte.

【0012】図示の番号に従って説明する。処理S1
は、D,BおよびAレジスタ値の初期化であり、Dレジ
スタはBレジスタからDレジスタを符号ビットで満たす
ために5ビット左論理シフトし、Aレジスタ値を1.0
とする。処理S2は、予測されるSK値(初期値は1)
をセットする。処理S3は、復号されるMOUT値は出
力シンボルと予測値の一致(T)・不一致(F)の判定
結果であるが、有効領域下界値からの変位である符号D
が優勢シンボルと劣勢シンボルのどちらに対する領域内
に位置するかにより処理を切り替える。符号Dが、劣勢
シンボルに対する領域幅である2-SK 未満であれば劣勢
シンボルに対する領域内に位置し、2-SK以上であれば
優勢シンボルに対する領域内に位置すると判定される。
The description will be made according to the numbers shown. Processing S1
Is the initialization of the D, B and A register values. The D register is logically shifted left by 5 bits from the B register to fill the D register with the sign bit, and the A register value is shifted by 1.0.
And Process S2 is a process in which the predicted SK value (initial value is 1)
Is set. In the process S3, the decoded MOUT value is the result of the determination of the match (T) or mismatch (F) between the output symbol and the predicted value, but the code D which is the displacement from the lower bound of the effective area.
Is switched depending on whether the symbol is located in the region for the superior symbol or the inferior symbol. Symbol D is located in the area for the inferior symbol if less than 2 -SK region width against inferior symbol is determined to be located within the region for MPS if 2 -SK more.

【0013】S4、S5の処理は、処理S3において符
号Dが劣勢シンボルに対する領域内に位置すると判定さ
れた場合であり、劣勢シンボルの復号処理を示す。処理
S4は、MOUT値に不一致(F)であることをセット
する。処理S5は、D,BレジスタをSKビット左論理
シフトし、Bレジスタの最上位からあふれた符号ビット
はその上位に配置されたDレジスタの最下位ビットへ移
ることにより符号ビットが取り込まれる。Aレジスタ値
は2-SK をSKビット左論理シフトするので必ず1.0
となる。処理S5の正規化処理終了後は処理S10に進
む。
The processing of S4 and S5 is the case where it is determined in the processing S3 that the code D is located within the area for the inferior symbol, and indicates the decoding processing of the inferior symbol. The process S4 sets that the MOUT value does not match (F). In the process S5, the D and B registers are logically shifted left by SK bits, and the sign bit overflowing from the most significant bit of the B register is shifted to the least significant bit of the D register arranged at a higher position, thereby taking in the sign bit. Always because the A register value is SK-bit left logic shift 2 -SK 1.0
Becomes After the normalization process in step S5 is completed, the process proceeds to step S10.

【0014】S6〜S9の処理は、処理S3において符
号Dが優勢シンボルに対する領域内に位置すると判定さ
れた場合であり、優勢シンボルの復号処理を示す。処理
S6は、MOUT値に一致(T)であることをセットす
る。処理S7は、D,Bレジスタ、有効領域幅であるA
レジスタの更新を行い、優勢シンボルに対する有効領域
は劣勢シンボルに対する有効領域より上位に配置される
ことから、B,CおよびAレジスタから劣勢シンボルの
有効領域幅である2-SK を減じる。処理S8は、Aレジ
スタ値を1.0と比較し、Aレジスタ値が1.0以上で
あれば処理S10へ進み、1.0未満であれば処理S9
へ進む。処理S9は、D,BおよびAレジスタを1ビッ
ト左論理シフトする正規化処理を行った後、処理S10
へ進む。
The processing of S6 to S9 is a case where it is determined in the processing S3 that the code D is located within the area for the dominant symbol, and indicates the decoding processing of the dominant symbol. The process S6 sets that the value matches (T) the MOUT value. The process S7 is performed in the D and B registers and the effective area width A
Since the register is updated and the effective area for the superior symbol is arranged higher than the effective area for the inferior symbol, the effective area width of the inferior symbol, 2- SK, is subtracted from the B, C, and A registers. The process S8 compares the A register value with 1.0. If the A register value is 1.0 or more, the process proceeds to the process S10, and if the A register value is less than 1.0, the process S9
Proceed to. A process S9 performs a normalization process of logically shifting the D, B, and A registers left by one bit, and then performs a process S10
Proceed to.

【0015】処理S10は、すべての出力シンボル系列
について復号処理が行われたかどうかを判断し、出力シ
ンボルの復号が終わっていなければ処理S2からの各処
理を繰り返し、終わっていれば算術復号を終了する。
In step S10, it is determined whether or not decoding processing has been performed on all output symbol sequences. If decoding of output symbols has not been completed, each processing from step S2 is repeated. If decoding has been completed, arithmetic decoding is terminated. I do.

【0016】図10で示されるように、入力シンボル系
列1(入力データ)に対する符号系列2は算術符号3と
その終端に付加された終端符号4からなる。従来例によ
る算術符号化方式では、算術符号化の伝送制御を目的と
した制御信号を利用し、出力される符号系列2中に出現
し得ないビットパターンを終端符号4として確保して符
号系列2の終端に付加し、従来例の算術復号方式では終
端符号4を検出することにより符号系列2の終端を検出
し復号を終了させることを可能とする。この従来例で適
用される算術符号化において、符号化側で符号系列2に
バイトX‘FF’(16進表記。以下、16進数をX
‘??’と表現する。)が出現すると、必ずその直後の
バイトにX‘00’を制御信号として挿入する伝送制御
を行うものとすると、復号側ではバイトX‘FF’の直
後のバイトX‘00’は制御信号として判断され、削除
するだけでよい。このような伝送制御を符号系列2に対
して行うことにより、バイトX‘FF’(以下、終端符
号4の第1バイトを終了符号5という。)とX‘00’
以外のバイト(以下、終端符号4の第2バイトを制御符
号6という。)で表される2バイトで構成される終端符
号4を確保し、符号化側で符号系列2の終端に終端符号
4を付加すれば、復号側に符号系列2の終端を終端符号
4により検出させることが可能となる。従来例では、終
端符号4の第2バイトである制御符号6をバイトX‘0
0’と区別するため最上位ビットを必ずビット値‘1’
とし、下位7ビットには符号化対象として入力される入
力シンボル系列長7を付加する。7ビットで表現可能な
値は128通りしかないので、符号化側は制御符号6に
入力シンボル系列長のバイト数を128で割った余り値
で示し、終端符号4として付加する。また、復号側は終
端符号4を検出して第2バイトの制御符号6から出力シ
ンボル系列長を知り、検出された出力シンボル系列長ま
で復号した時点で算術復号処理を終了させる。
As shown in FIG. 10, a code sequence 2 for an input symbol sequence 1 (input data) is composed of an arithmetic code 3 and a terminal code 4 added to the end thereof. In the conventional arithmetic coding method, a control signal for the purpose of arithmetic coding transmission control is used, and a bit pattern that cannot appear in the output code sequence 2 is secured as a terminal code 4 to secure the code sequence 2. In the conventional arithmetic decoding method, the terminal code 4 is detected to detect the end of the code sequence 2 and terminate the decoding. In the arithmetic coding applied in this conventional example, a byte X'FF '(hexadecimal notation.
'? ? '. ) Appears, it is assumed that transmission control is performed to insert X'00 'as a control signal in the byte immediately after it, and the decoding side determines byte X'00' immediately after byte X'FF 'as a control signal. It just needs to be deleted. By performing such transmission control on the code sequence 2, the bytes X'FF '(hereinafter, the first byte of the end code 4 is referred to as an end code 5) and X'00'.
(Hereinafter, the second byte of the terminating code 4 is referred to as a control code 6), and a terminating code 4 consisting of 2 bytes is secured. Is added, it becomes possible for the decoding side to detect the end of the code sequence 2 by the end code 4. In the conventional example, the control code 6 which is the second byte of the terminal code 4 is replaced with the byte X'0
The most significant bit must always have the bit value '1' to distinguish it from '0'.
In addition, an input symbol sequence length 7 input as an encoding target is added to the lower 7 bits. Since there are only 128 possible values that can be represented by 7 bits, the encoding side indicates the control code 6 as a remainder obtained by dividing the number of bytes of the input symbol sequence length by 128, and adds it as a termination code 4. Further, the decoding side detects the terminal code 4 and knows the output symbol sequence length from the control code 6 of the second byte, and terminates the arithmetic decoding process when decoding is performed up to the detected output symbol sequence length.

【0017】従来例による符号化装置構成は図11のよ
うに示される。図において、40はモデリング変換器、
41は制御信号を挿入する制御を行いながら算術符号化
する算術符号器、42は入力シンボル系列の終了検出
器、43はマルチプレクサ(MPX)で、算術符号器4
1の出力とカウンタ44(後述)の出力と終了符号発生
器45(後述)の出力のいずれかを選択するものであ
り、44は入力シンボル系列長をカウントするカウン
タ、45は終了符号X‘FF’を発生する終了符号発生
器、46は文字データ等の入力シンボル系列、47は終
端符号を含んだ符号系列である。
FIG. 11 shows the configuration of a conventional encoding apparatus. In the figure, 40 is a modeling converter,
Reference numeral 41 denotes an arithmetic encoder for performing arithmetic coding while performing control for inserting a control signal, 42 denotes an end detector of an input symbol sequence, and 43 denotes a multiplexer (MPX).
1 to select one of the output of the counter 44 (described later) and the output of the end code generator 45 (described later), 44 is a counter for counting the input symbol sequence length, and 45 is an end code X'FF. 'Is an end code generator, 46 is an input symbol sequence such as character data, and 47 is a code sequence including a termination code.

【0018】図の構成の動作を説明する。入力シンボル
系列46はモデリング変換器40に入力され、モデリン
グ変換器40からのT/Fの判定出力に基づいて算術符
号器41は制御信号を挿入する制御を行いながら符号系
列47を出力する。終了検出器42は予め定められた一
定のバイト数の入力シンボル系列の符号化処理が終了し
たことを検出すると、算術符号器41およびマルチプレ
クサ43に終了検出信号を与える。カウンタ44は入力
シンボル系列のバイト数をカウントし、マルチプレクサ
43は終了検出器42の終了検出に基づいてまず終了符
号発生器45に終了符号X‘FF’(終端符号4の第1
バイト)を出力させ、算術符号器41の出力に続いて終
了符号5を出力するとともに、次にカウンタ値下位7ビ
ットと最上位ビット値‘1’からなる制御符号6(終端
符号4の第2バイト)を出力する。
The operation of the configuration shown in FIG. The input symbol sequence 46 is input to the modeling converter 40, and based on the T / F determination output from the modeling converter 40, the arithmetic encoder 41 outputs a code sequence 47 while performing control to insert a control signal. When detecting that the encoding process of the input symbol sequence of a predetermined fixed number of bytes has been completed, the end detector 42 supplies an end detection signal to the arithmetic encoder 41 and the multiplexer 43. The counter 44 counts the number of bytes of the input symbol sequence, and the multiplexer 43 first sends the end code X'FF '(the first code of the end code 4) to the end code generator 45 based on the end detection of the end detector 42.
Byte), outputs the end code 5 following the output of the arithmetic encoder 41, and then outputs the control code 6 (the second code of the terminal code 4) consisting of the lower 7 bits of the counter value and the most significant bit value '1'. Byte).

【0019】従来例による復号装置構成は図12のよう
に示される。図において、50は入力される符号系列5
6(後述)から制御信号を削除する制御を行いながら算
術復号する算術復号器、51はモデリング逆変換器で、
算術復号器50の出力に基づいて出力シンボル系列に変
換するものであり、52は終端検出器で、符号系列にお
ける終端符号4を検出するものであり、53はレジスタ
で、終端符号4の第2バイトである制御符号6に含まれ
る出力シンボル系列長(7ビット)を格納するもの、5
4は出力シンボル系列長をカウントするカウンタ、55
はレジスタ53に格納された値とカウンタ54のカウン
タ値を比較する比較器で構成される終了検出器、56は
入力される符号系列(終端符号4を含む)、57は出力
シンボル系列である。
FIG. 12 shows the configuration of a conventional decoding apparatus. In the figure, reference numeral 50 denotes an input code sequence 5
6 (described later), an arithmetic decoder for performing arithmetic decoding while performing control to delete a control signal, 51 is a modeling inverse converter,
An output symbol sequence is converted based on the output of the arithmetic decoder 50. An end detector 52 detects the end code 4 in the code sequence. A register 53 is a second register of the end code 4. Stores the output symbol sequence length (7 bits) included in the control code 6 which is a byte, 5
4 is a counter for counting the output symbol sequence length, 55
Is an end detector composed of a comparator for comparing the value stored in the register 53 with the counter value of the counter 54, 56 is an input code sequence (including the terminal code 4), and 57 is an output symbol sequence.

【0020】図の構成の動作を説明する。符号系列56
は算術復号器50に制御信号を削除されながら入力さ
れ、T/Fのいずれかに復号される。復号出力はモデリ
ング逆変換器51に入力され、出力シンボル系列57を
得る。カウンタ54は出力シンボル系列長をカウントす
る。終端検出器52は終端符号4を検出する。レジスタ
53は終端検出器52で検出された制御符号6(終端符
号4の第2バイト)の下位7ビットを格納する。終了検
出器55はレジスタ53に格納された値とカウンタ54
のカウント値を比較し、一致すると算術復号器50およ
びモデリング逆変換器51に復号終了を通知する。
The operation of the configuration shown in FIG. Code sequence 56
Is input to the arithmetic decoder 50 while the control signal is deleted, and is decoded into one of T / F. The decoded output is input to the modeling inverse transformer 51, and an output symbol sequence 57 is obtained. The counter 54 counts the output symbol sequence length. The termination detector 52 detects the termination code 4. The register 53 stores the lower 7 bits of the control code 6 (the second byte of the end code 4) detected by the end detector 52. The end detector 55 stores the value stored in the register 53 and the counter 54.
Are compared, and when they match, the arithmetic decoder 50 and the modeling inverse converter 51 are notified of the end of decoding.

【0021】上記従来例では、符号系列中にバイトX
‘FF’が出現するとその直後に制御信号としてバイト
X‘00’を挿入する伝送制御を行うことにより終端符
号4を確保し、符号系列終端に付加する算術符号化およ
び付加された終端符号4を検出して算術復号を終了する
算術復号について説明した。
In the above conventional example, the byte X is included in the code sequence.
Immediately after the appearance of 'FF', transmission control is performed by inserting byte X'00 'as a control signal to secure the terminal code 4, and arithmetic coding added to the end of the code sequence and added terminal code 4 are performed. The arithmetic decoding for detecting and terminating the arithmetic decoding has been described.

【0022】以上のように、出力シンボル系列の復号処
理の終了を判断するには、符号化側が復号側に出力シン
ボル系列長を通知する必要がある。例えば、出力シンボ
ル系列長が、固定サイズで扱われるときには符号化側が
復号側に通知する必要はないが、任意サイズで扱われる
ときには符号化側が復号側にヘッダあるいはフッタ(こ
こでは終端符号4)により通知する必要がある。出力シ
ンボル系列長が任意サイズの場合、符号化側のデータ蓄
積手段の制約などにより入力シンボル系列長を予め知る
ことができないときにはヘッダ通知は適用できないの
で、フッタ通知、つまり終端符号4による通知が用いら
れることになる。このように、従来例では、符号化側で
入力シンボル系列長を予め知ることができないとき復号
側に符号系列の終端を示すために付加する終端符号4に
出力シンボル系列長を含めて通知することにより算術復
号処理の終了を判断する。
As described above, in order to determine the end of the output symbol sequence decoding process, the encoding side needs to notify the decoding side of the output symbol sequence length. For example, when the output symbol sequence length is handled at a fixed size, the encoding side does not need to notify the decoding side. Need to be notified. When the output symbol sequence length is of an arbitrary size, header notification cannot be applied when the input symbol sequence length cannot be known in advance due to restrictions on the data storage means on the encoding side, and so footer notification, that is, notification using the termination code 4 is used. Will be done. As described above, in the conventional example, when the input symbol sequence length cannot be known in advance on the encoding side, it is necessary to notify the decoding side including the output symbol sequence length in the termination code 4 added to indicate the end of the code sequence. To determine the end of the arithmetic decoding process.

【0023】[0023]

【発明が解決しようとする課題】上記のような従来の
「データ圧縮および復元方式」では、従来例によれば、
伝送制御により確保される符号系列中に出現しないビッ
トパターンを終端符号として付加し、その終端符号中に
符号化(圧縮)した入力シンボル系列長を7ビットで示
すことにより出力シンボル系列長を判断し復号(復元)
を終了させるが、入力シンボル系列長のバイト数単位を
128で割った余りとして通知される7ビットの情報が
検出されてから復号できる最大シンボル(データ)数は
1024ビット(=128×8ビット=210ビット)し
かないので、符号レジスタ長および復号レジスタ長が1
0ビットより大きいときには復号レジスタ内に未復号の
符号を残したまま入力シンボル系列長より出力シンボル
系列を短く復号し、終了してしまう場合があるという問
題があった。また、複数のブロックで構成される入力シ
ンボル系列を符号化する場合は、各ブロック毎に付加さ
れる終端符号4の制御符号5に最終ブロックか否かを通
知するビットを設ける必要がある。終端符号4として認
識するために固定値としなければならない終了符号5
(バイトX‘FF’)と制御符号6の最上位ビット
‘1’と最終ブロックか否かを通知するビットの計2ビ
ットを除くすべてのビットを入力シンボル系列長の通知
のために使用すると入力シンボル系列長の通知には6ビ
ットしか使用できなくなってしまい、復号の終了を誤る
可能性がより高くなるという問題がある。
According to the conventional "data compression and decompression method" as described above, according to the conventional example,
A bit pattern that does not appear in the code sequence secured by the transmission control is added as a termination code, and the output symbol sequence length is determined by indicating the encoded (compressed) input symbol sequence length in the termination code with 7 bits. Decryption (restoration)
Is terminated, but the maximum number of symbols (data) that can be decoded after the detection of 7-bit information notified as the remainder of the number of bytes of the input symbol sequence length divided by 128 is 1024 bits (= 128 × 8 bits = 2 10 bits), the code register length and decode register length are 1
When it is larger than 0 bits, there is a problem that the output symbol sequence may be decoded shorter than the input symbol sequence length while leaving the undecoded code in the decoding register, and the decoding may be terminated. When encoding an input symbol sequence composed of a plurality of blocks, it is necessary to provide a bit for notifying whether or not the block is the last block in the control code 5 of the end code 4 added to each block. End code 5 which must be a fixed value to be recognized as end code 4
(Byte X'FF '), the most significant bit' 1 'of the control code 6 and a bit for notifying whether or not the block is the last block. Only 6 bits can be used for the notification of the symbol sequence length, and there is a problem that the possibility of erroneously terminating decoding is increased.

【0024】この発明は上記のような問題点を解決する
ためになされたもので、出力シンボル系列長を誤ること
なく復号処理を終了することができる符号化方式および
復号方式および符号化/復号方式を提供することを目的
とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has an encoding method and a decoding method capable of terminating decoding without erroneous output symbol sequence length.
It is an object to provide a decoding scheme and an encoding / decoding scheme .

【0025】[0025]

【課題を解決するための手段】第1の発明に係る符号化
方式は、データユニットを構成単位とするブロックから
なる入力シンボル系列を入力して算術符号化された符号
系列を出力するために、以下の要素を有するものであ
る。 (a)入力シンボル系列を入力し、算術符号化手法によ
る符号化を行って、符号系列を出力する算術符号化手
段、 (b)入力シンボル系列からブロックの構成単位である
データユニットを検出するユニット検出手段、 (c)上記符号化側ユニット検出手段により検出された
データユニットが上記ブロックの最終データユニットで
あるか否かを判定する符号化終了判定手段、 (d)上記算術符号化手段の出力する符号系列中に出現
し得ない特定のビットパターンを上記符号化終了判定手
段において判定されたブロックに対する符号系列の終端
に終端符号として付加する終端符号付加手段。
Means for Solving the Problems] engagement Ru marks Goka scheme to a first aspect of the present invention, for outputting the arithmetic encoded code sequence by entering the input symbol sequence of blocks of a constitutional unit of data units Has the following elements. (A) receives the input symbol sequence, performs coding by the arithmetic coding technique, the arithmetic coding means for outputting code sequences, you detect data unit is a structural unit of a block from the (b) the input symbol sequence units detection means, (c) the coding side unit detected detected data unit by means coding end determining unit determines whether the last data unit of the block, (d) the arithmetic coding unit And a terminating code adding means for adding a specific bit pattern that cannot appear in the code sequence output by the terminal as a terminating code to the end of the code sequence for the block determined by the coding end determining means.

【0026】第2の発明に係る符号化方式は、算術符号
化手段により出力された符号系列に所定のピットパター
ンが出現したときには所定の長さの制御信号を該ビット
パターン直後に挿入する制御信号挿入手段を有すること
を特徴とする。
The engagement Ru marks Goka scheme to a second aspect of the present invention is inserted immediately after the bit pattern control signals of a predetermined length when a predetermined pit pattern appeared on the output code sequence by arithmetic coding means It is characterized by having control signal insertion means.

【0027】第3の発明に係る復号方式は、データユニ
ットを構成単位とするブロックからなる符号系列を入力
して算術復号された出力シンボル系列を出力するため
に、以下の要素を有するものである。 (a)符号系列を入力として、算術復号手法による復号
を行って、出力シンボル系列を出力する算術復号手段、 (b)出力シンボル系列のブロックの構成単位であるデ
ータユニットを検出するユニット検出手段、 (c)符号系列中に出現し得ない特定のビットパターン
を終端符号として検出する終端符号検出手段、 (d)上記終端符号検出手段による終端符号の検出結果
に基づいて、上記ユニット検出手段により検出されたデ
ータユニットが上記ブロックの最終データユニットであ
るか否かを判定する復号終了判定手段。
A third decrypt scheme engaged Ru to the invention, in order to output an output symbol sequence by entering a code sequence of blocks of a constitutional unit data unit is arithmetic decoding, those having the following elements It is. (A) as an input code sequence, performs decoding by the arithmetic decoding method, the arithmetic decoding means for outputting an output symbol sequence, (b) detection to Ruyu knit detect data unit is a structural unit of a block of output symbol sequence means, based on (c) termination code detecting means for detecting a specific bit pattern that can not appear in the code sequence as a termination code, (d) a detection result of the termination code according to the termination code detecting means, the upper Kiyu knit Decoding end determination means for determining whether the data unit detected by the detection means is the last data unit of the block.

【0028】第4の発明に係る復号方式は、算術復号手
段において入力される符号系列に所定のビットパターン
が出現したときには該ビットパターン直後に所定の長さ
の制御信号が挿入されているものとし、挿入された所定
の長さの制御信号を削除する制御信号処理手段を有する
ことを特徴とする。
The decrypt method engaged Ru to the fourth invention, the control signal of a predetermined length just after the bit pattern is inserted when the predetermined bit pattern appeared to code sequence input in the arithmetic decoding means And a control signal processing means for deleting the inserted control signal having a predetermined length.

【0029】第5の発明に係る復号方式は、上記終端符
号検出手段において終端符号が検出され、上記ユニット
検出手段により、上記算術復号手段により続けて復号さ
れる出力シンボルが次のデータユニットを満たせないこ
とが検出される場合、復号終了判定手段が、出力シンボ
ルで満たされた最後のデータユニットをブロックの最終
データユニットとし、データユニットを満たせない出力
シンボルを破棄することを特徴とする。
The fifth decrypt scheme engaged Ru to the present invention, in the above termination code detecting means detects termination code, by the upper Kiyu knit detecting means, an output symbol to be decoded continuously by the arithmetic decoding means of the following When it is detected that the data unit cannot be satisfied, the decoding end determination means sets the last data unit filled with the output symbol as the last data unit of the block, and discards the output symbol that cannot satisfy the data unit. I do.

【0030】第6の発明に係る復号方式は、上記終端符
号検出手段が終端符号を検出し、上記算術復号手段が符
号系列を復号レジスタに入力して、復号レジスタの値が
所定の値になることを検出することにより、上記復号終
了判定手段が復号の終了を判定することを特徴とする。
[0030] The decoding method according to the sixth invention is characterized in that the terminal code
Signal detecting means detects the terminal code, and the arithmetic decoding means
Input to the decoding register, and the value of the decoding register is
By detecting that a predetermined value is reached, the decoding end is detected.
Termination determination means determines the end of decoding.

【0031】第7の発明に係る符号化/復号方式は、以
下の要素を有することを特徴とする。 (a)入力シンボル系列を入力し、算術符号化手法によ
る符号化を行って、符号系列を出力する算術符号化手
段、 (b)上記算術符号化手段において出力対象の符号系列
に所定のビットパターンが出現したときには所定の長さ
の制御信号を該ビットパターン直後に挿入する制御信号
挿入手段、 (c)入力シンボル系列の構成単位であるデータユニッ
トを検出する符号化側ユニット検出手段、 (d)データユニット長の整数倍の長さで表されるブロ
ックに対して、上記符号化側ユニット検出手段により検
出されたデータユニットが最終データユニットであると
きブロックとして判断し、算術符号化を終了するか否か
を判定する符号化終了判定手段、 (e)上記算術符号化手段の出力する符号系列に対し
て、上記制御信号挿入手段をとることにより、特定のビ
ットパターンを上記符号化終了検出手段において検出さ
れたブロックの符号系列終端に最終ブロックか否かを示
す情報を含めた終端符号として付加する終端符号付加手
段、 (f)符号系列を入力として、算術復号手法による復号
を行って、出力シンボル系列を出力する算術復号手段、 (g)上記算術復号手段において入力される符号系列に
所定のビットパターンが出現したときには該ビットパタ
ーン直後に挿入された所定の長さの制御信号として処理
した後に削除する制御信号処理手段、 (h)出力シンボル系列の構成単位であるデータユニッ
トを検出する復号側ユニット検出手段、 (i)上記制御信号処理手段において処理される制御信
号が符号系列に挿入されていることにより、符号系列中
に出現し得ない特定のビットパターンを終端符号として
検出する終端符号検出手段、 (j)データユニット長の整数倍の長さで表されるブロ
ックに対して、上記終端符号検出手段において終端符号
が検出され、上記算術復号手段において算術復号演算に
より更新された符号(レジスタ値)および上記復号側ユ
ニット検出手段において検出されるデータユニットか
ら、続けて復号される出力シンボルが次のデ ータユニッ
トを満たせないときには最後に満たされたデータユニッ
トを最終データユニットとするブロックとして判断し、
データユニットを満たせない出力シンボルを破棄し、上
記終端符号検出手段において検出された終端符号から該
ブロックが最終ブロックか否かの情報を得て、算術復号
を終了するか否かを判定する復号終了判定手段。
The encoding / decoding method according to the seventh invention is as follows.
It has the following elements. (A) An input symbol sequence is input, and the
Arithmetic coding that outputs a code sequence
Stage, (b) code sequence to be output in the arithmetic coding means
A predetermined length when a predetermined bit pattern appears in
Control signal for inserting the control signal of
Insertion means, data unit is a structural unit (c), the input symbol sequence
Encoding side unit detecting means for detecting the bets, blow represented by (d) Data unit length an integral multiple of the length of the
The encoding unit by the encoding unit detection means.
If the issued data unit is the last data unit
Whether to terminate arithmetic coding
Coding end determination means for determining, with respect to the code sequence output from the (e) the arithmetic coding unit
By using the control signal insertion means,
Bit pattern is detected by the encoding end detecting means.
Indicates whether the last block is at the end of the code sequence of the
Terminal code addition method to add as a terminal code including
Stage, as input (f) code sequence, decoding by the arithmetic decoding method
And (g) an arithmetic decoding unit that outputs an output symbol sequence.
When a predetermined bit pattern appears, the bit pattern
As a control signal of a predetermined length inserted immediately after
Control signal processing means for deleting after a data unit is a structural unit of (h) output symbol sequence
Decoding side unit detecting means for detecting the door, control signals to be processed in (i) the control signal processing means
Signal is inserted into the code sequence,
A specific bit pattern that cannot appear in
End code detecting means for detecting, Bro represented by (j) Data Unit, an integral multiple of the length of the
The terminal code in the terminal code detection means.
Is detected, and the arithmetic decoding means
The updated code (register value) and the decoding side
Is the data unit detected by the unit detection means?
Et al., Output symbols to be decoded continuously following de Tayuni'
If the data unit cannot be filled, the last
Is determined as a block with the last data unit,
Discard output symbols that cannot fill the data unit, and
From the terminal code detected by the terminal code detection means.
Obtain information on whether the block is the last block and perform arithmetic decoding
Decoding end determining means for determining whether or not to end the decoding.

【0032】第8の発明に係る符号化/復号方式は、算
術符号化手段および算術復号手段の扱う符号系列(算術
符号)が、優勢シンボルおよび劣勢シンボルのいずれか
を与える入力シンボル系列(符号化シンボル)または出
力シンボル系列(復号シンボル)に対して、分割された
有効領域において劣勢シンボルに対応させる領域を下方
配置し、選択された最終領域の下界値(復号レジスタ
値)を符号系列とし、 符号化方式における終端符号付加
手段は、符号系列とその終端に付加する終端符号の間に
終端符号検出手段の終端符号検出に影響しない数のダミ
ービット‘0’を挿入することを特徴とする。
The encoding / decoding method according to the eighth aspect of the present invention
Code series (arithmetic
Sign) is either the superior symbol or the inferior symbol
Input symbol sequence (coding symbol) or output
For the power symbol sequence (decoded symbol),
Lower the area corresponding to the inferior symbol in the effective area
Place and select the lower bound of the final area (decoding register
Value) as a code sequence, and adding a termination code in the coding method
The means is between the code sequence and the terminal code added to the end.
Damage of a number that does not affect the end code detection of the end code detection means
A bit '0' is inserted.

【0033】第9の発明に係る符号化/復号方式は、算
術符号化手段および算術復号手段の扱う符号系列(算術
符号)が、優勢シンボルおよび劣勢シンボルのいずれか
を与える入力シンボル系列(符号化シンボル)または出
力シンボル系列(復号シンボル)に対して、分割された
有効領域において劣勢シンボルに対応させる領域を上方
配置し、選択された最終領域の下界値(復号レジスタ
値)と同精度で上界値に最も近い値を符号系列とし、
号化方式における終端符号付加手段は、符号系列とその
終端に付加する終端符号の間に終端符号検出手段の終端
符号検出に影響しない数のダミービット‘1’を挿入す
ることを特徴とする。
[0033] The encoding / decoding method according to the ninth invention is characterized in that
Code series (arithmetic
Sign) is either the superior symbol or the inferior symbol
Input symbol sequence (coding symbol) or output
For the power symbol sequence (decoded symbol),
Up the area corresponding to the inferior symbol in the effective area
Place and select the lower bound of the final area (decoding register
The closest value to the upper limit value and the code sequence values) and at the same accuracy, marks
The terminating code adding means in the encoding method includes a code sequence and its
Termination of termination code detection means between termination codes added to termination
Insert a number of dummy bits '1' that do not affect code detection
It is characterized by that.

【0034】第10の発明に係る符号化/復号方式は、
上記符号化/復号方式において、 符号化方式における制
御信号挿入手段が、算術符号化手段が出力する符号系列
に発生した桁上がりは伝播させ、すべてビット‘1’で
占められている符号系列の出力単位(バイトなど)が出
力されるごとに直後の出力単位の最上位ビットか ら所定
の長さのビット‘0’で構成される制御信号を挿入する
伝送制御を行い、 復号方式における制御信号処理手段
が、算術復号手段に入力される符号系列の入力単位(バ
イトなど)がすべてビット‘1’で占められているとき
にその直後の入力単位の最上位ビットから所定の長さの
ビット‘0’を挿入された制御信号と判断して削除する
伝送制御を行うことを特徴とする。
The encoding / decoding system according to the tenth invention is
In the above encoding / decoding method, the control in the encoding method is used.
The control signal insertion unit outputs a code sequence output from the arithmetic coding unit.
Is propagated, and all bits '1'
The output unit (such as bytes) of the occupied code sequence is output.
The most significant bit or al a predetermined output unit immediately after each time it is force
Control signal consisting of bits '0' of length
Control signal processing means for performing transmission control and decoding method
Is the input unit (code) of the code sequence input to the arithmetic decoding means.
Are all occupied by bit '1'
From the most significant bit of the input unit immediately after
Judge bit '0' as inserted control signal and delete
Transmission control is performed.

【0035】第11の発明に係る符号化/復号方式は、
上記符号化/復号方式において、 符号化方式における終
端符号付加手段が、符号化終了判定手段により判定され
たブロックが最終ブロックか否かを示す情報を含めた終
端符号をブロックに対する符号系列の終端に付加し、
号方式における復号終了判定手段が、終端符号検出手段
により検出された終端符号からブロックが最終ブロック
か否かを示す情報を得て、復号の終了判定を行うことを
特徴とする。
The encoding / decoding method according to the eleventh invention is:
In the above encoding / decoding method, the end of the encoding method is used.
The end code adding unit is determined by the encoding end determining unit.
The final block including information indicating whether the block
The end code is added to the end of the code sequence for the block condensate
Decoding end determination means in the signal system,
Block is the last block from the terminal code detected by
To obtain the information indicating whether
Features.

【0036】第12の発明に係る符号化/復号方式は、
上記符号化/復号方式において、 符号化方式における終
端符号付加手段が、符号系列とその終端に付加する終了
符号および制御符号で構成される終端符号の間に終端符
号検出手段の終端符号検出に影響しない数のダミービッ
トを挿入し、ダミービットを挿入した符号系列の最終部
分が終了符号と一致するときには符号系列の最終部分を
終了符号と兼用することにより省略し、制御符号に終了
符号と同じビットパターンの省略を示す情報を含んだ終
端符号を符号系列の終端に付加し、 復号方式における終
端符号検出手段が、符号系列終端に終端符号を検出し、
終了符号のビット数だけの符号系列を算術復号手段が取
り込むまで復号終了判定手段への終端符号検出の通知を
遅らせることを特徴とする。
The encoding / decoding method according to the twelfth invention is:
In the above encoding / decoding method, the end of the encoding method is used.
End code adding means adds to the code sequence and its end
Terminator between terminator consisting of code and control code
Number of dummy bits that do not affect the detection of
And the last part of the code sequence with dummy bits inserted
When the minute matches the end code, the last part of the code sequence is
Omitted by also using the end code, ending with the control code
An end containing information indicating the omission of the same bit pattern as the sign.
The end code is added to the end of the code sequence, end the decoding scheme
End code detection means detects a terminal code at the end of the code sequence,
The arithmetic decoding means takes a code sequence of the number of bits of the end code.
Until the end code is detected.
It is characterized by being delayed.

【0037】第13の発明に係る符号化/復号方式は、
データの構成単位であるデータユニットの長さを符号化
側と復号側で共有するとともに、 符号化側に、入力デー
タを任意のデータユニットの境界で1つ以上のブロック
に分割して符号化する手段と、そのブロックに対する算
術符号の終端にブロック の終端を識別できる終端符号を
付加する手段とを備え、 復号側に、算術符号を出力デー
タに復号する手段と、終端符号からブロックの終端を検
出することにより復号処理を終了する手段とを備えたこ
とを特徴とする。
The encoding / decoding method according to the thirteenth invention is as follows:
Encode the length of the data unit, which is the unit of data
With shared side as the decoding side, the encoding side, the input data
One or more blocks at the boundaries of any data unit
Means for encoding by dividing into
An end code that can identify the end of the block
Means for adding arithmetic codes to the decoding side.
And the end of the block from the end code.
Means for ending the decryption process by issuing
And features.

【0038】[0038]

【作用】以上のように、この発明の符号化方式および復
号方式および符号化/復号方式は、入出力シンボル系列
の構成単位であるデータユニット単位で処理するので、
データユニット長の倍数で表される出力シンボル系列長
を誤ることなく復号処理を終了することができる。
As described above, the encoding method and decoding method of the present invention
Signal system and encoding / decoding system are input / output symbol sequences
Since processing is performed in data unit units, which are constituent units of
Output symbol sequence length expressed as a multiple of the data unit length
The decoding process can be terminated without error.

【0039】[0039]

【実施例】実施例1. 第1の実施例では、符号化側と復号側で入力シンボル系
列および出力シンボル系列の構成単位であるデータユニ
ット長を事前に共有することにより、従来例と同様の算
術符号化アルゴリズムのフロー(図8)、算術復号アル
ゴリズムのフロー(図9)により、生成される符号系列
に制御信号を挿入する制御を行って、符号化終了時に終
端符号を符号系列終端に付加すれば入力シンボル系列長
を通知しなくても出力シンボル系列長を誤ることなく復
号終了できるデータ符号化および復号方式について説明
する。
[Embodiment 1] In the first embodiment, the encoding side and the decoding side share a data unit length, which is a constituent unit of an input symbol sequence and an output symbol sequence, in advance, so that an arithmetic coding algorithm flow similar to the conventional example (FIG. 8) According to the flow of the arithmetic decoding algorithm (FIG. 9), control is performed to insert a control signal into a generated code sequence, and if an end code is added to the end of the code sequence at the end of encoding, the input symbol sequence length is notified. A description will be given of a data encoding and decoding method that can end decoding without erroneous output symbol sequence length without performing the above.

【0040】入力シンボル系列および出力シンボル系列
は、データユニットを構成単位とし、さらに任意の数の
データユニットにより構成されるブロックに分割される
ものとする。データユニットとは、入出力シンボル系列
が文字データでは8ビット、画像データでは水平画素数
などのようにデータの構成単位で、入出力シンボル系列
長はデータユニット長の倍数で表せる。入出力シンボル
系列長を事前に知ることは困難であるのに対して、デー
タユニット長は符号化側と復号側で容易に共有できる情
報である。例えば、符号側と復号側が8ビット単位のデ
ータしか扱わない場合には、データユニット長は8ビッ
トとする。また、8ビットでなくても固定長のデータの
場合には、その長さを符号側と復号側で事前にセットす
ることにより共通のデータユニット長を共有できる。ま
た、固定長でなければデータを送る前のヘッダ通信等に
より予めデータユニット長を通知することにより統一を
図ることができる。
The input symbol sequence and the output symbol sequence have a data unit as a constituent unit, and are further divided into blocks formed by an arbitrary number of data units. The data unit is a data configuration unit such as an 8-bit input / output symbol sequence for character data and a horizontal pixel count for image data, and the input / output symbol sequence length can be represented by a multiple of the data unit length. While it is difficult to know the input / output symbol sequence length in advance, the data unit length is information that can be easily shared between the encoding side and the decoding side. For example, when the encoding side and the decoding side handle only data in units of 8 bits, the data unit length is 8 bits. Also, in the case of fixed-length data other than 8 bits, a common data unit length can be shared by setting the length in advance on the code side and the decode side. If the length is not a fixed length, unification can be achieved by notifying the data unit length in advance by header communication or the like before data transmission.

【0041】ブロック分割された入出力シンボル系列の
符号化および復号に対応するために終端符号は最終ブロ
ックか否かを区別して2種用意する。入出力シンボル系
列が単一ブロックにより構成されるならば符号系列終端
に最終ブロックを示す終端符号を付加し、また、複数の
ブロックにより構成されるならばブロックに対する符号
系列の終端に最終でないブロックは最終でないことを示
す終端符号を付加し、最終ブロックには最終であること
を示す終端符号を付加する。図1は、2ブロックで構成
される入力シンボル系列の入力により出力される符号系
列の概念図であり、最終ブロックでないことを示す継続
ブロックあり終端符号10aをX‘FFC0’、最終ブ
ロックを示す継続ブロックなし終端符号10bをX‘F
F80’としたものである。ただし、制御符号11a,
11bをX‘C0’およびX‘80’で示したが、特定
のビットに意味を持たせなくてもよく、確保される終端
符号の範囲内の値から自由に選択することができる。
In order to cope with the encoding and decoding of the input / output symbol sequence divided into blocks, two types of terminal codes are prepared by distinguishing whether or not they are the last blocks. If the input / output symbol sequence is composed of a single block, a termination code indicating the last block is added to the end of the code sequence. A terminal code indicating that it is not the last is added, and a terminal code indicating that it is the last is added to the last block. FIG. 1 is a conceptual diagram of a code sequence output by input of an input symbol sequence composed of two blocks. A continuation block indicating that the block is not the last block is denoted by X'FFC0 ', and a continuation indicating the last block. X'F for the non-block termination code 10b
F80 '. However, control codes 11a,
Although 11b is indicated by X'C0 'and X'80', a specific bit does not need to have a meaning, and can be freely selected from values within a range of a reserved terminal code.

【0042】以下、符号系列の入出力単位をバイト(8
ビット)とし、算術符号化アルゴリズムのフロー(図
8)および算術復号アルゴリズムのフロー(図9)で使
用した名称を用いて説明する。
Hereinafter, the input / output unit of the code sequence is byte (8
) Will be described using the names used in the flow of the arithmetic coding algorithm (FIG. 8) and the flow of the arithmetic decoding algorithm (FIG. 9).

【0043】符号化および復号処理において、有効領域
の更新アルゴリズムは図8および図9のものと同一なの
で数直線上における有効領域の位置、幅ともに同じにな
る。符号化側は、符号化演算に加算を用いて更新される
有効領域の下界値として符号系列を修正し、生成してい
く。このようにして最終的に生成される符号系列は、最
終有効領域の下界値を示す。復号側は、符号系列を初期
値として、復号演算に減算を用いて更新される有効領域
の下界値からの変位として符号系列を修正していく。復
号終了時には、最終有効領域の下界値と符号系列初期値
は一致するので、最終有効領域の下界値からの変位とし
て修正された符号系列は必ず0となる。ここで、復号処
理でDレジスタに取り込まれる符号系列のビット数は、
符号化処理でCレジスタ,Sレジスタから掃き出された
符号系列のビット数と等しくなる。
In the encoding and decoding processes, the updating algorithm of the effective area is the same as that of FIGS. 8 and 9, so that the position and width of the effective area on the number line are the same. The encoding side corrects and generates a code sequence as a lower bound of an effective area updated using addition in the encoding operation. The code sequence finally generated in this way indicates the lower bound of the final effective area. The decoding side uses the code sequence as an initial value, and corrects the code sequence as a displacement from the lower limit of the effective area updated using subtraction in the decoding operation. At the end of decoding, the lower bound value of the final effective area matches the code sequence initial value, and therefore the code sequence corrected as a displacement from the lower bound value of the final effective area always becomes 0. Here, the number of bits of the code sequence taken into the D register in the decoding process is:
It becomes equal to the number of bits of the code sequence swept out of the C and S registers in the encoding process.

【0044】符号系列は、その終端に終端符号が付加さ
れる前に出力単位であるバイト(=8ビット)境界まで
0ビット以上7ビット以下のダミービット‘0’が詰め
られる。終端符号直前のバイトにダミービットがいくつ
詰められているか不明であればダミービットまで取り込
んでしまい、出力シンボル系列を長く復号してしまう可
能性がある。復号処理を終了すべきところで最終有効領
域の下界値からの変位として修正された符号系列、つま
りDレジスタの値は0となっており、ダミービット
‘0’を取り込んで引き続き復号処理を行っても、劣勢
シンボルのみしか復号できないことになる。劣勢シンボ
ルの復号に対しては必ず正規化処理が伴うのでさらにダ
ミービット‘0’が取り込まれる。最大ダミービットは
7ビット、正規化処理に伴う最小シフト桁数は1ビット
であることから最大7シンボルが余分に復号される可能
性があるが、ダミービット数が不明であっても、8ビッ
ト以上シフトを行えば、終端符号以降のビットを取り込
むことになるので、復号が終了していなければならない
ことが確実に判断できる。そこで、符号化側と復号側で
入出力シンボル系列の構成単位であるデータユニット長
を共有して符号化および復号処理するとき、共有するデ
ータユニット長を符号系列の入出力単位長である8以上
とすれば、7ビット(シンボル)余分に復号したとして
もデータユニットを構成することができず、直前のデー
タユニットで出力シンボル系列の復号処理を終了すべき
であったことが分かる。このように最小データユニット
長を8とすることは、画像データのみならず文字データ
などのバイトを単位とするデータにも十分対応できるこ
とを示している。
Before the end code is added to the end of the code sequence, dummy bits '0' of 0 to 7 bits are packed up to the byte (= 8 bits) boundary which is the output unit. If it is not clear how many dummy bits are packed in the byte immediately before the terminal code, even the dummy bits are fetched and the output symbol sequence may be decoded long. The code sequence corrected as a displacement from the lower bound value of the final effective area where the decoding process should be completed, that is, the value of the D register is 0, and even if the dummy bit '0' is taken in and the decoding process is continued, , Only the inferior symbol can be decoded. Since decoding of the inferior symbol always involves normalization processing, a dummy bit '0' is further taken in. Since the maximum number of dummy bits is 7 bits and the minimum number of shift digits for normalization is 1 bit, there is a possibility that a maximum of 7 extra symbols may be decoded. By performing the above shift, the bits after the terminal code are fetched, so that it can be reliably determined that the decoding must be completed. Therefore, when the encoding side and the decoding side share and share the data unit length, which is a constituent unit of the input / output symbol sequence, when the encoding and decoding processes are performed, the shared data unit length must be 8 or more, which is the input / output unit length of the code sequence. Then, it can be seen that even if decoding is performed 7 bits (symbol) extra, a data unit cannot be formed, and the decoding process of the output symbol sequence should have been completed in the immediately preceding data unit. Setting the minimum data unit length to 8 in this way indicates that it can sufficiently handle not only image data but also data in units of bytes such as character data.

【0045】以上のように、入出力シンボル系列の構成
単位であるデータユニット長(≧8;入力単位長をバイ
トとする)を共有し、終端符号により符号系列の終端を
通知される算術符号化および算術復号において、次に示
す処理手順1に従うことにより余分なシンボルを復号す
ることなく、復号処理の終了を正確に判断できる。 処理手順1. (手順1) 符号系列から終端符号を先行検出する。 (手順2) 終端符号直前の入力単位(最終バイト)から符号ビットをD レジスタに取り込んで復号し、Dレジスタが0となることを 検出する。 (手順3) データユニット終了を検出して復号処理を終了する。
As described above, arithmetic coding that shares the data unit length (≧ 8; the input unit length is a byte), which is a constituent unit of an input / output symbol sequence, and that is notified of the end of the code sequence by a terminal code In addition, in arithmetic decoding, by following the processing procedure 1 described below, the end of the decoding process can be accurately determined without decoding extra symbols. Processing procedure 1. (Procedure 1) The terminal code is detected in advance from the code sequence. (Procedure 2) The code bit is taken into the D register from the input unit (last byte) immediately before the terminal code and decoded, and it is detected that the D register becomes 0. (Procedure 3) The end of the data unit is detected, and the decoding process ends.

【0046】同様に、次に示す処理手順2に従っても復
号処理を終了すべきデータユニットを判断できる。この
場合は、余分なシンボルが復号されるが、データユニッ
トを満たすことができないので破棄すればよい。 処理手順2. (手順1’)符号系列から終端符号を先行検出する。 (手順2’)終端符号直前の符号ビット(ダミービットを含む)までDレ ジスタに取り込んで復号する。 (手順3’)不完全なデータユニットがあれば破棄し復号処理を終了する 。
Similarly, it is possible to determine the data unit for which the decoding process should be terminated according to the following procedure 2. In this case, although the extra symbols are decoded, the data units cannot be filled, so that they may be discarded. Processing procedure 2. (Procedure 1 ′) The terminal code is detected in advance from the code sequence. (Procedure 2 ') Up to the code bit (including the dummy bit) immediately before the terminal code is taken into the D register and decoded. (Procedure 3 ′) If there is an incomplete data unit, it is discarded, and the decoding process ends.

【0047】なお、入出力シンボル系列が、任意の数の
データユニットにより構成されるブロックに分割される
算術符号化および算術復号は、上記いずれかの処理手順
によりブロックの復号処理を終了し、検出された終端符
号から継続ブロックの有無を判断し、継続ブロックがあ
るときには次のブロックの復号を開始させ、継続ブロッ
クがないときには出力シンボル系列の復号処理を終了さ
せればよい。
In the arithmetic coding and arithmetic decoding in which the input / output symbol sequence is divided into blocks composed of an arbitrary number of data units, the decoding of the blocks is completed by any of the above-described processing procedures. The presence / absence of a continuation block may be determined from the terminal code thus obtained, and if there is a continuation block, the decoding of the next block may be started. If there is no continuation block, the decoding process of the output symbol sequence may be terminated.

【0048】第1の実施例による符号化装置構成は図2
のように示される。図において、モデリング変換器4
0、算術符号器41、マルチプレクサ(MPX)43、
入力シンボル系列46、符号系列47は図11に示され
た従来例の符号化装置構成による同名のものと同じ機能
を持つ。20はユニット終了検出器で、入力シンボル系
列46の構成単位であるデータユニットの終了を検出す
るものである。21は符号化終了判定器で、入力シンボ
ル系列の分割単位であるブロックの終了を検出し、最終
ブロックか否かを判断するものである。22は終端符号
発生器で、符号化終了判定器21からブロックの終了と
最終ブロックか否かを通知され、終端符号を発生するも
のである。
The configuration of the encoding apparatus according to the first embodiment is shown in FIG.
Is shown as In the figure, the modeling converter 4
0, arithmetic encoder 41, multiplexer (MPX) 43,
The input symbol sequence 46 and the code sequence 47 have the same functions as those having the same names in the configuration of the conventional encoder shown in FIG. A unit end detector 20 detects the end of a data unit which is a constituent unit of the input symbol sequence 46. Reference numeral 21 denotes an encoding end determiner which detects the end of a block which is a unit of division of an input symbol sequence and determines whether or not the block is the last block. Reference numeral 22 denotes a terminal code generator, which is notified of the end of the block and whether or not the block is the last block from the coding end determiner 21, and generates a terminal code.

【0049】図の構成の動作を説明する。入力シンボル
系列46はモデリング変換器40に入力され、モデリン
グ変換器40からのT/Fの判定出力に基づいて算術符
号器41は制御信号を挿入する制御を行いながら符号系
列47を出力する。ユニット終了検出器20は入力シン
ボル系列が1データユニット入力されたことを検出する
ごとに、符号化終了判定器21へユニット検出信号を通
知する。符号化終了判定器21はユニット検出信号を通
知されて1ブロック入力されたことを検出するごとに、
算術符号器41と終端符号発生器22へブロック検出信
号と最終ブロックか否かを通知する。マルチプレクサ4
3はブロック検出信号を通知された算術符号器41に符
号系列47を出力させる。マルチプレクサ43は終端符
号発生器22に最初に終端符号の終了符号X‘FF’、
次に制御符号X‘C0’(継続あり)またはX‘80’
(継続なし)を選択して出力させる。こうして、マルチ
プレクサ43は最終ブロックか否かに基づいて継続ブロ
ックの有無を含めた終端符号をブロックに対する符号系
列47の終端に付加する。符号化終了判定器21は継続
ブロックがあるときは次ブロックの符号化処理を新たに
開始させ、ないときは入力シンボル系列の符号化処理を
終了させる。
The operation of the configuration shown in FIG. The input symbol sequence 46 is input to the modeling converter 40, and based on the T / F determination output from the modeling converter 40, the arithmetic encoder 41 outputs a code sequence 47 while performing control to insert a control signal. Each time the unit end detector 20 detects that an input symbol sequence has been input for one data unit, it notifies the coding end determiner 21 of a unit detection signal. Each time the encoding end determiner 21 is notified of the unit detection signal and detects that one block has been input,
The arithmetic encoder 41 and the terminal code generator 22 are notified of the block detection signal and whether or not the block is the last block. Multiplexer 4
3 causes the arithmetic encoder 41, which has been notified of the block detection signal, to output a code sequence 47. The multiplexer 43 first sends the end code end code X'FF 'to the end code generator 22.
Next, control code X'C0 '(with continuation) or X'80'
Select (No continuation) to output. In this way, the multiplexer 43 adds a termination code including the presence or absence of a continuation block to the end of the code sequence 47 for the block based on whether or not the block is the last block. If there is a continuation block, the coding end determiner 21 newly starts the coding process of the next block, and ends the coding process of the input symbol sequence when there is no continuation block.

【0050】第1の実施例による復号装置構成は図3の
ように示される。図において、算術復号器50、モデリ
ング逆変換器51、終端検出器52、符号系列55、出
力シンボル系列57は図12に示された従来例の符号化
装置構成による同名のものと同じ機能を持つ。30はユ
ニット終了検出器で、データユニットの終了を検出する
ものであり、31は復号終了判定器で、判定された終端
符号と算術復号器50内の復号レジスタ値と検出された
データユニット終了からブロックの復号処理の終了を検
出し、終端符号から最終ブロックか否かを判断して最終
ブロックならば出力シンボル系列の復号処理を終了させ
るものである。
The configuration of the decoding apparatus according to the first embodiment is shown in FIG. In the figure, an arithmetic decoder 50, a modeling inverse transformer 51, an end detector 52, a code sequence 55, and an output symbol sequence 57 have the same functions as those having the same names in the conventional encoding device configuration shown in FIG. . Reference numeral 30 denotes a unit end detector for detecting the end of a data unit. Reference numeral 31 denotes a decoding end judging unit which detects the end code determined, the decoding register value in the arithmetic decoder 50, and the detected data unit end. The end of the decoding process of the block is detected, and whether or not the block is the last block is determined based on the terminal code. If the block is the last block, the decoding process of the output symbol sequence is ended.

【0051】図の構成の動作を説明する。符号系列56
は算術復号器50に制御信号を削除されながら入力さ
れ、T/Fのいずれかに復号される。復号出力はモデリ
ング逆変換器51に入力され、出力シンボル系列57を
得る。終端検出器52は終端符号を検出する。ユニット
終了検出器30は出力シンボル系列が1データユニット
出力されたことを検出するごとに、復号終了判定器31
へユニット検出信号を通知する。復号終了判定器31は
終端検出器52から終端符号を検出したことを通知され
た後、算術復号器50内の復号レジスタ値が0となって
から最初にユニット検出信号が通知されたところで、ま
たは終端符号が取り込まれる直前まで復号を続けてデー
タユニットを満たせない余分なシンボルを破棄して、ブ
ロック終了とし、算術復号器50とモデリング逆変換器
51へブロック検出信号と最終ブロックか否かを通知す
る。ブロック終了検出器21は検出された終端符号から
最終ブロックか否かを判断し、継続ブロックがあるとき
は次ブロックの復号処理を新たに開始させ、ないときは
出力シンボル系列の復号処理を終了させる。
The operation of the configuration shown in FIG. Code sequence 56
Is input to the arithmetic decoder 50 while the control signal is deleted, and is decoded into one of T / F. The decoded output is input to the modeling inverse transformer 51, and an output symbol sequence 57 is obtained. The termination detector 52 detects a termination code. Each time the unit end detector 30 detects that the output symbol sequence has been output by one data unit, the decoding end determiner 31
To the unit detection signal. The decoding end determiner 31 is notified of the detection of the terminal code from the terminal detector 52, and thereafter, when the unit detection signal is first notified after the decoding register value in the arithmetic decoder 50 becomes 0, or The decoding is continued until immediately before the terminal code is taken in, the extra symbols that cannot fill the data unit are discarded, the block is terminated, and the arithmetic decoder 50 and the modeling inverse converter 51 are notified of the block detection signal and whether or not the block is the last block. I do. The block end detector 21 determines whether or not the last block is the last block based on the detected terminal code. If there is a continuous block, the decoding process of the next block is newly started. Otherwise, the decoding process of the output symbol sequence is ended. .

【0052】上記第1の実施例では、従来例では参照し
ていなかった入出力シンボル系列の構成単位であるデー
タユニット長および復号レジスタ値を参照することによ
り、入力シンボル系列を符号化して得られた符号系列か
ら出力シンボル系列長を誤ることなく復号終了させる。
入出力単位がバイト(8ビット)なのでデータユニット
長は8以上であれば、入出力シンボル系列またはブロッ
ク、データユニットがバイト境界で終わらなくてもよ
く、それぞれに対してバイト境界までダミービットを詰
めるか否か等の処置が符号化側と復号側で統一されてい
ればよい。入出力単位は必ずしもバイトでなくてもよ
く、ワードなどでも構わないが、データユニット長の制
限はその入出力単位長(ビット数)に従う。
In the first embodiment, the input symbol sequence is obtained by encoding the input symbol sequence by referring to the data unit length and the decoding register value which are the constituent units of the input / output symbol sequence which were not referred to in the conventional example. The decoding is terminated from the code sequence without error in the output symbol sequence length.
Since the input / output unit is byte (8 bits), if the data unit length is 8 or more, the input / output symbol sequence, block, and data unit do not need to end at byte boundaries, and dummy bits are packed up to the byte boundaries for each. It suffices if measures such as whether or not are unified on the encoding side and the decoding side. The input / output unit need not always be a byte, but may be a word, but the data unit length is limited according to the input / output unit length (number of bits).

【0053】以上のように、第1の実施例では、算術符
号化側と算術復号側でデータユニット長(≧8)を共有
させ、入出力シンボル系列に対して、従来例で示したよ
うな制御信号を挿入する制御を行うとともに終端に終端
符号を付加した符号系列(算術符号)を用いれば、符号
化する入力シンボル系列長が任意であっても出力シンボ
ル系列長を誤ることなく復号でき、任意の長さにブロッ
ク分割される入出力シンボル系列の符号化および復号に
対応できるデータ符号化および復号方式を説明した。
As described above, in the first embodiment, the data unit length (≧ 8) is shared between the arithmetic encoding side and the arithmetic decoding side, and the input / output symbol sequence is the same as that shown in the conventional example. By using a code sequence (arithmetic code) in which a control signal is inserted and a termination code is added to the end, even if the input symbol sequence length to be encoded is arbitrary, the output symbol sequence length can be decoded without error. A data encoding and decoding method that can cope with encoding and decoding of an input / output symbol sequence divided into blocks of an arbitrary length has been described.

【0054】実施例2. 上記第1の実施例では、予測値との一致・不一致を示す
判定値T,Fに対して分配される有効領域には、判定値
Tを上位、判定値Fを下位に配置し、符号系列(算術符
号)を数直線上の有効領域の下界値として計算して得
た。次に、第2の実施例では、判定値T,Fに対して分
配される有効領域には、判定値Tを下位、判定値Fを上
位に配置(従来例と逆配置)する場合について説明す
る。この場合、符号系列は従来例と同じく有効領域の下
界値として計算するが、下界値を符号とするとき上界値
は符号にはできないため、最終的に有効領域の上界値に
最も近い値を符号化することにより、同様な機能を実現
できることを説明する。
Embodiment 2 FIG. In the first embodiment, in the effective area distributed to the judgment values T and F indicating the match / mismatch with the prediction value, the judgment value T is arranged at the upper position and the judgment value F is arranged at the lower position. (Arithmetic code) was calculated and obtained as the lower bound of the effective area on the number line. Next, in the second embodiment, a case will be described in which the judgment value T is arranged in the lower part and the judgment value F is arranged in the upper part in the effective area distributed to the judgment values T and F (inverse arrangement with the conventional example). I do. In this case, the code sequence is calculated as the lower limit value of the effective area as in the conventional example, but when the lower limit value is used as the code, the upper limit value cannot be converted into a code. It will be described that a similar function can be realized by encoding.

【0055】算術符号化は、符号化済みの入力シンボル
系列sと符号化する入力(TまたはF)に対する有効領
域幅をA、符号をCとすると次に示す算術演算を最終入
力シンボルまで繰り返すことにより下界値に基づく符号
が得られる。 初期状態 A(null)=1.0 C(null)=0.0 領域演算(乗算はシフト演算で実現可) 劣勢シンボル領域幅:A(s,F)=A(s)×2-SK 優勢シンボル領域幅:A(s,T)=A(s)−A(s,F) 符号化演算 劣勢シンボル符号化:C(s,F)=C(s)+A(s,F) 優勢シンボル符号化:C(s,T)=C(s)
Arithmetic coding is to repeat the following arithmetic operation up to the last input symbol, where A is the effective area width for the input symbol sequence s already coded and the input (T or F) to be coded, and C is the code. Gives a code based on the lower bound. Initial state A (null) = 1.0 C (null) = 0.0 Area operation (multiplication can be realized by shift operation) Inferior symbol area width: A (s, F) = A (s) × 2 -SK superior Symbol area width: A (s, T) = A (s) -A (s, F) Encoding operation Inferior symbol encoding: C (s, F) = C (s) + A (s, F) Superior symbol code Formula: C (s, T) = C (s)

【0056】算術符号化のアルゴリズムのフローを図4
に示す。図における各種設定・表記は、図8における設
定・表記と同様である。また、符号は最終有効領域の上
界値に最も近い値とするために、Cレジスタ値を掃き出
す前にA−2-(5-1)(指数部の5−1=4はSK最大
値,5は符号化レジスタ長)を加えて掃き出した後に、
バイト境界までダミービット‘1’を詰める。
FIG. 4 shows the flow of the algorithm of arithmetic coding.
Shown in Various settings and notations in the figure are the same as those in FIG. Also, in order to make the code the value closest to the upper bound value of the final effective area, before sweeping out the C register value, A-2- (5-1) (5-1 = 4 in the exponent part is the SK maximum value, 5 is the coding register length) and after sweeping out,
Dummy bit '1' is packed to byte boundary.

【0057】以下、図の番号に従って説明する。処理S
1は、B,CおよびAレジスタ値の初期化であり、B,
Cレジスタをクリアし、Aレジスタ値を1.0とする。
処理S2は、入力シンボルを取り込み、予測されるSK
値(初期値は1)をセットする。処理S3は、入力シン
ボルと予測値の一致(T)・不一致(F)の判定し、そ
の結果であるMIN値により処理を切り替える。
Hereinafter, description will be made in accordance with the numbers in the figure. Processing S
1 is the initialization of the B, C and A register values.
Clear the C register and set the A register value to 1.0.
The process S2 takes in the input symbol and calculates the predicted SK
Set a value (initial value is 1). In the process S3, a match (T) / mismatch (F) between the input symbol and the predicted value is determined, and the process is switched according to the MIN value that is the result.

【0058】S4の処理は、処理S3において不一致
(F)と判定された場合であり、劣勢シンボルの符号化
処理を示す。処理S4は、有効領域下界値であるB,C
レジスタ、有効領域幅であるAレジスタの更新を行い、
劣勢シンボルに対する有効領域は優勢シンボルに対する
有効領域より上位に配置されることから、B,Cレジス
タには優勢シンボルの有効領域幅であるA−2-SK を加
える。Cレジスタに2-SK を加えたときに発生する桁上
がりは、Bレジスタに最下位ビットから上位へ伝播され
る。B,CレジスタをSKビット左論理シフトし、Cレ
ジスタの最上位からあふれた符号ビットはその上位に配
置されたBレジスタの最下位ビットへ移る。Aレジスタ
値は2-SK をSKビット左論理シフトするので必ず1.
0となる。処理S4の正規化処理終了後は処理S8に進
む。
The process of S4 is a case where it is determined that the values do not match (F) in the process S3, and indicates the encoding process of the inferior symbol. The process S4 is performed for the lower bounds B and C of the effective area.
Update the register and A register which is the effective area width,
Since the effective area for the inferior symbol is located higher than the effective area for the superior symbol, A-2- SK which is the effective area width of the superior symbol is added to the B and C registers. The carry generated when 2- SK is added to the C register is propagated to the B register from the least significant bit to the most significant bit. The B and C registers are logically shifted left by SK bits, and the sign bit overflowing from the most significant bit of the C register is shifted to the least significant bit of the B register arranged at the higher level. Always 1 because the A register value is SK-bit left logic shift 2 -SK.
It becomes 0. After the end of the normalization process in step S4, the process proceeds to step S8.

【0059】S5〜S7の処理は、処理S3において一
致(T)と判定された場合であり、優勢シンボルの符号
化処理を示す。処理S5は、有効領域幅であるAレジス
タの更新のみを行い、Aレジスタから劣勢シンボルの有
効領域幅である2-SK を減じる。処理S6は、Aレジス
タ値を1.0と比較し、Aレジスタ値が1.0以上であ
れば処理S8へ進み、1.0未満であれば処理S7へ進
む。処理S7は、B,CおよびAレジスタを1ビット左
論理シフトする正規化処理を行った後、処理S8へ進
む。
The processing of S5 to S7 is a case where it is determined that the match (T) is obtained in the processing S3, and indicates the encoding processing of the superior symbol. In the process S5, only the A register, which is the effective area width, is updated, and the 2- SK , which is the effective area width of the inferior symbol, is subtracted from the A register. The process S6 compares the A register value with 1.0. If the A register value is 1.0 or more, the process proceeds to a process S8, and if the A register value is less than 1.0, the process proceeds to a process S7. In the process S7, after performing a normalization process of shifting the B, C and A registers left by one bit, the process proceeds to a process S8.

【0060】処理S8は、すべての入力シンボル系列に
ついて符号化処理を行ったかどうかを判断し、データの
入力が終わっていなければ処理S2からの各処理を繰り
返し、終わっていれば処理S9へ進む。処理S9は、す
べての入力シンボル系列について符号化処理終了後Cレ
ジスタに残った符号を出力するが、まず上界値に最も近
い値とするためにB,CレジスタにA−2-4を加え、C
レジスタ幅である5ビットの左論理シフト処理を行う。
また、出力単位(ここではバイト)の境界までダミービ
ット‘1’を詰めて符号を出力し算術符号化を終了す
る。このダミービット‘1’が付加されることにより、
さらに、上界値に近い値を符号系列として出力できる。
In step S8, it is determined whether or not encoding has been performed on all input symbol sequences. If data input has not been completed, each process from step S2 is repeated, and if completed, the process proceeds to step S9. Process S9, all of the input symbol sequence is output the remaining codes for the encoding process after the end of the C register, to the value closest to the upper bound First B, and A-2 -4 in the C register is added , C
A left logical shift process of 5 bits, which is the register width, is performed.
Also, the code is output by packing the dummy bit '1' up to the boundary of the output unit (here, byte), and the arithmetic coding is completed. By adding the dummy bit '1',
Further, a value close to the upper bound value can be output as a code sequence.

【0061】算術復号は、復号済みの出力シンボル系列
sと復号される出力シンボル(TまたはF)に対する有
効領域幅をA、符号をD(符号初期値は算術符号化にお
ける符号C)とすると次に示す算術演算を最終出力シン
ボルまで繰り返すことにより復号を行うことができる。
符号Dは次に示す算術演算により常に有効領域下界値か
ら符号C(初期値)までの変位に逐次更新される。 初期状態 A(null)=1.0 D(null)=C 領域演算(乗算はシフト演算で実現可) 劣勢シンボル領域幅:A(s,F)=A(s)×2-SK 優勢シンボル領域幅:A(s,T)=A(s)−A(s,F) 復号演算(出力X) D(s,X)≧A(s,T)ならば、劣勢シンボル復号 X=F; D(s,F)=D(s)−A(s,F) D(s,X)<A(s,T)ならば、優勢シンボル復号 X=T; D(s,T)=D(s)
In the arithmetic decoding, the effective area width for the decoded output symbol sequence s and the decoded output symbol (T or F) is A, and the code is D (the code initial value is the code C in the arithmetic coding). The decoding can be performed by repeating the arithmetic operation shown in (1) up to the final output symbol.
The code D is always updated sequentially from the lower bound of the effective area to the code C (initial value) by the following arithmetic operation. Initial state A (null) = 1.0 D (null) = C Area operation (multiplication can be realized by shift operation) Inferior symbol area width: A (s, F) = A (s) × 2 -SK superior symbol area Width: A (s, T) = A (s) −A (s, F) Decoding operation (output X) If D (s, X) ≧ A (s, T), decoding of inferior symbol X = F; D (S, F) = D (s) −A (s, F) If D (s, X) <A (s, T), dominant symbol decoding X = T; D (s, T) = D (s) )

【0062】算術復号のアルゴリズムのフローを図5に
示す。図における各種設定・表記は、図9における設定
・表記と同様である。
FIG. 5 shows the flow of the algorithm of arithmetic decoding. Various settings and notations in the figure are the same as those in FIG.

【0063】図の番号に従って説明する。処理S1は、
D,BおよびAレジスタ値の初期化であり、Dレジスタ
はBレジスタからDレジスタを符号ビットで満たすため
に5ビット左論理シフトし、Aレジスタ値を1.0とす
る。処理S2は、予測されるSK値(初期値は1)をセ
ットする。処理S3は、復号されるMOUT値は出力シ
ンボルと予測値の一致(T)・不一致(F)の判定結果
であるが、有効領域下界値からの変位である符号Dが優
勢シンボルと劣勢シンボルのどちらに対する領域内に位
置するかにより処理を切り替える。符号Dが、優勢シン
ボルに対する領域幅であるA−2-SK 以上であれば劣勢
シンボルに対する領域内に位置し、A−2-SK 未満であ
れば優勢シンボルに対する領域内に位置すると判定され
る。
The description will be made according to the numbers in the figure. The processing S1 is
Initialization of the D, B, and A register values. The D register is logically shifted left by 5 bits from the B register to fill the D register with the sign bit, and the A register value is set to 1.0. The process S2 sets a predicted SK value (the initial value is 1). In the process S3, the MOUT value to be decoded is the determination result of the match (T) / mismatch (F) between the output symbol and the predicted value. The processing is switched depending on which area is located. If the code D is equal to or larger than the area width for the superior symbol, ie, A−2− SK, it is determined that the symbol D is located within the area for the inferior symbol and less than A−2− SK .

【0064】S4,S5の処理は、処理S3において符
号Dが劣勢シンボルに対する領域内に位置すると判定さ
れた場合であり、劣勢シンボルの復号処理を示す。処理
S4は、MOUT値に不一致(F)であることをセット
する。処理S5は、D,Bレジスタの更新を行い、劣勢
シンボルに対する有効領域は優勢シンボルに対する有効
領域より上位に配置されることから、D,Bレジスタか
ら優勢シンボルの有効領域幅であるA−2-SK を減じ
る。D,BレジスタをSKビット左論理シフトし、Bレ
ジスタの最上位からあふれた符号ビットはその上位に配
置されたDレジスタの最下位ビットへ移ることにより符
号ビットが取り込まれる。Aレジスタ値は2-SK をSK
ビット左論理シフトするので必ず1.0となる。処理S
5の正規化処理終了後は処理S10に進む。
The processing of S4 and S5 is a case where it is determined in the processing S3 that the code D is located within the area for the inferior symbol, and indicates the decoding processing of the inferior symbol. The process S4 sets that the MOUT value does not match (F). Step S5 is, D, updates the B register, since the effective area with respect to inferior symbol is arranged in the upper than the effective region for the MPS, an effective area width of the major symbol from D, B register A-2 - Reduce SK . The D and B registers are logically shifted left by SK bits, and the sign bit overflowing from the most significant bit of the B register is shifted to the least significant bit of the D register arranged at the upper position, thereby taking in the sign bit. A register value SK a 2 -SK
Since it is logically shifted left by bits, it always becomes 1.0. Processing S
After the normalization process of No. 5, the process proceeds to the process S10.

【0065】S6〜S9の処理は、処理S3において符
号Dが優勢シンボルに対する領域内に位置すると判定さ
れた場合であり、優勢シンボルの復号処理を示す。処理
S6は、MOUT値に一致(T)であることをセットす
る。処理S7は、D,Bレジスタ、有効領域幅であるA
レジスタの更新のみを行い、Aレジスタから劣勢シンボ
ルの有効領域幅である2-SK を減じる。処理S8は、A
レジスタ値を1.0と比較し、Aレジスタ値が1.0以
上であれば処理S10へ進み、1.0未満であれば処理
S9へ進む。処理S9は、D,BおよびAレジスタを1
ビット左論理シフトする正規化処理を行った後、処理S
10へ進む。
The processing of S6 to S9 is the case where it is determined in the processing S3 that the code D is located within the area for the dominant symbol, and indicates the decoding processing of the dominant symbol. The process S6 sets that the value matches (T) the MOUT value. The process S7 is performed in the D and B registers and the effective area width A
Only the register is updated, and 2- SK , which is the effective area width of the inferior symbol, is subtracted from the A register. The processing S8 is performed at A
The register value is compared with 1.0, and if the A register value is 1.0 or more, the process proceeds to step S10, and if it is less than 1.0, the process proceeds to step S9. The process S9 sets the D, B and A registers to 1
After performing the normalization process of shifting the bits left logically, the process S
Proceed to 10.

【0066】処理S10は、すべての出力シンボル系列
について復号処理が行われたかどうかを判断し、出力シ
ンボルの復号が終わっていなければ処理S2からの各処
理を繰り返し、終わっていれば算術復号を終了する。
In step S10, it is determined whether or not decoding has been performed on all output symbol sequences. If decoding of output symbols has not been completed, each process from step S2 is repeated. If decoding has been completed, arithmetic decoding is terminated. I do.

【0067】第2の実施例による符号化装置構成・動作
および復号装置構成・動作は図2、図3で示される上記
第1の実施例による符号化装置構成・動作および復号装
置構成・動作と同様に説明できる。
The configuration and operation of the encoding apparatus and the configuration and operation of the decoding apparatus according to the second embodiment are the same as those of the first embodiment shown in FIGS. The same can be said.

【0068】さて、上記第1の実施例では復号の際に劣
勢シンボルが最大7シンボル余計に出力される可能性が
あった。この第2の実施例では、優勢シンボルの領域を
劣勢シンボルの領域より下方配置することから、復号演
算により逐次修正される符号系列が下界値となってしま
うと、優勢シンボルが復号され続けることになる。ただ
し、優勢シンボルが復号されるときシフト処理は必ずし
も発生しないので余計に復号されるシンボル数を7(シ
フト数を7ビット)以内とする保証が得られない。そこ
で、余計に復号されるシンボルが劣勢シンボルのみとな
るように符号系列を上界値に最も近い値とし、バイト境
界までダミービット‘1’を詰めることにより、劣勢シ
ンボルの領域内に位置させることができる。ただし、符
号系列は、例えばバイトX‘FF’が出現したとき制御
信号を挿入して出力されており、最終バイト境界までダ
ミービット‘1’を詰めるために、最終バイトがX‘F
F’となることもありうる。このとき次バイトに制御信
号を挿入する処理が行われなければならないが、最終バ
イトのX‘FF’に限り制御信号の挿入処理を行わない
こととする。例えば、図6のように符号系列終端に付加
する終端符号12aをX‘FF80’とすると、終端符
号12aを含めた符号系列終端部(3バイト)はX‘・
・・FFFF80’となり、バイトX‘FF’が続くこ
とになるが、X‘FF80’が終端符号12aであるこ
とは容易に判断がつく。よって、上記第2の実施例で
は、符号系列を最終有効領域の上界値に最も近い値とし
たので、Dレジスタは0とはならないが、上記第1の実
施例で説明した処理手順2(手順1’〜手順3’)によ
り復号処理の終了を正確に判断できる。
In the first embodiment, there is a possibility that the inferior symbols are output in excess of seven at the time of decoding. In the second embodiment, since the region of the superior symbol is arranged below the region of the inferior symbol, if the code sequence sequentially corrected by the decoding operation becomes the lower bound, the superior symbol is continuously decoded. Become. However, since the shift process does not necessarily occur when the superior symbol is decoded, there is no guarantee that the number of extra symbols to be decoded is within 7 (the shift number is 7 bits). Therefore, the code sequence is set to the value closest to the upper bound value so that the symbols to be decoded are only the inferior symbols, and the dummy bits '1' are packed up to the byte boundaries to be located in the inferior symbol area. Can be. However, the code sequence is output with a control signal inserted when the byte X'FF 'appears, for example, and the last byte is X'F to fill the dummy bit' 1 'up to the last byte boundary.
It may be F '. At this time, the process of inserting the control signal into the next byte must be performed, but the process of inserting the control signal is not performed only on the last byte X'FF '. For example, assuming that the terminating code 12a added to the end of the code sequence is X'FF80 'as shown in FIG. 6, the code sequence terminating unit (3 bytes) including the terminating code 12a is X'.multidot.
··· FFFF80 'and byte X'FF' follows, but it is easy to determine that X'FF80 'is the terminal code 12a. Therefore, in the second embodiment, since the code sequence is set to a value closest to the upper bound of the final effective area, the D register does not become 0, but the processing procedure 2 (described in the first embodiment) The end of the decoding process can be accurately determined by the procedures 1 ′ to 3 ′).

【0069】実施例3. また、図7に示したように、終端符号12aを含めた符
号系列終端部がX‘・・・xxFFFF80’となった
とき、例えば終端符号12aの最下位ビットをバイトX
‘FF’の省略を示すビット(省略あり:‘1’;な
し:‘0’)とすれば、上記符号系列終端部はX‘・・
・xxFF81’とできる。バイトX‘FF’が続いて
いなければ省略の必要はないので、終端符号12aはX
‘FF80’のままでよく、終了符号5の前まで復号処
理を行えばよい。バイトX‘FF’を省略されていると
きは、終端符号12bの第1バイト(終了符号5)と兼
用されている符号系列最終バイトX‘FF’を取り込む
まで復号処理を行わなければならない。
Embodiment 3 FIG. As shown in FIG. 7, when the code sequence terminating unit including the terminating code 12a becomes X '... XxFFFF80', for example, the least significant bit of the terminating code 12a is set to a byte X.
If bits indicating the abbreviation of 'FF' (abbreviation: '1'; none: '0') are used, the code sequence end portion is X '
XxFF81 '. If the byte X'FF 'does not continue, it is not necessary to omit it.
'FF80' may be left as it is, and decoding processing may be performed up to the end code 5. When the byte X'FF 'is omitted, the decoding process must be performed until the last byte X'FF' of the code sequence which is also used as the first byte (end code 5) of the terminal code 12b.

【0070】実施例4. 上記第1の実施例では複数のブロックが連続して符号化
/復号される場合を説明したが、連続していなくてもよ
い。例えば、符号化側は、一つのブロックの符号化が終
了すると符号化処理を一時中断し、そこまでの符号系列
を出力して最終ブロックか否かを区別して終端符号を付
加し、復号側は、終端符号により一つのブロックの終端
を判断すると復号処理を一時中断するようにしてもよ
い。符号化側で次ブロックの符号化に移る前に何らかの
処理の実行が必要ならば、所望の処理を実行し、復号側
でも次ブロックの復号に移る前に同様な処理を実行する
ことにより同期が可能となる。実行される処理として
は、例えばデータユニット長の変更やエラーの訂正、予
測値テーブルの再初期化または切り替えなどがあり、複
数の処理が考えられるときには上記第1の実施例では終
端符号の使用していないビット(第1、第2の実施例で
は下位6ビット、第3の実施例では4ビット)により実
行すべき処理を指定することもできる。
Embodiment 4 FIG. In the above-described first embodiment, the case where a plurality of blocks are encoded / decoded consecutively has been described, but they need not be consecutive. For example, when encoding of one block is completed, the encoding side temporarily suspends the encoding process, outputs a code sequence up to that, adds a terminal code to distinguish whether or not the last block, and the decoding side Alternatively, when the end of one block is determined based on the end code, the decoding process may be temporarily suspended. If it is necessary for the encoding side to perform some processing before proceeding to the encoding of the next block, the desired processing is performed, and the decoding side performs similar processing before proceeding to the decoding of the next block, thereby achieving synchronization. It becomes possible. The processing to be executed includes, for example, a change in data unit length, correction of an error, reinitialization or switching of a prediction value table, and when a plurality of processings are conceivable, the terminal code is not used in the first embodiment. The processing to be executed can also be specified by bits that are not present (lower 6 bits in the first and second embodiments, 4 bits in the third embodiment).

【0071】実施例5. また、上記第1の実施例でブロックのサイズは固定であ
ってもよいし任意であってもよい。符号化側はブロック
の分割を任意の場所で行っても、復号側では前述した処
理手順を用いることにより正しく復号できる。入力シン
ボル系列のブロック分割を符号化側が任意に行いたい場
合、すなわち、ブロック分割を符号化処理の途中で実行
したいとき、あるデータユニットを符号化し終わったと
ころでそこまでの符号系列を出力した後に終端符号を付
加してブロック終端を指定し、復号側は指定されたブロ
ック終端を検出しながら復号を行えばよい。
Embodiment 5 FIG. In the first embodiment, the block size may be fixed or arbitrary. Even if the encoding side divides the block at an arbitrary location, the decoding side can correctly decode by using the above-described processing procedure. When the encoding side wants to arbitrarily divide the block of the input symbol sequence, that is, when it wants to execute the block division in the middle of the encoding process, it terminates after outputting a coded sequence up to the point where a certain data unit has been encoded. The end of the block is designated by adding a code, and the decoding side may decode while detecting the designated end of the block.

【0072】上記実施例1〜5において説明した符号化
方式および復号方式および符号化/復号方式は、上記手
段・構成で、符号化側と復号側で符号系列に制御信号を
挿入することにより、符号化側では符号系列終端に終端
符号を付加し、復号側では付加された終端符号を検出
し、復号レジスタ値を参照することにより、またはデー
タユニットを満たせない余分に復号したシンボルを破棄
することにより、符号化側と共有している入出力シンボ
ル系列のデータユニット長(文字データでは8ビット、
画像データでは水平画素数など)を基にしてその倍数で
表される出力シンボル系列長を誤ることなく復号終了す
る。例えば文字データでは8ビット、画像データでは水
平画素数などの入出力シンボル系列の構成単位であるデ
ータユニットの長さはヘッダ通知等により符号化/復号
処理を開始する前に符号化側と復号側とで共有すること
ができることを利用し、符号化側で伝送制御を目的とす
る制御信号を挿入された符号系列の終端に付加された終
端符号を復号側で検出し、復号レジスタ値を参照するこ
とにより、またはデータユニットを満たせない余分に復
号したシンボルを破棄することにより、共有されたデー
タユニット長の倍数で表される出力シンボル系列長を誤
ることなく復号処理を終了することができる。また、入
力シンボル系列長を終端符号に付加する必要がないの
で、複数のブロックで構成される入力シンボル系列を符
号化するときであってもブロック終端と最終ブロック終
端(入力シンボル系列終端)を区別して終端符号を設定
し付加することができ、データユニット長およびブロッ
ク長がブロックごとに変更されても 符号化側と復号側で
データユニット長のみ共有することにより出力シンボル
系列長を誤ることなく復号処理を終了することができ
る。
The coding described in the first to fifth embodiments
Method and decoding method and encoding / decoding method
In the stage and configuration, the control signal is applied to the code sequence on the encoding side and the decoding side.
By inserting, the encoding side terminates at the end of the code sequence.
A code is added, and the decoding side detects the added end code.
Data by referring to the decoding register value or
Discards extra decoded symbols that cannot satisfy the data unit
Input / output symbol shared by the encoding side
Data unit length (8 bits for character data,
Based on the number of horizontal pixels in image data)
Decode without erroneous output symbol sequence length
You. For example, 8 bits for character data and water for image data
The data which is a unit of the input / output symbol sequence such as the number of flat pixels
Data unit length is encoded / decoded by header notification etc.
Before the process starts, it must be shared between the encoding side and the decoding side
To control transmission on the encoding side.
The control signal added to the end of the inserted code sequence.
The end code is detected on the decoding side, and the decoding register value is referenced.
Or extra recovery that cannot fill the data unit
By discarding the symbol
The output symbol sequence length, which is a multiple of the
Thus, the decoding process can be terminated without performing any processing. Also, enter
There is no need to add the power symbol sequence length to the terminal code
With an input symbol sequence consisting of multiple blocks
End of block and end of last block even when encoding
Set the termination code by distinguishing the end (end of input symbol sequence)
Data unit length and block
Even if the clock length changes for each block, the encoding side and the decoding side
Output symbol by sharing only data unit length
The decoding process can be terminated without error in the sequence length
You.

【0073】また、入力シンボル系列長を終端符号に付
加する必要がないので、複数のブロックで構成される入
力シンボル系列を符号化するときであってもブロック終
端と最終ブロック終端(入力シンボル系列終端)を区別
して終端符号を設定し付加することができるとともに、
データユニット長およびブロック長がブロックごとに変
更されても符号化側と復号側でデータユニット長のみ共
有することにより出力シンボル系列長を誤ることなく復
号処理を終了することができる。
Further , the input symbol sequence length is added to the terminal code.
Since there is no need to add
Even when encoding a power symbol sequence
Distinguishing between end and end of block (end of input symbol sequence)
To set and add a termination code,
The data unit length and block length change for each block.
Even if the data unit length is changed, only the data unit length is
With this, the output symbol sequence length can be restored without error.
The signal processing can be ended.

【0074】また、符号系列の終端にダミービットを挿
入することにより終端符号の終了符号と同じビットパタ
ーンが出現するときに、そのパターンが連続するのを省
略し、省略したことを示す終端符号を付加することによ
り総符号長を短くできる。
Also, a dummy bit is inserted at the end of the code sequence.
The same bit pattern as the end code of the terminal code.
Pattern does not continue when the pattern appears.
Abbreviations and by adding a terminal code
The total code length can be reduced.

【0075】[0075]

【発明の効果】以上のように、この発明によれば、入出
力シンボル系列の構成単位であるデータユニット単位で
処理するので、データユニット長の倍数で表される出力
シンボル系列長を誤ることなく復号処理を終了すること
ができる。
As described above, according to the present invention, the entrance / exit
In units of data units, which are constituent units of force symbol sequences
Processing, so output expressed as a multiple of the data unit length
Terminate the decoding process without erroneous symbol sequence length
Can be.

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

【図1】この発明を示す一実施例(実施例1,2)にお
ける符号系列の概念図。
FIG. 1 is a conceptual diagram of a code sequence in one embodiment (embodiments 1 and 2) showing the present invention.

【図2】この発明を示す一実施例(実施例1,2)にお
ける符号化装置構成を示す機能ブロック図。
FIG. 2 is a functional block diagram showing a configuration of an encoding device according to an embodiment (Embodiments 1 and 2) of the present invention.

【図3】この発明を示す一実施例(実施例1,2)にお
ける復号装置構成を示す機能ブロック図。
FIG. 3 is a functional block diagram showing a configuration of a decoding device in one embodiment (Embodiments 1 and 2) showing the present invention.

【図4】この発明を示す一実施例(実施例2)における
算術符号化アルゴリズムのフローチャート図(劣勢シン
ボル上方配置)。
FIG. 4 is a flowchart of an arithmetic coding algorithm in one embodiment (second embodiment) showing the present invention (located above inferior symbols).

【図5】この発明を示す一実施例(実施例2)における
算術復号アルゴリズムのフローチャート図(劣勢シンボ
ル上方配置)。
FIG. 5 is a flowchart of an arithmetic decoding algorithm in one embodiment (embodiment 2) showing the present invention (located above inferior symbols).

【図6】この発明を示す一実施例(実施例2)における
符号系列の概念図。
FIG. 6 is a conceptual diagram of a code sequence in one embodiment (second embodiment) showing the present invention.

【図7】この発明を示す一実施例(実施例3)における
符号系列の概念図(X‘FF’省略あり)。
FIG. 7 is a conceptual diagram of a code sequence in one embodiment (third embodiment) showing the present invention (X'FF 'is omitted).

【図8】従来例およびこの発明を示す一実施例(実施例
1)における算術符号化アルゴリズムのフローチャート
図(劣勢シンボル下方配置)。
FIG. 8 is a flowchart of an arithmetic coding algorithm according to a conventional example and an embodiment (Embodiment 1) showing the present invention (located below inferior symbols).

【図9】従来例およびこの発明を示す一実施例(実施例
1)における算術復号アルゴリズムのフローチャート図
(劣勢シンボル下方配置)。
FIG. 9 is a flowchart of an arithmetic decoding algorithm in a conventional example and an embodiment (Embodiment 1) showing the present invention (located below inferior symbols).

【図10】従来例における符号系列の概念図。FIG. 10 is a conceptual diagram of a code sequence in a conventional example.

【図11】従来例における符号化装置構成を示す機能ブ
ロック図。
FIG. 11 is a functional block diagram showing a configuration of an encoding device in a conventional example.

【図12】従来例における復号装置構成を示す機能ブロ
ック図。
FIG. 12 is a functional block diagram showing a configuration of a decoding device in a conventional example.

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

1 入力シンボル系列(入力データ、元データ) 2 符号系列(圧縮データ) 3 算術符号 4 終端符号(従来例) 5 終了符号 6 制御符号(従来例) 7 入力シンボル系列長(元データ数) 10a 終端符号(継続あり)(実施例) 10b 終端符号(継続なし)(実施例) 11a 制御符号(継続あり)(実施例) 11b 制御符号(継続なし)(実施例) 12a 終端符号(実施例) 12b 終端符号(X‘FF’省略あり)(実施例) 13a 制御符号(実施例) 13b 制御符号(X‘FF’省略あり)(実施例) 20 ユニット終了検出器(符号化側) 21 符号化終了判定器 22 終端符号発生器 30 ユニット終了検出器(復号側) 31 復号終了判定器 40 モデリング変換器 41 算術符号器 42 終了検出器(符号化側) 43 マルチプレクサ(MPX) 44 カウンタ 45 終了符号発生器 46 入力シンボル系列(入力データ、元データ) 47 符号系列(圧縮データ) 50 算術復号器 51 モデリング逆変換器 52 終端検出器 53 レジスタ 54 カウンタ 55 終了検出器(復号側)(比較器) 56 符号系列(圧縮データ) 57 出力シンボル系列(復元データ) Reference Signs List 1 input symbol sequence (input data, original data) 2 code sequence (compressed data) 3 arithmetic code 4 terminal code (conventional example) 5 end code 6 control code (conventional example) 7 input symbol sequence length (number of original data) 10a terminal Code (with continuation) (Example) 10b Termination code (without continuation) (Example) 11a Control code (with continuation) (Example) 11b Control code (without continuation) (Example) 12a Termination code (Example) 12b Terminal code (X'FF 'omitted) (Example) 13a Control code (Example) 13b Control code (X'FF' omitted) (Example) 20 Unit end detector (Encoding side) 21 Encoding end Judgment unit 22 Termination code generator 30 Unit end detector (decoding side) 31 Decoding end judgment unit 40 Modeling converter 41 Arithmetic encoder 42 End detector (encoding side) 43 Mal Plexer (MPX) 44 Counter 45 End code generator 46 Input symbol sequence (input data, original data) 47 Code sequence (compressed data) 50 Arithmetic decoder 51 Modeling inverse converter 52 Termination detector 53 Register 54 Counter 55 Termination detector (Decoding side) (Comparator) 56 Code sequence (compressed data) 57 Output symbol sequence (decompressed data)

───────────────────────────────────────────────────── フロントページの続き (72)発明者 吉田 雅之 鎌倉市大船五丁目1番1号 三菱電機株 式会社 通信システム研究所内 (56)参考文献 特開 平3−44116(JP,A) 特開 平3−247123(JP,A) 特開 平4−277933(JP,A) 特開 平5−341955(JP,A) 特開 平5−30372(JP,A) 特開 昭56−30453(JP,A) (58)調査した分野(Int.Cl.7,DB名) H03M 7/40 ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Masayuki Yoshida 5-1-1, Ofuna Kamakura City Mitsubishi Electric Corporation Communication Systems Laboratory (56) References JP-A-3-44116 (JP, A) JP-A-3-247123 (JP, A) JP-A-4-277933 (JP, A) JP-A-5-341955 (JP, A) JP-A-5-30372 (JP, A) JP-A-56-30453 (JP , A) (58) Field surveyed (Int.Cl. 7 , DB name) H03M 7/40

Claims (13)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 以下の要素を有し、データユニットを構
成単位とするブロックからなる入力シンボル系列を入力
とし符号化された符号系列を出力とする符号化方式 (a)入力シンボル系列を入力し、算術符号化手法によ
る符号化を行って、符号系列を出力する算術符号化手
段、 (b)入力シンボル系列からブロックの構成単位である
データユニットを検出するユニット検出手段、 (c)上記符号化側ユニット検出手段により検出された
データユニットが上記ブロックの最終データユニットで
あるか否かを判定する符号化終了判定手段、 (d)上記算術符号化手段の出力する符号系列中に出現
し得ない特定のビットパターンを上記符号化終了判定手
段において判定されたブロックに対する符号系列の終端
に終端符号として付加する終端符号付加手段。
1. An encoding method which has the following elements and receives an input symbol sequence composed of blocks each having a data unit as a constituent unit, and outputs an encoded code sequence. , performs coding by the arithmetic coding technique, the arithmetic coding means outputs a code sequence, (b) detection to Ruyu knit detector data unit is a structural unit from the input symbol sequence block, (c) above Coding end determining means for determining whether or not the data unit detected by the coding unit detecting means is the last data unit of the block; (d) appearing in a code sequence output from the arithmetic coding means Termination code addition for adding a specific bit pattern that cannot be obtained as a termination code to the end of the code sequence for the block determined by the coding end determination means. means.
【請求項2】記算術符号化手段により出力された符
号系列に所定のピットパターンが出現したときには所定
の長さの制御信号を該ビットパターン直後に挿入する制
御信号挿入手段を有することを特徴とする請求項1記載
の符号化方式。
Wherein the control signal insertion means for inserting a control signal of a predetermined length just after the bit pattern when the predetermined pit pattern appeared on the output code sequence by 2. A top Symbol arithmetic encoding means Claim 1
Of marks Goka system.
【請求項3】 以下の要素を有し、データユニットを構
成単位とするブロックからなる符号系列を入力とし復号
された出力シンボル系列を出力とする復号方式 (a)符号系列を入力として、算術復号手法による復号
を行って、出力シンボル系列を出力する算術復号手段、 (b)出力シンボル系列のブロックの構成単位であるデ
ータユニットを検出するユニット検出手段、 (c)符号系列中に出現し得ない特定のビットパターン
を終端符号として検出する終端符号検出手段、 (d)上記終端符号検出手段による終端符号の検出結果
に基づいて、上記ユニット検出手段により検出されたデ
ータユニットが上記ブロックの最終データユニットであ
るか否かを判定する復号終了判定手段。
3. A decoding method having the following elements and receiving a code sequence composed of blocks each having a data unit as a constituent unit and outputting a decoded output symbol sequence as an output. (A) Arithmetic decoding using a code sequence as an input performing decoding by techniques, the arithmetic decoding means for outputting an output symbol sequence, (b) detection to Ruyu knit detector data unit is a structural unit of a block of output symbol sequence, appeared in the (c) code sequence end code detecting means for detecting a specific bit pattern as a termination code is not obtained, (d) the termination code detecting means based on a detection result of the termination code by, upper Kiyu knit detected data unit by detecting means the block Decoding end determining means for determining whether or not the data unit is the last data unit.
【請求項4】記算術復号手段において入力される符
号系列に所定のビットパターンが出現したときには該ビ
ットパターン直後に所定の長さの制御信号が挿入されて
いるものとし、挿入された所定の長さの制御信号を削除
する制御信号処理手段を有することを特徴とする請求項
3記載の復号方式。
4. Assume that the control signals above SL predetermined length just after the bit pattern when the predetermined bit pattern appeared to code sequence input in the arithmetic decoding means is inserted, the inserted predetermined decrypt scheme according to claim 3, wherein the control signal processing means for deleting the control signal length.
【請求項5】 上記復号終了判定手段は、上記終端符号
検出手段において終端符号が検出され、上記ユニット検
出手段により、上記算術復号手段により続けて復号され
る出力シンボルが次のデータユニットを満たせないこと
が検出される場合、出力シンボルで満たされた最後のデ
ータユニットをブロックの最終データユニットとし、デ
ータユニットを満たせない出力シンボルを破棄すること
を特徴とする請求項3記載の復号方式
Wherein said decoding end determination means, terminating code in the termination code detecting means is detected by the upper Kiyu knit detecting means, an output symbol to be decoded continuously by the arithmetic decoding means the following data unit 4. The decoding method according to claim 3, wherein when it is detected that the data unit cannot be satisfied, the last data unit filled with the output symbol is set as the last data unit of the block, and the output symbol that cannot satisfy the data unit is discarded.
【請求項6】 上記終端符号検出手段が終端符号を検出
し、上記算術復号手段が符号系列を復号レジスタに入力
して、復号レジスタの値が所定の値になることを検出す
ることにより、上記復号終了判定手段が復号の終了を判
定することを特徴とする請求項3記載の復号方式。
6. The terminal code detecting means detects a terminal code.
And the arithmetic decoding means inputs the code sequence to the decoding register
To detect that the value of the decoding register becomes a predetermined value.
Thus, the decryption end determining means determines the end of decryption.
The decoding method according to claim 3, wherein the decoding method is set.
【請求項7】 以下の要素を有する符号化/復号方式 (a)入力シンボル系列を入力し、算術符号化手法によ
る符号化を行って、符号系列を出力する算術符号化手
段、 (b)上記算術符号化手段において出力対象の符号系列
に所定のビットパターンが出現したときには所定の長さ
の制御信号を該ビットパターン直後に挿入する制御信号
挿入手段、 (c)入力シンボル系列の構成単位であるデータユニッ
トを検出する符号化側ユニット検出手段、 (d)データユニット長の整数倍の長さで表されるブロ
ックに対して、上記符号化側ユニット検出手段により検
出されたデータユニットが最終データユニットであると
きブロックとして判断し、算術符号化を終了するか否か
を判定する符号化終了判定手段、 (e)上記算術符号化手段の出力する符号系列に対し
て、上記制御信号挿入手段 をとることにより、特定のビ
ットパターンを上記符号化終了検出手段において検出さ
れたブロックの符号系列終端に最終ブロックか否かを示
す情報を含めた終端符号として付加する終端符号付加手
段、 (f)符号系列を入力として、算術復号手法による復号
を行って、出力シンボル系列を出力する算術復号手段、 (g)上記算術復号手段において入力される符号系列に
所定のビットパターンが出現したときには該ビットパタ
ーン直後に挿入された所定の長さの制御信号として処理
した後に削除する制御信号処理手段、 (h)出力シンボル系列の構成単位であるデータユニッ
トを検出する復号側ユニット検出手段、 (i)上記制御信号処理手段において処理される制御信
号が符号系列に挿入されていることにより、符号系列中
に出現し得ない特定のビットパターンを終端符号として
検出する終端符号検出手段、 (j)データユニット長の整数倍の長さで表されるブロ
ックに対して、上記終端符号検出手段において終端符号
が検出され、上記算術復号手段において算術復号演算に
より更新された符号および上記復号側ユニット検出手段
において検出されるデータユニットから、続けて復号さ
れる出力シンボルが次のデータユニットを満たせないと
きには最後に満たされたデータユニットを最終データユ
ニットとするブロックとして判断し、データユニットを
満たせない出力シンボルを破棄し、上記終端符号検出手
段において検出された終端符号から該ブロックが最終ブ
ロックか否かの情報を得て、算術復号を終了するか否か
を判定する復号終了判定手段。
7. An encoding / decoding method having the following elements : (a) An input symbol sequence is input, and an arithmetic coding method is used.
Arithmetic coding that outputs a code sequence
Stage, (b) code sequence to be output in the arithmetic coding means
A predetermined length when a predetermined bit pattern appears in
Control signal for inserting the control signal of
Insertion means, data unit is a structural unit (c), the input symbol sequence
Encoding side unit detecting means for detecting the bets, blow represented by (d) Data unit length an integral multiple of the length of the
The encoding unit by the encoding unit detection means.
If the issued data unit is the last data unit
Whether to terminate arithmetic coding
Coding end determination means for determining, with respect to the code sequence output from the (e) the arithmetic coding unit
By using the control signal insertion means ,
Bit pattern is detected by the encoding end detecting means.
Indicates whether the last block is at the end of the code sequence of the
Terminal code addition method to add as a terminal code including
Stage, as input (f) code sequence, decoding by the arithmetic decoding method
And (g) an arithmetic decoding unit that outputs an output symbol sequence.
When a predetermined bit pattern appears, the bit pattern
As a control signal of a predetermined length inserted immediately after
Control signal processing means for deleting after a data unit is a structural unit of (h) output symbol sequence
Decoding side unit detecting means for detecting the door, control signals to be processed in (i) the control signal processing means
Signal is inserted into the code sequence,
A specific bit pattern that cannot appear in
End code detecting means for detecting, Bro represented by (j) Data Unit, an integral multiple of the length of the
The terminal code in the terminal code detection means.
Is detected, and the arithmetic decoding means
Updated code and decoding side unit detection means
From the data unit detected in
Output symbol cannot satisfy the next data unit
The last filled data unit to the last data unit.
It is determined as a block to be knitted, and the data unit is
Discard output symbols that cannot be satisfied and
The block is the last block from the terminal code detected in the stage.
Whether to end arithmetic decoding by obtaining information on whether or not a lock
Means for determining the end of decoding.
【請求項8】 入力シンボル系列(符号化シンボル)ま
たは出力シンボル系列(復号シンボル)は、優勢シンボ
ルおよび劣勢シンボルのいずれかを与えられ、算術符号
化手段および算術復号手段の扱う符号系列(算術符号)
は、分割された有効領域において劣勢シンボルに対応さ
せる領域を下方配置し、選択された最終領域の下界値
(復号レジスタ値)を符号系列とし、 符号化方式における終端符号付加手段は、符号系列とそ
の終端に付加する終端符号の間に終端符号検出手段の終
端符号検出に影響しない数のダミービット‘0 ’を挿入
することを特徴とする請求項7記載の符号化/復号方
式。
8. An input symbol sequence (encoded symbol)
Or the output symbol sequence (decoded symbol)
Arithmetic symbol, given either
Series (arithmetic code) handled by the conversion means and the arithmetic decoding means
Corresponds to the inferior symbol in the divided effective area.
The lower region of the selected final region
(Decoding register value) as a code sequence, and the terminating code adding means in the coding method uses the code sequence and the code sequence.
Between the end code added to the end of
Insert a number of dummy bits '0 ' that do not affect end code detection
The encoding / decoding method according to claim 7, wherein
formula.
【請求項9】 入力シンボル系列(符号化シンボル)ま
たは出力シンボル系列(復号シンボル)は、優勢シンボ
ルおよび劣勢シンボルのいずれかを与えられ、算術符号
化手段および算術復号手段の扱う符号系列(算術符号)
は、分割された有効領域において劣勢シンボルに対応さ
せる領域を上方配置し、選択された最終領域の下界値
(復号レジスタ値)と同精度で上界値に最も近い値を符
号系列とし、 符号化方式における終端符号付加手段は、符号系列とそ
の終端に付加する終端符号の間に終端符号検出手段の終
端符号検出に影響しない数のダミービット‘1’を挿入
することを特徴とする請求項7記載の符号化/復号方
式。
9. An input symbol sequence (encoded symbol)
Or the output symbol sequence (decoded symbol)
Arithmetic symbol, given either
Series (arithmetic code) handled by the conversion means and the arithmetic decoding means
Corresponds to the inferior symbol in the divided effective area.
The region to be placed above and the lower bound of the selected final region
The value closest to the upper bound value with the same precision as (decoding register value)
And the terminating code adding means in the coding method uses the code sequence and the
Between the end code added to the end of
Insert a number of dummy bits '1' that do not affect end code detection
The encoding / decoding method according to claim 7, wherein
formula.
【請求項10】 上記符号化/復号方式において、 符号化方式における制御信号挿入手段は算術符号化手段
が出力する符号系列に発生した桁上がりは伝播させ、す
べてビット‘1’で占められている符号系列の出力単位
が出力されるごとに直後の出力単位の最上位ビットから
所定の長さのビット‘0’で構成される制御信号を挿入
する伝送制御を行い、 復号方式における制御信号処理手段は算術復号手段に入
力される符号系列の入力単位がすべてビット‘1’で占
められているときにその直後の入力単位の最上位ビット
から所定の長さのビット‘0’を挿入された制御信号と
判断して削除する伝送制御を行うことを特徴とする請求
項8または9記載の符号化/復号方式。
10. In the encoding / decoding method, the control signal inserting means in the encoding method is an arithmetic encoding means.
The carry generated in the code sequence output by
Output unit of code sequence occupied by all bits '1'
Is output from the most significant bit of the output unit immediately after
Insert control signal consisting of bit '0' of predetermined length
Performs transmission control of the control signal processing means in the decoding scheme input to the arithmetic decoding means
All input units of the input code sequence are occupied by bits '1'.
The most significant bit of the input unit immediately following it
And a control signal having a predetermined length bit '0' inserted from
A transmission control for judging and deleting is performed.
Item 10. The encoding / decoding method according to Item 8 or 9.
【請求項11】 上記符号化/復号方式において、 符号化方式における終端符号付加手段は、符号化終了判
定手段により判定されたブロックが最終ブロックか否か
を示す情報を含めた終端符号をブロックに対する符号系
列の終端に付加し、 復号方式における復号終了判定手段は、終端符号検出手
段により検出された終端符号からブロックが最終ブロッ
クか否かを示す情報を得て、復号の終了判定を行うこと
を特徴とする請求項8または9記載の符号化/復号方
式。
11. The encoding / decoding method according to claim 1, wherein the terminal code adding means in the encoding method determines whether the encoding has been completed.
Whether the block determined by the determination means is the last block
A coding system for a block with a terminal code including information indicating
At the end of the column, the decoding end determination means in the decoding method uses a terminal code detection method.
The block is the last block from the terminal code detected by the stage.
To obtain the information indicating whether the decoding
The encoding / decoding method according to claim 8 or 9, wherein
formula.
【請求項12】 上記符号化/復号方式において、 符号化方式における終端符号付加手段は、符号系列とそ
の終端に付加する終了符号および制御符号で構成される
終端符号の間に終端符号検出手段の終端符号検 出に影響
しない数のダミービットを挿入し、ダミービットを挿入
した符号系列の最終部分が終了符号と一致するときには
符号系列の最終部分を終了符号と兼用することにより省
略し、制御符号に終了符号と同じビットパターンの省略
を示す情報を含んだ終端符号を符号系列の終端に付加
し、 復号方式における終端符号検出手段は、符号系列終端に
終了符号と同じビットパターンの省略を示す情報を含ん
だ終端符号を検出し、終了符号を構成するビット数だけ
の符号系列を算術復号手段が取り込むまで復号終了判定
手段への終端符号検出の通知を遅らせることを特徴とす
る請求項9記載の符号化/復号方式。
12. In the above-mentioned encoding / decoding system, the terminating code adding means in the encoding system comprises a code sequence and a code sequence.
Consists of end code and control code added to the end of
Impact on output termination code detection of the termination code detection means between the termination code
Insert dummy bits with no number and insert dummy bits
When the last part of the code sequence matches the end code
The final part of the code sequence can also be used as an end code to save
Abbreviation, omission of the same bit pattern as the end code in the control code
Is added to the end of the code sequence.
Then, the terminal code detection means in the decoding method uses
Contains information indicating the omission of the same bit pattern as the end code
The end code is detected, and only the number of bits that make up the end code
Judgment of decoding completion until arithmetic decoding means captures code sequence of
Delaying notification of termination code detection to the means.
The encoding / decoding method according to claim 9.
【請求項13】 符号化側と復号側を有する符号化/復
号方式において、 データの構成単位であるデータユニットの長さを符号化
側と復号側で共有するとともに、 符号化側に、入力データを任意のデータユニットの境界
で1つ以上のブロックに分割して符号化する手段と、そ
のブロックに対する算術符号の終端にブロックの終端を
識別できる終端符号を付加する手段とを備え、 復号側に、算術符号を出力データに復号する手段と、終
端符号からブロックの終端を検出することにより復号処
理を終了する手段とを備えたことを特徴とする符号化/
復号方式。
13. An encoding / decoding system having an encoding side and a decoding side.
In No. scheme, coding the length of the data unit is a structural unit of data
Side and the decoding side, and input data to the encoding side
Means for dividing into one or more blocks for encoding, and
End of block at the end of arithmetic code for block
Means for adding an identifiable terminal code; means for decoding the arithmetic code into output data on the decoding side;
The decoding process is performed by detecting the end of the block from the end code.
Means for terminating processing.
Decoding method.
JP05098047A 1993-04-23 1993-04-23 Coding method and decoding method and coding / decoding method Expired - Fee Related JP3119027B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05098047A JP3119027B2 (en) 1993-04-23 1993-04-23 Coding method and decoding method and coding / decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05098047A JP3119027B2 (en) 1993-04-23 1993-04-23 Coding method and decoding method and coding / decoding method

Publications (2)

Publication Number Publication Date
JPH06311046A JPH06311046A (en) 1994-11-04
JP3119027B2 true JP3119027B2 (en) 2000-12-18

Family

ID=14209258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05098047A Expired - Fee Related JP3119027B2 (en) 1993-04-23 1993-04-23 Coding method and decoding method and coding / decoding method

Country Status (1)

Country Link
JP (1) JP3119027B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100316783B1 (en) * 1996-11-09 2002-01-12 윤종용 Arithmetic encoding bit stream dividing method and bit stream generating method using encoding manner
JP5499700B2 (en) * 2009-12-25 2014-05-21 日本電気株式会社 Information compression apparatus, information restoration apparatus, information compression method, information restoration method, and processing program therefor

Also Published As

Publication number Publication date
JPH06311046A (en) 1994-11-04

Similar Documents

Publication Publication Date Title
KR100950607B1 (en) Huffman coding
US4630032A (en) Apparatus for decoding error-correcting codes
US3466601A (en) Automatic synchronization recovery techniques for cyclic codes
US6954555B2 (en) Variable length coding unit and variable length decoding unit
US4896353A (en) Apparatus for fast decoding of a non-linear code
ES2333492T3 (en) CODIFICATION AND ARITHMETIC DECODIFICATION OF AN INFORMATION SIGNAL.
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
KR100556844B1 (en) Method for error detection of moving picture transmission system
JP3274284B2 (en) Encoding device and method
JPS63123232A (en) Method of detecting single bit error and arithmetic decoder employing the same
US3571795A (en) Random and burst error-correcting systems utilizing self-orthogonal convolution codes
EP2975771B1 (en) A method for selecting starting positions in parallel decoding of a compressed image
JP3119027B2 (en) Coding method and decoding method and coding / decoding method
JPH11103257A (en) Arithmetic encoding/decoding device
KR101549740B1 (en) Binary data compression and decompression method and apparatus
JP3673222B2 (en) Variable length encoding method and apparatus, and variable length decoding method and apparatus
KR101141897B1 (en) Encoding/Decoding Method for Data Hiding And Encoder/Decoder using the method
JPH05341955A (en) Data compression and restoration system
JP4393685B2 (en) Huffman code decoding apparatus and method
KR20230021567A (en) Method for encoding and/or decoding data and appratus thereof
US6919830B1 (en) Arithmetic decoding of an arithmetically encoded information signal
JP2833005B2 (en) Frame decomposition circuit and method
JP3231263B2 (en) Code converter, variable-length code decoding device and decoding method
JPH07111597A (en) Runlength detector
JPH0373619A (en) Run length coding circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071013

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081013

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091013

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091013

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees