[go: up one dir, main page]

JP2004007788A - Device and method for encoding animation, and device and method for decoding the same - Google Patents

Device and method for encoding animation, and device and method for decoding the same Download PDF

Info

Publication number
JP2004007788A
JP2004007788A JP2003276576A JP2003276576A JP2004007788A JP 2004007788 A JP2004007788 A JP 2004007788A JP 2003276576 A JP2003276576 A JP 2003276576A JP 2003276576 A JP2003276576 A JP 2003276576A JP 2004007788 A JP2004007788 A JP 2004007788A
Authority
JP
Japan
Prior art keywords
variable
encoding
decoding
variable length
length
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.)
Granted
Application number
JP2003276576A
Other languages
Japanese (ja)
Other versions
JP4388771B2 (en
Inventor
Yoshimi Isu
井須 芳美
Shunichi Sekiguchi
関口 俊一
Kotaro Asai
浅井 光太郎
Hirobumi Nishikawa
西川 博文
Shinichi Kuroda
黒田 慎一
Yuri Hasegawa
長谷川 由里
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2003276576A priority Critical patent/JP4388771B2/en
Publication of JP2004007788A publication Critical patent/JP2004007788A/en
Application granted granted Critical
Publication of JP4388771B2 publication Critical patent/JP4388771B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce an encoding amount when a quantizing conversion coefficient obtained after orthogonal conversion and quantization is encoded by using a variable length encoding table. <P>SOLUTION: The quantizing conversion coefficient 17 is obtained by performing orthogonal conversion by block unit, and quantization. When the coefficient 17 is encoded, a VLC table group selecting part 4c6 selects a variable length encoding table group from a VLC table storage part 4C1 in accordance with a condition in quantization at every area after dividing a block into the plurality of areas. A VLC table selecting part 4c8 selects the variable length encoding table to be used for encoding the quantizing conversion coefficient in the area from the selected variable length encoding table group. An area data encoding part 4c10 encodes the quantizing conversion coefficient by using the selected variable length encoding table, and outputs it as quantizing conversion coefficient data 17. <P>COPYRIGHT: (C)2004,JPO

Description

 本発明は、入力画像信号をブロック単位で変換および量子化して量子化変換係数を生成し、該量子化変換係数を上記ブロック内の所定領域毎に可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化装置および動画像符号化方法と、その符号化ビットストリームから画像信号を復号して、符号化前の入力画像信号を復元するようにした動画像復号装置および動画像復号方法に関する。 The present invention converts and quantizes an input image signal in units of blocks to generate quantized transform coefficients, and codes the quantized transform coefficients by performing variable-length coding using a variable-length coding table for each predetermined area in the block. Video encoding apparatus and a video encoding method for generating an encoded bit stream, a video decoding apparatus for decoding an image signal from the encoded bit stream, and restoring an input image signal before encoding, and The present invention relates to a video decoding method.

 従来、画像信号を効率的に符号化する手段として、例えば、ISO/IEC JTC11/SC29/WG111にて標準化作業が進められているMPEG-4(Moving Picture Experts Group Phase-4)のビデオ符号化参照方式(Verification Model 8.0 、以下VM8.0、ISO/IEC JTC11/SC29/WG11/N1796)で採用されているように、ブロック毎に、離散コサイン変換(DCT) 、量子化後、得られた量子化変換係数を可変長符号化する方法が用いられてきた。
 MPEG-4では、ブロック内の量子化変換係数を可変長符号化する手段としては、ブロック内を決められた順番にスキャンし、零でない係数がブロック内で最後かどうかを示すフラグ(LAST)、連続する零の数(RUN)とそれに続く零でない係数のレベル(LEVEL)を組にして、ブロック内で同一の可変長符号化テーブルを用いて、(LAST,RUN,LEVEL)を可変長符号化する方法が用いられている。このとき用いられる可変長符号化テーブルは、各(LAST,RUN,LEVEL)に対して、(LAST,RUN,LEVEL)の発生確率に基づいて、符号長を定められた符号語を割り当てている。
 つまり、発生確率の低い(LAST,RUN,LEVEL)に対しては長い符号長の符号語を割り当て、これに対し、発生確率の高い(LAST,RUN,LEVEL)に対しては短い符号長の符号語を割り当てるようにしている。
Conventionally, as a means for efficiently encoding an image signal, for example, see the video encoding of MPEG-4 (Moving Picture Experts Group Phase-4), which is being standardized in ISO / IEC JTC11 / SC29 / WG111. As adopted in the method (Verification Model 8.0, hereafter VM8.0, ISO / IEC JTC11 / SC29 / WG11 / N1796), discrete cosine transform (DCT) is performed for each block, A method of performing variable length coding of transform coefficients has been used.
In MPEG-4, as means for performing variable-length coding on the quantized transform coefficients in a block, the inside of the block is scanned in a predetermined order, and a flag indicating whether a non-zero coefficient is the last in the block (LAST), (LAST, RUN, LEVEL) is variable-length coded by using the same variable-length coding table in a block by combining the number of consecutive zeros (RUN) and the level of non-zero coefficients (LEVEL) that follow. Is used. In the variable length coding table used at this time, a code word having a predetermined code length is assigned to each (LAST, RUN, LEVEL) based on the occurrence probability of (LAST, RUN, LEVEL).
In other words, a codeword with a long code length is assigned to low occurrence probability (LAST, RUN, LEVEL), whereas a short code length codeword is assigned to high occurrence probability (LAST, RUN, LEVEL). Try to assign words.

 しかし、前記の従来方式では、一つの可変長符号化テーブルにより、ブロック内の量子化変換係数を符号化していたため、例えば、符号化の際、量子化変換係数の値のばらつきを小さくするために、前後のブロックの変換係数との差分データを符号化する変換係数予測が行われた場合、変換係数予測が行われなかった場合と比較すると、変換係数のレベルが小さくなるなど、(RUN,LEVEL)の発生確率が異なる場合に、同一の可変長符号化テーブルを用いて符号化を行うと変換係数の符号化の際の冗長度が高くなる、という問題があった。 However, in the conventional method, since the quantized transform coefficients in a block are encoded by one variable-length encoding table, for example, in encoding, in order to reduce the variation in the values of the quantized transform coefficients, (RUN, LEVEL, etc.), when the transform coefficient prediction for encoding the difference data with the transform coefficients of the preceding and succeeding blocks is performed, and the level of the transform coefficient is smaller than when the transform coefficient prediction is not performed. In the case where the occurrence probabilities are different from each other, there is a problem that if the coding is performed using the same variable length coding table, the redundancy at the time of coding the transform coefficient increases.

 また、量子化を行った際の量子化ステップサイズによっても変換係数のレベルの発生頻度は異なるため、やはり同一の可変長符号化テーブルを用いて符号化することは、変換係数の符号化の際の冗長度を高める、という問題があった。 Also, since the frequency of occurrence of the transform coefficient level varies depending on the quantization step size at the time of the quantization, encoding using the same variable-length encoding table is also necessary when encoding the transform coefficient. However, there is a problem that the redundancy is increased.

 そこで、本発明は、上述したような問題を解決するためになされたもので、変換係数予測を行ったか否か、あるいは、量子化ステップサイズ等の各種の符号化の際の条件を適応的に切り替えた場合に、符号化効率を高めることのできる動画像符号化装置および動画像符号化方法を提供することを目的とする。 Therefore, the present invention has been made to solve the above-described problem, and it has been proposed to determine whether or not to perform transform coefficient prediction, or to adaptively adjust conditions for various types of encoding such as quantization step sizes. It is an object of the present invention to provide a moving picture coding apparatus and a moving picture coding method capable of improving coding efficiency when switching is performed.

 特に、本発明では、入力画像信号の符号化単位であるブロック内をいくつかの領域に分け、各領域内の変換係数を可変長符号化する際に用いる可変長符号化テーブルを適応的に切り替えることにより、符号化効率を向上させることのできる動画像符号化装置および動画像符号化方法を提供することを目的とする。 In particular, in the present invention, a block which is a coding unit of an input image signal is divided into several regions, and a variable-length coding table used when performing variable-length coding of transform coefficients in each region is adaptively switched. Accordingly, an object of the present invention is to provide a moving picture coding device and a moving picture coding method capable of improving coding efficiency.

 また、これらの動画像符号化装置および動画像符号化方法によって生成された符号化ビットストリームを正しく復号することのできる動画像復号装置および動画像復号方法を提供することを目的とする。 Another object of the present invention is to provide a moving picture decoding apparatus and a moving picture decoding method capable of correctly decoding a coded bit stream generated by the moving picture coding apparatus and the moving picture coding method.

 前記目的を達成するために、本発明では、入力画像信号をブロック単位で変換および量子化して量子化変換係数を生成し、該量子化変換係数を前記ブロック内の所定領域毎に可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化装置において、予めグループ分けされた複数の可変長符号化テーブル群と、前記複数の可変長符号化テーブル群のうちから1つの可変長符号化テーブルグループを選択する可変長符号化テーブルグループ選択手段と、前記選択されたグループの可変長符号化テーブルを使用して前記量子化変換係数を可変長符号化し、前記選択されたグループの可変長符号化テーブルを示す情報を含む符号化ビットストリームを生成する符号化ビットストリーム生成手段と、を備えたことを特徴とするものである。 In order to achieve the object, according to the present invention, an input image signal is transformed and quantized in units of blocks to generate quantized transform coefficients, and the quantized transform coefficients are subjected to variable-length coding for each predetermined area in the block. In a moving picture coding apparatus that generates a coded bit stream by performing variable length coding using a table, one of a plurality of variable length coding tables grouped in advance and one of the plurality of variable length coding tables is classified. A variable length coding table group selecting means for selecting a variable length coding table group; and a variable length coding of the quantized transform coefficient using the variable length coding table of the selected group, Bit stream generation means for generating an encoded bit stream including information indicating the variable length coding table of It is an feature.

 また、次の発明では、複数の可変長符号化テーブル群は、量子化の際の符号化条件に基づいて予めグループ分けされたものであり、可変長符号化テーブルグループ選択手段は、量子化の際の符号化条件に基づいて可変長符号化テーブルグループを選択することを特徴とするものである。 In the following invention, the plurality of variable-length coding table groups are grouped in advance based on coding conditions at the time of quantization. The variable-length coding table group is selected based on the coding conditions at that time.

 また、次の発明では、可変長符号化テーブル群は、ブロック間で量子化変換係数の差分を算出する変換係数予測の有無に基づいてグループ分けされた複数の可変長符号化テーブルからなり、可変長符号化テーブルグループ選択手段は、前記変換係数予測の有無に基づいて前記複数の可変長符号化テーブル群のうちから対応する可変長符号化テーブルグループを選択し、符号化ビットストリーム生成手段は、選択されたグループの可変長符号化テーブルを示す情報として前記変換係数予測の有無を示す情報を含む符号化ビットストリームを生成することを特徴とするものである。 In the following invention, the variable-length coding table group includes a plurality of variable-length coding tables grouped based on the presence or absence of a transform coefficient prediction for calculating a difference between quantized transform coefficients between blocks. The long coding table group selecting means selects a corresponding variable length coding table group from the plurality of variable length coding tables based on the presence or absence of the transform coefficient prediction, and the coded bit stream generating means An encoded bit stream including information indicating the presence or absence of the transform coefficient prediction as information indicating a variable length coding table of a selected group is generated.

 また、次の発明では、可変長符号化テーブル群は、量子化ステップサイズに応じてグループ分けされた複数の可変長符号化テーブルからなり、可変長符号化テーブルグループ選択手段は、前記量子化ステップサイズに基づいて前記複数の可変長符号化テーブル群のうちから対応する可変長符号化テーブルグループを選択し、符号化ビットストリーム生成手段は、選択されたグループの可変長符号化テーブルを示す情報として前記量子化ステップサイズの情報を含む符号化ビットストリームを生成することを特徴とするものである。 In the following invention, the variable-length coding table group includes a plurality of variable-length coding tables grouped according to a quantization step size. A corresponding variable-length coding table group is selected from the plurality of variable-length coding table groups based on the size, and the coded bitstream generation unit generates information indicating the variable-length coding table of the selected group. It is characterized in that an encoded bit stream including information on the quantization step size is generated.

 また、次の発明では、さらに、可変長符号化テーブルグループ選択手段によって選択された可変長符号化テーブルグループのうちから、前記量子化変換係数の領域内での位置に基づいて可変長符号化テーブルを切替える可変長符号化テーブル切替手段を有することを特徴とするものである。 Further, in the following invention, the variable length coding table is selected from the variable length coding table group selected by the variable length coding table group selecting means based on the position of the quantized transform coefficient in the area. And a variable-length coding table switching means for switching the table.

 また、次の発明では、さらに、前記量子化変換係数を可変長符号化する際、各領域内の量子化変換係数がすべて零である場合を無効領域、領域内に零ではない係数がある場合を有効領域と判断する領域データ有効/無効判定手段を有し、符号化ビットストリーム生成手段は、前記領域データ有効/無効判定手段によって有効領域と判定された場合には、選択した可変長符号化テーブルにより領域内の量子化変換係数を符号化してその際に使用した可変長符号化テーブルを示す情報を含む符号化ビットストリームを生成する一方、無効領域であると判定された場合には、その領域が無効であることを示す情報を含む符号化ビットストリームを生成することを特徴とする。 Further, in the next invention, when the quantized transform coefficient is subjected to variable-length coding, the case where all the quantized transform coefficients in each region are zero is an invalid region, and the case where there is a non-zero coefficient in the region. Is determined as an effective area. The encoded bit stream generating means, when the area data validity / invalidity determination means determines that the area is an effective area, selects the selected variable-length coding While encoding the quantized transform coefficients in the area by the table and generating an encoded bit stream including information indicating the variable length encoding table used at that time, if it is determined that the area is invalid, the An encoded bit stream including information indicating that the area is invalid is generated.

 また、次の発明では、符号化ビットストリーム生成手段は、量子化変換係数を可変長符号化する際、対応する符号語が可変長符号化テーブルに無い場合には、当該対応する符号語のない量子化変換係数を所定の方法により可変長符号化テーブルに含まれる値になるように変換すると共に、その変換後の量子化変換係数を前記可変長テーブルにより可変長符号化して、前記変換方法を示す情報を含む符号化ビットストリームを生成することを特徴とする。 Further, in the following invention, the encoded bit stream generating means, when performing variable length encoding of the quantized transform coefficient, if the corresponding codeword is not in the variable length encoding table, there is no corresponding codeword. The quantized transform coefficient is converted by a predetermined method so as to be a value included in the variable length coding table, and the quantized transform coefficient after the conversion is variable length coded by the variable length table. And generating an encoded bit stream including the indicated information.

 また、次の発明では、符号化ビットストリームを入力してその符号化ビットストリームに含まれているブロック毎に可変長符号化された符号化データを可変長復号して量子化変換係数を復元し、該量子化変換係数を逆量子化、逆変換して画像信号を復号する動画像復号装置において、グループ分けされた複数の可変長復号テーブル群と、前記符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報を復号し、前記可変長復号テーブル群の中から該可変長符号化テーブルグループ情報に基づいて可変長復号テーブルグループを選択する可変長復号テーブルグループ選択手段と、前記選択されたグループの可変長復号テーブルを使用して前記符号化データを可変長復号して前記量子化変換係数を復元する量子化変換係数復元手段と、を備えたことを特徴とするものである。 Further, in the next invention, a coded bit stream is input, and coded data subjected to variable length coding for each block included in the coded bit stream is subjected to variable length decoding to restore a quantized transform coefficient. In a moving picture decoding apparatus for decoding an image signal by inversely quantizing and inversely transforming the quantized transform coefficient, a plurality of variable length decoding tables grouped into groups and used on the encoding side from the encoded bit stream. Variable length decoding table group selecting means for decoding information indicating the variable length coding table group, and selecting a variable length decoding table group from the variable length decoding table group based on the variable length coding table group information. Using the variable length decoding table of the selected group to perform variable length decoding of the encoded data to restore the quantized transform coefficients. And 換係 number restoring means, characterized in that it comprises a.

 また、次の発明では、複数の可変長復号テーブル群は、量子化の際の符号化条件に基づいて予めグループ分けされたものであり、可変長復号テーブルグループ選択手段は、符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報として、量子化の際の符号化条件を示す情報を復号し、この量子化の際の符号化条件に基づいて可変長復号テーブルグループを選択することを特徴とするものである。 Further, in the following invention, the plurality of variable length decoding table groups are grouped in advance based on encoding conditions at the time of quantization. As information indicating the variable-length coding table group used on the encoding side, information indicating the coding condition at the time of quantization is decoded, and the variable-length decoding table group is decoded based on the coding condition at the time of quantization. It is characterized by selection.

 また、次の発明では、前記可変長復号テーブル群は、ブロック間で量子化変換係数の差分を算出する変換係数予測の有無に基づいてグループ分けされた複数の可変長復号テーブルからなり、前記可変長復号テーブルグループ選択手段は、符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報として、量子化変換係数予測の有無を示す情報を復号し、その量子化変換係数予測の有無を示す情報に基づいて、可変長復号テーブルグループを選択することを特徴とするものである。 In the following invention, the variable-length decoding table group includes a plurality of variable-length decoding tables grouped based on the presence or absence of a transform coefficient prediction for calculating a difference between quantized transform coefficients between blocks. The long decoding table group selecting means decodes, from the coded bit stream, information indicating the presence or absence of the quantization transform coefficient prediction as information indicating the variable length coding table group used on the coding side, and The variable-length decoding table group is selected based on information indicating the presence or absence of a variable-length decoding table group.

 また、次の発明では、前記可変長復号テーブル群は、量子化ステップサイズに基づいてグループ分けされた複数の可変長復号テーブルからなり、前記可変長復号テーブルグループ選択手段は、符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報として、量子化ステップサイズを復号し、復号した量子化ステップサイズに基づいて、可変長復号テーブルグループを選択することを特徴とするものである。 In the following invention, the variable-length decoding table group includes a plurality of variable-length decoding tables grouped based on a quantization step size. Decoding the quantization step size as information indicating the variable length coding table group used on the encoding side, and selecting the variable length decoding table group based on the decoded quantization step size. is there.

 また、次の発明では、さらに、前記量子化変換係数復元手段は、前記可変長復号テーブルグループ選択手段で選択された可変長復号テーブルグループ内の複数の可変長復号テーブルを切り替えて量子化変換係数を復号する際に、前記量子化変換係数の領域内での位置に基づいて可変長復号テーブルを切り替える可変長復号テーブル選択手段を有することを特徴とするものである。 Further, in the following invention, the quantization transform coefficient restoring means further switches the plurality of variable length decoding tables in the variable length decoding table group selected by the variable length decoding table group selecting means, and And a variable-length decoding table selecting means for switching the variable-length decoding table based on the position of the quantized transform coefficient in the region when decoding.

 また、次の発明では、量子化変換係数復元手段は、領域内の量子化変換係数がすべて零である場合には、領域が無効であることを示し、零ではない量子化変換係数が一つ以上ある場合には、領域内の各量子化変換係数を復号するために用いる可変長復号テーブルを示す可変長符号化テーブル選択情報を復号し、復号した可変長符号化テーブル選択情報に基づいて、領域が無効であるかを判断する判断手段と、前記判断手段によって領域が無効であると判断された場合には、その領域内の量子化変換係数をすべて零に設定する量子化変換係数零設定手段と、を有することを特徴とするものである。 Further, in the following invention, when the quantized transform coefficients in the area are all zero, the quantized transform coefficient restoration means indicates that the area is invalid, and one non-zero quantized transform coefficient is included in the area. In the above case, the variable-length coding table selection information indicating the variable-length decoding table used to decode each quantized transform coefficient in the area is decoded, and based on the decoded variable-length coding table selection information, Judging means for judging whether or not the area is invalid; and a quantizing transform coefficient zero for setting all quantized transform coefficients in the area to zero when the judging means judges that the area is invalid. And setting means.

 また、次の発明では、さらに、符号化ビットストリームから符号化側において量子化変換係数を所定の方法により変換したことを示す情報を復号したか否かを判断する判断手段と、前記判断手段によって前記変換したことを情報を復号したと判断された場合は、前記量子化変換係数の復元の際、前記可変長復号テーブルにより復号し、その後、前記所定の方法の変換とは逆の処理を行って前記変換前の量子化変換係数に復元する手段と、を有することを特徴とするものである。 Further, in the following invention, further, a judging means for judging whether or not information indicating that the quantized transform coefficient has been converted by the predetermined method on the encoding side from the encoded bit stream has been decoded, and When it is determined that the information has been decoded by the conversion, when the quantized transform coefficient is restored, decoding is performed using the variable-length decoding table, and then a process reverse to the conversion of the predetermined method is performed. Means for restoring the quantized transform coefficients before the transformation.

 また、次の発明では、入力画像信号をブロック単位で変換および量子化して量子化変換係数を作成し、該量子化変換係数を前記ブロック内の所定領域毎に定められた可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化方法において、グループ分けされた複数の可変長符号化テーブル群の中から、可変長符号化テーブルグループを選択し、その選択したグループの可変長符号化テーブルを使用して、前記量子化変換係数を可変長符号化し、選択された可変長符号化テーブルを示す情報を含む符号化ビットストリームを生成することを特徴とするものである。 Further, in the following invention, an input image signal is transformed and quantized in block units to generate a quantized transform coefficient, and the quantized transform coefficient is calculated using a variable length encoding table determined for each predetermined area in the block. In the moving picture coding method of generating a coded bit stream by performing variable length coding, a variable length coding table group is selected from a plurality of grouped variable length coding tables, and the selected group is selected. The variable-length coding table is used to perform variable-length coding on the quantized transform coefficients to generate a coded bit stream including information indicating the selected variable-length coding table.

 また、次の発明では、グループ分けされた複数の可変長符号化テーブル群の中から、可変長符号化テーブルグループを選択する際、量子化の際の符号化条件に基づいて選択すると共に、選択された可変長符号化テーブルを示す情報として前記量子化の際の符号化条件の情報を含む符号化ビットストリームを生成することを特徴とするものである。 Further, in the following invention, when selecting a variable length coding table group from a plurality of grouped variable length coding tables, the selection is performed based on a coding condition at the time of quantization. And generating an encoded bit stream including information on encoding conditions at the time of the quantization as information indicating the variable length encoding table.

 また、次の発明では、符号化ビットストリームを入力してその符号化ビットストリームに含まれているブロック毎に可変長符号化された符号化データを可変長復号して量子化変換係数を復元し、該量子化変換係数を逆量子化、逆変換して画像信号を復号する動画像復号方法において、前記量子化変換係数の復元の際、前記符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報を復号し、グループ分けされた複数の可変長復号テーブル群の中から前記可変長符号化テーブルグループ情報に基づいて可変長復号テーブルグループを選択し、その選択したグループの可変長復号テーブルを使用して前記符号化データを可変長復号して前記量子化変換係数を復元することを特徴とするものである。 Further, in the next invention, a coded bit stream is input, and coded data subjected to variable length coding for each block included in the coded bit stream is subjected to variable length decoding to restore a quantized transform coefficient. In the moving picture decoding method for decoding an image signal by inversely quantizing and inversely transforming the quantized transform coefficient, a variable length used on the encoding side from the encoded bit stream when the quantized transform coefficient is restored. The information indicating the encoding table group is decoded, and a variable length decoding table group is selected based on the variable length encoding table group information from among the plurality of variable length decoding table groups divided into groups. The coded data is variable-length decoded using a variable-length decoding table to restore the quantized transform coefficients.

 また、次の発明では、量子化変換係数の復元の際、符号化側で用いた可変長符号化テーブルグループを示す情報として、前記符号化ビットストリームから量子化の際の符号化条件の情報を復号し、その量子化の際の符号化条件の情報に基づいて可変長復号テーブルグループを選択することを特徴とするものである。 Further, in the following invention, when restoring the quantized transform coefficient, as information indicating the variable length coding table group used on the encoding side, information on encoding conditions at the time of quantization is used from the encoded bit stream. Decoding is performed, and a variable length decoding table group is selected based on information on coding conditions at the time of quantization.

 以上、説明したように本発明では、ブロックを複数の領域に分けて、領域毎に、ブロック内での領域の位置と量子化の際の符号化条件に応じて、VLCテーブルグループを選択し、さらにその選択されたVLCテーブルグループの中からVLCテーブルを選択して、変換係数を可変長符号化することができるため、より少ない符号量で変換係数を符号化することが可能となる。 また、領域の位置と量子化の際の符号化条件により、領域内で切り替えるVLCテーブルグループを選択しておくことにより、切り替えるVLCテーブルを示す情報を符号化するのに必要な符号量を削減することができる。 As described above, in the present invention, a block is divided into a plurality of regions, and for each region, a VLC table group is selected according to the position of the region in the block and the encoding conditions at the time of quantization, Furthermore, since the VLC table can be selected from the selected VLC table group and the transform coefficient can be subjected to variable-length coding, the transform coefficient can be coded with a smaller code amount. In addition, by selecting a VLC table group to be switched in the region based on the position of the region and the encoding conditions at the time of quantization, the amount of code required to encode information indicating the VLC table to be switched is reduced. be able to.

 また、次の発明では、選択されたVLCテーブルグループの中からVLCテーブルを選択する際に、領域内のスキャン位置に応じて選択することにより、付加情報として、切り替えるVLCテーブルを示す情報をビットストリームに多重化する必要がなく、VLCテーブルの切り替えに必要な付加情報の符号量を削減できるという効果が得られる。 Further, in the next invention, when a VLC table is selected from the selected VLC table group, information indicating the VLC table to be switched is added as additional information by selecting the VLC table according to the scan position in the area. Therefore, there is an effect that the amount of code of additional information necessary for switching the VLC table can be reduced.

 さらに、次の発明では、領域毎に領域内の量子化変換係数が零であるかを判定し、領域内の係数がすべて零である領域については、その領域が無効であることの情報を符号化し、領域内に零ではない係数がある領域については、その係数を符号化するのに用いたVLCテーブルを示す情報を符号化することにより、従来、符号化モードによって異なるビットストリームの構造を共通にすることができ、復号装置において、シンタックス解析のための回路を簡単にすることができるという効果が得られる。 Further, in the next invention, it is determined whether or not the quantized transform coefficient in the area is zero for each area, and information that the area is invalid is encoded for an area in which all the coefficients in the area are zero. Conventionally, for a region having a non-zero coefficient in a region, information indicating a VLC table used for coding the coefficient is coded, so that a bit stream structure different depending on a coding mode is conventionally shared. This makes it possible to simplify the circuit for syntax analysis in the decoding device.

 また、次の発明では、AC係数データの可変長符号化を行う際に、符号化するAC係数データに対応するデータがVLCテーブルになかった場合、AC係数データを変換し、変換したAC係数データをもとに再びVLCテーブルを探索し、可変長符号化することにより、圧縮効率を高める効果が得られる。 Further, in the following invention, when performing variable length coding of AC coefficient data, if data corresponding to the AC coefficient data to be coded is not in the VLC table, the AC coefficient data is converted, and the converted AC coefficient data is converted. By searching the VLC table again based on the VLC and performing variable length coding, an effect of increasing the compression efficiency can be obtained.

実施の形態1.
 本実施の形態1では、請求項1に記載の符号化装置による動画像符号化装置について説明する。
 図1は、本実施の形態1における動画像符号化装置の構成を示すブロック図である。
 同図において、1は入力形状データ、2は形状符号化部、3は形状符号化データ、4は可変長符号化部、5は多重化部、6は局所復号形状データ、7は入力テクスチャデータ、8はイントラ/インター判定部、9はモード指示フラグ、10は動き検出部、11は動きベクトル、12は動き補償部、13は予測画像信号、14は予測誤差信号、15は被符号化画像信号、16はテクスチャ符号化部、17は量子化変換係数データ、18はテクスチャ局所復号部、19は局所復号予測誤差信号、20は局所復号画像信号、21は切替部、22は参照画像信号、23はメモリ、24は形状データ符号語、25は付加情報符号語、26はブロックデータ符号語、27は動きベクトル符号語、28は符号化ビットストリーム、29は減算器、30は加算器、31はテクスチャ符号化の際の条件の1つである変換係数予測判定情報、32はテクスチャ符号化の際の条件のもう1つである量子化ステップサイズ、である。
Embodiment 1 FIG.
In the first embodiment, a moving picture coding apparatus using the coding apparatus according to claim 1 will be described.
FIG. 1 is a block diagram showing a configuration of the moving picture coding apparatus according to the first embodiment.
In the figure, 1 is input shape data, 2 is shape coding unit, 3 is shape coding data, 4 is variable length coding unit, 5 is multiplexing unit, 6 is local decoding shape data, 7 is input texture data. , 8 is an intra / inter determination unit, 9 is a mode instruction flag, 10 is a motion detection unit, 11 is a motion vector, 12 is a motion compensation unit, 13 is a predicted image signal, 14 is a prediction error signal, and 15 is a coded image. Signal, 16 is a texture encoding unit, 17 is quantized transform coefficient data, 18 is a texture local decoding unit, 19 is a local decoding prediction error signal, 20 is a locally decoded image signal, 21 is a switching unit, 22 is a reference image signal, 23 is a memory, 24 is a shape data codeword, 25 is an additional information codeword, 26 is a block data codeword, 27 is a motion vector codeword, 28 is a coded bit stream, 29 is a subtractor, and 30 is an adder , 31 are transform coefficient prediction determination information which is one of the conditions for texture encoding, and 32 is a quantization step size which is another condition for texture encoding.

 図2は、図1に示す実施の形態1の可変長符号化部4の内部構成を示す図である。
 同図において、4aは形状データ可変長符号化部、4bは付加情報可変長符号化部、4cは変換係数可変長符号化部、4dは動きベクトル可変長符号化部、である。
FIG. 2 is a diagram showing an internal configuration of the variable length coding unit 4 according to the first embodiment shown in FIG.
In the drawing, reference numeral 4a denotes a shape data variable length coding unit, 4b denotes an additional information variable length coding unit, 4c denotes a transform coefficient variable length coding unit, and 4d denotes a motion vector variable length coding unit.

 次に、図1および図2をもとに、装置全体の動作について説明する。
 尚、本装置は、入力ディジタル画像系列を、MPEG-4でいう画像オブジェクト、すなわち動きや絵柄などの特徴を同じくする部分領域に分離して、画像オブジェクトを単位として符号化する装置である。ただし、1フレームを1画像オブジェクトとして定義すれば、画像フレームを単位として符号化することもできる。画像オブジェクトとは、それを取り囲むような外接四角形内のカラー濃淡レベルを表すテクスチャデータと、外接四角形内の有効画素を表す形状データと、から構成される。テクスチャデータは、輝度信号成分および色差信号成分のペアから構成され、入力画像信号に相当するものである。形状データは、オブジェクトの内部を1、オブジェクトの外部を0とする2値のマトリクスデータである。
Next, the operation of the entire apparatus will be described with reference to FIGS.
This apparatus is an apparatus that separates an input digital image sequence into image objects in MPEG-4, that is, partial regions having the same characteristics such as motion and picture, and encodes the image objects in units. However, if one frame is defined as one image object, encoding can be performed in image frame units. The image object is composed of texture data representing a color density level in a circumscribed rectangle surrounding the image object, and shape data representing an effective pixel in the circumscribed rectangle. The texture data is composed of a pair of a luminance signal component and a color difference signal component, and corresponds to an input image signal. The shape data is binary matrix data in which the inside of the object is 1 and the outside of the object is 0.

 動作を説明すると、まず、入力形状データ1は、形状符号化部2に渡され、符号化、局所復号が行われ、それぞれ形状符号化データ3と、局所復号形状データ6として出力される。
 形状符号化データ3は、可変長符号化部4で可変長符号化され、その後、多重化部5にて、符号化ビットストリーム28に多重化される。
 また、局所復号形状データ6は、有効画素のみを対象にして、テクスチャデータの符号化、動き補償等を行うために用いられるように、テクスチャ符号化部16、テクスチャ局所復号部18、動き補償部12、動き検出部10に送られる。
In operation, first, the input shape data 1 is passed to the shape encoding unit 2, where encoding and local decoding are performed, and output as shape encoded data 3 and local decoded shape data 6, respectively.
The shape-encoded data 3 is subjected to variable-length encoding by a variable-length encoding unit 4 and then multiplexed to an encoded bit stream 28 by a multiplexing unit 5.
The local decoding shape data 6 includes a texture coding unit 16, a texture local decoding unit 18, a motion compensation unit, and the like, which are used to perform texture data coding, motion compensation, and the like for only effective pixels. 12, sent to the motion detection unit 10.

 一方、入力テクスチャデータ7は、マクロブロックと呼ばれるブロック毎に切り出され、マクロブロック単位で以下の動作を行う。
 つまり、まず、テクスチャデータ7を画像オブジェクト内で符号化するか、画像オブジェクト間で符号化するかをイントラ/インター判定部8にて決定する。 ここで、イントラ(画像オブジェクト内)符号化に決定した場合、イントラ/インター判定部8は、入力テクスチャデータ7をそのまま被符号化画像信号15としてテクスチャ符号化部16へ渡す。
On the other hand, the input texture data 7 is cut out for each block called a macroblock, and the following operation is performed for each macroblock.
That is, first, the intra / inter determination unit 8 determines whether to encode the texture data 7 in the image object or between the image objects. Here, when it is determined to perform intra (within image object) encoding, the intra / inter determining unit 8 passes the input texture data 7 as it is to the texture encoding unit 16 as the encoded image signal 15.

 その一方、インター(画像オブジェクト間)符号化に決定した場合、イントラ/インター判定部8は、動き補償予測を行うため、入力テクスチャデータ7を動き検出部10に送る。
 動き検出部10では、メモリ23に記憶された参照画像信号22の所定の範囲内で入力テクスチャデータ7の輝度信号成分に最も類似する領域を探索し、入力テクスチャデータ7の画面内位置からその最も類似する領域の位置までの位置の変化を動きベクトル11として、動き補償部12および可変長符号化部4に出力する。
On the other hand, when the encoding is determined to be inter (between image objects), the intra / inter determining unit 8 sends the input texture data 7 to the motion detecting unit 10 in order to perform motion compensation prediction.
The motion detection unit 10 searches for a region most similar to the luminance signal component of the input texture data 7 within a predetermined range of the reference image signal 22 stored in the memory 23, The change in the position up to the position of the similar area is output as a motion vector 11 to the motion compensation unit 12 and the variable length coding unit 4.

 可変長符号化部4に出力された動きベクトル11は、可変長符号化部4の動きベクトル可変長符号化部4dにより冗長度を削減された後、多重化部5により符号化ビットストリーム28に多重化される。 After the redundancy is reduced by the motion vector variable length coding unit 4d of the variable length coding unit 4, the motion vector 11 output to the variable length coding unit 4 is converted into a coded bit stream 28 by the multiplexing unit 5. Multiplexed.

 また、動き補償部12では、動き検出部10から得られた動きベクトル11に基づいて、メモリ23に記憶された参照画像信号22から予測画像信号13を抽出する。すると、減算器29は、この予測画像信号13と、入力テクスチャデータ7との差分である予測誤差信号14を、被符号化画像信号15としてテクスチャ符号化部16へ渡す。 {Circle around (2)} The motion compensation unit 12 extracts the predicted image signal 13 from the reference image signal 22 stored in the memory 23 based on the motion vector 11 obtained from the motion detection unit 10. Then, the subtractor 29 passes the prediction error signal 14, which is the difference between the predicted image signal 13 and the input texture data 7, to the texture encoding unit 16 as the encoded image signal 15.

 なお、イントラ/インター判定部8にて選択されたイントラ/インターのモードは、切替部21へ出力されると共に、モード指示フラグ9として、可変長符号化部4で可変長符号化され、続いて多重化部5に渡されて、符号化ビットストリーム28に多重化される。 The intra / inter mode selected by the intra / inter determining unit 8 is output to the switching unit 21 and is variable-length coded by the variable-length coding unit 4 as a mode instruction flag 9. The data is passed to the multiplexing unit 5 and multiplexed into an encoded bit stream 28.

 そして、テクスチャ符号化部16では、被符号化画像信号15を直交変換および量子化して、量子化変換係数データ17として出力する。量子化変換係数データ17は、可変長符号化部4の変換係数可変長符号化部4cによって、冗長度を削減されて可変長符号化された後、多重化部5によって、符号化ビットストリーム28に多重化される。 Then, the texture encoding unit 16 orthogonally transforms and quantizes the coded image signal 15 and outputs it as quantized transform coefficient data 17. The quantized transform coefficient data 17 is subjected to variable length coding with reduced redundancy by the transform coefficient variable length coding unit 4c of the variable length coding unit 4, and then to the coded bit stream 28 by the multiplexing unit 5. Multiplexed.

 また、テクスチャ符号化部16から出力された量子化変換係数データ17は、テクスチャ局所復号部18にも送信され、テクスチャ局所復号部18により、逆量子化および逆直交変換されて局所復号予測誤差信号19となる。
 この局所復号予測誤差信号19は、モード指示フラグ9がインターモードを示している場合、切替部21から動き補償部12からの予測画像信号13が出力されているので、加算器30にて、その予測画像信号13と加算されて、局所復号画像信号20として出力される。
The quantized transform coefficient data 17 output from the texture encoding unit 16 is also transmitted to the texture local decoding unit 18, where the quantized transform coefficient data 17 is inversely quantized and inverse orthogonally transformed by the texture local decoding unit 18 to generate a local decoding prediction error signal. It becomes 19.
When the mode instruction flag 9 indicates the inter mode, the local decoding prediction error signal 19 is output by the adder 30 since the prediction image signal 13 from the motion compensation unit 12 is output from the switching unit 21. It is added to the predicted image signal 13 and output as a locally decoded image signal 20.

 これに対し、モード指示フラグ9がイントラモードを示している場合には、切替部21にて、0信号が選択されるので、加算部30にて、局所復号予測誤差信号19と予測画像信号13との加算は行われず、そのまま局所復号画像信号20として出力される。
 なお、加算部30から出力された局所復号画像信号20は、次フレーム以降の動き補償予測の参照画像信号22として用いられるため、メモリ23に書き込まれる。
On the other hand, if the mode instruction flag 9 indicates the intra mode, the switching unit 21 selects 0 signal, and the adding unit 30 selects the local decoding prediction error signal 19 and the prediction image signal 13. Is not performed, and is output as the local decoded image signal 20 as it is.
Note that the locally decoded image signal 20 output from the adding unit 30 is written to the memory 23 because it is used as the reference image signal 22 for motion compensation prediction for the next and subsequent frames.

 次に、本実施の形態1の最も重要な要素であるテクスチャ符号化部16および変換係数可変長符号化部4cの構成および動作について説明する。 Next, the configurations and operations of the texture encoding unit 16 and the transform coefficient variable length encoding unit 4c, which are the most important elements of the first embodiment, will be described.

 図3は、図1に示す実施の形態1のテクスチャ符号化部16の内部構成図である。
 同図において、16aはブロックデータ抽出部、16bはブロックデータ、16cはDCT部、16dはDCT係数、16eは量子化部、16fは量子化変換係数、16gは変換係数予測部,である。
FIG. 3 is an internal configuration diagram of the texture encoding unit 16 according to the first embodiment shown in FIG.
In the figure, 16a is a block data extracting unit, 16b is block data, 16c is a DCT unit, 16d is a DCT coefficient, 16e is a quantizing unit, 16f is a quantized transform coefficient, and 16g is a transform coefficient predicting unit.

 次にテクスチャ符号化部16内の動作を説明する。
 テクスチャ符号化部16では、まず、被符号化画像信号15より、直交変換の一つである離散コサイン変換(以下、DCT)を行う単位となるブロック、例えば、通常8画素×8画素のブロックを、ブロックデータ抽出部16aにて抽出する。
Next, the operation in the texture encoding unit 16 will be described.
In the texture encoding unit 16, first, a block serving as a unit for performing a discrete cosine transform (hereinafter, referred to as DCT), which is one of the orthogonal transforms, for example, a block of usually 8 pixels × 8 pixels is obtained from the encoded image signal 15. , And is extracted by the block data extraction unit 16a.

 抽出されたブロックデータ16bは、DCT部16cに入力され、DCTが行われる。DCT部16cから出力されたDCT係数16dは、量子化部16eにて、量子化ステップサイズに基づき量子化され、量子化変換係数16fとして変換係数予測部16gに出力される。 The extracted block data 16b is input to the DCT unit 16c, where DCT is performed. The DCT coefficient 16d output from the DCT unit 16c is quantized by the quantization unit 16e based on the quantization step size, and is output to the transform coefficient prediction unit 16g as a quantized transform coefficient 16f.

 変換係数予測部16gでは、変換係数予測を行う。変換係数予測は、周囲のブロックの量子化変換係数より、符号化対象ブロックの量子化変換係数の予測値を求め、量子化変換係数と予測値との差分値を算出する。この差分値が変換係数可変長符号化部4c(図2参照)にて符号化される。 The conversion coefficient prediction unit 16g performs a conversion coefficient prediction. In the transform coefficient prediction, a predicted value of a quantized transform coefficient of a coding target block is obtained from a quantized transform coefficient of a surrounding block, and a difference value between the quantized transform coefficient and the predicted value is calculated. This difference value is encoded by the transform coefficient variable length encoding unit 4c (see FIG. 2).

 ここで、符号化対象のブロックの量子化変換係数が、周囲のブロックの量子化変換係数と相関がある場合には、周囲のブロックの量子化変換係数との差分をとることにより、差分量子化変換係数は、もとの量子化変換係数と比べて値のばらつきが小さくなる。例えば、量子化変換係数の値が0から255の範囲に同じ出現頻度で分布しているとする。このような量子化変換係数に対するエントロピーは、8ビットになり、各レベルの値に対応する符号語の符号長は、いずれのレベルに対しても、8ビットになる。 Here, when the quantized transform coefficient of the block to be coded has a correlation with the quantized transform coefficient of the surrounding block, the difference between the quantized transform coefficient of the surrounding block and the quantized transform coefficient of the surrounding block is calculated. The value of the transform coefficient is smaller than that of the original quantized transform coefficient. For example, assume that the values of the quantized transform coefficients are distributed in the range of 0 to 255 with the same appearance frequency. The entropy for such a quantized transform coefficient is 8 bits, and the code length of the code word corresponding to each level value is 8 bits for any level.

 また、符号化対象のブロックの量子化変換係数が、近隣のブロックの量子化変換係数と強い相関をもち、特に、近隣のブロックの量子化変換係数の値と大きく変わらないときには、近隣のブロックの量子化変換係数との差分値である差分量子化変換係数の出現頻度は零近辺に多くなる。このような出現頻度に偏りのある信号のエントロピーは、もとの量子化変換係数のエントロピーよりも小さくなるため、出現頻度に応じた符号長の割り当てを行えば、差分量子化変換係数の平均符号長を8ビットよりも小さくすることができる。このように、変換係数予測を行い、差分量子化変換係数を符号化することにより、変換係数可変長符号化部にて符号化されるときに発生する符号量を少なくすることができる。 In addition, when the quantized transform coefficient of the block to be coded has a strong correlation with the quantized transform coefficient of the neighboring block, and particularly when the quantized transform coefficient of The frequency of appearance of the difference quantized transform coefficient, which is the difference value from the quantized transform coefficient, increases near zero. Since the entropy of a signal having such a biased appearance frequency is smaller than the entropy of the original quantized transform coefficient, if the code length is assigned according to the appearance frequency, the average code of the differential quantized transform coefficient is obtained. The length can be smaller than 8 bits. In this way, by performing the transform coefficient prediction and encoding the differentially quantized transform coefficients, it is possible to reduce the amount of code generated when the transform coefficient variable-length encoding unit encodes.

 次に、変換係数予測部16gの動作の一例を説明する。
 図4は、変換係数予測部16gによる変換係数予測の説明図である。
 以下に述べる動作は、ISO/IEC JTC1/SC29/WG11 MPEG-4 Video VM8.0 に開示されているイントラAC/DC予測に相当する。
 変換係数予測は、特に値のばらつきが大きくなるイントラモードのDC係数や、図4の斜線部に位置する低周波成分の量子化変換係数(以下、変換係数と略する)に対して行う。
Next, an example of the operation of the transform coefficient prediction unit 16g will be described.
FIG. 4 is an explanatory diagram of transform coefficient prediction by the transform coefficient predictor 16g.
The operation described below corresponds to intra AC / DC prediction disclosed in ISO / IEC JTC1 / SC29 / WG11 MPEG-4 Video VM8.0.
The transform coefficient prediction is performed particularly on the DC coefficient of the intra mode in which the variation of the value becomes large, or the quantized transform coefficient (hereinafter, abbreviated as a transform coefficient) of the low frequency component located in the hatched portion in FIG.

 変換係数の予測値は、図4に示すように符号化対象のブロックをXとしたとき、ブロックXの周囲のブロック、例えばブロックBまたはブロックCの変換係数を用いる。求められた変換係数予測値と、量子化変換係数との差分をとり、差分量子化変換係数を出力する。
 ただし、周囲のブロックとの相関がなく、差分量子化変換係数がもとの量子化変換係数より大きくなる場合には、変換係数予測を行わず、もとの量子化変換係数を出力する。
Assuming that the block to be coded is X as shown in FIG. 4, the predicted value of the transform coefficient is the transform coefficient of a block around block X, for example, block B or block C. A difference between the calculated transform coefficient prediction value and the quantized transform coefficient is obtained, and a difference quantized transform coefficient is output.
However, when there is no correlation with the surrounding blocks and the difference quantized transform coefficient becomes larger than the original quantized transform coefficient, the original quantized transform coefficient is output without performing the transform coefficient prediction.

 変換係数予測部16gは、このようにして求めた差分量子化変換係数、または量子化変換係数を量子化変換係数データ17として出力する。量子化変換係数データ17は、変換係数可変長符号化部4cにて可変長符号化される。
 また、変換係数予測部16gは、変換係数予測が行われたか否かを示す情報を変換係数予測判定情報31として出力する。
The transform coefficient predictor 16g outputs the difference quantized transform coefficient or the quantized transform coefficient obtained as described above as the quantized transform coefficient data 17. The quantized transform coefficient data 17 is variable-length coded by the transform coefficient variable-length coding unit 4c.
The conversion coefficient prediction unit 16g outputs information indicating whether or not the conversion coefficient prediction has been performed as the conversion coefficient prediction determination information 31.

 次に、変換係数可変長符号化部4cの詳細な構成および動作について説明する。
 図5は、図2に示す変換係数可変長符号化部4cの内部構成図、図6はその動作の様子を示すフローチャートである。
 図5において、4c1はVLCテーブル記憶部、4c2は切替部、4c3はDC係数データ符号化部、4c4はAC係数データ、4c5はDC係数符号語、4c6はVLCテーブルグループ選択部、4c7はVLCテーブルグループ情報、4c8はVLCテーブル選択部、4c9はVLCテーブル選択情報、4c10は領域データ符号化部、4c11はAC係数符号語である。
Next, the detailed configuration and operation of the transform coefficient variable length coding unit 4c will be described.
FIG. 5 is an internal configuration diagram of the transform coefficient variable length coding unit 4c shown in FIG. 2, and FIG. 6 is a flowchart showing the operation thereof.
In FIG. 5, 4c1 is a VLC table storage unit, 4c2 is a switching unit, 4c3 is a DC coefficient data encoding unit, 4c4 is AC coefficient data, 4c5 is a DC coefficient codeword, 4c6 is a VLC table group selection unit, and 4c7 is a VLC table. Group information, 4c8 is a VLC table selection unit, 4c9 is VLC table selection information, 4c10 is an area data encoding unit, and 4c11 is an AC coefficient codeword.

 このように構成された本実施の形態1の変換係数可変長符号化部4cは、ブロック内を複数の領域に分けて、領域毎に、その領域内の変換係数の統計的特性に基づいて、複数の可変長符号化テーブルを設定する。領域内の変換係数を符号化する際には、これらの設定された複数の可変長符号化テーブルの中から用いる可変長符号化テーブルを適応的に切り替える。なお、領域毎に複数の可変長符号化テーブルを設定する際には、領域の位置とその領域内の変換係数に対して、変換係数予測が行われたか否かに基づいて設定する。 The transform coefficient variable length coding unit 4c according to the first embodiment configured as described above divides the block into a plurality of regions, and for each region, based on the statistical characteristics of the transform coefficients in the region. Set a plurality of variable length coding tables. When coding the transform coefficients in the area, the variable length coding table to be used is adaptively switched from among the plurality of set variable length coding tables. When a plurality of variable length coding tables are set for each area, the variable length coding tables are set based on whether or not the transform coefficient prediction has been performed on the position of the area and the transform coefficient in the area.

 以下、図5および図6をもとに動作の詳細な説明を行う。
(1)DC係数データ符号化
 まず、切替部4c2にて、モード指示フラグ9を判定し(ステップS1)、イントラモードを示す場合には、量子化変換係数データ17をDC係数データ符号化部4c3に渡し、DC係数データの符号化を行い(ステップS2)、DC係数符号語4c5を出力する。一方、インターモードの場合には、DC係数は存在しないため、DC係数データ符号化部4c3への切替は行わない。
Hereinafter, the operation will be described in detail with reference to FIGS.
(1) DC Coefficient Data Encoding First, the switching unit 4c2 determines the mode instruction flag 9 (step S1). When the mode is the intra mode, the quantized transform coefficient data 17 is converted to the DC coefficient data encoding unit 4c3. And encodes the DC coefficient data (step S2), and outputs a DC coefficient codeword 4c5. On the other hand, in the case of the inter mode, since there is no DC coefficient, switching to the DC coefficient data encoding unit 4c3 is not performed.

(2)AC係数データ符号化
 つぎに、量子化変換係数データ17のうちのAC係数データ4c4の符号化について説明する。AC係数データ4c4の符号化は、ブロック内を複数の領域に分けて、領域毎に行う。ブロック毎にDCTを行った場合、ブロック内の位置によって、変換係数の値の発生確率が異なるため、画像データの統計的特性に基づいて、ブロック内を複数の領域に分割する。
(2) Encoding of AC coefficient data Next, encoding of the AC coefficient data 4c4 of the quantized transform coefficient data 17 will be described. The coding of the AC coefficient data 4c4 is performed for each area by dividing the block into a plurality of areas. When DCT is performed for each block, the probability of occurrence of the value of the transform coefficient differs depending on the position in the block. Therefore, the inside of the block is divided into a plurality of regions based on the statistical characteristics of the image data.

 例えば、図7に示すように、ブロック内のAC係数領域を4つの領域1〜4に分割する。領域1は、スキャン方向と平行な垂直方向の低周波成分を含む領域であり、領域2は、スキャン方向と垂直な水平方向の低周波成分を含む領域である。このため、領域1および領域2は高い値のAC係数が発生しやすい。これに対し、領域3または領域4は、高周波成分を含む領域で、零や小さい値のAC係数が発生しやすい。 {For example, as shown in FIG. 7, the AC coefficient area in the block is divided into four areas 1 to 4. The area 1 is an area including a low-frequency component in a vertical direction parallel to the scanning direction, and the area 2 is an area including a low-frequency component in a horizontal direction perpendicular to the scanning direction. For this reason, a high value AC coefficient is likely to occur in the region 1 and the region 2. On the other hand, the region 3 or the region 4 is a region containing a high frequency component, and an AC coefficient of zero or a small value is easily generated.

 領域1〜4内のAC係数データの符号化は、各領域1〜4内のAC係数データを低周波成分から高周波成分へ決められた順番でスキャンし、得られた複数の(RUN,LEVEL)データを可変長符号化(以下、VLC(Variable Length Coding)と略する)する。
The encoding of the AC coefficient data in the regions 1 to 4 is performed by scanning the AC coefficient data in each of the regions 1 to 4 in a predetermined order from the low frequency component to the high frequency component, and obtaining a plurality of obtained (RUN, LEVEL). The data is subjected to variable length coding (hereinafter abbreviated as VLC (Variable Length Coding)).

 そこで、まず領域1〜4毎に決められた順番で領域1〜4内をスキャンして、(RUN,LEVEL)データを求める(ステップS3)。ここで、RUNはスキャンしたときに、連続する零の数であり、LEVELはそれに続く零でない係数の絶対値である。 (4) Then, the areas 1 to 4 are first scanned in the order determined for each of the areas 1 to 4, and (RUN, LEVEL) data is obtained (step S3). Here, RUN is the number of consecutive zeros when scanning, and LEVEL is the absolute value of the following non-zero coefficient.

 例えば、領域2を、図7に示す矢印Aの方向にスキャンした場合、スキャンされた一番最初の係数は−8であるので、最初の(RUN,LEVEL)は、(0,−8)になる。次に、0が1つ続いた後で、−1が続くので、次の(RUN,LEVEL)データは、(1,−1)になる。以上の処理を領域内で零でない係数が最後になるまで繰り返す。 For example, when the area 2 is scanned in the direction of arrow A shown in FIG. 7, the first coefficient scanned is -8, so the first (RUN, LEVEL) is (0, -8). Become. Next, since -1 continues after one 0 continues, the next (RUN, LEVEL) data is (1, -1). The above processing is repeated until a non-zero coefficient in the area reaches the end.

 スキャンして得られた(RUN,LEVEL)データは、領域毎にその領域内の(RUN,LEVEL)データの発生確率に基づいて設定されたVLCテーブルにより、可変長符号化する。
 VLCテーブルは、シンボルの発生確率に応じて、発生確率の高いシンボルには、短い符号長を、発生確率の低いシンボルには、長い符号長を割り当て、シンボルとそれに対応する符号語を対にしたテーブルである。
 AC係数データの符号化の際に用いるVLCテーブルのシンボルは、(RUN,LEVEL)データに相当する。(RUN,LEVEL)の発生確率は領域毎に異なるため、領域毎に異なるVLCテーブルを設定することにより、AC係数データの符号量を削減することができる。
The (RUN, LEVEL) data obtained by scanning is subjected to variable length coding by a VLC table set based on the occurrence probability of (RUN, LEVEL) data in each area.
The VLC table assigns a short code length to a symbol having a high probability of occurrence and a long code length to a symbol having a low probability of occurrence according to the probability of occurrence of the symbol, and pairs the symbol with the corresponding code word. It is a table.
The symbol of the VLC table used when encoding the AC coefficient data corresponds to (RUN, LEVEL) data. Since the probability of occurrence of (RUN, LEVEL) differs for each region, by setting a different VLC table for each region, the code amount of the AC coefficient data can be reduced.

 また、AC係数の値は、DCT、量子化が行われたときの各種の符号化条件によっても異なる。例えば、周囲のマクロブロックのAC係数との差分をとる変換係数予測が行われた場合には、AC係数の値は、変換係数予測を行わなかった場合より、小さい値になる。また、量子化の際の量子化ステップサイズの大きさによっても異なる。
 従って、これらの条件も考慮して、VLCテーブルを設定することにより、さらにAC係数データの符号量を削減することができる。
The value of the AC coefficient also differs depending on various coding conditions when DCT and quantization are performed. For example, when transform coefficient prediction that takes a difference from the AC coefficient of a surrounding macroblock is performed, the value of the AC coefficient is smaller than when the transform coefficient prediction is not performed. Further, it differs depending on the size of the quantization step size at the time of quantization.
Therefore, by setting the VLC table in consideration of these conditions, the code amount of the AC coefficient data can be further reduced.

 以上の観点から、本実施の形態1では、領域1〜4毎にその領域1〜4内の(RUN,LEVEL)データの統計的特性に応じて、VLCテーブルグループを選択し、選択されたVLCテーブルグループの中で、各(RUN,LEVEL)データを符号化する際に用いるVLCテーブルを切り替える。 From the above viewpoint, in the first embodiment, a VLC table group is selected for each of the areas 1 to 4 according to the statistical characteristics of the (RUN, LEVEL) data in the areas 1 to 4, and the selected VLC table group is selected. The VLC table used for encoding each (RUN, LEVEL) data is switched in the table group.

 以下に、各領域1〜4毎にVLCテーブルを選択する方法について述べる。
(2.1)VLCテーブルグループ選択
 (RUN,LEVEL)の出現確率は、領域1〜4毎、あるいは領域1〜4内のスキャンされた位置によって異なるため、領域1〜4毎に異なる複数のVLCテーブルを設定する。
 また、量子化変換係数データを求めた際の符号化条件によっても、出現確率は異なる。
 このため、本実施の形態1では、テクスチャ符号化の際の条件として、テクスチャ符号化部16の変換係数予測部16gから得られる変換係数予測判定情報31(図3参照)に基づいて、VLCテーブルグループを選択する。
Hereinafter, a method of selecting a VLC table for each of the regions 1 to 4 will be described.
(2.1) VLC table group selection Since the appearance probabilities of (RUN, LEVEL) differ depending on the region 1 to 4 or the scanned position in the region 1 to 4, a plurality of VLCs different for the regions 1 to 4 are set. Set up the table.
Also, the appearance probability differs depending on the encoding conditions when the quantized transform coefficient data is obtained.
Therefore, in the first embodiment, the VLC table is used as a condition for texture encoding based on transform coefficient prediction determination information 31 (see FIG. 3) obtained from transform coefficient predictor 16g of texture encoder 16. Select a group.

 まず、ブロック内の各領域を符号化するのに選択可能なVLCテーブルの組合わせであるVLCテーブルグループをVLCテーブルグループ選択部4c6にて選択する(ステップS4)。
 例えば、図7のように分割した場合、領域1から領域4のそれぞれに対して、VLCテーブルグループを選択する。このとき、低周波成分から高周波成分へスキャンするときに、低周波成分ほど大きいLEVELのデータの出現確率が高く、高周波成分になるほど小さいLEVELあるいは零が多くなるという特性に基づき選択する。
 ここでは、領域1〜4毎に、変換係数予測判定情報31により、VLCテーブルグループを選択する方法を図8を参照して、説明する。
First, a VLC table group, which is a combination of VLC tables that can be selected for encoding each region in a block, is selected by the VLC table group selection unit 4c6 (step S4).
For example, in the case of division as shown in FIG. 7, a VLC table group is selected for each of the areas 1 to 4. At this time, when scanning from the low frequency component to the high frequency component, the selection is made based on the characteristic that the higher the frequency component, the higher the appearance probability of the data of the higher LEVEL, and the higher the frequency component, the more the LEVEL or zero increases.
Here, a method of selecting a VLC table group based on the transform coefficient prediction determination information 31 for each of the regions 1 to 4 will be described with reference to FIG.

 図8は、VLCテーブル記憶部4C1に記憶される1組の(RUN,LEVEL)とその出現確率に応じた符号長を割り当てた符号語を対にしたVLCテーブルグループを示している。
 (RUN,LEVEL)の出現確率は、変換係数予測が行われたか、否か、或いは領域1〜4内における変換係数がスキャンされた位置によって異なるため、図8に示すように、変換係数予測が行われたか否か、および領域1〜4毎に、それぞれの場合に対応したVLCテーブルを複数持つVLCテーブルグループが用意されている。
FIG. 8 shows a VLC table group in which a set of (RUN, LEVEL) stored in the VLC table storage unit 4C1 and a code word to which a code length according to the occurrence probability is assigned.
Since the appearance probability of (RUN, LEVEL) differs depending on whether or not the transform coefficient prediction has been performed, or the position where the transform coefficient has been scanned in the regions 1 to 4, as shown in FIG. A VLC table group having a plurality of VLC tables corresponding to each case is prepared for each of the areas 1 to 4 as to whether or not the processing has been performed.

 例えば、図8に示すように、領域1と領域2に対しては、変換係数予測が行われなかった場合、VLCテーブルグループ選択部4c6は、変換係数予測判定情報31、および(RUN,LEVEL)の出現確率に基づき、小さいLEVELのシンボルを含むVLCテーブル1A、高
いLEVELのシンボルと、短いRUNのシンボルを含むVLCテーブル2A,3A等を有するテーブルグループT1を選択して、選択したテーブルグループT1を示すVLCテーブルグループ情報4c7をVLCテーブル選択部4c8へ出力するようにする。
For example, as illustrated in FIG. 8, when the conversion coefficient prediction is not performed on the area 1 and the area 2, the VLC table group selection unit 4c6 sets the conversion coefficient prediction determination information 31 and (RUN, LEVEL) And a table group T1 having a VLC table 1A including a symbol of a small LEVEL, a VLC table 2A, 3A including a symbol of a short RUN and a symbol of a short RUN, and selecting the selected table group T1. The indicated VLC table group information 4c7 is output to the VLC table selection unit 4c8.

 これに対し、変換係数予測が行われた場合には、係数のレベルのばらつきが小さくなる効果が得られるため、変換係数予測が行われなかった場合と比べて、高いLEVELを含むVLCテーブルの必要度は小さい。
 従って、VLCテーブルグループ選択部4c6は、変換係数予測判定情報31、および変換係数予測が行われた場合の(RUN,LEVEL)の出現確率に基づき、小さいLEVELのシンボルを含むVLCテーブル1Bと、中間のLEVELで、短いRUNのシンボルを含むVLCテーブル2B等を有するテーブルグループT2を選択して、選択したテーブルグループT2を示すVLCテーブルグループ情報4c7をVLCテーブル選択部4c8へ出力するようにする。
On the other hand, when the conversion coefficient prediction is performed, the effect of reducing the variation of the coefficient level is obtained. Therefore, compared with the case where the conversion coefficient prediction is not performed, the VLC table including the higher LEVEL is required. The degree is small.
Therefore, the VLC table group selection unit 4c6, based on the transform coefficient prediction determination information 31 and the appearance probability of (RUN, LEVEL) when the transform coefficient prediction is performed, generates a VLC table 1B including a symbol of a small LEVEL, In the LEVEL, a table group T2 having a VLC table 2B or the like including a short RUN symbol is selected, and VLC table group information 4c7 indicating the selected table group T2 is output to the VLC table selection unit 4c8.

 また、領域3と領域4に対しては、高いLEVELのシンボルの出現確率は小さいので、その代わり長いRUNのシンボルを含むVLCテーブル4,5等を有するテーブルグループT3を選択して、選択したテーブルグループT3を示すVLCテーブルグループ情報4c7をVLCテーブル選択部4c8へ出力するようにする。 In addition, since the appearance probability of the high LEVEL symbol is small for the region 3 and the region 4, the table group T3 having the VLC tables 4 and 5 including the long RUN symbol is selected instead, and the selected table is selected. The VLC table group information 4c7 indicating the group T3 is output to the VLC table selection unit 4c8.

 なお、VLCテーブルグループは、この実施の形態1に対応する復号側では、この実施の形態1の符号化側と同様に、ブロック内の領域1〜4毎に、変換係数予測判定情報31に応じて選択されるため、付加情報としてVLCテーブルグループ情報4c7をビットストリーム28に多重化する必要がない。
 つまり、図1や図2等に示すように、変換係数予測判定情報31は、変換係数予測を行うかどうかを判定するために、復号側へ送信されるビットストリーム28に付加情報符号語25の一つとして多重化されているので、これを利用すればよい。
 従って、VLCテーブルグループ情報4c7を復号側へビットストリーム28に多重化する必要がないので、新たに符号量の増加させることなく、各領域毎に用いられるVLCテーブルグループを選択することができることになる。
It should be noted that the VLC table group, on the decoding side corresponding to the first embodiment, corresponds to the transform coefficient prediction determination information 31 for each of the regions 1 to 4 in the block, similarly to the encoding side of the first embodiment. Therefore, it is not necessary to multiplex the VLC table group information 4c7 as additional information into the bit stream 28.
In other words, as shown in FIGS. 1 and 2, the transform coefficient prediction determination information 31 includes the additional information codeword 25 in the bit stream 28 transmitted to the decoding side in order to determine whether to perform the transform coefficient prediction. Since it is multiplexed as one, this may be used.
Therefore, since it is not necessary to multiplex the VLC table group information 4c7 on the decoding side into the bit stream 28, the VLC table group used for each area can be selected without newly increasing the code amount. .

(2.2)領域データ符号化
 次に、各領域1〜4内のAC係数データ4c4の可変長符号化について説明する。
 AC係数データ4c4は、各領域1〜4内を決められた順番でスキャンして得られた複数の(RUN,LEVEL)データの組合せで表されており、各領域の(RUN,LEVEL)データであるAC係数データ4c4は、VLCテーブル選択部4c8および領域データ符号化部4c10に出力されている。
(2.2) Region Data Coding Next, the variable length coding of the AC coefficient data 4c4 in each of the regions 1 to 4 will be described.
The AC coefficient data 4c4 is represented by a combination of a plurality of (RUN, LEVEL) data obtained by scanning each of the areas 1 to 4 in a predetermined order. Certain AC coefficient data 4c4 is output to the VLC table selection unit 4c8 and the area data encoding unit 4c10.

 VLCテーブル選択部4c8では、VLCテーブルグループ選択部4c6からのVLCテーブルグループ情報4c7に基づいて、入力された(RUN,LEVEL)データであるAC係数データ4c4を可変長符号化するのに用いるVLCテーブルを、VLCテーブルグループ選択部4c6で選択されたVLCテーブルグループの中から適応的に選択する(ステップS5)。選択されたVLCテーブルを示すVLCテーブル選択情報4c9は、領域データ符号化部4c10に出力される。
 なお、VLCテーブル選択の基準は、例えば、(RUN,LEVEL)データであるAC係数データ4c4のLEVELの大きさによって決定するようにする。
The VLC table selection unit 4c8 uses the VLC table used for variable-length coding of the AC coefficient data 4c4, which is the input (RUN, LEVEL) data, based on the VLC table group information 4c7 from the VLC table group selection unit 4c6. Is adaptively selected from the VLC table groups selected by the VLC table group selection unit 4c6 (step S5). VLC table selection information 4c9 indicating the selected VLC table is output to region data encoding section 4c10.
The criterion for selecting the VLC table is determined, for example, by the magnitude of the LEVEL of the AC coefficient data 4c4, which is (RUN, LEVEL) data.

 次に領域データ符号化部4c10の動作を述べる。
 領域データ符号化部4c10は、VLCテーブル選択部4c8から出力されたVLCテーブル選択情報4c9に基づいて、VLCテーブル記憶部4c1に記憶されたVLCテーブルを選択して、(RUN,LEVEL)データを可変長符号化する(ステップS6)。
Next, the operation of the area data encoding unit 4c10 will be described.
The region data encoding unit 4c10 selects a VLC table stored in the VLC table storage unit 4c1 based on the VLC table selection information 4c9 output from the VLC table selection unit 4c8, and changes (RUN, LEVEL) data. Long coding is performed (step S6).

 可変長符号化は、例えば、まず、選択したVLCテーブルの中から、(RUN,LEVEL)に対応する符号語を探す。対応する符号語が見つかった場合には、それをAC係数符号語4c11として出力する。対応する符号語が見つからなかった場合には、エスケープコードと呼ばれる決められた固定長の符号語を出力する。エスケープコードが出力された場合には、RUN,LEVELをそれぞれ固定長符号化し、エスケープコードの後にRUN,LEVELそれぞれの固定長符号語を続けたものをAC係数符号語4c11として出力する。 In variable length coding, for example, first, a codeword corresponding to (RUN, LEVEL) is searched from the selected VLC table. If a corresponding codeword is found, it is output as an AC coefficient codeword 4c11. If a corresponding codeword is not found, a fixed-length codeword called an escape code is output. When the escape code is output, RUN and LEVEL are each fixed-length encoded, and the escape code followed by the fixed-length code words of RUN and LEVEL, respectively, is output as an AC coefficient codeword 4c11.

 このようにして、領域内のすべての(RUN,LEVEL)データを符号化し終えるまでステップS5〜ステップS6の処理を繰り返す(ステップS7“No”)。 Steps S5 to S6 are repeated until all the (RUN, LEVEL) data in the area has been encoded in this way ("No" in step S7).

 さらに、ある領域内のすべての(RUN,LEVEL)データを可変長符号化した場合には(ステップS7“Yes”)、ブロック内の他の領域1〜4すべての(RUN,LEVEL)データを可変長符号化したかを判断して(ステップS8)、ブロック内の他の領域1〜4すべての(RUN,LEVEL)データを可変長符号化していないと判断した場合には(ステップS8“No”)、ステップS3〜ステップS7までの処理を繰り返すようにする(ステップS8)。 Further, when all the (RUN, LEVEL) data in a certain area is variable-length coded ("Yes" in step S7), all the (RUN, LEVEL) data in the other areas 1 to 4 in the block are variable. It is determined whether the data has been long-coded (step S8), and if it is determined that the variable-length coding has not been performed on all the (RUN, LEVEL) data in the other areas 1 to 4 in the block (step S8 "No"). ), The processing from step S3 to step S7 is repeated (step S8).

 これに対し、ブロック内の各領域1〜4すべての(RUN,LEVEL)データを可変長符号化したと判断した場合には(ステップS8“Yes”)、変換係数可変長符号化部4cは、可変長符号化の処理を終了して、DC係数符号語4c5、AC係数符号語4c11を、ブロックデータ符号語26として多重化部5に渡し、多重化部5が符号化ビットストリーム28に多重化する。 On the other hand, if it is determined that all the (RUN, LEVEL) data in each of the areas 1 to 4 in the block have been subjected to variable length coding (“Yes” in step S8), the transform coefficient variable length coding unit 4c sets After the variable-length coding process is completed, the DC coefficient codeword 4c5 and the AC coefficient codeword 4c11 are passed to the multiplexing unit 5 as the block data codeword 26, and the multiplexing unit 5 multiplexes the coded bitstream 28. I do.

 ここで、この実施の形態1では、選択したVLCテーブルグループの中からのVLCテーブルの選択を、各(RUN,LEVEL)データのLEVELの値を用いて行なうようにしているので、この場合、復号側では、LEVELを復号する前にVLCテーブルを選択する必要がある。このため、VLCテーブル選択情報4c9を付加情報可変長符号化部4bへ送り符号化させて、VLCテーブル選択符号語とし、付加情報符号語25の1つとしてビットストリーム28に多重化するようにする。 Here, in the first embodiment, the selection of the VLC table from the selected VLC table group is performed using the LEVEL value of each (RUN, LEVEL) data. On the side, it is necessary to select the VLC table before decoding the LEVEL. For this reason, the VLC table selection information 4c9 is sent to the additional information variable length coding unit 4b to be coded to be a VLC table selection codeword, and is multiplexed as one of the additional information codewords 25 into the bit stream 28. .

 ここで、VLCテーブル選択情報4c9の符号化の方法としては、現在の(RUN,LEVEL)データと、次の(RUN,LEVEL)データとを符号化するのに用いるVLCテーブル選択情報4c9(NEXT)を組にして、可変長符号化する方法がある。このとき用いる可変長符号化テーブルは、1組の(NEXT,RUN,LEVEL)に対して、その出現確率に応じて符号長を定められた符号語を格納したテーブルになる。 Here, as a method of encoding the VLC table selection information 4c9, the VLC table selection information 4c9 (NEXT) used to encode the current (RUN, LEVEL) data and the next (RUN, LEVEL) data. Is a variable length coding method. The variable length coding table used at this time is a table in which a set of (NEXT, RUN, LEVEL) stores a code word whose code length is determined according to the appearance probability.

 この方法では、領域内で最初の(RUN,LEVEL)を符号化するのに用いるVLCテーブル選択情報4c9は、VLCテーブル初期切替情報として別に符号化しておく必要がある。2番目以降の(RUN,LEVEL)の符号化の際に用いるVLCテーブル選択情報4c9は、1つ前の(RUN,LEVEL)データと組にして符号化されることになる。また、領域内で零でないLEVELが最後のときは、NEXTは、それと組になっている(RUN,LEVEL)が領域内で最後の(RUN,LEVEL)であることを示す情報となる。 In this method, the VLC table selection information 4c9 used to encode the first (RUN, LEVEL) in the area needs to be separately encoded as VLC table initial switching information. The VLC table selection information 4c9 used for encoding the second and subsequent (RUN, LEVEL) is encoded as a set with the immediately preceding (RUN, LEVEL) data. When the LEVEL that is not zero is the last in the area, NEXT is information indicating that the (RUN, LEVEL) paired with the LEVEL is the last (RUN, LEVEL) in the area.

 このように、複数のVLCテーブルを切り替えて、各領域を符号化する際には、上述したように、VLCテーブル選択情報4c9を、付加情報として符号化する必要がある。例えば、図8に示すように変換係数予測を行った場合と、行わなかった場合とで用いるVLCテーブルグループを切り替える場合には、変換係数予測を行った場合に切り替えるVLCテーブルの数は、テーブルグループT2のテーブル1B、2Bの2つであるから、VLCテーブル選択情報4c9を固定長で符号化した場合に必要な符号長は、1ビットになる。 切 り 替 え When switching a plurality of VLC tables to encode each area, it is necessary to encode the VLC table selection information 4c9 as additional information as described above. For example, as shown in FIG. 8, when switching the VLC table group to be used between when the conversion coefficient prediction is performed and when the conversion coefficient prediction is not performed, the number of VLC tables to be switched when the conversion coefficient prediction is performed is as follows. Since there are two tables 1B and 2B of T2, the code length required when the VLC table selection information 4c9 is coded with a fixed length is 1 bit.

 しかしながら、変換係数予測を行った場合と、行わなかった場合でVLCテーブルグループを切り替えない場合には、5種類のVLCテーブルの中から切り替える必要があり、VLCテーブル選択情報4c9を固定長で符号化した場合に必要な符号長は、3ビットになる。
 VLCテーブル選択情報4c9を上述したように、(RUN,LEVEL)と組にして可変長符号化する場合にも、NEXTの種類が増えれば、NEXT,RUN,LEVELの組合せが多くなるため、各(NEXT,RUN,LEVEL)に対応する符号語の符号量も大きくなる。 本実施の形態1で述べたように、領域毎にその領域内の(RUN,LEVEL)データの統計的特性に応じて、VLCテーブルグループを選択し、選択されたVLCテーブルグループの中で、各(RUN,LEVEL)データを符号化する際に用いるVLCテーブルを切り替えることにより、VLCテーブル選択情報4c9を符号化するのに必要な符号量を削減することができる。
However, if the VLC table group is not switched between when the transform coefficient prediction is performed and when it is not performed, it is necessary to switch from the five types of VLC tables, and the VLC table selection information 4c9 is encoded with a fixed length. In this case, the required code length becomes 3 bits.
As described above, when the VLC table selection information 4c9 is combined with (RUN, LEVEL) and subjected to variable length encoding, if the number of NEXTs increases, the number of combinations of NEXT, RUN, and LEVEL increases. NEXT, RUN, LEVEL) also increases the code amount of the code word corresponding to the code word. As described in the first embodiment, a VLC table group is selected for each area according to the statistical characteristics of the (RUN, LEVEL) data in the area, and among the selected VLC table groups, By switching the VLC table used when encoding (RUN, LEVEL) data, the amount of code required to encode the VLC table selection information 4c9 can be reduced.

 以上説明したように、本実施の形態1では、ブロックを複数の領域に分けて、領域毎に、ブロック内での各領域の位置と変換係数予測判定情報に応じて、VLCテーブルグループを選択し、さらに、その選択されたVLCテーブルグループの中からVLCテーブルを選択して、変換係数を可変長符号化するようにしたため、より少ない符号量で変換係数を符号化することが可能となる。 As described above, in the first embodiment, a block is divided into a plurality of regions, and a VLC table group is selected for each region in accordance with the position of each region in the block and the transform coefficient prediction determination information. Further, since the VLC table is selected from the selected VLC table group and the transform coefficient is subjected to variable-length coding, the transform coefficient can be coded with a smaller code amount.

 また、本実施の形態1では、各領域の位置と、変換係数予測判定情報31とにより、各領域内で切り替えるVLCテーブルグループを予め用意しておくことにより、切り替えるVLCテーブルの種類を符号化するのに必要な符号量を削減することができる。 In the first embodiment, the type of the VLC table to be switched is encoded by preparing a VLC table group to be switched in each region in advance based on the position of each region and the transform coefficient prediction determination information 31. Can reduce the amount of code required.

