JP4661973B2 - Moving picture encoding apparatus and moving picture decoding apparatus - Google Patents

Moving picture encoding apparatus and moving picture decoding apparatus Download PDF

Info

Publication number
JP4661973B2
JP4661973B2 JP2009177674A JP2009177674A JP4661973B2 JP 4661973 B2 JP4661973 B2 JP 4661973B2 JP 2009177674 A JP2009177674 A JP 2009177674A JP 2009177674 A JP2009177674 A JP 2009177674A JP 4661973 B2 JP4661973 B2 JP 4661973B2
Authority
JP
Japan
Prior art keywords
data
unit
coefficient
variable length
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009177674A
Other languages
Japanese (ja)
Other versions
JP2009296622A (en
Inventor
芳美 井須
俊一 関口
光太郎 浅井
博文 西川
慎一 黒田
由里 長谷川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2009177674A priority Critical patent/JP4661973B2/en
Publication of JP2009296622A publication Critical patent/JP2009296622A/en
Application granted granted Critical
Publication of JP4661973B2 publication Critical patent/JP4661973B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

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

従来、画像信号を効率的に符号化する手段として、例えば、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 to efficiently encode image signals, for example, refer to MPEG-4 (Moving Picture Experts Group Phase-4) video encoding, which is being standardized by ISO / IEC JTC11 / SC29 / WG111. Discrete cosine transform (DCT) for each block and quantization obtained after quantization as adopted in the method (Verification Model 8.0, hereinafter VM8.0, ISO / IEC JTC11 / SC29 / WG11 / N1796) A method of variable-length encoding the transform coefficient has been used.
In MPEG-4, as a means for variable-length coding the quantized transform coefficient in the block, the block is scanned in a predetermined order, and a flag (LAST) indicating whether the non-zero coefficient is the last in the block, Variable length coding (LAST, RUN, LEVEL) using the same variable length coding table in a block, with a set of consecutive zeros (RUN) followed by a nonzero coefficient level (LEVEL) Method 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 a low occurrence probability (LAST, RUN, LEVEL), while a code with a short code length is assigned to a high occurrence probability (LAST, RUN, LEVEL). I try to assign words.

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

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

そこで、本発明は、上述したような問題を解決するためになされたもので、変換係数予測を行ったか否か、あるいは、量子化ステップサイズ等の各種の符号化の際の条件を適応的に切り替えた場合に、符号化効率を高めることのできる動画像符号化装置および動画像符号化方法を提供することを目的とする。   Therefore, the present invention has been made to solve the above-described problems, and adaptively determines whether or not transform coefficient prediction has been performed, or various encoding conditions such as a quantization step size. 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 switched.

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

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

前記目的を達成するために、本発明は、入力画像信号をブロック単位で直交変換および量子化して各ブロックに対応する量子化変換係数を生成し、この量子化変換係数を可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化装置において、前記量子化変換係数をスキャンして得られる係数データのそれぞれに対応する符号を割り当てた複数の可変長符号化テーブルを含む可変長符号化テーブルグループと、可変長符号化テーブルグループを複数含む可変長符号化テーブルグループ群と、可変長符号化テーブルグループ群のうちから量子化変換係数の高周波成分を含むかどうかにより予め分割された所定の周波数領域毎に予め定められた1つの可変長符号化テーブルグループを選択する可変長符号化テーブルグループ選択手段と、選択された可変長符号化テーブルグループの中から、量子化変換係数をスキャンした際の零に続く零でない係数に応じて、1つの可変長符号化テーブルを選択する可変長符号化テーブル選択手段と、選択された可変長符号化テーブルを使用して係数データを可変長符号化する変換係数可変長符号化手段とを備えた。 In order to achieve the above object, the present invention generates a quantized transform coefficient corresponding to each block by orthogonally transforming and quantizing an input image signal in units of blocks, and the quantized transform coefficient is converted into a variable length coding table. the moving image coding apparatus and the variable length coding to generate an encoded bit stream, a plurality of variable length coding tables assigned the code words corresponding to each of the coefficient data obtained by scanning the quantized transform coefficients Including a variable length coding table group, a variable length coding table group group including a plurality of variable length coding table groups, and whether a high frequency component of a quantized transform coefficient is included among the variable length coding table group groups in advance. Variable length coding for selecting one predetermined variable length coding table group for each divided predetermined frequency region And a variable length code for selecting one variable length coding table in accordance with a non-zero coefficient following zero when the quantized transform coefficient is scanned from the selected variable length coding table group Conversion table selection means and transform coefficient variable length encoding means for variable length encoding coefficient data using the selected variable length encoding table.

本発明によれば、可変長符号化テーブルグループ群のうちから量子化変換係数の高周波成分を含むかどうかにより予め分割された所定の周波数領域毎に予め定められた1つの可変長符号化テーブルグループを選択し、選択された可変長符号化テーブルグループの中から、量子化変換係数をスキャンした際の零に続く零でない係数に応じて、1つの可変長符号化テーブルを選択し、選択された可変長符号化テーブルを使用して係数データを可変長符号化するようにしたため、より少ない符号量で変換係数を符号化することが可能となる。 According to the present invention, whether pre-divided one predetermined variable length coding table group predetermined for each frequency domain by either including the high frequency components of the quantized transform coefficients from among the variable-length coding table groupings And select one variable-length coding table from the selected variable-length coding table group according to the non-zero coefficient that follows the zero when the quantized transform coefficient is scanned, and the selected Since the coefficient data is variable-length encoded using the variable-length encoding table, the transform coefficient can be encoded with a smaller code amount.

実施の形態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 the 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 decoded 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 prediction image signal, 14 is a prediction error signal, and 15 is an encoded 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 local 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 an encoded bit stream, 29 is a subtractor, 30 is an adder , 31 is transform coefficient prediction determination information which is one of the conditions at the time of texture encoding, and 32 is a quantization step size which is another of the conditions at the time of 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 of the first embodiment shown in FIG.
In the figure, 4a is a shape data variable length coding unit, 4b is an additional information variable length coding unit, 4c is a transform coefficient variable length coding unit, and 4d is 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 MPEG-4 image objects, that is, partial areas having the same characteristics such as motion and picture, and encodes them in units of image objects. However, if one frame is defined as one image object, encoding can be performed in units of image frames. The image object is composed of texture data representing the color shading level in the circumscribed rectangle surrounding the image object and shape data representing the effective pixels 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に送られる。
The operation will be described. First, the input shape data 1 is transferred to the shape encoding unit 2, subjected to encoding and local decoding, and output as shape encoded data 3 and local decoded shape data 6, respectively.
The shape encoded data 3 is variable-length encoded by the variable-length encoder 4 and then multiplexed into the encoded bitstream 28 by the multiplexer 5.
Further, the local decoding shape data 6 is used to perform texture data encoding, motion compensation, and the like for only effective pixels, so that the texture encoding unit 16, the texture local decoding unit 18, and the motion compensation unit are used. 12, and 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 the texture data 7 is encoded within an image object or between image objects. Here, when it is determined to perform intra (inside image object) encoding, the intra / inter determination 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 inter (inter-image object) encoding is determined, the intra / inter determination unit 8 sends the input texture data 7 to the motion detection 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, and determines the most from the in-screen position of the input texture data 7. A change in position up to the position of a similar region is output to the motion compensation unit 12 and the variable length coding unit 4 as a motion vector 11.

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

また、動き補償部12では、動き検出部10から得られた動きベクトル11に基づいて、メモリ23に記憶された参照画像信号22から予測画像信号13を抽出する。すると、減算器29は、この予測画像信号13と、入力テクスチャデータ7との差分である予測誤差信号14を、被符号化画像信号15としてテクスチャ符号化部16へ渡す。   Further, 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 determination unit 8 is output to the switching unit 21 and is variable-length encoded by the variable-length encoding unit 4 as the mode instruction flag 9. It is passed to the multiplexing unit 5 and multiplexed into the encoded bit stream 28.

そして、テクスチャ符号化部16では、被符号化画像信号15を直交変換および量子化して、量子化変換係数データ17として出力する。量子化変換係数データ17は、可変長符号化部4の変換係数可変長符号化部4cによって、冗長度を削減されて可変長符号化された後、多重化部5によって、符号化ビットストリーム28に多重化される。   Then, the texture encoding unit 16 orthogonally transforms and quantizes the encoded 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 4 c of the variable length coding unit 4, and then the coded bit stream 28 by the multiplexing unit 5. Is 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, and is subjected to inverse quantization and inverse orthogonal transform by the texture local decoding unit 18 to be subjected to local decoding prediction error signal. 19
When the mode instruction flag 9 indicates the inter mode, the local decoded prediction error signal 19 is output from the switching unit 21 because the predicted image signal 13 from the motion compensation unit 12 is output. The prediction image signal 13 is added and output as a locally decoded image signal 20.

これに対し、モード指示フラグ9がイントラモードを示している場合には、切替部21にて、0信号が選択されるので、加算部30にて、局所復号予測誤差信号19と予測画像信号13との加算は行われず、そのまま局所復号画像信号20として出力される。
なお、加算部30から出力された局所復号画像信号20は、次フレーム以降の動き補償予測の参照画像信号22として用いられるため、メモリ23に書き込まれる。
On the other hand, when the mode indication flag 9 indicates the intra mode, the switching unit 21 selects the 0 signal, and thus the addition unit 30 causes the local decoded prediction error signal 19 and the predicted image signal 13 to be selected. 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 in the memory 23 because it is used as the reference image signal 22 for motion compensation prediction in the subsequent frames.

次に、本実施の形態1の最も重要な要素であるテクスチャ符号化部16および変換係数可変長符号化部4cの構成および動作について説明する。   Next, the configuration and operation 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 texture encoding unit 16 of the first embodiment shown in FIG.
In the figure, 16a is a block data extraction unit, 16b is block data, 16c is a DCT unit, 16d is a DCT coefficient, 16e is a quantization unit, 16f is a quantized transform coefficient, and 16g is a transform coefficient prediction 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 that is a unit for performing discrete cosine transform (hereinafter referred to as DCT), which is one of orthogonal transforms, from the encoded image signal 15, for example, a block of usually 8 pixels × 8 pixels. The data 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, and 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 conversion coefficient prediction. In the transform coefficient prediction, a predicted value of the quantized transform coefficient of the encoding target block is obtained from the quantized transform coefficients of the surrounding blocks, 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, if the quantized transform coefficient of the block to be encoded has a correlation with the quantized transform coefficient of the surrounding block, the difference quantization with the quantized transform coefficient of the surrounding block is taken. The variation of the transform coefficient is smaller than that of the original quantized transform coefficient. For example, it is assumed that the quantized transform coefficient values are distributed in the range of 0 to 255 with the same appearance frequency. The entropy for such quantized transform coefficients is 8 bits, and the code length of the codeword corresponding to each level value is 8 bits for any level.

また、符号化対象のブロックの量子化変換係数が、近隣のブロックの量子化変換係数と強い相関をもち、特に、近隣のブロックの量子化変換係数の値と大きく変わらないときには、近隣のブロックの量子化変換係数との差分値である差分量子化変換係数の出現頻度は零近辺に多くなる。このような出現頻度に偏りのある信号のエントロピーは、もとの量子化変換係数のエントロピーよりも小さくなるため、出現頻度に応じた符号長の割り当てを行えば、差分量子化変換係数の平均符号長を8ビットよりも小さくすることができる。このように、変換係数予測を行い、差分量子化変換係数を符号化することにより、変換係数可変長符号化部にて符号化されるときに発生する符号量を少なくすることができる。   In addition, the quantization transform coefficient of the block to be encoded has a strong correlation with the quantization transform coefficient of the neighboring block, and particularly when the quantization transform coefficient value of the neighboring block is not significantly different from that of the neighboring block. The frequency of appearance of the differential quantization transform coefficient, which is the difference value from the quantization transform coefficient, increases near zero. Since the entropy of such a signal with a bias in 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 difference quantized transform coefficient The length can be smaller than 8 bits. In this way, by performing the transform coefficient prediction and encoding the differentially quantized transform coefficient, it is possible to reduce the amount of code generated when the transform coefficient variable length coding 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 prediction unit 16g.
The operation described below corresponds to the intra AC / DC prediction disclosed in ISO / IEC JTC1 / SC29 / WG11 MPEG-4 Video VM8.0.
The transform coefficient prediction is performed on the intra-mode DC coefficient, in which the value variation is particularly large, and the low-frequency component quantized transform coefficient (hereinafter, abbreviated as the transform coefficient) located in the hatched portion in FIG.

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

変換係数予測部16gは、このようにして求めた差分量子化変換係数、または量子化変換係数を量子化変換係数データ17として出力する。量子化変換係数データ17は、変換係数可変長符号化部4cにて可変長符号化される。
また、変換係数予測部16gは、変換係数予測が行われたか否かを示す情報を変換係数予測判定情報31として出力する。
The transform coefficient predicting unit 16 g outputs the difference quantized transform coefficient or the quantized transform coefficient obtained in this way as quantized transform coefficient data 17. The quantized transform coefficient data 17 is variable length encoded by the transform coefficient variable length encoding unit 4c.
Further, the transform coefficient prediction unit 16 g outputs information indicating whether or not transform coefficient prediction has been performed as transform 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, a detailed configuration and operation of the transform coefficient variable length encoding unit 4c will be described.
FIG. 5 is an internal block 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 a region data encoding unit, and 4c11 is an AC coefficient codeword.

このように構成された本実施の形態1の変換係数可変長符号化部4cは、ブロック内を複数の領域に分けて、領域毎に、その領域内の変換係数の統計的特性に基づいて、複数の可変長符号化テーブルを設定する。領域内の変換係数を符号化する際には、これらの設定された複数の可変長符号化テーブルの中から用いる可変長符号化テーブルを適応的に切り替える。なお、領域毎に複数の可変長符号化テーブルを設定する際には、領域の位置とその領域内の変換係数に対して、変換係数予測が行われたか否かに基づいて設定する。   The transform coefficient variable length coding unit 4c of 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, A plurality of variable length coding tables are set. When coding the transform coefficient in the region, 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 region, the setting is made based on whether or not transform coefficient prediction has been performed on the position of the region and the transform coefficient in the region.

以下、図5および図6をもとに動作の詳細な説明を行う。
(1)DC係数データ符号化
まず、切替部4c2にて、モード指示フラグ9を判定し(ステップS1)、イントラモードを示す場合には、量子化変換係数データ17をDC係数データ符号化部4c3に渡し、DC係数データの符号化を行い(ステップS2)、DC係数符号語4c5を出力する。一方、インターモードの場合には、DC係数は存在しないため、DC係数データ符号化部4c3への切替は行わない。
The detailed operation will be described below with reference to FIGS.
(1) DC coefficient data encoding First, the switching unit 4c2 determines the mode instruction flag 9 (step S1), and if the intra mode is indicated, the quantized transform coefficient data 17 is converted into the DC coefficient data encoding unit 4c3. , DC coefficient data is encoded (step S2), and a DC coefficient codeword 4c5 is output. On the other hand, in 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) AC Coefficient Data Encoding Next, encoding of the AC coefficient data 4c4 in the quantized transform coefficient data 17 will be described. The coding of the AC coefficient data 4c4 is performed for each region by dividing the block into a plurality of regions. When DCT is performed for each block, since the generation probability of the value of the transform coefficient varies depending on the position in the block, 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. Region 1 is a region including a low frequency component in a vertical direction parallel to the scan direction, and region 2 is a region including a low frequency component in a horizontal direction perpendicular to the scan direction. For this reason, the region 1 and the region 2 are likely to generate high-value AC coefficients. On the other hand, the region 3 or the region 4 is a region including a high frequency component, and an AC coefficient having a zero or a small value is likely to be generated.

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

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

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

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

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

