JP3114796B2 - Variable length coding apparatus and method - Google Patents

Variable length coding apparatus and method

Info

Publication number
JP3114796B2
JP3114796B2 JP24020196A JP24020196A JP3114796B2 JP 3114796 B2 JP3114796 B2 JP 3114796B2 JP 24020196 A JP24020196 A JP 24020196A JP 24020196 A JP24020196 A JP 24020196A JP 3114796 B2 JP3114796 B2 JP 3114796B2
Authority
JP
Japan
Prior art keywords
coefficient
zero
group
encoding
coefficient data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP24020196A
Other languages
Japanese (ja)
Other versions
JPH09172379A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP24020196A priority Critical patent/JP3114796B2/en
Publication of JPH09172379A publication Critical patent/JPH09172379A/en
Application granted granted Critical
Publication of JP3114796B2 publication Critical patent/JP3114796B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は画像信号を複数の
周波数帯域に分割して符号化を行なう装置および方法に
関し、特に情報量の圧縮に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and method for coding an image signal by dividing the image signal into a plurality of frequency bands, and more particularly to compression of an information amount.

【0002】[0002]

【従来の技術】一般に、画像信号は膨大な情報量を有し
ているので、記録あるいは伝送するに際して、圧縮して
情報量を削減する試みが種々なされている。画像データ
の圧縮方法として、画像信号を複数の周波数帯域(以
下、サブバンドと記す)にフィルタを用いて分割して圧
縮を行なうサブバンド符号化方式が知られている。
2. Description of the Related Art Generally, an image signal has an enormous amount of information, and various attempts have been made to reduce the amount of information by compressing it when recording or transmitting. As a method of compressing image data, a sub-band encoding method is known in which an image signal is divided into a plurality of frequency bands (hereinafter, referred to as sub-bands) using a filter and compressed.

【0003】図20を用いて、一般的な画像符号化/復
号化の動作フローについて説明する。符号化ステップ
は、入力画像を周波数成分に変換するステップ2001
(例えば、Wavelet変換) と、これを量子化する
ステップ2002と、更にその量子化結果を可変長符号
化するステップ2004とから構成される。データ圧縮
は以下の方法によって実現する。
The operation flow of general image encoding / decoding will be described with reference to FIG. The encoding step converts the input image into frequency components 2001
(For example, Wavelet transform), a step 2002 for quantizing the result, and a step 2004 for performing variable length encoding on the result of the quantization. Data compression is realized by the following method.

【0004】(a)入力画像を周波数成分へ変換すること
によりエネルギー分布に偏りを持たせる。 (b)周波数成分に変化された入力画像を量子化すること
により、周波数成分毎の重みづけを行い、データの発生
頻度に偏りを持たせる。 (c)量子化結果を可変長符号化することにより、頻度の
高いデータには短い符号を、低いデータには長い符号を
割り当て、全体としての平均の符号長を短くすること
で、圧縮できる。
(A) An energy distribution is biased by converting an input image into frequency components. (b) By quantizing the input image changed to the frequency component, weighting is performed for each frequency component, and the occurrence frequency of data is biased. (c) By performing variable-length coding on the quantization result, a short code is assigned to high-frequency data, a long code is assigned to low-frequency data, and compression can be performed by shortening the average code length as a whole.

【0005】上記量子化ステップ2002では、周波数
成分毎のビット配分を指定する量子化テーブル2003
が用いられ、可変長符号化ステップ2004では、発生
頻度(エントロピー)に基づいたハフマンテーブル20
05が用いられる。
[0005] In the quantization step 2002, a quantization table 2003 for designating bit allocation for each frequency component is provided.
Is used, and in the variable length encoding step 2004, the Huffman table 20 based on the frequency of occurrence (entropy) is used.
05 is used.

【0006】一方、復号化ステップは、可変長復号化ス
テップ2007、逆量子化ステップ2009、逆変換ス
テップ2011とで構成される。
On the other hand, the decoding step comprises a variable length decoding step 2007, an inverse quantization step 2009, and an inverse transformation step 2011.

【0007】次に、図21を用いてサブバンド符号化に
ついて説明する。図21において、2101は水平方向
の高域フィルタ(HPF)、2102は水平方向の低域
フィルタ(LPF)、2103、2104は水平方向に
1/2のダウンサンプリングを行なう水平ダウンサンプ
ラ、2105、2107は垂直方向のHPF、210
6、2108は垂直方向のLPF、2109、211
0、2111、2112は垂直方向に1/2のダウンサ
ンプリングを行なう垂直ダウンサンプラである。
Next, subband coding will be described with reference to FIG. In FIG. 21, reference numeral 2101 denotes a horizontal high-pass filter (HPF), reference numeral 2102 denotes a horizontal low-pass filter (LPF), reference numerals 2103 and 2104 denote horizontal downsamplers for performing ダ ウ ン downsampling in the horizontal direction, 2105 and 2107. Is the vertical HPF, 210
6, 2108 are vertical LPFs, 2109, 211
Reference numerals 0, 2111, and 2112 denote vertical downsamplers that perform ダ ウ ン downsampling in the vertical direction.

【0008】図21に示すような構成で画像信号を帯域
分割する場合の分割例を図22に示す。図22(a) では
画像信号が、水平方向,垂直方向共に2帯域に等分割さ
れ、計4つのサブバンドに分割されている状態を示して
いる。各サブバンドの名称は順に水平方向,垂直方向の
サブバンドの状態を表し、Lは低域を表し、Hは高域を
表している。
FIG. 22 shows an example of division in the case where an image signal is divided into bands by the configuration shown in FIG. FIG. 22A shows a state in which the image signal is equally divided into two bands in both the horizontal direction and the vertical direction, and is divided into a total of four subbands. The names of the sub-bands indicate the states of the sub-bands in the horizontal and vertical directions in order, where L indicates a low band and H indicates a high band.

【0009】ウェーブレット変換符号化方式は、サブバ
ンド符号化の1つで、低周波帯域(図22(a) のLL成
分)を細かく分割していき、階層化されたサブバンド分
割を行なう。
The wavelet transform coding method is a type of subband coding, in which a low frequency band (LL component in FIG. 22A) is finely divided, and hierarchical subband division is performed.

【0010】ここで図22(b) に、ウェーブレット変換
方式による分割例を示す。図において、画像データは帯
域幅の異なる計10個のサブバンドに分割されている。
各サブバンドに付加している番号はサブバンド番号を示
す。以下では、この10個のサブバンドに分割されたデ
ータをスキャンして量子化処理を行い、可変長符号化す
る場合について考える。
FIG. 22 (b) shows an example of division by the wavelet transform method. In the figure, image data is divided into a total of ten sub-bands having different bandwidths.
The number added to each subband indicates the subband number. Hereinafter, a case will be considered in which data divided into these ten subbands is scanned, quantized, and subjected to variable length coding.