実施の形態2.
 本実施の形態2は、変換係数可変長符号化部4cの構成を変えたことを特徴とするものである。このため、この実施の形態2の変換係数可変長符号化部4cの構成および動作を中心に説明する。
Embodiment 2 FIG.
The second embodiment is characterized in that the configuration of the transform coefficient variable length coding unit 4c is changed. Therefore, the configuration and operation of the transform coefficient variable length coding unit 4c according to the second embodiment will be mainly described.

 図9は、本実施の形態2における変換係数可変長符号化部4cの内部構成図である。同図において、32は、図3に示すテクスチャ符号化部16の量子化部16eから出力される量子化の際の量子化ステップサイズである。 FIG. 9 is an internal configuration diagram of the transform coefficient variable length coding unit 4c according to the second embodiment. In the figure, reference numeral 32 denotes a quantization step size at the time of quantization output from the quantization unit 16e of the texture encoding unit 16 shown in FIG.

 つまり、本実施の形態2における変換係数可変長符号化部4cでは、テクスチャ符号化の際の条件としてVLCテーブルグループ選択部4c6へ入力する変換係数予測判定情報31の代わりに、量子化ステップサイズ32を入力させるようにしたことが特徴であり、その他の動作は実施の形態1における変換係数可変長符号化部4cと同じである。 That is, in the transform coefficient variable length coding unit 4c according to the second embodiment, instead of the transform coefficient prediction determination information 31 input to the VLC table group selection unit 4c6 as a condition for texture coding, a quantization step size 32 Is input, and other operations are the same as those of the transform coefficient variable length coding unit 4c in the first embodiment.

 次に、本実施の形態2におけるVLCテーブルグループ選択部4c6の動作について述べる。 Next, the operation of the VLC table group selection unit 4c6 according to the second embodiment will be described.

 VLCテーブルグループ選択部4c6では、VLCテーブルグループ選択部4c6が予め認識している領域のブロック内での位置と、外部からテクスチャ符号化の際の条件として入力する量子化ステップサイズ32とに基づいて、ブロック内の各領域を符号化するのに選択可能なVLCテーブルグループを選択する。 The VLC table group selection unit 4c6 is based on the position in the block of the region recognized in advance by the VLC table group selection unit 4c6, and the quantization step size 32 input as a condition for texture encoding from outside. , Select a VLC table group that can be selected to encode each region in the block.

 例えば、大きい量子化ステップサイズ32で量子化された領域は、小さいLEVELまたは零が多くなり、大きいLEVELのデータの出現確率は小さくなる。このように量子化ステップサイズ32に応じて、(RUN,LEVEL)データの出現確率が異なるため、VLCテーブルグループ選択部4c6は、量子化ステップサイズ32に応じて、VLCテーブルグループを選択する。 {For example, in a region quantized by the large quantization step size 32, the number of small LEVELs or zeros increases, and the appearance probability of data of a large LEVEL decreases. Since the appearance probability of (RUN, LEVEL) data differs according to the quantization step size 32, the VLC table group selection unit 4c6 selects the VLC table group according to the quantization step size 32.

 なお、量子化ステップサイズ32は、図1や図2に示すように、復号側で逆量子化を行う際の情報として、可変長符号化部4の付加情報可変長符号化部4bにより可変長符号化された後、付加情報符号後25の1つとして多重化部5によりビットストリーム28に多重化されているので、復号側では、これを利用して復号時に用いる可変長復号テーブルグループを符号化側と同様に選択することができる。 As shown in FIG. 1 and FIG. 2, the quantization step size 32 is a variable length encoded by the additional information variable length encoding unit 4 b of the variable length encoding unit 4 as information when performing inverse quantization on the decoding side. After being coded, it is multiplexed into the bit stream 28 by the multiplexing unit 5 as one of the additional information codes 25, so that the decoding side uses this to code the variable length decoding table group used for decoding. It can be selected in the same way as the chemical side.

 このため、この実施の形態2では、上記実施の形態1の場合と同様に、VLCテーブルグループを選択することによる新たな付加情報をビットストリーム28に多重化する必要はない。ただし、実施の形態1の場合と同様に、選択したVLCテーブルグループの中からのVLCテーブルの選択を、各(RUN,LEVEL)データのLEVELの値を用いて行なうようにした場合、復号側では、LEVELを復号する前にVLCテーブルを選択する必要があるため、VLCテーブル選択情報4c9を付加情報可変長符号化部4bへ送り符号化させて、VLCテーブル選択符号語とし、付加情報符号語25の1つとしてビットストリーム28に多重化するようにする。 Therefore, in the second embodiment, it is not necessary to multiplex new additional information by selecting a VLC table group into the bit stream 28 as in the first embodiment. However, as in the case of the first embodiment, when the selection of the VLC table from the selected VLC table group is performed using the LEVEL value of each (RUN, LEVEL) data, the decoding side , LEVEL, before decoding, the VLC table selection information 4c9 is sent to the additional information variable length coding unit 4b to be coded to be a VLC table selection codeword, and the additional information codeword 25 is selected. Is multiplexed into the bit stream 28.

 従って、本実施の形態2によれば、ブロックを複数の領域に分けて、領域毎に、ブロック内での領域の位置と、量子化ステップサイズとに応じて、VLCテーブルグループを選択し、さらにその選択されたVLCテーブルグループの中からVLCテーブルを選択して、各領域内のAC係数データを可変長符号化するようにしたので、より少ない符号量で変換係数を符号化することができ、圧縮効率を高める効果が得られる。 Therefore, according to the second embodiment, a block is divided into a plurality of regions, and a VLC table group is selected for each region according to the position of the region in the block and the quantization step size. Since the VLC table is selected from the selected VLC table group and the AC coefficient data in each area is subjected to variable-length encoding, the transform coefficient can be encoded with a smaller code amount. The effect of increasing the compression efficiency is obtained.

 また、本実施の形態2では、VLCテーブルグループ選択時に、量子化ステップサイズ32を用いたが、実施の形態1で述べた変換係数予測判定情報31と、量子化ステップサイズ32との両方を用いて、VLCテーブルグループを選択するようにしてもよい。 Further, in the second embodiment, when the VLC table group is selected, the quantization step size 32 is used. However, both the transform coefficient prediction determination information 31 and the quantization step size 32 described in the first embodiment are used. Thus, the VLC table group may be selected.

実施の形態3.
 本実施の形態3では、VLCテーブルグループ選択部にて選択されたVLCテーブルグループの中から、領域内の各(RUN,LEVEL)データを符号化するのに用いるVLCテーブルの選択を、領域内で低周波成分から高周波成分に向かうほど零または小さい値のLEVELの出現確率が高くなるといったLEVELの値の統計的特性に基づいて行うようにしたことを特徴とするものである。
Embodiment 3 FIG.
In the third embodiment, the selection of the VLC table used to encode each (RUN, LEVEL) data in the area from the VLC table group selected by the VLC table group selection unit is performed in the area. It is characterized in that it is performed based on the statistical characteristics of the LEVEL value such that the appearance probability of a LEVEL having a value of zero or a smaller value increases as going from a low frequency component to a high frequency component.

 例えば、低周波成分では、大きい値のレベルが発生しやすいため、符号化すべき(RUN,LEVEL)データが低周波成分でスキャンされたデータである場合には、大きい値のLEVELを含むVLCテーブルを選択する。 For example, in a low-frequency component, a large value level is likely to occur. Therefore, when (RUN, LEVEL) data to be encoded is data scanned with a low-frequency component, a VLC table including a large value LEVEL is generated. select.

 これに対し、高周波成分でスキャンされたデータである場合には、小さい値のレベルと長いRUNのデータを含み、それらに短い符号長を割り当てたVLCテーブルを選択する。
 以下、領域内のスキャンされた位置に基づきVLCテーブルの選択を行うVLCテーブル選択部を含む変換係数可変長符号化部4cについて説明する。
On the other hand, in the case of data scanned with a high frequency component, a VLC table including a small value level and long RUN data and assigning a short code length to them is selected.
Hereinafter, a description will be given of the transform coefficient variable length coding unit 4c including the VLC table selection unit that selects the VLC table based on the scanned position in the area.

 図10は、本実施の形態3における変換係数可変長符号化部4cの内部構成を示す。 FIG. 10 shows the internal configuration of the transform coefficient variable length coding unit 4c according to the third embodiment.

 切替部4c2、DC係数データ符号化部4c3、VLCテーブルグループ選択部4c6の動作については、実施の形態1または実施の形態2と同様であり、異なるのは、VLCテーブル選択部4c8の動作だけである。 The operations of the switching unit 4c2, the DC coefficient data encoding unit 4c3, and the VLC table group selection unit 4c6 are the same as those in the first or second embodiment, and differ only in the operation of the VLC table selection unit 4c8. is there.

 つまり、VLCテーブルグループ選択部4c6は、実施の形態1,2と同様に、ブロック内の各領域毎に、量子化ステップサイズ32または変換係数予測判定情報31等のテクスチャ符号化時の符号化条件に基づいて、選択可能なVLCテーブルグループを選択し、VLCテーブルグループ選択情報4c7として、VLCテーブル選択部4c8へ出力する。 That is, the VLC table group selection unit 4c6, like in the first and second embodiments, sets the coding conditions for texture coding such as the quantization step size 32 or the transform coefficient prediction determination information 31 for each region in the block. And selects a selectable VLC table group based on the VLC table group, and outputs the selected VLC table group to the VLC table selection unit 4c8 as VLC table group selection information 4c7.

 VLCテーブル選択部4c8では、VLCテーブルグループ選択部4c6で選択されたVLCテーブルグループの中から、(RUN,LEVEL)データであるAC係数データ4c4を符号化するのに用いるVLCテーブルを選択する。 The VLC table selection unit 4c8 selects a VLC table used to encode the AC coefficient data 4c4, which is the (RUN, LEVEL) data, from the VLC table groups selected by the VLC table group selection unit 4c6.

 ここで、(RUN,LEVEL)の出現確率は、領域内のスキャンされた位置によって異なる。同一領域内でも低周波成分から高周波成分に向かうほど、零または小さい値のLEVELが多くなる。つまり、LEVELがスキャンされた位置により、LEVELの値の出現確率は異なる。 Here, the appearance probability of (RUN, LEVEL) differs depending on the scanned position in the area. Even in the same region, the level of zero or a small value increases as going from the low frequency component to the high frequency component. That is, the appearance probability of the LEVEL value differs depending on the position where the LEVEL is scanned.

 そこで、この実施の形態3のVLCテーブル選択部4c8では、上記実施の形態1,2の場合とは異なり、AC係数データ4c4である(RUN,LEVEL)データを入力することなく、領域内のスキャンの位置に応じてVLCテーブルの選択を行なうようにする。つまり、各領域1〜4内をさらに複数の領域に分割して、符号化対象の(RUN,LEVEL)データがどの領域でスキャンされたかによってVLCテーブルを選択するようにする。 Therefore, unlike the first and second embodiments, the VLC table selection unit 4c8 according to the third embodiment scans an area without inputting (RUN, LEVEL) data as the AC coefficient data 4c4. The selection of the VLC table is performed according to the position of. That is, each of the regions 1 to 4 is further divided into a plurality of regions, and the VLC table is selected according to which region the (RUN, LEVEL) data to be encoded has been scanned.

 なお、(RUN,LEVEL)データは、各領域1〜4内で予め決められた順番でスキャンされた順に符号化されているので、復号側では、復号対象の(RUN,LEVEL)のスキャン位置を、すでに復号された(RUN,LEVEL)をもとに符号化側のスキャン位置と一致させることができる。このため、復号側ではこのスキャン位置に基づいて復号時に用いる可変長復号テーブルを選択することができるため、本実施の形態3の符号化側では、VLCテーブル選択情報4c9を付加情報としてビットストリームに多重化する必要がない。 Since the (RUN, LEVEL) data is encoded in the scanning order in a predetermined order in each of the areas 1 to 4, the decoding side determines the scan position of the (RUN, LEVEL) to be decoded on the decoding side. The scan position on the encoding side can be matched based on the already decoded (RUN, LEVEL). For this reason, the decoding side can select the variable length decoding table to be used at the time of decoding based on the scan position. Therefore, the encoding side of the third embodiment uses the VLC table selection information 4c9 as additional information in the bit stream. There is no need for multiplexing.

 その結果、上記実施の形態1,2では、符号化ビットストリーム28にVLCテーブル選択情報4c9を多重化する必要があったが、本実施の形態3では、VLCテーブル選択情報4c9をビットストリーム28に多重化する必要がないため、実施の形態1,2の場合よりも、符号化ビットストリーム28の符号量を削減できることになる。 As a result, in the first and second embodiments, it was necessary to multiplex the VLC table selection information 4c9 into the coded bit stream 28, but in the third embodiment, the VLC table selection information 4c9 was added to the bit stream 28. Since there is no need for multiplexing, the code amount of the coded bit stream 28 can be reduced as compared with the first and second embodiments.

 そして、VLCテーブル選択部4c8から領域データ符号化部4c10へVLCテーブル選択情報4c9が出力された後は、上記実施の形態1,2と同様で、領域データ符号化部4c10がVLCテーブル選択部4c8から出力されたVLCテーブル選択情報4c9に基づきVLCテーブルを切り替え選択して、AC係数データ4c4である(RUN,LEVEL)データを可変長符号化する。
 領域データ符号化部4c10の動作は、実施の形態1,2と同様であり、以上の動作を領域内のすべての(RUN,LEVEL)データを符号化するまで繰り返す。
Then, after the VLC table selection information 4c9 is output from the VLC table selection unit 4c8 to the region data encoding unit 4c10, the region data encoding unit 4c10 is switched to the VLC table selection unit 4c8 as in the first and second embodiments. The VLC table is switched and selected on the basis of the VLC table selection information 4c9 output from, and (RUN, LEVEL) data, which is the AC coefficient data 4c4, is subjected to variable-length encoding.
The operation of the area data encoding unit 4c10 is the same as in the first and second embodiments, and the above operation is repeated until all (RUN, LEVEL) data in the area is encoded.

 従って、本実施の形態3では、領域内のスキャン位置に応じて、VLCテーブルを選択するようにしたため、付加情報として、VLCテーブル選択情報4c9をビットストリームに多重化する必要がなくなり、VLCテーブルの切り替えに必要な付加情報の符号量を削減できるという効果が得られる。 Therefore, in the third embodiment, the VLC table is selected according to the scan position in the area. Therefore, it is not necessary to multiplex the VLC table selection information 4c9 as additional information into the bit stream, and the The effect is obtained that the code amount of the additional information required for switching can be reduced.

実施の形態4.
 本実施の形態4では、変換係数可変長符号化部4cの構成を変えたことを特徴とするものである。
Embodiment 4 FIG.
The fourth embodiment is characterized in that the configuration of the transform coefficient variable length coding unit 4c is changed.

 図11に、本実施の形態4における変換係数可変長符号化部4cの内部構成図を示す。
 同図において、4c12は領域データ有効/無効判定部、4c13は領域有効/無効情報、4c14は領域有効/無効情報符号化部、4c15は領域有効/無効情報符号語、である。
FIG. 11 shows an internal configuration diagram of transform coefficient variable length coding section 4c according to the fourth embodiment.
In the figure, reference numeral 4c12 denotes an area data valid / invalid determination unit, 4c13 denotes area valid / invalid information, 4c14 denotes an area valid / invalid information coding unit, and 4c15 denotes an area valid / invalid information codeword.

 次に動作を説明するが、図11において、動作が異なるのは、領域データ有効/無効判定部4c12と、領域有効/無効情報符号化部4c14であり、その他の構成及び動作は実施の形態1または実施の形態2と全く同じである。
 よって、以下では、領域データ有効/無効判定部4c12の動作とそれに対応する領域有効/無効情報符号化部4c14の動作について説明する。
Next, the operation will be described. In FIG. 11, the operations differ from each other in an area data valid / invalid determining unit 4c12 and an area valid / invalid information encoding unit 4c14. Or, it is completely the same as the second embodiment.
Therefore, the operation of the area data valid / invalid determination unit 4c12 and the corresponding operation of the area valid / invalid information encoding unit 4c14 will be described below.

 まず、本実施の形態4の変換係数可変長符号化部4cでは、領域データ有効/無効判定部4c12が、領域毎に領域内のAC係数がすべて零であるか、否かを判定し、その判定結果を領域有効/無効情報4c13として出力する。領域有効/無効情報符号化部4c14は、その領域有効/無効情報4c13を符号化して、領域有効/無効情報符号語4c15として出力する。領域有効/無効情報4c13の符号化方法としては、例えば、ブロック内のすべての領域に関する領域有効/無効情報をまとめて可変長符号化すればよい。 First, in the transform coefficient variable length coding unit 4c according to the fourth embodiment, the area data valid / invalid determination unit 4c12 determines whether or not all the AC coefficients in the area are zero for each area. The determination result is output as area valid / invalid information 4c13. The region valid / invalid information encoding unit 4c14 encodes the region valid / invalid information 4c13 and outputs it as a region valid / invalid information codeword 4c15. As an encoding method of the area valid / invalid information 4c13, for example, variable-length encoding may be performed on the area valid / invalid information of all the areas in the block.

 なお、領域内のAC係数データ4c4がすべて零であった場合には、その領域は無効領域として、領域内のAC係数データ4c4の符号化は行わずに、次の領域の符号化へスキップする。従って、領域内のAC係数データ4c4がすべて零であった場合には、領域有効/無効情報4c13のみを符号化すればよく、AC係数データ4c4の符号量を削減することができる。 If the AC coefficient data 4c4 in the area is all zero, the area is regarded as an invalid area and the encoding of the next area is skipped without encoding the AC coefficient data 4c4 in the area. . Therefore, when the AC coefficient data 4c4 in the area is all zero, only the area valid / invalid information 4c13 needs to be encoded, and the code amount of the AC coefficient data 4c4 can be reduced.

 なお、実施の形態1,2で述べた変換係数可変長符号化部4cの場合、各(RUN,LEVEL)データを符号化するのに用いるVLCテーブルを示すVLCテーブル選択情報4c9を、付加情報可変長符号化部4bで符号化するようにしていた。 In the case of the transform coefficient variable length coding unit 4c described in Embodiments 1 and 2, VLC table selection information 4c9 indicating a VLC table used for coding each (RUN, LEVEL) data is added to the additional information variable. The encoding is performed by the long encoding unit 4b.

 このため、この実施の形態4では、領域有効/無効情報4c13を、各領域1〜4内の最初の(RUN,LEVEL)データを符号化するのに用いたVLCテーブルを示す最初のVLCテーブル選択情報4c9等に符号化するようにしてもよい。
 例えば、付加情報可変長符号化部4bは、最初のVLCテーブル選択情報4c9は、領域内のAC係数がすべて零でその領域の符号化を行わない場合には、“0”とし、n種類のVLCテーブルを切り替えて符号化したときのVLCテーブルを示す情報を、“1”〜“n”とすれば、VLCテーブル選択情報4c9により領域有効/無効情報4c13を代用することができる。このようにすれば、領域有効/無効情報符号化部4c14自体が不要になる。
Therefore, in the fourth embodiment, the region valid / invalid information 4c13 is used to select the first VLC table indicating the VLC table used to encode the first (RUN, LEVEL) data in each of the regions 1 to 4. The information may be encoded into the information 4c9 or the like.
For example, the additional information variable length coding unit 4b sets the first VLC table selection information 4c9 to "0" when the AC coefficients in the area are all zero and the area is not to be coded, and n types of If the information indicating the VLC table when the VLC table is switched and encoded is “1” to “n”, the area valid / invalid information 4c13 can be substituted by the VLC table selection information 4c9. By doing so, the area valid / invalid information encoding unit 4c14 itself becomes unnecessary.

 次に、図4に示す本実施の形態4で述べた可変長符号化部4cを、MPEG-4におけるマクロブロックデータの符号化に適用した場合に得られる従来と比較して有利な効果、すなわち従来であれば符号化モードによって異なるビットストリームの構造を共通にすることができ、復号装置においてシンタックス解析のための回路を簡単にすることができるという効果について説明する。 Next, the variable-length coding unit 4c described in the fourth embodiment shown in FIG. 4 has an advantageous effect as compared with the related art obtained when the variable-length coding unit 4c is applied to coding of macroblock data in MPEG-4, namely, In the related art, the effect that the structure of different bit streams can be made common depending on the encoding mode and the circuit for syntax analysis in the decoding device can be simplified will be described.

 図12に、従来のMPEG-4におけるマクロブロックデータを符号化した際の符号化ビットストリームの構造を示す。
 従来、MPEG-4では、各VOPに対して、イントラ/インター符号化(I-VOP/P-VOP)を行う場合と、両方向予測符号化(B-VOP)を行う場合とで、異なるビットストリームの構造をもつ。イントラ符号化とは、VOP内の情報のみを用いて符号化を行うモードである。インター符号化とは、1つ等前のVOPを用いて動き補償予測を行うモードである。また、両方向予測符号化とは、1つ等前と後とのVOPを用いて、動き補償予測を行うモードである。
FIG. 12 shows a structure of an encoded bit stream when encoding macroblock data in the conventional MPEG-4.
Conventionally, in MPEG-4, different bit streams are used for each VOP when performing intra / inter coding (I-VOP / P-VOP) and performing bidirectional prediction coding (B-VOP). It has the structure of Intra coding is a mode in which coding is performed using only information in a VOP. The inter coding is a mode in which motion compensation prediction is performed using the immediately preceding VOP. In addition, bidirectional prediction encoding is a mode in which motion compensation prediction is performed using one or more preceding and subsequent VOPs.

 図12(a)は、従来のI-VOP/P-VOPのときのビットストリームB1の構造である。
 図において、形状属性情報D1は、形状データの動きベクトル等の形状の属性情報である。
 有効マクロブロック情報D2は、マクロブロックの有効/無効を示す情報で、マクロブロックの変換係数データがすべて零で、動きベクトルが零の場合には、そのマクロブロックは無効マクロブロックとなり、以降の情報はビットストリームに多重化されない。
 有効色差ブロック情報・マクロブロックタイプD3は、有効色差ブロック情報と、マクロブロックタイプとを組にした情報で、有効色差ブロック情報は、マクロブロック内の色差ブロックの有効/無効を示す。色差ブロック内の変換係数データがすべて零の場合には、その色差ブロックは無効となる。
 AC予測指示情報D4は、マクロブロック内のAC係数に対して、変換係数予測が行われたか否かを示す情報で、変換係数予測判定情報31と同じである。
 有効輝度ブロック情報D5は、マクロブロック内の輝度ブロックの有効/無効を示す。輝度ブロック内の変換係数データがすべて零の場合には、その輝度ブロックは無効となる。
 差分量子化ステップサイズD6は、1つ前のマクロブロックデータとの量子化ステップサイズが異なる場合に、1つ前のマクロブロックデータの量子化ステップサイズとの差分を表す。
 インタレース情報D7は、インタレース画像の場合に必要な情報である。
 動きデータD8は、動き補償が行われたときに存在する動きに関するデータである。
 形状データD9は、任意形状のVOPを符号化する際に必要な情報である。
 ブロックデータD10は、有効色差ブロック情報または有効輝度ブロック情報D5により有効ブロックであることが示唆された場合にのみ存在する。
FIG. 12A shows the structure of a bit stream B1 in the case of a conventional I-VOP / P-VOP.
In the figure, shape attribute information D1 is shape attribute information such as a motion vector of shape data.
The valid macroblock information D2 is information indicating the validity / invalidity of the macroblock. If the transform coefficient data of the macroblock is all zero and the motion vector is zero, the macroblock becomes an invalid macroblock, and the subsequent information Are not multiplexed into the bitstream.
The effective chrominance block information / macroblock type D3 is information in which the effective chrominance block information and the macroblock type are combined, and the effective chrominance block information indicates the validity / invalidity of the chrominance block in the macroblock. When the conversion coefficient data in the chrominance block is all zero, the chrominance block is invalid.
The AC prediction instruction information D4 is information indicating whether or not transform coefficient prediction has been performed on the AC coefficient in the macroblock, and is the same as the transform coefficient prediction determination information 31.
The effective luminance block information D5 indicates whether the luminance block in the macroblock is valid or invalid. When all the conversion coefficient data in the luminance block is zero, the luminance block becomes invalid.
The difference quantization step size D6 indicates a difference from the quantization step size of the immediately preceding macroblock data when the quantization step size is different from the immediately preceding macroblock data.
The interlace information D7 is information necessary for an interlaced image.
The motion data D8 is data relating to motion existing when motion compensation is performed.
The shape data D9 is information necessary for encoding a VOP having an arbitrary shape.
The block data D10 exists only when the effective color difference block information or the effective luminance block information D5 indicates that the block is an effective block.

 図12(b)は、従来のB-VOPのときのビットストリームB2の構造である。 マクロブロックタイプD10と、有効ブロック情報D12の多重化方法のみが異なる。
 具体的には、図12(a)に示すI-VOP/P-VOPの場合には、有効ブロック情報について、色差ブロックと、輝度ブロックとについて、別々に多重化し、色差ブロックの有効情報については、マクロブロックタイプと組にして、有効色差ブロック情報・マクロブロックタイプD3として可変長符号化している。輝度ブロック情報は、4つの輝度ブロックの有効/無効情報を組にして、有効輝度ブロック情報D5として可変長符号化している。
FIG. 12B shows the structure of a bit stream B2 in a conventional B-VOP. Only the multiplexing method of the macroblock type D10 and the effective block information D12 is different.
Specifically, in the case of the I-VOP / P-VOP shown in FIG. 12A, the chrominance block and the luminance block are separately multiplexed for the effective block information, and the effective information of the chrominance block is , A macroblock type, and variable-length encoding as effective color difference block information / macroblock type D3. The luminance block information is obtained by combining valid / invalid information of four luminance blocks and performing variable length coding as effective luminance block information D5.

 これに対し、図12(b)に示すB-VOPの場合には、マクロブロックタイプD11と有効色差ブロック情報を別々に多重化し、かつ、輝度ブロック、色差ブロックそれぞれの有効/無効を示す情報を有効ブロック情報D12として固定長符号化している。 On the other hand, in the case of the B-VOP shown in FIG. 12B, the macroblock type D11 and the effective chrominance block information are separately multiplexed, and information indicating the valid / invalid of each of the luminance block and the chrominance block is provided. It is fixed-length coded as effective block information D12.

 このように、従来のI-VOP/P-VOPと、B-VOPとでは、ブロック内の量子化変換係数(AC係数)が領域内ですべて零か否かを示す有効ブロック情報の多重化方法が異なり、ビットストリームの構造が異なっている。 As described above, in the conventional I-VOP / P-VOP and B-VOP, a method of multiplexing effective block information indicating whether or not all quantized transform coefficients (AC coefficients) in a block are zero in a region And the structure of the bit stream is different.

 しかし、本実施の形態4で述べた可変長符号化部4cによれば、ブロック内の各領域毎に、領域データ有効/無効判定部4c12が量子化変換係数のAC係数が零か否かを判定し、領域有効/無効情報符号化部4c14がその領域有効/無効情報4c13を符号化して領域有効/無効情報符号化部4c14としてビットストリーム28に多重化するため、ブロック毎にブロック内での量子化変換係数AC係数が零か否かを判定して、それを有効ブロック情報として、ビットストリーム28に多重化する必要はない。 However, according to the variable length coding unit 4c described in the fourth embodiment, for each region in the block, the region data validity / invalidity determination unit 4c12 determines whether the AC coefficient of the quantized transform coefficient is zero. Then, the region valid / invalid information encoding unit 4c14 encodes the region valid / invalid information 4c13 and multiplexes it as the region valid / invalid information encoding unit 4c14 on the bit stream 28. It is not necessary to determine whether the quantized transform coefficient AC coefficient is zero or not and to multiplex it as effective block information into the bit stream 28.

 図13は、この実施の形態4の可変長符号化部4cを、MPEG-4におけるマクロブロックデータの符号化に適用した場合に得られるビットストリームB3を示している。
 有効ブロック情報をビットストリームD3に多重化しないため、I-VOP,P-VOP,B-VOPいずれの符号化モードの場合にも、図13に示すビットストリームB3の共通の構造になる。
 なお、本実施の形態4の場合、ブロックデータD10の各領域のAC係数データD13毎に、領域有効/無効情報D14が設定されることになる。
FIG. 13 shows a bit stream B3 obtained when the variable length coding unit 4c of the fourth embodiment is applied to coding of macroblock data in MPEG-4.
Since the effective block information is not multiplexed into the bit stream D3, the common structure of the bit stream B3 shown in FIG. 13 is obtained in any of the I-VOP, P-VOP, and B-VOP coding modes.
In the fourth embodiment, the area valid / invalid information D14 is set for each AC coefficient data D13 of each area of the block data D10.

 以上のように、本実施の形態4で述べた可変長符号化手段をMPEG-4におけるマクロブロックデータの符号化に適用した場合には、イントラ、インター、両方向予測の符号化モードに関わらず、図13に示すような共通のビットストリームD3の構造になる。 As described above, when the variable length encoding means described in Embodiment 4 is applied to encoding of macroblock data in MPEG-4, regardless of the encoding mode of intra, inter, and bidirectional prediction, The structure of the common bit stream D3 is as shown in FIG.

 従って、本実施の形態4の動画像符号化装置によれば、復号側では、ビットストリームの構造であるシンタックスを解析する手段を符号化モードに関わらず共通化できるため、復号装置において、シンタックス解析のための回路構成が簡単になるという効果が得られる。 Therefore, according to the moving picture coding apparatus of the fourth embodiment, the decoding side can use a common means for analyzing the syntax, which is the structure of the bit stream, regardless of the coding mode. This has the effect of simplifying the circuit configuration for tax analysis.

実施の形態5.
 本実施の形態5は、変換係数可変長符号化部4cの領域データ符号化部4c10の構成を特徴とするものである。
Embodiment 5 FIG.
The fifth embodiment is characterized by the configuration of the area data encoding unit 4c10 of the transform coefficient variable length encoding unit 4c.

 図14は、本実施の形態における変換係数可変長符号化部4cの領域データ符号化部4c10の詳細な内部構成図である。同図において、4c101はVLCテーブル探索部、4c102はエスケープコード、4c103は変換係数変換部、4c104は変換AC係数データ、4c105は変換フラグ、4c106は変換係数固定長復号部、である。 FIG. 14 is a detailed internal configuration diagram of the area data encoding unit 4c10 of the transform coefficient variable length encoding unit 4c in the present embodiment. In the figure, reference numeral 4c101 denotes a VLC table search unit, 4c102 denotes an escape code, 4c103 denotes a conversion coefficient conversion unit, 4c104 denotes a conversion AC coefficient data, 4c105 denotes a conversion flag, and 4c106 denotes a conversion coefficient fixed length decoding unit.

 次に動作を説明する。VLCテーブル探索部4c101は、入力された変換係数データであるAC係数データ(RUN,LEVEL)4c4に対応する符号語を、VLCテーブル記憶部4c1のVLCテーブル内で探索する。AC係数データ(RUN,LEVEL)4c4に対応する符号語が、VLCテーブル内に見つかった場合には、上記実施の形態1〜4と同様に、その符号語をAC係数符号語4c11として出力する。 Next, the operation will be described. The VLC table search unit 4c101 searches the VLC table of the VLC table storage unit 4c1 for a codeword corresponding to the AC coefficient data (RUN, LEVEL) 4c4 that is the input conversion coefficient data. When a codeword corresponding to the AC coefficient data (RUN, LEVEL) 4c4 is found in the VLC table, the codeword is output as an AC coefficient codeword 4c11 as in the first to fourth embodiments.

 ここでは、本実施の形態5の特徴である、VLCテーブルに見つからなかった場合の動作について詳細に説明する。
 まず、VLCテーブル探索部4c101は、入力されたAC係数データ4c4に対応する符号語がVLCテーブルになかった場合、エスケープコード4c102と呼ばれる固定長の符号語、およびAC係数データ4c4を変換係数変換部4c103へ出力する。
Here, the operation in the case where the information is not found in the VLC table, which is a feature of the fifth embodiment, will be described in detail.
First, when a codeword corresponding to the input AC coefficient data 4c4 is not present in the VLC table, the VLC table search unit 4c101 converts a fixed-length codeword called an escape code 4c102 and the AC coefficient data 4c4 into a conversion coefficient conversion unit. 4c103.

 変換係数変換部4c103では、AC係数データ4c4のRUNまたはLEVELの値を変換する。
 第1の変換は、AC係数データ4c4のRUNまたはLEVELの値のうち、LEVELに対して行う。変換されたLEVEL*は、VLCテーブルに含まれているAC係数データのLEVELの最大値(LMAX)を引くことによって得られる。具体的には、次の式1に示す。
The conversion coefficient conversion unit 4c103 converts the RUN or LEVEL value of the AC coefficient data 4c4.
The first conversion is performed on LEVEL among the values of RUN or LEVEL of the AC coefficient data 4c4. The converted LEVEL * is obtained by subtracting the maximum value (LMAX) of the LEVEL of the AC coefficient data included in the VLC table. Specifically, it is shown in the following equation 1.

 LEVEL*=sign(LEVEL)×[abs(LEVEL−LMAX)]   ・・・(式1)
 ただし、sign(LEVEL)は、LEVELが0以上ならば1、それ以外は−1である。また、abs(LEVEL)は、LEVELの絶対値である。
LEVEL * = sign (LEVEL) × [abs (LEVEL−LMAX)] (Equation 1)
However, sign (LEVEL) is 1 if LEVEL is 0 or more, and -1 otherwise. Abs (LEVEL) is the absolute value of LEVEL.

 そして、VLCテーブル探索部4c101は、変換AC係数データ4c104(RUN,LEVEL*)を用いて、再び、VLCテーブルを探索する。ここで、変換AC係数データ4c104(RUN,LEVEL*)に対応する符号語がVLCテーブルに見つかった場合には、エスケープコードの後に、LEVELの値が変換されたことを示すコードと、VLCテーブルより検出された符号語とを付けて、AC係数符号語4c11として出力する。 Then, the VLC table search unit 4c101 searches the VLC table again using the converted AC coefficient data 4c104 (RUN, LEVEL *). Here, if a codeword corresponding to the converted AC coefficient data 4c104 (RUN, LEVEL *) is found in the VLC table, a code indicating that the value of LEVEL has been converted after the escape code and a VLC table Attached with the detected code word, it is output as AC coefficient code word 4c11.

 これに対し、第1の変換が行われた変換AC係数データ4c104(RUN,LEVEL*)に対応する符号語がVLCテーブルに見つからなかった場合、変換係数変換部4c103は、第2の変換を行なう。
 第2の変換は、RUNに対して行う。変換されたRUN*は、VLCテーブルに含まれているAC係数データのRUNの最大値(RMAX)+1を引くことによって得られる。具体的には、次の式2に示す。
On the other hand, if the codeword corresponding to the converted AC coefficient data 4c104 (RUN, LEVEL *) on which the first conversion has been performed is not found in the VLC table, the conversion coefficient conversion unit 4c103 performs the second conversion. .
The second conversion is performed on RUN. The converted RUN * is obtained by subtracting the RUN maximum value (RMAX) +1 of the AC coefficient data contained in the VLC table. Specifically, it is shown in the following equation 2.

 RUN*=RUN−(RMAX+1)   ・・・(式2) {RUN * = RUN- (RMAX + 1)} ... (Equation 2)

 そして、VLCテーブル探索部4c101は、新たな変換AC係数データ4c105(RUN*,LEVEL*)を用いて再びVLCテーブルを探索する。ここで、この新たな変換AC係数データ4c105(RUN*,LEVEL*)に対応する符号語がVLCテーブルに見つかった場合には、エスケープコードの後に、RUNの値が変換されたことを示すコードと、VLCテーブルより検出された符号語とを付けて、AC係数符号語4c11として出力する。 {Circle around (4)} Then, the VLC table search unit 4c101 searches the VLC table again using the new converted AC coefficient data 4c105 (RUN *, LEVEL *). Here, when a code word corresponding to the new converted AC coefficient data 4c105 (RUN *, LEVEL *) is found in the VLC table, a code indicating that the value of RUN has been converted is added after the escape code. , And a codeword detected from the VLC table, and output as an AC coefficient codeword 4c11.

 これに対し、第2の変換が行われた変換AC係数データ4c105(RUN*,LEVEL*)に対応する符号語がVLCテーブルに見つからなかった場合には、RUN,LEVELをそれぞれ固定長符号化し、エスケープコードの後に、AC係数データが固定長符号化されたことを示すコードとAC係数データの固定長符号語を付けて、AC係数符号語4c11として出力する。 On the other hand, if the codeword corresponding to the converted AC coefficient data 4c105 (RUN *, LEVEL *) subjected to the second conversion is not found in the VLC table, RUN and LEVEL are respectively fixed-length coded, After the escape code, a code indicating that the AC coefficient data has been fixed-length coded and a fixed-length codeword of the AC coefficient data are added, and output as an AC coefficient codeword 4c11.

 なお、実施の形態1で述べたように、(RUN,LEVEL)と、次の(RUN,LEVEL)を符号化するのに用いるVLCテーブル選択情報4c9(NEXT)を組にして、可変長符号化する場合にも同様の処理を行うことができる。 As described in the first embodiment, (RUN, LEVEL) and VLC table selection information 4c9 (NEXT) used for encoding the next (RUN, LEVEL) are set as a set to perform variable-length encoding. The same processing can be performed in the case of performing.

 従って、本実施の形態5によれば、AC係数データの可変長符号化を行う際に、符号化するAC係数データに対応するデータがVLCテーブルになかった場合、AC係数データを変換し、変換したAC係数データをもとに再びVLCテーブルを探索し、可変長符号化するようにしたので、より圧縮効率を高める効果が得られる。 Therefore, according to the fifth embodiment, when performing variable length coding of AC coefficient data, if there is no data corresponding to the AC coefficient data to be coded in the VLC table, the AC coefficient data is converted. Since the VLC table is searched again based on the obtained AC coefficient data and variable length coding is performed, an effect of further improving the compression efficiency can be obtained.

実施の形態6.
 本実施の形態6では、実施の形態1または実施の形態2で述べた動画像符号化装置によって生成される符号化ビットストリームを復号する動画像復号装置について説明する。
Embodiment 6 FIG.
In the sixth embodiment, a moving image decoding device that decodes an encoded bit stream generated by the moving image encoding device described in the first or second embodiment will be described.

 図15は、本実施の形態6における動画像復号装置の構成を示すブロック図である。
 同図において、101は符号化ビットストリーム、102はシンタックス解析部、103は形状データ符号語、104はブロックデータ符号語、105は付加情報符号語、106は動きベクトル符号語、107は可変長復号部、108は形状符号化データ、109は量子化変換係数データ、110は付加情報、111は動きベクトル、112は形状復号部、113はテクスチャ復号部、114は動き補償部、115は復号形状データ、116は復号予測誤差信号、117はメモリ、118は参照画像、119は被復号マクロブロック画面内位置情報、120は予測画像、121は復号加算部、122は復号画像、123は切替部、である。なお、110aは付加情報110中に含まれるモード指示フラグである。
FIG. 15 is a block diagram illustrating a configuration of a video decoding device according to Embodiment 6.
In the figure, 101 is an encoded bit stream, 102 is a syntax analysis unit, 103 is a shape data codeword, 104 is a block data codeword, 105 is an additional information codeword, 106 is a motion vector codeword, and 107 is a variable length. Decoder 108, shape encoded data, 109, quantized transform coefficient data, 110, additional information, 111, motion vector, 112, shape decoder, 113, texture decoder, 114, motion compensator, 115, decoded shape Data, 116 is a decoded prediction error signal, 117 is a memory, 118 is a reference image, 119 is position information in a decoded macroblock screen, 120 is a predicted image, 121 is a decoding and adding unit, 122 is a decoded image, 123 is a switching unit, It is. Reference numeral 110a is a mode instruction flag included in the additional information 110.

 図16は、図15の可変長復号部107の内部構成を示す図である。
 同図において、107aは形状データ可変長復号部、107bは変換係数可変長復号部、107cは付加情報可変長復号部、107dは動きベクトル可変長復号部、である。なお、110bは、付加情報110中に含まれる符号化側の変換係数予測判定情報31または量子化ステップサイズ32であるテクスチャ符号化の際の符号化条件である。
FIG. 16 is a diagram showing an internal configuration of the variable length decoding unit 107 in FIG.
In the figure, 107a is a shape data variable length decoding unit, 107b is a transform coefficient variable length decoding unit, 107c is an additional information variable length decoding unit, and 107d is a motion vector variable length decoding unit. Note that reference numeral 110 b denotes an encoding condition for texture encoding that is the transform coefficient prediction determination information 31 or the quantization step size 32 on the encoding side included in the additional information 110.

 次に、図15および図16をもとに装置全体の動作について説明する。
 まず、符号化ビットストリーム101は、シンタックス解析部102において、形状データ符号語103、ブロックデータ符号語104、付加情報符号語105、動きベクトル符号語106に分離され、それぞれ、形状データ可変長復号部107a、変換係数可変長復号部107b、付加情報可変長復号部107c、動きベクトル可変長復号部107dにて、可変長復号されたのち、形状符号化データ108は形状復号部112に、量子化変換係数データ109および各種の付加情報110はテクスチャ復号部113に、動きベクトル111は動き補償部114に送られる。なお、動き補償部114には、可変長復号部107から被復号マクロブロック画面内位置情報119に入力している。
Next, the operation of the entire apparatus will be described with reference to FIGS.
First, the coded bit stream 101 is separated into a shape data codeword 103, a block data codeword 104, an additional information codeword 105, and a motion vector codeword 106 by a syntax analysis unit 102, and each of them is subjected to shape data variable length decoding. After being subjected to variable-length decoding by the unit 107a, the transform coefficient variable-length decoding unit 107b, the additional information variable-length decoding unit 107c, and the motion vector variable-length decoding unit 107d, the shape encoded data 108 is quantized by the shape decoding unit 112. The transform coefficient data 109 and various types of additional information 110 are sent to the texture decoding unit 113, and the motion vector 111 is sent to the motion compensation unit 114. It should be noted that the motion compensator 114 inputs the decoded macroblock in-screen position information 119 from the variable length decoder 107.

 形状復号部112は、形状符号化データ108を復号し、復号形状データ115として出力する。復号形状データ115は、テクスチャ復号部113、動き補償部114において、有効画素のみを対象にして、テクスチャデータの復号や、動き補償を行うために用いられる。 The shape decoding unit 112 decodes the shape encoded data 108 and outputs it as decoded shape data 115. The decoded shape data 115 is used by the texture decoding unit 113 and the motion compensation unit 114 for decoding texture data and performing motion compensation only for valid pixels.

 テクスチャ復号部113は、量子化変換係数データ109を付加情報110に含まれる量子化ステップサイズを用いて逆量子化後、逆直交変換して、復号予測誤差信号116を得る。復号予測誤差信号116は、復号加算部121に送られる。 The texture decoding unit 113 inversely transforms the quantized transform coefficient data 109 using the quantization step size included in the additional information 110, and then performs inverse orthogonal transform to obtain a decoded prediction error signal 116. The decoded prediction error signal 116 is sent to the decoding adder 121.

 動き補償部114は、被復号マクロブロック画面内位置情報119と、符号化ビットストリーム101から復号した動きベクトル111とに従って、メモリ117中の参照画像118から予測画像120を取り出して、切替部123へ出力する。 The motion compensating unit 114 extracts the predicted image 120 from the reference image 118 in the memory 117 according to the position information 119 in the decoded macroblock screen and the motion vector 111 decoded from the encoded bit stream 101, and sends the predicted image 120 to the switching unit 123. Output.

 切替部123は、復号された付加情報110に含まれる符号化側における符号化モードを示すモード指示フラグ110aに基づいて、イントラ符号化を示している場合には、復号画像の生成に予測画像120が不要なので、出力0の側へ切り替える一方、インター符号化の場合には、復号画像の生成に予測画像120が必要なので、予測画像120の出力側へ切り替えるようにする。 If the switching unit 123 indicates intra-encoding based on the mode instruction flag 110a indicating the encoding mode on the encoding side included in the decoded additional information 110, the prediction unit 120 Is switched to the output 0 side, while in the case of inter-coding, since the predicted image 120 is required for generating the decoded image, it is switched to the output side of the predicted image 120.

 復号加算部121は、付加情報110に含まれるモード指示フラグ110aに基づいて、イントラ符号化ブロックの場合には、テクスチャ復号部113の出力である復号予測誤差信号116をそのまま復号画像122として出力する一方、インター符号化ブロックの場合には、テクスチャ復号部113の出力出力である復号予測誤差信号116に予測画像120を加算して復号画像122として出力する。なお、復号画像122は、以降のVOPの復号処理において参照画像118として用いるために、メモリ117に書き込まれる。 Based on the mode instruction flag 110a included in the additional information 110, the decoding addition unit 121 outputs the decoded prediction error signal 116 output from the texture decoding unit 113 as a decoded image 122 in the case of an intra-coded block. On the other hand, in the case of an inter-coded block, a predicted image 120 is added to a decoded prediction error signal 116 which is an output of the texture decoding unit 113, and the resultant is output as a decoded image 122. The decoded image 122 is written to the memory 117 so as to be used as the reference image 118 in the subsequent VOP decoding processing.

 次に、本実施の形態6の最も重要な要素である変換係数可変長復号部107bおよびテクスチャ復号部113の動作について説明する。 Next, operations of the transform coefficient variable length decoding unit 107b and the texture decoding unit 113, which are the most important elements of the sixth embodiment, will be described.

 図17は、図16の変換係数可変長復号部107bの内部構成図である。
 図17において、107b1は切替部、107b2はDC係数データ復号部、107b3は復号DC係数、107b4はAC係数データ符号語、107b5はVLD(Variable Length decoding;可変長復号化)テーブル記憶部、107b6はVLDテーブルグループ選択部、107b7はVLDテーブルグループ情報、107b8は領域データ復号部、107b9はVLCテーブル選択情報、107b10はVLDテーブル選択部、107b11はVLDテーブル、107b12は復号AC係数、である。
 尚、VLDテーブル記憶部107b5には、符号化側の例えばVLCテーブル記憶部4C1(図5等参照。)のVLCテーブルグループおよびVLCテーブルと対応して、同じ内容のVLDテーブルグループおよびVLDテーブルが記憶されている。
FIG. 17 is an internal configuration diagram of the transform coefficient variable length decoding unit 107b of FIG.
17, 107b1 is a switching unit, 107b2 is a DC coefficient data decoding unit, 107b3 is a decoded DC coefficient, 107b4 is an AC coefficient data codeword, 107b5 is a VLD (Variable Length decoding) table storage unit, 107b6 is A VLD table group selection unit, 107b7 is VLD table group information, 107b8 is an area data decoding unit, 107b9 is VLC table selection information, 107b10 is a VLD table selection unit, 107b11 is a VLD table, and 107b12 is a decoding AC coefficient.
The VLD table storage unit 107b5 stores a VLD table group and a VLD table having the same contents, for example, corresponding to the VLC table group and the VLC table of the VLC table storage unit 4C1 (see FIG. 5 and the like) on the encoding side. Have been.

 図18は、変換係数可変長復号部107bの動作を示すフローチャートである。
 切替部107b1は、付加情報110に含まれるモード指示フラグ110aに基づいて、復号対象の符号化ブロックの符号化モードがイントラ符号化であるか、あるいはインター符号化であるかを判定し(ステップS101)、イントラ符号化ブロックの場合には(ステップS101“イントラ”)、ブロックデータ符号語104をDC係数データ復号部107b2に渡し、ブロックデータ符号語104に含まれるDC係数データの復号を行わせ(ステップS102)、復号DC係数107b3として出力させ、次にAC係数データの復号を行う。
FIG. 18 is a flowchart illustrating the operation of the transform coefficient variable length decoding unit 107b.
The switching unit 107b1 determines whether the encoding mode of the encoded block to be decoded is the intra encoding or the inter encoding based on the mode instruction flag 110a included in the additional information 110 (step S101). ), In the case of an intra-coded block (“intra” in step S101), the block data codeword 104 is passed to the DC coefficient data decoding unit 107b2, and the DC coefficient data included in the block data codeword 104 is decoded ( Step S102), output as the decoded DC coefficient 107b3, and then decode the AC coefficient data.

 一方、インターモードの場合には(ステップS101“インター”)、ステップS102のDC係数データの復号処理は行わないので、AC係数データの復号のみを行う。AC係数データは、ブロック内を複数の領域に分けた領域毎に符号化されているので、復号の際も領域毎に行うようにする。 On the other hand, in the case of the inter mode (“inter” in step S101), since the decoding processing of the DC coefficient data in step S102 is not performed, only the decoding of the AC coefficient data is performed. Since the AC coefficient data is encoded for each of a plurality of divided regions in the block, decoding is performed for each region.

 つまり、まず、領域毎にその領域内のAC係数データを復号するのに用いる可変長復号(以下、VLD(Variable Length Decoding)と略する)テーブルグループを選択する(ステップS103)。
 VLDテーブルグループの選択は、VLDテーブルグループ選択部107b6が行い、領域のブロック内での位置と、符号化側の変換係数可変長符号化部4cにおいて使用した変換係数予測判定情報31または量子化ステップサイズ32のテクスチャ符号化の際の符号化条件110bに基づいて行う。