以上の観点から、本実施の形態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 is selected. In the table group, the VLC table used when encoding each (RUN, LEVEL) data is switched.

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

まず、ブロック内の各領域を符号化するのに選択可能なVLCテーブルの組合わせであるVLCテーブルグループをVLCテーブルグループ選択部4c6にて選択する(ステップS4)。
例えば、図7のように分割した場合、領域1から領域4のそれぞれに対して、VLCテーブルグループを選択する。このとき、低周波成分から高周波成分へスキャンするときに、低周波成分ほど大きいLEVELのデータの出現確率が高く、高周波成分になるほど小さいLEVELあるいは零が多くなるという特性に基づき選択する。
ここでは、領域1〜4毎に、変換係数予測判定情報31により、VLCテーブルグループを選択する方法を図8を参照して、説明する。
First, the VLC table group selection unit 4c6 selects a VLC table group that is a combination of VLC tables that can be selected for encoding each region in the block (step S4).
For example, when division is performed as shown in FIG. 7, a VLC table group is selected for each of region 1 to region 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 appearance probability of the data with the larger LEVEL is higher for the low frequency component and the smaller LEVEL or zero is increased for the high frequency component.
Here, a method of selecting a VLC table group for each region 1 to 4 based on the transform coefficient prediction determination information 31 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 pair of (RUN, LEVEL) stored in the VLC table storage unit 4C1 and codewords assigned code lengths according to their appearance probabilities are paired.
The appearance probability of (RUN, LEVEL) varies depending on whether or not conversion coefficient prediction has been performed, or the position in which the conversion coefficient is scanned in the areas 1 to 4, and therefore, 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 and whether or not it 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 shown in FIG. 8, when the transform coefficient prediction is not performed for the region 1 and the region 2, the VLC table group selection unit 4c6 performs transform coefficient prediction determination information 31 and (RUN, LEVEL). Based on the appearance probability, a table group T1 having a VLC table 1A including symbols of small LEVEL, VLC tables 2A and 3A including symbols of high LEVEL, short RUN symbols, and the like is selected, and the selected table group T1 is selected. The VLC table group information 4c7 shown 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 transform coefficient prediction is performed, the effect of reducing the variation in coefficient level is obtained. Therefore, a VLC table including a higher LEVEL is required than when transform coefficient prediction is not performed. The degree is small.
Therefore, the VLC table group selection unit 4c6 is based on the transform coefficient prediction determination information 31 and the appearance probability of (RUN, LEVEL) when transform coefficient prediction is performed, and the VLC table 1B including symbols of small LEVELs and intermediate The table group T2 having the VLC table 2B including the short RUN symbol at the LEVEL is selected, and the 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 including the VLC tables 4, 5 and the like 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テーブルグループを選択することができることになる。
Note that, on the decoding side corresponding to the first embodiment, the VLC table group corresponds to the transform coefficient prediction determination information 31 for each of the regions 1 to 4 in the block, similarly to the coding side of the first embodiment. Therefore, it is not necessary to multiplex the VLC table group information 4c7 into the bit stream 28 as additional information.
That is, 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 transform coefficient prediction. Since it is multiplexed as one, this can be used.
Accordingly, since it is not necessary to multiplex the VLC table group information 4c7 to the bit stream 28 to the decoding side, it is possible to select a VLC table group to be used for each region 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 Encoding Next, variable length encoding 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 region 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の大きさによって決定するようにする。
In the VLC table selection unit 4c8, based on the VLC table group information 4c7 from the VLC table group selection unit 4c6, a VLC table used for variable-length encoding the AC coefficient data 4c4 that is the input (RUN, LEVEL) data. Are adaptively selected from the VLC table groups selected by the VLC table group selection unit 4c6 (step S5). The VLC table selection information 4c9 indicating the selected VLC table is output to the region data encoding unit 4c10.
The reference for selecting the VLC table is determined, for example, according to the level of the AC coefficient data 4c4 that 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 area data encoding unit 4c10 selects the 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 the (RUN, LEVEL) data. Long coding is performed (step S6).

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

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

