JP3030028B2 - Variable length decoding apparatus and method - Google Patents

Variable length decoding apparatus and method

Info

Publication number
JP3030028B2
JP3030028B2 JP29452299A JP29452299A JP3030028B2 JP 3030028 B2 JP3030028 B2 JP 3030028B2 JP 29452299 A JP29452299 A JP 29452299A JP 29452299 A JP29452299 A JP 29452299A JP 3030028 B2 JP3030028 B2 JP 3030028B2
Authority
JP
Japan
Prior art keywords
code
decoding
decoded
variable length
section
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 - Lifetime
Application number
JP29452299A
Other languages
Japanese (ja)
Other versions
JP2000101443A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP29452299A priority Critical patent/JP3030028B2/en
Publication of JP2000101443A publication Critical patent/JP2000101443A/en
Application granted granted Critical
Publication of JP3030028B2 publication Critical patent/JP3030028B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime 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 a variable length decoding apparatus and method used for compression encoding / decoding of moving picture signals and the like, and in particular, to a variable length decoding apparatus capable of decoding both forward and backward directions. The present invention relates to a decoding device and method.

【0002】[0002]

【従来の技術】可変長符号は、シンボルの発生頻度に基
づいて、頻繁に出現するシンボルは短い符号長の符号、
希にして出現しないシンボルは長い符号長の符号をそれ
ぞれ割り当てることにより、平均的に短い符号長となる
ようにした符号系である。従って、可変長符号を用いる
と、符号化前のデータと比較して、データ量を大幅に圧
縮することができる。このような可変長符号の構成方法
としては、無記録情報源で最適なハフマンのアルゴリズ
ムが知られている。
2. Description of the Related Art A variable-length code is based on the frequency of occurrence of a symbol.
A symbol system that rarely appears and is assigned a code having a long code length so that the code length is short on average. Therefore, when the variable length code is used, the data amount can be significantly reduced as compared with the data before encoding. As a method of constructing such a variable length code, an Huffman algorithm that is optimal for a non-recording information source is known.

【0003】可変長符号の一般的な問題として、符号化
データの伝送路誤りやその他の理由により符号内に誤り
が混入した場合に、誤りが混入した後のデータはその影
響が伝搬することにより復号化装置で正しく復号するこ
とができなくなってしまうという点が挙げられる。この
問題を避けるため、伝送路において誤りが生じる可能性
がある場合には、ある間隔で同期符号を挿入し、誤りの
伝搬を防止する方法がとられるのが一般的である。同期
符号には、可変長符号の組み合わせでは出現しないよう
なビットパターンが割り当てられる。この方法によれ
ば、符号化データに誤りが生じ、復号できなくなったと
しても、次の同期符号を見つけることにより、誤りの伝
搬を防止し、正しく復号を行なうことができる。
[0003] As a general problem of the variable length code, when an error is mixed in the code due to a transmission line error of the coded data or other reasons, the data after the error is mixed is propagated by the influence. The point is that decoding cannot be correctly performed by the decoding device. In order to avoid this problem, when there is a possibility that an error may occur in the transmission path, a method of inserting a synchronization code at a certain interval to prevent the propagation of the error is generally adopted. A bit pattern that does not appear in a combination of variable length codes is assigned to the synchronization code. According to this method, even if an error occurs in the encoded data and decoding becomes impossible, finding the next synchronization code prevents the propagation of the error and enables correct decoding.

【0004】しかし、同期符号を用いた場合でも、図7
1(a)に示すように誤りが生じて正しく復号できない
箇所から、次の同期符号が見つかる箇所までの間の符号
化データについては、復号を行なうことができない。
However, even when a synchronous code is used, FIG.
As shown in FIG. 1 (a), decoding cannot be performed on encoded data from a point where an error occurs and cannot be decoded correctly to a point where the next synchronization code is found.

【0005】そこで、可変長符号を図72に示す通常の
構成から図73に示すように変更して、図71(b)に
示すように通常の順方向から復号可能な性質だけでな
く、逆方向からも復号可能な符号構成にする方法が知ら
れている。また、このような符号は符号化データを逆方
向からも読めることから、符号化データを蓄積するディ
スクメモリなどの蓄積媒体において逆転再生に用いるこ
ともできる。このような順方向のみならず逆方向からも
復号可能な可変長符号のことを、ここではリバーシブル
符号と呼ぶこととする。
Therefore, the variable length code is changed from the normal configuration shown in FIG. 72 to that shown in FIG. 73, so that not only the characteristic that can be decoded from the normal forward direction as shown in FIG. There is known a method of making a code configuration that can be decoded also from a direction. In addition, since such a code can read encoded data in the reverse direction, it can be used for reverse reproduction in a storage medium such as a disk memory for storing encoded data. Such a variable length code that can be decoded not only in the forward direction but also in the reverse direction is referred to as a reversible code here.

【0006】リバーシブル符号の一例は、例えば特開平
5−300027号公報「可逆可変長符号化方式」に記
載されている。この公知例のリバーシブル符号は、図7
2に示した順方向から復号可能な可変長符号であるハフ
マン符号の符号語の末尾に、図73に示すようにそれぞ
れの符号語がそれより符号長の長い他の符号語の末尾と
一致しない条件でビットを追加することによって、逆方
向からも復号可能とした可変長符号である。しかし、こ
のリバーシブル符号は順方向からのみ復号可能な可変長
符号の符号語の末尾にビットを付加するために、無駄な
ビットが多くなって平均符号長が長くなる。この結果、
順方向からのみ復号可能な可変長符号と比較して符号化
効率が大きく低下してしまう。
An example of a reversible code is described in, for example, Japanese Patent Application Laid-Open No. 5-300027 "Reversible Variable Length Coding". The reversible code of this known example is shown in FIG.
At the end of the code word of the Huffman code which is a variable length code decodable from the forward direction shown in FIG. 2, each code word does not match the end of another code word having a longer code length as shown in FIG. This is a variable-length code that can be decoded in the reverse direction by adding bits according to conditions. However, this reversible code adds bits to the end of a codeword of a variable length code that can be decoded only in the forward direction, so that useless bits increase and the average code length increases. As a result,
The coding efficiency is greatly reduced as compared with a variable length code that can be decoded only from the forward direction.

【0007】また、従来のリバーシブル符号では同期区
間を一定区間を単位に設定すると、逆方向復号ができな
いという問題点があった。例えば、ITU−T H.2
63(1996)では、同期符号を8ビット(=1バイ
ト)毎にアライメントする、すなわち同期符号の挿入可
能位置を1バイト単位の位置に設定することが可能とな
っている。このような同期区間のアライメントを実現す
るために、同期符号の前に図74に示すようなスタッフ
ィング符号を挿入している。このような場合、従来のリ
バーシブル符号では、スタッフィング符号のために逆方
向復号を行なうことができなくなるという問題点があっ
た。
Further, in the case of the conventional reversible code, if the synchronization section is set in units of a fixed section, there is a problem that backward decoding cannot be performed. For example, ITU-TH. 2
63 (1996), the synchronization code can be aligned every 8 bits (= 1 byte), that is, the insertion position of the synchronization code can be set to a position in units of 1 byte. To realize such alignment of the synchronization section, a stuffing code as shown in FIG. 74 is inserted before the synchronization code. In such a case, the conventional reversible code has a problem that the backward decoding cannot be performed due to the stuffing code.

【0008】さらに、単純にリバーシブル符号を復号す
る場合には、通常の順方向のみ復号可能な可変長符号の
復号化装置と比較すると、逆方向に復号する分だけ2倍
の回路規模と演算量を必要とするという問題点があっ
た。
Furthermore, when decoding a reversible code simply, compared with a normal variable length code decoding device that can decode only in the forward direction, the circuit size and the amount of computation are twice as much as in the reverse direction. There was a problem that required.

【0009】従来のリバーシブル符号のもう一つの問題
点として、入力される情報のシンタクスによって逆方向
からの復号ができない場合が存在することが挙げられ
る。例えば図75(a)のシンタクスを持つ情報シンボ
ルの場合、シンボルAによってシンボルBの符号が決定
される。このようなシンタクスを持つ情報シンボルを符
号化した符号化データは、図75(b)のようにAが先
に復号できていなければBを復号できないので、逆方向
からは復号できないことになる。
As another problem of the conventional reversible code, there is a case where decoding in the reverse direction cannot be performed due to the syntax of input information. For example, in the case of an information symbol having the syntax of FIG. 75A, the symbol A determines the code of the symbol B. As shown in FIG. 75 (b), coded data obtained by coding an information symbol having such a syntax cannot be decoded in the reverse direction because B cannot be decoded unless A can be decoded first.

【0010】また、情報シンボル数が大きい場合に適用
される符号化方式として、エスケープ符号を用いた方式
がある。このエスケープ符号を用いた方式は、少数の出
現頻度の高い情報シンボルに対する符号語を符号語テー
ブルとして持ち、大多数の出現頻度の低い情報シンボル
をエスケープ符号と固定長符号の組み合わせで符号化す
る方法である。このエスケープ符号を用いた方式におい
ても、順方向にも逆方向にも復号可能な可変長符号の場
合と同様に、固定長符号の先頭と末尾にエスケープ符号
を付ける方式が提案されている。
As a coding method applied when the number of information symbols is large, there is a method using an escape code. The method using the escape code has a code word table for a small number of information symbols having a high appearance frequency as a code word table, and encodes a large number of the information symbols having a low appearance frequency with a combination of an escape code and a fixed length code. It is. In a system using this escape code, a system in which an escape code is added to the beginning and end of a fixed-length code has been proposed as in the case of a variable-length code that can be decoded in both forward and backward directions.

【0011】従来のエスケープ符号を用いた符号化/復
号化方式では、符号語テーブルに存在する符号語とエス
ケープ符号を用いて符号化する符号語を区別するため
に、何らかの方法で、符号語テーブルに符号語が存在す
るか検索する必要があった。
In a conventional encoding / decoding system using an escape code, in order to distinguish a codeword existing in a codeword table from a codeword to be encoded using an escape code, a codeword table is used in some way. It was necessary to search for the presence of a codeword in.

【0012】[0012]

【発明が解決しようとする課題】本発明は、少ない計算
量と記憶量で効率的に符号化/復号化することができる
順方向にも逆方向にも復号可能な可変長符号化/復号化
装置を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention is directed to a variable-length encoding / decoding that can be efficiently encoded / decoded with a small amount of calculation and storage and that can be decoded in both forward and reverse directions. It is intended to provide a device.

【0013】つまり、上述したように、従来技術による
リバーシブル符号、すなわち順方向からも逆方向からも
復号可能な可変長符号は、順方向からのみ復号可能な可
変長符号の符号語の末尾にビットを付加することによっ
てリバーシブル符号を構成するため、無駄なビットパタ
ーンが多くなって平均符号長が長くなり、順方向からの
み復号可能な可変長符号と比較して符号化効率の低下が
著しくなるという問題があり、また、スタッフィング符
号を用いて同期区間を一定区間を単位に設定すると、ス
タッフィング符号のためにリバーシブル符号の逆方向復
号ができなくなるという問題があり、さらに、単純にリ
バーシブル符号を復号する場合には、通常の順方向のみ
復号可能な可変長符号の復号化装置と比較すると、逆方
向に復号する分だけ2倍の回路規模と演算量を必要と
し、また入力される情報シンボルのシンタクスによって
は逆方向からの復号が不可能である場合が存在するとい
う問題点があった。
That is, as described above, a reversible code according to the prior art, that is, a variable-length code that can be decoded in both the forward and reverse directions, has a bit at the end of the code word of the variable-length code that can be decoded only in the forward direction. Is added to form a reversible code, the useless bit pattern increases, the average code length increases, and the coding efficiency is significantly reduced compared to a variable length code that can be decoded only in the forward direction. There is a problem that if the synchronization interval is set in units of fixed intervals using the stuffing code, there is a problem that the reverse decoding of the reversible code cannot be performed due to the stuffing code, and further, the reversible code is simply decoded. In this case, when compared with a normal variable-length code decoding device that can decode only in the forward direction, Require the circuit scale and calculation amount doubled, and in some syntax information symbols input there is a problem that there are cases it is impossible to decode from the opposite direction.

【0014】本発明は、無駄なビットパターンを減らし
て符号化効率を高め、しかもスタッフィング符号を用い
て同期区間を一定区間を単位として設定する場合でも、
順方向にも逆方向にも復号可能な可変長符号化/復号化
装置を提供することを目的とする。
The present invention improves coding efficiency by reducing useless bit patterns, and even when a synchronization section is set in units of a fixed section using a stuffing code.
It is an object of the present invention to provide a variable length encoding / decoding device capable of decoding in both forward and reverse directions.

【0015】また、本発明は無駄なビットパターンを減
らして符号化効率を高めると共に、逐次的に復号処理を
行なうことで回路規模と演算量を削減して効率的に復号
できる、順方向にも逆方向にも復号可能な可変長符号化
/復号化装置を提供することを目的とする。
Further, the present invention increases the coding efficiency by reducing useless bit patterns, and reduces the circuit scale and the amount of calculation by performing decoding sequentially, thereby enabling efficient decoding. It is an object of the present invention to provide a variable length encoding / decoding device capable of decoding in the reverse direction.

【0016】さらに、本発明は入力される情報シンボル
のシンタクスによらず順方向にも逆方向にも復号可能で
あって、より誤りに強い可変長符号化/復号化装置を提
供することを目的とする。
A further object of the present invention is to provide a variable-length encoding / decoding apparatus which can decode in both the forward and reverse directions regardless of the syntax of an input information symbol and is more resistant to errors. And

【0017】[0017]

【課題を解決するための手段】上記目的を達成するため
に、本発明の第1の基本構成に係る可変長復号化装置
は、順方向にも逆方向にも復号可能な符号語を含む符号
語で構成された可変長符号からなり、所定の同期区間毎
に逆方向に復号可能なスタッフィング符号が挿入された
符号化データを復号するものにおいて、前記符号化デー
タの同期区間を検出する同期区間検出手段と、前記同期
区間検出手段により検出された同期区間の符号化データ
を順方向から復号する順方向復号化手段と、前記同期区
間検出手段により検出された同期区間の符号化データを
逆方向から復号する逆方向復号化手段と、を有すること
を特徴とするしている。
In order to achieve the above object, a variable length decoding apparatus according to a first basic structure of the present invention comprises a code including a code word which can be decoded in both forward and backward directions. A synchronous section for detecting a synchronous section of the encoded data, wherein the synchronous section detects a synchronous section of the encoded data, the decoded data being composed of a variable length code composed of words and having a stuffing code that can be decoded in the backward direction inserted for each predetermined synchronous section Detecting means, forward decoding means for decoding the encoded data of the synchronous section detected by the synchronous section detecting means from the forward direction, and transmitting the encoded data of the synchronous section detected by the synchronous section detecting means in the backward direction. And reverse decoding means for decoding from

【0018】また、本発明の第2の基本構成に係る可変
長復号化装置は、順方向にも逆方向にも復号可能な符号
語を含む符号語で構成された可変長符号からなり、所定
の同期区間毎に逆方向に復号可能なスタッフィング符号
が挿入された符号化データを復号するものにおいて、前
記符号化データの同期区間を検出する同期区間検出手段
と、前記同期区間検出手段により検出された同期区間の
符号化データを復号する順方向および逆方向の両方向の
復号が可能な双方向復号化手段と、を有することを特徴
としている。
A variable length decoding apparatus according to a second basic configuration of the present invention comprises a variable length code composed of a code word including a code word that can be decoded in both forward and reverse directions. Decoding the encoded data in which the stuffing code that can be decoded in the reverse direction is inserted for each synchronous section, wherein the synchronous section detecting means for detecting the synchronous section of the encoded data and the synchronous section detecting means And bidirectional decoding means capable of decoding in both forward and backward directions for decoding the encoded data in the synchronized section.

【0019】また、上記第1または第2の基本構成に係
る可変長復号化装置において、前記順方向にも逆方向に
も復号可能であって、符号語の予め定められた重みによ
って符号語の区切りが分かるように構成された符号語
は、順方向にも逆方向にも復号可能な第1の符号語の先
頭および末尾の少なくとも一方に、順方向にも逆方向に
も復号可能な第2の符号語を付加する構成としても良
い。
Further, in the variable length decoding device according to the first or second basic configuration, decoding is possible in the forward direction and the backward direction, and the decoding of the code word is performed by a predetermined weight of the code word. A codeword configured to allow the delimiter to be recognized is provided at least at one of the beginning and end of the first codeword that can be decoded in both the forward and reverse directions, and a second codeword that can be decoded in both the forward and reverse directions. May be added.

【0020】また、上記第1または第2の基本構成に係
る可変長復号化装置において、前記順方向にも逆方向に
も復号可能であって、符号語の予め定められた重みによ
って符号語の区切りが分かるように構成された符号語
は、順方向にも逆方向にも復号可能な第1の符号語の各
ビットの直前および直後の少なくとも一方に、順方向に
も逆方向にも復号可能な第2の符号語を付加する構成と
しても良い。
Further, in the variable length decoding device according to the first or second basic configuration, decoding is possible in the forward direction and the backward direction, and the decoding of the code word is performed by a predetermined weight of the code word. Codewords configured to show breaks can be decoded in both forward and reverse directions, at least immediately before and after each bit of the first codeword, which can be decoded in both forward and reverse directions It may be configured to add a second codeword.

【0021】また、上記第1または第2の基本構成に係
る可変長復号化装置において、前記所定の同期区間は、
同期符号の挿入可能位置が一定区間単位の整数倍の長さ
に設定される第1の詳細構成としても良い。
Further, in the variable length decoding device according to the first or second basic configuration, the predetermined synchronization section is:
A first detailed configuration in which the position where the synchronization code can be inserted is set to an integral multiple of a fixed section unit may be used.

【0022】上記第1の詳細構成に係る可変長復号化装
置において、前記一定区間単位はMビットであって、前
記挿入されるスタッフィング符号は1ビット長からMビ
ット長までの何れかの長さの符号である第2の詳細構成
としても良い。
In the variable length decoding device according to the first detailed configuration, the fixed section unit is M bits, and the stuffing code to be inserted has any length from 1 bit length to M bit length. May be used as the second detailed configuration.

【0023】上記第2の詳細構成に係る可変長復号化装
置において、前記挿入されるスタッフィング符号は、
「0」のみ、または「0」に続いて「1」が1から(M
−1)までの個数だけ連続してなる符号であって、総ビ
ット長がMビット以下である構成としても良い。
In the variable length decoding device according to the second detailed configuration, the stuffing code to be inserted is:
Only “0” or “0” followed by “1” from 1 to (M
It is also possible to adopt a configuration in which the codes are consecutive as many as -1) and the total bit length is M bits or less.

【0024】また、上記第1または第2の基本構成に係
る可変長復号化装置において、前記挿入されるスタッフ
ィング符号は、逆方向から復号して「0」が出現したら
区切りとなるような符号により構成しても良い。
In the variable length decoding device according to the first or second basic configuration, the stuffing code to be inserted is a code that serves as a delimiter when "0" appears after decoding in the reverse direction. You may comprise.

【0025】また、上記第1または第2の基本構成に係
る可変長復号化装置において、前記スタッフィング符号
は、符号化データの末尾に挿入される構成としても良
い。
In the variable length decoding device according to the first or second basic configuration, the stuffing code may be inserted at the end of the encoded data.

【0026】また、上記第1または第2の基本構成に係
る可変長復号化装置において、前記スタッフィング符号
は、逆方向のみならず、順方向にも復号可能な符号によ
り構成しても良い。
In the variable length decoding device according to the first or second basic configuration, the stuffing code may be constituted by a code which can be decoded not only in the backward direction but also in the forward direction.

【0027】また、本発明の第3の基本構成に係る可変
長復号化方法は、順方向にも逆方向にも復号可能な符号
語を含む符号語で構成された可変長符号からなり、所定
の同期区間毎に逆方向に復号可能なスタッフィング符号
が挿入された符号化データを復号するものにおいて、前
記符号化データの同期区間を検出する同期区間検出ステ
ップと、前記同期区間検出ステップにより検出された同
期区間の符号化データを順方向から復号する順方向復号
化ステップと、前記同期区間検出ステップにより検出さ
れた同期区間の符号化データを逆方向から復号する逆方
向復号化ステップと、を有することを特徴としている。
The variable length decoding method according to the third basic structure of the present invention comprises a variable length code composed of a code word including a code word that can be decoded in both forward and reverse directions. Decoding a coded data in which a stuffing code that can be decoded in the reverse direction is inserted for each synchronous section, wherein the synchronous section detecting step detects a synchronous section of the encoded data; A forward decoding step of decoding the encoded data of the synchronized section from the forward direction, and a backward decoding step of decoding the encoded data of the synchronized section detected by the synchronous section detecting step from the backward direction. It is characterized by:

【0028】また、本発明の第4の基本構成に係る可変
長復号化装置は、順方向にも逆方向にも復号可能な符号
語を含む符号語で構成された可変長符号からなり、所定
の同期区間毎に逆方向に復号可能なスタッフィング符号
が挿入された符号化データを復号するものにおいて、前
記符号化データの同期区間を検出する同期区間検出ステ
ップと、前記同期区間検出ステップにより検出された同
期区間の符号化データを復号する順方向および逆方向の
両方向の復号が可能な双方向復号化ステップとを有する
ことを特徴としている。
A variable length decoding apparatus according to a fourth basic configuration of the present invention comprises a variable length code composed of code words including code words that can be decoded in both forward and reverse directions. Decoding a coded data in which a stuffing code that can be decoded in the reverse direction is inserted for each synchronous section, wherein the synchronous section detecting step detects a synchronous section of the encoded data; And a bidirectional decoding step capable of decoding in both forward and reverse directions for decoding the encoded data in the synchronized section.

【0029】また、前記第3または第4の基本構成に係
る可変長復号化方法において、前記順方向にも逆方向に
も復号可能であって、符号語の予め定められた重みによ
って符号語の区切りが分かるように構成された符号語
は、順方向にも逆方向にも復号可能な第1の符号語の先
頭および末尾の少なくとも一方に、順方向にも逆方向に
も復号可能な第2の符号語を付加して構成されることを
特徴とする。
Further, in the variable length decoding method according to the third or fourth basic configuration, decoding is possible in the forward and reverse directions, and the decoding of the codeword is performed by a predetermined weight of the codeword. The codeword configured to be able to recognize the delimiter is provided at least at one of the beginning and end of the first codeword that can be decoded in both the forward and reverse directions, and the second codeword that can be decoded in both the forward and reverse directions Is added.

【0030】また、前記第3または第4の基本構成に係
る可変長復号化方法において、前記順方向にも逆方向に
も復号可能であって、符号語の予め定められた重みによ
って符号語の区切りが分かるように構成された符号語
は、順方向にも逆方向にも復号可能な第1の符号語の各
ビットの直前および直後の少なくとも一方に、順方向に
も逆方向にも復号可能な第2の符号語を付加して構成し
ても良い。
Further, in the variable length decoding method according to the third or fourth basic configuration, decoding is possible in both the forward direction and the reverse direction, and the decoding of the code word is performed by a predetermined weight of the code word. Codewords configured to show breaks can be decoded in both forward and reverse directions, at least immediately before and after each bit of the first codeword, which can be decoded in both forward and reverse directions A second codeword may be added.

【0031】また、前記第3または第4の基本構成に係
る可変長復号化方法において、前記所定の同期区間は、
同期符号の挿入可能位置が一定区間単位の整数倍の長さ
に設定される第3の詳細構成としても良い。
Further, in the variable length decoding method according to the third or fourth basic configuration, the predetermined synchronization section is:
A third detailed configuration in which the position where the synchronization code can be inserted is set to an integral multiple of a fixed section unit may be used.

【0032】上記第3の詳細構成に係る可変長復号化方
法において、前記一定区間単位はMビットであって、前
記挿入されるスタッフィング符号は1ビット長からMビ
ット長までの何れかの長さの符号である第4の詳細構成
としても良い。
In the variable length decoding method according to the third detailed configuration, the fixed interval unit is M bits, and the stuffing code to be inserted has any length from 1 bit length to M bit length. The fourth detailed configuration, which is the reference numeral, may be used.

【0033】上記第4の詳細構成に係る可変長復号化方
法において、前記挿入されるスタッフィング符号は、
「0」のみ、または「0」に続いて「1」が1から(M
−1)までの個数だけ連続してなる符号であって、総ビ
ット長がMビット以下であることを特徴とする。
In the variable length decoding method according to the fourth detailed configuration, the stuffing code to be inserted is:
Only “0” or “0” followed by “1” from 1 to (M
It is a code that is continuous by the number up to -1) and has a total bit length of M bits or less.