That is, first, a variable length decoding (hereinafter abbreviated as VLD (Variable Length Decoding)) table group used for decoding the AC coefficient data in the area is selected for each area (step S103).
The selection of the VLD table group is performed by the VLD table group selection unit 107b6, and the position of the region in the block and the transform coefficient prediction determination information 31 or the quantization step used in the transform coefficient variable length coding unit 4c on the encoding side are used. This is performed based on the encoding condition 110b at the time of encoding the texture of size 32.

 変換係数予測判定情報31あるいは量子化ステップサイズ32は、テクスチャの復号時に必要なため、付加情報としてブロック毎にビットストリーム101に多重化されているので、これを復号して使用すればよい。VLDテーブルグループ選択部107b6の動作は、実施の形態1または実施の形態2で述べたVLCテーブルグループ選択部4c6の動作と同じである。 Since the 予 測 transform coefficient prediction determination information 31 or the quantization step size 32 is necessary at the time of decoding the texture, it is multiplexed as additional information in the bit stream 101 for each block. The operation of VLD table group selection section 107b6 is the same as the operation of VLC table group selection section 4c6 described in the first or second embodiment.

 また、符号化側では、領域内を決められた順番でスキャンして得られた(RUN,LEVEL)データを可変長符号化することによりAC係数データの符号化を行っている。このとき、各(RUN,LEVEL)データを符号化するのに用いる可変長符号化テーブルをVLCテーブルグループ選択部4c6で選択されたVLCテーブルグループの中から選択している。実施の形態1または実施の形態2で述べた変換係数可変長符号化部4cでは、各(RUN,LEVEL)データを符号化するのに用いたVLCテーブルの種類をVLCテーブル選択情報4c9として符号化している。 {Circle around (4)} On the encoding side, AC coefficient data is encoded by performing variable length encoding on (RUN, LEVEL) data obtained by scanning the area in a predetermined order. At this time, the variable length coding table used for coding each (RUN, LEVEL) data is selected from the VLC table groups selected by the VLC table group selection unit 4c6. In the transform coefficient variable length coding unit 4c described in the first or second embodiment, the type of the VLC table used to code each (RUN, LEVEL) data is coded as VLC table selection information 4c9. ing.

 そこで、本実施の形態6で述べる変換係数可変長復号部107bにおいては、領域データ復号部107b8が、ブロックデータ符号語104に含まれる各(RUN,LEVEL)データを符号化するのに用いたVLCテーブル選択情報107b9を復号し、このVLCテーブル選択情報107b9をVLDテーブル選択部107b10へ出力する。 Therefore, in transform coefficient variable length decoding section 107b described in the sixth embodiment, region data decoding section 107b8 uses VLC used to encode each (RUN, LEVEL) data included in block data codeword 104. It decodes table selection information 107b9 and outputs this VLC table selection information 107b9 to VLD table selection section 107b10.

 VLDテーブル選択部107b10では、そのVLCテーブルグループ情報107b9に基づいて、VLDテーブル記憶部107b5から(RUN,LEVEL)データを復号するのに用いるVLDテーブル107b11を選択して、領域データ復号部107b8へ出力する(ステップS104)。 The VLD table selection unit 107b10 selects a VLD table 107b11 used for decoding (RUN, LEVEL) data from the VLD table storage unit 107b5 based on the VLC table group information 107b9, and outputs it to the area data decoding unit 107b8. (Step S104).

 領域データ復号部107b8では、VLDテーブル選択部107b10からのVLDテーブル107b11を用いて、領域内の(RUN,LEVEL)データを復号する。 The area data decoding unit 107b8 decodes (RUN, LEVEL) data in the area using the VLD table 107b11 from the VLD table selection unit 107b10.

 具体的には、まず、ブロックデータ符号語104に含まれるAC係数データ符号語107b4を、そのVLDテーブル107b11内で探索し、対応する(RUN,LEVEL)データが見つかった場合には、これを復号AC係数データ107b12として出力する。 Specifically, first, the AC coefficient data codeword 107b4 included in the block data codeword 104 is searched in the VLD table 107b11, and if the corresponding (RUN, LEVEL) data is found, it is decoded. It is output as AC coefficient data 107b12.

 これに対し、対応する(RUN,LEVEL)データが見つからず、エスケープコードが検出された場合には、次に続くRUN,LEVELの固定長符号語であるAC係数データ符号語107b4をそれぞれ固定長復号して、(RUN,LEVEL)データを得ることができるので、これを復号AC係数データ107b12として出力する。以上のステップS104〜S105の処理を領域内ですべての(RUN,LEVEL)データを復号するまで繰り返す(ステップS106“No”)。 On the other hand, when the corresponding (RUN, LEVEL) data is not found and the escape code is detected, the AC coefficient data codeword 107b4, which is the next fixed-length codeword of RUN and LEVEL, is fixed-length decoded. Then, (RUN, LEVEL) data can be obtained, and this is output as decoded AC coefficient data 107b12. The above processing of steps S104 to S105 is repeated until all (RUN, LEVEL) data is decoded in the area (step S106 "No").

 そして、ある領域内のすべての(RUN,LEVEL)データの復号が終了した場合には(ステップS106“Yes”)、ブロック内のすべての領域に対して、ステップS103〜ステップS106の処理を行ったか否かを判断し(ステップS107)、行っていない場合には(ステップS107“No”)、ステップS103〜ステップS106の処理を行なう一方、行った場合には(ステップS107“Yes”)、以上の処理を終了するようにする。 Then, when decoding of all (RUN, LEVEL) data in a certain area is completed (“Yes” in step S106), it is determined whether the processing in steps S103 to S106 has been performed on all the areas in the block. It is determined whether or not the process has been performed (step S107). If the process has not been performed (step S107 “No”), the processes of steps S103 to S106 are performed, whereas if the process has been performed (step S107 “Yes”), Terminate the processing.

 そして、実施の形態1で述べたように、(RUN,LEVEL)データと、次に続く(RUN,LEVEL)データを符号化するのに用いるVLCテーブル選択情報107b9(NEXT)を組にした(NEXT,RUN,LEVEL)データを復号する場合も、(RUN,LEVEL)データと、次の(RUN,LEVEL)データを復号するのに用いるVLCテーブル選択情報107b9(NEXT)とが一緒に可変長復号されること以外の基本的な動作は同じである。 Then, as described in the first embodiment, the (RUN, LEVEL) data and the VLC table selection information 107b9 (NEXT) used to encode the following (RUN, LEVEL) data are grouped as (NEXT). , RUN, LEVEL) data, the (RUN, LEVEL) data and the VLC table selection information 107b9 (NEXT) used for decoding the next (RUN, LEVEL) data are variable-length decoded together. The basic operation other than that is the same.

 ブロック内のすべての領域に対して、以上の復号処理を行い、得られた復号DC係数107b3と、復号AC係数データ107b12の(RUN,LEVEL)に基づいて、符号化側のスキャンと逆の処理を行うことにより、量子化変換係数データ109を得る。なお、量子化変換係数データ109は、テクスチャ復号部113へ出力される。 The above decoding process is performed on all the regions in the block, and the reverse process to the scan on the encoding side is performed based on the obtained decoded DC coefficient 107b3 and (RUN, LEVEL) of the decoded AC coefficient data 107b12. Is performed, the quantized transform coefficient data 109 is obtained. Note that the quantized transform coefficient data 109 is output to the texture decoding unit 113.

 次に、テクスチャ復号部113の詳細構成および動作を述べる。
 図19は、テクスチャ復号部113の内部構成図である。同図において、113aは切替部、110b1は変換係数予測判定情報、113cは変換係数予測部、113dは差分量子化変換係数、113eは隣接ブロック量子化変換係数、113fは量子化変換係数、113gは逆量子化部、113hは量子化ステップ、113iはDCT係数、113jは逆DCT部、である。また、110b1は、付加情報110に含まれるテクスチャ符号化の際の符号化条件110bの1つである変換係数予測判定情報である。