さらに、ある領域内のすべての(RUN,LEVEL)データを可変長符号化した場合には(ステップS7”Yes”)、ブロック内の他の領域1〜4すべての(RUN,LEVEL)データを可変長符号化したかを判断して(ステップS8)、ブロック内の他の領域1〜4すべての(RUN,LEVEL)データを可変長符号化していないと判断した場合には(ステップS8”No”)、ステップS3〜ステップS7までの処理を繰り返すようにする(ステップS8)。   Furthermore, when all the (RUN, LEVEL) data in a certain area are variable-length encoded (step S7 “Yes”), all the (RUN, LEVEL) data in other areas 1 to 4 in the block are variable. When it is determined whether or not the long-length encoding has been performed (step S8), and it is determined that all the (RUN, LEVEL) data in the other areas 1 to 4 in the block have not been variable-length encoded (step S8 “No”) ), The process 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, when it is determined that all the (RUN, LEVEL) data in each of the areas 1 to 4 in the block have been variable length encoded (step S8 “Yes”), the transform coefficient variable length encoding unit 4c 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. To do.

ここで、この実施の形態1では、選択したVLCテーブルグループの中からのVLCテーブルの選択を、各(RUN,LEVEL)データのLEVELの値を用いて行なうようにしているので、この場合、復号側では、LEVELを復号する前にVLCテーブルを選択する必要がある。このため、VLCテーブル選択情報4c9を付加情報可変長符号化部4bへ送り符号化させて、VLCテーブル選択符号語とし、付加情報符号語25の1つとしてビットストリーム28に多重化するようにする。   Here, in the first embodiment, the VLC table is selected from the selected VLC table group 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 encoding unit 4b to be encoded to be a VLC table selection codeword and multiplexed into the bitstream 28 as one of the additional information codewords 25. .

ここで、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, VLC table selection information 4c9 (NEXT) used for encoding the current (RUN, LEVEL) data and the next (RUN, LEVEL) data. There is a method of performing variable length coding by combining. The variable-length coding table used at this time is a table storing a code word having a code length determined according to the appearance probability for a set of (NEXT, RUN, LEVEL).