【0034】また、前記第3または第4の基本構成に係
る可変長復号化方法において、前記挿入されるスタッフ
ィング符号は、逆方向から復号して「0」が出現したら
区切りとなるような符号により構成されていることを特
徴とする。
In the variable length decoding method according to the third or fourth basic structure, the stuffing code to be inserted is a code which becomes a delimiter when "0" appears after decoding in the reverse direction. It is characterized by comprising.

【0035】また、前記第3または第4の基本構成の何
れかに係る可変長復号化方法において、前記スタッフィ
ング符号は、符号化データの末尾に挿入されることを特
徴とする。
Further, in the variable length decoding method according to any one of the third and fourth basic configurations, the stuffing code is inserted at the end of encoded data.

【0036】また、前記第3または第4の基本構成の何
れかに係る可変長復号化方法において、前記スタッフィ
ング符号は、逆方向のみならず、順方向にも復号可能な
符号により構成されることを特徴とする。
In the variable length decoding method according to any one of the third and fourth basic constitutions, the stuffing code is constituted by a code which can be decoded not only in the backward direction but also in the forward direction. It is characterized by.

【0037】[0037]

【発明の実施の形態】以下、図面を参照して本発明の実
施形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0038】(第1実施形態)図1は、本発明の第1実
施形態の可変長符号化/復号化装置の構成を示すブロッ
ク図である。
(First Embodiment) FIG. 1 is a block diagram showing a configuration of a variable length encoding / decoding device according to a first embodiment of the present invention.

【0039】第1実施形態の可変長符号化/復号化装置
は、大きく分けて符号語テーブル作成部101、符号化
部113、伝送系または蓄積系105および復号化部1
14からなる。まず、これら各部の機能について簡単に
説明すると、符号語テーブル作成部101は情報シンボ
ルの生起確率に基づいて符号語テーブルを作成し、符号
化部113内の符号語テーブル102と、復号化部11
4内の順方向符号語テーブル111および逆方向符号語
テーブル112に符号語を送る。符号化部113は、情
報シンボルを可変長符号に符号化し、その可変長符号を
符号化データとして伝送系または蓄積系105へ出力す
る。復号化部114は、伝送系または蓄積系105を介
して入力されてきた符号化データを復号して元の情報シ
ンボルを再生する。
The variable length encoding / decoding device according to the first embodiment is roughly divided into a code word table creating unit 101, an encoding unit 113, a transmission or accumulation system 105, and a decoding unit 1.
Consists of fourteen. First, the function of each of these units will be briefly described. The codeword table creation unit 101 creates a codeword table based on the occurrence probabilities of information symbols, and the codeword table 102 in the encoding unit 113 and the decoding unit 11
4 is sent to the forward codeword table 111 and the backward codeword table 112. Encoding section 113 encodes the information symbol into a variable-length code, and outputs the variable-length code to transmission system or storage system 105 as encoded data. The decoding unit 114 decodes the coded data input via the transmission system or the storage system 105 to reproduce the original information symbols.

【0040】次に、この第1実施形態の各部の詳細な構
成と動作を説明する。
Next, the detailed configuration and operation of each part of the first embodiment will be described.

【0041】符号化部113において、入力された情報
シンボルは符号化器103に入力される。符号化部11
3は、符号語テーブル102と符号化器103および同
期区間設定部104により構成される。符号語テーブル
102は、符号語テーブル作成部101によって予め作
成された情報シンボルと可変長符号の符号語とを対応さ
せて格納している。符号化器103は、符号語テーブル
102に格納されている符号語の中から、入力された情
報シンボルに対応した符号語を選択して出力する。同期
区間設定部104では、符号化器103が選択した符号
語を同期区間毎にまとめ、さらに順方向にも逆方向にも
復号可能なスタッフィング符号を挿入して、同期区間毎
に符号化データを出力する。この符号化データは、伝送
系または蓄積系105を通して復号化部114に送られ
る。
[0041] In the coding section 113, the input information symbols are input to the encoder 103. Encoding unit 11
3 includes a codeword table 102, an encoder 103, and a synchronization section setting unit 104. The codeword table 102 stores information symbols created in advance by the codeword table creation unit 101 and codewords of variable-length codes in association with each other. The encoder 103 selects and outputs a codeword corresponding to the input information symbol from the codewords stored in the codeword table 102. In the synchronization section setting unit 104, the codewords selected by the encoder 103 are grouped for each synchronization section, and a stuffing code that can be decoded in both the forward and reverse directions is inserted. Output. The encoded data is sent to the decoding unit 114 through the transmission system or the storage system 105.

【0042】前記復号化部114は、同期区間検出部1
06、バッファ107、順方向復号化器108、逆方向
復号化器109、復号値判定部110、順方向復号化テ
ーブル111および逆方向復号化テーブル112により
構成される。復号化部114では、伝送系または蓄積系
105より入力された符号化データから同期区間検出部
106で符号化データの同期区間を検出し、符号化デー
タをバッファ107に蓄積する。順方向復号化器108
では、バッファ107に蓄積された符号化データの先頭
から復号を開始する。逆方向復号化器109では、バッ
ファ107に蓄積された符号化データの末尾から復号を
開始する。
The decoding section 114 includes a synchronization section detection section 1
06, a buffer 107, a forward decoder 108, a backward decoder 109, a decoded value determination unit 110, a forward decoding table 111, and a backward decoding table 112. In the decoding section 114, the synchronization section of the coded data is detected by the synchronization section detection section 106 from the coded data input from the transmission system or the storage system 105, and the coded data is stored in the buffer 107. Forward decoder 108
Then, the decoding is started from the head of the encoded data stored in the buffer 107. The backward decoder 109 starts decoding from the end of the encoded data stored in the buffer 107.

【0043】順方向復号化器108では、符号化データ
に順方向符号語テーブル111に存在しないビットパタ
ーンが出現した場合、およびバッファ107のビット数
と異なるビット数の符号化データが復号された場合、誤
り検出と判定する。同様に逆方向復号化器109でも、
符号化データに逆方向符号語テーブル112に存在しな
いビットパターンが出現した場合、およびバッファ10
7のビット数と異なるビット数の符号化データが復号さ
れた場合、誤り検出と判定する。
In the forward decoder 108, when a bit pattern that does not exist in the forward codeword table 111 appears in the encoded data, and when the encoded data having a bit number different from the bit number of the buffer 107 is decoded. Is determined as error detection. Similarly, in the reverse decoder 109,
When a bit pattern that does not exist in the backward codeword table 112 appears in the encoded data,
If encoded data having a bit number different from 7 is decoded, it is determined that an error has been detected.

【0044】復号値判定部110は、順方向復号化器1
08によって得られた復号結果(順方向復号結果とい
う)と、逆方向復号化器109によって得られた復号結
果(逆方向復号器という)から復号値を判定し、最終的
な復号結果を出力する。図2は符号語テーブル作成部1
01の構成を示すブロック図である。符号選択部21は
情報シンボルの生起確率の情報が入力され、選択可能な
符号系の中から最も平均符号長の小さいものを選択し
て、選択結果を符号語構成部22に送る。符号語構成部
22では、符号語選択部21で選択された符号の符号語
を構成する。
The decoded value judging section 110 is a
08 and a decoding result (referred to as a backward decoder) obtained by the backward decoder 109 and a decoding value are determined, and a final decoding result is output. . FIG. 2 shows a codeword table creation unit 1
FIG. 2 is a block diagram showing a configuration of the first embodiment. The code selection unit 21 receives information on the occurrence probabilities of the information symbols, selects the code system with the smallest average code length from the selectable code systems, and sends the selection result to the codeword configuration unit 22. The codeword configuration unit 22 configures a codeword of the code selected by the codeword selection unit 21.

【0045】符号語構成部22で構成される符号語は、
符号語の予め定められた重みにより符号の区切りが分か
るように構成された順方向にも逆方向にも復号可能な可
変長符号(以下、リバーシブル符号という)であり、例
えば特願平7−89772、特願平7−260383に
記載された符号である。
The code word formed by the code word forming unit 22 is:
It is a variable-length code (hereinafter, referred to as a reversible code) that can be decoded in both the forward direction and the reverse direction and that is configured so that the delimitation of the code can be recognized by a predetermined weight of the code word. For example, Japanese Patent Application No. 7-89772. And Japanese Patent Application No. 7-260383.

【0046】この第1実施形態においては、より幅広い
確率分布に対応し、符号語のビットパターンの自由度を
上げるために、符号語構成部22における符号語の構成
方法として以下に示す方法を用いている。
In the first embodiment, in order to cope with a wider probability distribution and increase the degree of freedom of the bit pattern of the code word, the following method is used as a code word configuration method in the code word configuration section 22. ing.

【0047】図3は、符号語構成部22におけるリバー
シブル符号の符号語の第1の構成方法を示している。ま
ず、図3の左側に示すように、符号長が短い順にそれぞ
れの系列の重み(この場合、“1”の数)が一定で異な
る重みを持つ2つの2進系列(この場合、重みは0個と
1個)を作成する。次に、図3の中央に示すように、こ
の2進系列のそれぞれ先頭と末尾に“1”を追加して2
進系列のビットを反転させた後、これら2つの2進系列
を図3の右側に示すように合成する。
FIG. 3 shows a first method of forming a codeword of a reversible code in the codeword forming unit 22. First, as shown on the left side of FIG. 3, two binary sequences (in this case, weights of 0) in which the weight of each sequence (in this case, the number of “1”) is constant and different weights are arranged in ascending order of code length. And one). Next, as shown in the center of FIG. 3, "1" is added to the beginning and end of each
After inverting the bits of the binary sequence, these two binary sequences are combined as shown on the right side of FIG.

【0048】この可変長符号では、各符号の最初にある
シンボルの個数をカウントすることによって符号長が分
かる。図3の例では、最初が“0”ならば、“0”が全
部で3つ出現したら符号の区切り(符号長)が分かり、
最初が“1”ならば、“1”が全部で2つ出現したら符
号の区切りが分かる符号構成となっている。また、この
図3に示す可変長符号は、全ての情報シンボルA〜Jに
対応する符号語が図4(a)に示す順方向の符号木の葉
にも、図4(b)の逆方向の符号木の葉にも割り当てら
れることから、順方向にも逆方向にも復号可能であるこ
とが分かる。
In this variable length code, the code length can be determined by counting the number of symbols at the beginning of each code. In the example of FIG. 3, if the first is “0”, if a total of three “0” appear, the code delimiter (code length) is known,
If the first is "1", the code configuration is such that if two "1s" appear in all, the break of the code can be recognized. Also, the variable-length code shown in FIG. 3 is such that the codewords corresponding to all the information symbols A to J also appear on the leaves of the forward code tree shown in FIG. Since it is also assigned to the leaves of the tree, it can be seen that decoding can be performed in both the forward and reverse directions.

【0049】図5は、符号語構成部22におけるリバー
シブル符号の符号語の第2の構成方法を示している。ま
ず、図5の左側に示すように、第1のリバーシブル符号
と第2のリバーシブル符号を用意する。次に、図5の中
央に示すように、第1のリバーシブル符号の全ての符号
語の末尾に、第2のリバーシブル符号の最初の1つの符
号語を追加する。以下、同様に第1のリバーシブル符号
の全ての符号語の末尾に、第2のリバーシブル符号の全
ての符号語を1つずつ追加した後、図5の右側に示すよ
うに並べ替えを行なって、新たなリバーシブル符号を構
成する。このような構成方法によって、第1のリバーシ
ブル符号の符号語数A(この例ではA=9)と第2のリ
バーシブル符号の符号語数B(この例ではB=3)を乗
算した数A×B個(この例では27個)の新たなリバー
シブル符号を構成することができる。
FIG. 5 shows a second method of forming a codeword of a reversible code in the codeword forming unit 22. First, as shown on the left side of FIG. 5, a first reversible code and a second reversible code are prepared. Next, as shown in the center of FIG. 5, the first one codeword of the second reversible code is added to the end of all codewords of the first reversible code. Hereinafter, similarly, after adding all the code words of the second reversible code one by one to the end of all the code words of the first reversible code, rearrangement is performed as shown on the right side of FIG. Construct a new reversible code. According to such a configuration method, the number A × B obtained by multiplying the number A of codewords of the first reversible code (A = 9 in this example) and the number B of codewords of the second reversible code (B = 3 in this example) (27 in this example) new reversible codes can be configured.

【0050】この構成方法によるリバーシブル符号の復
号に当たっては、順方向から復号する時は、まず第1の
リバーシブル符号を復号し、次に第2のリバーシブル符
号を復号するようにする。逆方向から復号する時は、ま
ず第2のリバーシブル符号を復号し、次に第1のリバー
シブル符号を復号する。従って、順方向にも逆方向にも
復号可能であることが分かる。
In decoding a reversible code according to this configuration method, when decoding in the forward direction, the first reversible code is decoded first, and then the second reversible code is decoded. When decoding from the reverse direction, first, the second reversible code is decoded, and then the first reversible code is decoded. Therefore, it can be seen that decoding can be performed in both the forward direction and the reverse direction.

【0051】なお、この例では第1のリバーシブル符号
の符号語の末尾に第2のリバーシブル符号を追加した
が、第1のリバーシブル符号の先頭に第2のリバーシブ
ル符号を追加してもよく、また第1のリバーシブル符号
の末尾と先頭の両方に固定長符号を追加しても構わな
い。また、この例では第1のリバーシブル符号と第2の
リバーシブル符号は異なるものを用いたが、同一のもの
を使用しても構わない。さらに、本実施形態では第1の
リバーシブル符号も第2のリバーシブル符号も可変長符
号を用いたが、どちらかを固定長符号に変更しても構わ
ない。
In this example, the second reversible code is added to the end of the code word of the first reversible code. However, the second reversible code may be added to the head of the first reversible code. A fixed-length code may be added to both the end and the head of the first reversible code. Also, in this example, the first reversible code and the second reversible code are different, but the same code may be used. Further, in the present embodiment, both the first reversible code and the second reversible code use a variable length code, but either one may be changed to a fixed length code.

【0052】図6は、符号語構成部21におけるリバー
シブル符号の第3の符号構成方法を示している。まず、
図6の左側に示すように、可変長のリバーシブル符号と
固定長のリバーシブル符号を用意する。次に、図6の右
側に示すように、リバーシブル符号の符号語の各ビット
の直後に固定長のリバーシブル符号を追加する。この構
成方法により、Kビットの固定長のリバーシブル符号を
用いた場合、Hビットの符号語を(K+1)Hビットに
して符号語数を2KH倍にすることができる。なお、こ
の例ではリバーシブル符号の符号語の各ビット毎の直後
に固定長符号を追加したが、各ビットの直前に固定長符
号を追加してもよく、また直前と直後の両方に固定長符
号を追加しても構わない。
FIG. 6 shows a third code construction method of the reversible code in the code word construction section 21. First,
As shown on the left side of FIG. 6, a variable-length reversible code and a fixed-length reversible code are prepared. Next, as shown on the right side of FIG. 6, a fixed-length reversible code is added immediately after each bit of the code word of the reversible code. According to this configuration method, when a K-bit fixed-length reversible code is used, the number of codewords can be increased to 2KH times by changing the H-bit codeword to (K + 1) H bits. In this example, the fixed-length code is added immediately after each bit of the code word of the reversible code. However, the fixed-length code may be added immediately before each bit, or the fixed-length code may be added immediately before and after each bit. May be added.

【0053】次に、図7を用いて同期区間設定部104
における符号化データの同期区間の設定方法の具体例に
ついて説明する。図7(a)は、同期符号を挿入するこ
とにより同期区間を設定する方法を示している。この場
合、同期区間検出部106では符号化データの最初と最
後の同期符号を検出することにより、同期区間を検出す
ることができる。ここで、同期符号の挿入可能位置をあ
る一定区間単位(この場合は、Mビット単位)に設定す
るようにするため、符号化データの末尾に1〜Mビット
のスタッフィング符号を挿入している。
Next, referring to FIG.
A specific example of the method of setting the synchronization section of the encoded data in will be described. FIG. 7A shows a method of setting a synchronization section by inserting a synchronization code. In this case, the synchronization section detection unit 106 can detect the synchronization section by detecting the first and last synchronization codes of the encoded data. Here, in order to set the position where the synchronization code can be inserted in a certain section (in this case, in units of M bits), a stuffing code of 1 to M bits is inserted at the end of the encoded data.

【0054】図7(b)は、符号化データの先頭に同期
区間の符号量を記述する方法、言い換えれば同期区間の
終了位置を示すポインタを挿入する方法を示している。
この場合、同期区間検出部106では、まず符号化デー
タの先頭の同期区間の符号量の記述を復号することで、
同期区間を検出することができる。そして、符号量の記
述の単位はMビット単位となっているため、符号化デー
タの末尾に1〜Mビットのスタッフィング符号を挿入す
る。
FIG. 7B shows a method of describing the code amount of the synchronous section at the head of the encoded data, in other words, a method of inserting a pointer indicating the end position of the synchronous section.
In this case, the synchronous section detection unit 106 first decodes the description of the code amount of the first synchronous section of the encoded data,
Synchronous sections can be detected. Since the unit of description of the code amount is an M-bit unit, a stuffing code of 1 to M bits is inserted at the end of the encoded data.

【0055】ここで、図7(a)(b)で用いられるス
タッフィング符号は、少なくとも逆方向に復号可能な構
成となっていることが特徴である。図8は、このような
スタッフィング符号の具体例を示した図であり、このス
タッフィング符号は順方向にも逆方向にも復号可能に構
成されている。このスタッフィング符号の場合、1ビッ
トの時は“1”が出現すればそれが区切りで、それ以外
では“0”が2度出現すると区切りが分かるような、順
方向にも逆方向にも復号可能な可変長符号となってい
て、同期区間の最後からも逆方向に復号可能となってい
ると同時に、符号化データのビット数を計算することが
可能になっている。符号化データのビット数の計算結果
は、後述する誤り検出に用いられる。
Here, the stuffing codes used in FIGS. 7A and 7B are characterized in that they are configured to be decoded at least in the reverse direction. FIG. 8 is a diagram showing a specific example of such a stuffing code. The stuffing code is configured to be decodable in both forward and reverse directions. In the case of this stuffing code, in the case of 1 bit, if "1" appears, it is a delimiter; otherwise, if "0" appears twice, the delimiter can be recognized. It is a variable length code that can be decoded in the reverse direction even from the end of the synchronization section, and at the same time, the number of bits of the encoded data can be calculated. The calculation result of the number of bits of the encoded data is used for error detection described later.

【0056】なお、この例ではスタッフィング符号を符
号化データの末尾に挿入したが、符号化データの先頭で
も符号化データの内部でもよく、同期区間の内部で文法
上問題ない位置ならば、その挿入位置はどこでもよい。
また、スタッフィング符号は図9に示すような逆方向に
のみ復号可能な符号でもよい。この符号の場合は、逆方
向から復号して“0”が出現したら区切りになるような
符号となっている。
In this example, the stuffing code is inserted at the end of the coded data. However, the stuffing code may be inserted at the beginning of the coded data or inside the coded data. The position can be anywhere.
Further, the stuffing code may be a code that can be decoded only in the reverse direction as shown in FIG. In the case of this code, the code is such that it becomes a delimiter when "0" appears after decoding in the reverse direction.

【0057】次に、図10を用いて復号値判定部110
における復号値の判定方法について説明する。図10
(a)に示すように、順方向復号結果と逆方向復号結果
で誤りが検出される復号語の位置(誤り検出位置)が交
差しない場合は、誤りが検出されなかった復号結果のみ
を復号値として使用し、2つの誤り検出位置の復号結果
は復号値として使用せず放棄する。また、図10(b)
に示すように、順方向復号結果と逆方向復号結果の誤り
検出位置が交差する場合は、順方向復号結果の誤り検出
位置までの復号値は順方向復号結果を使用し、それ以降
の部分は逆方向復号結果を復号値として使用する。
Next, referring to FIG.
The method of determining the decoded value in will be described. FIG.
As shown in (a), when the position of a decoded word at which an error is detected in the forward decoding result and the backward decoding result (error detection position) does not intersect, only the decoding result in which no error is detected is decoded. And the results of decoding at the two error detection positions are discarded without being used as decoded values. FIG. 10 (b)
As shown in, when the error detection positions of the forward decoding result and the reverse decoding result intersect, the decoded values up to the error detection position of the forward decoding result use the forward decoding result, and the subsequent parts are used. The reverse decoding result is used as a decoding value.

【0058】なお、逆方向復号結果を優先して、逆方向
復号結果の誤り検出位置までの復号値としては逆方向復
号結果を使用し、それ以前の部分は順方向復号結果を復
号値として使用してもよい。
The backward decoding result is prioritized, and the backward decoding result is used as the decoded value up to the error detection position of the backward decoding result, and the forward decoding result is used as the decoded value for the portion before that. May be.

【0059】また、図10(c)に示すように、順方向
復号結果および逆方向復号結果のうち片方向の復号結果
にしか誤りが検出されない場合(この例では、順方向復
号結果のみ誤りが検出されている)は、誤り検出位置ま
での復号値は、順方向復号結果を使用し、それ以降の部
分は逆方向復号結果を復号値として使用する。さらに図
10(d)に示すように、同一の符号語について順方向
復号結果および逆方向復号結果の両方に誤りが検出され
る場合は、誤り検出位置の符号語に対する復号値を放棄
し、それ以後の符号語に対する復号値として、逆方向復
号結果を使用する。なお、順方向復号化器108および
逆方向復号化器109での誤り判定に際しては、符号語
として存在しないビットパターンが生じた場合、検出位
置はその場所とし、前記の判定方法で誤りが検出されな
い場合で、復号したビット数が同期区間内の符号化デー
タのビット数と一致しない場合は、復号化の最初の位置
を誤り検出位置とする。
Further, as shown in FIG. 10C, when an error is detected only in a one-way decoding result among the forward decoding result and the backward decoding result (in this example, only the forward decoding result has an error. Is detected), the decoded value up to the error detection position uses the forward decoded result, and the subsequent portion uses the backward decoded result as the decoded value. Further, as shown in FIG. 10D, when an error is detected in both the forward decoding result and the backward decoding result for the same codeword, the decoded value for the codeword at the error detection position is discarded, and The backward decoding result is used as a decoded value for the subsequent codeword. Note that, when an error is determined by the forward decoder 108 and the backward decoder 109, if a bit pattern that does not exist as a codeword occurs, the detection position is set to that position, and no error is detected by the above-described determination method. In this case, if the number of decoded bits does not match the number of bits of the encoded data in the synchronization section, the first position of decoding is set as the error detection position.

【0060】この第1実施形態では、4つの誤り検出位
置のパターンによる復号値判定方法の1つの例を示した
が、復号値判定部は順方向復号結果および逆方向復号結
果の両方あるいはいずれか一方で誤りが検出された場合
は、正しいと推定される順方向復号結果もしくは逆方向
復号結果を使用し、いずれの復号結果でも復号できなか
った部分は放棄すれば、どのような方法でもよいことは
いうまでもない。
In the first embodiment, one example of the decoding value judgment method using the patterns of the four error detection positions has been described. However, the decoding value judgment unit performs the decoding of the forward decoding result and / or the backward decoding result. On the other hand, if an error is detected, any method may be used as long as the forward decoding result or the backward decoding result estimated to be correct is used, and the portion that could not be decoded in any of the decoding results is discarded. Needless to say.

【0061】(第2実施形態)次に、本発明の第2実施
形態として本発明による可変長符号化/復号化装置の応
用例について説明する。図11は、本発明の第2実施形
態に係る可変長符号化/復号化装置が組み込まれた動画
像符号化/復号化システムの概念図である。まず、動画
像符号化器709においては、情報源符号化器702で
符号化されたデータに対して動画像多重化器703で可
変長符号化と多重化等が行なわれ、送信バッファ704
で平滑化された後、符号化データとして伝送系または蓄
積系705に送り出される。符号化制御部701は、送
信バッファ704のバッファ量を考慮して、情報源符号
化器702と動画像多重化器703の制御を行なう。
(Second Embodiment) Next, as a second embodiment of the present invention, an application example of the variable length encoding / decoding device according to the present invention will be described. FIG. 11 is a conceptual diagram of a moving image encoding / decoding system incorporating the variable length encoding / decoding device according to the second embodiment of the present invention. First, in the moving picture encoder 709, the moving picture multiplexer 703 performs variable-length coding and multiplexing on the data encoded by the information source encoder 702, and the transmission buffer 704.
After that, the data is sent to the transmission system or storage system 705 as encoded data. The encoding control unit 701 controls the information source encoder 702 and the video multiplexer 703 in consideration of the buffer amount of the transmission buffer 704.