Next, the detailed configuration and operation of the texture decoding unit 113 will be described.
FIG. 19 is an internal configuration diagram of the texture decoding unit 113. In the figure, 113a is a switching unit, 110b1 is transform coefficient prediction determination information, 113c is a transform coefficient predictor, 113d is a differential quantized transform coefficient, 113e is an adjacent block quantized transform coefficient, 113f is a quantized transform coefficient, and 113g is a quantized transform coefficient. An inverse quantization unit, 113h is a quantization step, 113i is a DCT coefficient, and 113j is an inverse DCT unit. 110b1 is transform coefficient prediction determination information which is one of the encoding conditions 110b for texture encoding included in the additional information 110.

 次に動作を説明する。まず、切替部113aは、復号された付加情報110に含まれる変換係数予測判定情報110b1が、変換係数予測を行うことを指示している場合には、変換係数予測部113cにて変換係数予測を行う。 Next, the operation will be described. First, when the transform coefficient prediction determination information 110b1 included in the decoded additional information 110 indicates that transform coefficient prediction is to be performed, the switch 113a performs transform coefficient prediction by the transform coefficient predictor 113c. Do.

 変換係数予測部113cは、差分量子化変換係数113dを受け取り、近傍ブロックの量子化変換係数113eを加え、量子化変換係数113fを得る。
 ここで、量子化DC係数の予測は、近傍のブロックの量子化DC係数を予測値として、差分量子化DC係数に加算することによって行われる。予測に用いるブロックの選択は符号化側と同様に行う。