この方法では、領域内で最初の(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 for encoding the first (RUN, LEVEL) in the area needs to be encoded separately 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 pair with the previous (RUN, LEVEL) data. When the non-zero LEVEL in the area is the last, NEXT is information indicating that (RUN, LEVEL) paired with it is the last (RUN, LEVEL) in the area.

このように、複数のVLCテーブルを切り替えて、各領域を符号化する際には、上述したように、VLCテーブル選択情報4c9を、付加情報として符号化する必要がある。例えば、図8に示すように変換係数予測を行った場合と、行わなかった場合とで用いるVLCテーブルグループを切り替える場合には、変換係数予測を行った場合に切り替えるVLCテーブルの数は、テーブルグループT2のテーブル1B、2Bの2つであるから、VLCテーブル選択情報4c9を固定長で符号化した場合に必要な符号長は、1ビットになる。   As described above, when switching between a plurality of VLC tables and encoding each region, 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 the conversion coefficient prediction is performed and when the conversion coefficient prediction is switched, the number of VLC tables to be switched when the conversion coefficient prediction is performed is the table group. Since there are two T1 tables 1B and 2B, the code length required when the VLC table selection information 4c9 is encoded 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 among 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 is 3 bits.
As described above, when the VLC table selection information 4c9 is combined with (RUN, LEVEL) and variable length coding, as the number of NEXT increases, the number of combinations of NEXT, RUN, and LEVEL increases. The code amount of codewords corresponding to (NEXT, RUN, LEVEL) also increases. As described in the first embodiment, for each region, a VLC table group is selected according to the statistical characteristics of (RUN, LEVEL) data in the region, and each of the selected VLC table groups By switching the VLC table used when encoding (RUN, LEVEL) data, the amount of code required for encoding 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 areas, and a VLC table group is selected for each area according to the position of each area in the block and the transform coefficient prediction determination information. Furthermore, since the VLC table is selected from the selected VLC table group and the transform coefficient is variable-length encoded, it is possible to encode the transform coefficient with a smaller code amount.

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

実施の形態2.
本実施の形態2は、変換係数可変長符号化部4cの構成を変えたことを特徴とするものである。このため、この実施の形態2の変換係数可変長符号化部4cの構成および動作を中心に説明する。
Embodiment 2. FIG.
The second embodiment is characterized in that the configuration of the transform coefficient variable length encoding 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 in the second embodiment. In the figure, 32 is 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 in the second embodiment, the quantization step size 32 is used instead of the transform coefficient prediction determination information 31 input to the VLC table group selection unit 4c6 as a condition for texture coding. The other feature is the same as that 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 in the second embodiment will be described.

VLCテーブルグループ選択部4c6では、VLCテーブルグループ選択部4c6が予め認識している領域のブロック内での位置と、外部からテクスチャ符号化の際の条件として入力する量子化ステップサイズ32とに基づいて、ブロック内の各領域を符号化するのに選択可能なVLCテーブルグループを選択する。   In the VLC table group selection unit 4c6, based on the position in the block of the area 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 the 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 with a large quantization step size 32, the smaller LEVEL or zero increases, and the appearance probability of data with a larger LEVEL decreases. Thus, since the appearance probability of (RUN, LEVEL) data varies depending on the quantization step size 32, the VLC table group selection unit 4c6 selects a VLC table group according to the quantization step size 32.

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

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

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

また、本実施の形態2では、VLCテーブルグループ選択時に、量子化ステップサイズ32を用いたが、実施の形態1で述べた変換係数予測判定情報31と、量子化ステップサイズ32との両方を用いて、VLCテーブルグループを選択するようにしてもよい。   In the second embodiment, the quantization step size 32 is used when the VLC table group is selected. However, both the transform coefficient prediction determination information 31 described in the first embodiment and the quantization step size 32 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 for encoding each (RUN, LEVEL) data in the region from the VLC table group selected by the VLC table group selection unit is performed in the region. This is characterized in that it is performed on the basis of the statistical characteristics of the LEVEL value such that the appearance probability of the LEVEL of zero or small value increases as it goes from the low frequency component to the high frequency component.

例えば、低周波成分では、大きい値のレベルが発生しやすいため、符号化すべき(RUN,LEVEL)データが低周波成分でスキャンされたデータである場合には、大きい値のLEVELを含むVLCテーブルを選択する。   For example, since a large value level is likely to occur in a low frequency component, if the (RUN, LEVEL) data to be encoded is data scanned with a low frequency component, a VLC table including a large value LEVEL is created. 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 low value level and long RUN data and assigning a short code length thereto is selected.
Hereinafter, the transform coefficient variable length encoding unit 4c including the VLC table selection unit that selects the VLC table based on the scanned position in the region will be described.

図10は、本実施の形態3における変換係数可変長符号化部4cの内部構成を示す。   FIG. 10 shows an internal configuration of transform coefficient variable length coding unit 4c in 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 embodiment or the second embodiment. The only difference is 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, as in the first and second embodiments, encodes the encoding conditions for texture encoding such as the quantization step size 32 or the transform coefficient prediction determination information 31 for each region in the block. Based on the above, selectable VLC table groups are selected and output 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 for encoding the AC coefficient data 4c4, which is (RUN, LEVEL) data, from the VLC table group selected by the VLC table group selection unit 4c6.

ここで、(RUN,LEVEL)の出現確率は、領域内のスキャンされた位置によって異なる。同一領域内でも低周波成分から高周波成分に向かうほど、零または小さい値のLEVELが多くなる。つまり、LEVELがスキャンされた位置により、LEVELの値の出現確率は異なる。   Here, the appearance probability of (RUN, LEVEL) varies depending on the scanned position in the region. Even within the same region, the LEVEL of zero or small value increases as it goes from the low frequency component to the high frequency component. That is, the appearance probability of the LEVEL value varies 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 of the third embodiment scans the area without inputting (RUN, LEVEL) data that is the AC coefficient data 4c4. The VLC table is selected according to the position of. That is, each of the areas 1 to 4 is further divided into a plurality of areas, and the VLC table is selected depending on which area the (RUN, LEVEL) data to be encoded is scanned.

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

その結果、上記実施の形態1,2では、符号化ビットストリーム28にVLCテーブル選択情報4c9を多重化する必要があったが、本実施の形態3では、VLCテーブル選択情報4c9をビットストリーム28に多重化する必要がないため、実施の形態1,2の場合よりも、符号化ビットストリーム28の符号量を削減できることになる。   As a result, in the first and second embodiments, it is necessary to multiplex the VLC table selection information 4c9 into the encoded bitstream 28. However, in the third embodiment, the VLC table selection information 4c9 is included in the bitstream 28. Since it is not necessary to multiplex, the code amount of the encoded 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)データを符号化するまで繰り返す。
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 similar to the first and second embodiments, and the VLC table selection unit 4c8. 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 AC coefficient data 4c4, is variable-length encoded.
The operation of region 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 region are encoded.

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

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

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

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

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

なお、領域内の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 AC coefficient data 4c4 in the area is not encoded, and the process skips to the encoding of the next 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で符号化するようにしていた。   Note that in the case of the transform coefficient variable length encoding unit 4c described in the first and second embodiments, the VLC table selection information 4c9 indicating the VLC table used for encoding each (RUN, LEVEL) data is added to the additional information variable. The long encoding unit 4b performs encoding.

このため、この実施の形態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 area valid / invalid information 4c13 is selected as the first VLC table indicating the VLC table used to encode the first (RUN, LEVEL) data in each of the areas 1 to 4. You may make it encode into information 4c9 grade | etc.,.
For example, the additional information variable length encoding unit 4b sets the first VLC table selection information 4c9 to “0” when all the AC coefficients in the region are zero and the region is not encoded, and n types 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. In this way, the area valid / invalid information encoding unit 4c14 itself becomes unnecessary.

次に、図4に示す本実施の形態4で述べた可変長符号化部4cを、MPEG-4におけるマクロブロックデータの符号化に適用した場合に得られる従来と比較して有利な効果、すなわち従来であれば符号化モードによって異なるビットストリームの構造を共通にすることができ、復号装置においてシンタックス解析のための回路を簡単にすることができるという効果について説明する。   Next, an advantageous effect as compared with the conventional case obtained when the variable length encoding unit 4c described in the fourth embodiment shown in FIG. 4 is applied to encoding of macroblock data in MPEG-4, that is, Conventionally, the effect that the structure of bitstreams that differ depending on the encoding mode can be made common and the circuit for syntax analysis in the decoding apparatus 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 the structure of a coded bitstream when macroblock data in conventional MPEG-4 is coded.
Conventionally, in MPEG-4, different bitstreams are used for intra / inter coding (I-VOP / P-VOP) and bi-directional predictive coding (B-VOP) for each VOP. It has the structure of Intra coding is a mode in which coding is performed using only information in the VOP. Inter coding is a mode in which motion compensation prediction is performed using the previous VOP. Bidirectional predictive coding is a mode in which motion compensated prediction is performed using the VOPs before and after the first.

図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 the bit stream B1 in the 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. When the conversion coefficient data of the macroblock is all zero and the motion vector is zero, the macroblock becomes an invalid macroblock. Are not multiplexed into the bitstream.
The effective chrominance block information / macroblock type D3 is information obtained by combining effective chrominance block information and a macroblock type. The effective chrominance block information indicates validity / invalidity of the chrominance blocks in the macroblock. When the conversion coefficient data in the color difference block is all zero, the color difference block is invalid.
The AC prediction instruction information D4 is information indicating whether or not transform coefficient prediction has been performed on the AC coefficients in the macroblock, and is the same as the transform coefficient prediction determination information 31.
The effective luminance block information D5 indicates the validity / invalidity of the luminance block in the macro block. When all the transform coefficient data in the luminance block is zero, the luminance block becomes invalid.
The difference quantization step size D6 represents a difference from the quantization step size of the previous macroblock data when the quantization step size is different from that of the previous macroblock data.
The interlace information D7 is information necessary for an interlaced image.
The motion data D8 is data relating to motion that exists 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 suggests 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 the bit stream B2 in the conventional B-VOP. Only the method of multiplexing the macroblock type D10 and the effective block information D12 is different.
Specifically, in the case of I-VOP / P-VOP shown in FIG. 12A, the effective block information is multiplexed separately for the color difference block and the luminance block, and the effective information of the color difference block is obtained. In combination with the macro block type, variable length coding is performed as effective color difference block information / macro block type D3. The luminance block information is variable-length encoded as effective luminance block information D5 by combining valid / invalid information of four luminance blocks.