【0062】一方、動画像復号化器710においては、
伝送系または蓄積系705からの符号化データが受信バ
ッファ706に溜められ、動画像多重化分離器707で
符号化データの多重化分離と可変長復号化が行なわれた
後、情報源復号化器708に送られ、最終的に動画像情
報が復号化される。ここで、動画像多重化器703およ
び動画像多重化分離器707には第1実施形態で説明し
た可変長符号化/復号化装置が適用されている。
On the other hand, in the moving picture decoder 710,
The coded data from the transmission system or the storage system 705 is stored in the reception buffer 706, and the multiplexed data is demultiplexed and variable-length decoded by the video demultiplexer 707. 708, and finally the moving picture information is decoded. Here, the variable length coding / decoding device described in the first embodiment is applied to the moving image multiplexer 703 and the moving image demultiplexer 707.

【0063】図12は、第2実施形態における動画像多
重化器703および動画像多重化分離器707における
動画像符号化方式のシンタクスを示している。マクロブ
ロックのモード情報、動きベクトル情報およぴINTR
A DC(フレーム内符号化におけるDCT係数の直流
成分)の情報を上位階層とし、INTRA DC以外の
DCT係数情報を下位階層として、下位階層にリバーシ
ブル符号を適用している。
FIG. 12 shows the syntax of the moving picture coding method in the moving picture multiplexer 703 and the moving picture demultiplexer 707 in the second embodiment. Macroblock mode information, motion vector information and INTR
Reversible codes are applied to lower layers, with ADC (direct current component of DCT coefficients in intra-frame coding) information being the upper layer and DCT coefficient information other than INTRA DC being the lower layer.

【0064】図13(a)(b)は、この第2実施形態
における動画像多重化器703および動画像多重化分離
器707の構成を示すブロック図である。
FIGS. 13A and 13B are block diagrams showing the configuration of the moving picture multiplexer 703 and moving picture demultiplexer 707 in the second embodiment.

【0065】図13(a)に示す動画像多重化器703
においては、図11中の情報源符号化器702で符号化
されたデータのうち、マクロブロックのモード情報、動
きベクトル情報およびINTRA DCなどの情報を上
位階層とし、上位階層可変長符号化器901で通常の可
変長符号化が行なわれ、多重化器903に送られる。ま
た、情報源符号化器702で符号化されたデータのう
ち、INTRA DC以外のDCT係数は下位階層可変
長符号化器903においてリバーシブル符号で符号化さ
れ、多重化器903に送られる。多重化器903では、
上位階層の符号化データと下位階層の符号化データを多
重化し、送信バッファ704に送る。
A moving image multiplexer 703 shown in FIG.
In the data encoded by the information source encoder 702 in FIG. 11, information such as macroblock mode information, motion vector information, and INTRA DC is set as an upper layer, and an upper layer variable length encoder 901 is used. Perform normal variable-length coding, and send the result to the multiplexer 903. Further, among the data encoded by the information source encoder 702, DCT coefficients other than INTRA DC are encoded by a reversible code in a lower layer variable length encoder 903, and sent to a multiplexer 903. In the multiplexer 903,
The encoded data of the upper layer and the encoded data of the lower layer are multiplexed and sent to the transmission buffer 704.

【0066】一方、図13(b)に示す動画像復号化器
707においては、上位階層の符号化データと下位階層
の符号化データが多重化分離部904により分離され、
これらが上位階層可変長復号化器905および下位階層
可変長復号化器906によりそれぞれ可変長復号化され
る。
On the other hand, in the moving picture decoder 707 shown in FIG. 13B, the coded data of the upper layer and the coded data of the lower layer are separated by the demultiplexing section 904.
These are variable-length decoded by the upper layer variable length decoder 905 and the lower layer variable length decoder 906, respectively.

【0067】図14〜図16、図17〜図18および図
19は、下位階層可変長符号化器902で用いられる符
号語テーブルの一例である。この符号語テーブルに格納
された符号は、前述した符号語構成部22におけるリバ
ーシブル符号の符号語の第1の構成方法によって作成し
た符号を末尾に2ビットの固定長符号を追加した符号で
ある。
FIGS. 14 to 16, FIGS. 17 to 18 and FIG. 19 are examples of codeword tables used in the lower layer variable length encoder 902. The code stored in the codeword table is a code obtained by adding a 2-bit fixed-length code to the end of a code created by the first method of forming a reversible codeword in the codeword forming unit 22 described above.

【0068】情報源符号化器702では、量子化後の8
×8のDCT係数のブロック毎にブロック内のスキャン
を行ない、LAST(0:ブロックの最後でない非零係
数、1:ブロックの最後の非零係数)、RUN(非零係
数までの零ランの数)およびLEVEL(係数の量子化
値)を求め、動画像多重化部703に送る。
In the information source encoder 702, the 8
A scan within the block is performed for each block of DCT coefficients of × 8, and LAST (0: non-zero coefficient not at the end of the block, 1: non-zero coefficient at the end of the block), RUN (number of zero runs up to the non-zero coefficient) ) And LEVEL (quantized value of coefficient) are obtained and sent to the moving image multiplexing unit 703.

【0069】動画像多重化部703内の下位階層可変長
符号化器902は、図14〜図16に示すINTRA
(フレーム内符号化)およびINTER(フレーム間符
号化)の非LAST係数、RUN、LEVELにリバー
シブル符号の符号語(VLC_CODE)を対応させた
非LAST係数の符号語テーブルと、図17〜図18に
示すINTRAおよびINTERのLAST係数、RU
N、LEVELにリバーシブル符号の符号語(VLC_
CODE)を対応させたLAST係数の符号語テーブル
を持っている。
The lower layer variable length encoder 902 in the moving picture multiplexing unit 703 includes the INTRA shown in FIGS.
(Intra-frame coding) and INTER (inter-frame coding) non-LAST coefficient, code word table of non-LAST coefficient in which RUN and LEVEL correspond to a code word (VLC_CODE) of a reversible code, and FIGS. Last coefficient of INTRA and INTER shown, RU
N, LEVEL to the reversible codeword (VLC_
CODE) corresponding to a LAST coefficient codeword table.

【0070】そして、モード情報に基づいて、INTR
Aの時はINTRAの非LAST係数とLAST係数の
符号語テーブル、INTERの時はINTERの非LA
ST係数とLAST係数の符号語テーブルを選択して符
号化を行なう。符号語の最終ビットの“s”は、LEV
ELの符号を表し、“s”が“0”の時、LEVELの
符号は正、“s”が“1”の時、LEVELの符号は負
である。
Then, based on the mode information, the INTR
In the case of A, the code word table of the non-LAST coefficient and the LAST coefficient of INTRA, and in the case of INTER, the non-LAST of INTER
An encoding is performed by selecting a codeword table of ST coefficients and LAST coefficients. The “s” of the last bit of the code word is LEV
The sign of EL represents that when "s" is "0", the sign of LEVEL is positive, and when "s" is "1", the sign of LEVEL is negative.

【0071】また、この符号語テーブルに存在しない係
数は、図20に示すようにLAST係数どうかの1ビッ
トとRUNとLEVELの絶対値を固定長符号化し、こ
の固定長符号部の先頭に2つのエスケープ符号のうち、
“00001”を付加し、末端にもエスケープ符号を付
加する。図19は、エスケープ符号の符号語テーブルで
あり、エスケープ(ESCAPE)符号として用いられ
るVLC_ CODEの最終ビットの“s”はLEVEL
の符号を表し、“s”が“0”ならばLEVELは正、
“1”ならばLEVELは負である。
As shown in FIG. 20, for the coefficients not present in the code word table, one bit of the LAST coefficient and the absolute values of RUN and LEVEL are fixed-length coded. Of the escape codes,
“00001” is added, and an escape code is also added to the end. FIG. 19 is a codeword table of an escape code. The last bit “s” of VLC_CODE used as an escape (ESCAPE) code is LEVEL.
If “s” is “0”, LEVEL is positive,
If "1", LEVEL is negative.

【0072】図21はこの符号語テーブルを用いた時の
零ランが最大になる場合を示している。通常、同期符号
は零ランが続いた後に“1”を付加するビットパターン
が選択されている。例えばITU−T H.263では
16個の“0”の後に“1”が付くようなビットパター
ンが同期符号となっている。DCT係数の可変長符号化
では、零ランが最大になるのを、エスケープ符号を使う
係数で、LEVELが+64で、次もエスケープ符号を
使う符号が出現する場合で、15個“0”が連続するの
が最大となる。ゆえに“0”が16個連続するようなビ
ットパターンを同期符号にすれば、擬似同期符号が生じ
るおそれはない。
FIG. 21 shows a case where the zero run becomes maximum when this code word table is used. Normally, a bit pattern to which "1" is added after the zero run continues is selected as the synchronization code. For example, ITU-TH. In H.263, a bit pattern in which "1" is added after 16 "0" is the synchronization code. In variable-length coding of DCT coefficients, the maximum zero run is a coefficient using an escape code, when LEVEL is +64 and a code using an escape code appears again, and 15 “0” s are consecutive. It is the largest to do. Therefore, if a bit pattern in which 16 “0” s are continuous is used as the synchronization code, there is no possibility that a pseudo synchronization code is generated.

【0073】復号値判定部110では、順方向復号化器
108により得られた復号結果(順方向復号結果とい
う)と、逆方向復号化器109により得られた復号結果
(逆方向復号結果という)から復号値を判定し、最終的
な復号結果を出力する。
The decoded value determining section 110 decodes the decoded result obtained by the forward decoder 108 (referred to as a forward decoded result) and the decoded result obtained by the backward decoder 109 (referred to as a backward decoded result). , And a final decoding result is output.

【0074】順方向復号化器108および逆方向復号化
器109での誤り判定は、符号語として存在しないビッ
トパターンが生じた場合、およびチェックビット等で誤
りを検出した場合、検出位置はその場所とし、前記の判
定方法で誤りが検出されない場合で、復号したビット数
が同期区間内の符号化データのビット数と一致しない場
合は、復号化の最初の位置を誤り検出位置とする。
The error determination in the forward decoder 108 and the backward decoder 109 is performed when a bit pattern that does not exist as a code word occurs, and when an error is detected by a check bit or the like, the detection position is determined by the location. If no error is detected by the above-described determination method, and if the number of decoded bits does not match the number of bits of the encoded data in the synchronization interval, the first position of decoding is set as the error detection position.

【0075】図22は、下位階層の復号値判定方法を示
している。まず、図22(a)に示すように、順方向復
号結果と逆方向復号結果で誤りが検出されるマクロブロ
ック(MB)の位置(誤り検出位置)が交差しない場合
は、誤りが検出されなかったマクロブロックの復号結果
のみを復号値として使用し、二つの誤り検出位置の復号
結果は復号値として使用せず、上位階層のモード情報の
復号結果に基づいて、INTRAマクロブロック(フレ
ーム内符号化されたマクロブロック)については前フレ
ームをそのまま表示するように、INTERマクロブロ
ック(フレーム間符号化されたマクロブロック)につい
ては前フレームより動き補償のみで表示するように、上
位階層の復号結果を書き換える。
FIG. 22 shows a method of determining a decoded value of a lower layer. First, as shown in FIG. 22A, if the position (error detection position) of a macroblock (MB) where an error is detected in the forward decoding result and the backward decoding result does not intersect, no error is detected. Only the decoding result of the decoded macroblock is used as a decoding value, the decoding result of the two error detection positions is not used as a decoding value, and the INTRA macroblock (intra-frame coding The decoding result of the upper layer is rewritten such that the previous frame is displayed as it is for the macro block that has been subjected to the coding, and the macro block (inter-frame coded macro block) is displayed only with the motion compensation from the previous frame for the INTER macro block. .

【0076】また、図22(b)に示すように、順方向
復号結果と逆方向復号結果の誤りの検出位置が交差する
場合は、順方向復号の結果で誤りが検出されたマクロブ
ロックまでの復号値は、順方向復号結果を使用し、それ
以降の部分は、逆方向復号結果を復号値として使用す
る。なお、逆方向復号結果を優先して、逆方向復号の結
果で誤りが検出されたマクロブロックまでの復号値は、
逆方向復号結果を使用し、それ以前の部分は、順方向復
号結果を復号値として使用してもよい。
As shown in FIG. 22 (b), when the error detection positions of the forward decoding result and the reverse decoding result intersect, the macroblock up to the macroblock where the error is detected as a result of the forward decoding is obtained. The decoded value uses the forward decoding result, and the subsequent portion uses the backward decoding result as the decoded value. Note that priority is given to the result of reverse decoding, and the decoded value up to the macroblock in which an error is detected in the result of reverse decoding is as follows:
The backward decoding result may be used, and the previous part may use the forward decoding result as a decoded value.

【0077】また、図22(c)に示すように、順方向
復号結果および逆方向復号結果のうち片方向の復号結果
にしか誤りが検出されない場合(この例では、順方向復
号結果のみ誤りが検出されている)は、誤り検出位置以
降のマクロブロックに対する復号値は逆方向の復号結果
を使用する。さらに、図22(d)に示すように、同一
のマクロブロックで順方向復号結果および逆方向復号結
果の両方に誤りが検出される場合は、誤り検出位置のマ
クロブロックの復号値は放棄し、復号値として使用せず
に、上位階層のモード情報の復号結果に基づいて、IN
TRAマクロブロックについては前フレームをそのまま
表示するように、INTERマクロブロックについては
前フレームよりの動き補償のみで表示するように、上位
階層の復号結果を書き換え、それ以降のマクロブロック
に対する復号値は逆方向の復号結果を使用する。
Further, as shown in FIG. 22C, when an error is detected only in a one-way decoding result among the forward decoding result and the backward decoding result (in this example, only an error is detected in the forward decoding result). Is detected), the decoded value for the macroblock after the error detection position uses the decoding result in the reverse direction. Further, as shown in FIG. 22D, when an error is detected in both the forward decoding result and the backward decoding result in the same macroblock, the decoded value of the macroblock at the error detection position is discarded, Instead of using it as a decoded value, based on the decoding result of the mode information of the upper layer, IN
The decoding result of the upper layer is rewritten so that the previous frame is displayed as it is for the TRA macroblock, and only the motion compensation from the previous frame is displayed for the INTER macroblock, and the decoded values for the subsequent macroblocks are inverted. Use the result of decoding in the direction.

【0078】なお、図22の復号値判定方法では、マク
ロブロックを単位に復号値の判定を行なったが、ブロッ
クの単位あるいは符号語の単位で判定を行なってもよ
い。また、この第2実施形態ではDCT係数の可変長符
号化に本発明を適用したが、可変長符号化を行なう場合
には、他の情報シンボルについても適用することができ
ることは言うまでもない。
In the decoding value determination method shown in FIG. 22, the determination of the decoding value is performed in units of macroblocks, but the determination may be performed in units of blocks or codewords. In the second embodiment, the present invention is applied to variable-length coding of DCT coefficients. However, when performing variable-length coding, it is needless to say that the present invention can be applied to other information symbols.

【0079】(第3実施形態)次に、図23を参照しな
がら本発明の第3実施形態に係る可変長符号化/復号化
装置について説明する。
(Third Embodiment) Next, a variable length coding / decoding device according to a third embodiment of the present invention will be described with reference to FIG.

【0080】この第3実施形態に係る可変長符号化/復
号化装置は、大きく分けて符号語テーブル作成部10
1、符号化部113、伝送系または蓄積系105および
復号化部121からなる。まず、これら各部の機能につ
いて簡単に説明すると、符号語テーブル作成部101は
情報シンボルの生起確率に基づいて符号語テーブルを作
成し、符号化部113内の符号語テーブル102と、復
号化部121内の順方向符号語テーブル111および逆
方向符号語テーブル112に符号語を送る。符号化部1
13は、情報シンボルを可変長符号に符号化し、その可
変長符号を符号化データとして伝送系または蓄積系10
4へ出力する。復号化部121は、伝送系または蓄積系
105を介して入力されてきた符号化データを復号して
元の情報シンボルを再生する。
The variable length encoding / decoding device according to the third embodiment is roughly divided into a codeword table creating unit 10
1. It comprises an encoding unit 113, a transmission system or storage system 105, and a decoding unit 121. First, the function of each of these units will be briefly described. The codeword table creation unit 101 creates a codeword table based on the occurrence probabilities of information symbols, and the codeword table 102 in the encoding unit 113 and the decoding unit 121 The codewords are sent to the forward codeword table 111 and the backward codeword table 112 in. Encoding unit 1
13 encodes the information symbol into a variable length code, and uses the variable length code as encoded data in a transmission system or a storage system 10;
Output to 4. Decoding section 121 decodes the coded data input via transmission system or storage system 105 to reproduce the original information symbols.

【0081】次に、第3実施形態の各部の詳細な構成と
動作を説明する。符号化部113は図1に示した第1実
施形態と同様である。すなわち、符号化部113におい
て、入力された情報シンボルは符号化器103に入力さ
れる。符号語テーブル102は、符号語テーブル作成部
101によって予め作成された情報シンボルと可変長符
号の符号語とを対応させて格納している。符号化器10
3は符号語テーブル102に格納されている符号語の中
から、入力された情報シンボルに対応した符号語を選択
する。同期区間設定部104では、符号化器103が選
択した符号語を同期区間毎にまとめ、さらに順方向にも
逆方向にも復号可能なスタッフィング符号を挿入して、
同期区間毎に符号化データを出力する。この符号化デー
タは、伝送系または蓄積系104を通して復号化部12
1に送られる。
Next, the detailed configuration and operation of each unit of the third embodiment will be described. The encoding unit 113 is the same as in the first embodiment shown in FIG. That is, in encoding section 113, the input information symbols are input to encoder 103. The codeword table 102 stores information symbols created in advance by the codeword table creation unit 101 and codewords of variable-length codes in association with each other. Encoder 10
3 selects a codeword corresponding to the input information symbol from the codewords stored in the codeword table 102. In the synchronization section setting unit 104, the codewords selected by the encoder 103 are grouped for each synchronization section, and a stuffing code that can be decoded in both the forward and reverse directions is inserted.
The encoded data is output for each synchronization section. The encoded data is transmitted to the decoding unit 12 through the transmission system or the storage system 104.
Sent to 1.

【0082】復号化部121は、同期区間検出部10
6、バッファ107、符号化データ切替器122、復号
化器124、符号語テーブル切替器125、復号値判定
部110、順方向復号化テーブル111および逆方向復
号化テーブル112により構成される。符号化データ切
替器122および符号語テーブル切替器125は、復号
化器124により制御されて切り替わる。
The decoding section 121 includes a synchronization section detection section 10
6, a buffer 107, a coded data switch 122, a decoder 124, a codeword table switch 125, a decoded value determination unit 110, a forward decoding table 111, and a backward decoding table 112. The coded data switch 122 and the codeword table switch 125 are switched by being controlled by the decoder 124.

【0083】復号化部121では、伝送系または蓄積系
105より入力された符号化データから同期区間検出部
106で符号化データの同期区間を検査しながら、符号
化データを復号化器124へ入力する。その際、符号化
データをバッファ107にも蓄積する。復号化器124
は、入力された符号化データの復号(順方向復号化とい
う)を開始する。ここで、復号化器124は符号化デー
タに順方向符号語テーブル111に存在しないビットパ
ターンが出現した場合、およびバッファ107のビット
数と異なるビット数の符号化データが復号された場合、
誤り検出と判定する。
The decoding section 121 inputs the encoded data to the decoder 124 while checking the synchronous section of the encoded data by the synchronous section detecting section 106 from the encoded data input from the transmission system or the storage system 105. I do. At this time, the encoded data is also stored in the buffer 107. Decoder 124
Starts decoding of input encoded data (referred to as forward decoding). Here, when a bit pattern that does not exist in the forward codeword table 111 appears in the coded data, and when the coded data having a different number of bits from the buffer 107 is decoded,
Judge as error detection.

【0084】誤り検出と判定された場合、復号化器12
4は符号語テーブル切替器123で符号語テーブルを順
方向符号語テーブル111から逆方向符号語テーブル1
12に切り替えると同時に、符号化データ切替器122
により復号化器124への入力をバッファ107側に切
り替える。バッファ107は、同期区間検出部106に
より次の同期を検出した場合、蓄積した符号化データを
末尾から読み出し、復号化器124へ出力する。復号化
器124では、入力された符号化データの復号(逆方向
復号化という)を開始する。ここで、復号化器124は
順方向復号化と同様に、符号化データに逆方向符号語テ
ーブル112に存在しないビットパターンが出現した場
合、およびバッファ107のビット数と異なるビット数
の符号化データが復号された場合、誤り検出と判定す
る。復号値判定部110では、順方向復号化によって得
られた復号結果(順方向復号結果という)と、逆方向復
号化によって得られた復号結果(逆方向復号結果とい
う)から復号値を判定し、最終的な復号結果を出力す
る。
If it is determined that an error has been detected, the decoder 12
Reference numeral 4 denotes a codeword table switch 123 which changes the codeword table from the forward codeword table 111 to the backward codeword table 1
12 and at the same time, the encoded data switch 122
To switch the input to the decoder 124 to the buffer 107 side. When the next synchronization is detected by the synchronization section detection unit 106, the buffer 107 reads out the stored encoded data from the end and outputs it to the decoder 124. The decoder 124 starts decoding the input coded data (referred to as backward decoding). Here, as in the case of the forward decoding, the decoder 124 determines whether a bit pattern that does not exist in the backward codeword table 112 appears in the encoded data, and that the encoded data has a bit number different from the bit number of the buffer 107. Is decoded, it is determined that an error has been detected. The decoding value determination unit 110 determines a decoding value from a decoding result obtained by forward decoding (referred to as a forward decoding result) and a decoding result obtained by backward decoding (referred to as a backward decoding result). Output the final decryption result.

【0085】この第3実施形態における符号語テーブル
作成部101は、基本的に第1の実施形態と同様であ
り、図2に示したように、情報シンボルの生起確率の情
報を入力し、選択可能な符号系の中から最も平均符号長
の小さいものを選択する符号選択部21と、この符号語
選択部21で選択された符号の符号語を構成する符号語
構成部22からなる。ただし、本実施形態ではより幅広
い確率分布に対応し、符号語のビットパターンを自由度
を上げるために、符号語構成部22における符号語の構
成方法として以下の方法を用いている。
The codeword table creation unit 101 in the third embodiment is basically the same as that in the first embodiment. As shown in FIG. 2, information on the occurrence probabilities of information symbols is input and selected. It comprises a code selector 21 for selecting a code having the smallest average code length from among possible code systems, and a codeword constructing unit 22 for forming a codeword of the code selected by the codeword selector 21. However, in the present embodiment, the following method is used as a codeword configuration method in the codeword configuration unit 22 in order to correspond to a wider probability distribution and increase the degree of freedom of the bit pattern of the codeword.

【0086】図24は、符号語構成部22におけるリバ
ーシブル符号の符号語の第1の構成方法を示している。
まず、図24の左側に示すように、第1のリバーシブル
符号を用意する。次に、図24の中央に示すように、第
1のリバーシブル符号のそれぞれの符号語に対して、破
線で囲まれた(符号長−1)ビットの固定長符号を用意
し、図24の右側に示すように、第1のリバーシブル符
号の符号語の各ビットの間に固定長符号の符号語を破線
で囲むように1ビットずつ挿入する。この図24の可変
長符号は、第1のリバーシブル符号を復号しながら、1
ビット毎に固定長符号を復号することにより、順方向に
も逆方向にも復号可能であることが分かる。図24の例
では、第1のリバーシブル符号の符号語の各ビットの間
に固定長符号の符号語を1ビットずつ挿入したが、第1
のリバーシブル符号のそれぞれの符号語に対して、(符
号長−1)×nビットの固定長符号を用意し、第1のリ
バーシブル符号の符号語の各ビットの間に固定長符号の
符号語をnビットずつ付加してもよい。
FIG. 24 shows a first method of forming a codeword of a reversible code in the codeword forming unit 22.
First, as shown on the left side of FIG. 24, a first reversible code is prepared. Next, as shown in the center of FIG. 24, for each code word of the first reversible code, a fixed-length code of (code length-1) surrounded by a dashed line is prepared. As shown in (1), a fixed-length code word is inserted between the bits of the first reversible code code bit by bit so as to be surrounded by a broken line. The variable length code shown in FIG. 24 decodes the first reversible code while
It can be seen that by decoding the fixed-length code for each bit, decoding can be performed in both the forward and reverse directions. In the example of FIG. 24, the fixed-length codeword is inserted one bit at a time between each bit of the first reversible codeword.
For each code word of the reversible code, a fixed-length code of (code length-1) × n bits is prepared, and a code word of the fixed-length code is inserted between each bit of the code word of the first reversible code. You may add n bits at a time.

【0087】図25は、符号語構成部22におけるリバ
ーシブル符号の符号語の第2の構成方法を示している。
図25の左側に示すように、第1のリバーシブル符号を
用意する。次に、図25の上側に破線で囲んで示すよう
に、第2のリバーシブル符号を用意し、図25の右側に
示すように、第1のリバーシブル符号の符号語の各ビッ
トの間に破線で囲んだように第2のリバーシブル符号を
挿入する。この図25の可変長符号は、第1のリバーシ
ブル符号を復号しながら、1ビット毎に第2のリバーシ
ブル符号を復号することにより、順方向にも逆方向にも
復号可能であることが分かる。なお、図25の例では、
第1のリバーシブル符号と第2のリバーシブル符号を同
じ符号として示したが、異なる符号を用いても構わな
い。
FIG. 25 shows a second method of forming a codeword of a reversible code in the codeword forming unit 22.
As shown on the left side of FIG. 25, a first reversible code is prepared. Next, a second reversible code is prepared as shown by being surrounded by a broken line on the upper side of FIG. 25, and as shown on the right side of FIG. 25, a broken line is provided between each bit of the code word of the first reversible code. The second reversible code is inserted as enclosed. It can be seen that the variable length code in FIG. 25 can be decoded in both the forward and reverse directions by decoding the second reversible code for each bit while decoding the first reversible code. In the example of FIG. 25,
Although the first reversible code and the second reversible code are shown as the same code, different codes may be used.

【0088】この第3実施形態においては、図26に示
すように図23中の順方向符号語テーブル111と逆方
向符号語テーブル112を共通化した双方向符号語テー
ブル51を用いてもよい。この場合、図23中の復号化
器124から順方向復号化/逆方向復号化の区別を示す
識別信号53を入力し、この識別信号53によりアドレ
ス変換器52を動作させて、双方向符号語テーブル51
から符号語を読み出すためのアドレスを生成する。そし
て、このアドレスに対応する符号値を双方向符号語テー
ブル51から読み出す。
In the third embodiment, as shown in FIG. 26, a bidirectional codeword table 51 in which the forward codeword table 111 and the backward codeword table 112 in FIG. 23 are used in common may be used. In this case, an identification signal 53 indicating the distinction of forward decoding / reverse decoding is input from the decoder 124 in FIG. 23, and the address converter 52 is operated by the identification signal 53 to generate a bidirectional codeword. Table 51
Generates an address for reading a codeword from. Then, the code value corresponding to this address is read from the bidirectional codeword table 51.

【0089】また、この第3実施形態においては、図2
7に示すように復号化器124に誤り検出機能が付加さ
れる。復号化器61に接続された誤り検出部62は、復
号化器61の内部状態を監視し、これが異常となった場
合、誤り検出信号を出力する。異常な内部状態とは、例
えば以下のような状態をいう。
Also, in the third embodiment, FIG.
As shown in FIG. 7, an error detection function is added to the decoder 124. The error detection unit 62 connected to the decoder 61 monitors the internal state of the decoder 61, and outputs an error detection signal when the state becomes abnormal. The abnormal internal state refers to, for example, the following state.

【0090】(1)符号語テーブルに存在しない符号化
データを受信した場合。
(1) When coded data that does not exist in the code word table is received.

【0091】(2)符号化データの長さと、実際に復号
化器61で復号したデータの長さが一致しない場合。
(2) When the length of the encoded data does not match the length of the data actually decoded by the decoder 61.

【0092】(3)符号語テーブルには値が存在するた
め復号値を求めることは可能であるが、その値が不適な
値である場合。この(3)の具体例としては(3−1)
復号値が存在範囲を超えている場合、(3−2)データ
の個数が上限を超えた場合、および(3−3)前に復号
した復号値と整合性の合わない復号値を出力した場合等
が挙げられる。
(3) A decoded value can be obtained because a value exists in the code word table, but the value is an inappropriate value. As a specific example of this (3), (3-1)
When the decoded value exceeds the existing range, (3-2) when the number of data exceeds the upper limit, and (3-3) When a decoded value inconsistent with the decoded value decoded before is output. And the like.

【0093】(4)誤り検出符号等により、誤りを検出
した場合。
(4) When an error is detected by an error detection code or the like.

【0094】次に、図28を用いてこの第3実施形態に
おける復号方法を説明する。先の説明では、復号化器1
24での順方向および逆方向の復号処理は図28(a)
に示すように順方向、逆方向双方で復号処理を並行して
同時に行ない、それぞれが誤りを検出するまで復号を実
行し復号値を求めていた。本実施形態はこれに限られ
ず、図28(b)(c)(d)に示すような方法で復号
を行なってもよい。なお、図28(a)(b)(c)
(d)において、Xは誤り検出点を示し、また右側に向
かう矢印は順方向の復号処理、左側に示す矢印は逆方向
の復号処理をそれぞれ示している。
Next, a decoding method according to the third embodiment will be described with reference to FIG. In the above description, the decoder 1
The decoding process in the forward direction and the reverse direction at 24 is shown in FIG.
As shown in (1), decoding processing is performed simultaneously in both the forward direction and the reverse direction, and decoding is performed until each of them detects an error to obtain a decoded value. The present embodiment is not limited to this, and decoding may be performed by a method as shown in FIGS. 28 (b), (c) and (d). 28 (a), (b) and (c)
In (d), X indicates an error detection point, and the arrow toward the right indicates forward decoding processing, and the arrow on the left indicates reverse decoding processing.

【0095】図28(b)に示す方法では、順方向の復
号処理を行ない、誤りが検出された場合は、そこで順方
向の復号処理を停止し、同期区間の符号化データの末尾
から逆方向に、誤りが検出されるまで復号処理を行な
う。図28(c)に示す方法では、順方向の復号処理で
誤りが検出された場合、その誤り検出位置のnビット先
から順方向の復号処理を再開する。この処理を現在の同
期区間内の符号化データを全て処理するまで繰り返し行
なう。順方向の復号処理の最後に、もし同期区間の符号
化データ数と復号処理により復号を行なったデータ数と
が一致しない場合は誤り検出とみなし、符号化データの
末尾から逆方向の復号処理を誤りが発見されるまで行な
う。
In the method shown in FIG. 28 (b), forward decoding is performed, and when an error is detected, the forward decoding is stopped there, and the backward decoding is performed from the end of the encoded data in the synchronous section. Then, decoding processing is performed until an error is detected. In the method shown in FIG. 28C, when an error is detected in the forward decoding process, the forward decoding process is restarted from n bits ahead of the error detection position. This process is repeated until all the encoded data in the current synchronization section is processed. At the end of the forward decoding process, if the number of encoded data in the synchronization section does not match the number of data decoded by the decoding process, it is regarded as error detection, and the decoding process in the backward direction from the end of the encoded data is performed. Repeat until an error is found.

【0096】図28(d)に示す方法では、順方向の復
号処理で誤りが検出された場合、一旦その誤り検出位置
のnビット先から逆方向にnビット分復号処理を行な
う。その後、順方向の復号処理を誤り検出位置のnビッ
ト先(逆方向の復号処理を開始した位置)から行なう。
この処理を現在の同期区間内の符号化データを全て処理
するまで繰り返し行なう。最後に、もし同期区間の符号
化データ数と復号処理により復号を行なったデータ数が
一致しない場合は誤り検出とみなし、符号化データの末
尾から逆方向の復号処理を誤りが発見されるまで行な
う。
In the method shown in FIG. 28 (d), when an error is detected in the decoding process in the forward direction, the decoding process is performed for n bits in the reverse direction from the n-bit destination of the error detection position. Thereafter, the forward decoding process is performed n bits ahead of the error detection position (the position where the backward decoding process was started).
This process is repeated until all the encoded data in the current synchronization section is processed. Finally, if the number of coded data in the synchronous section does not match the number of data decoded by the decoding process, it is regarded as error detection, and the decoding process in the reverse direction from the end of the coded data is performed until an error is found. .

【0097】次に、図29を用いてこの第3実施形態に
おける復号値判定部111での復号値の判定方法を説明
する。なお、復号値判定部111で最終的に利用する復
号値の選択にも、以下のような方法を用いることができ
る。図29(a)に示す復号値判定方法は、誤りを検出
した場合、それ以降は復号を行なわない方法である。す
なわち、誤りを検出した場合には、それ以降の復号は誤
復号する可能性があるため、そのような誤復号の可能性
のある復号値は利用せず、誤り検出位置までの復号値の
みを利用する。
Next, with reference to FIG. 29, a method of determining a decoded value in the decoded value determining section 111 according to the third embodiment will be described. Note that the following method can also be used for selecting a decoding value to be finally used by the decoding value determination unit 111. The decoding value determination method shown in FIG. 29A is a method in which, when an error is detected, decoding is not performed thereafter. In other words, when an error is detected, subsequent decoding may be erroneously decoded, so that a decoded value having such a possibility of erroneous decoding is not used, and only the decoded value up to the error detection position is used. Use.

【0098】図29(b)に示す復号値判定方法は、誤
りを検出しても復号を続けてなるべく復号を行ない、利
用できる復号値は全て利用するようにする方法である。
可変長符号には、同期が外れた場合でも復号処理を続け
ると、自動的に同期が回復する特徴を有する符号が存在
する。これを自己同期回復性と呼ぶ。この自己同期回復
能力が高い符号語の場合には、図29(a)のように誤
り検出後に復号処理を停止せずに、図29(b)のよう
にそのまま復号を続けることで正しい復号値をより多く
得ることができる。ただし、この場合には復号値に誤っ
て復号された値を含む可能性がある。このような誤復号
の可能性を許容するシステムにおいては、図29(b)
の復号値判定方法を用いることも可能である。
The decoding value determination method shown in FIG. 29B is a method in which decoding is continued as much as possible even if an error is detected, and all available decoded values are used.
Among variable-length codes, there is a code having a feature that synchronization is automatically restored when decoding processing is continued even when synchronization is lost. This is called self-synchronization recovery. In the case of a code word having a high self-synchronization recovery capability, the decoding process is not stopped after error detection as shown in FIG. 29 (a), and decoding is continued as shown in FIG. Can be obtained more. However, in this case, there is a possibility that the decoded value includes an erroneously decoded value. In a system that allows the possibility of such erroneous decoding, FIG.
Can be used.

【0099】(第4実施形態)次に、図30を参照しな
がら本発明の第4実施形態に係る可変長符号化/復号化
装置について説明する。
(Fourth Embodiment) Next, a variable length encoding / decoding device according to a fourth embodiment of the present invention will be described with reference to FIG.

【0100】第4実施形態の可変長符号化/復号化装置
は、大きく分けて符号語テーブル作成部201、符号化
部213、伝送系または蓄積系205および復号化部2
14からなる。まず、これら各部の機能について簡単に
説明すると、符号語テーブル作成部201は情報シンボ
ルの生起確率に基づいて符号語テーブルを作成し、符号
化部213内の符号語テーブル、復号化部214内の順
方向符号語テーブルおよび逆方向符号語テーブルに符号
語を送る。
The variable length encoding / decoding device according to the fourth embodiment is roughly divided into a codeword table creating unit 201, an encoding unit 213, a transmission or storage system 205, and a decoding unit 2
Consists of fourteen. First, the function of each of these units will be briefly described. The codeword table creation unit 201 creates a codeword table based on the occurrence probabilities of information symbols, the codeword table in the encoding unit 213, and the codeword table in the decoding unit 214. Send codewords to forward and backward codeword tables.

【0101】符号化部213は、入力データとして与え
られる情報シンボルを階層化して、各階層毎に可変長符
号に符号化し、それらの可変長符号を多重化して符号化
データとして伝送系または蓄積系205へ出力する。復
号化部214は、伝送系または蓄積系205を介して入
力されてきた符号化データを多重化分離し、各階層毎に
可変長復号を行ない、階層毎の復号結果を合成して元の
情報シンボルを再生し、再生データを出力する。
The encoding section 213 hierarchizes information symbols given as input data, encodes the information symbols into variable-length codes for each layer, multiplexes these variable-length codes, and multiplexes the variable-length codes as transmission data or storage Output to 205. The decoding unit 214 multiplexes and separates the coded data input via the transmission system or the storage system 205, performs variable length decoding for each layer, synthesizes the decoding result for each layer, and obtains the original information. The symbol is reproduced and reproduced data is output.

【0102】次に、第4実施形態の各部の詳細な構成と
動作を説明する。符号化部213においては、入力デー
タである情報シンボルはデータ階層化部202により重
要度に応じて1からnまで(nは2以上の自然数)の階
層に分離される。分離された各階層i(i=1,2,
…,n)の情報シンボルは、階層i毎に用意された可変
長符号化部203−iに入力され、符号化される。可変
長符号化部203−iで得られた各階層iの符号化デー
タは、多重化部204で多重化され、伝送系または蓄積
系205を通して復号化部214に送られる。
Next, the detailed configuration and operation of each part of the fourth embodiment will be described. In the coding unit 213, the information symbols as input data are separated by the data hierarchy unit 202 into hierarchies from 1 to n (n is a natural number of 2 or more) according to importance. Each separated hierarchy i (i = 1, 2,
, N) are input to the variable-length coding units 203-i prepared for each layer i and are coded. The coded data of each layer i obtained by the variable length coding unit 203-i is multiplexed by the multiplexing unit 204 and sent to the decoding unit 214 through the transmission system or the storage system 205.

【0103】復号化部214では、伝送系または蓄積系
205より入力された符号化データが多重化分離部20
6で各階層iの符号化データに分離される。分離された
各階層の符号化データは、階層i毎に用意された可変長
復号化部207−iに入力され、復号化される。可変長
復号化部207−iで得られた各階層iの復号結果はデ
ータ合成部208で合成され、再生データとして出力さ
れる。
In the decoding unit 214, the coded data input from the transmission system or the storage system 205
At 6, it is separated into encoded data of each layer i. The separated encoded data of each layer is input to the variable-length decoding unit 207-i prepared for each layer i and decoded. The decoding result of each layer i obtained by the variable length decoding unit 207-i is synthesized by the data synthesis unit 208 and output as reproduction data.

【0104】符号語テーブル作成部201の構成は、第
1の実施形態で用いた図2に示した符号語テーブル作成
部101と同様であり、情報シンボルの生起確率の情報
に基づいて、選択可能な符号系の中から最も平均符号長
の小さいものを選択し、選択した符号の符号語を構成す
る。その符号語は、符号語の予め定められた重みによっ
て符号の区切りが分かるように構成された順方向にも逆
方向にも復号可能な可変長符号(リバーシブル符号)で
ある。
The configuration of the codeword table creation unit 201 is the same as that of the codeword table creation unit 101 shown in FIG. 2 used in the first embodiment, and can be selected based on information on the occurrence probabilities of information symbols. The code having the smallest average code length is selected from the various code systems, and the code word of the selected code is formed. The code word is a variable-length code (reversible code) that can be decoded in both the forward direction and the reverse direction and that is configured so that the delimitation of the code can be recognized by a predetermined weight of the code word.

【0105】次に、図30中の各階層iの可変長符号化
部203−iの構成は図31に示す通りであり、図1中
に示した符号化部113と同様に、符号語テーブル10
2と符号化器103および同期区間設定部104により
構成される。すなわち、図30中のデータ階層化部20
2から入力された情報シンボルは、符号化器103に入
力される。符号語テーブル102は、図30中の符号語
テーブル作成部201によって予め作成された情報シン
ボルと可変長符号の符号語とを対応させて格納してい
る。
Next, the configuration of the variable length coding unit 203-i of each layer i in FIG. 30 is as shown in FIG. 31, and the code word table is similar to the coding unit 113 shown in FIG. 10
2 and an encoder 103 and a synchronization section setting unit 104. That is, the data hierarchy unit 20 shown in FIG.
2 is input to the encoder 103. The codeword table 102 stores information symbols created in advance by the codeword table creation unit 201 in FIG. 30 and codewords of variable-length codes in association with each other.

【0106】符号化器103は、符号語テーブル102
に格納されている符号語の中から、データ階層化部20
2より入力された情報シンボルに対応した符号語を選択
して出力する。同期区間設定部104では、符号化器1
03が選択した符号語を同期区間毎にまとめ、さらに必
要に応じて順方向にも逆方向にも復号可能なスタッフィ
ング符号を挿入して、同期区間毎に符号化データを出力
する。この符号化データは図30中の多重化部204に
送られる。
The encoder 103 outputs the code word table 102
Out of the codewords stored in the
2 to select and output a codeword corresponding to the input information symbol. In the synchronous section setting unit 104, the encoder 1
The codewords selected by 03 are grouped for each synchronization section, and if necessary, stuffing codes that can be decoded in the forward and backward directions are inserted, and encoded data is output for each synchronization section. This encoded data is sent to multiplexing section 204 in FIG.

【0107】一方、図30中の各階層iの可変長復号化
部207−iの構成は図32に示す通りであり、図1中
に示した復号化部114と同様に、同期区間検出部10
6、バッファ107、順方向復号化器108、逆方向復
号化器109、復号値判定部110、順方向復号化テー
ブル111および逆方向復号化テーブル112により構
成される。すなわち、可変長復号化部207−iでは、
伝送系または蓄積系205より入力された符号化データ
から同期区間検出部106で符号化データの同期区間を
検出して、符号化データをバッファ107に蓄積する。
順方向復号化器108では、バッファ107に蓄積され
た符号化データの先頭から復号を開始する。逆方向復号
化器109では、バッファ107に蓄積された符号化デ
ータの末尾から復号を開始する。
On the other hand, the configuration of the variable length decoding unit 207-i of each layer i in FIG. 30 is as shown in FIG. 32, and, like the decoding unit 114 shown in FIG. 10
6, a buffer 107, a forward decoder 108, a backward decoder 109, a decoded value determination unit 110, a forward decoding table 111 and a backward decoding table 112. That is, in the variable length decoding unit 207-i,
The synchronization section of the coded data is detected by the synchronization section detection unit 106 from the coded data input from the transmission system or the storage system 205, and the coded data is stored in the buffer 107.
The forward decoder 108 starts decoding from the head of the encoded data stored in the buffer 107. The backward decoder 109 starts decoding from the end of the encoded data stored in the buffer 107.

【0108】順方向復号化器108では、符号化データ
に順方向符号語テーブル111に存在しないビットパタ
ーンが出現した場合、およびバッファ107のビット数
と異なるビット数の符号化データが復号された場合、誤
り検出と判定する。同様に逆方向復号化器109でも、
符号化データに逆方向符号語テーブル112に存在しな
いビットパターンが出現した場合、およびバッファ10
7のビット数と異なるビット数の符号化データが復号さ
れた場合、誤り検出と判定する。復号値判定部110で
は、順方向復号化器108によって得られた復号結果
(順方向復号結果)と、逆方向復号化器109によって
得られた復号結果(逆方向復号値)から復号値を判定
し、最終的な復号結果を出力する。これらの各階層iの
復号結果は、データ合成部208に送られる。
In forward decoder 108, when a bit pattern which does not exist in forward codeword table 111 appears in the encoded data, and when the encoded data having a bit number different from the bit number of buffer 107 is decoded. Is determined as error detection. Similarly, in the reverse decoder 109,
When a bit pattern that does not exist in the backward codeword table 112 appears in the encoded data,
If encoded data having a bit number different from 7 is decoded, it is determined that an error has been detected. The decoding value determination unit 110 determines a decoding value from the decoding result (forward decoding result) obtained by the forward decoder 108 and the decoding result (reverse decoding value) obtained by the backward decoder 109. And outputs the final decryption result. The decoding result of each layer i is sent to the data synthesizing unit 208.

【0109】図33に、データ階層化部202でのデー
タ階層化および多重化部204で多重化の例を示す。図
33(a)に示すようなn階層に分けることが可能なシ
ンタクスの入力データ(情報シンボル列)があるとする
と、データ階層化部202では図33(b)に示すよう
に各階層i毎に入力データが繰り返されるようにシンタ
クスを変更してデータ階層化を行ない、各階層i毎の情
報シンボルを可変長符号化部203−iに送る。多重化
部204では、図33(c)に示すように可変長符号化
部203−iにより階層i毎に可変長符号化され、かつ
同期符号iの付加により同期区間が設定された符号化デ
ータを多重化して出力する。
FIG. 33 shows an example of data hierarchization in data hierarchization section 202 and multiplexing in multiplexing section 204. Assuming that there is input data (information symbol sequence) of syntax that can be divided into n layers as shown in FIG. 33 (a), the data layering unit 202 sets each layer i as shown in FIG. 33 (b). Then, the syntax is changed so that the input data is repeated, and the data is hierarchized, and the information symbol for each hierarchy i is sent to the variable-length coding unit 203-i. In the multiplexing unit 204, as shown in FIG. 33C, the coded data in which the variable-length coding unit 203-i performs variable-length coding for each layer i and sets a synchronization section by adding a synchronization code i Are multiplexed and output.

【0110】図34は、図32中の復号値判定部110
での復号値の判定方法の例を示している。各階層i毎の
可変長復号化部207−iでは、それぞれ双方向復号が
行なわれる。もし、ある階層の可変長復号化部に入力さ
れる符号化データに誤りがあった場合、その影響は当該
階層より上位の階層と下位の階層の復号値に影響を与え
るので、各階層iの可変長復号化部207−i内の復号
値判定部110で情報をやりとりして、最終的な復号値
を決定するようにする。
FIG. 34 is a block diagram showing a decoded value judging section 110 in FIG.
2 shows an example of a method of determining a decoded value in the above. In the variable length decoding unit 207-i for each layer i, bidirectional decoding is performed. If there is an error in the coded data input to the variable length decoding unit of a certain layer, the influence affects the decoded values of the layers higher and lower than the corresponding layer. Information is exchanged by the decoded value determination unit 110 in the variable length decoding unit 207-i to determine the final decoded value.

【0111】この図34の例では、上位階層に誤りがあ
り、復号できない部分がある場合、それに関連する下位
階層の符号化データで復号できない部分ができる。ま
た、下位階層の符号化データに誤りがあり、復号できな
い部分がある場合、それに対応する上位階層の符号化デ
ータの復号値を変更するようにする。図34はあくまで
復号値判定方法の一つの例であり、各階層iの可変長復
号化部207−i内の復号値判定部110では、上位階
層と下位階層の復号結果を用いて順方向復号結果および
逆方向復号結果の少なくとも一方で誤りが検出された場
合は、順方向復号結果および逆方向復号結果のうち正し
いと推定される方の復号結果を使用し、順方向復号およ
び逆方向復号のいずれでも復号ができなかった部分につ
いては、その復号結果を放棄する方法であれば、どのよ
うな方法でもよいことはいうまでもない。また、この第
4実施形態では全ての階層で順方向にも逆方向にもリバ
ーシブル符号を用いる構成としたが、一部の階層のみに
リバーシブル符号を用いる構成でも構わない。
In the example of FIG. 34, when there is an error in the upper layer and there is a part that cannot be decoded, there is a part that cannot be decoded in the coded data of the lower layer related thereto. If there is an error in the lower layer encoded data and there is a part that cannot be decoded, the decoding value of the corresponding upper layer encoded data is changed. FIG. 34 is merely an example of the decoding value determination method. The decoding value determination unit 110 in the variable length decoding unit 207-i of each layer i uses the decoding results of the upper layer and the lower layer to perform forward decoding. If an error is detected in at least one of the result and the backward decoding result, a decoding result of the forward decoding result and the backward decoding result that is estimated to be correct is used, and the forward decoding and the backward decoding It goes without saying that any method may be used for the part that could not be decoded in any case, as long as the decoding result is discarded. In the fourth embodiment, the reversible code is used in all the layers in both the forward direction and the reverse direction. However, the reversible code may be used only in some layers.

【0112】(第5実施形態)次に、図11に示した動
画像符号化/復号化システムの動画像多重化部703お
よび動画像多重化分離部707に第4実施形態で説明し
た可変長符号化/復号化装置を適用した第5実施形態に
ついて説明する。この場合の動画像符号化/復号化シス
テムの基本的な構成と動作は第2の実施形態と同様であ
り、動画像多重化部703および動画像多重化分離部7
07における可変長符号化および可変長復号化の処理が
階層毎に行なわれる点が異なる。
(Fifth Embodiment) Next, the moving picture multiplexing section 703 and the moving picture multiplexing / demultiplexing section 707 of the moving picture coding / decoding system shown in FIG. A fifth embodiment to which an encoding / decoding device is applied will be described. The basic configuration and operation of the video encoding / decoding system in this case are the same as in the second embodiment, and the video multiplexing unit 703 and the video multiplexing / demultiplexing unit 7
07 in that variable length coding and variable length decoding are performed for each layer.

【0113】図35、図36、図37および図38は、
第5実施形態における動画像多重化部703での動画像
符号化方式のシンタクスの種々の例を示している。ま
ず、図35に示すシンタクスについて説明する。このシ
ンタクスでは、符号化データである入力された情報シン
ボルを上位階層と下位階層の2つに階層化し、それぞれ
に対して同期符号RMおよびMMにより同期区間を設定
している。下位階層のシンタクスの末尾のSTは、図9
に示したような逆方向から復号可能なスタッフィング符
号である。
FIG. 35, FIG. 36, FIG. 37 and FIG.
15 illustrates various examples of syntax of a moving image encoding method in the moving image multiplexing unit 703 according to the fifth embodiment. First, the syntax shown in FIG. 35 will be described. In this syntax, an input information symbol, which is encoded data, is hierarchized into two layers, an upper layer and a lower layer, and a synchronization section is set for each of them by using synchronization codes RM and MM. The ST at the end of the syntax of the lower hierarchy is shown in FIG.
Is a stuffing code that can be decoded in the reverse direction as shown in FIG.

【0114】上位階層は、図35(a)に示したように
ヘッダ情報と、マクロブロック毎の符号化モード、各ブ
ロックを符号化するか否かの情報およびINTRA D
Cの値をモード情報として先頭側に固めて、これらを通
常の順方向復号が可能な可変長符号で記述し、その後に
動きベクトル情報を図39〜図46に示した符号化テー
ブルによりリバーシブル符号に可変長符号化して配置す
る。図39〜図46に示す符号化テーブルにおいて、
“VECTOR DIFFERENCES”は動きベク
トルの予測値(差分値)、“BIT NUMBER”は
可変長符号の符号長、そして“VLC CODE”は可
変長符号を表す。
As shown in FIG. 35 (a), the upper layer includes header information, an encoding mode for each macroblock, information on whether or not to encode each block, and INTRA D.
The value of C is fixed at the beginning as mode information, and these are described with a variable length code that can be decoded in a normal forward direction. And variable-length coded. In the encoding tables shown in FIGS.
“VECTOR DIFFERENCES” represents a predicted value (difference value) of a motion vector, “BIT NUMBER” represents a code length of a variable length code, and “VLC CODE” represents a variable length code.

【0115】ここで、動きベクトルは図47に示すよう
に一次元予測により得られ、予測値は差分値で表され
る。動きベクトルの予測方向を図47中に矢印で示す。
図47に示すように、動きベクトルはマクロブロック
(図47中に大きな四角で示す)に1本存在する場合
と、各輝度ブロック(図47中に小さな四角で示す)毎
に各1本の計4本存在する場合とがあるが、これらにつ
いて一次元予測を行ない、予測値を図39〜図46に示
した符号化テーブルに従って可変長符号で記述する。な
お、予測で得られない動きベクトルについては、その動
きベクトルの値そのものを図39〜図46に示した符号
化テーブルに従って可変長符号により記述する。図35
(a)の末尾の動きベクトル情報がこれに相当する。一
方、下位階層は図35(b)に示したようにINTRA
DCを除くDCT係数情報であり、例えば図14〜図
20や特願平7−260383に記載されたリバーシブ
ル符号で記述される。
Here, the motion vector is obtained by one-dimensional prediction as shown in FIG. 47, and the predicted value is represented by a difference value. The motion vector prediction direction is indicated by an arrow in FIG.
As shown in FIG. 47, one motion vector exists in a macroblock (shown by a large square in FIG. 47), and one motion vector exists in each luminance block (shown by a small square in FIG. 47). There are cases where there are four, but one-dimensional prediction is performed for these, and the predicted values are described using variable length codes according to the encoding tables shown in FIGS. For a motion vector that cannot be obtained by prediction, the value of the motion vector itself is described by a variable length code according to the encoding tables shown in FIGS. FIG.
The motion vector information at the end of (a) corresponds to this. On the other hand, the lower layer is INTRA as shown in FIG.
This is DCT coefficient information excluding DC, and is described by, for example, a reversible code described in FIGS. 14 to 20 and Japanese Patent Application No. 7-260383.

【0116】次に、図36に示すシンタクスについて説
明する。このシンタクスでは、上位階層は図36(a)
に示すようにヘッダ情報とマクロ符号化毎の動きベクト
ルの数を表したモード情報1を先頭側に固めて、通常の
順方向復号が可能な可変長符号で記述し、その後に動き
ベクトル情報の可変長符号を記述する。動きベクトル情
報の可変長符号は、図35のシンタクスと同様である。
下位階層は、図36(b)に示すように各ブロックのD
CT係数があるか否かを示すモード情報2およびINT
RA DCを先頭側に固めて、これらを通常の順方向復
号が可能な可変長符号で記述し、その後にINTRA
DCを除くDCT係数情報を図35のシンタクスと同様
にリバーシブル符号で記述する。
Next, the syntax shown in FIG. 36 will be described. In this syntax, the upper hierarchy is shown in FIG.
As shown in (1), header information and mode information 1 indicating the number of motion vectors for each macro coding are fixed at the head side, and are described with a variable-length code capable of normal forward decoding. Describe the variable length code. The variable length code of the motion vector information is the same as the syntax in FIG.
As shown in FIG. 36 (b), the lower hierarchy is the D of each block.
Mode information 2 indicating whether there is a CT coefficient and INT
RADCs are fixed at the head side, and they are described with a variable length code capable of normal forward decoding.
DCT coefficient information excluding DC is described by reversible codes as in the syntax of FIG.

【0117】次に、図37に示すシンタクスについて説
明する。このシンタクスでは、上位階層に順方向復号が
可能な可変長符号のみを用いている。すなわち、上位階
層は図37(a)に示すように、ヘッダ情報、モード情
報および動きベクトル情報を順方向復号が可能な可変長
符号で記述し、下位階層は図37(b)に示すように、
DCT係数情報を図35のシンタクスと同様にリバーシ
ブル符号により記述している。
Next, the syntax shown in FIG. 37 will be described. In this syntax, only variable-length codes that can be forward decoded in the upper layer are used. That is, as shown in FIG. 37A, the upper layer describes the header information, the mode information and the motion vector information with a variable length code capable of decoding in the forward direction, and the lower layer as shown in FIG. 37B. ,
The DCT coefficient information is described by reversible codes as in the syntax of FIG.

【0118】図38に示すシンタックスも、上位階層に
順方向復号が可能な可変長符号のみを用いている。すな
わち、上位階層は図38(a)に示すように、ヘッダ情
報、マクロ符号化毎の動きベクトルの数を表したモード
情報1および動きベクトル情報を順方向復号可能な可変
長符号で記述する。下位階層は図38(b)に示すよう
に、各ブロックのDCT係数があるか否かを示すモード
情報2およびINTRA DCを先頭側に固めて、これ
らを通常の順方向復号が可能な可変長符号で記述し、そ
の後にINTRA DC以外のDCT係数情報を図36
のシンタクスと同様にリバーシブル符号で記述する。
The syntax shown in FIG. 38 also uses only variable-length codes that can be decoded in the upper layer in the forward direction. That is, as shown in FIG. 38A, header information, mode information 1 representing the number of motion vectors for each macro coding, and motion vector information are described in a variable length code capable of forward decoding, as shown in FIG. In the lower layer, as shown in FIG. 38 (b), mode information 2 indicating whether or not there is a DCT coefficient of each block and INTRA DC are fixed at the head side, and these are variable-length capable of normal forward decoding. 36, DCT coefficient information other than INTRA DC is described in FIG.
The reversible code is used in the same way as the syntax of.

【0119】第5実施形態における動画像多重化部70
3および動画像多重化分離部707の基本構成は図13
(a)(b)に示す通りであるが、上位階層可変長符号
化器901、下位階層可変長符号化器903および上位
階層可変長復号化器905、下位階層可変長復号化器9
06の構成が第2実施形態とは異なっている。すなわ
ち、情報源符号化器702で符号化されたデータのう
ち、例えば図35(a)または図36(a)のシンタク
スで示された上位階層のデータが上位階層可変長符号化
器901で可変長符号化され、多重化部903に送られ
る。また、情報源符号化器702で符号化されたデータ
のうち、図35(b)または図36(b)のシンタクス
で示された下位階層のデータが可変長符号化器903で
可変長符号化され、多重化部903に送られる。多重化
部903では、上位階層の符号化データおよび下位階層
の符号化データを多重化し、送信バッファ704に送
る。
Moving image multiplexing section 70 in the fifth embodiment
3 and the basic configuration of the moving image demultiplexing / separating unit 707 are shown in FIG.
(A) As shown in (b), upper layer variable length encoder 901, lower layer variable length encoder 903, upper layer variable length decoder 905, lower layer variable length decoder 9
06 differs from the second embodiment. That is, of the data encoded by the information source encoder 702, for example, data of an upper layer indicated by the syntax of FIG. 35A or FIG. 36A is variable by an upper layer variable length encoder 901. The data is long-coded and sent to the multiplexing unit 903. Also, of the data encoded by the information source encoder 702, data of a lower hierarchy indicated by the syntax in FIG. 35B or FIG. 36B is subjected to variable length encoding by the variable length encoder 903. Then, it is sent to the multiplexing unit 903. The multiplexing unit 903 multiplexes the encoded data of the upper layer and the encoded data of the lower layer, and sends the multiplexed data to the transmission buffer 704.

【0120】そして、この第5実施形態では上位階層可
変長復号化器905および下位階層可変長復号化器90
6内の図32中に示した復号値判定部110では、順方
向復号化器108によって得られた順方向復号結果から
復号値を判定し、最終的な復号結果を出力する。各階層
の順方向復号化器108および逆方向復号化器109で
の誤り判定は、符号語として存在しないビットパターン
が出現した場合、およびチェックビット等で誤りを検出
した場合には、検出位置はその場所とし、前記の判定方
法で誤りが検出されない場合で、復号したビット数が同
期区間内の符号化データのビット数と一致しない場合
は、復号化の最初の位置を誤り検出位置とする。
In the fifth embodiment, the upper layer variable length decoder 905 and the lower layer variable length decoder 90
In FIG. 32, the decoded value determining unit 110 shown in FIG. 32 determines a decoded value from the forward decoding result obtained by the forward decoder 108 and outputs a final decoded result. The error determination in the forward decoder 108 and the backward decoder 109 of each layer is performed when a bit pattern that does not exist as a codeword appears, and when an error is detected by a check bit or the like, the detection position is If no error is detected by the above-described determination method, and if the number of decoded bits does not match the number of bits of the encoded data in the synchronization interval, the first position of decoding is set as the error detection position.

【0121】次に、第5実施形態における復号値判定方
法について説明する。図48は、動画像多重化部703
での動画像符号化方式のシンタクスが図35に示すシン
タクスである場合の復号値判定方法を示している。図3
5のシンタクスでは、上位階層の動きベクトル情報と下
位階層のDCT係数情報にリバーシブル符号を用いてい
るので、上位階層および下位階層の両者で双方向復号が
可能である。
Next, a decoding value determination method according to the fifth embodiment will be described. FIG. 48 shows a moving image multiplexing unit 703.
35 shows a decoded value determination method in a case where the syntax of the moving picture coding method in the above is the syntax shown in FIG. FIG.
In the syntax of No. 5, since the reversible code is used for the motion vector information of the upper layer and the DCT coefficient information of the lower layer, bidirectional decoding can be performed in both the upper layer and the lower layer.

【0122】上位階層では、まずヘッダ情報とモード情
報が復号される。ヘッダ情報やモード情報で誤りが発見
されて全てが復号できない場合、誤りが生じた同期区間
のマクロブロックの復号値は全てNot Codedと
され、前画面がそのまま表示される。もし、ヘッダ情報
とモード情報が全て復号できた場合は、次に動きベクト
ル情報が双方向復号される。動きベクトル情報で復号が
できない部分については、やはりNot Codedと
される。下位階層では、動きベクトルまで復号できたマ
クロブロックについてのみ、下位階層のDCT係数情報
を使用される。誤りのためにDCT係数情報を放棄した
マクロブロックは、Not Codedとされる。
In the upper layer, first, header information and mode information are decoded. If an error is found in the header information or mode information and cannot be decoded at all, the decoded values of the macroblock in the synchronous section where the error has occurred are all Not Coded, and the previous screen is displayed as it is. If the header information and the mode information can all be decoded, the motion vector information is then bidirectionally decoded. The part that cannot be decoded by the motion vector information is also Not Coded. In the lower layer, DCT coefficient information of the lower layer is used only for a macroblock that can be decoded up to a motion vector. A macroblock in which DCT coefficient information has been discarded due to an error is regarded as Not Coded.

【0123】図49は、動画像多重化部703での動画
像符号化方式のシクタクスが図36に示すシンタクスで
ある場合の復号値判定方法を示している。図36のシン
タクスによると、上位階層ではまずヘッダ情報とモード
情報1が復号される。ヘッダ情報やモード情報1で誤り
が発見され、全てが復号できない場合は、誤りが生じた
同期区間のマクロブロックの復号値は全てNot Co
dedとされ、前画面がそのまま表示される。もし、ヘ
ッダ情報とモード情報1が全て復号できた場合は、次に
動きベクトル情報が双方向復号される。この動きベクト
ル情報で復号ができない部分については、やはりNot
Codedとされる。下位階層では、動きベクトルま
で復号できたマクロブロックについてのみ下位階層のD
CT係数情報が使用される。誤りのためにDCT係数情
報を放棄したマクロブロックは、Not Codedと
される。
FIG. 49 shows a method of determining a decoded value in the case where the syntax of the moving picture coding method in the moving picture multiplexing unit 703 is the syntax shown in FIG. According to the syntax of FIG. 36, first, header information and mode information 1 are decoded in the upper layer. If an error is found in the header information or the mode information 1 and cannot be decoded at all, the decoded values of all the macroblocks in the synchronous section where the error has occurred are Not Co
ded and the previous screen is displayed as it is. If the header information and the mode information 1 can all be decoded, the motion vector information is bidirectionally decoded next. For the part that cannot be decoded with this motion vector information,
Coded. In the lower layer, the D of the lower layer is used only for the macroblock that can be decoded up to the motion vector.
CT coefficient information is used. A macroblock in which DCT coefficient information has been discarded due to an error is regarded as Not Coded.

【0124】なお、図48および図49に示した復号値
判定方法では、マクロブロック単位に復号値の判定を行
なったが、ブロック単位でも符号語の単位で復号値の判
定を行なってもよい。また、この第5実施形態では動き
ベクトル情報とDCT係数情報の可変長符号化に本発明
を適用した場合について述べたが、可変長符号化を行な
う他の情報シンボルについても本発明を適用できること
はいうまでもない。
In the decoded value determination method shown in FIGS. 48 and 49, the decoded value is determined for each macroblock. However, the decoded value may be determined for each block or each codeword. In the fifth embodiment, the case where the present invention is applied to variable length coding of motion vector information and DCT coefficient information has been described. However, the present invention can be applied to other information symbols that perform variable length coding. Needless to say.

【0125】(第6実施形態)次に、本発明の第6実施
形態に係る可変長符号化/復号化装置について説明す
る。この第6実施形態の基本的な構成は第1実施形態の
構成を示す図1のブロック図と同一なので、図1を参照
しながら説明する。
(Sixth Embodiment) Next, a variable length encoding / decoding device according to a sixth embodiment of the present invention will be described. The basic configuration of the sixth embodiment is the same as the block diagram of FIG. 1 showing the configuration of the first embodiment, and will be described with reference to FIG.

【0126】符号化部113において、入力された情報
シンボルは符号化器103に入力される。符号語テーブ
ル102は、符号語テーブル作成部101によって予め
作成された情報シンボルと可変長符号の符号語とを対応
させて格納している。符号化器103は符号語テーブル
102に格納されている符号語の中から、入力された情
報シンボルに対応した符号語を選択する。同期区間設定
部では、符号化器が選択した符号語を同期区間毎にまと
めて符号化データとして出力する。この符号化データ
は、伝送系または蓄積系104を通して復号化部111
に送られる。
[0126] In encoding section 113, the input information symbols are input to encoder 103. The codeword table 102 stores information symbols created in advance by the codeword table creation unit 101 and codewords of variable-length codes in association with each other. The encoder 103 selects a codeword corresponding to the input information symbol from the codewords stored in the codeword table 102. The synchronization section setting unit collectively outputs the codewords selected by the encoder for each synchronization section and outputs the data as encoded data. This encoded data is transmitted to the decoding unit 111 through the transmission system or the storage system 104.
Sent to

【0127】復号化部114では、伝送系または蓄積系
105より入力された符号化データから同期区間検出部
106で符号化データの同期区間を検出し、符号化デー
タをバッファ107に蓄積する。順方向復号化器109
では、バッファに蓄積された符号化データの先頭から復
号を開始し、逆方向復号化器111では、バッファに蓄
積された符号化データの末尾から復号を開始する。
In the decoding section 114, the synchronization section of the coded data is detected by the synchronization section detection section 106 from the coded data input from the transmission system or the storage system 105, and the coded data is stored in the buffer 107. Forward decoder 109
Then, decoding starts from the head of the encoded data stored in the buffer, and the backward decoder 111 starts decoding from the end of the encoded data stored in the buffer.

【0128】順方向復号化器では、符号化データに、順
方向符号語テーブルに存在しないビットパターンが出現
した場合、及びバッファのビット数と異なるビット数の
符号化データが復号された場合、誤り検出と判定する。
同様に逆方向復号化器でも、符号化データに、逆方向符
号語テーブルに存在しないビットパターンが出現した場
合、及びバッファのビット数と異なるビット数の符号化
データが復号された場合、誤り検出と判定する。
In the forward decoder, if a bit pattern that does not exist in the forward codeword table appears in the encoded data, or if encoded data having a bit number different from the bit number of the buffer is decoded, an error occurs. Judge as detection.
Similarly, in the backward decoder, if a bit pattern that does not exist in the backward codeword table appears in the coded data, or if the coded data having a bit number different from the number of bits in the buffer is decoded, error detection is performed. Is determined.

【0129】復号値判定部では、順方向復号化器によっ
て得られた復号結果(順方向復号結果という)と、逆方
向復号化器によって得られた復号結果(逆方向復号値と
いう)から復号値を判定し、最終的な復号結果を出力す
る。
[0129] The decoded value determination unit determines a decoded value from a decoded result obtained by the forward decoder (referred to as a forward decoded result) and a decoded result obtained by the backward decoder (referred to as a backward decoded value). And outputs the final decoding result.

【0130】図50は、符号語テーブル作成部101の
ブロック図である。情報シンボルの生起確率は、確率モ
デル作成部23に入力され、確率モデルを作成し、符号
選択部21に入力され、選択可能な符号系の中から最も
平均符号長の小さいものを選択し、選択結果を符号語構
成部22に送る。符号語構成部22では、符号語選択部
21で選択された符号の符号語を構成する。
FIG. 50 is a block diagram of the codeword table creation unit 101. The occurrence probability of the information symbol is input to the probability model generation unit 23, generates a probability model, is input to the code selection unit 21, selects the code system with the smallest average code length from the selectable code systems, and selects The result is sent to the codeword construction unit 22. The codeword configuration unit 22 configures a codeword of the code selected by the codeword selection unit 21.

【0131】この第6実施形態における確率モデルの設
計方法は以下の通りである。第6実施形態では、様々な
情報源の確率分布に対して、より汎用的で符号化効率の
より確率モデルの設計方法について示す。
The design method of the stochastic model in the sixth embodiment is as follows. In the sixth embodiment, a method of designing a more general-purpose and more efficient coding probability model with respect to probability distributions of various information sources will be described.

【0132】まず、記法を示す。 θi 情報源(i=1,…,n) X 情報源の情報シンボルX=(x1 ,x2 ,…,xm ) P(X| θi ) θi の頻度分布 一例としては、複数のテスト画像を情報源として、その
テスト画像を符号化して得られた頻度分布を考えればよ
い。
First, the notation will be described. .theta.i information source (i = 1,..., n) X information symbol of information source X = (x1, x2,..., xm) P (X | .theta.i) Frequency distribution of .theta.i It is sufficient to consider a frequency distribution obtained by encoding the test image.

【0133】ここで、設計する確率モデルQ(X)は、
複数の情報源から得れた頻度分布を重み付けして平均し
て求めるものとする。
Here, the probability model Q (X) to be designed is
It is assumed that frequency distributions obtained from a plurality of information sources are weighted and averaged.

【0134】 w(θi ) 重み付け係数 w(θ1 )+…+w(θn )=1 この時、いかに重み付け係数w(θi )を求めるかが問
題となる。
[0134] w (θi) weighting coefficient w (θ1) +... + w (θn) = 1 At this time, how to determine the weighting coefficient w (θi) becomes a problem.

【0135】情報源θi をQ(X)で符号化した時の理
想符号長L(X| θi )は、 となる。各情報源に対して平均的に理想符号長L(X|
θi )を最小化するには
The ideal code length L (X | θi) when the information source θi is encoded by Q (X) is Becomes On average, the ideal code length L (X |
θi)

【0136】この関数が最小になるのは、U(X)=Q
(X)の時で、 w(θ1 )=…=w(θn )=1/n となる。
This function is minimized when U (X) = Q
In the case of (X), w (θ1) =... = W (θn) = 1 / n.

【0137】別の確率モデルQ(X)の設計方法とし
て、最悪の情報源を想定して確率モデルQ(X)を設計
する手法を示す。
As another design method of the probability model Q (X), a method of designing the probability model Q (X) assuming the worst information source will be described.

【0138】情報源θi をQ(X)で符号化した時の冗
長度R(X| θi )は、 となる。この冗長度の各情報源に対する重みづけ平均S
(X)は、 となって、事象Xと事象θの相互情報量を示す関数にな
っている。この関数の最大値を求める方法は、 S.Arimoto,"An algorithm for computing the capacity
of arbitrary discretememoryless channels,"IEEE Tr
ans.Inform.Theory,Vol.IT-18,pp.14-20,1972.R.E.Blah
ut,"Computation of channel capacity and rate-disto
rtion functions,"IEEE Trans.Inform.Theory,Vol.IT-1
8,pp.460-473,1972. に示されるArimoto-Blahutのアルゴリズム等が知られて
おり、これらのアルゴリズムによってS(X)を最大化
するつまり最悪の場合のw(θi )(i=1,…n )を求め
ることができる。
The redundancy R (X | θi) when the information source θi is encoded by Q (X) is Becomes Weighted average S for each information source of this redundancy
(X) Is a function indicating the mutual information amount between the event X and the event θ. To find the maximum value of this function, see S. Arimoto, "An algorithm for computing the capacity
of arbitrary discretememoryless channels, "IEEE Tr
ans.Inform.Theory, Vol.IT-18, pp.14-20,1972.REBlah
ut, "Computation of channel capacity and rate-disto
rtion functions, "IEEE Trans.Inform.Theory, Vol.IT-1
8, pp. 460-473, 1972. are known, and these algorithms maximize S (X), that is, w (θi) (i = 1) in the worst case. , ... n).

【0139】確率モデルQ(X)の設計方法として、理
想符号長を平均的に最小にする方法と、平均的に最悪を
想定する方法を示したが、2つの方法を組み合わせて、
情報源をグループ化して前者の方法で確率モデルをいく
つか作成し、その確率モデルに対して後者の方法を用い
るなどの方法を適用してもよい。
As a method of designing the probability model Q (X), a method for averaging the ideal code length and a method for assuming the worst on average have been described.
Information sources may be grouped to create some probability models by the former method, and a method of using the latter method may be applied to the probability model.

【0140】図50に示す符号選択部21では、確率モ
デル作成部23で作成した確率モデルQ(X)を、情報
シンボルXを確率の高い順にソーティングしたQ(Y)
を作成し、一方、符号構成部22で作成されたリバーシ
ブル符号の符号長を短い順にソーティングしたものF
(Z)を作成し、 を計算して最も値が小さいものを選択し、情報シンボル
と符号語を対応させて符号語テーブルを作成する。
In the code selecting section 21 shown in FIG. 50, the probability models Q (X) created by the probability model creating section 23 are sorted by information symbols X in descending order of probability to Q (Y).
, On the other hand, the code lengths of the reversible codes generated by the code configuration unit 22 are sorted in ascending order.
Create (Z), Is calculated and the one with the smallest value is selected, and a codeword table is created by associating information symbols with codewords.