The transform coefficient prediction unit 113c receives the differential quantized transform coefficient 113d, adds the quantized transform coefficient 113e of the neighboring block, and obtains the quantized transform coefficient 113f.
Here, the prediction of the quantized DC coefficient is performed by adding the quantized DC coefficient of the neighboring block as a predicted value to the differential quantized DC coefficient. Selection of a block used for prediction is performed in the same manner as on the encoding side.

 また、量子化AC係数の予測は、まず、付加情報110に含まれる変換係数予測判定情報110b1に基づいて変換係数予測が行われたか否かを判定し、量子化AC係数に対して変換係数予測が行われた場合には、符号化側と同様に近傍ブロックの量子化AC係数を予測値として、差分量子化AC係数に加算する。 The prediction of the quantized AC coefficient is performed by first determining whether or not the transform coefficient prediction has been performed based on the transform coefficient prediction determination information 110b1 included in the additional information 110. Is performed, the quantized AC coefficient of the neighboring block is added to the differential quantized AC coefficient as a prediction value, similarly to the encoding side.

 このようにして、変換係数予測部113cは、量子化DC係数と、量子化AC係数とを求め、得られた量子化DC係数と、量子化AC係数とを、量子化変換係数113fとして、逆量子化部113gに出力する。 In this way, the transform coefficient prediction unit 113c obtains the quantized DC coefficient and the quantized AC coefficient, and uses the obtained quantized DC coefficient and the quantized AC coefficient as the quantized transform coefficient 113f. Output to the quantization unit 113g.

 逆量子化部113gでは、付加情報110に含まれる量子化ステップサイズ113hを用いて量子化変換係数113fを逆量子化し、DCT係数113iとして出力し、逆DCT部113jは、そのDCT係数113iを逆DCTして、復号予測誤差信号116として出力するようにする。 The inverse quantization unit 113g inversely quantizes the quantized transform coefficient 113f using the quantization step size 113h included in the additional information 110 and outputs the result as a DCT coefficient 113i, and the inverse DCT unit 113j inversely transforms the DCT coefficient 113i. DCT is performed and output as a decoded prediction error signal 116.

 従って、本実施の形態6によれば、符号化側で、ブロックを複数の領域に分けて、領域毎にAC係数データを符号化するのに用いるVLCテーブルグループを各ブロックの変換係数予測判定情報あるいは量子化ステップサイズに基づいて選択し、さらにそのVLCテーブルグループの中からVLCテーブルを選択してAC係数データ((RUN,LEVEL)データ)を符号化して、ビットストリームを送信してきた場合でも、正しく復号することができる。 Therefore, according to the sixth embodiment, on the encoding side, a block is divided into a plurality of regions, and a VLC table group used to encode AC coefficient data for each region is used as the transform coefficient prediction determination information for each block. Alternatively, even when the bit stream is selected based on the quantization step size, the VLC table is selected from the VLC table group, the AC coefficient data ((RUN, LEVEL) data) is encoded, and the bit stream is transmitted, It can be decoded correctly.

実施の形態7.
 本実施の形態7は、実施の形態6で述べた変換係数可変長復号部の別の実施の形態を示すものであり、実施の形態3で述べた変換係数可変長符号化部4cにより可変長符号化された変換係数を復号する変換係数可変長復号部について説明する。
Embodiment 7 FIG.
The seventh embodiment shows another embodiment of the transform coefficient variable length decoding unit described in the sixth embodiment. The transform coefficient variable length encoding unit 4c described in the third embodiment performs variable length coding. The transform coefficient variable length decoding unit that decodes the encoded transform coefficients will be described.

 図20は、本実施の形態7における変換係数可変長復号部107bの内部構成図である。同図において、107b13は位置情報であり、この実施の形態7の領域データ復号部107b8では、実施の形態6のようにVLCテーブル選択情報107b9(図17参照)をVLDテーブル選択部107b10へ出力するのではなく、位置情報107b13を出力するようにしたことを特徴とするものである。 FIG. 20 is an internal configuration diagram of the transform coefficient variable length decoding unit 107b according to the seventh embodiment. In the figure, reference numeral 107b13 denotes position information, and an area data decoding unit 107b8 of the seventh embodiment outputs VLC table selection information 107b9 (see FIG. 17) to a VLD table selection unit 107b10 as in the sixth embodiment. , The position information 107b13 is output.

 次に動作を説明する。なお、切替部107b1、DC係数データ復号部107b2、VLDテーブルグループ選択部107b6の動作は、実施の形態6と同様であり、VLDテーブルグループ選択部107b6の動作は、実施の形態3で述べた符号化側のVLCテーブルグループ選択部4c6と同様の処理を行えばよい。 Next, the operation will be described. The operations of the switching unit 107b1, the DC coefficient data decoding unit 107b2, and the VLD table group selection unit 107b6 are the same as those in the sixth embodiment, and the operations of the VLD table group selection unit 107b6 are the same as those described in the third embodiment. The same processing as performed by the VLC table group selection unit 4c6 on the conversion side may be performed.

 次に、VLDテーブル選択部107b10は、領域内のスキャンの位置により、(RUN,LEVEL)データを復号するために用いるVLDテーブルを選択する。領域内のスキャンの位置を示す位置情報107b13は、領域データ復号部107b8より得られる。領域データ復号部107b8では、符号化側でスキャンされた順番に(RUN,LEVEL)データを復号するので、復号された(RUN,LEVEL)データに基づき、次の復号対象の(RUN,LEVEL)データの位置を特定することができ、位置情報107b13として出力している。 Next, the VLD table selection unit 107b10 selects a VLD table used for decoding (RUN, LEVEL) data according to the position of the scan in the area. Position information 107b13 indicating the position of the scan in the area is obtained from the area data decoding unit 107b8. The region data decoding unit 107b8 decodes the (RUN, LEVEL) data in the order scanned on the encoding side, so that the next (RUN, LEVEL) data to be decoded is based on the decoded (RUN, LEVEL) data. Can be specified and output as position information 107b13.

 領域データ復号部107b8では、VLDテーブル選択部107b8で選択されたVLDテーブル107b11を用いて、(RUN,LEVEL)データを復号する。復号された(RUN,LEVEL)データに基づき、次の復号対象の(RUN,LEVEL)データのスキャン位置を特定し、位置情報107b13として、VLDテーブル選択部107b10へ出力するようにする。 The area data decoding unit 107b8 decodes (RUN, LEVEL) data using the VLD table 107b11 selected by the VLD table selection unit 107b8. Based on the decoded (RUN, LEVEL) data, the scan position of the next (RUN, LEVEL) data to be decoded is specified, and is output to the VLD table selection unit 107b10 as position information 107b13.

 従って、本実施の形態7では、ブロックを複数の領域に分けて、領域毎にAC係数データを符号化するのに用いるVLCテーブルグループを選択し、選択されたVLCテーブルグループの中から、符号化すべきAC係数データである(RUN,LEVEL)データのスキャン位置に基づいて、そのAC係数データを復号するのに用いるVLDテーブルを選択するようにしたので、実施の形態3の符号化側のように、各領域内のスキャン位置に応じてVLCテーブルを選択して符号化したAC係数データを多重化したビットストリームを送信してきた場合でも、正しく復号することができる。 Therefore, in the seventh embodiment, a block is divided into a plurality of regions, a VLC table group used for encoding AC coefficient data is selected for each region, and encoding is performed from the selected VLC table group. Since the VLD table used to decode the AC coefficient data is selected based on the scan position of the (RUN, LEVEL) data which is the AC coefficient data to be used, as in the encoding side of the third embodiment, Even if a bit stream in which the VLC table is selected according to the scan position in each area and the coded AC coefficient data is multiplexed is transmitted, the decoding can be performed correctly.

実施の形態8.
 本実施の形態8は、実施の形態6または実施の形態7で述べた変換係数可変長復号部の別の実施の形態であり、実施の形態4で述べた変換係数可変長符号化部4cにより可変長符号化された変換係数を復号する変換係数可変長復号部について説明する。