これに対し、図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 effective color difference block information are separately multiplexed, and information indicating the validity / invalidity of each of the luminance block and the color difference block is displayed. Fixed-length encoding is performed 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 the quantized transform coefficients (AC coefficients) in a block are all zero in a region. And the bitstream structure 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 valid / invalid determination unit 4c12 determines whether or not the AC coefficient of the quantized transform coefficient is zero. The region valid / invalid information encoding unit 4c14 encodes the region valid / invalid information 4c13 and multiplexes it into the bitstream 28 as the region valid / invalid information encoding unit 4c14. It is not necessary to determine whether the quantized transform coefficient AC coefficient is zero and multiplex it into the bit stream 28 as effective block information.

図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 encoding unit 4c of the fourth embodiment is applied to encoding of macroblock data in MPEG-4.
Since the effective block information is not multiplexed into the bit stream D3, the structure of the bit stream B3 shown in FIG. 13 is common in any of the I-VOP, P-VOP, and B-VOP encoding modes.
In the case of 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 coding means described in the fourth embodiment is applied to the coding of macroblock data in MPEG-4, regardless of the coding mode of intra, inter, and bidirectional prediction, The common bit stream D3 has a structure as shown in FIG.

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

実施の形態5.
本実施の形態5は、変換係数可変長符号化部4cの領域データ符号化部4c10の構成を特徴とするものである。
Embodiment 5. FIG.
The fifth embodiment is characterized by the configuration of the region 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 region data encoding unit 4c10 of transform coefficient variable length encoding unit 4c in the present embodiment. In the figure, 4c101 is a VLC table search unit, 4c102 is an escape code, 4c103 is a conversion coefficient conversion unit, 4c104 is conversion AC coefficient data, 4c105 is a conversion flag, and 4c106 is 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 code word corresponding to the input AC coefficient data (RUN, LEVEL) 4c4 that is conversion coefficient data. When the code word corresponding to the AC coefficient data (RUN, LEVEL) 4c4 is found in the VLC table, the code word is output as the AC coefficient code word 4c11 as in the first to fourth embodiments.

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