【0141】符号語構成部22で構成する符号は、例え
ば特願平7−89772および特願平7−260383
並びに第1および第3実施形態で示されている符号語の
重みを用いた順方向にも逆方向にも復号可能な可変長符
号が用いられる。
The codes formed by the code word forming unit 22 are described in, for example, Japanese Patent Application Nos. 7-89772 and 7-260383.
In addition, a variable-length code that can be decoded in both the forward and backward directions using the weight of the code word shown in the first and third embodiments is used.

【0142】(第7実施形態)次に、本発明の第7実施
形態を説明する。図51は、本発明の第7実施形態によ
る可変長符号化/復号化装置が組み込まれた動画像符号
化/復号化装置の概念図である。動画像符号化器709
では、情報源符号化器702で符号化されたデータは、
動画像多重化部703で可変長符号化、多重化等がおこ
なわれ、伝送バッファ704で平滑化されたのちに、符
号化データとして、伝送系または蓄積系705に送り出
される。符号化制御部701は、伝送バッファ704の
バッファ量を考慮して、情報源符号化器702、動画像
多重化部703の制御を行なう。一方、動画像復号化器
710では、伝送系または蓄積系705からの符号化デ
ータを受信バッファ706にためてから、動画像多重化
分離部707で、符号化データの多重化分離、可変長復
号化が行なわれ、情報源復号化器708に送られ、最終
的に動画像が復号化される。
(Seventh Embodiment) Next, a seventh embodiment of the present invention will be described. FIG. 51 is a conceptual diagram of a video encoding / decoding device incorporating the variable length encoding / decoding device according to the seventh embodiment of the present invention. Video encoder 709
Then, the data encoded by the information source encoder 702 is
The moving image multiplexing unit 703 performs variable-length coding, multiplexing, and the like, smoothes the data in a transmission buffer 704, and sends out the coded data to a transmission system or a storage system 705. The encoding control unit 701 controls the information source encoder 702 and the video multiplexing unit 703 in consideration of the buffer amount of the transmission buffer 704. On the other hand, the moving picture decoder 710 stores the coded data from the transmission system or the storage system 705 in the reception buffer 706, and the moving picture multiplex / separation unit 707 demultiplexes the coded data and performs variable length decoding. The decoding is performed and sent to the information source decoder 708, and the moving picture is finally decoded.

【0143】第7実施形態において追加されたシンタク
スについて説明する。図53は、第7実施形態における
動画像多重化部703および、動画像多重化分離部70
7での動画像符号化方式のシンタクスを示している。符
号化データは、上位階層と下位階層に階層化し、それぞ
れを同期符号RMとMMによって、同期区間を設定して
いる。また、下位階層のSTは、図62で示すような逆
方向から復号可能なスタッフィング符号である。フレー
ム内符号化フレームは、図63のように、マクロブロッ
クのモード情報の一部とINTRA DCを上位階層と
し、モード情報の一部とAC−DCT係数情報を下位階
層として、AC−DCT係数情報にリバーシブル符号を
適用している。フレーム間符号化フレームは、図64の
ように、マクロブロックのモード情報の一部と動きベク
トル情報を上位階層とし、モード情報の一部とINTR
A DCとAC−DCT係数情報を下位階層として、A
C−DCT係数情報にリバーシブル符号を適用してい
る。
The syntax added in the seventh embodiment will be described. FIG. 53 shows a moving image multiplexing unit 703 and a moving image multiplexing / demultiplexing unit 70 according to the seventh embodiment.
7 shows the syntax of the moving picture encoding method. The encoded data is hierarchized into an upper layer and a lower layer, and a synchronization section is set by using synchronization codes RM and MM. The ST in the lower layer is a stuffing code that can be decoded in the reverse direction as shown in FIG. As shown in FIG. 63, the intra-coded frame includes a part of the mode information of the macroblock and INTRA DC as an upper layer, a part of the mode information and AC-DCT coefficient information as a lower layer, and AC-DCT coefficient information. Is applied with a reversible code. As shown in FIG. 64, an inter-coded frame has a part of mode information of a macro block and motion vector information as an upper layer, and a part of mode information and INTR.
A and A-DCT coefficient information as lower layers
A reversible code is applied to C-DCT coefficient information.

【0144】図53に示す上位階層と下位階層の符号化
および復号化は、図52に示す動画像多重化部とにより
行なわれている。これらの構成は、第5実施形態に係る
符号化装置/復号化装置の構成と略同一である。すなわ
ち、図51の動画像多重化部703および動画像多重化
分離部707の基本構成は、図53(a)(b)に示す
通りであるが、上位階層可変長符号化器801、下位階
層可変長符号化器803および上位階層可変長復号化器
805、下位階層可変長復号化器806の構成が第2実
施形態とは異なっている。すなわち、情報源符号化器7
02で符号化されたデータのうち、例えば図53(a)
のシンタクスで示された上位階層のデータが上位階層可
変長符号化器801で可変長符号化され、多重化部80
3に送られる。また、情報源符号化器702で符号化さ
れたデータのうち、図53(b)のシンタクスで示され
た下位階層のデータが可変長符号化器803で可変長符
号化され、多重化部803に送られる。多重化部803
では、上位階層の符号化データおよび下位階層の符号化
データを多重化し、送信バッファ704に送る。
Encoding and decoding of the upper layer and the lower layer shown in FIG. 53 are performed by the moving picture multiplexing section shown in FIG. These configurations are substantially the same as the configurations of the encoding device / decoding device according to the fifth embodiment. That is, the basic configuration of the video multiplexing section 703 and the video multiplexing / demultiplexing section 707 in FIG. 51 is as shown in FIGS. 53 (a) and 53 (b), but the upper layer variable length encoder 801 and the lower layer The configurations of the variable length encoder 803, the upper layer variable length decoder 805, and the lower layer variable length decoder 806 are different from those of the second embodiment. That is, the source coder 7
02 of the data coded in FIG.
Is variable-length coded by the upper-layer variable-length encoder 801 and the multiplexing unit 80
Sent to 3. Also, of the data encoded by the information source encoder 702, data of a lower hierarchy indicated by the syntax in FIG. 53B is subjected to variable length encoding by a variable length encoder 803, and Sent to Multiplexer 803
Then, the encoded data of the upper layer and the encoded data of the lower layer are multiplexed and sent to the transmission buffer 704.

【0145】そして、この第7実施形態では上位階層可
変長復号化器805および下位階層可変長復号化器80
6内の図32中に示した復号値判定部110では、順方
向復号化器108によって得られた順方向復号結果から
復号値を判定し、最終的な復号結果を出力する。各階層
の順方向復号化器108および逆方向復号化器109で
の誤り判定は、符号語として存在しないビットパターン
が出現した場合、およびチェックビット等で誤りを検出
した場合には、検出位置はその場所とし、前記の判定方
法で誤りが検出されない場合で、復号したビット数が同
期区間内の符号化データのビット数と一致しない場合
は、復号化の最処理位置を誤り検出位置とする。
In the seventh embodiment, the upper layer variable length decoder 805 and the lower layer variable length decoder 80
In FIG. 32, the decoded value determining unit 110 shown in FIG. 32 determines a decoded value from the forward decoding result obtained by the forward decoder 108 and outputs a final decoded result. The error determination in the forward decoder 108 and the backward decoder 109 of each layer is performed when a bit pattern that does not exist as a codeword appears, and when an error is detected by a check bit or the like, the detection position is If no error is detected by the above-described determination method, and if the number of decoded bits does not match the number of bits of the coded data in the synchronization section, the position where decoding is most performed is set as the error detection position.

【0146】(第8実施形態)図54,図55は、本発
明の第8実施形態に係る符号化/復号化装置における情
報源符号化器702,情報源復号化器708の一例をそ
れぞれ示している。まず、図54において、入力画像信
号は、ブロック化回路401でマクロブロックに分割さ
れる。マクロブロックに分割された入力画像信号は、減
算器402に入力され、予測画像信号との差分がとられ
て、予測残差信号が生成される。この予測残差信号と、
ブロック化回路401からの入力画像信号のいずれか一
方を、モード選択スイッチ403により選択し、DCT
(離散コサイン変換)回路404により離散コサイン変
換される。DCT回路で得られたDCT係数データは、
量子化回路405で量子化される。量子化されたデータ
は、2分岐され、一方はDCT係数情報として、動画像
多重化器703におくられる。
(Eighth Embodiment) FIGS. 54 and 55 show examples of an information source encoder 702 and an information source decoder 708 in an encoding / decoding device according to an eighth embodiment of the present invention. ing. First, in FIG. 54, an input image signal is divided into macroblocks by a blocking circuit 401. The input image signal divided into macroblocks is input to the subtractor 402, and the difference between the input image signal and the predicted image signal is calculated to generate a prediction residual signal. This prediction residual signal,
One of the input image signals from the blocking circuit 401 is selected by the mode selection switch 403, and the DCT
(Discrete cosine transform) The circuit 404 performs discrete cosine transform. DCT coefficient data obtained by the DCT circuit is
The quantization is performed by the quantization circuit 405. The quantized data is split into two, one of which is sent to the video multiplexer 703 as DCT coefficient information.

【0147】もう一方は、逆量子化回路406およびI
DCT(逆離散コサイン変換)回路407により量子化
回路405およびDCT回路406の処理と逆の処理が
順次行なわれた後、加算器408でスイッチ410を介
して入力される予測画像信号と加算されることにより、
局部復号信号が生成される。この局部復号信号は、フレ
ームメモリに蓄えられ、動き補償回路411に入力され
る。動き補償回路A010では、入力画像信号と局部復
号信号との間で動き補償を行ない、動きベクトルを求
め、予測画像信号を生成する。このとき求めめられた動
きベクトル情報は、動画像多重化器703に送られる。
モード選択回路412では、動き補償回路410からの
情報に基づいて、各マクロブロックをどのような予測方
式で符号化するかを決定し、その結果が量子化パラメー
タ等ともにモード情報として動画像多重化器703に送
られる。なお、図54において、出力される符号化デー
タはDCT符号化係数,動きベクトル情報,モード情報
の3つが1つに纏められたデータである。
The other is an inverse quantization circuit 406 and I
After the inverse processing of the quantization circuit 405 and the processing of the DCT circuit 406 are sequentially performed by a DCT (inverse discrete cosine transform) circuit 407, the adder 408 adds the predicted image signal input via the switch 410 to the adder 408. By doing
A locally decoded signal is generated. This local decoded signal is stored in the frame memory and input to the motion compensation circuit 411. The motion compensation circuit A010 performs motion compensation between the input image signal and the local decoded signal, obtains a motion vector, and generates a predicted image signal. The motion vector information obtained at this time is sent to the moving image multiplexer 703.
The mode selection circuit 412 determines what prediction method is used to encode each macroblock based on the information from the motion compensation circuit 410, and the result is used to multiplex the moving image as mode information together with the quantization parameter and the like. Is sent to the container 703. In FIG. 54, the coded data to be output is data in which three of DCT coding coefficients, motion vector information, and mode information are combined into one.

【0148】次に、図54により符号化されたデータを
復号化する情報源復号化器708の構成について図55
を参照しながら説明する。図55は、図54に対応する
情報源復号化器708の一例を示している。図55にお
いて、情報源復号化器708は、動画像多重化分離回路
707で分離したモード情報、動きベクトル情報、DC
T係数情報等が入力される。
Next, the configuration of the information source decoder 708 for decoding the data encoded in FIG. 54 will be described with reference to FIG.
This will be described with reference to FIG. FIG. 55 shows an example of the information source decoder 708 corresponding to FIG. In FIG. 55, an information source decoder 708 includes mode information, motion vector information, DC
T coefficient information and the like are input.

【0149】モード情報が入力されるモード判定回路5
04では、モード情報がINTRAならば、モード切替
スイッチ505をオフに選択して、DCT係数情報を、
逆量子化回路501で逆量子化し、IDCT回路502
で逆離散コサイン変換処理を行なうことにより、再生画
像信号を生成させる。この再生画像信号は、フレームメ
モリ506に参照画像として蓄積される一方、再生画像
信号として出力する。モード情報かINTERならば、
モード切替スイッチ505をオフに選択して、DCT係
数情報を、逆量子化回路501で逆量子化し、IDCT
回路502で逆離散コサイン変換処理をおこない、動き
ベクトル情報に基づいて、フレームメモリ504におい
て参照画像を動き補償し、加算器503で足しあわせ
て、再生画像信号を生成させる。この再生画像信号は、
フレームメモリ504に参照画像として蓄積される一
方、再生画像信号として出力する。
Mode determination circuit 5 to which mode information is input
In mode 04, if the mode information is INTRA, the mode changeover switch 505 is selected to be off, and the DCT coefficient information is
Inverse quantization is performed by an inverse quantization circuit 501, and an IDCT circuit 502
Performs a discrete cosine transform process to generate a reproduced image signal. The reproduced image signal is stored as a reference image in the frame memory 506 and is output as a reproduced image signal. If mode information or INTER,
The mode changeover switch 505 is turned off, and the DCT coefficient information is inversely quantized by the inverse quantization circuit 501, and the IDCT
The circuit 502 performs an inverse discrete cosine transform process, motion-compensates the reference image in the frame memory 504 based on the motion vector information, and adds the reference image by the adder 503 to generate a reproduced image signal. This reproduced image signal is
While being stored in the frame memory 504 as a reference image, it is output as a reproduced image signal.

【0150】(第9実施形態)次に、本発明の応用例と
して、本発明の可変長符号化/復号化装置が組み込まれ
た第9実施形態に係る動画像符号化/復号化システムを
適用した画像送受信装置の実施形態を図56を用いて説
明する。パーソナルコンピュータ(PC)1001に備
え付けられたカメラ1002より入力された画像信号
は、PC1001に組み込まれた動画像符号化器709
によって符号化される。動画像符号化器709から出力
される符号化データは、他の音声やデータの情報と多重
化された後、無線機1003より無線で送信され、他の
無線機1004によって受信される。無線機1004で
受信された信号は、画像信号の符号化データおよび音声
データに分解される。これらのうち、画像信号の符号化
データはワークステーション(EWS)1005に組み
込まれた動画像復号化器710によって復号され、EW
S1005のディスプレイに表示される。
(Ninth Embodiment) Next, as an application example of the present invention, a moving picture coding / decoding system according to a ninth embodiment incorporating the variable length coding / decoding device of the present invention is applied. An embodiment of the image transmitting / receiving apparatus described above will be described with reference to FIG. An image signal input from a camera 1002 provided in a personal computer (PC) 1001 is a moving image encoder 709 incorporated in the PC 1001.
Encoded by The coded data output from the video encoder 709 is multiplexed with other audio and data information, transmitted wirelessly from the wireless device 1003, and received by the other wireless device 1004. The signal received by the wireless device 1004 is decomposed into encoded data and audio data of an image signal. Among them, the coded data of the image signal is decoded by the moving image decoder 710 incorporated in the workstation (EWS) 1005, and the EW is decoded.
This is displayed on the display of S1005.

【0151】一方、EWS1005に備え付けられたカ
メラ1006より入力された画像信号は、EWS100
5に組み込まれた動画像符号化器709を用いて上記と
同様に符号化される。符号化データは、他の音声やデー
タの情報と多重化され、無線機1004により無線で送
信され、無線機1003によって受信される。無線機1
003によって受信された信号は、画像信号の符号化デ
ータおよび音声やデータの情報に分解される。これらの
うち、画像信号の符号化データはPC1001に組み込
まれた動画像復号化器710によって復号され、PC1
001のディスプレイに表示される。
On the other hand, the image signal input from the camera 1006 provided in the EWS 1005 is
5 is encoded in the same manner as described above using the moving image encoder 709 incorporated in the image encoding unit 5. The encoded data is multiplexed with other voice or data information, transmitted wirelessly by the wireless device 1004, and received by the wireless device 1003. Radio 1
The signal received by 003 is decomposed into coded data of an image signal and audio and data information. Among them, the coded data of the image signal is decoded by the moving image decoder 710 incorporated in the PC 1001, and the PC 1
001 is displayed on the display.

【0152】(第10実施形態)なお、上述した第1な
いし第9実施形態に係る動画像符号化/復号化装置は、
ハードウェアとしての構成として発明を捉えていたが、
本発明はこれを発展させて上記各々の実施形態に係る符
号化/復号化装置において用いられるデータまたはプロ
グラムを記録する記録媒体としても捉えることができ
る。以下、第10実施形態に係るデータまたはプログラ
ムを記録した記録媒体について説明する。
(Tenth Embodiment) Note that the moving picture coding / decoding devices according to the first to ninth embodiments are
Although the invention was considered as a configuration as hardware,
The present invention can be developed as a recording medium for recording data or a program used in the encoding / decoding device according to each of the above-described embodiments. Hereinafter, a recording medium on which data or a program according to the tenth embodiment is recorded will be described.

【0153】図51に示す情報源符号化器702では、
量子化語の8×8のDCT係数のブロックについてブロ
ックないのスキャンを行なって、LAST(0:ブロッ
クの最後でない非零係数,1:ブロックの最後の非零係
数),RUN(非零係数までの零ランの数)及びLEV
EL(係数の量子化値)を求め、動画像多重化部703
に送る。
In the information source encoder 702 shown in FIG.
A block-free scan is performed on the block of 8 × 8 DCT coefficients of the quantized word, and LAST (0: non-zero coefficient not at the end of the block, 1: non-zero coefficient at the end of the block), RUN (up to the non-zero coefficient) Number of zero runs) and LEV
The EL (quantized value of the coefficient) is obtained, and a moving image multiplexing unit 703 is obtained.
Send to

【0154】動画像多重化部703内の下位階層可変長
符号化器802は、図60に示すINTRA(フレーム
内符号化)の非LAST係数のRUN,LEVELにリ
バーシブル符号の符号語(VLC_CODE)のIND
EXを対応させたINDEXテーブルと、図61に示す
INTER(フレーム間符号化)の非LAST係数のR
UN,LEVELにリバーシブル符号の符号語(VLC
_CODE)のINDEXを対応させたINDEXにテ
ーブルと、図62に示すINTRA,INTER共通の
LAST係数のRUN,LEVELにリバーシブル符号
の符号語(VLC−CODE)のINDEXを対応させ
たINDEXテーブルと、図63,図64に示すIND
EX値と符号語を対応させた符号語テーブルを持ってい
る。
The lower layer variable length encoder 802 in the video multiplexing unit 703 converts the reversible codeword (VLC_CODE) into the RUN and LEVEL of the non-LAST coefficient of INTRA (intra-frame encoding) shown in FIG. IND
INDEX table corresponding to EX and R of non-LAST coefficient of INTER (interframe coding) shown in FIG.
The code word (VLC) of the reversible code is stored in UN and LEVEL.
INDEX corresponding to INDEX of _CODE), an INDEX table in which INDEX of a reversible code word (VLC-CODE) corresponds to RUN and LEVEL of LAST coefficients common to INTRA and INTER shown in FIG. 63, IND shown in FIG.
It has a code word table that associates EX values with code words.

【0155】下位階層可変長符号化器802の動作を、
図57のフローチャートに従って説明する。まず、モー
ド情報に基づいて、INTERの時はINTRAの非L
AST係数とLAST係数の符号語テーブル,INTE
Rの時はINTERの非LAST係数とLAST係数の
INDEXテーブルを選択する(S101)。
The operation of the lower layer variable length encoder 802 is
This will be described with reference to the flowchart in FIG. First, based on the mode information, at the time of INTER, INTRA non-L
AST coefficient and LAST coefficient codeword table, INTE
In the case of R, the INDEX table of the LAST non-LAST coefficient and the LAST coefficient is selected (S101).

【0156】次に、符号語テーブルを用いて符号化する
にあたって、(RUN,LEVEL)がINDEXテー
ブルのRUNの最大値R_max,LEVELの最大値
L_maxと比較して、INDEXテーブル内に存在す
るかどうか確認する(S102)。
Next, at the time of encoding using the code word table, (RUN, LEVEL) is compared with the maximum value R_max of the RUN of the INDEX table and the maximum value L_max of the LEVEL of the INDEX table to determine whether or not it exists in the INDEX table. Confirmation (S102).

【0157】もし、存在した場合、図60〜図62のI
NDEXテーブルを引きINDEXの値が0であるかど
うかチェックを行ない(S104),0でなければ、図
12の符号語テーブルのINDEXの符号語を出力す
る。符号語テーブルの符号語の最終ビットの“s”は、
LEVELの符号を表し、“s”が“0”のときは、L
EVELの符号は正、“s”が“1”のときは、LEV
ELの符号は負である(S105)。INDEXの値が
0であった場合と、範囲外であった場合は、符号語テー
ブルに存在しない係数で、図67に示すようにESCA
PE符号を続けて、LAST係数かどうかの1ビットと
図65および図66のRUNとLEVELの絶対値を固
定長符号化し、この固定長符号化部の先頭に2つのエス
ケープのうち“00001”を付加し、末端にもエスケ
ープ符号を付加する。図63,図64のINDEX値が
0の符号語が、エスケープ符号であり、エスケープ(E
SCAPE)符号として用いられるVLC_CODEの
最終ビット“s”はLEVELの符号を表し、“s”が
“0”ならばLEVELは正、“1”ならばLEVEL
は負である(S106)。
If it exists, I in FIGS.
The NDEX table is checked to check whether the value of INDEX is 0 (S104). If not, the INDEX code word in the code word table of FIG. 12 is output. The "s" of the last bit of the codeword in the codeword table is
LEVEL represents a sign. When “s” is “0”, L
The sign of EVEL is positive, and when "s" is "1", LEV
The sign of EL is negative (S105). When the value of INDEX is 0 and when the value is out of the range, a coefficient that does not exist in the codeword table is used as the ESCA as shown in FIG.
Following the PE code, 1 bit of whether or not it is a LAST coefficient and the absolute values of RUN and LEVEL in FIGS. 65 and 66 are fixed-length coded, and “00001” of the two escapes is added to the head of the fixed-length coding unit. And an escape code at the end. The code word whose INDEX value is 0 in FIG. 63 and FIG. 64 is an escape code, and the escape (E
The last bit "s" of VLC_CODE used as a (CAPE) code indicates a LEVEL code. If "s" is "0", LEVEL is positive; if "1", LEVEL is LEVEL.
Is negative (S106).

【0158】以上説明したように、INDEXテーブル
を用いることにより、ESCAPE符号を用いた場合に
も、探索することなく効率的に、符号語を出力できる。
下位階層可変長復号化器802は、図68,図69の復
号値テーブルを備えており、可変長符号を復号した結果
得られるINDEX値に基づいて動作する。
As described above, by using the INDEX table, even when an ESCAPE code is used, a codeword can be output efficiently without searching.
The lower layer variable length decoder 802 includes the decoded value tables of FIGS. 68 and 69, and operates based on the INDEX value obtained as a result of decoding the variable length code.

【0159】次に、下位階層可変長復号化器の動作を、
図58と図59のフローチャートに従って説明する。図
58は、順方向の場合の復号動作である。まず、可変長
復号を順方向復号する(S201)。次に、復号して得
られたINDEX値が0かどうかをチェックし(S20
2)、0以外の場合は、上位階層のモード情報に基づい
て、図68の復号値テーブルのINTRAとINTER
を選択して、LAST,RUN,LEVELの復号値を
得る(S203)。INDEX値が0の場合は、ESA
PE符号であるから、次に続く固定長符号を復号して、
LAST,RUN,LEVELの復号値を得る(S20
4)。つづいて、末尾のESCAPE符号を復号する
(S205)。LEVELの正負は、符号語の最終ビッ
トが“0”ならば、正であり、“1”ならば、負である
(S206)。
Next, the operation of the lower layer variable length decoder will be described.
This will be described with reference to the flowcharts of FIGS. 58 and 59. FIG. 58 shows the decoding operation in the forward direction. First, the variable length decoding is forward decoded (S201). Next, it is checked whether the INDEX value obtained by decryption is 0 (S20).
2) In cases other than 0, INTRA and INTER of the decoded value table in FIG.
To obtain the decoded values of LAST, RUN, and LEVEL (S203). If the INDEX value is 0, ESA
Since it is a PE code, the following fixed length code is decoded, and
The decoded values of LAST, RUN, and LEVEL are obtained (S20
4). Subsequently, the last ESCAPE code is decoded (S205). The sign of LEVEL is positive if the last bit of the codeword is "0", and negative if it is "1" (S206).