【0011】従来のスキャン及び可変長符号化の方法と
しては、以下の2つの方法がある。1つ目の方法(方式
Aは、各帯域毎に独立にスキャンし、量子化、及び可変
長符号化を行う方法である。この場合の可変長符号化方
式としては、1次元ハフマン符号化が一般的であり、こ
れは例えば、"IEEE Transactions on Communications、
Scene Adaptive Coder by Wen-Hsiung Chen and Willi
amoK.Pratt 、Vol.Com-32、No.3 、March 1984、P
.225-232"に、その詳細が示されている。
Conventional scanning and variable length coding methods include the following two methods. The first method (method A is a method in which scanning is performed independently for each band to perform quantization and variable-length coding. In this case, one-dimensional Huffman coding is used as the variable-length coding method. This is common, for example, "IEEE Transactions on Communications,
Scene Adaptive Coder by Wen-Hsiung Chen and Willi
amoK. Pratt, Vol. Com-32, No. 3, March 1984, P
. 225-232 "shows the details.

【0012】上記論文では、量子化後の係数データを符
号化するために図23に示すような2つのハフマン符号
のテーブルを使用する。図23(a) のテーブルにより、
ゼロ以外の量子化係数の符号化を行う。その際、係数の
絶対値だけが符号化される。これは絶対値の等しい係数
は同じ頻度で出現するためである。正負符号はハフマン
符号に続いて1ビットが伝送される。また、1つの絶対
値に1つの符号語を割り当てるのは12エントリとし、
それ以外の値(絶対値)は「OTHERコード」に続き
係数データをそのまま付加して伝送される。
In the above-mentioned paper, a table of two Huffman codes as shown in FIG. 23 is used to encode coefficient data after quantization. According to the table of FIG.
Encode non-zero quantized coefficients. At that time, only the absolute value of the coefficient is encoded. This is because coefficients having the same absolute value appear at the same frequency. One bit is transmitted following the Huffman code for the sign. One code word is assigned to one absolute value in 12 entries.
Other values (absolute values) are transmitted after adding the coefficient data as they are following the “OTHER code”.

【0013】図23(b) のテーブルからは、ゼロ係数に
関しランレングス符号化を行う。従って、復号化の際に
2つの表を区別するために、ランレングス符号の識別符
号として、ランレングスプレフィクス(RL PREF
IX)と呼ばれる特別な符号語を使用する。
From the table shown in FIG. 23B, run-length encoding is performed on the zero coefficient. Therefore, in order to distinguish the two tables at the time of decoding, the run length prefix (RL PREF) is used as the identification code of the run length code.
IX) is used.

【0014】図23(a),(b) に示すテーブルは、それぞ
れ可変長符号化を行なうデータ値(絶対値)、あるい
は、ランレングス長の発生頻度に基づき作成される。図
23(a) において、絶対値=`1´、発生頻度が非常に
高いため、1bitコードが割り当てられている。一
方、絶対値=`9´*〜`12´*等の値は、その発生
頻度がさほど高くないため8bitコードとなってい
る。可変長符号は、このような頻度の高い係数値を短い
コード長で表すことにより、データ量を圧縮する。
The tables shown in FIGS. 23A and 23B are created based on the data value (absolute value) to be subjected to variable length coding or the occurrence frequency of the run length length. In FIG. 23A, the absolute value = 値 1 ′, and the occurrence frequency is extremely high, so that a 1-bit code is assigned. On the other hand, values such as absolute value = $ 9 '* to $ 12' * are 8-bit codes because their occurrence frequency is not so high. The variable-length code compresses the data amount by expressing such a frequent coefficient value with a short code length.

【0015】また、本方式はハフマン符号をゼロ以外の
係数とゼロランとに別々に割り当てて符号化を行うた
め、1次元ハフマン符号化と呼ばれている。
In addition, the present method is called one-dimensional Huffman coding because coding is performed by separately assigning a Huffman code to a coefficient other than zero and a zero run.

【0016】次に、2つ目の方法(方式B)は、符号化
結果が、8×8のブロック係数になるようサブバンド周
波数成分をスキャンし、量子化、及び可変長符号化を行
う方法であり、この場合の可変長符号化方式としては、
次に説明する2次元ハフマン符号化を前提としている。
Next, a second method (method B) is a method in which subband frequency components are scanned so that the coding result becomes 8 × 8 block coefficients, and quantization and variable length coding are performed. In this case, as a variable-length coding method,
It is assumed that two-dimensional Huffman coding described below will be performed.

【0017】ブロック係数を得るスキャン方法として
は、特開平4−245863に記載されているような
「階層表現された信号の符号化方式」がある。これは、
図24に示すようにWavelet変換した後の10個
の周波数成分のうち、低周波から高周波にかけてスキャ
ンし、相関性ある8×8のブロック係数を得ることを目
的としている。
As a scanning method for obtaining a block coefficient, there is a "coding method for hierarchically expressed signals" as described in Japanese Patent Application Laid-Open No. 4-245683. this is,
As shown in FIG. 24, the object is to scan from low frequency to high frequency out of the 10 frequency components after the Wavelet transform to obtain a correlated 8 × 8 block coefficient.

【0018】2次元ハフマン符号化は、ゼロ以外の係数
データとゼロランとを1つの組としてハフマン符号を割
り当てるものであり、例えば、特開昭63−13253
0に記載されているような「ビットレート低減方法及び
装置」がある。この方式は、8×8などブロック分割し
た係数データの符号化において、より効率的となること
から、JPEGやMPEGで採用されている。
In the two-dimensional Huffman coding, a Huffman code is assigned as a set of coefficient data other than zero and zero run.
There is a “bit rate reduction method and device” as described in No. 0. This method is employed in JPEG and MPEG because it is more efficient in encoding coefficient data obtained by dividing a block such as 8 × 8.

【0019】本願発明者らは、一般のTV中継の映像シ
ーンを用い、図20のWavelet変換ステップ20
01、量子化ステップ2002まで同じ処理を施し、可
変長符号化ステップ2004として上記2つの方式を比
較した。評価条件は以下の表1に示す通りである。量子
化テーブルとしては、輝度(Y) 成分と色差((UV) 成分に
分けて図25に示すものを使用する。具体的には、Wa
velet変換後の係数データを図25に示す値で除算
する。また、図21に示すWavelet変換を行うフ
ィルタ(HPF、LPF)としては、以下に示すSSKF(S
ymmetyric Short Kernel Filter)を用いた。
The present inventors use a general TV broadcast video scene and perform a Wavelet conversion step 20 in FIG.
01, the same processing was performed up to the quantization step 2002, and the above two methods were compared as the variable length coding step 2004. The evaluation conditions are as shown in Table 1 below. As the quantization table, a table shown in Fig. 25 which is divided into a luminance (Y) component and a chrominance ((UV) component) is used.
The coefficient data after the velocity conversion is divided by the value shown in FIG. The filters (HPF, LPF) for performing the Wavelet transform shown in FIG. 21 include SSKF (S
ymmetyric Short Kernel Filter) was used.

【0020】[0020]

【表1】 [Table 1]

【0021】符号化効率の評価結果を以下の表2に示
す。方式Bの符号化後のデータサイズを100%として
比較した。
Table 2 below shows the evaluation results of the coding efficiency. The comparison was made assuming that the data size after encoding in the method B was 100%.

【0022】[0022]

【表2】 [Table 2]

【0023】以上より、SIFサイズ相当の画像をウェ
ーブレット変換により約1/10に圧縮する場合、各帯
域毎に独立に符号化する1次元ハフマン方式の方が符号
化効率に優れるという結果が得られた。これは、今回、
評価対象となったデータの圧縮率に対して、高周波成分
の量子化ステップを大きくしたことによりゼロラン、す
なわちゼロの連続する長い係数が多く発生したためと考
えられる。すなわち、8×8の小さなブロックでの符号
化より、帯域毎の大きなブロックでの符号化の方が効率
がよいということである。
As described above, when an image equivalent to the SIF size is compressed to about 1/10 by the wavelet transform, a result is obtained in which the one-dimensional Huffman method of independently encoding each band has higher encoding efficiency. Was. This is
It is considered that, because the quantization step of the high-frequency component was increased with respect to the compression ratio of the data to be evaluated, zero run, that is, many long continuous coefficients of zero occurred. That is, it is more efficient to encode a large block for each band than to encode a small 8 × 8 block.

【0024】ここで、上記論文で述べられている1次元
ハフマン符号化を実現するための装置について、図2
6,図27を用いて、その詳細な動作を説明する。図2
6は、従来の1次元ハフマン符号化装置の一例のブロッ
ク図を示す。例えば、図22(b) における画像サイズを
320×208とすると、サブバンド3のサイズは40
×26となり、1040の係数データで構成されている
ことになる。以下では、先ずゼロラン符号化の動作につ
いて説明する。
Here, an apparatus for realizing the one-dimensional Huffman coding described in the above-mentioned paper is shown in FIG.
The detailed operation will be described with reference to FIG. FIG.
FIG. 6 is a block diagram showing an example of a conventional one-dimensional Huffman coding apparatus. For example, assuming that the image size in FIG.
X26, which is composed of 1040 coefficient data. Hereinafter, the operation of the zero-run encoding will be described first.

【0025】サブバンド3をスキャンした場合、以下の
ような順に係数が構成されている場合を考える。 係数[1]、ゼロラン[3]、係数[2]、ゼロラン
[15]、係数[3]、ゼロラン[503]、係数
[1]、ゼロラン[517] ゼロ判定部2601では、係数データを一つ読み込み、
読み込んだ係数データが0であるかどうかを判定する。
係数データが0ではない場合は、係数テーブルデコード
部2606に係数データを送り、係数テーブル2605
を用いて係数データを符号化する。この係数データの符
号化動作については後述する。
When the sub-band 3 is scanned, it is assumed that coefficients are formed in the following order. Coefficient [1], Zero run [3], Coefficient [2], Zero run [15], Coefficient [3], Zero run [503], Coefficient [1], Zero run [517] The zero determination unit 2601 stores one coefficient data. Loading,
It is determined whether or not the read coefficient data is 0.
If the coefficient data is not 0, the coefficient data is sent to the coefficient table decoding unit 2606, and the coefficient table 2605 is sent.
Is used to encode the coefficient data. The operation of encoding the coefficient data will be described later.

【0026】一方、読み込んだ係数データがゼロ判定部
2601で0であると判定されると、ゼロカウンタ26
03はゼロの連続する長さ(以下、ゼロラン長と呼ぶ)
を1カウントする。ゼロカウンタ2603はゼロ判定部
2601が係数データがゼロではないと判定するまで、
この動作を続ける。
On the other hand, if the read coefficient data is determined to be 0 by the zero determination section 2601, the zero counter 26
03 is a continuous length of zero (hereinafter referred to as zero run length)
Is counted by 1. The zero counter 2603 is used until the zero determination unit 2601 determines that the coefficient data is not zero.
Continue this operation.

【0027】ゼロ判定部2601が係数データがゼロで
はないと判定すると、ゼロカウンタ2603はカウント
したゼロラン長をゼロラン符号化部2604に送り、ゼ
ロラン長を0にクリアする。
When the zero determination unit 2601 determines that the coefficient data is not zero, the zero counter 2603 sends the counted zero run length to the zero run encoding unit 2604, and clears the zero run length to zero.

【0028】ゼロラン符号化部2604は送られてきた
ゼロラン長を符号テーブル2605を用いて符号化す
る。ゼロラン用の符号テーブルは、図23(b) に示すも
のである。但し、実際には図23(b) のハフマンコード
の先頭にゼロラン符号を意味する図23(a) の“RL
PREFIX”コードを付与した構成となる。
The zero-run encoding unit 2604 encodes the transmitted zero-run length using the code table 2605. The code table for zero run is as shown in FIG. However, actually, the “RL” in FIG. 23A, which means a zero-run code at the beginning of the Huffman code in FIG.
The configuration is such that a “PREFIX” code is added.

【0029】図27はゼロラン符号部2604の処理を
説明する図である。図において、各ステップは以下の処
理を行う。 (2701)ゼロラン長zeroがゼロラン長r(r>
0、rは整数であり、処理できる最大ラン長を表す) よ
りも小さいかどうかを判定する。ゼロラン長zeroが
ゼロラン長rより大きい場合は以下に示す(270
2),(2703)の処理を行い、小さい場合は以下に
示す(2704)の処理を行なう。
FIG. 27 is a view for explaining the processing of the zero-run code section 2604. In the figure, each step performs the following processing. (2701) Zero run length zero is zero run length r (r>
0, r are integers and represent the maximum run length that can be processed). The case where the zero run length zero is larger than the zero run length r is shown below (270).
2) and (2703) are performed, and if smaller, the process of (2704) shown below is performed.

【0030】(2702)ゼロラン長rの符号化を行な
う。 (2703)ゼロラン長zeroからゼロラン長rを減
算し、(2701)の処理を行なう。 (2704)ゼロラン長zeroを符号化する。
(2702) Encoding of the zero run length r is performed. (2703) The zero run length r is subtracted from the zero run length zero, and the process of (2701) is performed. (2704) The zero run length zero is encoded.

【0031】以上のような動作をサブバンド3の係数デ
ータがなくなるまで行なう。
The above operation is performed until the coefficient data of subband 3 is exhausted.

【0032】ゼロランのテーブルサイズを255(r=
255)とした場合の符号結果を図6(a) に示す。ゼロ
ラン503は符号が存在しないので、 503/255= 2 あまり 3 となることから、ゼロラン255の符号2個とゼロラン
3の符号1個で表されている。
The table size of the zero run is set to 255 (r =
FIG. 6 (a) shows the code result in the case of (255). Since the zero-run 503 has no code, 503/255 = 2, which is much more than 3, so it is represented by two codes of the zero-run 255 and one code of the zero-run 3.

【0033】また、ゼロラン符号化部2604は、最後
の係数データがゼロである場合は、その時のゼロラン長
は符号化せず、EOB(End Of Block)コ
ードで符号化を行なう。
When the last coefficient data is zero, the zero-run encoding unit 2604 does not encode the zero-run length at that time, but performs encoding using an EOB (End Of Block) code.

【0034】次に、非ゼロ(係数)データの符号化動作
について説明する。サブバンド3が以下のような順に係
数が構成されている場合を考える。 係数[1]、係数[20]、係数[18]、係数[4
0]、ゼロラン[10]、係数[−5]、ゼロラン[1
025] ゼロ判定部2601は係数データを1個ずつ読み込み、
読み込んだ係数データがゼロ判定部2601で0でない
と判定されると、係数コード生成部2607は、係数テ
ーブル2605を用いて符号化する。
Next, the encoding operation of non-zero (coefficient) data will be described. Consider a case in which the coefficients of subband 3 are configured in the following order. Coefficient [1], coefficient [20], coefficient [18], coefficient [4
0], zero run [10], coefficient [-5], zero run [1]
[025] The zero determination unit 2601 reads the coefficient data one by one,
If the read coefficient data is determined not to be 0 by the zero determination unit 2601, the coefficient code generation unit 2607 performs encoding using the coefficient table 2605.

【0035】符号化に際しては、全ての係数値に独立に
符号語を割り当てるのではなく、図23(a) に示すよう
に、発生頻度に応じて、独立に符号語を割り当てる「係
数コード(AMPLITUDE1〜12)処理と、それ
以外の「係数OTHERコード(AMPLITUDE1
3)」処理とに分離したフォーマットで行なう。
At the time of encoding, instead of independently assigning a code word to all coefficient values, as shown in FIG. 23 (a), a code word is independently assigned according to the frequency of occurrence. -12) processing and other "coefficient other code (AMPLITUDE1
3) The processing is performed in a format separated from the processing.

【0036】動作を説明すると、係数テーブルデコード
部2606は、入力される係数データの絶対値と、係数
テーブル2605の係数値(AMPLITUDE)とを
比較し、テーブル番号を決定する。
In operation, the coefficient table decoding unit 2606 compares the absolute value of the input coefficient data with the coefficient value (AMPLITUDE) of the coefficient table 2605 to determine a table number.

【0037】上記したデータ列の場合、係数テーブルデ
コード部2606は、先頭の係数値[1]に対して、テ
ーブル番号“1”を係数コード生成部2607に出力す
る。係数コード生成部2607は、符号テーブル260
2を用いて割り当てられた符号語を読み出し、図11
(a) の係数コードフォーマットでデータ選択部2609
に出力する。データ選択部2609は、テーブル番号が
“1”〜“12”以外であれば係数OTHERコード生
成部2608からのデータを選択する。
In the case of the above data string, the coefficient table decoding section 2606 outputs a table number “1” to the coefficient code generating section 2607 for the first coefficient value [1]. The coefficient code generator 2607 includes a code table 260
2 is read out using FIG.
Data selector 2609 in coefficient code format (a)
Output to If the table number is other than “1” to “12”, the data selection unit 2609 selects data from the coefficient other code generation unit 2608.

【0038】2番目の係数値[20]では、係数テーブ
ルデコード部2606は、係数テーブル2605の保持
する係数値と一致しないことから、テーブル番号“1
3”を係数OTHERコード生成部2608に出力す
る。係数OTHERコード生成部2608は、符号テー
ブル2602を用いて割り当てられた符号語を読み出
し、図11(b) の係数OTHERコードフォーマットで
データ選択部2609に出力する。この時、元の係数デ
ータの有効ビット数が12ビットであれば、12ビット
の係数値をOTHER符号と合成して出力する。
In the case of the second coefficient value [20], the coefficient table decoding unit 2606 does not match the coefficient value held in the coefficient table 2605.
3 "is output to the coefficient OTHER code generation unit 2608. The coefficient OTHER code generation unit 2608 reads the assigned code word using the code table 2602, and uses the coefficient OTHER code format shown in FIG. At this time, if the number of effective bits of the original coefficient data is 12 bits, the coefficient value of 12 bits is combined with the OTHER code and output.

【0039】以上のような動作をサブバンド3の係数デ
ータがなくなるまで行う。この時の可変長符号化装置の
出力結果を図12(a) に示す。
The above operation is performed until the coefficient data of subband 3 is exhausted. FIG. 12A shows the output result of the variable length coding device at this time.

【0040】[0040]

【発明が解決しようとする課題】従来の可変長符号化装
置及び方法は以上のように構成されており、画像信号を
複数の周波数帯域に分割して符号化を行なうことで、膨
大な情報量を有する画像信号を圧縮して情報量を削減し
て、記録あるいは伝送することができるものであった
が、以下のような3つの課題点を有する。
The conventional variable-length coding apparatus and method are configured as described above. By dividing an image signal into a plurality of frequency bands and performing coding, an enormous amount of information can be obtained. Can be recorded or transmitted by reducing the amount of information by compressing an image signal having the following. However, it has the following three problems.

【0041】すなわち、 (1) 図23(b) に示すように、ゼロラン長符号用のテー
ブルサイズが30エントリと大きく、回路規模が大きく
なる。 (2) 長いゼロランは、ゼロラン255の符号の繰り返し
で表さなければならず、ゼロラン長が大きくなればなる
ほど、その符号結果が冗長となる。今回の評価画像(3
20×208)でも、一番大きなサブバンド(サブバン
ド8、9、10)の係数データ数は160×100=1
6000となり、かなり長いゼロランが存在すると考え
られ、さらに冗長度が増し、符号化効率も悪くなる。 (3) ゼロ以外の係数の符号化に関しては、係数OTHE
Rコードの生成の際、元の係数値のビット数をそのまま
符号化の対象データとしている。ところが、量子化処理
により係数データの有効ビット数は、元の係数値のビッ
ト数以下になっている。よって、係数データを固定長で
取り扱う従来の可変長符号化装置では符号化効率を低下
させていることになる。
(1) As shown in FIG. 23 (b), the table size for the zero-run length code is as large as 30 entries, and the circuit scale is large. (2) A long zero run must be represented by repeating the code of the zero run 255, and the longer the zero run length, the more redundant the code result. This evaluation image (3
20 × 208), the number of coefficient data of the largest subband (subbands 8, 9, and 10) is 160 × 100 = 1.
6000, which is considered to be a very long zero run, further increasing the redundancy and deteriorating the coding efficiency. (3) For encoding non-zero coefficients, the coefficient OTHE
When generating the R code, the number of bits of the original coefficient value is directly used as the encoding target data. However, the number of effective bits of the coefficient data has become smaller than the number of bits of the original coefficient value due to the quantization processing. Therefore, the coding efficiency is reduced in the conventional variable-length coding apparatus that handles coefficient data with a fixed length.

【0042】この発明は上記のような問題点に鑑みてな
されたもので、サイズの大きいゼロラン符号用テーブル
を用意しなくても、ゼロラン長の符号化の冗長度を抑え
ることができる可変長符号化装置及び方法を得ることを
目的とする。
The present invention has been made in view of the above problems, and a variable length code capable of suppressing the redundancy of zero run length encoding without preparing a large size zero run code table. It is an object of the present invention to obtain a chemical conversion device and method.

【0043】また、量子化処理後の有効ビット数に応じ
て、非ゼロの係数符号化の冗長度を抑えることができる
可変長符号化装置および方法を得ることを目的とする。
It is another object of the present invention to provide a variable length coding apparatus and method capable of suppressing the redundancy of non-zero coefficient coding according to the number of effective bits after the quantization processing.

【0044】[0044]

【課題を解決するための手段】本発明の第1の可変長符
号化方法及び装置では、グループテーブルとゼロラング
ループ化手段とを備え、ゼロランとなる係数データに対
しては、上記グループテーブルによってその大きさに応
じてグループ分けした後、これを符号化するようにした
ので、長いゼロラン長でも、少ないゼロランテーブルサ
イズでゼロラン長を効率良く圧縮することができる。
The first variable length coding method and apparatus according to the present invention include a group table and a zero-run grouping means. After grouping according to the size, this is encoded, so that even with a long zero run length, the zero run length can be efficiently compressed with a small zero run table size.

【0045】本発明の第2の可変長符号化方法及び装置
では、任意の係数ビット数に対応した係数符号化手段を
備え、係数データがゼロでない(非ゼロ)場合、これを
符号化し、量子化後の係数データの有効ビット数ととも
に符号化するようにしたので、量子化後の有効ビット数
に応じた係数符号化を行うことができ、非ゼロの係数デ
ータの符号化効率を高めることが可能となる。
The second variable length coding method and apparatus according to the present invention include coefficient coding means corresponding to an arbitrary number of coefficient bits, and when coefficient data is not zero (non-zero), the coefficient data is coded and quantized. Since the encoding is performed together with the number of effective bits of the quantized coefficient data, coefficient encoding according to the number of effective bits after quantization can be performed, and the encoding efficiency of non-zero coefficient data can be improved. It becomes possible.

【0046】本発明の第3の可変長符号化方法及び装置
は、係数値を所定の範囲毎にグループ化して符号化を行
うようにしたので、前記の効果に加えて、係数値の分散
が増える低周波成分の符号化などでも、符号化効率を高
めることができる。
According to the third variable length coding method and apparatus of the present invention, coefficient values are grouped for each predetermined range and coding is performed. Encoding efficiency can be increased even in encoding of increasing low frequency components.

【0047】本発明の第4の可変長符号化方法及び装置
は、係数データのグループ化方法を選択する手段を備
え、サブバンド毎に係数値に対する符号語の割り当て方
法を最適化するようにしたので、更に効率よく符号化が
行えることになる。
The fourth variable-length coding method and apparatus according to the present invention include means for selecting a grouping method of coefficient data, and optimizes a method of assigning a code word to a coefficient value for each subband. Therefore, encoding can be performed more efficiently.

【0048】[0048]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

実施の形態1.図1は本発明の実施の形態1による可変
長符号化装置及び方法において用いられる符号化装置の
ブロック図を示す。図1において、101はゼロ判定
部、102は係数符号部、103はゼロカウンタ、10
4はゼロラングループデコード部、105はゼロラン符
号化部、106はグループテーブル、107は符号テー
ブルである。
Embodiment 1 FIG. FIG. 1 shows a block diagram of an encoding device used in a variable length encoding device and method according to Embodiment 1 of the present invention. In FIG. 1, 101 is a zero determination unit, 102 is a coefficient sign unit, 103 is a zero counter, 10
4 is a zero-run group decoder, 105 is a zero-run encoder, 106 is a group table, and 107 is a code table.

【0049】次に動作について説明する。ここでは、画
像データを、図22(b) に示すように、サブバンド符号
化で10個のサブバンドに分割した場合を考える。各サ
ブバンドはそれぞれ量子化を施された係数データで構成
される。サブバンドに記載されている番号はサブバンド
番号を示す。例えば、図5(b) における画像サイズを3
20×208とすると、サブバンド3のサイズは40×
26となり、1040の係数データで構成されているこ
とになる。各サブバンドはそれぞれ独立に符号化され
る。
Next, the operation will be described. Here, it is assumed that the image data is divided into ten sub-bands by sub-band coding as shown in FIG. Each sub-band is composed of quantized coefficient data. The number described in the subband indicates the subband number. For example, if the image size in FIG.
Assuming 20 × 208, the size of subband 3 is 40 ×
26, which is composed of 1040 coefficient data. Each subband is independently encoded.

【0050】サブバンド3をスキャンした場合、以下の
ような順に構成されている場合を考える。 係数[1]、ゼロラン[3]、係数[2]、ゼロラン
[15]、係数[3]、ゼロラン[503]、係数
[1]、ゼロラン[517] サブバンドを構成する係数データは順に読み出され、ゼ
ロ判定部101に送られる。ゼロ判定部101では送ら
れてきた係数データが0であるかどうかを判定する。
When the sub-band 3 is scanned, it is assumed that the sub-band 3 is configured in the following order. Coefficient [1], Zero run [3], Coefficient [2], Zero run [15], Coefficient [3], Zero run [503], Coefficient [1], Zero run [517] Coefficient data constituting the subband is read out in order. And sent to the zero determination unit 101. The zero determination unit 101 determines whether the transmitted coefficient data is 0.

【0051】ゼロ判定部101において0であると判定
された場合は、ゼロランカウンタ103によってゼロラ
ン長を1カウントする。
When the zero determination section 101 determines that the value is 0, the zero run counter 103 counts the zero run length by one.

【0052】ゼロカウンタ103はゼロ判定部101に
おいて係数データが0ではないと判定するまでカウント
を続ける。
The zero counter 103 continues counting until the zero determination unit 101 determines that the coefficient data is not 0.

【0053】ゼロ判定部101において係数データが0
ではないと判定されると、ゼロランカウンタは現在のゼ
ロラン長をゼロラングループデコード部104に送り、
ゼロラン長をクリアする。
In the zero determination section 101, the coefficient data is 0
Otherwise, the zero-run counter sends the current zero-run length to the zero-run group decoding unit 104, and
Clear the zero run length.

【0054】ゼロラングループデコード部104は送ら
れてきたゼロラン長からグループテーブル106を用い
てグループ番号を決定する。
The zero-run group decoding unit 104 determines a group number using the group table 106 based on the transmitted zero-run length.

【0055】上記グループテーブル106を図2に示
す。図2に示すように、ゼロラン長は16個のグループ
に分けられる。すなわち、出現頻度の高いゼロラン長1
〜7はそのまま独立なグループとし、それ以外のゼロラ
ン長は2のベキ乗で表現できる範囲でグループ分けをし
ている。
FIG. 2 shows the group table 106. As shown in FIG. 2, the zero run length is divided into 16 groups. In other words, the zero run length 1 that appears frequently
7 are independent groups as they are, and the other zero run lengths are grouped in a range that can be expressed by a power of 2.

【0056】ゼロラン長2048以上に関しては、発生
頻度がかなり低いと考えられるので、ひとまとめにして
いる。これは高域のサブバンドであればあるほど、ゼロ
ランでサブバンドが終了する場合が多いと考えられ、最
後のゼロランはEOB(End Of Block)で
省略されてしまうことにも起因している。
As for the zero run length 2048 or more, it is considered that the frequency of occurrence is considered to be extremely low. It is considered that the higher the sub-band, the more often the sub-band ends with zero run, and the last zero run is omitted in EOB (End Of Block).

【0057】有効ビット数はゼロラン長を表すために有
効なビット数を表している。図3はそれぞれのグループ
におけるゼロラン長を表している。ゼロラン長は15ビ
ットで構成されており、LSB(最下位ビット;Least
Siginificant Bit)詰めで格納されている。ゼロラン長
を表すために有効なビット数は、 (ゼロラン長を表すために最低限必要なビット数) −1 となる。これはゼロランのグループを2のベキ乗で表現
できる範囲でグループ分けしていることに起因する。
The number of effective bits indicates the number of bits effective to represent the zero run length. FIG. 3 shows the zero run length in each group. The zero run length is composed of 15 bits, and LSB (least significant bit; Least
Siginificant Bit). The number of bits effective to represent the zero run length is (the minimum number of bits required to represent the zero run length) -1. This is because the zero-run groups are grouped in a range that can be expressed by a power of two.

【0058】次に、ゼロラングループデコード部104
は、ゼロラン長のMSB(最上位ビット;Most Signifi
cant Bit)側から1ビットずつビットを判定していき、
1が立っているビットまで来た時点でその処理を中断
し、連続しているゼロのビット長からグループ番号を決
定する。
Next, the zero run group decoding section 104
Is the MSB of the zero run length (most significant bit; Most Signifi
bit from the cant Bit) side
The processing is interrupted at the time when the bit reaches 1 where a 1 is set, and the group number is determined from the bit length of consecutive zeros.

【0059】この処理はゼロランのグループを2のベキ
乗で表現できる範囲でグループ分けをしていることに起
因する。例えば、グループ10に含まれるゼロラン長で
あれば、LSB側から6ビット目に必ず1が立ってお
り、グループ13に含まれるゼロラン長であればLSB
側から9ビット目に必ず1が立っている。
This processing is based on the fact that the zero-run groups are grouped in a range that can be expressed by a power of two. For example, if the zero run length is included in the group 10, 1 is always set to the sixth bit from the LSB side, and if the zero run length is included in the group 13, the LSB is LSB.
1 always stands at the ninth bit from the side.

【0060】例えば、グループ8に含まれるゼロラン長
8−15であれば、最低限4ビットあれば表現でき、か
つ、常に最上位ビットに1がたつことは明らかである。
このことから最上位ビットを省略することが可能とな
り、この場合の有効ビット数は3となる。ただし、グル
ープ16に関しては、最大ゼロラン長32767を基に
して有効ビット数を算出している。
For example, the zero run length 8-15 included in the group 8 can be expressed with a minimum of 4 bits, and it is clear that 1 is always set to the most significant bit.
This makes it possible to omit the most significant bit. In this case, the number of effective bits is three. However, for group 16, the number of effective bits is calculated based on the maximum zero run length 32767.

【0061】図4はゼロラングループデコード部104
の上記処理を説明するフローチャート図である。すなわ
ち、ステップ(401)では、0であるビットをカウン
トする変数(bit)をクリアする。次いでステップ
(402)で、ビット位置をMSB側に設定する。ステ
ップ(403)では、現在のビットが1であるかどうか
判定し、0である場合はステップ(404)に進みbi
tを1増加し、ステップ(403)で、現在のビットが
1であると判定されるまで同じ処理を繰り返す。そし
て、上記ステップ(403)で、現在のビットが1であ
ると判定されると、ステップ(405)に進み、bit
の値(大きさ)からグループ番号を決定する。次いで、
ステップ(406)に進み、グループ番号をゼロラン符
号化部105に送り、処理を終了する。
FIG. 4 shows a zero run group decoding unit 104.
It is a flowchart figure explaining the said process. That is, in step (401), a variable (bit) that counts 0 bits is cleared. Next, in step (402), the bit position is set to the MSB side. At step (403), it is determined whether or not the current bit is 1, and if it is 0, the process proceeds to step (404) and bi is applied.
t is incremented by 1, and the same process is repeated until the current bit is determined to be 1 in step (403). If it is determined in step (403) that the current bit is 1, the process proceeds to step (405), where bit
The group number is determined from the value (size). Then
Proceeding to step (406), the group number is sent to the zero-run encoder 105, and the process ends.

【0062】ゼロラン符号化部105ではゼロラングル
ープデコード部104から送られてきたグループ番号
と、ゼロラン長と、グループテーブル106から得られ
るゼロラン長の有効ビット数とを用いてゼロラン長の符
号化を行なう。
The zero-run encoding unit 105 encodes the zero-run length using the group number sent from the zero-run group decoding unit 104, the zero-run length, and the number of effective bits of the zero-run length obtained from the group table 106. Do.

【0063】ここで各グループの符号化されたゼロラン
長を図5に示す。ゼロラン長はグループの符号の後に有
効なビット数で表したゼロラン長をLSBから格納した
形で符号化される。
FIG. 5 shows the coded zero run length of each group. The zero run length is encoded by storing the zero run length represented by the number of effective bits after the code of the group from the LSB.

【0064】ゼロ判定部101において0ではないと判
定された係数データは、係数符号部102に送られて符
号テーブル107を用いて符号化され、符号データとし
て送出される。そして上記処理をサブバンド3の係数デ
ータがなくなるまで行なう。この符号化結果を図6(b)
に示す。ゼロラン15とゼロラン503は、図2に示す
グループテーブル106から、それぞれグループ8,グ
ループ13に属しており、それぞれに有効なビット数は
3ビット,8ビットであることから、図6(b)に示すよ
うな符号化結果となる。
The coefficient data determined by the zero determination section 101 to be not 0 is sent to the coefficient coding section 102, encoded using the code table 107, and transmitted as code data. Then, the above processing is performed until the coefficient data of subband 3 is exhausted. This encoding result is shown in FIG.
Shown in From the group table 106 shown in FIG. 2, the zero run 15 and the zero run 503 belong to the group 8 and the group 13, respectively. Since the effective bit numbers are 3 bits and 8 bits respectively, FIG. The encoding result is as shown.

【0065】以上の処理によってサブバンド3の符号化
が実現された。この処理をサブバンド1〜10全てに対
して行うことにより、圧縮データを得ることができる。
With the above processing, encoding of subband 3 has been realized. By performing this processing on all of the subbands 1 to 10, compressed data can be obtained.

【0066】従来の説明で記述した符号化効率の評価結
果を以下の表3に示す。評価条件は、従来の説明と同じ
であり、本実施の形態の方式としては、非ゼロ係数の符
号化は従来と同様の処理を行い、ゼロラン符号化方法の
み図2に示すグループ化を採用した。
Table 3 below shows the evaluation results of the coding efficiency described in the conventional description. The evaluation conditions are the same as those of the conventional description. As the method of the present embodiment, the same processing as the conventional method is performed for the encoding of the non-zero coefficient, and the grouping shown in FIG. .

【0067】[0067]

【表3】 [Table 3]

【0068】上記表に示されるように、従来の方式Bを
100%とした場合、方式Aとほぼ同等か若干効率が改
善されるという結果が得られた。ここで、従来の方式A
がゼロランテーブルを30エントリ必要とすることを考
慮すると、本実施の形態はその約半分のエントリで同等
の符号化効率を得ていることが判る。従って、ゼロラン
を、図2に示すようにグループ化して符号化することは
極めて有効な方法である。
As shown in the above table, when the conventional method B is set to 100%, the result is almost the same as the method A or the efficiency is slightly improved. Here, the conventional method A
Considering that this requires 30 entries of the zero run table, it can be seen that this embodiment achieves the same coding efficiency with about half the entries. Therefore, it is an extremely effective method to group and encode zero runs as shown in FIG.

【0069】なお、本実施の形態では、ゼロラン長を1
6個のグループに分割したが、直接符号語を割り当てる
ゼロラン長を増減させるなど、グループ化方法を変更し
ても構わない。
In this embodiment, the zero run length is set to 1
Although the data is divided into six groups, the grouping method may be changed, for example, by increasing or decreasing the zero run length to which codewords are directly assigned.

【0070】このように本実施の形態によれば、量子化
された係数データがゼロであるか否かを判定し、係数デ
ータがゼロでないと判定された場合、上記係数データを
符号テーブルを用いて符号化し、上記係数データがゼロ
であると判定された場合、上記係数データがゼロではな
いと判定されるまで連続されるゼロの個数をカウントし
てゼロラン長を取得し、該ゼロラン長をその出現頻度に
よって複数のグループに分類し、該グループ単位で符号
化するようにしたから、長いゼロラン長でもグループ化
してこれを符号化することができ、少ないゼロランテー
ブルサイズでゼロラン長を効率良く圧縮することができ
るようになる。
As described above, according to the present embodiment, it is determined whether or not the quantized coefficient data is zero. If it is determined that the coefficient data is not zero, the coefficient data is converted into a code table using the code table. When the coefficient data is determined to be zero, the number of consecutive zeros is counted until the coefficient data is determined to be not zero, and a zero run length is obtained. Since the data is classified into a plurality of groups according to the frequency of appearance and is encoded in units of the group, even a long zero run length can be grouped and encoded, and the zero run length can be efficiently compressed with a small zero run table size. Will be able to

【0071】実施の形態2.次に本実施の形態2による
可変長符号化装置及び方法について説明する。図7は本
実施の形態2による可変長符号化装置及び方法に用いら
れる可変長符号化装置のブロック図を示す。図7におい
て、701は係数データを量子化する量子化部、702
は量子化された係数データにゼロが含まれているか否か
を判定するゼロ判定部、703はゼロランを数えるゼロ
ランカウンタ、704は符号テーブル、705はゼロラ
ン符号化部、706は係数テーブルで、例えば、図8に
示す情報を管理するものである。707は係数テーブル
デコード部、708は係数コード生成部、709は係数
OTHERコード生成部、710はデータ選択部であ
る。
Embodiment 2 Next, a variable length coding apparatus and method according to the second embodiment will be described. FIG. 7 is a block diagram of a variable length coding device used in the variable length coding device and method according to the second embodiment. In FIG. 7, reference numeral 701 denotes a quantization unit for quantizing coefficient data;
Is a zero determination unit that determines whether zero is included in the quantized coefficient data, 703 is a zero run counter that counts zero runs, 704 is a code table, 705 is a zero run encoding unit, 706 is a coefficient table, For example, it manages the information shown in FIG. 707 is a coefficient table decoder, 708 is a coefficient code generator, 709 is a coefficient OTHER code generator, and 710 is a data selector.

【0072】次に動作について説明する。ここでは、画
像データを図22(b) に示すようにサブバンド符号化で
10個のサブバンドに分割した場合を考える。サブバンド
に記載されている番号はサブバンド番号を示す。例え
ば、図22(b) における画像サイズを320×208と
すると、サブバンド3のサイズは40×26となり、1
040の係数データで構成されていることになる。
Next, the operation will be described. Here, the image data is sub-band coded as shown in FIG.
Consider the case of dividing into ten subbands. The number described in the subband indicates the subband number. For example, if the image size in FIG. 22B is 320 × 208, the size of subband 3 is 40 × 26 and 1
This means that the data is composed of 040 coefficient data.

【0073】各サブバンドはそれぞれ独立に量子化部7
01で量子化し、可変長符号化を行う。ここで量子化部
701が、12bitの係数データを例えば、図25
(a) に示すような量子化ステップにより除算を行うもの
とすると、サブバンド3の係数データは有効ビット数が
12ビットではなく、10ビットになる。
Each sub-band is independently quantized by the quantization unit 7.
Quantization is performed by 01 and variable length coding is performed. Here, the quantization unit 701 converts the 12-bit coefficient data into, for example, the data shown in FIG.
Assuming that the division is performed by the quantization step shown in (a), the number of effective bits of the coefficient data of subband 3 is 10 bits instead of 12 bits.

【0074】いま、量子化したサブバンド3をスキャン
した場合、以下のような順に係数が構成されている場合
を考える。 係数[1]、係数[20]、係数[18]、係数[4
0]、ゼロラン[10]、係数[−5]、ゼロラン[1
025] ゼロ判定部702は係数データを一個ずつ読み込み、読
み込んだ係数データが0であるかどうかを判定する。係
数データが0であると判定された場合は、ゼロランカウ
ンタ703でゼロの続く長さをカウントし、ゼロラン符
号化部705は符号テーブル704を用いてそのゼロラ
ン長を符号化する。
Now, consider a case where the quantized subband 3 is scanned and coefficients are formed in the following order. Coefficient [1], coefficient [20], coefficient [18], coefficient [4
0], zero run [10], coefficient [-5], zero run [1]
[025] The zero determination unit 702 reads coefficient data one by one, and determines whether the read coefficient data is zero. If it is determined that the coefficient data is 0, the zero-run counter 703 counts the length of the continuous zero, and the zero-run encoding unit 705 encodes the zero-run length using the code table 704.

【0075】一方、読み込んだ係数データがゼロ判定部
702で、0でないと判定されると、係数テーブルデコ
ード部707は、係数テーブル706を用いて符号化す
る。符号化データのフォーマットとしては、図11(a)
に示す、発生頻度に応じて符号語のみを割り当てる「係
数コード」と、図11(b) に示す、符号語に係数データ
を繋げた「係数OTHERコード」とで行なう。これは
上記実施の形態1で用いた図8に示すような係数テーブ
ルを用いて実現する。図9は、係数テーブルデコード部
707の動作を説明するためのブロック図である。図9
において、901は、係数テーブル比較を行う比較器
で、図8において独立して符号語が割り当てられる各係
数値をレジスタに格納し、これと入力されるデータとを
比較して、その比較結果が一致していれば“1”を出力
する。アドレス変換部902は、上記比較器901の出
力に基づきテーブル番号をデコードする。このデコード
結果は、例えば係数ハフマンテーブル904に示すよう
なアドレスとなる。
On the other hand, when the read coefficient data is judged not to be 0 by the zero judgment section 702, the coefficient table decoding section 707 encodes using the coefficient table 706. As the format of the encoded data, FIG.
This is performed by using a "coefficient code" for assigning only codewords according to the frequency of occurrence, and a "coefficient OTHER code" for connecting coefficient data to codewords shown in FIG. This is realized using the coefficient table as shown in FIG. 8 used in the first embodiment. FIG. 9 is a block diagram for explaining the operation of the coefficient table decoding unit 707. FIG.
901 is a comparator that performs coefficient table comparison, stores each coefficient value to which a code word is independently assigned in FIG. 8 in a register, compares this with input data, and obtains a comparison result. If they match, "1" is output. The address conversion unit 902 decodes the table number based on the output of the comparator 901. The decoding result is an address as shown in the coefficient Huffman table 904, for example.

【0076】係数ハフマンテーブル904では出力結果
が全て0の場合は、1〜15以外のコードであると判定
し、テーブル番号16に対応させている。903は符号
テーブル704内の係数ハフマンテーブルである。
In the coefficient Huffman table 904, when the output result is all 0, it is determined that the code is a code other than 1 to 15, and the code is made to correspond to the table number 16. Reference numeral 903 denotes a coefficient Huffman table in the code table 704.

【0077】図10は、係数テーブルデコード部70
7、係数コード生成部708、係数OTHERコード生
成部709、及びデータ選択部710での係数コード生
成処理を説明するフローチャート図である。それぞれ各
ステップでは、 (1001)係数テーブルデコード部707は、入力さ
れる係数データの絶対値をとる。 (1002)係数テーブルデコード部707は、上記し
た処理によりテーブル番号をデコードし、その番号が1
6であればステップ(1006)の処理を行い、16で
なければステップ(1003)の処理を行う。 (1003)テーブル番号にユニークに割り当てられた
ハフマン符号を符号テーブル704より得る(これをh
codeとする)。 (1004)符号ビットをhcode長だけシフトする
(これをscodeとする)。 (1005)上記hcodeとscodeの論理和によ
る符号データを生成する。このデータAは、図11(a)
に示すフォーマットのデータとなる。 (1006)テーブル番号16に割り当てられたハフマ
ン符号を符号テーブル704より得る(これをothe
rとする)。 (1007)係数データ(符号ビット含む)をothe
r長だけシフトする(これをccodeとする)。この
際、係数データは量子化後の有効ビット数のみを使用す
る。 (1008)otherとccodeの論理和による符
号データを生成する。このデータBは、図11(b) に示
すフォーマットのデータとなる。 という処理が行われ、以上により、上記したデータ列で
は以下のようになる。
FIG. 10 shows a coefficient table decoding unit 70.
FIG. 7 is a flowchart illustrating a coefficient code generation process in a coefficient code generation unit 708, a coefficient other code generation unit 709, and a data selection unit 710. In each step, the (1001) coefficient table decoding unit 707 takes the absolute value of the input coefficient data. (1002) The coefficient table decoding unit 707 decodes the table number by the processing described above, and
If it is 6, the process of step (1006) is performed, and if it is not 16, the process of step (1003) is performed. (1003) A Huffman code uniquely assigned to the table number is obtained from the code table 704 (this is
code). (1004) The code bit is shifted by the hcode length (this is referred to as scode). (1005) Code data is generated by the logical sum of the hcode and the scode. This data A is shown in FIG.
The data has the format shown in FIG. (1006) The Huffman code assigned to the table number 16 is obtained from the code table 704 (this is
r). (1007) Coefficient data (including sign bit) is
Shift by r lengths (this is ccode). At this time, the coefficient data uses only the number of effective bits after quantization. (1008) Code data is generated by the logical sum of other and ccode. This data B has the format shown in FIG. Thus, the above-described data sequence is as follows.

【0078】先ず、係数テーブルデコード部707は、
先頭の係数値[1]に対しテーブル番号“1”を係数コ
ード生成部708に出力する。係数コード生成部708
は、符号テーブル704を用いて、割り当てられた符号
語を読み出し、図11(a) に示す係数コードフォーマッ
トでデータ選択部710に出力する。データ選択部71
0は、ステップ(1002)においてテーブル番号が
“16”以外であれば、ステップ(1003)〜ステッ
プ(1005)を経て係数コード生成部708からのデ
ータを可変長コードとして出力する。2番目の係数値
[20]では、ステップ(1002)において係数テー
ブルデコード部707は、係数テーブル706の係数値
と全て一致しないことから、テーブル番号“16”を係
数OTHERコード生成部709に出力する。係数OT
HERコード生成部709は、符号テーブル704を用
いて、割り当てられた符号語を読み出し、ステップ(1
006)〜ステップ(1008)を経て図11(b) の係
数OTHERコードフォーマットでデータ選択部710
に出力する。
First, the coefficient table decoding unit 707
The table number “1” is output to the coefficient code generator 708 for the first coefficient value [1]. Coefficient code generator 708
Reads the assigned code word using the code table 704 and outputs the code word to the data selection unit 710 in the coefficient code format shown in FIG. Data selector 71
If the table number is other than "16" in step (1002), 0 outputs the data from the coefficient code generator 708 as a variable length code through steps (1003) to (1005). In the second coefficient value [20], in step (1002), the coefficient table decoding unit 707 outputs the table number “16” to the coefficient OTHER code generation unit 709 because all the coefficient values in the coefficient table 706 do not match. . Coefficient OT
The HER code generation unit 709 reads out the assigned code word using the code table 704, and
006) through step (1008), the data selection unit 710 in the coefficient OTHER code format shown in FIG.
Output to

【0079】この時、係数OTHERコード生成部70
9は、量子化部701から、図25(a) に示す量子化ス
テップの情報を得て、量子化後の有効ビット数の係数値
のみをOTHER符号(16番目の符号) と合成して出
力する。つまり、係数OTHERコード生成部709
は、符号語に続ける係数データとして12ビット以下の
任意長を選択できるものとし、サブバンド3であれば、
下位10ビットを用いて図11(b) に示すような係数O
THERコードに合成する。
At this time, the coefficient OTHER code generator 70
Numeral 9 obtains the information of the quantization step shown in FIG. 25A from the quantization unit 701 and combines only the coefficient value of the number of effective bits after quantization with an OTHER code (a 16th code) and outputs it. I do. That is, the coefficient OTHER code generation unit 709
Means that any length of 12 bits or less can be selected as coefficient data following the code word.
Using the lower 10 bits, the coefficient O as shown in FIG.
Synthesize with THER code.

【0080】以上のような動作をサブバンド3の係数デ
ータがなくなるまで行う。この時の可変長符号化装置の
出力結果を図12(b) に示す。従来装置での符号結果
(図12(a))と比較して、係数OTHERコード、すな
わち量子化後の有効ビット数の係数値によるコードデー
タの部分が減少する。
The above operation is performed until the coefficient data of subband 3 is exhausted. FIG. 12B shows the output result of the variable length coding device at this time. As compared with the coding result (FIG. 12 (a)) of the conventional device, the coefficient OTHER code, that is, the code data portion by the coefficient value of the number of effective bits after quantization is reduced.

【0081】符号化データは、可変長コードデータと図
25に示す量子化テーブルとを合わせて管理すること
で、復号化処理が行える。
The encoded data can be decoded by managing the variable length code data and the quantization table shown in FIG. 25 together.

【0082】以下に、従来の説明で記述した符号効化率
の評価結果と、本実施の形態2による比較結果を表4に
示す。評価条件は、表1に示したものと同じであり、本
実施の形態2の方式としては、ゼロラン符号化は従来の
方式と同じ方式を用いたものとして比較している。
Table 4 shows the evaluation results of the coding efficiency described in the conventional description and the comparison results according to the second embodiment. The evaluation conditions are the same as those shown in Table 1. As the method of the second embodiment, the comparison is made assuming that the zero-run coding uses the same method as the conventional method.

【0083】[0083]

【表4】 [Table 4]

【0084】従来の方式Bで符号化した際のデータサイ
ズを100%とした場合、方式Aより更に8%程度削減
できるという結果が得られた。特に図25に示す量子化
テーブルのように回路規模を考慮し、サブバンド分割が
2のべき乗である場合には、効果があることが判る。
Assuming that the data size at the time of encoding by the conventional method B is 100%, the result is that the data size can be further reduced by about 8% compared with the method A. In particular, when the circuit size is taken into consideration and the sub-band division is a power of 2, as in the quantization table shown in FIG.

【0085】なお、図8の係数テーブルでは、12ビッ
トの係数データに対して16個に分割したが、直接符号
語を割り当てる係数値を増減させるなど総数を変更して
も構わない。
In the coefficient table of FIG. 8, the 12-bit coefficient data is divided into 16 pieces. However, the total number may be changed by, for example, increasing or decreasing the coefficient value to which a codeword is directly assigned.

【0086】また、テーブル番号1〜15の係数絶対値
についても、図8では1〜15の係数値をそれぞれ割り
当てるようにしているが、係数データの発生頻度に応
じ、これ以外の数値にテーブル番号を割り当てるように
しても構わない。また、係数テーブルサイズとしても特
に16エントリに限定するものではなく、それ以外のサ
イズであってもよい。
Also, in FIG. 8, coefficient values 1 to 15 are assigned to the coefficient absolute values of the table numbers 1 to 15, respectively. May be assigned. Also, the coefficient table size is not particularly limited to 16 entries, but may be any other size.

【0087】係数テーブルサイズが大きくなれば、図9
に示すようにそれに比例して係数値レジスタの数も多く
なり、デコード回路901を含め回路規模が増大する。
If the size of the coefficient table becomes large, FIG.
As shown in (1), the number of coefficient value registers increases in proportion thereto, and the circuit scale including the decoding circuit 901 increases.

【0088】また、ソフトウェアで処理する場合も、入
力された係数データが係数値と一致するまで、係数値を
読み込む処理と、読み込んだ係数値を比較する処理とが
必要となり、テーブルサイズが多くなるほど、処理数、
処理時間が共に増加する。
Also, in the case of processing by software, it is necessary to read the coefficient values and to compare the read coefficient values until the input coefficient data matches the coefficient values. , Number of processes,
The processing time increases together.

【0089】図13にテーブルサイズと符号量の関係を
表す。各折れ線はそれぞれのサブバンドにおけるテーブ
ルサイズに対する符号量を表し、左端に位置する数字は
サブバンド番号を示している。評価条件は、上記した実
施の形態2での評価と同じである。
FIG. 13 shows the relationship between the table size and the code amount. Each polygonal line represents the code amount for the table size in each subband, and the number at the left end indicates the subband number. The evaluation conditions are the same as the evaluation in the second embodiment.

【0090】符号テーブル704は各サブバンド毎にサ
ブバンドを構成する係数データの発生頻度をとり、テー
ブルサイズを2〜20の間で変えている。
The code table 704 determines the frequency of occurrence of coefficient data constituting a subband for each subband, and changes the table size between 2 and 20.

【0091】図13に示すように、テーブルサイズを大
きくするほど符号量は減少する。これは、テーブルサイ
ズを大きくすると、独立してハフマンコードを割り当て
られる係数値が増え、符号化効率が上がるためである。
As shown in FIG. 13, the code amount decreases as the table size increases. This is because, when the table size is increased, the coefficient value to which the Huffman code can be independently assigned increases, and the encoding efficiency increases.

【0092】ところが、各サブバンドにおけるグラフ
は、テーブルサイズ8ぐらいからゆるやかな変化をたど
りテーブルサイズ16ぐらいからほとんど変化がみられ
ない。テーブルサイズ20以上の場合は、テーブルサイ
ズが20である場合とほとんど大差がないので省略して
いる。
However, the graph in each subband follows a gradual change from a table size of about 8 and hardly changes from a table size of about 16. When the table size is 20 or more, it is omitted because there is almost no difference from the case where the table size is 20.

【0093】これは、量子化部701における量子化に
より、各サブバンドに存在する係数データのばらつきが
少ないためであると考えられる。すなわち、サブバンド
を構成する係数データの中で、OTHER係数となる係
数データの割合が小さいことに起因している。
It is considered that this is because the variation in coefficient data existing in each subband is small due to the quantization in the quantization section 701. That is, the ratio of coefficient data serving as an OTHER coefficient is small in coefficient data constituting a subband.

【0094】以上の結果により、本実施の形態2によれ
ば、任意の係数ビット数に対応した係数符号化手段を設
け、係数データがゼロでない(非ゼロ)場合、これを符
号化し、量子化後の係数データの有効ビット数とともに
符号化するようにしたので、量子化後の有効ビット数に
応じた係数符号化を行うことができ、特に、テーブルサ
イズを8〜16とすることで、非ゼロの係数データの符
号化効率を高めることが可能となり、圧縮率,回路規
模,処理時間の各面において、最も最適な符号化を実現
することができる。
According to the above result, according to the second embodiment, a coefficient encoding means corresponding to an arbitrary number of coefficient bits is provided, and when coefficient data is not zero (non-zero), it is encoded and quantized. Since the encoding is performed together with the number of effective bits of the coefficient data afterward, coefficient encoding according to the number of effective bits after quantization can be performed. In particular, by setting the table size to 8 to 16, The encoding efficiency of zero coefficient data can be increased, and the most optimal encoding can be realized in each aspect of the compression ratio, the circuit scale, and the processing time.

【0095】実施の形態3.次に本実施の形態3による
可変長符号化装置及び方法について説明する。図14は
本実施の形態3による可変長符号化装置及び方法に用い
られる可変長符号化装置のブロック図を示す。図14に
おいて、図7の符号化装置と同様の機能を有するものは
同一の番号を付してその説明を省略する。図において、
1401は係数グループテーブルで、例えば、図15に
示す情報を管理し、1402は係数グループデコード
部、1403はそれに対応した係数OTHERコード生
成部である。
Embodiment 3 Next, a variable length coding apparatus and method according to the third embodiment will be described. FIG. 14 is a block diagram of a variable length coding device used in the variable length coding device and method according to the third embodiment. 14, components having the same functions as those of the encoding device in FIG. 7 are denoted by the same reference numerals, and description thereof will be omitted. In the figure,
Reference numeral 1401 denotes a coefficient group table, for example, which manages information shown in FIG. 15, 1402 denotes a coefficient group decoding unit, and 1403 denotes a corresponding coefficient OTHER code generation unit.

【0096】動作としては、上記実施の形態2で説明し
たものと殆ど同じであるが、本実施の形態では、係数O
THERコードを生成する方法が異なる。図14に示す
係数グループテーブル1401は、実施の形態2と同様
に、画像データを図22(b)に示すように、サブバンド
符号化で10個のサブバンドに分割した場合を考える。
図22(b) に記載されている番号はサブバンド番号を示
す。
The operation is almost the same as that described in the second embodiment, but in this embodiment, the coefficient O
The method for generating the THER code is different. Similar to the second embodiment, the coefficient group table 1401 shown in FIG. 14 considers a case where image data is divided into ten subbands by subband encoding as shown in FIG.
The numbers described in FIG. 22B indicate the subband numbers.

【0097】各サブバンドはそれぞれ独立に量子化部7
01で図25(a) に基づいて量子化し、可変長符号化す
る。例えば、サブバンド3をスキャンした場合、以下の
ような順に係数が並んでいるものとする。 係数[1]、係数[20]、係数[18]、係数[4
0]、ゼロラン[10]、係数[−5]、ゼロラン[1
025] ゼロ判定部702は係数データを一個ずつ読み込み、読
み込んだ係数データが0であるかどうかを判定する。係
数データが0である場合は、ゼロランカウンタ703で
ゼロが続く長さの情報を得て、ゼロラン符号化部705
は符号テーブル704を用いてゼロラン長を符号化す
る。
Each sub-band is independently quantized by the quantization unit 7.
At 01, quantization and variable length coding are performed based on FIG. For example, when the sub-band 3 is scanned, it is assumed that the coefficients are arranged in the following order. Coefficient [1], coefficient [20], coefficient [18], coefficient [4
0], zero run [10], coefficient [-5], zero run [1]
[025] The zero determination unit 702 reads coefficient data one by one, and determines whether the read coefficient data is zero. If the coefficient data is 0, zero-run counter 703 obtains information of a length in which zero continues, and a zero-run encoder 705
Encodes the zero run length using the code table 704.

【0098】一方、読み込んだ係数データがゼロ判定部
702で0でないと判定されると、係数グループデコー
ド部1402は、送られてきた係数データからグループ
テーブル1401を用いてグループ番号を決定する。
On the other hand, when the read coefficient data is determined not to be 0 by the zero determination section 702, the coefficient group decoding section 1402 determines a group number from the transmitted coefficient data using the group table 1401.

【0099】ここで上記係数グループテーブル1401
の内容を図15に示す。図15に示すように、係数値は
15個のグループに分けられる。出現頻度の高い係数絶
対値1〜7はそのまま独立なグループとし、それ以外の
係数絶対値を2のベキ乗で表現できる範囲で分割し、8
番目以上のグループに対し有効ビット数を対応づけてい
る。この有効ビット数は、 (係数絶対値を表すために最低限必要なビット数)−1 としている。これは係数絶対値を2のベキ乗で表現でき
る範囲でグループ分けしていることに起因する。
Here, the coefficient group table 1401
15 is shown in FIG. As shown in FIG. 15, the coefficient values are divided into 15 groups. The coefficient absolute values 1 to 7 having a high appearance frequency are regarded as independent groups as they are, and the other coefficient absolute values are divided within a range that can be expressed by a power of 2, and 8
The number of effective bits is associated with the third and higher groups. The number of effective bits is (the minimum number of bits required to represent the coefficient absolute value) −1. This is because the coefficient absolute values are grouped in a range that can be expressed by a power of two.

【0100】図16はそれぞれのグループに対応する係
数データを表している。12ビットの係数データは量子
化により、有効ビットがLSB詰めに格納されているも
のとし、その絶対値は最大で11ビットになっている。
例えば、グループ8に含まれる係数絶対値は、8−15
であり、最低限4ビットあれば表現でき、かつ、常に4
ビット目に1がたつことは明らかである。このことから
4ビットを省略することが可能となり、この場合の有効
ビット数は3となる。
FIG. 16 shows coefficient data corresponding to each group. The 12-bit coefficient data is assumed that the effective bits are stored in LSB justified by quantization, and the absolute value is 11 bits at the maximum.
For example, the coefficient absolute value included in group 8 is 8-15
And can be represented with a minimum of 4 bits, and always 4
It is clear that 1 is placed in the bit. This makes it possible to omit four bits, and in this case, the number of effective bits is three.

【0101】係数グループデコード化部1402は、非
ゼロと判定された係数データのMSB側から1ビットず
つビットを判定していき、1が立っているビットまで来
た時点でその処理を中断し、その位置からグループ番号
を決定する。
The coefficient group decoding section 1402 determines bits one bit at a time from the MSB side of the coefficient data determined to be non-zero, and suspends the processing when it reaches the bit where 1 is set. The group number is determined from the position.

【0102】この処理は係数値を2のベキ乗で表現でき
る範囲でグループ分けをしていることに起因する。例え
ば、グループ10に含まれる係数値であればLSB側か
ら6ビット目に必ず1が、グループ13に含まれる係数
値であればLSB側から9ビット目に必ず1が立ってい
る。
This processing is based on the fact that the coefficient values are grouped in a range in which the coefficient values can be represented by a power of two. For example, for a coefficient value included in the group 10, 1 is always set to the sixth bit from the LSB side, and for a coefficient value included in the group 13, 1 is always set to the ninth bit from the LSB side.

【0103】図17は係数グループデコード部1402
の上記処理を説明するフローチャート図である。各ステ
ップでは以下のような処理が行われる。 (1701)0であるビットをカウントする変数(bi
t)をクリアする。 (1702)ビット位置をMSB側に設定する。 (1703)現在のビットが1であるかどうか判定し、
0である場合はステップ(1704)の処理を行い、1
である場合はステップ(1705)の処理を行なう。 (1704)bitを1増加し、比較位置を右に1ビッ
ト移動してステップ(1703)に戻る。 (1705)bitの値からグループ番号を決定する。 (1706)グループ番号を係数コード生成部708と
係数OTHERコード生成部1403に送る。 グループ番号に応じて、係数コード生成部708と係数
OTHERコード生成部1403は、図18に示すよう
なコードを生成する。
FIG. 17 shows a coefficient group decoding section 1402.
It is a flowchart figure explaining the said process. In each step, the following processing is performed. (1701) Variable (bi for counting bits that are 0)
Clear t). (1702) The bit position is set on the MSB side. (1703) Determine whether the current bit is 1 and
If it is 0, the process of step (1704) is performed, and 1
If it is, the process of step (1705) is performed. (1704) Increment the bit by 1, move the comparison position to the right by one bit, and return to step (1703). (1705) The group number is determined from the bit value. (1706) The group number is sent to the coefficient code generation unit 708 and the coefficient OTHER code generation unit 1403. In accordance with the group number, the coefficient code generator 708 and the coefficient other code generator 1403 generate codes as shown in FIG.

【0104】係数OTHERコード生成部1403は、
グループ番号により異なる符号語を符号テーブル704
より取り出し、図15の係数グループテーブルの有効ビ
ット数分の係数データをこれに続けて、符号データを構
成する。
[0104] The coefficient OTHER code generation unit 1403
Code table 704 different code words depending on the group number
Then, the coefficient data corresponding to the number of effective bits in the coefficient group table of FIG.

【0105】前記した係数列が入力された場合、係数グ
ループデコード部1402は、先頭の係数値[1]から
グループ番号“1”を係数コード生成部708に出力す
る。係数コード生成部708は、符号テーブル704を
用いて割り当てられた符号語を読み出し、図18のグル
ープ1のフォーマットでデータ選択部710に出力す
る。データ選択部710は、テーブル番号が“1”〜
“7”であれば係数コード生成部708からのデータを
可変長コードとして出力する。
When the above-described coefficient sequence is input, coefficient group decoding section 1402 outputs group number “1” to coefficient code generation section 708 from the first coefficient value [1]. The coefficient code generation unit 708 reads the allocated codewords using the code table 704, and outputs the read codewords to the data selection unit 710 in the format of Group 1 in FIG. The data selection unit 710 determines that the table number is “1” to
If “7”, the data from the coefficient code generation unit 708 is output as a variable length code.

【0106】2番目の係数値[20]では、係数グルー
プデコード部1402は、グループ番号“8”を係数O
THERコード生成部1403に出力する。係数OTH
ERコード生成部1403は、符号テーブル704を用
いて割り当てられた符号語を読み出すと共に、係数グル
ープテーブル1401よりグループ番号“8”の有効ビ
ット数を取り出し、図18に示すような「グループ8符
号語+符号ビット+係数絶対値(3ビット) 」の符号デ
ータを出力する。
For the second coefficient value [20], coefficient group decoding section 1402 sets group number “8” to coefficient O
Output to the THER code generation unit 1403. Coefficient OTH
The ER code generation unit 1403 reads out the assigned code word using the code table 704, extracts the number of effective bits of the group number “8” from the coefficient group table 1401, and obtains the “group 8 code word” as shown in FIG. + Sign bit + coefficient absolute value (3 bits) ".

【0107】以上のような動作をサブバンド3の係数デ
ータがなくなるまで行う。この時の可変長符号化装置の
出力結果を図12(c) に示す。図12(c) の符号化結果
では、実施の形態2の図11(b) と比較して、係数OT
HERコードの係数値の長さがグループ毎に最適化さ
れ、符号化効率が向上すると考えられる。
The above operation is performed until the coefficient data of subband 3 is exhausted. The output result of the variable length coding device at this time is shown in FIG. In the encoding result of FIG. 12C, the coefficient OT is smaller than that of FIG. 11B of the second embodiment.
It is considered that the length of the coefficient value of the HER code is optimized for each group, and the coding efficiency is improved.

【0108】以上の処理を分割した全てのサブバンド毎
に繰り返すことで、可変長符号化を実現できる。符号化
データは、グループ毎にビット数が対応づけられてお
り、図25(a) に示す量子化情報と合わせて管理しなく
とも、復号処理が行える。
By repeating the above processing for each of the divided subbands, variable length coding can be realized. In the coded data, the number of bits is associated with each group, and the decoding process can be performed without managing the data together with the quantization information shown in FIG.

【0109】なお、本実施の形態では、12ビットの係
数データに対して15個のグループに分割したが、例え
ば発生頻度が低いと思われるグループ14とグループ1
5を1つのグループにマージするなどしても構わない。
In the present embodiment, the 12-bit coefficient data is divided into 15 groups.
5 may be merged into one group.

【0110】また、圧縮率に応じてグループ数やグルー
プ化する範囲を変えても、本実施の形態と同様の符号化
ステップで実現できることは明白である。
It is apparent that even if the number of groups and the range of grouping are changed in accordance with the compression ratio, it can be realized by the same encoding step as in the present embodiment.

【0111】このように本実施の形態3によれば、係数
値を所定の範囲毎にグループ化して符号化を行うように
したので、上記実施の形態1、及び実施の形態2の効果
に加え、係数値の分散の度合いが増える低周波成分の符
号化などでも、符号化効率を高めることができる。
As described above, according to the third embodiment, the encoding is performed by grouping the coefficient values for each predetermined range. In addition to the effects of the first and second embodiments, Also, the encoding efficiency can be improved even in the encoding of low frequency components in which the degree of dispersion of coefficient values increases.

【0112】実施の形態4.次に本実施の形態4による
可変長符号化装置及び方法について説明する。図19は
本実施の形態3による可変長符号化装置及び方法に用い
られる可変長符号化装置のブロック図を示す。図19に
おいて、図7,図14と同一符号で示されるものは同一
の機能を有するものであり、ここではその説明を省略す
る。図19において、1901はテーブル切り替え部、
1902は実施の形態3の係数グループデコード部14
02とは異なり、係数テーブル706と、係数グループ
テーブル1401とを有する係数グループデコード部で
ある。
Embodiment 4 Next, a variable length coding apparatus and method according to the fourth embodiment will be described. FIG. 19 is a block diagram of a variable length coding device used in the variable length coding device and method according to the third embodiment. In FIG. 19, components denoted by the same reference numerals as those in FIGS. 7 and 14 have the same functions, and a description thereof will be omitted. In FIG. 19, reference numeral 1901 denotes a table switching unit,
Reference numeral 1902 denotes a coefficient group decoding unit 14 according to the third embodiment.
Unlike the coefficient group 02, the coefficient group decoding unit includes a coefficient table 706 and a coefficient group table 1401.

【0113】可変長符号化装置の動作としては、係数テ
ーブル706と、係数グループテーブル1401を有
し、サブバンド毎に切り替えて可変長符号化を行えるよ
うにした点が異なる。
The operation of the variable length coding apparatus is different in that the variable length coding apparatus has a coefficient table 706 and a coefficient group table 1401, and performs variable length coding by switching every subband.

【0114】また、上記係数テーブル706の16番目
のOTHERグループに、量子化時に有効ビット数を追
加して係数を管理するものとし、係数OTHERコード
生成部1903が、係数テーブル706よりこの有効ビ
ット数を得て、符号データを出力する。テーブルを選択
した後の動作は、上記実施の形態2,3で説明したもの
と同じである。
Also, it is assumed that the coefficient is managed by adding the number of effective bits at the time of quantization to the 16th OTHER group of the coefficient table 706, and the coefficient OTHER code generation unit 1903 reads the effective bit number from the coefficient table 706. And outputs the code data. The operation after selecting the table is the same as that described in the second and third embodiments.

【0115】一般的に量子化ステップを小さくする低周
波のサブバンド(例えば図22(b)の1〜4)では、係
数値の分散が増え係数OTHERコードの比率が高くな
ることから、係数グループテーブル1401の方が効率
よく符号化できる。逆に高周波のサブバンド(例えば図
22(b) の5〜10)では、量子化ステップを大きくす
るため、係数値の分散が偏ることから係数テーブル70
6の方が効率よく符号化できる。従って、サブバンド毎
にこれらを選択できれば、非常に効率よく符号化が行え
ることになる。
Generally, in a low-frequency subband (for example, 1 to 4 in FIG. 22B) in which the quantization step is reduced, the coefficient value variance increases and the ratio of the coefficient OTHER code increases. Table 1401 can be encoded more efficiently. Conversely, in the high frequency subbands (eg, 5 to 10 in FIG. 22B), the quantization step is increased, so that the variance of the coefficient values is biased.
No. 6 can be encoded more efficiently. Therefore, if these can be selected for each subband, coding can be performed very efficiently.

【0116】このように本実施の形態4によれば、係数
データのグループ化方法を選択する手段を設け、サブバ
ンド毎に係数値に対する符号語の割り当て方法を最適化
するようにしたので、更に効率よく符号化が行うことが
できる。
As described above, according to the fourth embodiment, the means for selecting a method of grouping coefficient data is provided, and the method of allocating code words to coefficient values for each subband is optimized. Coding can be performed efficiently.

【0117】[0117]

【発明の効果】以上のように、本発明に係る可変長符号
化方法及び装置は、グループテーブルとゼロラングルー
プ化手段とを備え、ゼロランとなる係数データに対して
は、上記グループテーブルによってその大きさに応じて
グループ分けした後、これを符号化するようにしたの
で、長いゼロラン長でも、少ないゼロランテーブルサイ
ズでゼロラン長を効率良く圧縮することができるという
効果がある。
As described above, the variable length coding method and apparatus according to the present invention include the group table and the zero-run grouping means. After grouping according to the size, this is encoded, so that even with a long zero run length, the zero run length can be efficiently compressed with a small zero run table size.

【0118】また、本発明に係る可変長符号化方法及び
装置は、任意の係数ビット数に対応した係数符号化手段
を備え、係数データがゼロでない(非ゼロ)場合、これ
を符号化し、量子化後の係数データの有効ビット数とと
もに符号化するようにしたので、量子化後の有効ビット
数に応じた係数符号化を行うことができ、非ゼロの係数
データの符号化効率を高めることができるという効果が
ある。
Further, the variable length coding method and apparatus according to the present invention include a coefficient coding means corresponding to an arbitrary number of coefficient bits, and when the coefficient data is not zero (non-zero), the coefficient data is coded and quantized. Since the encoding is performed together with the number of effective bits of the quantized coefficient data, coefficient encoding according to the number of effective bits after quantization can be performed, and the encoding efficiency of non-zero coefficient data can be improved. There is an effect that can be.

【0119】また、本発明に係る可変長符号化方法及び
装置は、係数値を所定の範囲毎にグループ化して符号化
を行うようにしたので、長いゼロラン長でも、少ないゼ
ロランテーブルサイズでゼロラン長を効率良く圧縮する
ことができる,という前記の効果に加えて、係数値の分
散が増える低周波成分の符号化などでも、符号化効率を
高めることができるという効果がある。
In the variable length coding method and apparatus according to the present invention, the coefficient values are grouped for each predetermined range and coding is performed. Therefore, even if the zero run length is long, the zero run table size can be reduced. In addition to the above-described effect that the length can be efficiently compressed, there is an effect that the encoding efficiency can be increased even in encoding of a low-frequency component in which the variance of the coefficient value increases.

【0120】また、本発明に係る可変長符号化方法及び
装置は、係数データのグループ化方法を選択する手段を
備え、サブバンド毎に係数値に対する符号語の割り当て
方法を最適化するようにしたので、更に効率よく符号化
が行えるという効果がある。
Further, the variable length coding method and apparatus according to the present invention include means for selecting a grouping method of coefficient data, and optimizes a method of assigning a code word to a coefficient value for each subband. Therefore, there is an effect that encoding can be performed more efficiently.

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

【図1】本発明の実施の形態1におけるゼロラン長のグ
ループ化を行った可変長符号化装置の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram illustrating a configuration of a variable-length encoding device that groups zero-run lengths according to Embodiment 1 of the present invention.

【図2】本発明の実施の形態1におけるゼロラン符号化
用のグループテーブルの一例を示した図である。
FIG. 2 is a diagram showing an example of a group table for zero-run encoding according to Embodiment 1 of the present invention.

【図3】図2でグループ分けしたゼロラン長を表した図
である。
FIG. 3 is a diagram showing zero run lengths grouped in FIG. 2;

【図4】本発明の実施の形態1におけるゼロラングルー
プ化部の処理を説明した図である。
FIG. 4 is a diagram illustrating processing of a zero-run grouping unit according to the first embodiment of the present invention.

【図5】本発明の実施の形態1におけるゼロラン長のコ
ードデータフォーマットを表した図である。
FIG. 5 is a diagram illustrating a code data format having a zero run length according to the first embodiment of the present invention.

【図6】本発明の実施の形態1と従来方式における符号
化結果の一例を説明した図である。
FIG. 6 is a diagram illustrating an example of an encoding result according to the first embodiment of the present invention and a conventional method.

【図7】本発明の実施の形態2における量子化ステップ
に応じて非ゼロ係数符号化を行う可変長符号化装置の構
成を示すブロック図である。
FIG. 7 is a block diagram illustrating a configuration of a variable-length encoding device that performs non-zero coefficient encoding according to a quantization step according to Embodiment 2 of the present invention.

【図8】本発明の実施の形態2における非ゼロハフマン
テーブルの一例を示した図である。
FIG. 8 is a diagram showing an example of a non-zero Huffman table according to Embodiment 2 of the present invention.

【図9】本発明の実施の形態2における係数テーブルデ
コード部の構成を示すブロック図である。
FIG. 9 is a block diagram showing a configuration of a coefficient table decoding unit according to Embodiment 2 of the present invention.

【図10】係数テーブルデコード部の処理を説明した図
である。
FIG. 10 is a diagram illustrating a process of a coefficient table decoding unit.

【図11】本発明の実施の形態2における非ゼロのコー
ドデータフォーマットを表した図である。
FIG. 11 is a diagram illustrating a non-zero code data format according to the second embodiment of the present invention.

【図12】本発明の実施の形態2、及び実施の形態3と
従来方式における符号化結果の一例を説明した図であ
る。
FIG. 12 is a diagram illustrating an example of an encoding result according to Embodiments 2 and 3 of the present invention and a conventional method.

【図13】本発明の実施の形態2におけるテーブルサイ
ズと圧縮コード量の関係を示した図である。
FIG. 13 is a diagram illustrating a relationship between a table size and a compressed code amount according to the second embodiment of the present invention.

【図14】本発明の実施の形態3における非ゼロ係数の
グループ化を行った可変長符号化装置の構成を示すブロ
ック図である。
FIG. 14 is a block diagram illustrating a configuration of a variable-length encoding device that performs non-zero coefficient grouping according to Embodiment 3 of the present invention.

【図15】本発明の実施の形態3における非ゼロ係数符
号化用のグループテーブルの一例を示した図である。
FIG. 15 is a diagram showing an example of a group table for non-zero coefficient encoding according to Embodiment 3 of the present invention.

【図16】図15でグループ分けした非ゼロ係数データ
を表した図である。
FIG. 16 is a diagram showing non-zero coefficient data grouped in FIG.

【図17】本発明の実施の形態3における係数グループ
デコード部の処理を説明した図である。
FIG. 17 is a diagram illustrating processing of a coefficient group decoding unit according to Embodiment 3 of the present invention.

【図18】本発明の実施の形態3 におけるグループ化を
行った非ゼロ係数のコードデータフォーマットを表した
図である。
FIG. 18 is a diagram illustrating a code data format of a non-zero coefficient subjected to grouping according to the third embodiment of the present invention.

【図19】本発明の実施の形態4 における複数の非ゼロ
係数符号化方法を備えた可変長符号化装置の構成を示す
ブロック図である。
FIG. 19 is a block diagram illustrating a configuration of a variable-length coding device including a plurality of non-zero coefficient coding methods according to Embodiment 4 of the present invention.

【図20】サブバンド符号化方式の基本ブロック図であ
る。
FIG. 20 is a basic block diagram of a subband encoding scheme.

【図21】Wavelet変換方式におけるサブバンド
分割方法を示した図である。
FIG. 21 is a diagram showing a sub-band division method in the Wavelet transform method.

【図22】Wavelet変換方式における周波数成分
の分割例を示した図である。
FIG. 22 is a diagram illustrating an example of division of frequency components in the Wavelet transform method.

【図23】従来の可変長符号化方式におけるハフマンテ
ーブルの一例を示した図である。
FIG. 23 is a diagram showing an example of a Huffman table in a conventional variable-length coding scheme.

【図24】Wavelet変換方式において8×8ブロ
ックに分割して可変長符号化を行う場合のジグザグスキ
ャンの一例を示した図である。
FIG. 24 is a diagram illustrating an example of a zigzag scan in a case where variable length coding is performed by dividing into 8 × 8 blocks in the Wavelet transform method.

【図25】Wavelet変換方式における量子化テー
ブルの一例を示した図である。
FIG. 25 is a diagram illustrating an example of a quantization table in the Wavelet transform method.

【図26】従来の可変長符号化装置の構成を示すブロッ
ク図である。
FIG. 26 is a block diagram showing a configuration of a conventional variable length coding device.

【図27】上記図25のブロック図におけるゼロラン符
号化部の動作を説明した図である。
FIG. 27 is a diagram for explaining the operation of the zero-run encoder in the block diagram of FIG. 25;

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

101,702 ゼロ判定部、102 係数符号部、1
03,703 ゼロカウンタ、104 ゼロラングルー
プデコード部、105,705 ゼロラン符号化部、1
06 グループテーブル、107,704 符号テーブ
ル、701 量子化部、706 係数テーブル、707
係数テーブルデコード部、708 係数コード生成
部、709,1403,1903 係数OTHERコー
ド生成部、710 データ選択部、1401 係数グル
ープテーブル、1402,1902係数グループデコー
ド部、1901 テーブル切替え部
101, 702 Zero judgment unit, 102 Coefficient sign unit, 1
03,703 Zero counter, 104 Zero-run group decoder, 105,705 Zero-run encoder, 1
06 group table, 107, 704 code table, 701 quantization unit, 706 coefficient table, 707
Coefficient table decoding unit, 708 coefficient code generation unit, 709, 1403, 1903 coefficient OTHER code generation unit, 710 data selection unit, 1401 coefficient group table, 1402, 1902 coefficient group decoding unit, 1901 table switching unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 山根 靖彦 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (72)発明者 長谷部 巧 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (56)参考文献 特開 昭63−132530(JP,A) 特開 昭63−212287(JP,A) 特開 昭63−263983(JP,A) 特開 平6−350854(JP,A) 特開 平6−237184(JP,A) 特開 平6−152988(JP,A) 特開 平6−77843(JP,A) 特表 平5−507598(JP,A) (58)調査した分野(Int.Cl.7,DB名) H03M 7/46 ──────────────────────────────────────────────────の Continuing on the front page (72) Inventor Yasuhiko Yamane 1006 Kadoma, Kazuma, Osaka Prefecture Inside Matsushita Electric Industrial Co., Ltd. (72) Inventor Takumi 1006 Kazuma, Kadoma, Osaka Pref. (56) References JP-A-63-132530 (JP, A) JP-A-63-212287 (JP, A) JP-A-63-263983 (JP, A) JP-A-6-350854 (JP, A) JP-A-6-237184 (JP, A) JP-A-6-152988 (JP, A) JP-A-6-77843 (JP, A) Japanese Translation of PCT Application No. 5-507598 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) H03M 7/46

Claims (14)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力信号を異なる複数の周波数帯域を表
す係数データに分割し、上記周波数帯域毎に上記係数デ
ータに対して量子化を施し、該量子化された上記係数デ
ータを符号化する可変長符号化装置において、 上記係数データがゼロであるかどうかを判定するゼロ判
定手段と、 符号化を行う際に参照される符号語を記憶している符号
テーブルと、 上記係数データが上記ゼロ判定部でゼロではないと判定
されたときの係数データを、上記符号テーブルを用いて
符号化を行なう係数符号化手段と、 上記係数データが上記ゼロ判定部でゼロであると判定さ
れた場合、上記ゼロ判定部で上記係数データがゼロでは
ないと判定されるまで、連続するゼロの個数を数えるゼ
ロカウンタ手段と、 上記ゼロの続く長さ(以下、ゼロラン長)に対し、1個
のゼロラン長に1個のテーブル番号を対応づけたもの
と、複数のゼロラン長を1個のグループとして1個テー
ブル番号を対応づけて管理するグループテーブルと、 上記ゼロカウンタ手段で数えられた上記連続するゼロの
個数に対応したグループ番号を、上記グループテーブル
を用いて決定するゼロラングループ化手段と、 上記ゼロラングループ化手段より得られた上記グループ
番号と、上記符号テーブルとを用いて、上記連続するゼ
ロの個数を符号化するゼロラン符号化手段とを備えたこ
とを特徴とする可変長符号化装置。
A variable input means for dividing an input signal into coefficient data representing a plurality of different frequency bands, performing quantization on the coefficient data for each of the frequency bands, and encoding the quantized coefficient data; A length encoding device, a zero determination unit that determines whether the coefficient data is zero, a code table that stores a code word that is referred to when performing encoding, and the coefficient data that determines the zero. A coefficient encoding unit that encodes coefficient data when it is determined that the coefficient data is not zero by using the code table; and when the coefficient data is determined to be zero by the zero determination unit, Zero counter means for counting the number of consecutive zeros until the zero determination unit determines that the coefficient data is not zero, and one counter for the continuous length of the zeros (hereinafter, zero run length) A table in which one table number is associated with a zero run length, a group table which manages a plurality of zero run lengths as one group and associates one table number with the table, and the continuous table counted by the zero counter means. Zero run grouping means for determining a group number corresponding to the number of zeros using the group table, the group number obtained by the zero run grouping means, and the code table, And a zero-run coding means for coding the number of zeros to be performed.
【請求項2】 請求項1記載の可変長符号化装置におい
て、 上記グループテーブルは、上記連続するゼロの個数とこ
れを符号化するために必要な最小のビット数とを対応づ
けた情報を有し、 上記ゼロラン符号化手段は、上記ゼロラングループ化手
段から得られるグループ番号と、上記グループテーブル
から得られる上記最小のビット数と、上記符号テーブル
とを用いて、上記連続するゼロの個数を符号化すること
を特徴とする請求項1記載の可変長符号化装置。
2. The variable length coding apparatus according to claim 1, wherein the group table has information in which the number of the consecutive zeros is associated with the minimum number of bits necessary for encoding the number. The zero-run encoding unit uses the group number obtained from the zero-run grouping unit, the minimum number of bits obtained from the group table, and the code table to calculate the number of consecutive zeros. The variable-length encoding device according to claim 1, wherein encoding is performed.
【請求項3】 入力信号を異なる複数の周波数帯域を表
す係数データに分割し、上記周波数帯域毎に上記係数デ
ータに対して量子化を施し、該量子化された上記係数デ
ータを符号化する可変長符号化装置において、 上記係数データがゼロであるかどうかを判定するゼロ判
定手段と、 上記係数データ値と該係数値に対するテーブル番号とを
対応づけた係数テーブルと、 上記ゼロ判定手段で非ゼロと判定された場合に、上記非
ゼロの係数データのテーブル番号を上記係数テーブルを
用いて決定する係数テーブルデコード手段と、 量子化後の係数データの有効ビット数と、上記係数テー
ブルデコード手段から得られるテーブル番号と、上記符
号テーブルとを用いて、符号化を行う非ゼロ係数符号化
手段とを備えたことを特徴とする可変長符号化装置。
3. A variable variable for dividing an input signal into coefficient data representing a plurality of different frequency bands, performing quantization on the coefficient data for each of the frequency bands, and encoding the quantized coefficient data. A length encoding device, a zero determination unit that determines whether the coefficient data is zero, a coefficient table in which the coefficient data value is associated with a table number for the coefficient value, When it is determined, the coefficient table decoding means for determining the table number of the non-zero coefficient data using the coefficient table, the number of effective bits of the quantized coefficient data, and the coefficient table decoding means A non-zero coefficient encoding means for performing encoding using a table number to be encoded and the code table. .
【請求項4】 請求項3記載の可変長符号化装置におい
て、 上記非ゼロの係数データを符号化する際に用いる上記符
号テーブルのテーブルサイズが8〜16であることを特
徴とする可変長符号化装置。
4. The variable length coding apparatus according to claim 3, wherein the code table used for coding the non-zero coefficient data has a table size of 8 to 16. Device.
【請求項5】 入力信号を異なる複数の周波数帯域を表
す係数データに分割し、上記周波数帯域毎に上記係数デ
ータに対して量子化を施し、該量子化された上記係数デ
ータを符号化する可変長符号化装置において、 上記係数データがゼロであるかどうかを判定するゼロ判
定手段と、 上記係数の絶対値に対し1個の係数絶対値に1個のテー
ブル番号を対応づけるとともに、複数の係数絶対値を1
個のグループとして1個のテーブル番号を対応づけて管
理する係数グループテーブルと、 上記ゼロ判定手段で非ゼロと判定された場合に、上記非
ゼロの係数データを上記係数グループテーブルを用いて
グループ番号を決定する係数グループデコード手段と、 上記係数グループデコード手段から得られるグループ番
号と、上記符号テーブルとを用いて符号化を行うグルー
プ符号化手段を備えたことを特徴とする可変長符号化装
置。
5. A variable variable for dividing an input signal into coefficient data representing a plurality of different frequency bands, performing quantization on the coefficient data for each of the frequency bands, and encoding the quantized coefficient data. A length encoding device, a zero determination means for determining whether or not the coefficient data is zero, a table number being associated with one coefficient absolute value for the absolute value of the coefficient, Absolute value is 1
A coefficient group table for managing one table number in association with one group, and a non-zero coefficient data when the zero determination unit determines that the coefficient data is non-zero. And a group encoding unit for performing encoding using the group number obtained from the coefficient group decoding unit and the code table.
【請求項6】 請求項5記載の可変長符号化装置におい
て、 上記係数グループテーブルは、各グループ毎に係数絶対
値を表すのに必要なビット数(有効ビット数)の情報を
管理し、 上記グループ符号化手段は、上記グループデコード手段
から得られるグループ番号と、上記符号テーブルとに加
え、上記有効ビット数の情報を用いて符号化することを
特徴とする可変長符号化装置。
6. The variable-length encoding device according to claim 5, wherein the coefficient group table manages information on the number of bits (effective number of bits) required to represent the absolute value of the coefficient for each group. A variable length coding apparatus, wherein the group coding means performs coding using information on the number of effective bits in addition to the group number obtained from the group decoding means and the code table.
【請求項7】 請求項5または請求項6いずれかに記載
の可変長符号化装置において、 上記係数グループテーブルを複数有し、該複数の係数グ
ループテーブルの1つを選択する係数グループテーブル
選択手段と、 上記グループ符号化手段は、上記選択された係数グルー
プテーブルを用いて符号化することを特徴とする可変長
符号化装置。
7. The variable length coding apparatus according to claim 5, wherein said variable length coding apparatus has a plurality of said coefficient group tables, and selects one of said plurality of coefficient group tables. Wherein the group encoding means performs encoding using the selected coefficient group table.
【請求項8】 入力信号を異なる複数の周波数帯域を表
す係数データに分割し、上記周波数帯域毎に上記係数デ
ータに対して量子化を施し、該量子化された上記係数デ
ータを符号化する可変長符号化方法において、 上記係数データがゼロであるかどうかを判定するゼロ判
定ステップと、 上記係数データが上記ゼロ判定部でゼロではないと判定
されたときの係数データを、符号語を記憶している符号
テーブルを用いて符号化を行なう係数符号化ステップ
と、 上記係数データが上記ゼロ判定部でゼロであると判定さ
れた場合、上記ゼロ判定部で上記係数データがゼロでは
ないと判定されるまで、連続するゼロの個数を数えるゼ
ロカウントステップと、 上記ゼロの続く長さ(以下、ゼロラン長)に対し、1個
のゼロラン長に1個のテーブル番号を対応づけたもの
と、複数のゼロラン長を1個のグループとして1個テー
ブル番号を対応づけて管理するグループテーブルとを参
照し、上記ゼロカウントステップで数えられた上記連続
するゼロの個数に対応したグループ番号を決定するゼロ
ラングループ化ステップと、 上記ゼロラングループ化ステップより得られた上記グル
ープ番号と、上記符号テーブルとを用いて、上記連続す
るゼロの個数を符号化するゼロラン符号化ステップとを
備えたことを特徴とする可変長符号化方法。
8. A variable-variable device which divides an input signal into coefficient data representing a plurality of different frequency bands, quantizes the coefficient data for each of the frequency bands, and encodes the quantized coefficient data. In the long encoding method, a zero determination step of determining whether the coefficient data is zero, and storing a code word of the coefficient data when the coefficient data is determined not to be zero by the zero determination unit. A coefficient encoding step of performing encoding using the code table, and when the coefficient data is determined to be zero by the zero determination unit, the zero determination unit determines that the coefficient data is not zero. A zero count step of counting the number of consecutive zeros until the length of the zero continues (hereinafter referred to as a zero run length). A reference is made to a group table that manages a plurality of zero run lengths as one group and associates one table number with the table number, and corresponds to the number of consecutive zeros counted in the zero count step. A zero-run grouping step of determining a group number; a zero-run encoding step of encoding the number of consecutive zeros using the group number and the code table obtained from the zero-run grouping step; A variable-length encoding method comprising:
【請求項9】 請求項8記載の可変長符号化方法におい
て、 上記グループテーブルに、前記連続するゼロの個数とこ
れを符号化するために必要な最小のビット数とを対応づ
けた情報を追加し、 上記ゼロラン符号化ステップは、上記ゼロラングループ
化ステップから得られるグループ番号と、上記グループ
テーブルから得られる上記最小のビット数と、上記符号
テーブルとを用いて、上記連続するゼロの個数を符号化
することを特徴とする可変長符号化方法。
9. The variable length encoding method according to claim 8, wherein information that associates the number of the consecutive zeros with the minimum number of bits necessary to encode the consecutive zeros is added to the group table. The zero-run encoding step uses the group number obtained from the zero-run grouping step, the minimum number of bits obtained from the group table, and the code table to calculate the number of consecutive zeros. A variable-length encoding method characterized by encoding.
【請求項10】 入力信号を異なる複数の周波数帯域を
表す係数データに分割し、上記周波数帯域毎に上記係数
データに対して量子化を施し、該量子化された上記係数
データを符号化する可変長符号化方法において、 上記係数データがゼロであるかどうかを判定するゼロ判
定ステップと、 上記ゼロ判定ステップで非ゼロと判定された場合に、上
記非ゼロの係数データを、上記係数データ値と該係数値
に対するテーブル番号とを対応づけた係数テーブルを用
いて、そのテーブル番号を決定する係数テーブルデコー
ドステップと、 量子化後の係数データの有効ビット数と、上記係数テー
ブルデコードステップから得られるテーブル番号と、上
記符号テーブルとを用いて、符号化を行うステップとを
備えたことを特徴とする可変長符号化方法。
10. A variable variable for dividing an input signal into coefficient data representing a plurality of different frequency bands, performing quantization on the coefficient data for each of the frequency bands, and encoding the quantized coefficient data. In the long encoding method, a zero determination step of determining whether the coefficient data is zero, and if the zero determination step determines that the coefficient data is non-zero, the non-zero coefficient data is replaced with the coefficient data value. A coefficient table decoding step of determining a table number using a coefficient table in which a table number is associated with the coefficient value; an effective bit number of the quantized coefficient data; and a table obtained from the coefficient table decoding step. A variable-length encoding method, comprising: performing encoding using a number and the code table.
【請求項11】 請求項10記載の可変長符号化方法に
おいて、 上記非ゼロの係数データを符号化する際に用いる上記符
号テーブルのテーブルサイズが8〜16であることを特
徴とする可変長符号化方法。
11. The variable length coding method according to claim 10, wherein the code table used for coding the non-zero coefficient data has a table size of 8 to 16. Method.
【請求項12】 入力信号を異なる複数の周波数帯域を
表す係数データに分割し、上記周波数帯域毎に上記係数
データに対して量子化を施し、該量子化された上記係数
データを符号化する可変長符号化方法において、 上記係数データがゼロであるかどうかを判定するゼロ判
定ステップと、 上記ゼロ判定ステップで非ゼロと判定された場合に、上
記係数の絶対値に対し1個の係数絶対値に1個のテーブ
ル番号を対応づけるとともに、複数の係数絶対値を1個
のグループとして1個のテーブル番号を対応づけて管理
する係数グループテーブルを用いて、上記非ゼロの係数
データのグループ番号を決定する係数グループデコード
ステップと、 上記係数グループデコードステップから得られるグルー
プ番号と、上記符号テーブルとを用いて、符号化を行う
ステップとを備えたことを特徴とする可変長符号化方
法。
12. A variable variable encoder that divides an input signal into coefficient data representing a plurality of different frequency bands, quantizes the coefficient data for each of the frequency bands, and encodes the quantized coefficient data. In the long encoding method, a zero determination step for determining whether the coefficient data is zero, and, when the zero determination step determines that the coefficient data is non-zero, one coefficient absolute value for the absolute value of the coefficient And a coefficient group table for managing a plurality of coefficient absolute values as one group and associating one table number with the group number of the non-zero coefficient data. The encoding is performed using the coefficient group decoding step to be determined, the group number obtained from the coefficient group decoding step, and the code table. Performing a variable-length encoding method.
【請求項13】 請求項12記載の可変長符号化方法に
おいて、 上記係数グループテーブルに、各グループ毎に係数絶対
値を表すのに必要なビット数(有効ビット数)の情報を
追加して管理し、 上記符号化を行うステップは、 上記グループデコードステップから得られるグループ番
号と、上記符号テーブルとに加え、上記有効ビット数の
情報を用いて、符号化するものであることを特徴とする
可変長符号化方法。
13. The variable length encoding method according to claim 12, wherein information of the number of bits (effective number of bits) required to represent a coefficient absolute value for each group is added to the coefficient group table and managed. The step of performing the encoding includes encoding using the information of the number of effective bits in addition to the group number obtained from the group decoding step and the code table. Long encoding method.
【請求項14】 請求項12または13いずれかに記載
の可変長符号化方法において、 上記係数グループテーブルを複数用意し、これら複数の
係数グループテーブルの1つを選択する係数グループテ
ーブル選択ステップと、 上記符号化を行うステップを、上記係数グループテーブ
ル選択で選択された係数グループテーブルを用いて符号
化することを特徴とする可変長符号化方法。
14. The variable length coding method according to claim 12, wherein a plurality of the coefficient group tables are prepared, and one of the plurality of coefficient group tables is selected. A variable length encoding method, wherein the step of performing the encoding is performed using a coefficient group table selected by the coefficient group table selection.
JP24020196A 1995-09-11 1996-09-11 Variable length coding apparatus and method Expired - Fee Related JP3114796B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24020196A JP3114796B2 (en) 1995-09-11 1996-09-11 Variable length coding apparatus and method

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP23218295 1995-09-11
JP23218195 1995-09-11
JP7-232182 1995-10-16
JP7-266692 1995-10-16
JP7-232181 1995-10-16
JP26669295 1995-10-16
JP24020196A JP3114796B2 (en) 1995-09-11 1996-09-11 Variable length coding apparatus and method

Publications (2)

Publication Number Publication Date
JPH09172379A JPH09172379A (en) 1997-06-30
JP3114796B2 true JP3114796B2 (en) 2000-12-04

Family

ID=27477492

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24020196A Expired - Fee Related JP3114796B2 (en) 1995-09-11 1996-09-11 Variable length coding apparatus and method

Country Status (1)

Country Link
JP (1) JP3114796B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04241505A (en) * 1991-01-14 1992-08-28 Murata Mfg Co Ltd Piezoelectric thin film vibrator

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4090862B2 (en) 2002-04-26 2008-05-28 松下電器産業株式会社 Variable length encoding method and variable length decoding method
JP4515994B2 (en) * 2002-04-19 2010-08-04 パナソニック株式会社 Variable length coding method, variable length coding apparatus and program
JP4368575B2 (en) 2002-04-19 2009-11-18 パナソニック株式会社 Variable length decoding method, variable length decoding apparatus and program
JP2012049087A (en) * 2010-08-30 2012-03-08 Toshiba Corp Secondary battery device and vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04241505A (en) * 1991-01-14 1992-08-28 Murata Mfg Co Ltd Piezoelectric thin film vibrator

Also Published As

Publication number Publication date
JPH09172379A (en) 1997-06-30

Similar Documents

Publication Publication Date Title
US5818877A (en) Method for reducing storage requirements for grouped data values
JP4113114B2 (en) DCT compression using GOLOMB-RICE coding
TWI685245B (en) Data encoding and decoding
JP2009081860A (en) Apparatus and method for encoding digital image data in a lossless manner
JPH0746142A (en) Data compression system
JP2004531995A5 (en)
US20070071088A1 (en) Method and apparatus for entropy encoding and entropy decoding fine-granularity scalability layer video data
US8116373B2 (en) Context-sensitive encoding and decoding of a video data stream
JP3016456B2 (en) Adaptive variable length coding method
JP3163880B2 (en) Image compression coding device
JPWO2003079692A1 (en) Hierarchical encoding apparatus and decoding apparatus
EP0635807B1 (en) Coding apparatus for image compression
JP2914549B2 (en) Image coding method
JP3114796B2 (en) Variable length coding apparatus and method
In et al. On RD optimized progressive image coding using JPEG
EP0847650A1 (en) Method and apparatus for bound-based adaptive entropy encoding/decoding
EP0762771A2 (en) Apparatus and method for variable-length coding
Philips et al. A new embedded lossless/quasi-lossless image coder based on the Hadamard transform
JP3559314B2 (en) Image compression device
JP2841197B2 (en) Method of compressing gradation image data
JP2004048212A (en) Digital image coder, coding method and program
KR950010764B1 (en) Vld subtract method of position information
KR0148152B1 (en) Adaptive variable length coding/decoding method and apparatus of image data
Reavy et al. BACIC: a new method for lossless bi-level and grayscale image compression
KR100189523B1 (en) Image compression apparatus and method and decoding method by using image separation and arithmatic coding

Legal Events

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