Embodiment 8 FIG.
The eighth embodiment is another embodiment of the transform coefficient variable length decoding unit described in the sixth embodiment or the seventh embodiment, and includes a transform coefficient variable length encoding unit 4c described in the fourth embodiment. A description is given of a transform coefficient variable length decoding unit that decodes transform coefficients that have been subjected to variable length coding.

 図21に本実施の形態における変換係数可変長復号部107bの内部構成図を示す。
 同図において、107b13は領域有効/無効情報符号語、107b14は領域有効/無効情報復号部、107b15は領域有効/無効情報、107b16は領域有効/無効判定部、107b17は領域データ零設定部、である。
FIG. 21 shows an internal configuration diagram of transform coefficient variable length decoding section 107b in the present embodiment.
In the figure, 107b13 is a region valid / invalid information codeword, 107b14 is a region valid / invalid information decoding unit, 107b15 is region valid / invalid information, 107b16 is a region valid / invalid determination unit, and 107b17 is a region data zero setting unit. is there.

 図21において、動作が異なるのは、領域有効/無効情報復号部107b14、領域有効/無効判定部107b16、領域データ零設定部107b17であり、その他の構成及び動作は、実施の形態7等と同じであるので、以下では、領域有効/無効情報復号部107b14、領域有効/無効判定部107b16、領域内AC係数零設定部107b17の動作を中心に説明する。 In FIG. 21, the operations are different in area valid / invalid information decoding section 107b14, area valid / invalid determination section 107b16, and area data zero setting section 107b17. Other configurations and operations are the same as those in the seventh embodiment and the like. Therefore, the following mainly describes the operations of the area valid / invalid information decoding unit 107b14, the area valid / invalid determination unit 107b16, and the in-area AC coefficient zero setting unit 107b17.

 本実施の形態8では、まず、領域有効/無効情報復号部107b14が、ブロックデータ符号語104に含まれる領域有効/無効情報符号語107b13を入力して復号し、各領域内のAC係数データが符号化されているか否かを示す領域有効/無効情報107b15として出力する。
 領域有効/無効判定部107b16では、領域有効/無効情報復号部107b14で復号された領域有効/無効情報107b15に基づき、領域内のAC係数データが符号化されているか否かを判定する。
In the eighth embodiment, first, region valid / invalid information decoding section 107b14 inputs and decodes region valid / invalid information codeword 107b13 included in block data codeword 104, and the AC coefficient data in each region is It is output as area valid / invalid information 107b15 indicating whether or not it has been encoded.
The region validity / invalidity determination unit 107b16 determines whether or not the AC coefficient data in the region is encoded based on the region validity / invalidity information 107b15 decoded by the region validity / invalidity information decoding unit 107b14.

 ここで、領域有効/無効情報107b15が領域内のAC係数データが符号化されていることを示している場合、領域有効/無効判定部107b16は、ブロックデータ符号語104に含まれるAC係数データ符号語107b4を領域データ復号部107b8に出力する。領域データ復号部107b8では、実施の形態7等の場合と同様に、VLCテーブル選択情報107b9に基づきVLDテーブル選択部107b10によって選択されたVLDテーブル107b11を用いて、領域内の(RUN,LEVEL)データを復号し、復号AC係数データ107b12として出力する。 Here, when the area valid / invalid information 107b15 indicates that the AC coefficient data in the area is coded, the area valid / invalid determination unit 107b16 outputs the AC coefficient data code included in the block data codeword 104. The word 107b4 is output to the area data decoding unit 107b8. The region data decoding unit 107b8 uses the VLD table 107b11 selected by the VLD table selection unit 107b10 based on the VLC table selection information 107b9 in the same manner as in the seventh embodiment or the like, and uses the (RUN, LEVEL) data in the region. And outputs it as decoded AC coefficient data 107b12.

 これに対し、領域有効/無効情報107b15が領域スキップ、すなわち領域内のAC係数データが符号化されていないことを示している場合、領域有効/無効判定部107b16は、領域データ零設定部107b17に指令を送り、領域データ零設定部107b17は、領域内のAC係数をすべて零に設定して、復号AC係数データ107b12として出力する。 On the other hand, when the area valid / invalid information 107b15 indicates that the area is skipped, that is, that the AC coefficient data in the area is not encoded, the area valid / invalid determination unit 107b16 sends the area data zero setting unit 107b17 The command is sent, and the area data zero setting unit 107b17 sets all the AC coefficients in the area to zero, and outputs the result as decoded AC coefficient data 107b12.

 従って、本実施の形態8では、符号化側で、符号量を少なくするため、ある領域内のAC係数データを符号化せず、それを示す領域有効/無効情報107b15を符号化ビットストリームに多重化するようにしてきた場合でも、受信した符号化ビットストリーム中の領域有効/無効情報107b15を復号すると共に、ブロック内の領域毎にAC係数データが零か否かを判定し、領域内のAC係数がすべて零を示している場合には、その領域内のAC係数データの符号化を行わないようにしたため、実施の形態4の符号化側のように、領域有効/無効情報107b15を多重化した符号化ビットストリームを送信してた場合でも、正しく復号することができる。 Therefore, in the eighth embodiment, in order to reduce the code amount on the encoding side, the AC coefficient data in a certain area is not encoded, and the area valid / invalid information 107b15 indicating the AC coefficient data is multiplexed on the encoded bit stream. In this case, the region valid / invalid information 107b15 in the received coded bit stream is decoded, and it is determined whether the AC coefficient data is zero for each region in the block. When all the coefficients indicate zero, the coding of the AC coefficient data in the area is not performed, so that the area valid / invalid information 107b15 is multiplexed as in the coding side of the fourth embodiment. Even if the coded bit stream is transmitted, it can be correctly decoded.

実施の形態9.
 本実施の形態9は、実施の形態6〜8で述べた変換係数可変長復号部の領域データ復号部の別の実施の形態を示すものであり、実施の形態5で述べた変換係数可変長符号化部4cにより可変長符号化された変換係数を復号する変換係数可変長復号部について説明する。
Embodiment 9 FIG.
The ninth embodiment shows another embodiment of the area data decoding section of the transform coefficient variable length decoding section described in the sixth to eighth embodiments, and the transform coefficient variable length decoding section described in the fifth embodiment. The transform coefficient variable length decoding unit that decodes the transform coefficient that has been subjected to the variable length coding by the coding unit 4c will be described.

 図22は、本実施の形態9における領域データ復号部107b8の内部構成図である。同図において、107b81はVLDテーブル探索部、107b82はエスケープコード、107b83は変換フラグ判定部、107b84は復号変換AC係数、107b85は変換係数逆変換部、107b86は変換係数固定長復号部、107b87は変換AC係数符号語、である。 FIG. 22 is an internal configuration diagram of the area data decoding unit 107b8 according to the ninth embodiment. In the figure, 107b81 is a VLD table search unit, 107b82 is an escape code, 107b83 is a conversion flag determination unit, 107b84 is a decoded conversion AC coefficient, 107b85 is a conversion coefficient inverse conversion unit, 107b86 is a conversion coefficient fixed length decoding unit, and 107b87 is a conversion. AC coefficient codeword.

 次に動作を説明する。
 この領域データ復号部107b8では、VLDテーブル選択部107b10(図21参照。)によって選択されたVLDテーブル107b11を用いて、領域内の(RUN,LEVEL)データを復号する。
Next, the operation will be described.
The area data decoding unit 107b8 decodes (RUN, LEVEL) data in the area using the VLD table 107b11 selected by the VLD table selection unit 107b10 (see FIG. 21).

 その際、領域データ復号部107b8では、まず、VLDテーブル探索部107b81がブロックデータ符号語104に含まれるAC係数データ符号語107b4に対応する(RUN,LEVEL)データを、VLDテーブル選択部107b10からのVLDテーブル107b11内で探索し、対応する(RUN,LEVEL)データが見つかった場合には、これを復号AC係数データ107b12として出力する。 At this time, in the area data decoding unit 107b8, first, the VLD table search unit 107b81 converts (RUN, LEVEL) data corresponding to the AC coefficient data codeword 107b4 included in the block data codeword 104 from the VLD table selection unit 107b10. When the corresponding (RUN, LEVEL) data is found in the VLD table 107b11, it is output as decoded AC coefficient data 107b12.

 これに対し、AC係数データ符号語107b4に対応する(RUN,LEVEL)が見つからず、エスケープコード107b82が検出された場合、領域データ復号部107b8のVLDテーブル探索部107b81は、エスケープコード107b82と、その後に続くAC係数データ符号語107b4とを、変換フラグ判定部107b83に出力し、変換フラグ判定部107b83では、エスケープコード107b82の後に続く変換フラグを判定する。 On the other hand, when (RUN, LEVEL) corresponding to the AC coefficient data codeword 107b4 is not found and the escape code 107b82 is detected, the VLD table search unit 107b81 of the area data decoding unit 107b8 sets the escape code 107b82 and Is output to the conversion flag determination unit 107b83, and the conversion flag determination unit 107b83 determines the conversion flag following the escape code 107b82.

 ここで、変換フラグがLEVELまたはRUNが変換されていることを示す場合、変換フラグ判定部107b83は、変換フラグの次に続く変換AC係数符号語107b87をVLDテーブル探索部107b81に戻すようにする。 Here, if the conversion flag indicates that LEVEL or RUN has been converted, the conversion flag determination unit 107b83 returns the conversion AC coefficient codeword 107b87 following the conversion flag to the VLD table search unit 107b81.

 VLDテーブル探索部107b81は、変換AC係数符号語107b87をVLDテーブル107b11により可変長復号し、復号変換AC係数107b84として、変換係数逆変換部107b85へ出力する。変換係数逆変換部107b85では、復号変換AC係数107b84に対して、実施の形態4で述べた符号化装置の変換係数変換部4c103(図14参照。)の処理とは逆の処理を施して、復号AC係数データ107b12を得るようにする。 The VLD table search unit 107b81 performs variable-length decoding on the converted AC coefficient codeword 107b87 using the VLD table 107b11, and outputs the decoded AC coefficient codeword 107b87 to the conversion coefficient inverse conversion unit 107b85 as a decoded converted AC coefficient 107b84. The transform coefficient inverse transform unit 107b85 performs a process on the decoded transform AC coefficient 107b84, which is the reverse of the process of the transform coefficient transform unit 4c103 (see FIG. 14) of the encoding apparatus described in the fourth embodiment. The decoded AC coefficient data 107b12 is obtained.

 また、変換フラグが、RUN,LEVELがそれぞれ固定長符号化されていることを示す場合、変換フラグ判定部107b83は、AC係数データ符号語107b4を変換係数固定長復号部107b86へ出力する。変換係数固定長復号部107b86は、変換フラグの次に続くRUN,LEVELの固定長符号語を固定長復号して、復号AC係数データ107b12を得る。以下同様に、領域内のすべての(RUN,LEVEL)データを復号するまで、以上の処理を繰り返すようにする。 If the conversion flag indicates that RUN and LEVEL are each fixed-length coded, the conversion flag determination unit 107b83 outputs the AC coefficient data codeword 107b4 to the conversion coefficient fixed-length decoding unit 107b86. The fixed-length transform coefficient decoding unit 107b86 performs fixed-length decoding on the fixed-length codewords of RUN and LEVEL following the conversion flag to obtain decoded AC coefficient data 107b12. Similarly, the above process is repeated until all (RUN, LEVEL) data in the area is decoded.

 そして、ブロック内のすべての領域に対して、以上の復号処理を行い、得られた復号DC係数107b3と、復号AC係数データ107b12とに基づいて、符号化側のスキャンの順とは逆の順に並べて出力することにより、復号された量子化変換係数データ109となる。この復号量子化変換係数データは109は、テクスチャ復号部113(図15参照。)へ出力される。 The above decoding process is performed on all the regions in the block, and based on the obtained decoded DC coefficient 107b3 and decoded AC coefficient data 107b12, the order of the scan on the encoding side is reversed. By arranging and outputting, the decoded quantized transform coefficient data 109 is obtained. The decoded quantized transform coefficient data 109 is output to the texture decoding unit 113 (see FIG. 15).

 なお、実施の形態6で述べたように、(RUN,LEVEL)データと次に続く(RUN,LEVEL)データを符号化するのに用いたVLCテーブル選択情報107b9(NEXT)を組にした(NEXT,RUN,LEVEL)データを復号する場合も基本的な動作は同じである。 As described in the sixth embodiment, (RUN, LEVEL) data and VLC table selection information 107b9 (NEXT) used to encode the following (RUN, LEVEL) data are grouped as (NEXT). , RUN, LEVEL) data is decrypted in the same basic manner.

 従って、本実施の形態9では、符号化側で、領域毎に選択されたVLCテーブルを用いて領域内のAC係数データを可変長符号化する際に、VLCテーブル内に符号化すべきAC係数データに対応する符号語が存在しない場合、そのAC係数データを変換して再びVLCテーブルにより符号化したAC係数データを含むビットストリームに多重化するようにしてきた場合でも、変換フラグ判定部107b83によりそのような符号化側のAC係数データを変換を判定して、領域データ復号部107b8では符号化側と逆の処理を行うようにしたため、実施の形態5の符号化側のように、エスケープコードによりAC係数データを変換して多重化した符号化ビットストリームを送信してた場合でも、正しく復号することができる。 Therefore, in the ninth embodiment, when the coding side performs variable length coding of AC coefficient data in a region using a VLC table selected for each region, the AC coefficient data to be coded in the VLC table is used. If there is no code word corresponding to, even if the AC coefficient data is converted and multiplexed again into a bit stream including the AC coefficient data encoded by the VLC table, the conversion flag determination unit 107b83 performs the conversion. Since the conversion of the AC coefficient data on the encoding side is determined and the processing reverse to that on the encoding side is performed in the area data decoding unit 107b8, an escape code is used as in the encoding side of the fifth embodiment. Even when an encoded bit stream obtained by converting and multiplexing the AC coefficient data is transmitted, it can be correctly decoded.

この発明の実施の形態1による動画像符号化装置の構成を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration of a video encoding device according to Embodiment 1 of the present invention. この発明の実施の形態1による可変長符号化部の内部構成を示すブロック図である。FIG. 3 is a block diagram showing an internal configuration of a variable length coding unit according to Embodiment 1 of the present invention. この発明の実施の形態1によるテクスチャ符号化部の内部構成を示すブロック図である。FIG. 2 is a block diagram showing an internal configuration of a texture encoding unit according to Embodiment 1 of the present invention. この発明の実施の形態1による変数係数予測の説明図である。FIG. 3 is an explanatory diagram of variable coefficient prediction according to the first embodiment of the present invention. この発明の実施の形態1による変換係数可変長符号化部4cの内部構成を示すブロック図である。FIG. 3 is a block diagram showing an internal configuration of a transform coefficient variable length coding unit 4c according to Embodiment 1 of the present invention. この発明の実施の形態1による変換係数可変長符号化部4cの動作の様子を示すフローチャートである。5 is a flowchart showing the operation of the transform coefficient variable length coding unit 4c according to Embodiment 1 of the present invention. この発明の実施の形態1によるAC係数データを符号化する単位となる領域を説明する図である。FIG. 4 is a diagram for explaining an area serving as a unit for encoding AC coefficient data according to the first embodiment of the present invention. この発明の実施の形態1によるVLCテーブルグループを説明する図である。FIG. 4 is a diagram illustrating a VLC table group according to Embodiment 1 of the present invention. この発明の実施の形態2による変換係数可変長符号化部4cの内部構成を示すブロック図である。FIG. 13 is a block diagram showing an internal configuration of a transform coefficient variable length coding unit 4c according to Embodiment 2 of the present invention. この発明の実施の形態3による変換係数可変長符号化部4cの内部構成を示すブロック図である。FIG. 13 is a block diagram showing an internal configuration of a transform coefficient variable length coding unit 4c according to Embodiment 3 of the present invention. この発明の実施の形態4による変換係数可変長符号化部4cの内部構成を示すブロック図である。FIG. 13 is a block diagram showing an internal configuration of a transform coefficient variable length coding unit 4c according to Embodiment 4 of the present invention. 従来のMPEG-4におけるマクロブロックデータ構造を説明する図である。FIG. 9 is a diagram illustrating a macroblock data structure in conventional MPEG-4. この発明の実施の形態4におけるマクロブロックデータ構造を説明する図である。FIG. 14 is a diagram illustrating a macroblock data structure according to a fourth embodiment of the present invention. この発明の実施の形態5による領域データ符号化部の内部構成を示すブロック図である。FIG. 15 is a block diagram showing an internal configuration of an area data encoding unit according to Embodiment 5 of the present invention. この発明の実施の形態6による動画像復号装置の構成を示すブロック図である。FIG. 15 is a block diagram showing a configuration of a video decoding device according to Embodiment 6 of the present invention. この発明の実施の形態6による可変長復号部の内部構成を示すブロック図である。FIG. 21 is a block diagram showing an internal configuration of a variable length decoding unit according to Embodiment 6 of the present invention. この発明の実施の形態6による変換係数可変長復号部の内部構成を示すブロック図である。FIG. 21 is a block diagram showing an internal configuration of a transform coefficient variable length decoding unit according to Embodiment 6 of the present invention. この発明の実施の形態6による変換係数可変長復号部の動作の様子を示すフローチャートである。15 is a flowchart showing an operation of a transform coefficient variable length decoding unit according to Embodiment 6 of the present invention. この発明の実施の形態6によるテクスチャ復号部の内部構成を示すブロック図である。FIG. 21 is a block diagram showing an internal configuration of a texture decoding unit according to Embodiment 6 of the present invention. この発明の実施の形態7による変換係数可変長復号部の内部構成を示すブロック図である。FIG. 21 is a block diagram showing an internal configuration of a transform coefficient variable length decoding unit according to Embodiment 7 of the present invention. この発明の実施の形態8による変換係数可変長復号部の内部構成を示すブロック図である。FIG. 21 is a block diagram showing an internal configuration of a transform coefficient variable length decoding unit according to Embodiment 8 of the present invention. この発明の実施の形態9による領域データ復号部の内部構成を示すブロック図である。FIG. 39 is a block diagram showing an internal configuration of an area data decoding unit according to Embodiment 9 of the present invention.

符号の説明Explanation of reference numerals

1 入力形状データ、2 形状符号化部、3 形状符号化データ、4 可変長符号化部、5 多重化部、6 局所復号形状データ、7 入力テクスチャデータ、8 イントラ/インター判定部、9 モード指示フラグ、10 動き検出部、11 動きベクトル、12 動き補償部、13 予測画像信号、14 予測誤差信号、15 被符号化画像信号、16 テクスチャ符号化部、17 量子化変換係数データ、18 テクスチャ局所復号部、19 局所復号予測誤差信号、20 局所復号画像信号、21 切替部、22 参照画像信号、23 メモリ、24 形状データ符号語、25 付加情報符号語、26 ブロックデータ符号語、27 動きベクトル符号語、28 符号化ビットストリーム、29 形状データ可変長符号化部、30 付加情報可変長符号化部4c 変換係数可変長符号化部442 動きベクトル可変長符号化部、16a ブロックデータ抽出部、16b ブロックデータ、16c DCT部、16d DCT係数、16e 量子化部、16f 量子化変換係数、16g 変換係数予測部、42 変換係数予測判定情報、43 切替部、44 DC係数データ符号化部、45 AC係数データ、4c5 DC係数符号語、4c6 VLCテーブルグループ選択部、4c7 VLCテーブルグループ情報、4c8 VLCテーブル選択部、4c9 VLCテーブル選択情報107b9、4c10 領域データ符号化部、4c11 AC係数符号語、26 ブロックデータ符号語、54 量子化ステップサイズ、55 符号化条件、4c12 領域データ有効/無効判定部、4c13 領域有効/無効情報、4c14 領域有効/無効情報符号化部、4c15 領域有効/無効情報符号語、60 VLCテーブル探索部、4c102 エスケープコード、4c103 変換係数変換部、4c104 変換AC係数データ、4c105 変換フラグ、4c106 変換係数固定長復号部、101 符号化ビットストリーム、102 シンタックス解析部、103 形状データ符号語、104 ブロックデータ符号語、105 付加情報符号語、106 動きベクトル符号語、107 可変長復号部、108 形状符号化データ、109 量子化変換係数データ、110 付加情報、111 動きベクトル、112 形状復号部、113 テクスチャ復号部、114 動き補償部、115 復号形状データ、116 復号予測誤差信号、117 メモリ、118 参照画像、119 被復号マクロブロック画面内位置情報、120 予測画像、121 復号加算部、122 復号画像、123 切替部、110a モード指示フラグ、107a 形状データ可変長復号部、107b 変換係数可変長復号部、107c 付加情報可変長復号部、107d 動きベクトル可変長復号部、107b1 切替部、107b2 DC係数データ復号部、107b3 復号DC係数、107b4 AC係数データ符号語、110b 符号化条件、107b6 VLDテーブルグループ選択部、107b7 VLDテーブルグループ情報、107b8 領域データ復号部、107b9 VLCテーブル選択情報107b9、107b10 VLDテーブル選択部、107b11 VLDテーブル、107b12 領域データ復号部、107b12 復号AC係数、113a 切替部、110b1 変換係数予測判定情報、113c 変換係数予測部、113d 差分量子化変換係数、113e 隣接ブロック量子化変換係数、113f 量子化変換係数、113g 逆量子化部、113h 量子化ステップ、113i DCT係数、113j 逆DCT部、107b13 位置情報、107b 領域有効/無効情報符号語、107b14 領域有効/無効情報復号部、107b15 領域有効/無効情報、107b16 領域有効/無効判定部、107b17 領域データ零設定部、107b81 VLDテーブル探索部、107b82 エスケープコード、107b83 変換フラグ判定部、107b84 復号変換AC係数、107b85 変換係数逆変換部、107b86 変換係数固定長復号部、107b87 変換AC係数符号語。 1 input shape data, 2 shape coding unit, 3 shape coding data, 4 variable length coding unit, 5 multiplexing unit, 6 local decoded shape data, 7 input texture data, 8 intra / inter determination unit, 9 mode indication Flag, 10 motion detector, 11 motion vector, 12 motion compensator, 13 predicted image signal, 14 prediction error signal, 15 encoded image signal, 16 texture encoding unit, 17 quantized transform coefficient data, 18 texture local decoding Unit, 19 local decoding prediction error signal, 20 local decoding image signal, 21 switching unit, 22 reference image signal, 23 memory, 24 shape data codeword, 25 additional information codeword, 26 block data codeword, 27 motion vector codeword , 28 coded bit stream, 29 shape data variable length coding unit, 30 Additional information variable length coding section 4c {transform coefficient variable length coding section 442} motion vector variable length coding section, 16a block data extraction section, 16b block data, 16c DCT section, 16d DCT coefficient, 16e quantization section, 16f quantization Transform coefficient, 16g transform coefficient predictor, 42 transform coefficient prediction determination information, 43 switcher, 44 DC coefficient data encoder, 45 AC coefficient data, 4c5 DC coefficient codeword, 4c6 VLC table group selector, 4c7 VLC table group Information, 4c8 @ VLC table selection unit, 4c9 @ VLC table selection information 107b9, 4c10} area data encoding unit, 4c11 {AC coefficient codeword, 26} block data codeword, 54 {quantization step size, 55} encoding condition, 4c12} area data valid / Nothing Judgment unit, 4c13 area valid / invalid information, 4c14 area valid / invalid information coding unit, 4c15 area valid / invalid information codeword, 60 VLC table search unit, 4c102 escape code, 4c103 conversion coefficient conversion unit, 4c104 conversion AC coefficient data 4c106 conversion flag, 4c106 conversion coefficient fixed-length decoding unit, 101 encoded bit stream, 102 syntax analysis unit, 103 shape data codeword, 104 block data codeword, 105 additional information codeword, 106 motion vector codeword, 107 Variable length decoding unit, 108 {shape encoded data, 109} quantized transform coefficient data, 110} additional information, 111 # motion vector, 112 # shape decoding unit, 113 # texture decoding unit, 114 # motion compensation unit, 115 # decoded shape data, 1 16} decoded prediction error signal, 117 memory, 118 reference image, 119 decoded macroblock screen position information, 120 predicted image, 121 decoded addition unit, 122 decoded image, 123 switching unit, 110a mode instruction flag, 107a shape data variable length Decoding section, 107b {transform coefficient variable length decoding section, 107c} additional information variable length decoding section, 107d {motion vector variable length decoding section, 107b1} switching section, 107b2 {DC coefficient data decoding section, 107b3} decoded DC coefficient, 107b4 {AC coefficient data codeword, 110b encoding condition, 107b6 VLD table group selection unit, 107b7 VLD table group information, 107b8 region data decoding unit, 107b9 VLC table selection information 107b9, 107b10 VLD table selection unit, 07b11 {VLD table, 107b12} area data decoding unit, 107b12 {decoding AC coefficient, 113a} switching unit, 110b1} conversion coefficient prediction determination information, 113c} conversion coefficient prediction unit, 113d {difference quantization conversion coefficient, 113e} adjacent block quantization conversion coefficient, 113f} quantization Transform coefficient, 113g {inverse quantization unit, 113h} quantization step, 113i {DCT coefficient, 113j} inverse DCT unit, 107b13} position information, 107b {region valid / invalid information codeword, 107b14} region valid / invalid information decoding unit, 107b15} region valid / invalid Information, 107b16 {area valid / invalidity determination section, 107b17} area data zero setting section, 107b81 {VLD table search section, 107b82} escape code, 107b83} conversion flag determination section, 107b 4 decoded transform AC coefficients, 107B85 transform coefficient inverse transform unit, 107B86 transform coefficient fixed length decoder, 107B87 converts AC coefficient codewords.

Claims (18)

入力画像信号をブロック単位で変換および量子化して量子化変換係数を生成し、該量子化変換係数を前記ブロック内の所定領域毎に可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化装置において、
 予めグループ分けされた複数の可変長符号化テーブル群と、
 前記複数の可変長符号化テーブル群のうちから1つの可変長符号化テーブルグループを選択する可変長符号化テーブルグループ選択手段と、
 前記選択されたグループの可変長符号化テーブルを使用して前記量子化変換係数を可変長符号化し、前記選択されたグループの可変長符号化テーブルを示す情報を含む符号化ビットストリームを生成する符号化ビットストリーム生成手段と、
 を備えたことを特徴とする動画像符号化装置。
An input image signal is transformed and quantized in units of blocks to generate quantized transform coefficients, and the quantized transform coefficients are variable-length coded by a variable-length coding table for each predetermined area in the block to form a coded bit stream. In the moving picture encoding device to generate,
A plurality of variable-length coding tables that are grouped in advance;
A variable-length coding table group selecting unit that selects one variable-length coding table group from the plurality of variable-length coding table groups;
A code for performing variable length coding on the quantized transform coefficients using the variable length coding table of the selected group, and generating a coded bit stream including information indicating the variable length coding table of the selected group. Bit stream generation means;
A moving picture coding apparatus comprising:
複数の可変長符号化テーブル群は、量子化の際の符号化条件に基づいて予めグループ分けされたものであり、
 可変長符号化テーブルグループ選択手段は、量子化の際の符号化条件に基づいて可変長符号化テーブルグループを選択することを特徴とする請求項1記載の動画像符号化装置。
The plurality of variable length encoding table groups are grouped in advance based on encoding conditions at the time of quantization,
2. The moving picture coding apparatus according to claim 1, wherein the variable length coding table group selecting means selects a variable length coding table group based on a coding condition at the time of quantization.
可変長符号化テーブル群は、ブロック間で量子化変換係数の差分を算出する変換係数予測の有無に基づいてグループ分けされた複数の可変長符号化テーブルからなり、
 可変長符号化テーブルグループ選択手段は、前記変換係数予測の有無に基づいて前記複数の可変長符号化テーブル群のうちから対応する可変長符号化テーブルグループを選択し、
 符号化ビットストリーム生成手段は、選択されたグループの可変長符号化テーブルを示す情報として前記変換係数予測の有無を示す情報を含む符号化ビットストリームを生成することを特徴とする請求項1記載の動画像符号化装置。
The variable-length coding table group includes a plurality of variable-length coding tables grouped based on the presence or absence of a transform coefficient prediction for calculating a difference between quantized transform coefficients between blocks.
The variable-length coding table group selecting means selects a corresponding variable-length coding table group from the plurality of variable-length coding table groups based on the presence or absence of the transform coefficient prediction,
2. The coded bit stream generating unit generates a coded bit stream including information indicating the presence or absence of the transform coefficient prediction as information indicating a variable length coding table of a selected group. Video encoding device.
可変長符号化テーブル群は、量子化ステップサイズに応じてグループ分けされた複数の可変長符号化テーブルからなり、
 可変長符号化テーブルグループ選択手段は、前記量子化ステップサイズに基づいて前記複数の可変長符号化テーブル群のうちから対応する可変長符号化テーブルグループを選択し、
 符号化ビットストリーム生成手段は、選択されたグループの可変長符号化テーブルを示す情報として前記量子化ステップサイズの情報を含む符号化ビットストリームを生成することを特徴とする請求項1記載の動画像符号化装置。
The variable length coding table group includes a plurality of variable length coding tables grouped according to the quantization step size,
The variable length coding table group selecting means selects a corresponding variable length coding table group from the plurality of variable length coding table groups based on the quantization step size,
2. The moving picture according to claim 1, wherein the coded bit stream generating means generates a coded bit stream including information on the quantization step size as information indicating a variable length coding table of the selected group. Encoding device.
さらに、可変長符号化テーブルグループ選択手段によって選択された可変長符号化テーブルグループのうちから、前記量子化変換係数の領域内での位置に基づいて可変長符号化テーブルを切替える可変長符号化テーブル切替手段を有することを特徴とする請求項1〜4記載の動画像符号化装置。 A variable-length encoding table for switching the variable-length encoding table from the variable-length encoding table group selected by the variable-length encoding table group selecting means based on the position of the quantized transform coefficient in the area; 5. The moving picture coding apparatus according to claim 1, further comprising a switching unit. さらに、前記量子化変換係数を可変長符号化する際、各領域内の量子化変換係数がすべて零である場合を無効領域、領域内に零ではない係数がある場合を有効領域と判断する領域データ有効/無効判定手段を有し、
 符号化ビットストリーム生成手段は、前記領域データ有効/無効判定手段によって有効領域と判定された場合には、選択した可変長符号化テーブルにより領域内の量子化変換係数を符号化してその際に使用した可変長符号化テーブルを示す情報を含む符号化ビットストリームを生成する一方、無効領域であると判定された場合には、その領域が無効であることを示す情報を含む符号化ビットストリームを生成することを特徴とする請求項1〜5いずれかに記載の動画像符号化装置。
Further, when the quantized transform coefficients are subjected to variable-length coding, a case where all the quantized transform coefficients in each region are zero is an invalid region, and a case where a non-zero coefficient is present in the region is an effective region. Data valid / invalid determining means,
When the area data validity / invalidity determination means determines that the area is an effective area, the coded bit stream generation means encodes the quantized transform coefficient in the area using the selected variable-length coding table and uses it. While generating an encoded bit stream including information indicating the variable-length coding table that has been generated, if it is determined to be an invalid area, generating an encoded bit stream including information indicating that the area is invalid The moving picture coding apparatus according to any one of claims 1 to 5, wherein:
符号化ビットストリーム生成手段は、量子化変換係数を可変長符号化する際、対応する符号語が可変長符号化テーブルに無い場合には、当該対応する符号語のない量子化変換係数を所定の方法により可変長符号化テーブルに含まれる値になるように変換すると共に、その変換後の量子化変換係数を前記可変長テーブルにより可変長符号化して、前記変換方法を示す情報を含む符号化ビットストリームを生成することを特徴とする請求項1〜6のいずれかに記載の動画像符号化装置。 When performing variable-length encoding on the quantized transform coefficient, if the corresponding codeword is not included in the variable-length encoding table, the encoded bitstream generating unit converts the quantized transform coefficient without the corresponding codeword into a predetermined codeword. A method for converting to a value included in the variable-length coding table according to the method, and performing variable-length coding on the quantized conversion coefficient after the conversion using the variable-length table, and coding bits including information indicating the conversion method. The moving picture coding apparatus according to claim 1, wherein the moving picture coding apparatus generates a stream. 符号化ビットストリームを入力してその符号化ビットストリームに含まれているブロック毎に可変長符号化された符号化データを可変長復号して量子化変換係数を復元し、該量子化変換係数を逆量子化、逆変換して画像信号を復号する動画像復号装置において、
 グループ分けされた複数の可変長復号テーブル群と、
 前記符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報を復号し、前記可変長復号テーブル群の中から該可変長符号化テーブルグループ情報に基づいて可変長復号テーブルグループを選択する可変長復号テーブルグループ選択手段と、
 前記選択されたグループの可変長復号テーブルを使用して前記符号化データを可変長復号して前記量子化変換係数を復元する量子化変換係数復元手段と、
 を備えたことを特徴とする動画像復号装置。
An encoded bit stream is input, and variable-length encoded data that is variable-length encoded for each block included in the encoded bit stream is variable-length decoded to restore a quantized transform coefficient. In a video decoding device that decodes an image signal by performing inverse quantization and inverse transformation,
A plurality of variable-length decoding tables grouped into groups,
Decoding information indicating a variable length coding table group used on the coding side from the coded bit stream, and selecting a variable length decoding table group from the variable length decoding table group based on the variable length coding table group information. Variable length decoding table group selecting means for selecting
Quantized transform coefficient restoring means for restoring the quantized transform coefficient by performing variable length decoding of the encoded data using the variable length decoding table of the selected group,
A video decoding device comprising:
複数の可変長復号テーブル群は、量子化の際の符号化条件に基づいて予めグループ分けされたものであり、
 可変長復号テーブルグループ選択手段は、符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報として、量子化の際の符号化条件を示す情報を復号し、この量子化の際の符号化条件に基づいて可変長復号テーブルグループを選択することを特徴とする請求項8記載の動画像復号化装置。
The plurality of variable length decoding table groups are grouped in advance based on encoding conditions at the time of quantization,
The variable length decoding table group selecting means decodes information indicating an encoding condition at the time of quantization as information indicating the variable length encoding table group used on the encoding side from the encoded bit stream, and 9. The moving picture decoding apparatus according to claim 8, wherein a variable length decoding table group is selected based on encoding conditions at that time.
前記可変長復号テーブル群は、ブロック間で量子化変換係数の差分を算出する変換係数予測の有無に基づいてグループ分けされた複数の可変長復号テーブルからなり、
 前記可変長復号テーブルグループ選択手段は、符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報として、量子化変換係数予測の有無を示す情報を復号し、その量子化変換係数予測の有無を示す情報に基づいて、可変長復号テーブルグループを選択することを特徴とする請求項8記載の動画像復号装置。
The variable-length decoding table group includes a plurality of variable-length decoding tables grouped based on the presence or absence of a transform coefficient prediction for calculating a difference between quantized transform coefficients between blocks,
The variable length decoding table group selecting means decodes information indicating presence / absence of quantization transform coefficient prediction from the coded bit stream as information indicating a variable length coding table group used on the encoding side, and performs quantization conversion. 9. The moving picture decoding apparatus according to claim 8, wherein a variable length decoding table group is selected based on information indicating presence / absence of coefficient prediction.
前記可変長復号テーブル群は、量子化ステップサイズに基づいてグループ分けされた複数の可変長復号テーブルからなり、
 前記可変長復号テーブルグループ選択手段は、符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報として、量子化ステップサイズを復号し、復号した量子化ステップサイズに基づいて、可変長復号テーブルグループを選択することを特徴とする請求項8記載の動画像復号装置。
The variable length decoding table group includes a plurality of variable length decoding tables grouped based on a quantization step size,
The variable length decoding table group selecting means decodes the quantization step size as information indicating the variable length coding table group used on the encoding side from the encoded bit stream, based on the decoded quantization step size, 9. The moving picture decoding device according to claim 8, wherein a variable length decoding table group is selected.
前記量子化変換係数復元手段は、前記可変長復号テーブルグループ選択手段で選択された可変長復号テーブルグループ内の複数の可変長復号テーブルを切り替えて量子化変換係数を復号する際に、前記量子化変換係数の領域内での位置に基づいて可変長復号テーブルを切り替える可変長復号テーブル選択手段を、
を有することを特徴とする請求項8〜11のいずれかに記載の動画像復号装置。
The quantized transform coefficient restoring unit is configured to switch the plurality of variable length decoding tables in the variable length decoding table group selected by the variable length decoding table group selecting unit to decode the quantized transform coefficient, A variable length decoding table selecting means for switching the variable length decoding table based on the position of the transform coefficient in the area,
The moving picture decoding apparatus according to any one of claims 8 to 11, further comprising:
量子化変換係数復元手段は、領域内の量子化変換係数がすべて零である場合には、領域が無効であることを示し、零ではない量子化変換係数が一つ以上ある場合には、領域内の各量子化変換係数を復号するために用いる可変長復号テーブルを示す可変長符号化テーブル選択情報を復号し、復号した可変長符号化テーブル選択情報に基づいて、領域が無効であるかを判断する判断手段と、
 前記判断手段によって領域が無効であると判断された場合には、その領域内の量子化変換係数をすべて零に設定する量子化変換係数零設定手段と、
 を有することを特徴とする請求項8〜12いずれかに記載の動画像復号装置。
The quantized transform coefficient restoring means indicates that the region is invalid when the quantized transform coefficients in the region are all zero, and indicates that the region is invalid when there is one or more non-zero quantized transform coefficients. Decodes variable-length coding table selection information indicating a variable-length decoding table used to decode each quantized transform coefficient in, and determines whether the area is invalid based on the decoded variable-length coding table selection information. Determining means for determining;
When the region is determined to be invalid by the determination unit, a quantization conversion coefficient zero setting unit that sets all quantization conversion coefficients in the region to zero,
The moving picture decoding apparatus according to any one of claims 8 to 12, further comprising:
符号化ビットストリームから符号化側において量子化変換係数を所定の方法により変換したことを示す情報を復号したか否かを判断する判断手段と、
 前記判断手段によって前記変換したことを情報を復号したと判断された場合は、前記量子化変換係数の復元の際、前記可変長復号テーブルにより復号し、その後、前記所定の方法の変換とは逆の処理を行って前記変換前の量子化変換係数に復元する手段と、
 を有することを特徴とする請求項8〜13のいずれかに記載の動画像復号装置。
Judgment means for judging whether or not information indicating that the quantized transform coefficient has been converted by the predetermined method on the encoding side from the encoded bit stream has been decoded,
When it is determined by the determining means that the information is decoded, the information is decoded by the variable-length decoding table when the quantized transform coefficients are restored, and thereafter, the inverse of the conversion of the predetermined method is performed. Means for performing a process of restoring to the quantized transform coefficient before the conversion,
The moving picture decoding apparatus according to any one of claims 8 to 13, further comprising:
入力画像信号をブロック単位で変換および量子化して量子化変換係数を作成し、該量子化変換係数を前記ブロック内の所定領域毎に定められた可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化方法において、
 グループ分けされた複数の可変長符号化テーブル群の中から、可変長符号化テーブルグループを選択し、その選択したグループの可変長符号化テーブルを使用して、前記量子化変換係数を可変長符号化し、選択された可変長符号化テーブルを示す情報を含む符号化ビットストリームを生成することを特徴とする動画像符号化方法。
The input image signal is transformed and quantized in units of blocks to generate quantized transform coefficients, and the quantized transform coefficients are coded by variable-length coding according to a variable-length coding table defined for each predetermined area in the block. In a moving picture coding method for generating a bit stream,
A variable-length coding table group is selected from a plurality of grouped variable-length coding tables, and the quantized transform coefficients are converted into variable-length codes using the variable-length coding tables of the selected group. And generating a coded bit stream including information indicating the selected variable-length coding table.
グループ分けされた複数の可変長符号化テーブル群の中から、可変長符号化テーブルグループを選択する際、量子化の際の符号化条件に基づいて選択すると共に、選択された可変長符号化テーブルを示す情報として前記量子化の際の符号化条件の情報を含む符号化ビットストリームを生成することを特徴とする請求項15記載の動画像符号化方法。 When selecting a variable-length encoding table group from a plurality of grouped variable-length encoding tables, the variable-length encoding table is selected based on encoding conditions at the time of quantization, and the selected variable-length encoding table is selected. 16. The moving image encoding method according to claim 15, wherein an encoded bit stream including information on encoding conditions at the time of quantization is generated as information indicating. 符号化ビットストリームを入力してその符号化ビットストリームに含まれているブロック毎に可変長符号化された符号化データを可変長復号して量子化変換係数を復元し、該量子化変換係数を逆量子化、逆変換して画像信号を復号する動画像復号方法において、
 前記量子化変換係数の復元の際、前記符号化ビットストリームから符号化側で用いた可変長符号化テーブルグループを示す情報を復号し、グループ分けされた複数の可変長復号テーブル群の中から前記可変長符号化テーブルグループ情報に基づいて可変長復号テーブルグループを選択し、その選択したグループの可変長復号テーブルを使用して前記符号化データを可変長復号して前記量子化変換係数を復元することを特徴とする動画像復号方法。
An encoded bit stream is input, and variable-length encoded data that is variable-length encoded for each block included in the encoded bit stream is variable-length decoded to restore a quantized transform coefficient. In a video decoding method for decoding an image signal by inverse quantization and inverse transform,
Upon restoration of the quantized transform coefficients, decodes information indicating the variable length coding table group used on the coding side from the coded bit stream, and from among a plurality of grouped variable length decoding tables, A variable length decoding table group is selected based on the variable length coding table group information, and the coded data is variable length decoded using the variable length decoding table of the selected group to restore the quantized transform coefficient. A moving picture decoding method characterized by the above-mentioned.
量子化変換係数の復元の際、符号化側で用いた可変長符号化テーブルグループを示す情報として、前記符号化ビットストリームから量子化の際の符号化条件の情報を復号し、その量子化の際の符号化条件の情報に基づいて可変長復号テーブルグループを選択することを特徴とする請求項17記載の動画像復号方法。 At the time of restoration of the quantized transform coefficient, as information indicating the variable length coding table group used on the encoding side, decoding of information on encoding conditions at the time of quantization from the encoded bit stream, 18. The moving picture decoding method according to claim 17, wherein a variable length decoding table group is selected based on information on encoding conditions at that time.
JP2003276576A 2003-07-18 2003-07-18 Moving picture decoding apparatus and moving picture decoding method Expired - Lifetime JP4388771B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003276576A JP4388771B2 (en) 2003-07-18 2003-07-18 Moving picture decoding apparatus and moving picture decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003276576A JP4388771B2 (en) 2003-07-18 2003-07-18 Moving picture decoding apparatus and moving picture decoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP17550398A Division JP2000013794A (en) 1998-06-23 1998-06-23 Device and method for encoding and decoding moving image

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2006189077A Division JP2006333500A (en) 2006-07-10 2006-07-10 Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, and moving image decoding method

Publications (2)

Publication Number Publication Date
JP2004007788A true JP2004007788A (en) 2004-01-08
JP4388771B2 JP4388771B2 (en) 2009-12-24

Family

ID=30438646

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003276576A Expired - Lifetime JP4388771B2 (en) 2003-07-18 2003-07-18 Moving picture decoding apparatus and moving picture decoding method

Country Status (1)

Country Link
JP (1) JP4388771B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009520382A (en) * 2005-10-05 2009-05-21 エルジー エレクトロニクス インコーポレイティド Signal processing method and apparatus, encoding and decoding method, and apparatus therefor
JP2009524076A (en) * 2005-10-05 2009-06-25 エルジー エレクトロニクス インコーポレイティド Data processing method and apparatus, encoding and decoding method, and apparatus therefor
US7865369B2 (en) 2006-01-13 2011-01-04 Lg Electronics Inc. Method and apparatus for signal processing and encoding and decoding method, and apparatus therefor
JP2013153525A (en) * 2006-05-05 2013-08-08 Microsoft Corp Flexible quantization
US8767822B2 (en) 2006-04-07 2014-07-01 Microsoft Corporation Quantization adjustment based on texture level
US8897359B2 (en) 2008-06-03 2014-11-25 Microsoft Corporation Adaptive quantization for enhancement layer video coding

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4661973B2 (en) * 2009-07-30 2011-03-30 三菱電機株式会社 Moving picture encoding apparatus and moving picture decoding apparatus
JP4661992B2 (en) * 2010-10-14 2011-03-30 三菱電機株式会社 Moving picture encoding apparatus and moving picture decoding apparatus

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009520382A (en) * 2005-10-05 2009-05-21 エルジー エレクトロニクス インコーポレイティド Signal processing method and apparatus, encoding and decoding method, and apparatus therefor
JP2009524076A (en) * 2005-10-05 2009-06-25 エルジー エレクトロニクス インコーポレイティド Data processing method and apparatus, encoding and decoding method, and apparatus therefor
JP2009524837A (en) * 2005-10-05 2009-07-02 エルジー エレクトロニクス インコーポレイティド Signal processing method and apparatus, encoding and decoding method, and apparatus therefor
US8068569B2 (en) 2005-10-05 2011-11-29 Lg Electronics, Inc. Method and apparatus for signal processing and encoding and decoding
US7865369B2 (en) 2006-01-13 2011-01-04 Lg Electronics Inc. Method and apparatus for signal processing and encoding and decoding method, and apparatus therefor
US8767822B2 (en) 2006-04-07 2014-07-01 Microsoft Corporation Quantization adjustment based on texture level
JP2013153525A (en) * 2006-05-05 2013-08-08 Microsoft Corp Flexible quantization
US9967561B2 (en) 2006-05-05 2018-05-08 Microsoft Technology Licensing, Llc Flexible quantization
US8897359B2 (en) 2008-06-03 2014-11-25 Microsoft Corporation Adaptive quantization for enhancement layer video coding
US9185418B2 (en) 2008-06-03 2015-11-10 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding
US9571840B2 (en) 2008-06-03 2017-02-14 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding
US10306227B2 (en) 2008-06-03 2019-05-28 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding

Also Published As

Publication number Publication date
JP4388771B2 (en) 2009-12-24

Similar Documents

Publication Publication Date Title
JP5021083B2 (en) Bitstream generation method
KR100487988B1 (en) Coded bit stream converting apparatus
US20030108099A1 (en) Picture encoding method and apparatus, picture decoding method and apparatus and furnishing medium
US20040136457A1 (en) Method and system for supercompression of compressed digital video
US20040028129A1 (en) Picture encoding method and apparatus, picture decoding method and apparatus and furnishing medium
KR20040098631A (en) Adaptive universal variable length codeword coding for digital video content
JP2000013794A (en) Device and method for encoding and decoding moving image
JP4388771B2 (en) Moving picture decoding apparatus and moving picture decoding method
JP2006333500A (en) Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, and moving image decoding method
JP4661973B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
JP4661992B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
JP3910594B2 (en) Image encoding device
JP4350796B2 (en) Image coding apparatus and bit stream generation apparatus
JP3993213B2 (en) Image decoding device
JP3993212B2 (en) Image decoding device
JP4260195B2 (en) Image decoding device
JP4260194B2 (en) Image decoding device
JP4260193B2 (en) Image decoding device
JP4350761B2 (en) Image decoding device
JP4260192B2 (en) Image decoding device
JP4350759B2 (en) Image decoding device
JP4260191B2 (en) Image decoding device
JP4350760B2 (en) Image decoding device
KR20000004637A (en) Method of encoding/decoding a digital gray shape/color information
MXPA00003861A (en) Image decoder, image encoder, image communication system, and encoded bit stream converter

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060509

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060710

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060926

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061122

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20061211

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20061228

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090828

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091005

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

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131009

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term