【0160】図59は、逆方向の場合の復号動作であ
る。まず、符号語の最初の1ビットで、LEVELの正
負を決定する。もし、“0”ならば、正であり、“1”
ならば負である(S301)。次に可変長符号を逆方向
復号する(S302)。逆方向復号して得られたIND
EX値が0かどうかチェックし(S303)、0以外の
場合は、上位階層のモード情報に基づいて、図68の復
号値テーブルのINTRAとINTERを選択して、L
AST,RUN,LEVELの復号値を得る(S30
4)。INDEX値が0の場合には、ESCAPE符号
であるから、次に続く固定長符号を復号して、LEVE
L,RUN,LASTの復号値を得る(S305)。つ
づいて、先頭のESCAPE符号を復号する(S30
6)。以上説明したように、復号値テーブルを用いるこ
とで、ESCAPE符号を使った場合にも記憶量を節約
し、効率的に双方向に復号することができる。
FIG. 59 shows a decoding operation in the reverse direction. First, the first bit of the code word determines the sign of LEVEL. If "0", it is positive and "1"
If so, it is negative (S301). Next, the variable length code is decoded in the backward direction (S302). IND obtained by reverse decoding
It is checked whether the EX value is 0 (S303). If the EX value is not 0, INTRA and INTER in the decoded value table of FIG. 68 are selected based on the mode information of the upper layer, and L
The decoded values of AST, RUN, and LEVEL are obtained (S30
4). If the INDEX value is 0, it is an ESCAPE code, so the next fixed-length code is decoded and
The decoded values of L, RUN, and LAST are obtained (S305). Subsequently, the first ESCAPE code is decoded (S30).
6). As described above, by using the decoded value table, even when the ESCAPE code is used, the storage amount can be saved, and efficient bidirectional decoding can be performed.

【0161】上記第10実施形態におけるデコードプロ
セスの補強例について説明する。すなわち、動画像多重
化部703での動画像符号化方式のシンタクスが図53
に示すシンタクスである場合の復号値判定方法について
説明する。
A description will be given of an example of reinforcing the decoding process in the tenth embodiment. That is, the syntax of the moving picture coding method in the moving picture multiplexing unit 703 is shown in FIG.
A method for determining a decoded value in the case of the syntax shown in FIG.

【0162】フレーム内符号化フレームでは、まず、上
位階層のモード情報1とINTRADCが復号される。
もし、誤りが発見されて全てを復号できない場合は、誤
りの生じた同期区間のマクロブロックの復号値を全てN
ot Codedとする。もし、符号化が最初のフレー
ムで時間的に前のフレームが存在しない場合は、灰色あ
るいは特定の色でマクロブロックを埋める。
In the intra-coded frame, first, mode information 1 of the upper layer and INTRADC are decoded.
If all errors cannot be decoded because an error is found, the decoded values of the macroblocks in the synchronous section where the error has occurred are all set to N.
ot Coded. If the encoding is the first frame and no previous frame exists, the macroblock is filled with gray or a specific color.

【0163】下位階層では、モード情報2が誤りのため
復号できない場合、下位階層の符号化データを全て放棄
し、上位階層の復号値を書き換えて、Not Code
dとするか、INTRA DCのみで表示する。また、
誤りのためDCT係数を放棄したマクロブロックは、N
ot Codedとするか、INTRA DCのみで表
示する。
In the lower layer, when the mode information 2 cannot be decoded due to an error, all the encoded data in the lower layer is discarded, the decoded value in the upper layer is rewritten, and the Not Code is rewritten.
d or display only with INTRA DC. Also,
Macroblocks that have abandoned DCT coefficients due to errors
ot Coded or display only with INTRA DC.

【0164】また、INTRAモードのマクロブロック
で、AC−DCT係数の予測を行なっているマクロブロ
ックがある場合は、可変長符号は復号できるが、周辺の
マクロブロックからの予測を行なっているので、周辺の
マクロブロックが復号できていないために復号できない
場合、Not Codedとする。
If there is a macroblock in the INTRA mode in which the AC-DCT coefficient is predicted, the variable length code can be decoded, but the prediction is performed from the surrounding macroblock. If decoding is not possible because the surrounding macroblocks have not been decoded, it is set to Not Coded.

【0165】フレーム間符号化フレームでは、まず、上
位階層のモード情報1と動きベクトルが復号される。も
し、誤りが発見されて全てを復号できない場合は、誤り
が生じた同期区間のマクロブロックの復号値は全てNo
t Codedとされる。もし、全て復号できた場合、
同期符号MMが存在することを確認し、もし、存在しな
ければ、やはり、同期区間のマクロブロックの復号値を
全てNot Codedとする。
In the inter-coded frame, first, mode information 1 and a motion vector of the upper layer are decoded. If all errors cannot be decoded because an error is found, the decoded values of macroblocks in the synchronous section where the error occurred are all No.
t Coded. If everything is decrypted,
It is confirmed that the synchronization code MM exists, and if it does not exist, all decoded values of the macroblock in the synchronization section are set to Not Coded.

【0166】下位階層では、モード情報2及びINTR
A DCで誤りのため復号されない場合、下位階層の符
号化データを放棄し、Not Codedと表示する
か、または、前フレームからの動き補償のみでの表示
(MC Not Coded)に上位階層の復号値を書
き換える。また、誤りのためDCT係数を放棄したマク
ロブロックは、MC Not Codedとする。
In the lower hierarchy, mode information 2 and INTR
If the decoding is not performed due to an error in the ADC, the encoded data of the lower layer is discarded and displayed as Not Coded, or the decoded value of the upper layer is displayed in the motion compensation only from the previous frame (MC Not Coded). Is rewritten. A macroblock in which the DCT coefficient has been abandoned due to an error is referred to as MC Not Coded.

【0167】また、INTRAモードのマクロブロック
で、AC−DCT係数の予測を行なっているマクロブロ
ックがある場合は、可変長符号は復号できるが、周辺の
マクロブロックからの予測を行なっているので、周辺の
マクロブロックが復号できていないために復号できない
場合、Not Codedとする。
If there is a macroblock in the INTRA mode where AC-DCT coefficients are predicted, the variable-length code can be decoded, but prediction is performed from neighboring macroblocks. If decoding is not possible because the surrounding macroblocks have not been decoded, it is set to Not Coded.

【0168】図70はフレーム間符号化フレームのAC
−DCT係数部の詳しい復号値判定方法を示している。
FIG. 70 shows the AC of the inter-coded frame.
13 shows a detailed decoded value determination method for the DCT coefficient section.

【0169】まず、図70(a)に示すように順方向復
号結果と逆方向復号結果で誤りが検出されるマクロブロ
ックの位置(誤り検出位置)が交差しない場合は、誤り
が検出されなかったマクロブロックの復号結果のみを復
号値として使用し、二つの誤り検出位置の復号結果は復
号値として使用せず、上位階層のモード情報の復号結果
に基づいて、INTRAマクロブロックについては、前
フレームをそのまま表示するように、INTRAマクロ
ブロックについては、前フレームより動き補償のみで表
示するように、上位階層の復号結果を書き換える。
First, as shown in FIG. 70 (a), when the macroblock position (error detection position) where an error is detected in the forward decoding result and the reverse decoding result does not intersect, no error is detected. Only the decoding result of the macroblock is used as the decoding value, the decoding result of the two error detection positions is not used as the decoding value, and based on the decoding result of the mode information of the upper layer, the previous frame is determined for the INTRA macroblock. For the INTRA macroblock to be displayed as it is, the decoding result of the upper layer is rewritten so as to display only the motion compensation from the previous frame.

【0170】また、図70(b)に示すように順方向復
号結果と逆方向復号結果の誤りの検出位置が交差する場
合は、順方向復号の結果で誤りが検出されたマクロブロ
ックまでの復号値は、順方向復号結果を使用し、それ以
降の部分は、逆方向復号結果を復号値として使用する。
When the error detection positions of the forward decoding result and the reverse decoding result intersect as shown in FIG. 70 (b), decoding up to the macroblock where the error is detected in the result of the forward decoding. The value uses the forward decoding result, and the subsequent part uses the backward decoding result as the decoded value.

【0171】なお、逆方向復号結果を優先して、逆方向
復号の結果で誤りが検出されたマクロブロックまでの復
号値は、逆方向復号結果を使用し、それ以前の部分は、
順方向復号結果を復号値として使用してもよい。
By giving priority to the result of the backward decoding, the decoded values up to the macroblock in which the error is detected in the result of the backward decoding use the result of the backward decoding.
The forward decoding result may be used as a decoded value.

【0172】さらに、図70(c)に示すように同一の
マクロブロックで順方向復号結果および逆方向復号結果
の両方に誤りが検出される場合は、誤り検出位置のマク
ロブロックの復号値は放棄し、復号値として使用せず
に、上位階層のモード情報の復号結果に基づいて、IN
TRAマクロブロックについては、前フレームをそのま
ま表示するように、INTERマクロブロックについて
は、前フレームよりの動き補償のみで表示するように、
上位階層の復号結果を書き換え、それ以後のマクロブロ
ックに対する復号値は逆方向の復号結果を使用する。
Further, when an error is detected in both the forward decoding result and the reverse decoding result in the same macroblock as shown in FIG. 70 (c), the decoded value of the macroblock at the error detection position is abandoned. Then, instead of using it as a decoding value, based on the decoding result of the mode information of the upper layer, IN
For the TRA macroblock, the previous frame is displayed as it is, and for the INTER macroblock, only the motion compensation from the previous frame is displayed.
The decoding result of the upper layer is rewritten, and the decoding value for the subsequent macroblock uses the decoding result in the reverse direction.

【0173】また、図70(d)に示すようにスタッフ
ィング符号で誤りが検出され、逆方向に復号できない場
合は、順方向復号のみ復号を行ない、誤りが検出された
場合、誤り検出位置以降のマクロブロックは、上位階層
のモード情報の復号結果に基づいて、INTRAマクロ
ブロックについては、前フレームをそのまま表示するよ
うに、INTERマクロブロックについては、前フレー
ムよりの動き補償のみで表示するように、上位階層の復
号結果を書き換え、それ以後のマクロブロックに対する
復号値は逆方向の復号結果を使用する。
Further, as shown in FIG. 70 (d), when an error is detected by the stuffing code and decoding cannot be performed in the backward direction, decoding is performed only in the forward direction. Based on the decoding result of the mode information of the upper layer, the macro block displays the previous frame as it is for the INTRA macro block, and displays only the motion compensation from the previous frame for the INTER macro block, The decoding result of the upper layer is rewritten, and the decoding value for the subsequent macroblock uses the decoding result in the reverse direction.

【0174】図70の復号値判定方法では、マクロブロ
ックを単位に復号値の判定をおこなったが、ブロックの
単位でも、符号語の単位で判定をおこなってもよい。
In the decoded value determination method of FIG. 70, the determination of the decoded value is performed for each macroblock. However, the determination may be performed for each block or each codeword.

【0175】以上実施形態で説明したように、本発明の
可変長符号化/復号化装置は、従来と比較して、より少
ない計算量と記憶量で十分であり、効率的である。
As described in the above embodiment, the variable length coding / decoding device of the present invention requires less calculation and storage compared to the conventional device, and is more efficient.

【0176】具体的には、動画像符号化/復号化装置に
も適用することが可能であり、より少ない計算量と記憶
量で効率的な動画像符号化/復号化装置を提供すること
ができる。
More specifically, the present invention can be applied to a moving picture encoding / decoding apparatus, and an efficient moving picture encoding / decoding apparatus can be provided with a smaller amount of calculation and a smaller amount of storage. it can.

【0177】[0177]

【発明の効果】以上、説明したように本発明によれば、
より少ない計算量と記憶量で効率的に符号化/復号化す
ることができる順方向にも逆方向にも復号可能な可変長
符号化/復号化装置を提供することができる。
As described above, according to the present invention,
It is possible to provide a variable-length encoding / decoding device capable of performing encoding / decoding efficiently with less calculation amount and storage amount and capable of decoding in both the forward and reverse directions.

【0178】また、本発明によれば無駄なビットパター
ンを減らして符号化効率を高め、しかもスタッフィング
符号を用いて同期区間を一定区間を単位に設定する場合
でも、順方向にも逆方向にも復号可能な可変長符号化/
復号化装置を提供することができる。
Further, according to the present invention, useless bit patterns are reduced to improve coding efficiency, and even when a synchronization section is set in units of a fixed section using a stuffing code, it can be used in both the forward and reverse directions. Decodable variable length coding /
A decoding device can be provided.

【0179】また、本発明における符号語の構成方法に
よれば、より幅広い情報シンボルの確率分布に対応で
き、従来適用することのできなかったような情報シンボ
ル数が大きな符号化に対しても適用が可能となる。具体
的には、動画像符号化/復号化システムにも適用するこ
とが可能であり、誤りに強い動画像符号化/復号化シス
テムを提供することができる。
Further, according to the codeword structuring method of the present invention, it is possible to cope with a wider probability distribution of information symbols, and it is also applicable to coding with a large number of information symbols which could not be applied conventionally. Becomes possible. Specifically, the present invention can be applied to a video encoding / decoding system, and can provide a video encoding / decoding system that is resistant to errors.

【0180】しかも、この符号語の構成法によれば符号
化効率が向上し、また符号語のビットパターンの自由度
が高い符号設計ができるため、同期符号を用いて同期区
間の設定を行なう場合でも、同期符号と符号語のビット
パターンが一致することによる疑似同期の問題を回避す
ることができる。
In addition, according to this code word configuration method, the coding efficiency is improved, and a code design having a high degree of freedom in the bit pattern of the code word can be performed. However, it is possible to avoid the problem of pseudo-synchronization due to the coincidence between the bit pattern of the synchronization code and the code word.

【0181】さらに、本発明によれば順方向および逆方
向の復号結果から復号値を判定する際、順方向および逆
方向復号を行なう際の誤り検出結果に応じて、符号化デ
ータの復号値を判定することにより、リバーシブル符号
を伝送路誤りに対して効果的に復号することが可能とな
る。
Further, according to the present invention, when determining the decoded value from the forward and backward decoding results, the decoded value of the encoded data is determined according to the error detection result when performing the forward and backward decoding. By making the determination, the reversible code can be effectively decoded with respect to the transmission path error.

【0182】また、本発明によれば可変長符号の符号語
の誤り検出機能を有する双方向復号化手段で復号処理を
行なう際に、順方向復号処理での誤り検出結果に応じて
符号化データの復号処理を切り替えることで、順方向と
逆方向の復号処理を共用することができることから、回
路規模や演算量を大幅に増加させることなく、伝送路誤
りに対して効果的に復号を行なうことができる。
Further, according to the present invention, when the decoding process is performed by the bidirectional decoding means having a function of detecting an error in a code word of a variable length code, the encoded data is determined according to the error detection result in the forward decoding process. By switching between the decoding processes of (1) and (2), the decoding process in the forward direction and in the reverse direction can be shared, so that decoding can be effectively performed against transmission path errors without significantly increasing the circuit scale and the amount of computation. Can be.

【0183】さらに、本発明によれば符号化側で情報シ
ンボルを重要度に応じて階層化した上で可変長符号化を
行ない、同期区間毎に階層毎の符号化データを作成し、
かつ階層毎の符号化データを多重化することにより、情
報シンボルのシンタクスによらず順方向にも逆方向にも
復号可能であって、より誤りに強い可変長符号化/復号
化を行なうことが可能となる。
Further, according to the present invention, the information symbol is hierarchized in accordance with the importance on the encoding side, and then variable-length encoding is performed to generate encoded data for each layer in each synchronization section.
Also, by multiplexing the encoded data for each layer, it is possible to decode in both the forward and reverse directions regardless of the syntax of the information symbol, and to perform variable-length encoding / decoding that is more resistant to errors. It becomes possible.

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

【図1】本発明の第1実施形態に係る可変長符号化/復
号化装置の構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of a variable-length encoding / decoding device according to a first embodiment of the present invention.

【図2】図1における符号語テーブル作成部を示すブロ
ック図。
FIG. 2 is a block diagram showing a codeword table creation unit in FIG. 1;

【図3】図2における符号語構成部での第1の符号語構
成方法を説明する図。
FIG. 3 is a view for explaining a first codeword configuration method in a codeword configuration unit in FIG. 2;

【図4】第1の符号構成方法で構成した符号語から作成
した順方向および逆方向の復号木を示す図。
FIG. 4 is a diagram showing forward and backward decoding trees created from codewords configured by a first code configuration method.

【図5】図2における符号語構成部での第2の符号語構
成方法を説明する図。
FIG. 5 is a view for explaining a second codeword configuration method in the codeword configuration unit in FIG. 2;

【図6】図2における符号語構成部での第3の符号語構
成方法を説明する図。
FIG. 6 is a view for explaining a third codeword configuration method in the codeword configuration unit in FIG. 2;

【図7】図2における同期区間設定部での同期区間設定
方法を説明する図。
FIG. 7 is a view for explaining a method of setting a synchronous section in a synchronous section setting unit in FIG. 2;

【図8】スタッフィング符号の第1の例を示す図。FIG. 8 is a diagram showing a first example of a stuffing code.

【図9】スタッフィング符号の第2の例を示す図。FIG. 9 is a diagram showing a second example of a stuffing code.

【図10】図2における復号値判定部の動作を説明する
図。
FIG. 10 is a view for explaining the operation of a decoded value determination unit in FIG. 2;

【図11】本発明の第2実施形態に係る動画像符号化/
復号化システムの概略構成を示すブロック図。
FIG. 11 shows video encoding / coding according to the second embodiment of the present invention.
FIG. 2 is a block diagram showing a schematic configuration of a decoding system.

【図12】第2実施形態に係る動画像符号化/復号化シ
ステムにおける符号化データのシンタックスを示す図。
FIG. 12 is a view showing the syntax of encoded data in the video encoding / decoding system according to the second embodiment.

【図13】図11における動画像多重化部および動画像
多重化分離部の構成を示すブロック図。
FIG. 13 is a block diagram showing a configuration of a moving image multiplexing unit and a moving image multiplexing / demultiplexing unit in FIG. 11;

【図14】第2実施形態におけるINTRAおよびIN
TERの非LAST係数の符号語テーブルの一部を示す
図。
FIG. 14 shows INTRA and IN in the second embodiment.
The figure which shows a part of codeword table of the non-LAST coefficient of TER.

【図15】第2実施形態におけるINTRAおよびIN
TERの非LAST係数の符号語テーブルの他の一部を
示す図。
FIG. 15 shows INTRA and IN in the second embodiment.
The figure which shows another part of codeword table of the non-LAST coefficient of TER.

【図16】第2実施形態におけるINTRAおよびIN
TERの非LAST係数の符号語テーブルのさらに別の
一部を示す図。
FIG. 16 shows INTRA and IN in the second embodiment.
The figure which shows another part of the code word table of the non-LAST coefficient of TER.

【図17】第2実施形態におけるINTRAおよびIN
TERのLAST係数の符号語テーブルの一部を示す
図。
FIG. 17 shows INTRA and IN according to the second embodiment.
The figure which shows a part of code word table of LAST coefficient of TER.

【図18】第2実施形態におけるINTRAおよびIN
TERのLAST係数の符号語テーブルの他の一部を示
す図。
FIG. 18 shows INTRA and IN according to the second embodiment.
The figure which shows another part of codeword table of the LAST coefficient of TER.

【図19】第2実施形態におけるエスケープ符号の符号
語テーブルを示す図。
FIG. 19 is a diagram illustrating a codeword table of an escape code according to the second embodiment.

【図20】第2実施形態における符号語テーブルにない
符号語の符号化方式を示す図。
FIG. 20 is a diagram showing a coding method of a codeword not included in a codeword table in the second embodiment.

【図21】第2実施形態における最大の零ランの場合を
示す図。
FIG. 21 is a diagram showing a case of a maximum zero run in the second embodiment.

【図22】第2実施形態における復号値判定部の動作を
説明するためたの図。
FIG. 22 is a diagram for explaining the operation of a decoded value determination unit according to the second embodiment.

【図23】本発明の第3実施形態に係る可変長符号化/
復号化装置の構成を示すブロック図。
FIG. 23 is a diagram illustrating a variable-length encoding / decoding method according to a third embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of a decoding device.

【図24】図23における符号語構成部での第1の符号
語構成方法を説明する図。
FIG. 24 is a view for explaining a first codeword configuration method in the codeword configuration unit in FIG. 23;

【図25】図23における符号語構成部での第2の符号
語構成方法を説明する図。
FIG. 25 is an exemplary view for explaining a second codeword forming method in the codeword forming unit in FIG. 23;

【図26】順方向符号語テーブルと逆方向符号語テーブ
ルを共通化した双方向符号語テーブルの構成を示す図。
FIG. 26 is a diagram showing a configuration of a bidirectional codeword table in which a forward codeword table and a backward codeword table are shared.

【図27】復号化器に誤り検出部を付加した場合の構成
を示すブロック図。
FIG. 27 is a block diagram showing a configuration when an error detection unit is added to the decoder.

【図28】第3実施形態における復号化方法を説明する
図。
FIG. 28 is a view for explaining a decoding method according to the third embodiment;

【図29】第3実施形態における復号値判定部の復号値
判定方法を説明するための図。
FIG. 29 is an exemplary view for explaining a decoding value judgment method of a decoding value judgment unit in the third embodiment.

【図30】本発明の第4の実施形態に係る可変長符号化
/復号化装置の構成を示すブロック図。
FIG. 30 is a block diagram showing a configuration of a variable-length encoding / decoding device according to a fourth embodiment of the present invention.

【図31】図30における一つの階層の可変長符号化部
の構成を示すブロック図。
FIG. 31 is a block diagram showing a configuration of a variable length coding unit of one layer in FIG. 30;

【図32】図30における一つの階層の可変長復号化部
の構成を示すブロック図。
FIG. 32 is a block diagram showing a configuration of a variable length decoding unit for one layer in FIG. 30;

【図33】図30におけるデータ階層化部および多重化
部でのデータ階層化および多重化の例を示す図。
FIG. 33 is a diagram showing an example of data hierarchization and multiplexing in the data hierarchization unit and multiplexing unit in FIG. 30;

【図34】図32における復号値判定部の復号値判定方
法の例を示す図。
FIG. 34 is a diagram showing an example of a decoding value determination method of a decoding value determination unit in FIG. 32;

【図35】第4実施形態に係る可変長符号化/復号化装
置を図11の動画像符号化/復号化システムに組み込ん
だ場合の動画像多重化部および動画像多重化分離部での
動画像符号化方式のシンタックスの第1の例を示す図。
35 shows a moving picture multiplexing section and a moving picture multiplexing / demultiplexing section when the variable length coding / decoding device according to the fourth embodiment is incorporated in the moving picture coding / decoding system of FIG. 11; FIG. 4 is a diagram illustrating a first example of syntax of an image encoding method.

【図36】第4実施形態に係る可変長符号化/復号化装
置を図11の動画像符号化/復号化システムに組み込ん
だ場合の動画像多重化部および動画像多重化分離部での
動画像符号化方式のシンタックスの第2の例を示す図。
FIG. 36 shows a moving image in a moving image multiplexing unit and a moving image multiplexing / demultiplexing unit when the variable length coding / decoding device according to the fourth embodiment is incorporated in the moving image coding / decoding system of FIG. 11; FIG. 9 is a diagram illustrating a second example of the syntax of the image encoding method.

【図37】第4実施形態に係る可変長符号化/復号化装
置を図11の動画像符号化/復号化システムに組み込ん
だ場合の動画像多重化部および動画像多重化分離部での
動画像符号化方式のシンタックスの第3の例を示す図。
FIG. 37 shows a moving picture multiplexing section and a moving picture multiplexing / demultiplexing section when the variable length coding / decoding device according to the fourth embodiment is incorporated in the moving picture coding / decoding system of FIG. 11; The figure which shows the 3rd example of the syntax of an image coding system.

【図38】第4実施形態に係る可変長符号化/復号化装
置を図11の動画像符号化/復号化システムに組み込ん
だ場合の動画像多重化部および動画像多重化分離部での
動画像符号化方式のシンタックスの第4の例を示す図。
FIG. 38 shows a moving image in a moving image multiplexing unit and a moving image multiplexing / demultiplexing unit when the variable length coding / decoding device according to the fourth embodiment is incorporated in the moving image coding / decoding system of FIG. 11; The figure which shows the 4th example of the syntax of an image coding system.

【図39】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 39 is a diagram showing a motion vector encoding table in the fourth embodiment.

【図40】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 40 is a diagram showing an encoding table of a motion vector in the fourth embodiment.

【図41】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 41 is a diagram showing an encoding table of a motion vector in the fourth embodiment.

【図42】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 42 is a diagram showing a motion vector encoding table in the fourth embodiment.

【図43】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 43 is a diagram showing a motion vector encoding table in the fourth embodiment.

【図44】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 44 is a diagram showing a motion vector encoding table in the fourth embodiment.

【図45】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 45 is a view showing an encoding table of a motion vector in the fourth embodiment.

【図46】第4実施形態における動きベクトルの符号化
テーブルを示す図。
FIG. 46 is a diagram showing a motion vector encoding table in the fourth embodiment.

【図47】第4実施形態における動きベクトルの一次元
予測を説明するための図。
FIG. 47 is a view for explaining one-dimensional prediction of a motion vector in the fourth embodiment.

【図48】図35のシンタクスの場合の復号値判定方法
を説明する図。
FIG. 48 is an exemplary view for explaining a decoded value determination method in the case of the syntax in FIG. 35;

【図49】図36のシンタクスの場合の復号値判定方法
を説明する図。
FIG. 49 is an exemplary view for explaining a decoded value determination method in the case of the syntax in FIG. 36;

【図50】本発明の第6実施形態に係る符号化/復号化
装置であり、図1における符号語テーブル作成部の詳細
構成を示すブロック図。
FIG. 50 is a block diagram showing a detailed configuration of a codeword table creation unit in FIG. 1, which is an encoding / decoding device according to a sixth embodiment of the present invention.

【図51】本発明の第7実施形態に係る動画像符号化/
復号化システムの概略構成を示すブロック図。
FIG. 51 is a diagram illustrating moving picture encoding / coding according to the seventh embodiment of the present invention.
FIG. 2 is a block diagram showing a schematic configuration of a decoding system.

【図52】図50における動画像多重化部および動画像
多重化分離部の構成を示すブロック図。
FIG. 52 is a block diagram showing a configuration of a video multiplexing unit and a video multiplexing / demultiplexing unit in FIG. 50;

【図53】第7実施形態に係る動画像多重化部および動
画像多重化分離部での動画像符号化方式のシンタクスの
例を示す図。
FIG. 53 is a view showing an example of the syntax of a moving image encoding method in the moving image multiplexing unit and the moving image multiplexing / demultiplexing unit according to the seventh embodiment.

【図54】本発明の第8実施形態に係る情報源符号化器
の一例を示すブロック図。
FIG. 54 is a block diagram showing an example of an information source encoder according to the eighth embodiment of the present invention.

【図55】本発明の第8実施形態に係る情報源復号化器
の一例を示すブロック図。
FIG. 55 is a block diagram showing an example of an information source decoder according to the eighth embodiment of the present invention.

【図56】本発明の第9実施形態に係る可変長符号化/
復号化装置が組み込まれるシステムの一例を示す図。
FIG. 56 shows a variable-length encoding /
FIG. 2 is a diagram illustrating an example of a system in which a decoding device is incorporated.

【図57】本発明の第10実施形態の可変長符号化器の
動作を示すフローチャート。
FIG. 57 is a flowchart showing the operation of the variable length encoder according to the tenth embodiment of the present invention.

【図58】第10実施形態の順方向可変長復号化器の動
作を示すフローチャート。
FIG. 58 is a flowchart showing the operation of the forward variable length decoder according to the tenth embodiment;

【図59】第10実施形態の逆方向可変長復号化器の動
作を示すフローチャート。
FIG. 59 is a flowchart showing the operation of the backward variable length decoder according to the tenth embodiment;

【図60】INTRA係数のINDEXテーブルを示す
図。
FIG. 60 is a view showing an INDEX table of INTRA coefficients.

【図61】INTER係数のINDEXテーブルを示す
図。
FIG. 61 is a view showing an INDEX table of INTER coefficients.

【図62】LASR係数のINDEXテーブルを示す
図。
FIG. 62 is a view showing an INDEX table of LASR coefficients;

【図63】第10実施形態における符号語テーブルを示
す図。
FIG. 63 is a view showing a codeword table in the tenth embodiment;

【図64】第10実施形態における符号語テーブルを示
す図。
FIG. 64 is a view showing a codeword table in the tenth embodiment;

【図65】第10実施形態におけるRUNの固定長符号
語テーブルを示す図。
FIG. 65 is a view showing a fixed-length codeword table of RUN in the tenth embodiment;

【図66】第10実施形態におけるLEVELの固定長
符号語テーブルを示す図。
FIG. 66 is a view showing a LEVEL fixed-length codeword table according to the tenth embodiment;

【図67】符号語テーブルにない符号語の符号化方式を
示す図
FIG. 67 is a diagram showing an encoding method of a codeword not included in the codeword table.

【図68】第10実施形態における復号値テーブルFIG. 68 is a decryption value table in the tenth embodiment.

【図69】第10実施形態における復号値テーブルFIG. 69 is a decoded value table in the tenth embodiment.

【図70】復号値判定部の動作を説明するための図FIG. 70 is a view for explaining the operation of a decoded value determination unit;

【図71】リバーシブル符号の一般的な復号方法を示す
図。
FIG. 71 is a view showing a general decoding method of a reversible code.

【図72】通常の可変長符号の説明図。FIG. 72 is an explanatory diagram of a normal variable length code.

【図73】従来のリバーシブル符号の説明図。FIG. 73 is an explanatory view of a conventional reversible code.

【図74】従来のスタッフィング符号を示す図。FIG. 74 is a view showing a conventional stuffing code.

【図75】従来の逆復号ができない情報シンボルのシン
タックスを説明するための図。
FIG. 75 is a view for explaining the syntax of an information symbol that cannot be inversely decoded in the related art.

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

51 双方向符号語テーブル 52 アドレス変換器 53 識別信号 61 誤り検出部 101 符号語テーブル作成部 102 符号語テーブル 103 符号化器 104 同期区間設定部 105,205,705 伝送系または蓄積系 106 同期区間検出部 107 バッファ 108 順方向復号化器 109 逆方向復号化器 110 復号値判定部 111 順方向符号語テーブル 112 逆方向符号語テーブル 113,213 符号化部 114,121,214 復号化部 122 符号化データ切替器 123 符号語テーブル切替器 124,62 復号化器 201 符号化テーブル作成部 202 データ階層化部 203 階層別可変長符号化部 204 多重化部 206 多重化分離部 207 階層別復号化部 208 データ合成部 401 ブロック化回路 402 減算器 403 モード選択スイッチ 404 DCT回路 405 量子化回路 406 逆量子化回路 407 IDCT回路 408 加算器 409 フレームメモリ 410 動き補償回路 411 スイッチ 412 モード選択回路 501 逆量子化回路 502 IDCT回路 503 加算器 504 モード判定回路 505 モード切替スイッチ 506 フレームメモリ 701 符号化制御部 702 情報源符号化器 703 動画像多重化器 704 送信バッファ 706 受信バッファ 707 動画像多重化分離器 708 情報源復号化器 709 動画像符号化器 710 動画像復号化器 901 上位階層可変長符号化器 902 下位階層可変長符号化器 903 多重化器 904 多重化分離器 905 上位階層可変長復号化器 906 下位階層可変長復号化器 1001 パーソナルコンピュータ 1002 ワークステーション 1003,1004 無線機 1005,1006 カメラ Reference Signs List 51 bidirectional codeword table 52 address converter 53 identification signal 61 error detector 101 codeword table generator 102 codeword table 103 encoder 104 synchronous section setting section 105, 205, 705 transmission system or storage system 106 synchronous section detection Unit 107 buffer 108 forward decoder 109 backward decoder 110 decoded value determination unit 111 forward codeword table 112 backward codeword table 113,213 encoding unit 114,121,214 decoding unit 122 encoded data Switch 123 Codeword Table Switch 124, 62 Decoder 201 Coding Table Creation Unit 202 Data Hierarchy Unit 203 Variable Length Encoding Unit by Layer 204 Multiplexing Unit 206 Demultiplexing Unit 207 Hierarchical Decoding Unit 208 Data Combiner 401 Blocking circuit 402 Subtraction 403 Mode selection switch 404 DCT circuit 405 Quantization circuit 406 Inverse quantization circuit 407 IDCT circuit 408 Adder 409 Frame memory 410 Motion compensation circuit 411 Switch 412 Mode selection circuit 501 Inverse quantization circuit 502 IDCT circuit 503 Adder 504 Mode decision circuit 505 Mode switch 506 Frame memory 701 Encoding controller 702 Information source encoder 703 Video multiplexer 704 Transmit buffer 706 Receive buffer 707 Video multiplexer / demultiplexer 708 Information source decoder 709 Video encoder 710 Video decoder 901 Upper layer variable length encoder 902 Lower layer variable length encoder 903 Multiplexer 904 Demultiplexer 905 Upper layer variable length decoder 906 Lower layer variable length decoder 1001 Par Naru computer 1002 workstations 1003 and 1004 radio 1005 and 1006 camera

───────────────────────────────────────────────────── フロントページの続き (72)発明者 永 井 剛 神奈川県川崎市幸区小向東芝町1 株式 会社東芝 研究開発センター内 (56)参考文献 特開 平8−340258(JP,A) 特開 平5−300027(JP,A) 渡邊敏明 外3名「MPEG4対応低 ビットレート動画像符号化方式」、信学 技報 VOL.95 NO.581 IE95 −145 PP.39−44 (58)調査した分野(Int.Cl.7,DB名) H03M 7/40 JICSTファイル(JOIS)────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Go Tsuyoshi Nagai 1 Komukai Toshiba-cho, Saiyuki-ku, Kawasaki-shi, Kanagawa Prefecture Toshiba R & D Center (56) References JP-A-8-340258 (JP, A) Kaihei 5-300027 (JP, A) Watanabe Toshiaki, et al. “MPEG4 Low Bit Rate Video Coding”, IEICE Technical Report VOL. 95 NO. 581 IE95-145 PP. 39-44 (58) Field surveyed (Int. Cl. 7 , DB name) H03M 7/40 JICST file (JOIS)

Claims (20)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】順方向にも逆方向にも復号可能な符号語を
含む符号語で構成された可変長符号からなり、所定の同
期区間毎に逆方向に復号可能なスタッフィング符号が挿
入された符号化データを復号する可変長復号化装置にお
いて、 前記符号化データの同期区間を検出する同期区間検出手
段と、 前記同期区間検出手段により検出された同期区間の符号
化データを順方向から復号する順方向復号化手段と、 前記同期区間検出手段により検出された同期区間の符号
化データを逆方向から復号する逆方向復号化手段と、 を有することを特徴とする可変長復号化装置。
1. A stuffing code which comprises a variable length code composed of a code word including a code word which can be decoded in both the forward direction and the backward direction and which can be decoded in the backward direction for each predetermined synchronization section. In a variable length decoding device for decoding encoded data, a synchronous section detecting means for detecting a synchronous section of the encoded data; and decoding the encoded data of the synchronous section detected by the synchronous section detecting means from a forward direction. A variable length decoding device comprising: a forward decoding unit; and a backward decoding unit that decodes coded data of a synchronization section detected by the synchronization section detection unit from a backward direction.
【請求項2】順方向にも逆方向にも復号可能な符号語を
含む符号語で構成された可変長符号からなり、所定の同
期区間毎に逆方向に復号可能なスタッフィング符号が挿
入された符号化データを復号する可変長復号化装置にお
いて、 前記符号化データの同期区間を検出する同期区間検出手
段と、 前記同期区間検出手段により検出された同期区間の符号
化データを復号する順方向および逆方向の両方向の復号
が可能な双方向復号化手段と、 を有することを特徴とする可変長復号化装置。
2. A stuffing code comprising a variable length code composed of a code word including a code word that can be decoded in both the forward direction and the backward direction, and a stuffing code that can be decoded in the backward direction is inserted for each predetermined synchronization section. In a variable length decoding device for decoding encoded data, a synchronous section detecting means for detecting a synchronous section of the encoded data, and a forward direction for decoding encoded data of a synchronous section detected by the synchronous section detecting means; A variable length decoding device, comprising: bidirectional decoding means capable of decoding in both directions in the reverse direction.
【請求項3】前記順方向にも逆方向にも復号可能であっ
て、符号語の予め定められた重みによって符号語の区切
りが分かるように構成された符号語は、順方向にも逆方
向にも復号可能な第1の符号語の先頭および末尾の少な
くとも一方に、順方向にも逆方向にも復号可能な第2の
符号語を付加して構成されることを特徴とする請求項1
または2に記載の可変長復号化装置。
3. A code word which is decodable in both the forward and reverse directions, and which is configured so that the delimiter of the code word can be identified by a predetermined weight of the code word. 2. The method according to claim 1, wherein a second codeword that can be decoded in both the forward and reverse directions is added to at least one of the beginning and end of the first codeword that can be decoded.
Or the variable length decoding device according to 2.
【請求項4】前記順方向にも逆方向にも復号可能であっ
て、符号語の予め定められた重みによって符号語の区切
りが分かるように構成された符号語は、順方向にも逆方
向にも復号可能な第1の符号語の各ビットの直前および
直後の少なくとも一方に、順方向にも逆方向にも復号可
能な第2の符号語を付加して構成されることを特徴とす
る請求項1または2に記載の可変長復号化装置。
4. A code word which can be decoded in both the forward and reverse directions, and is configured so that a code word delimiter can be identified by a predetermined weight of the code word. And a second code word that can be decoded in both the forward direction and the backward direction is added to at least one of immediately before and immediately after each bit of the first code word that can be decoded. The variable length decoding device according to claim 1.
【請求項5】前記所定の同期区間は、同期符号の挿入可
能位置が一定区間単位の整数倍の長さに設定されること
を特徴とする請求項1または2に記載の可変長復号化装
置。
5. The variable length decoding apparatus according to claim 1, wherein the predetermined synchronization section is set such that a position where a synchronization code can be inserted is an integral multiple of a fixed section unit. .
【請求項6】前記一定区間単位はMビットであって、前
記挿入されるスタッフィング符号は1ビット長からMビ
ット長までの何れかの長さの符号であることを特徴とす
る請求項5に記載の可変長復号化装置。
6. The method according to claim 5, wherein the unit of the fixed section is M bits, and the stuffing code to be inserted is a code having any length from 1 bit length to M bit length. A variable-length decoding device according to claim 1.
【請求項7】前記挿入されるスタッフィング符号は
「0」のみまたは「0」に続いて「1」が1から(M−
1)までの個数だけ連続してなる符号であって、総ビッ
ト長がMビット以下であることを特徴とする請求項6に
記載の可変長復号化装置。
7. The stuffing code to be inserted is only "0" or "1" following "0" and "1" from 1 to (M-
7. The variable-length decoding device according to claim 6, wherein the codes are continuous in number up to 1) and have a total bit length of M bits or less.
【請求項8】前記挿入されるスタッフィング符号は、逆
方向から復号して「0」が出現したら区切りとなるよう
な符号により構成されていることを特徴とする請求項1
または2に記載の可変長復号化装置。
8. The stuffing code to be inserted is constituted by a code which serves as a delimiter when "0" appears after decoding in the reverse direction.
Or the variable length decoding device according to 2.
【請求項9】前記スタッフィング符号は、符号化データ
の末尾に挿入されることを特徴とする請求項1または2
に記載の可変長復号化装置。
9. The stuffing code according to claim 1, wherein the stuffing code is inserted at the end of the encoded data.
3. The variable length decoding device according to [1].
【請求項10】前記スタッフィング符号は、逆方向のみ
ならず、順方向にも復号可能な符号により構成されるこ
とを特徴とする請求項1または2に記載の可変長復号化
装置。
10. The variable length decoding device according to claim 1, wherein the stuffing code is constituted by a code that can be decoded not only in the backward direction but also in the forward direction.
【請求項11】順方向にも逆方向にも復号可能な符号語
を含む符号語で構成された可変長符号からなり、所定の
同期区間毎に逆方向に復号可能なスタッフィング符号が
挿入された符号化データを復号する可変長復号化方法に
おいて、 前記符号化データの同期区間を検出する同期区間検出ス
テップと、 前記同期区間検出ステップにより検出された同期区間の
符号化データを順方向から復号する順方向復号化ステッ
プと、 前記同期区間検出ステップにより検出された同期区間の
符号化データを逆方向から復号する逆方向復号化ステッ
プと、 を有することを特徴とする可変長復号化方法。
11. A variable length code composed of code words including code words that can be decoded in both the forward and reverse directions, and a stuffing code that can be decoded in the reverse direction is inserted for each predetermined synchronization interval. In the variable length decoding method for decoding encoded data, a synchronous section detecting step of detecting a synchronous section of the encoded data, and decoding the encoded data of the synchronous section detected by the synchronous section detecting step from a forward direction. A variable length decoding method comprising: a forward decoding step; and a backward decoding step of decoding coded data of a synchronization section detected by the synchronization section detection step from a backward direction.
【請求項12】順方向にも逆方向にも復号可能な符号語
を含む符号語で構成された可変長符号からなり、所定の
同期区間毎に逆方向に復号可能なスタッフィング符号が
挿入された符号化データを復号する可変長復号化方法に
おいて、 前記符号化データの同期区間を検出する同期区間検出ス
テップと、 前記同期区間検出ステップにより検出された同期区間の
符号化データを復号する順方向および逆方向の両方向の
復号が可能な双方向復号化ステップと、 を有することを特徴とする可変長復号化方法。
12. A variable length code composed of codewords including codewords that can be decoded in both the forward and reverse directions, and a stuffing code that can be decoded in the reverse direction is inserted for each predetermined synchronization section. In the variable length decoding method for decoding encoded data, a synchronous section detecting step of detecting a synchronous section of the encoded data, a forward direction of decoding encoded data of a synchronous section detected by the synchronous section detecting step, and A variable-length decoding method, comprising: a bidirectional decoding step capable of decoding in both directions in the reverse direction.
【請求項13】前記順方向にも逆方向にも復号可能であ
って、符号語の予め定められた重みによって符号語の区
切りが分かるように構成された符号語は、順方向にも逆
方向にも復号可能な第1の符号語の先頭および末尾の少
なくとも一方に、順方向にも逆方向にも復号可能な第2
の符号語を付加して構成されることを特徴とする請求項
11または12に記載の可変長復号化方法。
13. A code word which is decodable in both the forward and reverse directions, and is configured so that a code word delimiter can be identified by a predetermined weight of the code word. At least one of the beginning and the end of the first codeword that can be decoded,
13. The variable length decoding method according to claim 11, wherein the variable length decoding method is configured by adding the following codeword.
【請求項14】前記順方向にも逆方向にも復号可能であ
って、符号語の予め定められた重みによって符号語の区
切りが分かるように構成された符号語は、順方向にも逆
方向にも復号可能な第1の符号語の各ビットの直前およ
び直後の少なくとも一方に、順方向にも逆方向にも復号
可能な第2の符号語を付加して構成されることを特徴と
する請求項11または12に記載の可変長復号化方法。
14. A code word which can be decoded in both the forward and reverse directions, and is configured so that a code word delimiter can be identified by a predetermined weight of the code word. And a second code word that can be decoded in both the forward direction and the backward direction is added to at least one of immediately before and immediately after each bit of the first code word that can be decoded. The variable length decoding method according to claim 11.
【請求項15】前記所定の同期区間は、同期符号の挿入
可能位置が一定区間単位の整数倍の長さに設定されるこ
とを特徴とする請求項11または12に記載の可変長復
号化方法。
15. The variable-length decoding method according to claim 11, wherein in the predetermined synchronization section, a position where a synchronization code can be inserted is set to an integral multiple of a fixed section unit. .
【請求項16】前記一定区間単位はMビットであって、
前記挿入されるスタッフィング符号は1ビット長からM
ビット長までの何れかの長さの符号であることを特徴と
する請求項15に記載の可変長復号化方法。
16. The fixed section unit is M bits,
The stuffing code to be inserted is 1 bit long to M
16. The variable length decoding method according to claim 15, wherein the code has any length up to a bit length.
【請求項17】前記挿入されるスタッフィング符号は
「0」のみまたは「0」に続いて「1」が1から(M−
1)までの個数だけ連続してなる符号であって、総ビッ
ト長がMビット以下であることを特徴とする請求項16
に記載の可変長復号化方法。
17. The stuffing code to be inserted is only "0" or "1" following "0" and "1" from 1 to (M-
17. A code consisting of a number of consecutive codes up to 1), wherein the total bit length is M bits or less.
3. The variable length decoding method according to item 1.
【請求項18】前記挿入されるスタッフィング符号は、
逆方向から復号して「0」が出現したら区切りとなるよ
うな符号により構成されていることを特徴とする請求項
11または12に記載の可変長復号化方法。
18. The stuffing code to be inserted,
13. The variable-length decoding method according to claim 11, wherein the variable-length decoding method is configured by a code that becomes a break when "0" appears after decoding in the reverse direction.
【請求項19】前記スタッフィング符号は、符号化デー
タの末尾に挿入されることを特徴とする請求項11また
は12に記載の可変長復号化方法。
19. The variable length decoding method according to claim 11, wherein said stuffing code is inserted at the end of encoded data.
【請求項20】前記スタッフィング符号は、逆方向のみ
ならず、順方向にも復号可能な符号により構成されるこ
とを特徴とする請求項11または12の何れかに記載の
可変長復号化方法。
20. The variable length decoding method according to claim 11, wherein said stuffing code is constituted by a code which can be decoded not only in the backward direction but also in the forward direction.
JP29452299A 1996-09-06 1999-10-15 Variable length decoding apparatus and method Expired - Lifetime JP3030028B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29452299A JP3030028B2 (en) 1996-09-06 1999-10-15 Variable length decoding apparatus and method

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP23677996 1996-09-06
JP29877996 1996-11-11
JP8161497 1997-03-31
JP8-298779 1997-03-31
JP8-236779 1997-03-31
JP9-81614 1997-03-31
JP29452299A JP3030028B2 (en) 1996-09-06 1999-10-15 Variable length decoding apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP24151497A Division JP3011680B2 (en) 1996-09-06 1997-09-05 Variable length coding apparatus and method

Publications (2)

Publication Number Publication Date
JP2000101443A JP2000101443A (en) 2000-04-07
JP3030028B2 true JP3030028B2 (en) 2000-04-10

Family

ID=27466599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29452299A Expired - Lifetime JP3030028B2 (en) 1996-09-06 1999-10-15 Variable length decoding apparatus and method

Country Status (1)

Country Link
JP (1) JP3030028B2 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
渡邊敏明 外3名「MPEG4対応低ビットレート動画像符号化方式」、信学技報 VOL.95 NO.581 IE95−145 PP.39−44

Also Published As

Publication number Publication date
JP2000101443A (en) 2000-04-07

Similar Documents

Publication Publication Date Title
US6104754A (en) Moving picture coding and/or decoding systems, and variable-length coding and/or decoding system
US7203239B2 (en) Variable-length decoding apparatus and decoding method
KR19980024351A (en) Image coding apparatus, image decoding apparatus and image transmission method
US6704494B1 (en) Moving picture coding and/or decoding systems, and variable-length coding and/or decoding system
JP3011680B2 (en) Variable length coding apparatus and method
JP3275003B2 (en) Computer-readable recording medium for recording data relating to variable-length codes
JP3030028B2 (en) Variable length decoding apparatus and method
JP2002009626A (en) Recording medium for recording program used for variable length coding/decoding device
JP3217771B2 (en) Computer-readable recording medium recording a program relating to variable-length codes
JP4131977B2 (en) Variable length decoding device
JP3819638B2 (en) Variable length coding device
JP4199240B2 (en) Variable length decoding device and recording medium recording data or program used in this device
JP3612315B2 (en) Variable length decoding method and apparatus
JP3612314B2 (en) Variable length coding method and apparatus
JP3233360B2 (en) Variable length decoding method and apparatus
JP2003179503A (en) Variable length decoding method and device
JP2003199108A (en) Variable length decoding method and device
JP2003198381A (en) Variable-length coding method and apparatus thereof
JP2003198380A (en) Variable-length coding method and apparatus thereof
JP2003158457A (en) Variable length decoding method and device
JP2003204268A (en) Variable length coding method and device

Legal Events

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

Free format text: PAYMENT UNTIL: 20080204

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090204

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110204

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120204

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120204

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20130204

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20140204

Year of fee payment: 14

EXPY Cancellation because of completion of term