LEVEL*=sign(LEVEL)×[abs(LEVEL−LMAX)] ・・・(式1)
ただし、sign(LEVEL)は、LEVELが0以上ならば1、それ以外は−1である。また、abs(LEVEL)は、LEVELの絶対値である。
LEVEL * = sign (LEVEL) × [abs (LEVEL−LMAX)] (Formula 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, when a code word corresponding to the converted AC coefficient data 4c104 (RUN, LEVEL *) is found in the VLC table, a code indicating that the LEVEL value has been converted after the escape code, and the VLC table The detected code word is added and output as an 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, when the code word corresponding to the converted AC coefficient data 4c104 (RUN, LEVEL *) subjected to the first conversion 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 maximum RUN value (RMAX) +1 of the AC coefficient data included in the VLC table. Specifically, it is shown in the following formula 2.

RUN*=RUN−(RMAX+1) ・・・(式2)   RUN * = RUN- (RMAX + 1) (Formula 2)

そして、VLCテーブル探索部4c101は、新たな変換AC係数データ4c105(RUN*,LEVEL*)を用いて再びVLCテーブルを探索する。ここで、この新たな変換AC係数データ4c105(RUN*,LEVEL*)に対応する符号語がVLCテーブルに見つかった場合には、エスケープコードの後に、RUNの値が変換されたことを示すコードと、VLCテーブルより検出された符号語とを付けて、AC係数符号語4c11として出力する。   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 RUN value has been converted after the escape code; The code word detected from the VLC table is added and output as an AC coefficient code word 4c11.

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

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

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

実施の形態6.
本実施の形態6では、実施の形態1または実施の形態2で述べた動画像符号化装置によって生成される符号化ビットストリームを復号する動画像復号装置について説明する。
Embodiment 6 FIG.
In the sixth embodiment, a moving picture decoding apparatus that decodes a coded bitstream generated by the moving picture coding apparatus 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 showing a configuration of the moving picture decoding apparatus according to the sixth embodiment.
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. Decoding unit, 108 is shape encoded data, 109 is quantized transform coefficient data, 110 is additional information, 111 is a motion vector, 112 is a shape decoding unit, 113 is a texture decoding unit, 114 is a motion compensation unit, and 115 is a decoding shape Data, 116 is a decoded prediction error signal, 117 is a memory, 118 is a reference image, 119 is a position information in a decoded macroblock screen, 120 is a predicted image, 121 is a decoding addition unit, 122 is a decoded image, 123 is a switching unit, It is. Reference numeral 110 a denotes 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 illustrating an internal configuration of the variable length decoding unit 107 of 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. In addition, 110b is an encoding condition at the time of texture encoding that is the transform coefficient prediction determination information 31 or the quantization step size 32 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. 15 and 16.
First, the encoded bitstream 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 in the syntax analysis unit 102, and each of them is subjected to shape data variable length decoding. After the variable length decoding is performed 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 to the shape decoding unit 112. The transform coefficient data 109 and various additional information 110 are sent to the texture decoding unit 113, and the motion vector 111 is sent to the motion compensation unit 114. Note that the motion compensation unit 114 is input from the variable length decoding unit 107 to the position information 119 in the decoded macroblock screen.

形状復号部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 in the texture decoding unit 113 and the motion compensation unit 114 to decode texture data and perform motion compensation for only effective pixels.

テクスチャ復号部113は、量子化変換係数データ109を付加情報110に含まれる量子化ステップサイズを用いて逆量子化後、逆直交変換して、復号予測誤差信号116を得る。復号予測誤差信号116は、復号加算部121に送られる。   The texture decoding unit 113 performs inverse quantization on 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 addition unit 121.

動き補償部114は、被復号マクロブロック画面内位置情報119と、符号化ビットストリーム101から復号した動きベクトル111とに従って、メモリ117中の参照画像118から予測画像120を取り出して、切替部123へ出力する。   The motion compensation 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 bitstream 101, and sends it to the switching unit 123. Output.

切替部123は、復号された付加情報110に含まれる符号化側における符号化モードを示すモード指示フラグ110aに基づいて、イントラ符号化を示している場合には、復号画像の生成に予測画像120が不要なので、出力0の側へ切り替える一方、インター符号化の場合には、復号画像の生成に予測画像120が必要なので、予測画像120の出力側へ切り替えるようにする。   When the switching unit 123 indicates intra coding based on the mode instruction flag 110a indicating the coding mode on the coding side included in the decoded additional information 110, the switching unit 123 generates a predicted image 120 for generating a decoded image. Is switched to the output 0 side. On the other hand, in the case of inter coding, since the predicted image 120 is necessary for generating a decoded image, the output 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 110 a 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 it is as the decoded image 122 in the case of an intra-coded block. On the other hand, in the case of an inter-coded block, the predicted image 120 is added to the decoded prediction error signal 116 that is the output output of the texture decoding unit 113, and the decoded image 122 is output. The decoded image 122 is written in the memory 117 for use as the reference image 118 in the subsequent VOP decoding process.

次に、本実施の形態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 block diagram of the transform coefficient variable length decoding unit 107b of FIG.
In 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, and 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 decoded AC coefficient.
The VLD table storage unit 107b5 stores a VLD table group and a VLD table having the same contents in correspondence with the VLC table group and the VLC table of, for example, the VLC table storage unit 4C1 (see FIG. 5) on the encoding side. Has been.

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

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

つまり、まず、領域毎にその領域内の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 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 in the block of the region and the transform coefficient prediction determination information 31 or quantization step used in the transform coefficient variable length coding unit 4c on the coding side. This is performed based on the encoding condition 110b when the size 32 texture is encoded.

変換係数予測判定情報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 for decoding the texture, it is multiplexed in the bit stream 101 for each block as additional information, and thus may be decoded and used. The operation of the VLD table group selection unit 107b6 is the same as the operation of the VLC table group selection unit 4c6 described in the first or second embodiment.

また、符号化側では、領域内を決められた順番でスキャンして得られた(RUN,LEVEL)データを可変長符号化することによりAC係数データの符号化を行っている。このとき、各(RUN,LEVEL)データを符号化するのに用いる可変長符号化テーブルをVLCテーブルグループ選択部4c6で選択されたVLCテーブルグループの中から選択している。実施の形態1または実施の形態2で述べた変換係数可変長符号化部4cでは、各(RUN,LEVEL)データを符号化するのに用いたVLCテーブルの種類をVLCテーブル選択情報4c9として符号化している。   On the encoding side, AC coefficient data is encoded by variable-length encoding (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 group selected by the VLC table group selection unit 4c6. In the transform coefficient variable length encoding unit 4c described in the first embodiment or the second embodiment, the type of the VLC table used to encode each (RUN, LEVEL) data is encoded as VLC table selection information 4c9. ing.

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

VLDテーブル選択部107b10では、そのVLCテーブルグループ情報107b9に基づいて、VLDテーブル記憶部107b5から(RUN,LEVEL)データを復号するのに用いるVLDテーブル107b11を選択して、領域データ復号部107b8へ出力する(ステップS104)。   Based on the VLC table group information 107b9, the VLD table selection unit 107b10 selects the VLD table 107b11 used for decoding (RUN, LEVEL) data from the VLD table storage unit 107b5 and outputs it to the region 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 code word 107b4 included in the block data code word 104 is searched in the VLD table 107b11, and when corresponding (RUN, LEVEL) data is found, this is decoded. It outputs 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 an 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. Since (RUN, LEVEL) data can be obtained, this is output as decoded AC coefficient data 107b12. The processes in steps S104 to S105 are repeated until all (RUN, LEVEL) data are decoded in the area (step S106 “No”).

そして、ある領域内のすべての(RUN,LEVEL)データの復号が終了した場合には(ステップS106”Yes”)、ブロック内のすべての領域に対して、ステップS103〜ステップS106の処理を行ったか否かを判断し(ステップS107)、行っていない場合には(ステップS107”No”)、ステップS103〜ステップS106の処理を行なう一方、行った場合には(ステップS107”Yes”)、以上の処理を終了するようにする。   If all the (RUN, LEVEL) data in a certain area has been decoded (step S106 “Yes”), the processes in steps S103 to S106 have been performed on all the areas in the block. If not (Step S107 “No”), the processing of Step S103 to Step S106 is performed, while if it is performed (Step S107 “Yes”), the above processing is performed. End 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 for encoding the following (RUN, LEVEL) data are paired (NEXT) , RUN, LEVEL) data is also variable-length decoded together with (RUN, LEVEL) data and VLC table selection information 107b9 (NEXT) used to decode the next (RUN, LEVEL) data. The basic operation is the same except that.

ブロック内のすべての領域に対して、以上の復号処理を行い、得られた復号DC係数107b3と、復号AC係数データ107b12の(RUN,LEVEL)に基づいて、符号化側のスキャンと逆の処理を行うことにより、量子化変換係数データ109を得る。なお、量子化変換係数データ109は、テクスチャ復号部113へ出力される。   The above decoding process is performed on all the regions in the block, and based on the obtained decoded DC coefficient 107b3 and (RUN, LEVEL) of the decoded AC coefficient data 107b12, the process opposite to the scan on the encoding side By performing the above, quantized transform coefficient data 109 is obtained. 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 prediction unit, 113d is a differential quantization transform coefficient, 113e is an adjacent block quantized transform coefficient, 113f is a quantized transform coefficient, and 113g is An inverse quantization unit, 113h is a quantization step, 113i is a DCT coefficient, and 113j is an inverse DCT unit. Further, 110b1 is transform coefficient prediction determination information that is one of the encoding conditions 110b at the time of 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 instructs to perform transform coefficient prediction, the switching unit 113a performs transform coefficient prediction in the transform coefficient prediction unit 113c. Do.

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

また、量子化AC係数の予測は、まず、付加情報110に含まれる変換係数予測判定情報110b1に基づいて変換係数予測が行われたか否かを判定し、量子化AC係数に対して変換係数予測が行われた場合には、符号化側と同様に近傍ブロックの量子化AC係数を予測値として、差分量子化AC係数に加算する。   In addition, for prediction of the quantized AC coefficient, first, it is determined whether or not transform coefficient prediction has been performed based on the transform coefficient prediction determination information 110b1 included in the additional information 110, and transform coefficient prediction is performed on the quantized AC coefficient. Is performed, the quantized AC coefficient of the neighboring block is added to the differentially quantized AC coefficient as a predicted value in the same manner as 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 inversely converts the obtained quantized DC coefficient and quantized AC coefficient as the quantized transform coefficient 113f. It outputs to the quantization part 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 it as a DCT coefficient 113i. The inverse DCT unit 113j reverses the DCT coefficient 113i. DCT 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, the block is divided into a plurality of regions, and the VLC table group used for encoding the AC coefficient data for each region is used as the transform coefficient prediction determination information for each block. Alternatively, even if a bit stream is selected based on a quantization step size, and further a VLC table is selected from the VLC table group and AC coefficient data ((RUN, LEVEL) data) is encoded and a 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 coding unit 4c described in the third embodiment has a variable length. A transform coefficient variable length decoding unit for decoding the encoded transform coefficient 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 in the seventh embodiment. In this figure, 107b13 is position information, and the region data decoding unit 107b8 of the seventh embodiment outputs the VLC table selection information 107b9 (see FIG. 17) to the VLD table selection unit 107b10 as in the sixth embodiment. Instead, 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 that of 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 scan position in the area. Position information 107b13 indicating the position of the scan in the area is obtained from the area data decoding unit 107b8. Since the area data decoding unit 107b8 decodes (RUN, LEVEL) data in the order scanned on the encoding side, the next (RUN, LEVEL) data to be decoded is based on the decoded (RUN, LEVEL) data. The position information 107b13 is output.

領域データ復号部107b8では、VLDテーブル選択部107b8で選択されたVLDテーブル107b11を用いて、(RUN,LEVEL)データを復号する。復号された(RUN,LEVEL)データに基づき、次の復号対象の(RUN,LEVEL)データのスキャン位置を特定し、位置情報107b13として、VLDテーブル選択部107b10へ出力するようにする。   The area data decoding unit 107b8 decodes the (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 as position information 107b13 to the VLD table selection unit 107b10.

従って、本実施の形態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 that is the power AC coefficient data, as in the encoding side of the third embodiment. Even when a bit stream obtained by multiplexing AC coefficient data encoded by selecting a VLC table according to a scan position in each region is transmitted, it can be correctly decoded.

実施の形態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 is performed by the transform coefficient variable length encoding unit 4c described in the fourth embodiment. A transform coefficient variable length decoding unit that decodes a transform coefficient that has been subjected to variable length coding will be described.

図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 a 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 operation is different in the area valid / invalid information decoding unit 107b14, the area valid / invalid determination unit 107b16, and the area data zero setting unit 107b17. Other configurations and operations are the same as those in the seventh embodiment. Therefore, hereinafter, the operations of the area valid / invalid information decoding unit 107b14, the area valid / invalid determination unit 107b16, and the intra-area AC coefficient zero setting unit 107b17 will be mainly described.

本実施の形態8では、まず、領域有効/無効情報復号部107b14が、ブロックデータ符号語104に含まれる領域有効/無効情報符号語107b13を入力して復号し、各領域内のAC係数データが符号化されているか否かを示す領域有効/無効情報107b15として出力する。
領域有効/無効判定部107b16では、領域有効/無効情報復号部107b14で復号された領域有効/無効情報107b15に基づき、領域内のAC係数データが符号化されているか否かを判定する。
In the eighth embodiment, first, the area valid / invalid information decoding unit 107b14 receives and decodes the area valid / invalid information codeword 107b13 included in the block data codeword 104, and the AC coefficient data in each area is obtained. This is output as area valid / invalid information 107b15 indicating whether or not it is encoded.
The area validity / invalidity determination unit 107b16 determines whether or not AC coefficient data in the area is encoded based on the area validity / invalidity information 107b15 decoded by the area 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 encoded, the area valid / invalid determination unit 107b16 includes the AC coefficient data code included in the block data codeword 104. The word 107b4 is output to the area data decoding unit 107b8. In the region data decoding unit 107b8, as in the case of the seventh embodiment, the (RUN, LEVEL) data in the region is obtained using the VLD table 107b11 selected by the VLD table selection unit 107b10 based on the VLC table selection information 107b9. Is decoded and output 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 area skip, that is, 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 to the area data zero setting unit 107b17. The area data zero setting unit 107b17 sends the command, 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 Embodiment 8, in order to reduce the amount of code on the encoding side, AC coefficient data in a certain region is not encoded, and region valid / invalid information 107b15 indicating this is multiplexed into the encoded bitstream. Even in the case where it has been made to be, the region valid / invalid information 107b15 in the received encoded bitstream is decoded, and it is determined whether or not the AC coefficient data is zero for each region in the block. When the coefficients are all zero, the AC coefficient data in the area is not encoded, so the area valid / invalid information 107b15 is multiplexed as in the encoding side of the fourth embodiment. Even when the encoded 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 region data decoding unit of the transform coefficient variable length decoding unit described in the sixth to eighth embodiments, and the transform coefficient variable length described in the fifth embodiment. A transform coefficient variable length decoding unit that decodes transform coefficients that have been variable length encoded by the encoding 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 that time, in the area data decoding unit 107b8, first, the VLD table search unit 107b81 receives (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 searching in the VLD table 107b11 and corresponding (RUN, LEVEL) data is found, this 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 code word 107b4 is not found and the escape code 107b82 is detected, the VLD table search unit 107b81 of the area data decoding unit 107b8 determines the escape code 107b82 and the subsequent The AC coefficient data code word 107b4 following 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, when the conversion flag indicates that LEVEL or RUN is converted, the conversion flag determination unit 107b83 returns the converted AC coefficient codeword 107b87 subsequent to 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 converted coefficient inverse conversion unit 107b85 as the decoded converted AC coefficient 107b84. The transform coefficient inverse transform unit 107b85 performs a process opposite to the process of the transform coefficient transform unit 4c103 (see FIG. 14) of the encoding device described in the fourth embodiment on the decoded transform AC coefficient 107b84. The decoded AC coefficient data 107b12 is obtained.

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

そして、ブロック内のすべての領域に対して、以上の復号処理を行い、得られた復号DC係数107b3と、復号AC係数データ107b12とに基づいて、符号化側のスキャンの順とは逆の順に並べて出力することにより、復号された量子化変換係数データ109となる。この復号量子化変換係数データは109は、テクスチャ復号部113(図15参照。)へ出力される。   Then, the above decoding process is performed on all regions in the block, and based on the obtained decoded DC coefficient 107b3 and decoded AC coefficient data 107b12, the order of scanning on the encoding side is the reverse order. By outputting them side by side, the decoded 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, the VLC table selection information 107b9 (NEXT) used for encoding the (RUN, LEVEL) data and the following (RUN, LEVEL) data is paired (NEXT). , RUN, LEVEL) data, the basic operation is the same.

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

この発明の実施の形態1による動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder by Embodiment 1 of this invention. この発明の実施の形態1による可変長符号化部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the variable length encoding part by Embodiment 1 of this invention. この発明の実施の形態1によるテクスチャ符号化部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the texture encoding part by Embodiment 1 of this invention. この発明の実施の形態1による変数係数予測の説明図である。It is explanatory drawing of the variable coefficient prediction by Embodiment 1 of this invention. この発明の実施の形態1による変換係数可変長符号化部4cの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length encoding part 4c by Embodiment 1 of this invention. この発明の実施の形態1による変換係数可変長符号化部4cの動作の様子を示すフローチャートである。It is a flowchart which shows the mode of operation | movement of the transform coefficient variable length encoding part 4c by Embodiment 1 of this invention. この発明の実施の形態1によるAC係数データを符号化する単位となる領域を説明する図である。It is a figure explaining the area | region used as the unit which encodes the AC coefficient data by Embodiment 1 of this invention. この発明の実施の形態1によるVLCテーブルグループを説明する図である。It is a figure explaining the VLC table group by Embodiment 1 of this invention. この発明の実施の形態2による変換係数可変長符号化部4cの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length encoding part 4c by Embodiment 2 of this invention. この発明の実施の形態3による変換係数可変長符号化部4cの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length encoding part 4c by Embodiment 3 of this invention. この発明の実施の形態4による変換係数可変長符号化部4cの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length encoding part 4c by Embodiment 4 of this invention. 従来のMPEG-4におけるマクロブロックデータ構造を説明する図である。It is a figure explaining the macroblock data structure in the conventional MPEG-4. この発明の実施の形態4におけるマクロブロックデータ構造を説明する図である。It is a figure explaining the macroblock data structure in Embodiment 4 of this invention. この発明の実施の形態5による領域データ符号化部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the area | region data encoding part by Embodiment 5 of this invention. この発明の実施の形態6による動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus by Embodiment 6 of this invention. この発明の実施の形態6による可変長復号部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the variable length decoding part by Embodiment 6 of this invention. この発明の実施の形態6による変換係数可変長復号部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length decoding part by Embodiment 6 of this invention. この発明の実施の形態6による変換係数可変長復号部の動作の様子を示すフローチャートである。It is a flowchart which shows the mode of operation | movement of the transform coefficient variable length decoding part by Embodiment 6 of this invention. この発明の実施の形態6によるテクスチャ復号部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the texture decoding part by Embodiment 6 of this invention. この発明の実施の形態7による変換係数可変長復号部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length decoding part by Embodiment 7 of this invention. この発明の実施の形態8による変換係数可変長復号部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the transform coefficient variable length decoding part by Embodiment 8 of this invention. この発明の実施の形態9による領域データ復号部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the area | region data decoding part by Embodiment 9 of this invention.

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 encoding unit, 3 shape encoded data, 4 variable length encoding unit, 5 multiplexing unit, 6 local decoded shape data, 7 input texture data, 8 intra / inter determination unit, 9 mode indication Flag, 10 motion detection unit, 11 motion vector, 12 motion compensation unit, 13 prediction image signal, 14 prediction error signal, 15 encoded image signal, 16 texture encoding unit, 17 quantized transform coefficient data, 18 texture local decoding , 19 local decoded prediction error signal, 20 local decoded 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 encoded bit stream, 29 shape data variable length encoding unit, 30 additional information variable length encoding 4c transform coefficient variable length coding unit 442 motion vector variable length coding unit, 16a block data extraction unit, 16b block data, 16c DCT unit, 16d DCT coefficient, 16e quantization unit, 16f quantization transform coefficient, 16g transform coefficient prediction 42, transform coefficient prediction determination information, 43 switching unit, 44 DC coefficient data encoding unit, 45 AC coefficient data, 4c5 DC coefficient codeword, 4c6 VLC table group selection unit, 4c7 VLC table group information, 4c8 VLC table selection unit 4c9 VLC table selection information 107b9, 4c10 region data encoding unit, 4c11 AC coefficient codeword, 26 block data codeword, 54 quantization step size, 55 encoding condition, 4c12 region data valid / invalid determination unit, 4c13 region valid / Invalid information 4c14 region valid / invalid information encoding unit, 4c15 region valid / invalid information codeword, 60 VLC table search unit, 4c102 escape code, 4c103 conversion coefficient conversion unit, 4c104 conversion AC coefficient data, 4c105 conversion flag, 4c106 conversion coefficient fixed Long 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 encoding 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, 116 decoded prediction error signal, 117 memory, 118 reference image Image, 119 decoded macroblock in-screen position information, 120 predicted image, 121 decoding addition unit, 122 decoded image, 123 switching unit, 110a mode instruction flag, 107a shape data variable length decoding unit, 107b transform coefficient variable length decoding unit, 107c additional information variable length decoding unit, 107d motion vector variable length decoding unit, 107b1 switching unit, 107b2 DC coefficient data decoding unit, 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, 107b11 VLD table, 107b12 region data decoding unit, 107 12 decoding AC coefficient, 113a switching unit, 110b1 transform coefficient prediction determination information, 113c transform coefficient prediction unit, 113d difference quantized transform coefficient, 113e adjacent block quantized transform coefficient, 113f quantized 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 region valid / invalid determination unit, 107b17 area data zero setting unit, 107b81 VLD table search unit, 107b82 escape code, 107b83 conversion flag determination unit, 107b84 decoding conversion AC coefficient, 107b85 conversion coefficient inverse conversion unit, 107b86 conversion coefficient fixed length Issue part, 107b87 conversion AC coefficient code words.

Claims (1)

入力画像信号をブロック単位で直交変換および量子化して各ブロックに対応する量子化変換係数を生成し、この量子化変換係数を可変長符号化テーブルにより可変長符号化して符号化ビットストリームを生成する動画像符号化装置において、
前記量子化変換係数をスキャンして得られる係数データのそれぞれに対応する符号を割り当てた複数の可変長符号化テーブルを含む可変長符号化テーブルグループと、
前記可変長符号化テーブルグループを複数含む可変長符号化テーブルグループ群と、
前記可変長符号化テーブルグループ群のうちから量子化変換係数の高周波成分を含むかどうかにより予め分割された所定の周波数領域毎に予め定められた1つの可変長符号化テーブルグループを選択する可変長符号化テーブルグループ選択手段と、
前記選択された可変長符号化テーブルグループの中から、量子化変換係数をスキャンした際の零に続く零でない係数に応じて、1つの可変長符号化テーブルを選択する可変長符号化テーブル選択手段と、
前記選択された可変長符号化テーブルを使用して前記係数データを可変長符号化する変換係数可変長符号化手段と、
を備えたことを特徴とする動画像符号化装置。
The input image signal is orthogonally transformed and quantized in units of blocks to generate quantized transform coefficients corresponding to each block, and the quantized transform coefficients are variable-length encoded using a variable-length encoding table to generate an encoded bitstream. In a video encoding device,
A variable length coding table group including a plurality of variable length coding tables assigned the code words corresponding to each of the coefficient data obtained by scanning the quantized transform coefficients,
A variable-length coding table group group including a plurality of the variable-length coding table groups;
Variable length for selecting one variable length coding table group predetermined for each predetermined frequency region divided in advance depending on whether or not a high frequency component of a quantized transform coefficient is included from the variable length coding table group group An encoding table group selection means;
Variable length coding table selection means for selecting one variable length coding table from the selected variable length coding table group according to a non-zero coefficient following zero when the quantized transform coefficient is scanned When,
Transform coefficient variable length encoding means for variable length encoding the coefficient data using the selected variable length encoding table;
A moving picture encoding apparatus comprising:
JP2009177674A 2009-07-30 2009-07-30 Moving picture encoding apparatus and moving picture decoding apparatus Expired - Fee Related JP4661973B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009177674A JP4661973B2 (en) 2009-07-30 2009-07-30 Moving picture encoding apparatus and moving picture decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009177674A JP4661973B2 (en) 2009-07-30 2009-07-30 Moving picture encoding apparatus and moving picture decoding apparatus

Related Parent 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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2010231550A Division JP4661992B2 (en) 2010-10-14 2010-10-14 Moving picture encoding apparatus and moving picture decoding apparatus

Publications (2)

Publication Number Publication Date
JP2009296622A JP2009296622A (en) 2009-12-17
JP4661973B2 true JP4661973B2 (en) 2011-03-30

Family

ID=41544271

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009177674A Expired - Fee Related JP4661973B2 (en) 2009-07-30 2009-07-30 Moving picture encoding apparatus and moving picture decoding apparatus

Country Status (1)

Country Link
JP (1) JP4661973B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102349200B (en) 2009-12-28 2014-05-07 株式会社藤仓 Power-feed connector

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0388488A (en) * 1989-08-31 1991-04-12 Toshiba Corp Picture coding system
JPH04117883A (en) * 1990-09-07 1992-04-17 Matsushita Electric Ind Co Ltd Encoder
JPH04343577A (en) * 1991-01-11 1992-11-30 Sony Broadcast & Commun Ltd Data compressor and data restorer
JPH05207286A (en) * 1991-05-28 1993-08-13 Matsushita Electric Works Ltd Picture coding system
JPH05292481A (en) * 1991-11-21 1993-11-05 Sanyo Electric Co Ltd Image encoding system
JPH06225286A (en) * 1992-10-26 1994-08-12 Daewoo Electron Co Ltd Method and apparatus for adaptively coding variable length
JPH06232765A (en) * 1993-02-05 1994-08-19 Nippon Telegr & Teleph Corp <Ntt> Variable length coding method
JPH06508490A (en) * 1991-12-24 1994-09-22 ザ マサチューセッツ インスティチュート オブ テクノロジー Method and apparatus for encoding data using both vector quantization and run-length encoding, and further using adaptive run-length encoding
JPH07274171A (en) * 1994-12-28 1995-10-20 Sharp Corp Image encoder and decoder
JPH08507191A (en) * 1993-12-16 1996-07-30 サムスン エレクトロニクス カンパニー リミテッド Adaptive variable length coding / decoding method for video data
JPH09214960A (en) * 1996-01-30 1997-08-15 Sanyo Electric Co Ltd Code replacing device
JP4388771B2 (en) * 2003-07-18 2009-12-24 三菱電機株式会社 Moving picture decoding apparatus and moving picture decoding method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0388488A (en) * 1989-08-31 1991-04-12 Toshiba Corp Picture coding system
JPH04117883A (en) * 1990-09-07 1992-04-17 Matsushita Electric Ind Co Ltd Encoder
JPH04343577A (en) * 1991-01-11 1992-11-30 Sony Broadcast & Commun Ltd Data compressor and data restorer
JPH05207286A (en) * 1991-05-28 1993-08-13 Matsushita Electric Works Ltd Picture coding system
JPH05292481A (en) * 1991-11-21 1993-11-05 Sanyo Electric Co Ltd Image encoding system
JPH06508490A (en) * 1991-12-24 1994-09-22 ザ マサチューセッツ インスティチュート オブ テクノロジー Method and apparatus for encoding data using both vector quantization and run-length encoding, and further using adaptive run-length encoding
JPH06225286A (en) * 1992-10-26 1994-08-12 Daewoo Electron Co Ltd Method and apparatus for adaptively coding variable length
JPH06232765A (en) * 1993-02-05 1994-08-19 Nippon Telegr & Teleph Corp <Ntt> Variable length coding method
JPH08507191A (en) * 1993-12-16 1996-07-30 サムスン エレクトロニクス カンパニー リミテッド Adaptive variable length coding / decoding method for video data
JPH07274171A (en) * 1994-12-28 1995-10-20 Sharp Corp Image encoder and decoder
JPH09214960A (en) * 1996-01-30 1997-08-15 Sanyo Electric Co Ltd Code replacing device
JP4388771B2 (en) * 2003-07-18 2009-12-24 三菱電機株式会社 Moving picture decoding apparatus and moving picture decoding method

Also Published As

Publication number Publication date
JP2009296622A (en) 2009-12-17

Similar Documents

Publication Publication Date Title
JP3842803B2 (en) Signal encoding method, signal decoding method, signal encoding device, signal decoding device, signal encoding program, and signal decoding program
JP5021083B2 (en) Bitstream generation method
KR100487989B1 (en) Image decoder and image encoder
US20040136457A1 (en) Method and system for supercompression of compressed digital video
JP5983704B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program
US20070200737A1 (en) Entropy Coding Method For Coding Video Prediction Residual Coefficients
CN101529911A (en) Methods and systems for signaling multi-layer bitstream data
KR20040098631A (en) Adaptive universal variable length codeword coding for digital video content
JP2012186763A (en) Video encoding device, video decoding device, video encoding method, and video decoding method
JP4388771B2 (en) Moving picture decoding apparatus and moving picture decoding method
JP2000013794A (en) Device and method for encoding and decoding moving image
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
JP2004129206A (en) Signal encoding method, signal decoding method, signal encoding device, signal decoding device, signal encoding program, and signal decoding program
JP2014007643A (en) Moving picture encoder, moving picture decoder, moving picture encoding method, and moving picture decoding method
JP4994515B2 (en) Arithmetic coding device, arithmetic decoding device
JP4350796B2 (en) Image coding apparatus and bit stream generation apparatus
JP2012080212A (en) Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method and moving image decoding method
JP3910594B2 (en) Image encoding device
JP3993212B2 (en) Image decoding device
KR100775019B1 (en) Coding and decoding method and apparatus using plural scanning patterns
JP3993213B2 (en) Image decoding device
JP4350759B2 (en) Image decoding device
JP4260192B2 (en) Image decoding device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20100202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100401

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100824

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101014

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101207

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: 20101220

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

Free format text: PAYMENT UNTIL: 20140114

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees