JPWO2011099242A1 - Image encoding device, image decoding device, image encoding method, and image decoding method - Google Patents

Image encoding device, image decoding device, image encoding method, and image decoding method Download PDF

Info

Publication number
JPWO2011099242A1
JPWO2011099242A1 JP2011553735A JP2011553735A JPWO2011099242A1 JP WO2011099242 A1 JPWO2011099242 A1 JP WO2011099242A1 JP 2011553735 A JP2011553735 A JP 2011553735A JP 2011553735 A JP2011553735 A JP 2011553735A JP WO2011099242 A1 JPWO2011099242 A1 JP WO2011099242A1
Authority
JP
Japan
Prior art keywords
direct
vector
image
direct vector
spatial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011553735A
Other languages
Japanese (ja)
Other versions
JP5442039B2 (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 JP2011553735A priority Critical patent/JP5442039B2/en
Publication of JPWO2011099242A1 publication Critical patent/JPWO2011099242A1/en
Application granted granted Critical
Publication of JP5442039B2 publication Critical patent/JP5442039B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する類似度算出部42と、空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択部43とを設け、動き補償処理部23がダイレクトベクトル選択部43により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する。The spatial direct mode is used to calculate the evaluation value of the spatial direct mode and the temporal direct vector is used to calculate the evaluation value of the temporal direct mode, and the spatial direct mode evaluation value and the temporal direct A direct vector selection unit 43 for comparing mode evaluation values and selecting either a spatial direct vector or a temporal direct vector, and the motion compensation processing unit 23 selects a direct vector selected by the direct vector selection unit 43. A motion compensation prediction process is used to generate a prediction image.

Description

この発明は、画像圧縮符号化技術や圧縮画像データ伝送技術などに用いられる画像符号化装置、画像復号装置、画像符号化方法及び画像復号方法に関するものである。   The present invention relates to an image encoding device, an image decoding device, an image encoding method, and an image decoding method used for image compression encoding technology, compressed image data transmission technology, and the like.

例えば、MPEG(Moving Picture Experts Group)や「ITU−T H.26x」などの国際標準映像符号化方式では、輝度信号16×16画素と、その輝度信号16×16画素に対応する色差信号8×8画素とをまとめたブロックデータ(以下、「マクロブロック」と称する)を一単位として、動き補償技術や直交変換/変換係数量子化技術に基づいて圧縮する方法が採用されている。
画像符号化装置及び画像復号装置における動き補償処理では、前方または後方のピクチャを参照して、マクロブロック単位で動きベクトルの検出や予測画像の生成を行う。
このとき、1枚のピクチャのみを参照して、画面間予測符号化を行うものをPピクチャと称し、同時に2枚のピクチャを参照して、画面間予測符号化を行うものをBピクチャと称する。
For example, in an international standard video encoding method such as MPEG (Moving Picture Experts Group) or “ITU-T H.26x”, a luminance signal 16 × 16 pixels and a color difference signal 8 × corresponding to the luminance signal 16 × 16 pixels are used. A method is adopted in which block data (hereinafter referred to as “macroblock”) including eight pixels is used as a unit for compression based on a motion compensation technique or an orthogonal transform / transform coefficient quantization technique.
In the motion compensation processing in the image encoding device and the image decoding device, a motion vector is detected and a predicted image is generated in units of macroblocks with reference to a front or rear picture.
At this time, a picture that performs inter-frame prediction encoding with reference to only one picture is referred to as a P picture, and a picture that performs inter-frame prediction encoding with reference to two pictures at the same time is referred to as a B picture. .

国際標準方式であるAVC/H.264(ISO/IEC 14496−10|ITU−T H.264)では、Bピクチャを符号化する際に、ダイレクトモードと呼ばれる符号化モードを選択することができる(例えば、非特許文献1を参照)。
即ち、符号化対象のマクロブロックには、動きベクトルの符号化データを持たず、符号化済みの他のピクチャのマクロブロックの動きベクトルや、周囲のマクロブロックの動きベクトルを用いる所定の演算処理で、符号化対象のマクロブロックの動きベクトルを生成する符号化モードを選択することができる。
AVC / H. Is an international standard system. H.264 (ISO / IEC 14496-10 | ITU-T H.264) can select a coding mode called a direct mode when coding a B picture (see, for example, Non-Patent Document 1). .
That is, the macroblock to be encoded does not have motion vector encoded data, and is a predetermined calculation process using a motion vector of a macroblock of another encoded picture or a motion vector of a surrounding macroblock. The encoding mode for generating the motion vector of the macroblock to be encoded can be selected.

このダイレクトモードには、時間ダイレクトモードと空間ダイレクトモードの2種類が存在する。
時間ダイレクトモードでは、符号化済みの他ピクチャの動きベクトルを参照し、符号化済みピクチャと符号化対象のピクチャとの時間差に応じて動きベクトルのスケーリング処理を行うことで、符号化対象のマクロブロックの動きベクトルを生成する。
空間ダイレクトモードでは、符号化対象のマクロブロックの周囲に位置している少なくとも1つ以上の符号化済みマクロブロックの動きベクトルを参照し、それらの動きベクトルから符号化対象のマクロブロックの動きベクトルを生成する。
このダイレクトモードでは、スライスヘッダに設けられたフラグである“direct_spatial_mv_pred_flag”を用いることにより、スライス単位で、時間ダイレクトモード又は空間ダイレクトモードのいずれか一方を選択することが可能である。
There are two types of direct mode: temporal direct mode and spatial direct mode.
In the temporal direct mode, the motion vector scaling process is performed according to the time difference between the coded picture and the picture to be coded by referring to the motion vector of the other picture that has been coded. Generate a motion vector of.
In the spatial direct mode, the motion vector of at least one encoded macroblock located around the macroblock to be encoded is referenced, and the motion vector of the macroblock to be encoded is determined from those motion vectors. Generate.
In this direct mode, by using “direct_spatial_mv_pred_flag” which is a flag provided in the slice header, it is possible to select either the temporal direct mode or the spatial direct mode in units of slices.

ここで、図9は時間ダイレクトモードで動きベクトルを生成する方法を示す模式図である。
図9において、「P」はPピクチャを表し、「B」はBピクチャを表している。
また、数字0−3はピクチャの表示順を示し、時間T0,T1,T2,T3の表示画像であることを表している。
ピクチャの符号化処理は、P0,P3,B1,B2の順番で行われているものとする。
Here, FIG. 9 is a schematic diagram showing a method of generating a motion vector in the temporal direct mode.
In FIG. 9, “P” represents a P picture, and “B” represents a B picture.
Numbers 0 to 3 indicate the display order of pictures and indicate that the images are displayed at times T0, T1, T2 and T3.
It is assumed that the picture encoding process is performed in the order of P0, P3, B1, and B2.

例えば、ピクチャB2の中のマクロブロックMB1を時間ダイレクトモードで符号化する場合を想定する。
この場合、ピクチャB2の時間軸上後方にある符号化済みピクチャのうち、ピクチャB2に一番近いピクチャP3の動きベクトルであって、マクロブロックMB1と空間的に同じ位置にあるマクロブロックMB2の動きベクトルMVを用いる。
この動きベクトルMVはピクチャP0を参照しており、マクロブロックMB1を符号化する際に用いる動きベクトルMVL0,MVL1は、以下の式(1)で求められる。
For example, it is assumed that the macroblock MB1 in the picture B2 is encoded in the temporal direct mode.
In this case, the motion of the macroblock MB2 which is the motion vector of the picture P3 closest to the picture B2 among the encoded pictures located on the rear side of the picture B2 on the time axis, and is in the same spatial position as the macroblock MB1. Vector MV is used.
The motion vector MV refers to the picture P0, and the motion vectors MVL0 and MVL1 used when encoding the macroblock MB1 are obtained by the following equation (1).

Figure 2011099242
したがって、時間ダイレクトモードで、符号化対象のマクロブロックの動きベクトルを求めるには、符号化済みピクチャの動きベクトルMVを1画面分必要とするため、動きベクトルを保持するメモリが必要となる。
Figure 2011099242
Therefore, in order to obtain the motion vector of the macroblock to be encoded in the temporal direct mode, the motion vector MV of the encoded picture is required for one screen, and thus a memory for holding the motion vector is required.

図10は空間ダイレクトモードで動きベクトルを生成する方法を示す模式図である。
図10において、currentMBは、符号化対象のマクロブロックを表している。
このとき、符号化対象のマクロブロックの左横の符号化済マクロブロックAの動きベクトルをMVa、符号化対象のマクロブロックの上の符号化済マクロブロックBの動きベクトルをMVb、符号化対象のマクロブロックの右上の符号化済マクロブロックCの動きベクトルをMVcとすると、下記の式(2)に示すように、これらの動きベクトルMVa,MVb,MVcのメディアン(中央値)を求めることにより、符号化対象のマクロブロックの動きベクトルMVを算出することができる。
MV=median(MVa、MVb、MVc) (2)
空間ダイレクトモードでは、前方及び後方のそれぞれについて動きベクトルを求めるが、どちらも上記の方法を用いて求めることが可能である。
FIG. 10 is a schematic diagram showing a method of generating a motion vector in the spatial direct mode.
In FIG. 10, currentMB represents a macroblock to be encoded.
At this time, the motion vector of the encoded macroblock A on the left side of the macroblock to be encoded is MVa, the motion vector of the encoded macroblock B above the macroblock to be encoded is MVb, Assuming that the motion vector of the encoded macro block C at the upper right of the macro block is MVc, by obtaining the median (median value) of these motion vectors MVa, MVb, and MVc as shown in the following equation (2), The motion vector MV of the macroblock to be encoded can be calculated.
MV = median (MVa, MVb, MVc) (2)
In the spatial direct mode, motion vectors are obtained for each of the front and rear, both of which can be obtained using the above method.

AVC/H.264では、空間ダイレクトモード又は時間ダイレクトモードのいずれか一方を選択するが、上述したように、スライスヘッダに設けられたフラグである“direct_spatial_mv_pred_flag”を参照すると、スライス単位で、時間ダイレクトモード又は空間ダイレクトモードを選択する必要があるため、マクロブロック毎に、最適なダイレクトモードに切り替えて使用することはできない。   AVC / H. In H.264, either the spatial direct mode or the temporal direct mode is selected. As described above, referring to the “direct_spatial_mv_pred_flag” that is a flag provided in the slice header, the temporal direct mode or the spatial direct mode is selected in units of slices. Since it is necessary to select a mode, it is not possible to switch to the optimum direct mode for each macroblock.

MPEG−4 AVC(ISO/IEC 14496−10)/ITU−T H.264規格MPEG-4 AVC (ISO / IEC 14496-10) / ITU-TH H.264 standard

従来の画像符号化装置は以上のように構成されているので、スライスヘッダに設けられたフラグである“direct_spatial_mv_pred_flag”を参照すれば、スライス単位で、時間ダイレクトモードと空間ダイレクトモードを切り替えることができる。しかし、マクロブロック単位では、時間ダイレクトモードと空間ダイレクトモードを切り替えることができないため、或るスライスに属している或るマクロブロックに対する最適なダイレクトモードが例えば空間ダイレクトモードであっても、当該スライスに対応するダイレクトモードが時間ダイレクトモードに決められていれば、当該マクロブロックに対して時間ダイレクトモードを使用しなければならず、最適なダイレクトモードを選択することができない。このような場合、最適なダイレクトモードを選択することができないため、不必要な動きベクトルを符号化しなければならず、符号量が増加してしまうなどの課題があった。   Since the conventional image encoding apparatus is configured as described above, the temporal direct mode and the spatial direct mode can be switched in units of slices by referring to “direct_spatial_mv_pred_flag” that is a flag provided in the slice header. . However, since the temporal direct mode and the spatial direct mode cannot be switched in units of macroblocks, even if the optimum direct mode for a certain macroblock belonging to a certain slice is, for example, the spatial direct mode, If the corresponding direct mode is determined as the temporal direct mode, the temporal direct mode must be used for the macroblock, and the optimum direct mode cannot be selected. In such a case, since the optimum direct mode cannot be selected, an unnecessary motion vector has to be encoded, resulting in an increase in code amount.

この発明は上記のような課題を解決するためになされたもので、所定のブロック単位に最適なダイレクトモードを選択することができる画像符号化装置、画像復号装置、画像符号化方法及び画像復号方法を得ることを目的とする。   The present invention has been made to solve the above-described problems, and an image encoding device, an image decoding device, an image encoding method, and an image decoding method capable of selecting an optimum direct mode for a predetermined block unit. The purpose is to obtain.

この発明に係る画像符号化装置は、符号化対象のブロックの周囲に位置している符号化済みブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、符号化対象のブロックの時間的に近傍にある符号化済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成手段と、ダイレクトベクトル生成手段により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する評価値算出手段と、評価値算出手段により算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択手段とを設け、予測画像生成手段がダイレクトベクトル選択手段により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成するようにしたものである。   The image encoding device according to the present invention generates a spatial direct vector of a spatial direct mode from a motion vector of an encoded block located around a block to be encoded, and temporally encodes the block to be encoded. Using the direct vector generation means for generating the temporal direct vector of the temporal direct mode from the motion vectors of the encoded pictures in the vicinity, and the spatial direct vector generated by the direct vector generation means, the evaluation value of the spatial direct mode is obtained. The evaluation value calculation means for calculating the evaluation value of the temporal direct mode using the temporal direct vector and the evaluation value of the spatial direct mode calculated by the evaluation value calculation means and the evaluation value of the temporal direct mode are compared. Space direct vector Or a direct vector selection unit that selects either one of the temporal direct vectors, and the predicted image generation unit performs a motion compensation prediction process using the direct vector selected by the direct vector selection unit, thereby obtaining a predicted image. It is made to generate.

この発明によれば、符号化対象のブロックの周囲に位置している符号化済みブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、符号化対象のブロックの時間的に近傍にある符号化済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成手段と、ダイレクトベクトル生成手段により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する評価値算出手段と、評価値算出手段により算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択手段とを設け、予測画像生成手段がダイレクトベクトル選択手段により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成するように構成したので、所定のブロック単位に最適なダイレクトモードを選択することができるようになり、その結果、不必要な動きベクトルの符号化を避けて、符号量の増加を防止することができる効果がある。   According to the present invention, the spatial direct vector of the spatial direct mode is generated from the motion vector of the encoded block located around the block to be encoded, and is temporally adjacent to the block to be encoded. Using the direct vector generation means for generating the temporal direct vector of the temporal direct mode from the motion vector of the encoded picture and the spatial direct vector generated by the direct vector generation means, the spatial direct mode evaluation value is calculated, The evaluation value calculation means for calculating the evaluation value of the temporal direct mode using the temporal direct vector, and the evaluation value of the spatial direct mode calculated by the evaluation value calculation means and the evaluation value of the temporal direct mode are compared. Direct vector or time die A direct vector selection unit that selects any one of the vector vectors, and the predicted image generation unit generates a predicted image by performing a motion compensation prediction process using the direct vector selected by the direct vector selection unit. With this configuration, it is possible to select an optimum direct mode for a predetermined block unit, and as a result, it is possible to avoid unnecessary motion vector encoding and to prevent an increase in code amount. effective.

この発明の実施の形態1による画像符号化装置を示す構成図である。It is a block diagram which shows the image coding apparatus by Embodiment 1 of this invention. この発明の実施の形態1による画像符号化装置の動き補償予測部2を示す構成図である。It is a block diagram which shows the motion compensation prediction part 2 of the image coding apparatus by Embodiment 1 of this invention. 動き補償予測部2を構成しているダイレクトベクトル生成部22を示す構成図である。It is a block diagram which shows the direct vector production | generation part 22 which comprises the motion compensation prediction part 2. FIG. ダイレクトベクトル生成部22を構成しているダイレクトベクトル判定部33を示す構成図である。FIG. 3 is a configuration diagram showing a direct vector determination unit 33 configuring the direct vector generation unit 22. この発明の実施の形態1による画像復号装置を示す構成図である。It is a block diagram which shows the image decoding apparatus by Embodiment 1 of this invention. この発明の実施の形態1による画像復号装置の動き補償予測部54を示す構成図である。It is a block diagram which shows the motion compensation estimation part 54 of the image decoding apparatus by Embodiment 1 of this invention. 動き補償予測部54を構成しているダイレクトベクトル生成部61を示す構成図である。It is a block diagram which shows the direct vector production | generation part 61 which comprises the motion compensation prediction part 54. FIG. ダイレクトベクトル生成部61を構成しているダイレクトベクトル判定部73を示す構成図である。It is a block diagram which shows the direct vector determination part 73 which comprises the direct vector production | generation part 61. FIG. 時間ダイレクトモードで動きベクトルを生成する方法を示す模式図である。It is a schematic diagram which shows the method of producing | generating a motion vector in time direct mode. 空間ダイレクトモードで動きベクトルを生成する方法を示す模式図である。It is a schematic diagram which shows the method of producing | generating a motion vector in spatial direct mode. 前方予測画像と後方予測画像の類似度による評価値の算出例を示す説明図である。It is explanatory drawing which shows the example of calculation of the evaluation value by the similarity degree of a front prediction image and a back prediction image. この発明の実施の形態1による画像符号化装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the image coding apparatus by Embodiment 1 of this invention. この発明の実施の形態1による画像復号装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the image decoding apparatus by Embodiment 1 of this invention. 動きベクトルの分散値を用いた評価式を示す説明図である。It is explanatory drawing which shows the evaluation type | formula using the variance value of a motion vector. この発明の実施の形態3による画像符号化装置を示す構成図である。It is a block diagram which shows the image coding apparatus by Embodiment 3 of this invention. 動き補償予測部11を構成しているダイレクトベクトル生成部22を示す構成図である。3 is a configuration diagram showing a direct vector generation unit 22 constituting the motion compensation prediction unit 11. FIG. ダイレクトベクトル生成部22を構成しているダイレクトベクトル判定部34を示す構成図である。FIG. 3 is a configuration diagram showing a direct vector determination unit 34 configuring the direct vector generation unit 22. この発明の実施の形態3による画像復号装置を示す構成図である。It is a block diagram which shows the image decoding apparatus by Embodiment 3 of this invention. 動き補償予測部59を構成しているダイレクトベクトル生成部61を示す構成図である。It is a block diagram which shows the direct vector production | generation part 61 which comprises the motion compensation prediction part 59. FIG. ダイレクトベクトル生成部61を構成しているダイレクトベクトル判定部74を示す構成図である。It is a block diagram which shows the direct vector determination part 74 which comprises the direct vector production | generation part 61. FIG.

以下、この発明をより詳細に説明するために、この発明の実施するための形態について、添付の図面に従って説明する。
実施の形態1.
図1はこの発明の実施の形態1による画像符号化装置を示す構成図である。
図1の画像符号化装置では、AVC/H.264規格で採用されている符号化方式を用いている例を説明する。
図1において、動きベクトルメモリ1は符号化済みマクロブロック(あるいは、マクロブロックを分割したサブマクロブロック)の動きベクトルを格納している例えばRAMなどの記録媒体である。
Hereinafter, in order to explain the present invention in more detail, modes for carrying out the present invention will be described with reference to the accompanying drawings.
Embodiment 1 FIG.
FIG. 1 is a block diagram showing an image coding apparatus according to Embodiment 1 of the present invention.
In the image encoding apparatus of FIG. An example using the encoding method adopted in the H.264 standard will be described.
In FIG. 1, a motion vector memory 1 is a recording medium such as a RAM that stores motion vectors of encoded macro blocks (or sub macro blocks obtained by dividing a macro block).

動き補償予測部2はフレームメモリ9に格納されている1フレーム以上の動き補償予測用の参照画像の中から1フレームの参照画像を選択し、入力画像を構成しているマクロブロック(あるいは、マクロブロックを分割したサブマクロブロック)の単位で、動き補償予測処理を実行して、当該マクロブロック(符号化対象のマクロブロック)の動きベクトルを生成して予測画像を生成し、それぞれのマクロブロック毎に選択した参照画像の識別番号、動きベクトル及び予測画像等を出力する処理を実施する。
ただし、ここでは、説明の便宜上、マクロブロック単位で、動きベクトルを生成して予測画像を生成するものとする。
The motion compensation prediction unit 2 selects a reference image of one frame from one or more reference images for motion compensation prediction stored in the frame memory 9, and forms a macro block (or a macro constituting the input image). For each macroblock, a motion compensation prediction process is executed in units of sub-macroblocks obtained by dividing a block, a motion vector of the macroblock (macroblock to be encoded) is generated, and a prediction image is generated. The process of outputting the identification number, motion vector, predicted image, etc. of the selected reference image is performed.
However, here, for convenience of explanation, it is assumed that a predicted image is generated by generating a motion vector in units of macroblocks.

ただし、動き補償予測部2は符号化対象のマクロブロックの動きベクトルを生成して予測画像を生成する際、入力画像を構成しているマクロブロック毎に、当該マクロブロックの周囲に位置している符号化済みマクロブロックの動きベクトル(動きベクトルメモリ1に格納されている動きベクトル)から空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、当該マクロブロックの時間的に近傍にある符号化済みピクチャの動きベクトル(動きベクトルメモリ1に格納されている動きベクトル)から時間ダイレクトモードの時間ダイレクトベクトルを生成する処理を実施する。
また、動き補償予測部2は空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する処理を実施する。
また、動き補償予測部2は空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択する処理を実施する。
さらに、動き補償予測部2は選択したダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
However, when the motion compensated prediction unit 2 generates a motion vector of a macroblock to be encoded and generates a predicted image, the motion compensated prediction unit 2 is positioned around each macroblock constituting the input image. A spatial direct vector in the spatial direct mode is generated from the motion vector of the encoded macroblock (motion vector stored in the motion vector memory 1), and the motion of the encoded picture that is temporally adjacent to the macroblock A process of generating a temporal direct vector in temporal direct mode from a vector (motion vector stored in the motion vector memory 1) is performed.
In addition, the motion compensation prediction unit 2 calculates the evaluation value of the spatial direct mode using the spatial direct vector, and performs the process of calculating the evaluation value of the temporal direct mode using the temporal direct vector.
In addition, the motion compensation prediction unit 2 compares the evaluation value in the spatial direct mode with the evaluation value in the temporal direct mode, and performs a process of selecting either the spatial direct vector or the temporal direct vector.
Furthermore, the motion compensation prediction unit 2 performs a process for generating a predicted image by performing a motion compensation prediction process using the selected direct vector.

減算器3は動き補償予測部2により生成された予測画像と入力画像の差分画像を算出して、その差分画像を示す予測差分信号を符号化モード判定部4に出力する処理を実施する。
符号化モード判定部4は減算器3から出力された予測差分信号の予測効率を評価して、減算器3から出力された少なくとも1以上の予測差分信号の中で、最も予測効率が高い予測差分信号を選択し、動き補償予測部2で当該予測差分信号に係る予測画像の生成に用いられた動きベクトル、マクロブロックタイプ/サブマクロブロックタイプ(例えば、当該マクロブロックにおいて使用されている符号化モードが、インターモード又はダイレクトモードのいずれであるかを示す情報を含む)及び参照画像の識別番号を符号化モード情報として可変長符号化部10に出力し、また、最も予測効率が高い予測差分信号を圧縮部5に出力する処理を実施する。
The subtracter 3 calculates a difference image between the prediction image generated by the motion compensation prediction unit 2 and the input image, and outputs a prediction difference signal indicating the difference image to the encoding mode determination unit 4.
The encoding mode determination unit 4 evaluates the prediction efficiency of the prediction difference signal output from the subtracter 3, and among the at least one or more prediction difference signals output from the subtracter 3, the prediction difference having the highest prediction efficiency. A motion vector, a macroblock type / sub-macroblock type (for example, a coding mode used in the macroblock) used to generate a predicted image related to the prediction difference signal in the motion compensation prediction unit 2 Is output to the variable length coding unit 10 as coding mode information, and the prediction differential signal with the highest prediction efficiency is output. Is output to the compression unit 5.

圧縮部5は符号化モード判定部4から出力された予測差分信号に対するDCT(離散コサイン変換)処理を実施することでDCT係数を算出するとともに、そのDCT係数を量子化して、量子化後のDCT係数である圧縮データを局部復号部6及び可変長符号化部10に出力する処理を実施する。
なお、減算器3、符号化モード判定部4及び圧縮部5から量子化手段が構成されている。
The compression unit 5 calculates DCT coefficients by performing DCT (Discrete Cosine Transform) processing on the prediction difference signal output from the coding mode determination unit 4, quantizes the DCT coefficients, and performs DCT after quantization A process of outputting the compressed data that is a coefficient to the local decoding unit 6 and the variable length coding unit 10 is performed.
Note that the subtracter 3, the encoding mode determination unit 4, and the compression unit 5 constitute quantization means.

局部復号部6は圧縮部5から出力された圧縮データを逆量子化してDCT係数を求め、そのDCT係数に対する逆DCT(逆離散コサイン変換)処理を実施することで、符号化モード判定部4から出力された予測差分信号に相当する予測誤差信号を算出する処理を実施する。
加算器7は局部復号部6により算出された予測誤差信号と動き補償予測部2により生成された予測画像を示す予測信号を加算することで、局部復号画像を示す局部復号画像信号を生成する処理を実施する。
The local decoding unit 6 dequantizes the compressed data output from the compression unit 5 to obtain a DCT coefficient, and performs an inverse DCT (Inverse Discrete Cosine Transform) process on the DCT coefficient. Processing for calculating a prediction error signal corresponding to the output prediction difference signal is performed.
The adder 7 adds the prediction error signal calculated by the local decoding unit 6 and the prediction signal indicating the prediction image generated by the motion compensated prediction unit 2 to generate a local decoded image signal indicating the local decoded image. To implement.

ループフィルタ8は加算器7から出力された局部復号画像信号に含まれている符号化歪みを補償し、符号化歪み補償後の局部復号画像信号が示す局部復号画像を参照画像としてフレームメモリ9に出力する処理を実施する。
フレームメモリ9はループフィルタ8から出力された参照画像を格納するRAMなどの記録媒体である。
The loop filter 8 compensates for the coding distortion included in the locally decoded image signal output from the adder 7, and stores the locally decoded image indicated by the locally decoded image signal after the coding distortion compensation in the frame memory 9 as a reference image. Perform the output process.
The frame memory 9 is a recording medium such as a RAM for storing the reference image output from the loop filter 8.

可変長符号化部10は圧縮部5から出力された圧縮データ及び動き補償予測部2から出力された符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル、参照画像の識別番号)をエントロピー符号化して、その符号化結果を示すビットストリーム(符号化データ)を生成し、そのビットストリームを出力する処理を実施する。なお、可変長符号化部10は可変長符号化手段を構成している。   The variable length encoding unit 10 receives the compressed data output from the compression unit 5 and the encoding mode information (macroblock type / sub-macroblock type, motion vector, reference image identification number) output from the motion compensation prediction unit 2. Entropy encoding is performed, a bit stream (encoded data) indicating the encoding result is generated, and processing for outputting the bit stream is performed. The variable length coding unit 10 constitutes variable length coding means.

図2はこの発明の実施の形態1による画像符号化装置の動き補償予測部2を示す構成図である。
図2において、動きベクトル探索部21は符号化モードがインターモードである旨を示す情報を受信(例えば、外部からインターモードを使用する旨を示す情報を受信)すると、インターモードで最適な動きベクトルを探索し、その動きベクトルを動き補償処理部23に出力する処理を実施する。
FIG. 2 is a block diagram showing the motion compensation prediction unit 2 of the image coding apparatus according to Embodiment 1 of the present invention.
In FIG. 2, when the motion vector search unit 21 receives information indicating that the encoding mode is the inter mode (for example, receives information indicating that the inter mode is used from the outside), the motion vector optimum in the inter mode is received. And a process of outputting the motion vector to the motion compensation processing unit 23 is performed.

ダイレクトベクトル生成部22は符号化モードがダイレクトモードである旨を示す情報を受信すると、符号化対象のマクロブロック毎に、空間ダイレクトモードの空間ダイレクトベクトルと時間ダイレクトモードの時間ダイレクトベクトルを生成し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を動きベクトルとして動き補償処理部23に出力する処理を実施する。
動き補償処理部23は動きベクトル探索部21又はダイレクトベクトル生成部22から出力された動きベクトルとフレームメモリ9に格納されている1フレームの参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。なお、動き補償処理部23は予測画像生成手段を構成している。
Upon receiving information indicating that the encoding mode is the direct mode, the direct vector generation unit 22 generates a spatial direct vector in the spatial direct mode and a temporal direct vector in the temporal direct mode for each macroblock to be encoded, A process of outputting either the spatial direct vector or the temporal direct vector as a motion vector to the motion compensation processing unit 23 is performed.
The motion compensation processing unit 23 performs a motion compensation prediction process using the motion vector output from the motion vector search unit 21 or the direct vector generation unit 22 and the reference image of one frame stored in the frame memory 9. The process which produces | generates an estimated image is implemented. The motion compensation processing unit 23 constitutes a predicted image generating unit.

図3は動き補償予測部2を構成しているダイレクトベクトル生成部22を示す構成図である。
図3において、空間ダイレクトベクトル生成部31は動きベクトルメモリ1により格納されている符号化済みマクロブロックの動きベクトルの中から、符号化対象のマクロブロックの周囲に位置している符号化済みマクロブロックの動きベクトルを読み出し、その動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成する処理を実施する。
時間ダイレクトベクトル生成部32は動きベクトルメモリ1により格納されている符号化済みマクロブロックの動きベクトルの中から、符号化対象のマクロブロックの時間的に近傍にある符号化済みピクチャの動きベクトルであって、符号化対象のマクロブロックと空間的に同じ位置にあるマクロブロックの動きベクトルを読み出し、その動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成する処理を実施する。
なお、空間ダイレクトベクトル生成部31及び時間ダイレクトベクトル生成部32からダイレクトベクトル生成手段が構成されている。
FIG. 3 is a block diagram showing the direct vector generation unit 22 constituting the motion compensation prediction unit 2.
In FIG. 3, the spatial direct vector generation unit 31 encodes an encoded macroblock located around the macroblock to be encoded from among the motion vectors of the encoded macroblock stored in the motion vector memory 1. The motion vector is read out, and a process of generating a spatial direct vector in the spatial direct mode from the motion vector is performed.
The temporal direct vector generation unit 32 is a motion vector of an encoded picture that is temporally close to the macroblock to be encoded, among the motion vectors of the encoded macroblock stored in the motion vector memory 1. Then, the motion vector of the macro block located in the same spatial position as the macro block to be encoded is read, and a process of generating a temporal direct vector in the temporal direct mode from the motion vector is performed.
The spatial direct vector generation unit 31 and the temporal direct vector generation unit 32 constitute direct vector generation means.

ダイレクトベクトル判定部33は空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出し、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択する処理を実施する。   The direct vector determination unit 33 calculates the evaluation value of the spatial direct mode using the spatial direct vector generated by the spatial direct vector generation unit 31 and uses the temporal direct vector generated by the temporal direct vector generation unit 32. Then, the evaluation value of the temporal direct mode is calculated, the evaluation value of the spatial direct mode is compared with the evaluation value of the temporal direct mode, and the process of selecting either the spatial direct vector or the temporal direct vector is performed.

図4はダイレクトベクトル生成部22を構成しているダイレクトベクトル判定部33を示す構成図である。
図4において、動き補償部41は空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの前方予測画像と後方予測画像を生成するとともに、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像と後方予測画像を生成する処理を実施する。
類似度算出部42は空間ダイレクトモードの評価値として、空間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出するとともに、時間ダイレクトモードの評価値として、時間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出する処理を実施する。
なお、動き補償部41及び類似度算出部42から評価値算出手段が構成されている。
FIG. 4 is a configuration diagram showing the direct vector determination unit 33 constituting the direct vector generation unit 22.
In FIG. 4, the motion compensation unit 41 generates a forward prediction image and a backward prediction image in the spatial direct mode using the spatial direct vector generated by the spatial direct vector generation unit 31 and also generates by the temporal direct vector generation unit 32. Using the temporal direct vector thus generated, processing for generating a forward prediction image and a backward prediction image in the temporal direct mode is performed.
The similarity calculation unit 42 calculates the similarity between the forward predicted image and the backward predicted image in the spatial direct mode as the evaluation value in the spatial direct mode, and the forward predicted image and the backward in the temporal direct mode as the evaluation value in the temporal direct mode. A process of calculating the similarity of the predicted image is performed.
The motion compensation unit 41 and the similarity calculation unit 42 constitute an evaluation value calculation unit.

ダイレクトベクトル選択部43は類似度算出部42により算出された空間ダイレクトモードにおける前方予測画像と後方予測画像の類似度と、時間ダイレクトモードにおける前方予測画像と後方予測画像の類似度とを比較し、空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、前方予測画像と後方予測画像の類似度が高い方のダイレクトモードのダイレクトベクトルを選択する処理を実施する。なお、ダイレクトベクトル選択部43はダイレクトベクトル選択手段を構成している。   The direct vector selection unit 43 compares the similarity between the forward prediction image and the backward prediction image in the spatial direct mode calculated by the similarity calculation unit 42 and the similarity between the forward prediction image and the backward prediction image in the temporal direct mode, Of the spatial direct vector or the temporal direct vector, a process of selecting a direct mode direct vector having a higher similarity between the forward predicted image and the backward predicted image is performed. The direct vector selection unit 43 constitutes direct vector selection means.

図5はこの発明の実施の形態1による画像復号装置を示す構成図である。
図5の画像復号装置では、AVC/H.264規格で採用されている符号化方式を用いている例を説明する。
図5において、動きベクトルメモリ51は復号済みマクロブロック(あるいは、マクロブロックを分割したサブマクロブロック)の動きベクトルを格納している例えばRAMなどの記録媒体である。
FIG. 5 is a block diagram showing an image decoding apparatus according to Embodiment 1 of the present invention.
In the image decoding apparatus of FIG. An example using the encoding method adopted in the H.264 standard will be described.
In FIG. 5, a motion vector memory 51 is a recording medium such as a RAM that stores motion vectors of decoded macroblocks (or sub-macroblocks obtained by dividing macroblocks).

可変長復号部52は図1の画像符号化装置から出力されたビットストリーム(符号化データ)を入力し、そのビットストリームから圧縮データ及び符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル、参照画像の識別番号)をエントロピー復号して、その圧縮データを予測誤差復号部53に出力し、その符号化モード情報を動き補償予測部54に出力する処理を実施する。なお、可変長復号部52は可変長復号手段を構成している。
予測誤差復号部53は可変長復号部52から出力された圧縮データを逆量子化してDCT係数を求め、そのDCT係数に対する逆DCT処理を実施することで、差分画像を示す予測誤差信号(図1の符号化モード判定部4から出力された予測差分信号に相当する予測誤差信号)を算出する処理を実施する。なお、予測誤差復号部53は逆量子化手段を構成している。
The variable length decoding unit 52 receives the bit stream (encoded data) output from the image encoding apparatus of FIG. 1, and receives compressed data and encoding mode information (macro block type / sub macro block type, motion) from the bit stream. A vector and a reference image identification number) are entropy-decoded, the compressed data is output to the prediction error decoding unit 53, and the encoding mode information is output to the motion compensation prediction unit 54. The variable length decoding unit 52 constitutes variable length decoding means.
The prediction error decoding unit 53 inversely quantizes the compressed data output from the variable length decoding unit 52 to obtain a DCT coefficient, and performs an inverse DCT process on the DCT coefficient, whereby a prediction error signal indicating a difference image (FIG. 1). The prediction error signal corresponding to the prediction difference signal output from the encoding mode determination unit 4 is calculated. Note that the prediction error decoding unit 53 constitutes an inverse quantization unit.

動き補償予測部54はフレームメモリ57に格納されている1フレーム以上の参照画像の中から、可変長復号部52から出力された識別番号が示す参照画像を読み出し、可変長復号部52から出力されたマクロブロックタイプ/サブマクロブロックタイプがインターモードを使用している旨を示している場合、可変長復号部52から出力された動きベクトルと上記参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
一方、可変長復号部52から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示している場合、図1の画像符号化装置における動き補償予測部2と同様にして、空間ダイレクトベクトルと時間ダイレクトベクトルを生成して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択し、その選択したダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
The motion compensation prediction unit 54 reads out the reference image indicated by the identification number output from the variable length decoding unit 52 from one or more reference images stored in the frame memory 57 and outputs the reference image from the variable length decoding unit 52. When the macroblock type / sub-macroblock type indicates that the inter mode is used, the motion compensation prediction process is performed using the motion vector output from the variable length decoding unit 52 and the reference image. Thus, a process for generating a predicted image is performed.
On the other hand, when the macroblock type / sub-macroblock type output from the variable length decoding unit 52 indicates that the direct mode is used, the same as the motion compensation prediction unit 2 in the image encoding device of FIG. Generating a spatial direct vector and a temporal direct vector, selecting either the spatial direct vector or the temporal direct vector, and using the selected direct vector and the reference image indicated by the identification number, motion compensation prediction processing By performing the above, a process for generating a predicted image is performed.

加算器55は動き補償予測部54により生成された予測画像と予測誤差復号部53から出力された予測誤差信号が示す差分画像を加算して、図1の画像符号化装置の加算器7から出力された局部復号画像に相当する復号画像を示す復号画像信号を生成する処理を実施する。
ループフィルタ56は加算器55により生成された復号画像信号に含まれている符号化歪みを補償し、符号化歪み補償後の復号画像信号が示す復号画像を参照画像としてフレームメモリ57に格納するとともに、その復号画像を外部に出力する処理を実施する。
なお、加算器55及びループフィルタ56から画像加算手段が構成されている。
フレームメモリ57はループフィルタ56から出力された参照画像を格納するRAMなどの記録媒体である。
The adder 55 adds the prediction image generated by the motion compensation prediction unit 54 and the difference image indicated by the prediction error signal output from the prediction error decoding unit 53, and outputs the result from the adder 7 of the image encoding device in FIG. A process of generating a decoded image signal indicating a decoded image corresponding to the locally decoded image that has been performed is performed.
The loop filter 56 compensates for the encoding distortion included in the decoded image signal generated by the adder 55 and stores the decoded image indicated by the decoded image signal after the encoding distortion compensation in the frame memory 57 as a reference image. Then, a process of outputting the decoded image to the outside is performed.
The adder 55 and the loop filter 56 constitute an image adding means.
The frame memory 57 is a recording medium such as a RAM that stores the reference image output from the loop filter 56.

図6はこの発明の実施の形態1による画像復号装置の動き補償予測部54を示す構成図である。
図6において、ダイレクトベクトル生成部61は可変長復号部52から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示している場合、復号対象のマクロブロック毎に、空間ダイレクトモードの空間ダイレクトベクトルと時間ダイレクトモードの時間ダイレクトベクトルを生成し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を動きベクトルとして動き補償処理部62に出力する処理を実施する。
FIG. 6 is a block diagram showing the motion compensation prediction unit 54 of the image decoding apparatus according to Embodiment 1 of the present invention.
In FIG. 6, when the direct vector generation unit 61 indicates that the macroblock type / sub macroblock type output from the variable length decoding unit 52 uses the direct mode, for each macroblock to be decoded, A process of generating a spatial direct vector in the spatial direct mode and a temporal direct vector in the temporal direct mode and outputting either the spatial direct vector or the temporal direct vector as a motion vector to the motion compensation processing unit 62 is performed.

動き補償処理部62はフレームメモリ57に格納されている1フレーム以上の参照画像の中から、可変長復号部52から出力された識別番号が示す参照画像を読み出し、マクロブロックタイプ/サブマクロブロックタイプがインターモードを使用している旨を示している場合、可変長復号部52から出力された動きベクトルと上記参照画像を用いて、動き補償予測処理を実施することで予測画像を生成し、マクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示している場合、ダイレクトベクトル生成部61から出力された動きベクトルと上記参照画像を用いて、動き補償予測処理を実施することで予測画像を生成する処理を実施する。なお、動き補償処理部62は予測画像生成手段を構成している。   The motion compensation processing unit 62 reads out the reference image indicated by the identification number output from the variable length decoding unit 52 from the reference images of one or more frames stored in the frame memory 57, and performs macroblock type / sub macroblock type. Indicates that the inter mode is used, a motion compensation prediction process is performed using the motion vector output from the variable length decoding unit 52 and the reference image, and a predicted image is generated. When the block type / sub-macro block type indicates that the direct mode is used, the motion compensation prediction process is performed using the motion vector output from the direct vector generation unit 61 and the reference image. A process for generating a predicted image is performed. The motion compensation processing unit 62 constitutes a predicted image generating unit.

図7は動き補償予測部54を構成しているダイレクトベクトル生成部61を示す構成図である。
図7において、空間ダイレクトベクトル生成部71は動きベクトルメモリ51により格納されている復号済みマクロブロックの動きベクトルの中から、復号対象のマクロブロックの周囲に位置している復号済みマクロブロックの動きベクトルを読み出し、その動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成する処理を実施する。
時間ダイレクトベクトル生成部72は動きベクトルメモリ51により格納されている復号済みマクロブロックの動きベクトルの中から、復号対象のマクロブロックの時間的に近傍にある復号済みピクチャの動きベクトルであって、復号対象のマクロブロックと空間的に同じ位置にあるマクロブロックの動きベクトルを読み出し、その動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成する処理を実施する。
なお、空間ダイレクトベクトル生成部71及び時間ダイレクトベクトル生成部72からダイレクトベクトル生成手段が構成されている。
FIG. 7 is a configuration diagram showing the direct vector generation unit 61 that constitutes the motion compensation prediction unit 54.
In FIG. 7, the spatial direct vector generation unit 71 detects the motion vector of the decoded macroblock located around the macroblock to be decoded from the motion vectors of the decoded macroblock stored in the motion vector memory 51. And a process of generating a spatial direct vector in the spatial direct mode from the motion vector.
The temporal direct vector generation unit 72 is a motion vector of a decoded picture that is temporally adjacent to a decoding target macroblock among the motion vectors of the decoded macroblock stored in the motion vector memory 51, and is decoded A motion vector of a macroblock located in the same spatial position as the target macroblock is read, and a process of generating a temporal direct vector in temporal direct mode from the motion vector is performed.
The spatial direct vector generation unit 71 and the temporal direct vector generation unit 72 constitute direct vector generation means.

ダイレクトベクトル判定部73は空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出し、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択する処理を実施する。   The direct vector determination unit 73 calculates the evaluation value of the spatial direct mode using the spatial direct vector generated by the spatial direct vector generation unit 71 and uses the temporal direct vector generated by the temporal direct vector generation unit 72. Then, the evaluation value of the temporal direct mode is calculated, the evaluation value of the spatial direct mode is compared with the evaluation value of the temporal direct mode, and the process of selecting either the spatial direct vector or the temporal direct vector is performed.

図8はダイレクトベクトル生成部61を構成しているダイレクトベクトル判定部73を示す構成図である。
図8において、動き補償部81は空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの前方予測画像と後方予測画像を生成するとともに、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像と後方予測画像を生成する処理を実施する。
類似度算出部82は空間ダイレクトモードの評価値として、空間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出するとともに、時間ダイレクトモードの評価値として、時間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出する処理を実施する。
なお、動き補償部81及び類似度算出部82から評価値算出手段が構成されている。
FIG. 8 is a configuration diagram showing a direct vector determination unit 73 constituting the direct vector generation unit 61.
In FIG. 8, the motion compensation unit 81 generates a forward prediction image and a backward prediction image in the spatial direct mode using the spatial direct vector generated by the spatial direct vector generation unit 71, and also generates by the temporal direct vector generation unit 72. Using the temporal direct vector thus generated, processing for generating a forward prediction image and a backward prediction image in the temporal direct mode is performed.
The similarity calculation unit 82 calculates the similarity between the forward prediction image and the backward prediction image in the spatial direct mode as the evaluation value in the spatial direct mode, and the forward prediction image and the backward in the temporal direct mode as the evaluation value in the temporal direct mode. A process of calculating the similarity of the predicted image is performed.
The motion compensation unit 81 and the similarity calculation unit 82 constitute an evaluation value calculation unit.

ダイレクトベクトル選択部83は類似度算出部82により算出された空間ダイレクトモードにおける前方予測画像と後方予測画像の類似度と、時間ダイレクトモードにおける前方予測画像と後方予測画像の類似度とを比較し、空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、前方予測画像と後方予測画像の類似度が高い方のダイレクトモードのダイレクトベクトルを選択する処理を実施する。なお、ダイレクトベクトル選択部83はダイレクトベクトル選択手段を構成している。   The direct vector selection unit 83 compares the similarity between the forward prediction image and the backward prediction image in the spatial direct mode calculated by the similarity calculation unit 82, and the similarity between the forward prediction image and the backward prediction image in the temporal direct mode, Of the spatial direct vector or the temporal direct vector, a process of selecting a direct mode direct vector having a higher similarity between the forward predicted image and the backward predicted image is performed. The direct vector selection unit 83 constitutes a direct vector selection unit.

図1では、画像符号化装置の構成要素である動き補償予測部2、減算器3、符号化モード判定部4、圧縮部5、局部復号部6、加算器7、ループフィルタ8及び可変長符号化部10のそれぞれが専用のハードウェア(例えば、CPUを実装している半導体集積回路、あるいは、ワンチップマイコンなど)で構成されているものを想定しているが、画像符号化装置がコンピュータで構成される場合、動き補償予測部2、減算器3、符号化モード判定部4、圧縮部5、局部復号部6、加算器7、ループフィルタ8及び可変長符号化部10の処理内容を記述しているプログラムを当該コンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにしてもよい。
図12はこの発明の実施の形態1による画像符号化装置の処理内容を示すフローチャートである。
In FIG. 1, a motion compensation prediction unit 2, a subtracter 3, a coding mode determination unit 4, a compression unit 5, a local decoding unit 6, an adder 7, a loop filter 8, and a variable length code that are components of the image coding device. It is assumed that each of the encoding units 10 is configured by dedicated hardware (for example, a semiconductor integrated circuit on which a CPU is mounted, or a one-chip microcomputer), but the image encoding device is a computer. When configured, the processing contents of the motion compensation prediction unit 2, the subtractor 3, the coding mode determination unit 4, the compression unit 5, the local decoding unit 6, the adder 7, the loop filter 8, and the variable length coding unit 10 are described. The stored program may be stored in the memory of the computer, and the CPU of the computer may execute the program stored in the memory.
FIG. 12 is a flowchart showing the processing contents of the image coding apparatus according to Embodiment 1 of the present invention.

図5では、画像復号装置の構成要素である可変長復号部52、予測誤差復号部53、動き補償予測部54、加算器55及びループフィルタ56のそれぞれが専用のハードウェア(例えば、CPUを実装している半導体集積回路、あるいは、ワンチップマイコンなど)で構成されているものを想定しているが、画像復号装置がコンピュータで構成される場合、可変長復号部52、予測誤差復号部53、動き補償予測部54、加算器55及びループフィルタ56の処理内容を記述しているプログラムを当該コンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにしてもよい。
図13はこの発明の実施の形態1による画像復号装置の処理内容を示すフローチャートである。
In FIG. 5, each of the variable length decoding unit 52, the prediction error decoding unit 53, the motion compensation prediction unit 54, the adder 55, and the loop filter 56, which are components of the image decoding apparatus, is installed with dedicated hardware (for example, a CPU is installed). In the case where the image decoding device is configured by a computer, a variable length decoding unit 52, a prediction error decoding unit 53, A program describing the processing contents of the motion compensation prediction unit 54, the adder 55, and the loop filter 56 is stored in the memory of the computer, and the CPU of the computer executes the program stored in the memory. Also good.
FIG. 13 is a flowchart showing the processing contents of the image decoding apparatus according to Embodiment 1 of the present invention.

次に動作について説明する。
最初に、図1の画像符号化装置の処理内容を説明する。
動き補償予測部2は、入力画像を示す動画像信号を入力すると、その動画像信号の各フレームをマクロブロック単位(あるいは、サブマクロブロック単位)に分割する。
動き補償予測部2は、動画像信号をマクロブロック単位(あるいは、サブマクロブロック単位)に分割すると、フレームメモリ9に格納されている1フレーム以上の動き補償予測用の参照画像の中から1フレームの参照画像を選択し、マクロブロック単位(あるいは、サブマクロブロック単位)で、動き補償予測処理を実行することで、符号化対象のマクロブロック(あるいは、サブマクロブロック)の動きベクトルを生成して予測画像を生成する。
Next, the operation will be described.
First, the processing contents of the image encoding device in FIG. 1 will be described.
When a moving image signal indicating an input image is input, the motion compensation prediction unit 2 divides each frame of the moving image signal into macro block units (or sub macro block units).
When the motion compensation prediction unit 2 divides the moving image signal in units of macroblocks (or submacroblocks), one frame from the reference images for motion compensation prediction stored in the frame memory 9 is stored in one frame. To generate a motion vector of a macroblock (or sub-macroblock) to be encoded by executing motion compensation prediction processing in units of macroblocks (or sub-macroblocks). A prediction image is generated.

動き補償予測部2は、符号化対象のマクロブロック(あるいは、サブマクロブロック)の動きベクトルを生成して予測画像を生成すると、その予測画像を減算器3に出力するとともに、その予測画像の生成に用いられた動きベクトル、マクロブロックタイプ/サブマクロブロックタイプ(例えば、当該マクロブロック(あるいは、サブマクロブロック)において使用されている符号化モードが、インターモード又はダイレクトモードのいずれであるかを示す情報を含む)及び参照画像の識別番号を符号化モード判定部4に出力する。
以下、動き補償予測部2の処理内容を具体的に説明する。
ただし、ここでは、説明の便宜上、マクロブロック単位で、動きベクトルを生成して予測画像を生成するものとする。
When the motion compensated prediction unit 2 generates the motion vector of the encoding target macroblock (or sub macroblock) and generates the predicted image, the motion compensated prediction unit 2 outputs the predicted image to the subtracter 3 and also generates the predicted image. Indicates whether the coding mode used in the macroblock type / sub-macroblock type (for example, the macroblock (or sub-macroblock) is the inter mode or the direct mode). Information) and the identification number of the reference image are output to the encoding mode determination unit 4.
Hereinafter, the processing content of the motion compensation prediction part 2 is demonstrated concretely.
However, here, for convenience of explanation, it is assumed that a predicted image is generated by generating a motion vector in units of macroblocks.

動き補償予測部2の動きベクトル探索部21は、符号化モードがインターモードである旨を示す情報を受信(例えば、外部からインターモードを使用する旨を示す情報を受信)すると、インターモードで最適な動きベクトルを探索し、その動きベクトルを動き補償処理部23に出力する。
インターモードで最適な動きベクトルを探索する処理自体は公知の技術であるため詳細な説明を省略する。
When the motion vector search unit 21 of the motion compensation prediction unit 2 receives information indicating that the coding mode is the inter mode (for example, receives information indicating that the inter mode is used from the outside), the motion vector search unit 21 is optimal in the inter mode. The motion vector is searched and the motion vector is output to the motion compensation processing unit 23.
Since the process of searching for an optimal motion vector in the inter mode is a known technique, detailed description thereof is omitted.

動き補償予測部2のダイレクトベクトル生成部22は、符号化モードがダイレクトモードである旨を示す情報を受信すると、符号化対象のマクロブロック毎に、空間ダイレクトモードの空間ダイレクトベクトルと時間ダイレクトモードの時間ダイレクトベクトルを生成し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を動きベクトルとして動き補償処理部23に出力する。   When the direct vector generation unit 22 of the motion compensated prediction unit 2 receives information indicating that the encoding mode is the direct mode, the direct vector generation unit 22 of the spatial direct mode and the temporal direct mode of each of the encoding target macroblocks are received. A temporal direct vector is generated, and either the spatial direct vector or temporal direct vector is output to the motion compensation processing unit 23 as a motion vector.

即ち、ダイレクトベクトル生成部22の空間ダイレクトベクトル生成部31は、動きベクトルメモリ1により格納されている符号化済みマクロブロックの動きベクトルの中から、符号化対象のマクロブロックの周囲に位置している符号化済みマクロブロックの動きベクトルを読み出し、その動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成する(図12のステップST1)。
また、ダイレクトベクトル生成部22の時間ダイレクトベクトル生成部32は、動きベクトルメモリ1により格納されている符号化済みマクロブロックの動きベクトルの中から、符号化対象のマクロブロックの時間的に近傍にある符号化済みピクチャの動きベクトルであって、符号化対象のマクロブロックと空間的に同じ位置にあるマクロブロックの動きベクトルを読み出し、その動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成する(ステップST2)。
That is, the spatial direct vector generation unit 31 of the direct vector generation unit 22 is located around the macroblock to be encoded from among the motion vectors of the encoded macroblock stored in the motion vector memory 1. The motion vector of the encoded macroblock is read, and a spatial direct vector in the spatial direct mode is generated from the motion vector (step ST1 in FIG. 12).
Further, the temporal direct vector generation unit 32 of the direct vector generation unit 22 is in the temporal vicinity of the macroblock to be encoded from among the motion vectors of the encoded macroblocks stored in the motion vector memory 1. A motion vector of a coded picture that is in the same spatial position as the macroblock to be coded is read out, and a temporal direct vector in temporal direct mode is generated from the motion vector (step ST2). ).

ここで、図9は時間ダイレクトモードで動きベクトル(時間ダイレクトベクトル)を生成する方法を示す模式図である。
例えば、ピクチャB2の中のマクロブロックMB1が符号化対象のマクロブロックであり、マクロブロックMB1を時間ダイレクトモードで符号化する場合を想定する。
この場合、ピクチャB2の時間軸上後方にある符号化済みピクチャのうち、ピクチャB2に一番近いピクチャP3の動きベクトルであって、マクロブロックMB1と空間的に同じ位置にあるマクロブロックMB2の動きベクトルMVを用いる。
この動きベクトルMVはピクチャP0を参照しており、マクロブロックMB1を符号化する際に用いる動きベクトルMVL0,MVL1は、以下の式(3)で求められる。
Here, FIG. 9 is a schematic diagram showing a method of generating a motion vector (temporal direct vector) in the temporal direct mode.
For example, it is assumed that the macroblock MB1 in the picture B2 is a macroblock to be encoded and the macroblock MB1 is encoded in the temporal direct mode.
In this case, the motion of the macroblock MB2 which is the motion vector of the picture P3 closest to the picture B2 among the encoded pictures located on the rear side of the picture B2 on the time axis, and is in the same spatial position as the macroblock MB1. Vector MV is used.
The motion vector MV refers to the picture P0, and the motion vectors MVL0 and MVL1 used when encoding the macroblock MB1 are obtained by the following equation (3).

Figure 2011099242
時間ダイレクトベクトル生成部32は、動きベクトルMVL0,MVL1を算出すると、その動きベクトルMVL0,MVL1を時間ダイレクトモードの時間ダイレクトベクトルとしてダイレクトベクトル判定部33に出力する。
ただし、時間ダイレクトベクトル生成部32における時間ダイレクトベクトルの生成方法は、図9に示すようなH.264方式を用いてもよいが、これに限るものではなく、他の方法を用いてもよい。
Figure 2011099242
After calculating the motion vectors MVL0 and MVL1, the temporal direct vector generation unit 32 outputs the motion vectors MVL0 and MVL1 to the direct vector determination unit 33 as temporal direct vectors in the temporal direct mode.
However, the method of generating the time direct vector in the time direct vector generating unit 32 is H.264 as shown in FIG. However, the present invention is not limited to this, and other methods may be used.

図10は空間ダイレクトモードで動きベクトル(空間ダイレクトベクトル)を生成する方法を示す模式図である。
図10において、currentMBは、符号化対象のマクロブロックを表している。
このとき、符号化対象のマクロブロックの左横の符号化済マクロブロックAの動きベクトルをMVa、符号化対象のマクロブロックの上の符号化済マクロブロックBの動きベクトルをMVb、符号化対象のマクロブロックの右上の符号化済マクロブロックCの動きベクトルをMVcとすると、下記の式(4)に示すように、これらの動きベクトルMVa,MVb,MVcのメディアン(中央値)を求めることにより、符号化対象のマクロブロックの動きベクトルMVを算出することができる。
MV=median(MVa、MVb、MVc) (4)
FIG. 10 is a schematic diagram showing a method of generating a motion vector (spatial direct vector) in the spatial direct mode.
In FIG. 10, currentMB represents a macroblock to be encoded.
At this time, the motion vector of the encoded macroblock A on the left side of the macroblock to be encoded is MVa, the motion vector of the encoded macroblock B above the macroblock to be encoded is MVb, Assuming that the motion vector of the encoded macroblock C at the upper right of the macroblock is MVc, by obtaining the median (median value) of these motion vectors MVa, MVb, and MVc as shown in the following equation (4), The motion vector MV of the macroblock to be encoded can be calculated.
MV = median (MVa, MVb, MVc) (4)

空間ダイレクトモードでは、前方及び後方のそれぞれについて動きベクトルを求めるが、どちらも上記の方法を用いて求めることが可能である。
空間ダイレクトベクトル生成部31は、上記のようにして、前方及び後方の動きベクトルMVを算出すると、前方及び後方の動きベクトルMVを空間ダイレクトモードの空間ダイレクトベクトルとしてダイレクトベクトル判定部33に出力する。
ただし、空間ダイレクトベクトル生成部31における空間ダイレクトベクトルの生成方法は、図10に示すようなH.264方式を用いてもよいが、これに限るものではなく、他の方法を用いてもよい。
In the spatial direct mode, motion vectors are obtained for each of the front and rear, both of which can be obtained using the above method.
After calculating the forward and backward motion vectors MV as described above, the spatial direct vector generation unit 31 outputs the forward and backward motion vectors MV to the direct vector determination unit 33 as spatial direct vectors in the spatial direct mode.
However, the spatial direct vector generation method in the spatial direct vector generation unit 31 is H.264 as shown in FIG. However, the present invention is not limited to this, and other methods may be used.

ダイレクトベクトル生成部22のダイレクトベクトル判定部33は、空間ダイレクトベクトル生成部31が空間ダイレクトベクトルを生成すると、その空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出する。
また、ダイレクトベクトル判定部33は、時間ダイレクトベクトル生成部32が時間ダイレクトベクトルを生成すると、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する。
ダイレクトベクトル判定部33は、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、以下に記載するような判定手段によってダイレクトモードのダイレクトベクトルを選択して動き補償処理部23に出力する。
When the spatial direct vector generation unit 31 generates a spatial direct vector, the direct vector determination unit 33 of the direct vector generation unit 22 calculates an evaluation value in the spatial direct mode using the spatial direct vector.
Further, when the temporal direct vector generation unit 32 generates a temporal direct vector, the direct vector determination unit 33 calculates an evaluation value in the temporal direct mode using the temporal direct vector.
The direct vector determination unit 33 compares the evaluation value of the spatial direct mode with the evaluation value of the temporal direct mode, and the direct mode direct vector is determined by the determination unit as described below, out of the spatial direct vector or the temporal direct vector. Is output to the motion compensation processing unit 23.

以下、ダイレクトベクトル判定部33の処理内容を具体的に説明する。
ダイレクトベクトル判定部33の動き補償部41は、空間ダイレクトベクトル生成部31が空間ダイレクトベクトルMVL0,MVL1を生成すると、図11に示すように、その空間ダイレクトベクトルMVL0を用いて、空間ダイレクトモードの前方予測画像fspatialを生成し、その空間ダイレクトベクトルMVL1を用いて、空間ダイレクトモードの後方予測画像gspatialを生成する(ステップST3)。
また、動き補償部41は、時間ダイレクトベクトル生成部32が前方及び後方の動きベクトルMVである時間ダイレクトベクトルを生成すると、図11に示すように、前方の動きベクトルMVである時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像ftemporalを生成し、後方の動きベクトルMVである時間ダイレクトベクトルを用いて、時間ダイレクトモードの後方予測画像gtemporalを生成する(ステップST4)。
Hereinafter, the processing content of the direct vector determination part 33 is demonstrated concretely.
When the spatial direct vector generation unit 31 generates the spatial direct vectors MVL0 and MVL1, the motion compensation unit 41 of the direct vector determination unit 33 uses the spatial direct vector MVL0 as shown in FIG. A predicted image f spatial is generated, and a backward predicted image g spatial in the spatial direct mode is generated using the spatial direct vector MVL1 (step ST3).
Further, when the temporal direct vector generation unit 32 generates the temporal direct vector that is the forward and backward motion vectors MV, the motion compensation unit 41 uses the temporal direct vector that is the forward motion vector MV, as shown in FIG. Then, the forward predicted image f temporal in the temporal direct mode is generated, and the backward predicted image g temporal in the temporal direct mode is generated using the temporal direct vector that is the backward motion vector MV (step ST4).

ダイレクトベクトル判定部33の類似度算出部42は、動き補償部41が空間ダイレクトモードの前方予測画像fspatialと後方予測画像gspatialを生成すると、空間ダイレクトモードの評価値SADspatialとして、その前方予測画像fspatialと後方予測画像gspatialの類似度を算出する(ステップST5)。
SADspatial=|fspatial−gspatial| (5)
また、類似度算出部42は、動き補償部41が時間ダイレクトモードの前方予測画像ftemporalと後方予測画像gtemporalを生成すると、時間ダイレクトモードの評価値SADtemporalとして、その前方予測画像ftemporalと後方予測画像gtemporalの類似度を算出する(ステップST6)。
SADtemporal=|ftemporal−gtemporal| (6)
なお、前方予測画像と後方予測画像間の差分が大きい程、2つの画像間の類似度が低くなり(2つの画像の差分絶対値和を示す評価値SADが大きくなる)、時間的な相関が低くなる。逆に、前方予測画像と後方予測画像間の差分が小さい程、2つの画像間の類似度が高くなり(2つの画像の差分絶対値和を示す評価値SADが小さくなる)、時間的な相関が高くなる。
When the motion compensation unit 41 generates the forward prediction image f spatial and the backward prediction image g spatial in the spatial direct mode, the similarity calculation unit 42 of the direct vector determination unit 33 generates the forward prediction as the spatial direct mode evaluation value SAD spatial. The similarity between the image f spatial and the backward predicted image g spatial is calculated (step ST5).
SAD spatial = | f spatial -g spatial | (5)
Further, when the motion compensation unit 41 generates the forward prediction image f temporal and the backward prediction image g temporal in the temporal direct mode, the similarity calculation unit 42 uses the forward prediction image f temporal and the evaluation value SAD temporal in the temporal direct mode as the temporal direct mode evaluation value S temporal . The similarity of the backward predicted image g temporal is calculated (step ST6).
SAD temporal = | f temporal -g temporal | (6)
Note that the greater the difference between the forward predicted image and the backward predicted image, the lower the similarity between the two images (the evaluation value SAD indicating the sum of absolute differences between the two images increases), and the temporal correlation is increased. Lower. On the contrary, the smaller the difference between the forward prediction image and the backward prediction image, the higher the similarity between the two images (the evaluation value SAD indicating the sum of absolute differences between the two images becomes smaller), and the temporal correlation Becomes higher.

ダイレクトベクトル判定部33のダイレクトベクトル選択部43は、類似度算出部42が空間ダイレクトモードの評価値SADspatialと、時間ダイレクトモードの評価値SADtemporalとを算出すると、その評価値SADspatialと評価値SADtemporalを比較することで、空間ダイレクトモードにおける前方予測画像fspatialと後方予測画像gspatialの類似度と、時間ダイレクトモードにおける前方予測画像ftemporalと後方予測画像gtemporalの類似度とを比較する(ステップST7)。When the similarity calculation unit 42 calculates the evaluation value SAD spatial in the spatial direct mode and the evaluation value SAD temporal in the temporal direct mode, the direct vector selection unit 43 of the direct vector determination unit 33 calculates the evaluation value SAD spatial and the evaluation value. By comparing SAD temporal , the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode is compared with the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode. (Step ST7).

ダイレクトベクトル選択部43は、空間ダイレクトモードにおける前方予測画像fspatialと後方予測画像gspatialの類似度が、時間ダイレクトモードにおける前方予測画像ftemporalと後方予測画像gtemporalの類似度より高い場合(SADspatial≦SADtemporal)、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する(ステップST8)。
一方、時間ダイレクトモードにおける前方予測画像ftemporalと後方予測画像gtemporalの類似度が、空間ダイレクトモードにおける前方予測画像fspatialと後方予測画像gspatialの類似度より高い場合(SADspatial>SADtemporal)、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する(ステップST9)。
The direct vector selection unit 43, when the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode is higher than the similarity between the forward predicted image f temporal and the backward predicted image g temporal (SAD). spatial ≦ SAD temporal ), the spatial direct vector generated by the spatial direct vector generation unit 31 is selected, and the spatial direct vector is output to the motion compensation processing unit 23 as a motion vector (step ST8).
On the other hand, when the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode is higher than the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode (SAD spatial > SAD temporal ). Then, the time direct vector generated by the time direct vector generation unit 32 is selected, and the time direct vector is output as a motion vector to the motion compensation processing unit 23 (step ST9).

動き補償処理部23は、符号化モードがダイレクトモードでないとき(ステップST10)、動きベクトル探索部21から動きベクトルを受けると、その動きベクトルとフレームメモリ9に格納されている1フレームの参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する(ステップST11)。
一方、符号化モードがダイレクトモードであるとき(ステップST10)、ダイレクトベクトル生成部22から動きベクトル(ダイレクトベクトル選択部43により選択されたダイレクトベクトル)を受けると、その動きベクトルとフレームメモリ9に格納されている1フレームの参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する(ステップST12)。
なお、動き補償処理部23の動き補償予測処理は公知の技術であるため詳細な説明を省略する。
When the motion compensation processing unit 23 receives a motion vector from the motion vector search unit 21 when the encoding mode is not the direct mode (step ST10), the motion compensation processing unit 23 reads the motion vector and a reference image of one frame stored in the frame memory 9. By using the motion compensation prediction process, a predicted image is generated (step ST11).
On the other hand, when the encoding mode is the direct mode (step ST10), when the motion vector (direct vector selected by the direct vector selection unit 43) is received from the direct vector generation unit 22, the motion vector is stored in the frame memory 9. A predicted image is generated by performing a motion compensation prediction process using the one frame of reference image (step ST12).
Note that the motion compensation prediction process of the motion compensation processing unit 23 is a known technique, and thus detailed description thereof is omitted.

ここでは、類似度算出部42が差分絶対値和である評価値SADを算出し、ダイレクトベクトル選択部43が評価値SADを比較するものについて示したが、類似度算出部42が評価値として、前方予測画像と後方予測画像間の差分二乗和SSEを算出し、ダイレクトベクトル選択部43が差分二乗和SSEを比較するようにしてもよい。SSEを用いることにより処理量は増えるが、より正確に類似度を算出することが可能となる。   Here, the similarity calculation unit 42 calculates the evaluation value SAD that is the sum of absolute differences, and the direct vector selection unit 43 compares the evaluation value SAD. However, the similarity calculation unit 42 uses the evaluation value as an evaluation value. The difference square sum SSE between the forward prediction image and the backward prediction image may be calculated, and the direct vector selection unit 43 may compare the difference square sum SSE. Although the amount of processing increases by using SSE, it becomes possible to calculate the similarity more accurately.

減算器3は、動き補償予測部2が予測画像を生成すると、その予測画像と入力画像の差分画像を算出して、その差分画像を示す予測差分信号を符号化モード判定部4に出力する(ステップST13)。
符号化モード判定部4は、減算器3から予測差分信号を受ける毎に、その予測差分信号の予測効率を評価して、減算器3から出力された少なくとも1以上の予測差分信号の中で、最も予測効率が高い予測差分信号を選択する。
符号化モード判定部4における予測差分信号の予測効率を評価する処理自体は公知の技術であるため詳細な説明を省略する。
When the motion compensated prediction unit 2 generates a prediction image, the subtracter 3 calculates a difference image between the prediction image and the input image, and outputs a prediction difference signal indicating the difference image to the encoding mode determination unit 4 ( Step ST13).
The encoding mode determination unit 4 evaluates the prediction efficiency of the prediction difference signal every time the prediction difference signal is received from the subtracter 3, and among the at least one prediction difference signal output from the subtractor 3, A prediction differential signal with the highest prediction efficiency is selected.
Since the process itself for evaluating the prediction efficiency of the prediction difference signal in the encoding mode determination unit 4 is a known technique, detailed description thereof is omitted.

符号化モード判定部4は、最も予測効率が高い予測差分信号を選択すると、動き補償予測部2において、その予測差分信号に係る予測画像の生成に用いられた動きベクトルと、マクロブロックタイプ/サブマクロブロックタイプ(例えば、当該マクロブロックにおいて使用されている符号化モードが、インターモード又はダイレクトモードのいずれであるかを示す情報を含む)と、参照画像の識別番号とを含む符号化モード情報を可変長符号化部10に出力する。
また、符号化モード判定部4は、最も予測効率が高い予測差分信号を圧縮部5に出力する(ステップST14)。
ただし、符号化モード判定部4は、符号化モードがインターモードであれば、予測画像の生成に用いられた動きベクトルを符号化モード情報に含めて、その動きベクトルを含んでいる符号化モード情報を可変長符号化部10に出力するが、符号化モードがダイレクトモードである場合には、予測画像の生成に用いられた動きベクトルを符号化モード情報に含めずに、その動きベクトルを含んでいない符号化モード情報を可変長符号化部10に出力する。
When the coding mode determination unit 4 selects the prediction difference signal with the highest prediction efficiency, the motion compensation prediction unit 2 uses the motion vector used to generate the prediction image related to the prediction difference signal, and the macroblock type / sub. Encoding mode information including a macroblock type (for example, including information indicating whether the encoding mode used in the macroblock is an inter mode or a direct mode) and a reference image identification number; It outputs to the variable length encoding part 10.
Moreover, the encoding mode determination part 4 outputs the prediction difference signal with the highest prediction efficiency to the compression part 5 (step ST14).
However, if the encoding mode is the inter mode, the encoding mode determination unit 4 includes the motion vector used for generating the predicted image in the encoding mode information, and includes the encoding mode information including the motion vector. Is output to the variable-length encoding unit 10, but when the encoding mode is the direct mode, the motion vector used for generating the predicted image is not included in the encoding mode information, but includes the motion vector. The encoding mode information which is not present is output to the variable length encoding unit 10.

圧縮部5は、符号化モード判定部4から予測差分信号を受けると、その予測差分信号に対するDCT処理を実施することで、DCT係数を算出して、そのDCT係数を量子化する(ステップST15)。
圧縮部5は、量子化後のDCT係数である圧縮データを局部復号部6及び可変長符号化部10に出力する。
When receiving the prediction difference signal from the encoding mode determination unit 4, the compression unit 5 performs DCT processing on the prediction difference signal, thereby calculating a DCT coefficient and quantizing the DCT coefficient (step ST15). .
The compression unit 5 outputs the compressed data that is the DCT coefficient after quantization to the local decoding unit 6 and the variable length coding unit 10.

局部復号部6は、圧縮部5から圧縮データを受けると、その圧縮データを逆量子化してDCT係数を求め、そのDCT係数に対する逆DCT処理を実施することで、符号化モード判定部4から出力された予測差分信号に相当する予測誤差信号を算出する。
加算器7は、局部復号部6が予測誤差信号を復号すると、その予測誤差信号と動き補償予測部2により生成された予測画像を示す予測信号を加算することで、局部復号画像を示す局部復号画像信号を生成する。
ループフィルタ8は、次の符号化処理に備えるため、加算器7から出力された局部復号画像信号に含まれている符号化歪みを補償し、符号化歪み補償後の局部復号画像信号が示す局部復号画像を参照画像としてフレームメモリ9に格納する。
When receiving the compressed data from the compression unit 5, the local decoding unit 6 dequantizes the compressed data to obtain a DCT coefficient, and performs an inverse DCT process on the DCT coefficient to output from the coding mode determination unit 4. A prediction error signal corresponding to the predicted prediction difference signal is calculated.
When the local decoding unit 6 decodes the prediction error signal, the adder 7 adds the prediction error signal and the prediction signal indicating the prediction image generated by the motion compensated prediction unit 2, thereby local decoding indicating the local decoded image. An image signal is generated.
In order to prepare for the next encoding process, the loop filter 8 compensates for the encoding distortion included in the locally decoded image signal output from the adder 7, and the local decoded image signal after the encoding distortion compensation indicates The decoded image is stored in the frame memory 9 as a reference image.

可変長符号化部10は、圧縮部5から圧縮データを受けると、その圧縮データと動き補償予測部2から出力された符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル(符号化モードがインターモードの場合)、参照画像の識別番号)をエントロピー符号化して、その符号化結果を示すビットストリームを生成し、そのビットストリームを出力する(ステップST16)。   When the variable length coding unit 10 receives the compressed data from the compression unit 5, the variable length coding unit 10 encodes the compressed data and the coding mode information output from the motion compensation prediction unit 2 (macroblock type / sub macroblock type, motion vector (coding). When the mode is the inter mode), the reference image identification number) is entropy-encoded, a bit stream indicating the encoding result is generated, and the bit stream is output (step ST16).

次に、図5の画像復号装置の処理内容を説明する。
可変長復号部52は、図1の画像符号化装置から出力されたビットストリームを入力すると、そのビットストリームから圧縮データ及び符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル(符号化モードがインターモードの場合)、参照画像の識別番号)をエントロピー復号して、その圧縮データを予測誤差復号部53に出力し、その符号化モード情報を動き補償予測部54に出力する(図13のステップST21)。
予測誤差復号部53は、可変長復号部52から圧縮データを受けると、その圧縮データを逆量子化してDCT係数を求め、そのDCT係数に対する逆DCT処理を実施することで、差分画像を示す予測誤差信号(図1の符号化モード判定部4から出力された予測差分信号に相当する予測誤差信号)を算出する(ステップST22)。
Next, processing contents of the image decoding apparatus in FIG. 5 will be described.
When the variable length decoding unit 52 receives the bit stream output from the image encoding apparatus of FIG. 1, the variable length decoding unit 52 receives compressed data and encoding mode information (macroblock type / sub macroblock type, motion vector (encoding) from the bitstream. When the mode is the inter mode), the reference image identification number) is entropy decoded, the compressed data is output to the prediction error decoding unit 53, and the encoding mode information is output to the motion compensation prediction unit 54 (FIG. 13). Step ST21).
When the prediction error decoding unit 53 receives the compressed data from the variable length decoding unit 52, the prediction error decoding unit 53 inversely quantizes the compressed data to obtain a DCT coefficient, and performs an inverse DCT process on the DCT coefficient, thereby predicting a difference image. An error signal (a prediction error signal corresponding to the prediction difference signal output from the encoding mode determination unit 4 in FIG. 1) is calculated (step ST22).

動き補償予測部54は、可変長復号部52から参照画像の識別番号を受けると、フレームメモリ57に格納されている1フレーム以上の参照画像の中から、その識別番号が示す参照画像の読み出しを行う。
また、動き補償予測部54は、可変長復号部52からマクロブロックタイプ/サブマクロブロックタイプを受けると、そのマクロブロックタイプ/サブマクロブロックタイプを参照して、図1の画像符号化装置が符号化モードとして、インターモードを使用しているのか、ダイレクトモードを使用しているのかを判別する(ステップST23)。
When the motion compensation prediction unit 54 receives the identification number of the reference image from the variable length decoding unit 52, the motion compensation prediction unit 54 reads the reference image indicated by the identification number from the reference images of one or more frames stored in the frame memory 57. Do.
Further, when the motion compensation prediction unit 54 receives the macro block type / sub macro block type from the variable length decoding unit 52, the motion encoding prediction unit 54 refers to the macro block type / sub macro block type and the image coding apparatus in FIG. It is determined whether the inter mode or the direct mode is used as the conversion mode (step ST23).

動き補償予測部54は、図1の画像符号化装置が符号化モードとして、インターモードを使用している場合、可変長復号部52から出力された動きベクトルと上記参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する(ステップST24)。
一方、図1の画像符号化装置が符号化モードとして、ダイレクトモードを使用している場合、図1の画像符号化装置における動き補償予測部2と同様にして、空間ダイレクトベクトルと時間ダイレクトベクトルを生成して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択し、その選択したダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する(ステップST25)。
The motion compensation prediction unit 54 uses the motion vector output from the variable length decoding unit 52 and the reference image when the image coding apparatus in FIG. 1 uses the inter mode as the coding mode. By performing the prediction process, a predicted image is generated (step ST24).
On the other hand, when the image coding apparatus in FIG. 1 uses the direct mode as the coding mode, the spatial direct vector and the temporal direct vector are obtained in the same manner as the motion compensation prediction unit 2 in the image coding apparatus in FIG. Generate a prediction image by selecting either the spatial direct vector or the temporal direct vector and performing the motion compensation prediction process using the selected direct vector and the reference image indicated by the identification number. (Step ST25).

以下、動き補償予測部54の処理内容を具体的に説明する。
動き補償予測部54のダイレクトベクトル生成部61は、可変長復号部52から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示している場合、復号対象のマクロブロック毎に、空間ダイレクトモードの空間ダイレクトベクトルと時間ダイレクトモードの時間ダイレクトベクトルを生成し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を動きベクトルとして動き補償処理部62に出力する。
Hereinafter, the processing content of the motion compensation prediction part 54 is demonstrated concretely.
If the direct vector generation unit 61 of the motion compensation prediction unit 54 indicates that the macroblock type / sub macroblock type output from the variable length decoding unit 52 uses the direct mode, the decoding target macroblock Each time, a spatial direct vector in the spatial direct mode and a temporal direct vector in the temporal direct mode are generated, and either one of the spatial direct vector or the temporal direct vector is output to the motion compensation processing unit 62 as a motion vector.

即ち、ダイレクトベクトル生成部61の空間ダイレクトベクトル生成部71は、動きベクトルメモリ51により格納されている復号済みマクロブロックの動きベクトルの中から、復号対象のマクロブロックの周囲に位置している復号済みマクロブロックの動きベクトルを読み出し、その動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成する。
ただし、空間ダイレクトベクトル生成部71における空間ダイレクトベクトルの生成方法は、図3の空間ダイレクトベクトル生成部31における空間ダイレクトベクトルの生成方法と同様であるため詳細な説明を省略する。
That is, the spatial direct vector generation unit 71 of the direct vector generation unit 61 is a decoded one located around the macroblock to be decoded from among the motion vectors of the decoded macroblocks stored in the motion vector memory 51. The motion vector of the macroblock is read, and a spatial direct vector in the spatial direct mode is generated from the motion vector.
However, the spatial direct vector generation method in the spatial direct vector generation unit 71 is the same as the spatial direct vector generation method in the spatial direct vector generation unit 31 in FIG.

ダイレクトベクトル生成部61の時間ダイレクトベクトル生成部72は、動きベクトルメモリ51により格納されている復号済みマクロブロックの動きベクトルの中から、復号対象のマクロブロックの時間的に近傍にある復号済みピクチャの動きベクトルであって、復号対象のマクロブロックと空間的に同じ位置にあるマクロブロックの動きベクトルを読み出し、その動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成する。
ただし、時間ダイレクトベクトル生成部72における時間ダイレクトベクトルの生成方法は、図3の時間ダイレクトベクトル生成部32における時間ダイレクトベクトルの生成方法と同様であるため詳細な説明を省略する。
The temporal direct vector generation unit 72 of the direct vector generation unit 61 selects a decoded picture in the temporal vicinity of the macroblock to be decoded from among the motion vectors of the decoded macroblock stored in the motion vector memory 51. A motion vector of a macroblock located in the same spatial position as the macroblock to be decoded is read out, and a temporal direct vector in temporal direct mode is generated from the motion vector.
However, the method for generating the time direct vector in the time direct vector generation unit 72 is the same as the method for generating the time direct vector in the time direct vector generation unit 32 in FIG.

ダイレクトベクトル生成部61のダイレクトベクトル判定部73は、空間ダイレクトベクトル生成部71が空間ダイレクトベクトルを生成すると、その空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出する。
また、ダイレクトベクトル判定部73は、時間ダイレクトベクトル生成部72が時間ダイレクトベクトルを生成すると、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する。
ダイレクトベクトル判定部73は、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、適正な方のダイレクトモードのダイレクトベクトルを選択して動き補償処理部62に出力する。
When the spatial direct vector generation unit 71 generates a spatial direct vector, the direct vector determination unit 73 of the direct vector generation unit 61 calculates an evaluation value of the spatial direct mode using the spatial direct vector.
Further, when the temporal direct vector generation unit 72 generates a temporal direct vector, the direct vector determination unit 73 calculates an evaluation value in the temporal direct mode using the temporal direct vector.
The direct vector determination unit 73 compares the evaluation value of the spatial direct mode with the evaluation value of the temporal direct mode, selects the appropriate direct mode direct vector from the spatial direct vector or temporal direct vector, and moves. The data is output to the compensation processing unit 62.

以下、ダイレクトベクトル判定部73の処理内容を具体的に説明する。
ダイレクトベクトル判定部73の動き補償部81は、空間ダイレクトベクトル生成部71が空間ダイレクトベクトルMVL0,MVL1を生成すると、図11に示すように、その空間ダイレクトベクトルMVL0を用いて、空間ダイレクトモードの前方予測画像fspatialを生成し、その空間ダイレクトベクトルMVL1を用いて、空間ダイレクトモードの後方予測画像gspatialを生成する。
また、動き補償部81は、時間ダイレクトベクトル生成部72が前方及び後方の動きベクトルMVである時間ダイレクトベクトルを生成すると、図11に示すように、前方の動きベクトルMVである時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像ftemporalを生成し、後方の動きベクトルMVである時間ダイレクトベクトルを用いて、時間ダイレクトモードの後方予測画像gtemporalを生成する。
Hereinafter, the processing content of the direct vector determination part 73 is demonstrated concretely.
When the spatial direct vector generation unit 71 generates the spatial direct vectors MVL0 and MVL1, the motion compensation unit 81 of the direct vector determination unit 73 uses the spatial direct vector MVL0 as shown in FIG. A predicted image f spatial is generated, and a backward predicted image g spatial in the spatial direct mode is generated using the spatial direct vector MVL1.
Further, when the temporal direct vector generation unit 72 generates the temporal direct vector that is the forward and backward motion vectors MV, the motion compensation unit 81 uses the temporal direct vector that is the forward motion vector MV, as shown in FIG. Then, the temporal prediction mode f temporal is generated, and the temporal prediction vector g temporal in the temporal direct mode is generated using the temporal direct vector that is the backward motion vector MV.

ダイレクトベクトル判定部73の類似度算出部82は、動き補償部81が空間ダイレクトモードの前方予測画像fspatialと後方予測画像gspatialを生成すると、図4の類似度算出部42と同様に、空間ダイレクトモードの評価値SADspatialとして、その前方予測画像fspatialと後方予測画像gspatialの類似度を算出する。
また、類似度算出部82は、動き補償部81が時間ダイレクトモードの前方予測画像ftemporalと後方予測画像gtemporalを生成すると、図4の類似度算出部42と同様に、時間ダイレクトモードの評価値SADtemporalとして、その前方予測画像ftemporalと後方予測画像gtemporalの類似度を算出する。
なお、前方予測画像と後方予測画像間の差分が大きい程、2つの画像間の類似度が低くなり(2つの画像の差分絶対値和を示す評価値SADが大きくなる)、時間的な相関が低くなる。逆に、前方予測画像と後方予測画像間の差分が小さい程、2つの画像間の類似度が高くなり(2つの画像の差分絶対値和を示す評価値SADが小さくなる)、時間的な相関が高くなる。
When the motion compensation unit 81 generates the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode, the similarity calculation unit 82 of the direct vector determination unit 73, like the similarity calculation unit 42 in FIG. As the direct mode evaluation value SAD spatial , the degree of similarity between the forward predicted image f spatial and the backward predicted image g spatial is calculated.
Further, when the motion compensation unit 81 generates the forward prediction image f temporal and the backward prediction image g temporal in the temporal direct mode, the similarity calculation unit 82 evaluates the temporal direct mode as in the similarity calculation unit 42 of FIG. As the value SAD temporal , the similarity between the forward predicted image f temporal and the backward predicted image g temporal is calculated.
Note that the greater the difference between the forward predicted image and the backward predicted image, the lower the similarity between the two images (the evaluation value SAD indicating the sum of absolute differences between the two images increases), and the temporal correlation is increased. Lower. On the contrary, the smaller the difference between the forward prediction image and the backward prediction image, the higher the similarity between the two images (the evaluation value SAD indicating the sum of absolute differences between the two images becomes smaller), and the temporal correlation Becomes higher.

ダイレクトベクトル判定部73のダイレクトベクトル選択部83は、類似度算出部82が空間ダイレクトモードの評価値SADspatialと、時間ダイレクトモードの評価値SADtemporalとを算出すると、図4のダイレクトベクトル選択部43と同様に、その評価値SADspatialと評価値SADtemporalを比較することで、空間ダイレクトモードにおける前方予測画像fspatialと後方予測画像gspatialの類似度と、時間ダイレクトモードにおける前方予測画像ftemporalと後方予測画像gtemporalの類似度とを比較する。The direct vector selection unit 83 of the direct vector determination unit 73 calculates the evaluation value SAD spatial in the spatial direct mode and the evaluation value SAD temporal in the temporal direct mode when the similarity calculation unit 82 calculates the direct vector selection unit 43 in FIG. Similarly, by comparing the evaluation value SAD spatial and the evaluation value SAD temporal , the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode, and the forward predicted image f temporal in the temporal direct mode and The similarity of the backward prediction image g temporal is compared.

ダイレクトベクトル選択部83は、空間ダイレクトモードにおける前方予測画像fspatialと後方予測画像gspatialの類似度が、時間ダイレクトモードにおける前方予測画像ftemporalと後方予測画像gtemporalの類似度より高い場合(SADspatial≦SADtemporal)、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
一方、時間ダイレクトモードにおける前方予測画像ftemporalと後方予測画像gtemporalの類似度が、空間ダイレクトモードにおける前方予測画像fspatialと後方予測画像gspatialの類似度より高い場合(SADspatial>SADtemporal)、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
The direct vector selection unit 83 determines that the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode is higher than the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode (SAD). spatial ≦ SAD temporal ), the spatial direct vector generated by the spatial direct vector generation unit 71 is selected, and the spatial direct vector is output to the motion compensation processing unit 62 as a motion vector.
On the other hand, when the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode is higher than the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode (SAD spatial > SAD temporal ). The temporal direct vector generated by the temporal direct vector generation unit 72 is selected, and the temporal direct vector is output to the motion compensation processing unit 62 as a motion vector.

動き補償処理部62は、可変長復号部52から出力されたマクロブロックタイプ/サブマクロブロックタイプがインターモードを使用している旨を示している場合、可変長復号部52から出力された動きベクトルとフレームメモリ9に格納されている1フレームの参照画像(可変長復号部52から出力された識別番号が示す参照画像)を用いて、動き補償予測処理を実施することで、予測画像を生成する。
一方、可変長復号部52から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示している場合、ダイレクトベクトル生成部61から出力された動きベクトルとフレームメモリ9に格納されている1フレームの参照画像(可変長復号部52から出力された識別番号が示す参照画像)を用いて、動き補償予測処理を実施することで、予測画像を生成する。
なお、動き補償処理部62の動き補償予測処理は公知の技術であるため詳細な説明を省略する。
When the macroblock type / sub macroblock type output from the variable length decoding unit 52 indicates that the inter mode is used, the motion compensation processing unit 62 outputs the motion vector output from the variable length decoding unit 52. And a one-frame reference image stored in the frame memory 9 (a reference image indicated by the identification number output from the variable-length decoding unit 52) is used to generate a predicted image by performing motion compensation prediction processing. .
On the other hand, when the macroblock type / sub macroblock type output from the variable length decoding unit 52 indicates that the direct mode is used, the motion vector output from the direct vector generation unit 61 and the frame memory 9 are stored. A predicted image is generated by performing the motion compensation prediction process using the stored reference image of one frame (the reference image indicated by the identification number output from the variable length decoding unit 52).
Since the motion compensation prediction process of the motion compensation processing unit 62 is a known technique, detailed description thereof is omitted.

ここでは、類似度算出部82が差分絶対値和である評価値SADを算出し、ダイレクトベクトル選択部83が評価値SADを比較するものについて示したが、類似度算出部82が評価値として、前方予測画像と後方予測画像間の差分二乗和SSEを算出し、ダイレクトベクトル選択部83が差分二乗和SSEを比較するようにしてもよい。なお、類似度算出部82は符号化器の類似度算出部46と同一の評価値を用いる。   Here, the similarity calculation unit 82 calculates the evaluation value SAD that is the sum of absolute differences, and the direct vector selection unit 83 compares the evaluation value SAD. However, the similarity calculation unit 82 uses the evaluation value as an evaluation value. The difference square sum SSE between the forward prediction image and the backward prediction image may be calculated, and the direct vector selection unit 83 may compare the difference square sum SSE. The similarity calculation unit 82 uses the same evaluation value as the encoder similarity calculation unit 46.

加算器55は、動き補償予測部54が予測画像を生成すると、その予測画像と予測誤差復号部53から出力された予測誤差信号が示す差分画像を加算して、図1の画像符号化装置の加算器7から出力された局部復号画像に相当する復号画像を示す復号画像信号を生成する(ステップST26)。
ループフィルタ56は、加算器55が復号画像信号を生成すると、その復号画像信号に含まれている符号化歪みを補償し、符号化歪み補償後の復号画像信号が示す復号画像を参照画像としてフレームメモリ57に格納するとともに、その復号画像を外部に出力する(ステップST27)。
When the motion compensated prediction unit 54 generates a prediction image, the adder 55 adds the prediction image and the difference image indicated by the prediction error signal output from the prediction error decoding unit 53, and the adder 55 of the image encoding device in FIG. A decoded image signal indicating a decoded image corresponding to the locally decoded image output from the adder 7 is generated (step ST26).
When the adder 55 generates a decoded image signal, the loop filter 56 compensates for the encoding distortion included in the decoded image signal, and uses the decoded image indicated by the decoded image signal after the encoding distortion compensation as a reference image as a frame. While being stored in the memory 57, the decoded image is output to the outside (step ST27).

以上で明らかなように、この実施の形態1によれば、符号化対象のマクロブロックの周囲に位置している符号化済みマクロブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、符号化対象のマクロブロックの時間的に近傍にある符号化済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成部22と、ダイレクトベクトル生成部22により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する類似度算出部42と、類似度算出部42により算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択部43とを設け、動き補償処理部23がダイレクトベクトル選択部43により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成するように構成したので、マクロブロック単位に最適なダイレクトモードを選択することができるようになり、その結果、不必要な動きベクトルの符号化を避けて、符号量の増加を防止することができる画像符号化装置が得られる効果を奏する。   As apparent from the above, according to the first embodiment, a spatial direct vector in the spatial direct mode is generated from the motion vector of the encoded macroblock located around the encoding target macroblock, A direct vector generation unit 22 that generates a temporal direct vector in temporal direct mode from a motion vector of an encoded picture that is temporally close to a macroblock to be encoded, and a spatial direct vector generated by the direct vector generation unit 22 Is used to calculate the evaluation value of the spatial direct mode, and using the temporal direct vector, the similarity calculation unit 42 that calculates the evaluation value of the temporal direct mode, and the spatial direct calculated by the similarity calculation unit 42 Mode evaluation value and time direct mode And a direct vector selection unit 43 that selects either a spatial direct vector or a temporal direct vector, and the motion compensation processing unit 23 uses the direct vector selected by the direct vector selection unit 43. Since the motion compensation prediction process is performed to generate a predicted image, the optimum direct mode can be selected for each macroblock. As a result, unnecessary motion vector codes can be selected. This produces an effect of obtaining an image encoding device that can avoid the increase in code amount and prevent the increase in code amount.

また、この実施の形態1によれば、復号対象のマクロブロックの周囲に位置している復号済みマクロブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、復号対象のマクロブロックの時間的に近傍にある復号済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成部61と、ダイレクトベクトル生成部61により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する類似度算出部82と、類似度算出部82により算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択部83とを設け、動き補償処理部62がダイレクトベクトル選択部83により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成するように構成したので、マクロブロック単位に最適なダイレクトモードを選択することができるような符号化データを符号化可能な画像復号装置が得られる効果を奏する。   Further, according to the first embodiment, the spatial direct vector of the spatial direct mode is generated from the motion vector of the decoded macroblock located around the macroblock to be decoded, and the time of the macroblock to be decoded is determined. A direct vector generation unit 61 that generates a temporal direct vector of temporal direct mode from motion vectors of decoded pictures that are adjacent to each other, and evaluation of the spatial direct mode using the spatial direct vector generated by the direct vector generation unit 61 A similarity calculation unit 82 that calculates an evaluation value of the temporal direct mode using the temporal direct vector, and the evaluation value of the spatial direct mode calculated by the similarity calculation unit 82 and the temporal direct mode Compare evaluation values A direct vector selection unit 83 that selects either a direct vector or a temporal direct vector, and the motion compensation processing unit 62 performs a motion compensation prediction process using the direct vector selected by the direct vector selection unit 83. Thus, since the prediction image is generated, there is an effect that an image decoding apparatus capable of encoding encoded data that can select an optimum direct mode for each macroblock is obtained.

実施の形態2.
上記実施の形態1では、類似度算出部42,82が、空間ダイレクトモードの評価値SADspatialとして、空間ダイレクトモードの前方予測画像fspatialと後方予測画像gspatialの類似度を算出する一方、時間ダイレクトモードの評価値SADtemporalとして、時間ダイレクトモードの前方予測画像ftemporalと後方予測画像gtemporalの類似度を算出するものについて示したが、空間ダイレクトモードの評価値として、符号化対象(復号対象)のマクロブロックの周囲に位置している符号化済みマクロブロック(復号済みマクロブロック)の動きベクトルの分散値σ(spatial)を算出する一方、時間ダイレクトモードの評価値として、符号化対象のマクロブロック(復号済みマクロブロック)の時間的に近傍にある符号化済みピクチャ(復号済みピクチャ)において、符号化対象のマクロブロック(復号済みマクロブロック)と空間的に同じ位置にあるマクロブロックの周囲に位置している符号化済みブロック(復号済みマクロブロック)の動きベクトルの分散値σ(temporal)を算出するようにしてもよく、上記実施の形態1と同様の効果を奏することができる。
Embodiment 2. FIG.
In the first embodiment, the similarity calculation units 42 and 82 calculate the similarity between the spatial prediction mode forward predicted image f spatial and the backward prediction image g spatial as the spatial direct mode evaluation value SAD spatial , As the evaluation value SAD temporal of the direct mode, the calculation of the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode has been shown, but as the evaluation value of the spatial direct mode, the encoding target (decoding target) ) Of motion vectors of encoded macroblocks (decoded macroblocks) located around the macroblock of () are calculated, while a macro to be encoded is used as an evaluation value in the temporal direct mode. Block (Decrypted In a coded picture (decoded picture) that is close in time to (macroblock), it is located around a macroblock that is in the same spatial position as the macroblock to be coded (decoded macroblock) The variance σ (temporal) of the motion vector of the encoded block (decoded macro block) may be calculated, and the same effect as in the first embodiment can be obtained.

即ち、類似度算出部42,82が、空間ダイレクトモードの評価値SADspatialとして、空間ダイレクトモードの前方予測画像fspatialと後方予測画像gspatialの類似度を算出する代わりに、図14(a)に示すように、符号化対象(復号対象)のマクロブロックの周囲に位置している符号化済みマクロブロック(復号済みマクロブロック)の動きベクトルの分散値σ(spatial)を算出する(下記の式(7)を参照)。
また、類似度算出部42,82が、時間ダイレクトモードの評価値SADtemporalとして、時間ダイレクトモードの前方予測画像ftemporalと後方予測画像gtemporalの類似度を算出する代わりに、図14(b)に示すように、符号化対象のマクロブロック(復号済みマクロブロック)の時間的に近傍にある符号化済みピクチャ(復号済みピクチャ)において、符号化対象のマクロブロック(復号済みマクロブロック)と空間的に同じ位置にあるマクロブロックの周囲に位置している符号化済みブロック(復号済みマクロブロック)の動きベクトルの分散値σ(temporal)を算出する(下記の式(7)を参照)。
That is, instead of calculating the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode, the similarity calculating units 42 and 82 calculate the spatial direct mode evaluation value SAD spatial in FIG. As shown in FIG. 5, a variance σ (spatial) of a motion vector of a coded macroblock (decoded macroblock) located around a macroblock to be coded (decoded) is calculated (the following formula (See (7)).
Further, instead of the similarity calculation units 42 and 82 calculating the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode as the evaluation value SAD temporal in the temporal direct mode, FIG. As shown in FIG. 4, in a coded picture (decoded picture) that is temporally close to a macro block to be encoded (decoded macro block), a spatial relationship between the macro block to be encoded (decoded macro block) and spatial The variance σ (temporal) of the motion vector of the encoded block (decoded macroblock) located around the macroblock at the same position is calculated (see the following equation (7)).

Figure 2011099242
ただし、
Figure 2011099242
は周囲の動きベクトルを示し、
Figure 2011099242
は周囲の動きベクトルの平均を示している。
また、mはspatial又はtemporalを示す記号である。
Figure 2011099242
However,
Figure 2011099242
Indicates the surrounding motion vector,
Figure 2011099242
Indicates the average of surrounding motion vectors.
M is a symbol indicating spatial or temporal.

ダイレクトベクトル選択部43,83は、動きベクトルの分散値σ(spatial)と動きベクトルの分散値σ(temporal)とを比較し、動きベクトルの分散値σ(spatial)が動きベクトルの分散値σ(temporal)より大きい場合、空間ダイレクトモードの動きベクトル(空間ダイレクトベクトル)の信頼性が低いと判断して、時間ダイレクトモードの動きベクトル(時間ダイレクトベクトル)を選択する。
一方、動きベクトルの分散値σ(temporal)が動きベクトルの分散値σ(spatial)より大きい場合、時間ダイレクトモードの動きベクトル(時間ダイレクトベクトル)の信頼性が低いと判断して、空間ダイレクトモードの動きベクトル(空間ダイレクトベクトル)を選択する。
The direct vector selection units 43 and 83 compare the motion vector variance σ (spatial) with the motion vector variance σ (temporal), and the motion vector variance σ (spatial) is the motion vector variance σ ( If it is greater than (temporal), it is determined that the spatial direct mode motion vector (spatial direct vector) has low reliability, and the temporal direct mode motion vector (temporal direct vector) is selected.
On the other hand, when the motion vector variance σ (temporal) is larger than the motion vector variance σ (spatial), it is determined that the reliability of the motion vector in the temporal direct mode (temporal direct vector) is low, and the spatial direct mode Select a motion vector (spatial direct vector).

実施の形態3.
上記実施の形態1では、符号化モードがダイレクトモードであれば、マクロブロック単位に、空間ダイレクトベクトルと時間ダイレクトベクトルを生成して、空間ダイレクトベクトル又は時間ダイレクトベクトルを選択し、その選択したダイレクトベクトルを用いて、予測画像を生成するものについて示したが、例えば、スライスヘッダに含まれているダイレクトモード切替フラグである“direct_spatial_mv_pred_flag”が無意(例えば、“0”)である場合に限り、上記実施の形態1と同様な予測画像生成処理を実施し、そのダイレクトモード切替フラグが有意(例えば、“1”又は“2”)である場合、そのダイレクトモード切替フラグが指示するダイレクトモードのダイレクトベクトルを選択する(例えば、フラグ=1の場合、空間ダイレクトモードの空間ダイレクトベクトルを選択し、フラグ=2の場合、時間ダイレクトモードの時間ダイレクトベクトルを選択する)ようにしてもよい。
Embodiment 3 FIG.
In Embodiment 1 above, if the encoding mode is the direct mode, a spatial direct vector and a temporal direct vector are generated for each macroblock, a spatial direct vector or a temporal direct vector is selected, and the selected direct vector is selected. However, only when the “direct_spatial_mv_pred_flag”, which is a direct mode switching flag included in the slice header, is unintentional (for example, “0”), the above-described implementation is performed. When the predicted image generation processing similar to that in the first embodiment is performed and the direct mode switching flag is significant (for example, “1” or “2”), the direct mode direct vector indicated by the direct mode switching flag is set. Select (for example, If flag = 1, then select the spatial direct vector in spatial direct mode, if flag = 2, may be time to select a temporal direct vector of the direct mode) as.

以下、この実施の形態3の処理内容を具体的に説明する。
ここでは、説明の便宜上、スライスヘッダに含まれているダイレクトモード切替フラグが“0”であれば、上記実施の形態1と同様な予測画像生成処理を実施するものとする(マクロブロック単位に、空間ダイレクトベクトル又は時間ダイレクトベクトルを選択する)。
ダイレクトモード切替フラグが“1”であれば、当該スライスにおいては、全てのマクロブロックに対して、空間ダイレクトモードの空間ダイレクトベクトルを選択するものとする。
また、ダイレクトモード切替フラグが“2”であれば、当該スライスにおいては、全てのマクロブロックに対して、時間ダイレクトモードの時間ダイレクトベクトルを選択するものとする。
この実施の形態3では、ダイレクトモード切替フラグが“1”又は“2”である場合、スライス単位で、空間ダイレクトベクトル又は時間ダイレクトベクトルに切り替えることになるが、これに限るものではなく、例えば、ピクチャ単位やシーケンス単位で、空間ダイレクトベクトル又は時間ダイレクトベクトルに切り替えるようにしてもよい。
Hereinafter, the processing content of this Embodiment 3 is demonstrated concretely.
Here, for convenience of explanation, if the direct mode switching flag included in the slice header is “0”, the prediction image generation processing similar to that in the first embodiment is performed (in macroblock units, Select spatial direct vector or temporal direct vector).
If the direct mode switching flag is “1”, the spatial direct vector in the spatial direct mode is selected for all macroblocks in the slice.
If the direct mode switching flag is “2”, temporal direct vectors in the temporal direct mode are selected for all macroblocks in the slice.
In the third embodiment, when the direct mode switching flag is “1” or “2”, switching to a spatial direct vector or a temporal direct vector is performed in units of slices. You may make it switch to a space direct vector or a time direct vector per picture unit or sequence unit.

なお、この実施の形態3では、ダイレクトモード切替フラグが、3つの状態(“0”、“1”、“2”)を表すものとして説明するが、これに限るものではなく、例えば、ダイレクトモード切替フラグがON(有意)又はOFF(無意)のみを表す場合、更に、別のフラグ(例えば、プロファイル情報や、constraint_set_flagなど)を入力するようにしてもよい。
即ち、ダイレクトモード切替フラグがOFFである場合、上記実施の形態1と同様な予測画像生成処理を実施する。
一方、ダイレクトモード切替フラグがONである場合、例えば、別のフラグ情報が“0”であれば、空間ダイレクトモードの空間ダイレクトベクトルを選択し、別のフラグが“1”であれば、時間ダイレクトモードの時間ダイレクトベクトルを選択するようにする。
In the third embodiment, the direct mode switching flag is described as representing three states (“0”, “1”, “2”). However, the present invention is not limited to this. When the switching flag represents only ON (significant) or OFF (unintentional), another flag (for example, profile information, constraint_set_flag, etc.) may be input.
That is, when the direct mode switching flag is OFF, the same predicted image generation processing as that in the first embodiment is performed.
On the other hand, when the direct mode switching flag is ON, for example, when another flag information is “0”, a spatial direct vector in the spatial direct mode is selected, and when another flag is “1”, time direct Select the time direct vector of the mode.

図15はこの発明の実施の形態3による画像符号化装置を示す構成図であり、図において、図1と同一符号は同一又は相当部分を示すので説明を省略する。
動き補償予測部11はスライスヘッダに含まれているダイレクトモード切替フラグが“0”である場合、図1の動き補償予測部2と同様の処理を実施する。
また、動き補償予測部11はスライスヘッダに含まれているダイレクトモード切替フラグが“1”である場合、空間ダイレクトモードの空間ダイレクトベクトルを生成し、その空間ダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
また、動き補償予測部11はスライスヘッダに含まれているダイレクトモード切替フラグが“2”である場合、時間ダイレクトモードの時間ダイレクトベクトルを生成し、その時間ダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
ただし、動き補償予測部11は、図1の動き補償予測部2と同様に、動きベクトル探索部21、ダイレクトベクトル生成部22及び動き補償処理部23から構成されている(図2を参照)。
FIG. 15 is a block diagram showing an image encoding apparatus according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
When the direct mode switching flag included in the slice header is “0”, the motion compensation prediction unit 11 performs the same processing as the motion compensation prediction unit 2 in FIG.
Further, when the direct mode switching flag included in the slice header is “1”, the motion compensation prediction unit 11 generates a spatial direct vector in the spatial direct mode, and performs motion compensation prediction processing using the spatial direct vector. By performing, the process which produces | generates an estimated image is implemented.
Also, when the direct mode switching flag included in the slice header is “2”, the motion compensation prediction unit 11 generates a temporal direct vector in the temporal direct mode, and performs motion compensation prediction processing using the temporal direct vector. By performing, the process which produces | generates an estimated image is implemented.
However, the motion compensation prediction unit 11 includes a motion vector search unit 21, a direct vector generation unit 22, and a motion compensation processing unit 23 as in the motion compensation prediction unit 2 of FIG. 1 (see FIG. 2).

可変長符号化部12は圧縮部5から出力された圧縮データと、動き補償予測部11から出力された符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル、参照画像の識別番号)及びダイレクトモード切替フラグとをエントロピー符号化して、その符号化結果を示すビットストリーム(符号化データ)を生成し、そのビットストリームを出力する処理を実施する。なお、可変長符号化部12は可変長符号化手段を構成している。   The variable length encoding unit 12 includes the compressed data output from the compression unit 5 and the encoding mode information output from the motion compensation prediction unit 11 (macroblock type / sub-macroblock type, motion vector, reference image identification number). And a direct mode switching flag are entropy-coded, a bit stream (encoded data) indicating the encoding result is generated, and a process of outputting the bit stream is performed. The variable length coding unit 12 constitutes variable length coding means.

図16は動き補償予測部11を構成しているダイレクトベクトル生成部22を示す構成図であり、図において、図3と同一符号は同一又は相当部分を示すので説明を省略する。
ダイレクトベクトル判定部34はスライスヘッダに含まれているダイレクトモード切替フラグが“0”である場合、図3のダイレクトベクトル判定部33と同様に、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出し、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択する処理を実施する。
また、ダイレクトベクトル判定部34はダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する処理を実施する。
また、ダイレクトベクトル判定部34はダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する処理を実施する。
FIG. 16 is a block diagram showing the direct vector generation unit 22 constituting the motion compensated prediction unit 11. In the figure, the same reference numerals as those in FIG.
When the direct mode switching flag included in the slice header is “0”, the direct vector determination unit 34 generates the spatial direct vector generated by the spatial direct vector generation unit 31 as in the direct vector determination unit 33 of FIG. The spatial direct mode evaluation value is calculated using the temporal direct vector generated by the temporal direct vector generation unit 32, the temporal direct mode evaluation value is calculated, and the spatial direct mode evaluation value and The evaluation value in the temporal direct mode is compared, and processing for selecting either the spatial direct vector or temporal direct vector is performed.
Further, when the direct mode switching flag is “1”, the direct vector determination unit 34 selects the spatial direct vector generated by the spatial direct vector generation unit 31, and uses the spatial direct vector as a motion vector as the motion compensation processing unit 23. Execute the process to output to.
Further, when the direct mode switching flag is “2”, the direct vector determination unit 34 selects the temporal direct vector generated by the temporal direct vector generation unit 32, and uses the temporal direct vector as a motion vector to make the motion compensation processing unit 23. Execute the process to output to.

図17はダイレクトベクトル生成部22を構成しているダイレクトベクトル判定部34を示す構成図である。
図17において、動き補償部44はスライスヘッダに含まれているダイレクトモード切替フラグが“0”である場合、図4の動き補償部41と同様に、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの前方予測画像と後方予測画像を生成するとともに、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像と後方予測画像を生成する処理を実施する。
また、動き補償部44はダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを類似度算出部45に出力し、そのダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを類似度算出部45に出力する処理を実施する。
FIG. 17 is a configuration diagram showing a direct vector determination unit 34 constituting the direct vector generation unit 22.
In FIG. 17, when the direct mode switching flag included in the slice header is “0”, the motion compensation unit 44 is similar to the motion compensation unit 41 in FIG. 4, and the spatial direct vector generation unit 31 generates the space. A forward prediction image and a backward prediction image in the spatial direct mode are generated using the direct vector, and a forward prediction image and a backward prediction image in the temporal direct mode are generated using the temporal direct vector generated by the temporal direct vector generation unit 32. The process to generate is performed.
When the direct mode switching flag is “1”, the motion compensation unit 44 outputs the spatial direct vector generated by the spatial direct vector generation unit 31 to the similarity calculation unit 45, and the direct mode switching flag is “2”. If “”, the process of outputting the time direct vector generated by the time direct vector generation unit 32 to the similarity calculation unit 45 is performed.

類似度算出部45はダイレクトモード切替フラグが“0”である場合、図4の類似度算出部42と同様に、空間ダイレクトモードの評価値として、空間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出するとともに、時間ダイレクトモードの評価値として、時間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出する処理を実施する。
また、類似度算出部45はダイレクトモード切替フラグが“1”である場合、動き補償部44から出力された空間ダイレクトベクトルをダイレクトベクトル選択部46に出力し、ダイレクトモード切替フラグが“2”である場合、動き補償部44から出力された時間ダイレクトベクトルをダイレクトベクトル選択部46に出力する処理を実施する。
なお、動き補償部44及び類似度算出部45から評価値算出手段が構成されている。
When the direct mode switching flag is “0”, the similarity calculation unit 45, as in the similarity calculation unit 42 in FIG. While calculating a similarity, the process which calculates the similarity of the front prediction image of a temporal direct mode and a back prediction image as an evaluation value of a temporal direct mode is implemented.
When the direct mode switching flag is “1”, the similarity calculation unit 45 outputs the spatial direct vector output from the motion compensation unit 44 to the direct vector selection unit 46, and the direct mode switching flag is “2”. In some cases, a process of outputting the temporal direct vector output from the motion compensation unit 44 to the direct vector selection unit 46 is performed.
The motion compensation unit 44 and the similarity calculation unit 45 constitute an evaluation value calculation unit.

ダイレクトベクトル選択部46はダイレクトモード切替フラグが“0”である場合、図4のダイレクトベクトル選択部43と同様に、類似度算出部45により算出された空間ダイレクトモードにおける前方予測画像と後方予測画像の類似度と、時間ダイレクトモードにおける前方予測画像と後方予測画像の類似度とを比較し、空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、前方予測画像と後方予測画像の類似度が高い方のダイレクトモードのダイレクトベクトルを選択する処理を実施する。
また、ダイレクトベクトル選択部46はダイレクトモード切替フラグが“1”である場合、類似度算出部45から出力された空間ダイレクトベクトルを選択して動き補償処理部23に出力し、ダイレクトモード切替フラグが“2”である場合、類似度算出部45から出力された時間ダイレクトベクトルを選択して動き補償処理部23に出力する処理を実施する。なお、ダイレクトベクトル選択部46はダイレクトベクトル選択手段を構成している。
When the direct mode switching flag is “0”, the direct vector selection unit 46 is similar to the direct vector selection unit 43 in FIG. 4, and the forward prediction image and the backward prediction image in the spatial direct mode calculated by the similarity calculation unit 45. Between the forward prediction image and the backward prediction image in the temporal direct mode, and the direct mode with the higher similarity between the forward prediction image and the backward prediction image of the spatial direct vector or the temporal direct vector. The process of selecting the direct vector is executed.
Further, when the direct mode switching flag is “1”, the direct vector selection unit 46 selects the spatial direct vector output from the similarity calculation unit 45 and outputs it to the motion compensation processing unit 23, and the direct mode switching flag is set. In the case of “2”, a process of selecting the temporal direct vector output from the similarity calculation unit 45 and outputting it to the motion compensation processing unit 23 is performed. The direct vector selection unit 46 constitutes a direct vector selection unit.

図18はこの発明の実施の形態3による画像復号装置を示す構成図であり、図において、図5と同一符号は同一又は相当部分を示すので説明を省略する。
可変長復号部58は図15の画像符号化装置から出力されたビットストリーム(符号化データ)を入力し、そのビットストリームから圧縮データ、符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル、参照画像の識別番号)及びダイレクトモード切替フラグをエントロピー復号して、その圧縮データを予測誤差復号部53に出力し、その符号化モード情報及びダイレクトモード切替フラグを動き補償予測部59に出力する処理を実施する。なお、可変長復号部58は可変長復号手段を構成している。
FIG. 18 is a block diagram showing an image decoding apparatus according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
The variable length decoding unit 58 receives the bit stream (encoded data) output from the image encoding device of FIG. 15 and receives compressed data, encoding mode information (macro block type / sub macro block type, motion) from the bit stream. Vector, reference image identification number) and direct mode switching flag are entropy decoded, the compressed data is output to the prediction error decoding unit 53, and the encoding mode information and direct mode switching flag are output to the motion compensation prediction unit 59. Perform the process. The variable length decoding unit 58 constitutes variable length decoding means.

動き補償予測部59はフレームメモリ57に格納されている1フレーム以上の参照画像の中から、可変長復号部58から出力された識別番号が示す参照画像を読み出し、可変長復号部58から出力されたマクロブロックタイプ/サブマクロブロックタイプがインターモードを使用している旨を示している場合、可変長復号部58から出力された動きベクトルと上記参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
また、動き補償予測部59は可変長復号部58から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示しており、かつ、可変長復号部58から出力されたダイレクトモード切替フラグが“0”である場合、図15の画像符号化装置における動き補償予測部11と同様に、空間ダイレクトベクトルと時間ダイレクトベクトルを生成して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択し、その選択したダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
The motion compensation prediction unit 59 reads the reference image indicated by the identification number output from the variable length decoding unit 58 from the reference images of one frame or more stored in the frame memory 57 and outputs the reference image from the variable length decoding unit 58. When the macroblock type / sub-macroblock type indicates that the inter mode is used, the motion compensation prediction process is performed using the motion vector output from the variable length decoding unit 58 and the reference image. Thus, a process for generating a predicted image is performed.
The motion compensation prediction unit 59 indicates that the macroblock type / sub-macroblock type output from the variable length decoding unit 58 uses the direct mode, and is output from the variable length decoding unit 58. When the direct mode switching flag is “0”, a spatial direct vector and a temporal direct vector are generated in the same way as the motion compensation prediction unit 11 in the image encoding device of FIG. A process for generating a predicted image is performed by selecting either one and performing a motion compensation prediction process using the selected direct vector and the reference image indicated by the identification number.

また、動き補償予測部59は可変長復号部58から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示しており、かつ、可変長復号部58から出力されたダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトルを生成し、その空間ダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
また、動き補償予測部59は可変長復号部58から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示しており、かつ、可変長復号部58から出力されたダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトルを生成し、その時間ダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する処理を実施する。
ただし、動き補償予測部59は、図6の動き補償予測部54と同様に、ダイレクトベクトル生成部61及び動き補償処理部62から構成されている(図6を参照)。
The motion compensation prediction unit 59 indicates that the macroblock type / sub-macroblock type output from the variable length decoding unit 58 uses the direct mode, and is output from the variable length decoding unit 58. When the direct mode switching flag is “1”, a process for generating a predicted image by generating a spatial direct vector and performing a motion compensation prediction process using the reference image indicated by the spatial direct vector and the identification number To implement.
The motion compensation prediction unit 59 indicates that the macroblock type / sub-macroblock type output from the variable length decoding unit 58 uses the direct mode, and is output from the variable length decoding unit 58. When the direct mode switching flag is “2”, a process for generating a predicted image by generating a temporal direct vector and performing a motion compensation prediction process using the reference image indicated by the temporal direct vector and the identification number To implement.
However, the motion compensation prediction unit 59 includes a direct vector generation unit 61 and a motion compensation processing unit 62 as in the motion compensation prediction unit 54 of FIG. 6 (see FIG. 6).

図19は動き補償予測部59を構成しているダイレクトベクトル生成部61を示す構成図であり、図において、図7と同一符号は同一又は相当部分を示すので説明を省略する。
ダイレクトベクトル判定部74は可変長復号部58から出力されたダイレクトモード切替フラグが“0”である場合、図7のダイレクトベクトル判定部73と同様に、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出するとともに、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出し、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択する処理を実施する。
また、ダイレクトベクトル判定部74はダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する処理を実施する。
また、ダイレクトベクトル判定部74はダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する処理を実施する。
FIG. 19 is a block diagram showing a direct vector generation unit 61 constituting the motion compensation prediction unit 59. In the figure, the same reference numerals as those in FIG.
When the direct mode switching flag output from the variable length decoding unit 58 is “0”, the direct vector determination unit 74 is the spatial generated by the spatial direct vector generation unit 71 as in the direct vector determination unit 73 of FIG. The evaluation value of the spatial direct mode is calculated using the direct vector, and the evaluation value of the temporal direct mode is calculated using the temporal direct vector generated by the temporal direct vector generation unit 72, and the evaluation of the spatial direct mode is performed. The value is compared with the evaluation value in the temporal direct mode, and processing for selecting either the spatial direct vector or the temporal direct vector is performed.
Further, when the direct mode switching flag is “1”, the direct vector determination unit 74 selects the spatial direct vector generated by the spatial direct vector generation unit 71, and uses the spatial direct vector as a motion vector as the motion compensation processing unit 62. Execute the process to output to.
Further, when the direct mode switching flag is “2”, the direct vector determination unit 74 selects the temporal direct vector generated by the temporal direct vector generation unit 72, and uses the temporal direct vector as a motion vector to make the motion compensation processing unit 62. Execute the process to output to.

図20はダイレクトベクトル生成部61を構成しているダイレクトベクトル判定部74を示す構成図である。
図20において、動き補償部84は可変長復号部58から出力されたダイレクトモード切替フラグが“0”である場合、図8の動き補償部81と同様に、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの前方予測画像と後方予測画像を生成するとともに、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像と後方予測画像を生成する処理を実施する。
また、動き補償部84はダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを類似度算出部85に出力し、そのダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを類似度算出部85に出力する処理を実施する。
FIG. 20 is a configuration diagram showing a direct vector determination unit 74 constituting the direct vector generation unit 61.
In FIG. 20, when the direct mode switching flag output from the variable length decoding unit 58 is “0”, the motion compensation unit 84 is generated by the spatial direct vector generation unit 71 as in the motion compensation unit 81 of FIG. The spatial direct vector is used to generate the forward prediction image and the backward prediction image in the spatial direct mode, and the temporal direct vector generated by the temporal direct vector generation unit 72 is used to generate the forward prediction image and the backward prediction in the temporal direct mode. A process for generating a predicted image is performed.
When the direct mode switching flag is “1”, the motion compensation unit 84 outputs the spatial direct vector generated by the spatial direct vector generation unit 71 to the similarity calculation unit 85, and the direct mode switching flag is “2”. In the case of “,” a process of outputting the time direct vector generated by the time direct vector generation unit 72 to the similarity calculation unit 85 is performed.

類似度算出部85はダイレクトモード切替フラグが“0”である場合、図8の類似度算出部82と同様に、空間ダイレクトモードの評価値として、空間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出するとともに、時間ダイレクトモードの評価値として、時間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出する処理を実施する。
また、類似度算出部85はダイレクトモード切替フラグが“1”である場合、動き補償部84から出力された空間ダイレクトベクトルをダイレクトベクトル選択部86に出力し、ダイレクトモード切替フラグが“2”である場合、動き補償部84から出力された時間ダイレクトベクトルをダイレクトベクトル選択部86に出力する処理を実施する。
なお、動き補償部84及び類似度算出部85から評価値算出手段が構成されている。
When the direct mode switching flag is “0”, the similarity calculation unit 85, as in the similarity calculation unit 82 in FIG. While calculating a similarity, the process which calculates the similarity of the front prediction image of a temporal direct mode and a back prediction image as an evaluation value of a temporal direct mode is implemented.
When the direct mode switching flag is “1”, the similarity calculation unit 85 outputs the spatial direct vector output from the motion compensation unit 84 to the direct vector selection unit 86, and the direct mode switching flag is “2”. In some cases, a process of outputting the temporal direct vector output from the motion compensation unit 84 to the direct vector selection unit 86 is performed.
The motion compensation unit 84 and the similarity calculation unit 85 constitute an evaluation value calculation unit.

ダイレクトベクトル選択部86はダイレクトモード切替フラグが“0”である場合、図8のダイレクトベクトル選択部83と同様に、類似度算出部85により算出された空間ダイレクトモードにおける前方予測画像と後方予測画像の類似度と、時間ダイレクトモードにおける前方予測画像と後方予測画像の類似度とを比較し、空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、前方予測画像と後方予測画像の類似度が高い方のダイレクトモードのダイレクトベクトルを選択する処理を実施する。
また、ダイレクトベクトル選択部86はダイレクトモード切替フラグが“1”である場合、類似度算出部85から出力された空間ダイレクトベクトルを選択して動き補償処理部62に出力し、ダイレクトモード切替フラグが“2”である場合、類似度算出部85から出力された時間ダイレクトベクトルを選択して動き補償処理部62に出力する処理を実施する。なお、ダイレクトベクトル選択部86はダイレクトベクトル選択手段を構成している。
When the direct mode switching flag is “0”, the direct vector selection unit 86 similarly to the direct vector selection unit 83 in FIG. 8, the forward prediction image and the backward prediction image in the spatial direct mode calculated by the similarity calculation unit 85. Between the forward prediction image and the backward prediction image in the temporal direct mode, and the direct mode with the higher similarity between the forward prediction image and the backward prediction image of the spatial direct vector or the temporal direct vector. The process of selecting the direct vector is executed.
Further, when the direct mode switching flag is “1”, the direct vector selection unit 86 selects the spatial direct vector output from the similarity calculation unit 85 and outputs it to the motion compensation processing unit 62, and the direct mode switching flag is set. In the case of “2”, the time direct vector output from the similarity calculation unit 85 is selected and output to the motion compensation processing unit 62. The direct vector selection unit 86 constitutes direct vector selection means.

図15では、画像符号化装置の構成要素である動き補償予測部11、減算器3、符号化モード判定部4、圧縮部5、局部復号部6、加算器7、ループフィルタ8及び可変長符号化部12のそれぞれが専用のハードウェア(例えば、CPUを実装している半導体集積回路、あるいは、ワンチップマイコンなど)で構成されているものを想定しているが、画像符号化装置がコンピュータで構成される場合、動き補償予測部11、減算器3、符号化モード判定部4、圧縮部5、局部復号部6、加算器7、ループフィルタ8及び可変長符号化部12の処理内容を記述しているプログラムを当該コンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにしてもよい。   In FIG. 15, the motion compensation prediction unit 11, the subtracter 3, the coding mode determination unit 4, the compression unit 5, the local decoding unit 6, the adder 7, the loop filter 8, and the variable length code that are components of the image coding device. It is assumed that each of the encoding units 12 is configured by dedicated hardware (for example, a semiconductor integrated circuit on which a CPU is mounted, or a one-chip microcomputer), but the image encoding device is a computer. When configured, the processing contents of the motion compensation prediction unit 11, the subtractor 3, the coding mode determination unit 4, the compression unit 5, the local decoding unit 6, the adder 7, the loop filter 8, and the variable length coding unit 12 are described. The stored program may be stored in the memory of the computer, and the CPU of the computer may execute the program stored in the memory.

図18では、画像復号装置の構成要素である可変長復号部58、予測誤差復号部53、動き補償予測部59、加算器5及びループフィルタ56のそれぞれが専用のハードウェア(例えば、CPUを実装している半導体集積回路、あるいは、ワンチップマイコンなど)で構成されているものを想定しているが、画像復号装置がコンピュータで構成される場合、可変長復号部58、予測誤差復号部53、動き補償予測部59、加算器55及びループフィルタ56の処理内容を記述しているプログラムを当該コンピュータのメモリに格納し、当該コンピュータのCPUが当該メモリに格納されているプログラムを実行するようにしてもよい。   In FIG. 18, each of the variable length decoding unit 58, the prediction error decoding unit 53, the motion compensation prediction unit 59, the adder 5, and the loop filter 56, which are components of the image decoding apparatus, is implemented with dedicated hardware (for example, a CPU is mounted). In the case where the image decoding device is configured by a computer, a variable length decoding unit 58, a prediction error decoding unit 53, A program describing the processing contents of the motion compensation prediction unit 59, the adder 55, and the loop filter 56 is stored in the memory of the computer, and the CPU of the computer executes the program stored in the memory. Also good.

次に動作について説明する。
最初に、図15の画像符号化装置の処理内容を説明する。
ただし、動き補償予測部11及び可変長符号化部12以外は、図1の画像符号化装置と同様であるため、動き補償予測部11及び可変長符号化部12の処理内容についてのみ説明する。
Next, the operation will be described.
First, the processing contents of the image encoding device in FIG. 15 will be described.
However, since the components other than the motion compensation prediction unit 11 and the variable length coding unit 12 are the same as those of the image coding apparatus in FIG. 1, only the processing contents of the motion compensation prediction unit 11 and the variable length coding unit 12 will be described.

動き補償予測部11は、入力画像を示す動画像信号を入力すると、その動画像信号の各フレームをマクロブロック単位(あるいは、サブマクロブロック単位)に分割する。
動き補償予測部11は、動画像信号をマクロブロック単位(あるいは、サブマクロブロック単位)に分割すると、フレームメモリ9に格納されている1フレーム以上の動き補償予測用の参照画像の中から1フレームの参照画像を選択し、マクロブロック単位(あるいは、サブマクロブロック)で、色成分毎に動き補償予測処理を実行することで、符号化対象のマクロブロック(あるいは、サブマクロブロック)の動きベクトルを生成して予測画像を生成する。
When a motion image signal indicating an input image is input, the motion compensation prediction unit 11 divides each frame of the motion image signal into macro block units (or sub macro block units).
When the motion compensation prediction unit 11 divides the moving image signal in units of macroblocks (or units of sub-macroblocks), one frame from among one or more reference images for motion compensation prediction stored in the frame memory 9. By selecting a reference image and executing motion compensation prediction processing for each color component in macroblock units (or sub-macroblocks), the motion vector of the macroblock (or sub-macroblock) to be encoded is obtained. Generate a predicted image.

動き補償予測部11は、符号化対象のマクロブロック(あるいは、サブマクロブロック)の動きベクトルを生成して予測画像を生成すると、その予測画像を減算器3に出力するとともに、その予測画像の生成に用いられた動きベクトル、マクロブロックタイプ/サブマクロブロックタイプ(例えば、当該マクロブロック(あるいは、サブマクロブロック)において使用されている符号化モードが、インターモード又はダイレクトモードのいずれであるかを示す情報を含む)及び参照画像の識別番号を符号化モード判定部4に出力する。
以下、動き補償予測部11の処理内容を具体的に説明する。
ただし、ここでは、説明の便宜上、マクロブロック単位で、動きベクトルを生成して予測画像を生成するものとする。
When the motion compensated prediction unit 11 generates a prediction image by generating a motion vector of a macroblock (or sub-macroblock) to be encoded, the motion compensation prediction unit 11 outputs the prediction image to the subtracter 3 and generates the prediction image. Indicates whether the coding mode used in the macroblock type / sub-macroblock type (for example, the macroblock (or sub-macroblock) is the inter mode or the direct mode). Information) and the identification number of the reference image are output to the encoding mode determination unit 4.
Hereinafter, the processing content of the motion compensation prediction part 11 is demonstrated concretely.
However, here, for convenience of explanation, it is assumed that a predicted image is generated by generating a motion vector in units of macroblocks.

動き補償予測部11の動きベクトル探索部21は、符号化モードがインターモードである旨を示す情報を受信(例えば、外部からインターモードを使用する旨を示す情報を受信)すると、上記実施の形態1と同様に、インターモードで最適な動きベクトルを探索し、その動きベクトルを動き補償処理部23に出力する。
動き補償予測部11のダイレクトベクトル生成部22は、符号化モードがダイレクトモードである旨を示す情報を受信すると、符号化対象のマクロブロック毎に、空間ダイレクトモードの空間ダイレクトベクトルと時間ダイレクトモードの時間ダイレクトベクトルを生成し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を動きベクトルとして動き補償処理部23に出力する。
When the motion vector search unit 21 of the motion compensated prediction unit 11 receives information indicating that the coding mode is the inter mode (for example, receives information indicating that the inter mode is used from the outside), the above embodiment Similarly to 1, the optimal motion vector is searched in the inter mode, and the motion vector is output to the motion compensation processing unit 23.
When receiving the information indicating that the encoding mode is the direct mode, the direct vector generation unit 22 of the motion compensation prediction unit 11 receives the spatial direct vector of the spatial direct mode and the temporal direct mode for each macroblock to be encoded. A temporal direct vector is generated, and either the spatial direct vector or temporal direct vector is output to the motion compensation processing unit 23 as a motion vector.

即ち、ダイレクトベクトル生成部22の空間ダイレクトベクトル生成部31は、上記実施の形態1と同様に、動きベクトルメモリ1により格納されている符号化済みマクロブロックの動きベクトルの中から、符号化対象のマクロブロックの周囲に位置している符号化済みマクロブロックの動きベクトルを読み出し、その動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成する。
また、ダイレクトベクトル生成部22の時間ダイレクトベクトル生成部32は、上記実施の形態1と同様に、動きベクトルメモリ1により格納されている符号化済みマクロブロックの動きベクトルの中から、符号化対象のマクロブロックの時間的に近傍にある符号化済みピクチャの動きベクトルであって、符号化対象のマクロブロックと空間的に同じ位置にあるマクロブロックの動きベクトルを読み出し、その動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成する。
That is, the spatial direct vector generation unit 31 of the direct vector generation unit 22 selects the encoding target motion vector from the encoded macroblock motion vectors stored in the motion vector memory 1 as in the first embodiment. A motion vector of an encoded macro block located around the macro block is read out, and a spatial direct vector in the spatial direct mode is generated from the motion vector.
In addition, the temporal direct vector generation unit 32 of the direct vector generation unit 22 selects the encoding target motion vector from the motion vectors of the encoded macroblock stored in the motion vector memory 1 as in the first embodiment. Reads the motion vector of a coded picture that is close to the macroblock in time, and is located in the same spatial position as the macroblock to be encoded. Generate a time direct vector.

ダイレクトベクトル生成部22のダイレクトベクトル判定部34は、スライスヘッダに含まれているダイレクトモード切替フラグが“0”である場合、空間ダイレクトベクトル生成部31が空間ダイレクトベクトルを生成すると、その空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出し、また、時間ダイレクトベクトル生成部32が時間ダイレクトベクトルを生成すると、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する。
そして、ダイレクトベクトル判定部34は、図3のダイレクトベクトル判定部33と同様に、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、その空間ダイレクトベクトル又は時間ダイレクトベクトルを選択し、その選択したダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する。
When the direct mode switching flag included in the slice header is “0”, the direct vector determination unit 34 of the direct vector generation unit 22 generates the spatial direct vector when the spatial direct vector generation unit 31 generates the spatial direct vector. Is used to calculate the evaluation value of the spatial direct mode, and when the temporal direct vector generation unit 32 generates the temporal direct vector, the temporal direct mode is used to calculate the evaluation value of the temporal direct mode.
Then, similar to the direct vector determination unit 33 in FIG. 3, the direct vector determination unit 34 compares the spatial direct mode evaluation value with the temporal direct mode evaluation value and selects the spatial direct vector or temporal direct vector. Then, the selected direct vector is output to the motion compensation processing unit 23 as a motion vector.

ダイレクトベクトル判定部34は、ダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する。
また、ダイレクトベクトル判定部34は、ダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する。
例えば、画像全体がパンしているような入力画像であれば、時間ダイレクトモードを選択する旨を示す“2”のダイレクトモード切替フラグが与えられ、画面内で動きが異なる入力画像であれば、空間ダイレクトモードを選択する旨を示す“1”のダイレクトモード切替フラグが与えられることが考えられる。
When the direct mode switching flag is “1”, the direct vector determination unit 34 selects the spatial direct vector generated by the spatial direct vector generation unit 31 and uses the spatial direct vector as a motion vector to the motion compensation processing unit 23. Output.
Further, when the direct mode switching flag is “2”, the direct vector determination unit 34 selects the temporal direct vector generated by the temporal direct vector generation unit 32, and uses the temporal direct vector as a motion vector as a motion compensation processing unit. To 23.
For example, if the input image is panned as a whole image, a direct mode switching flag of “2” indicating that the temporal direct mode is selected is given, and if the input image moves differently in the screen, It is conceivable that a direct mode switching flag of “1” indicating that the spatial direct mode is selected is given.

以下、ダイレクトベクトル判定部34の処理内容を具体的に説明する。
ダイレクトベクトル判定部34の動き補償部44は、ダイレクトモード切替フラグが“0”である場合、図4の動き補償部41と同様に、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの前方予測画像と後方予測画像を生成するとともに、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像と後方予測画像を生成する。
また、動き補償部44は、ダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部31により生成された空間ダイレクトベクトルを類似度算出部45に出力し、そのダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部32により生成された時間ダイレクトベクトルを類似度算出部45に出力する。
Hereinafter, the processing content of the direct vector determination part 34 is demonstrated concretely.
When the direct mode switching flag is “0”, the motion compensation unit 44 of the direct vector determination unit 34 uses the spatial direct vector generated by the spatial direct vector generation unit 31 as in the motion compensation unit 41 of FIG. Thus, the forward prediction image and the backward prediction image in the spatial direct mode are generated, and the forward prediction image and the backward prediction image in the temporal direct mode are generated using the temporal direct vector generated by the temporal direct vector generation unit 32.
Further, when the direct mode switching flag is “1”, the motion compensation unit 44 outputs the spatial direct vector generated by the spatial direct vector generation unit 31 to the similarity calculation unit 45, and the direct mode switching flag is “ If 2 ″, the temporal direct vector generated by the temporal direct vector generation unit 32 is output to the similarity calculation unit 45.

ダイレクトベクトル判定部34の類似度算出部45は、ダイレクトモード切替フラグが“0”である場合、図4の類似度算出部42と同様に、空間ダイレクトモードの評価値として、空間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出するとともに、時間ダイレクトモードの評価値として、時間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出する。
また、類似度算出部45は、ダイレクトモード切替フラグが“1”である場合、動き補償部44から出力された空間ダイレクトベクトルをダイレクトベクトル選択部46に出力し、ダイレクトモード切替フラグが“2”である場合、動き補償部44から出力された時間ダイレクトベクトルをダイレクトベクトル選択部46に出力する。
When the direct mode switching flag is “0”, the similarity calculation unit 45 of the direct vector determination unit 34, as the similarity calculation unit 42 in FIG. The similarity between the predicted image and the backward predicted image is calculated, and the similarity between the forward predicted image and the backward predicted image in the temporal direct mode is calculated as an evaluation value in the temporal direct mode.
When the direct mode switching flag is “1”, the similarity calculation unit 45 outputs the spatial direct vector output from the motion compensation unit 44 to the direct vector selection unit 46, and the direct mode switching flag is “2”. If it is, the temporal direct vector output from the motion compensation unit 44 is output to the direct vector selection unit 46.

ダイレクトベクトル判定部34のダイレクトベクトル選択部46は、ダイレクトモード切替フラグが“0”である場合、図4のダイレクトベクトル選択部43と同様に、類似度算出部45により算出された空間ダイレクトモードにおける前方予測画像と後方予測画像の類似度と、時間ダイレクトモードにおける前方予測画像と後方予測画像の類似度とを比較し、空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、前方予測画像と後方予測画像の類似度が高い方のダイレクトモードのダイレクトベクトルを選択し、そのダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する。   When the direct mode switching flag is “0”, the direct vector selection unit 46 of the direct vector determination unit 34 in the spatial direct mode calculated by the similarity calculation unit 45 is the same as the direct vector selection unit 43 of FIG. The similarity between the forward prediction image and the backward prediction image and the similarity between the forward prediction image and the backward prediction image in the temporal direct mode are compared, and the similarity between the forward prediction image and the backward prediction image of the spatial direct vector or the temporal direct vector is compared. The direct vector with the higher direct mode is selected, and the direct vector is output to the motion compensation processing unit 23 as a motion vector.

また、ダイレクトベクトル選択部46は、ダイレクトモード切替フラグが“1”である場合、類似度算出部45から出力された空間ダイレクトベクトルを入力し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する。
また、ダイレクトベクトル選択部46は、ダイレクトモード切替フラグが“2”である場合、類似度算出部45から出力された時間ダイレクトベクトルを入力し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部23に出力する。
In addition, when the direct mode switching flag is “1”, the direct vector selection unit 46 receives the spatial direct vector output from the similarity calculation unit 45 and uses the spatial direct vector as a motion vector as the motion compensation processing unit 23. Output to.
Further, when the direct mode switching flag is “2”, the direct vector selection unit 46 inputs the temporal direct vector output from the similarity calculation unit 45, and uses the temporal direct vector as a motion vector to perform the motion compensation processing unit 23. Output to.

可変長符号化部12は、圧縮部5から圧縮データを受け、動き補償予測部11から符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル、参照画像の識別番号)を受けると、その圧縮データ、符号化モード情報及びダイレクトモード切替フラグをエントロピー符号化して、その符号化結果を示すビットストリームを生成し、そのビットストリームを出力する。   When the variable length coding unit 12 receives the compressed data from the compression unit 5 and the coding mode information (macroblock type / sub macroblock type, motion vector, reference image identification number) from the motion compensation prediction unit 11, The compressed data, encoding mode information, and direct mode switching flag are entropy-encoded to generate a bit stream indicating the encoding result, and output the bit stream.

次に、図18の画像復号装置の処理内容を説明する。
ただし、動き補償予測部59及び可変長復号部58以外は、図5の画像復号装置と同様であるため、動き補償予測部59及び可変長復号部58の処理内容についてのみ説明する。
Next, processing contents of the image decoding apparatus in FIG. 18 will be described.
However, since the components other than the motion compensation prediction unit 59 and the variable length decoding unit 58 are the same as those of the image decoding apparatus in FIG. 5, only the processing contents of the motion compensation prediction unit 59 and the variable length decoding unit 58 will be described.

可変長復号部58は、図15の画像符号化装置から出力されたビットストリームを入力すると、そのビットストリームから圧縮データ、符号化モード情報(マクロブロックタイプ/サブマクロブロックタイプ、動きベクトル(符号化モードがインターモードの場合)、参照画像の識別番号)及びダイレクトモード切替フラグをエントロピー復号して、その圧縮データを予測誤差復号部53に出力し、その符号化モード情報及びダイレクトモード切替フラグを動き補償予測部59に出力する。   When the bit stream output from the image encoding device of FIG. 15 is input, the variable length decoding unit 58 receives compressed data, encoding mode information (macroblock type / sub macroblock type, motion vector (encoding) from the bitstream. When the mode is the inter mode), the reference image identification number) and the direct mode switching flag are entropy decoded, the compressed data is output to the prediction error decoding unit 53, and the coding mode information and the direct mode switching flag are moved. The result is output to the compensation prediction unit 59.

動き補償予測部59は、可変長復号部58から参照画像の識別番号を受けると、フレームメモリ57に格納されている1フレーム以上の参照画像の中から、その識別番号が示す参照画像の読み出しを行う。
また、動き補償予測部59は、可変長復号部58からマクロブロックタイプ/サブマクロブロックタイプを受けると、そのマクロブロックタイプ/サブマクロブロックタイプを参照して、図15の画像符号化装置が符号化モードとして、インターモードを使用しているのか、ダイレクトモードを使用しているのかを判別する。
When the motion compensation prediction unit 59 receives the identification number of the reference image from the variable length decoding unit 58, the motion compensation prediction unit 59 reads out the reference image indicated by the identification number from the reference images of one frame or more stored in the frame memory 57. Do.
Further, when the motion compensation prediction unit 59 receives the macroblock type / sub macroblock type from the variable length decoding unit 58, the image coding apparatus in FIG. It is determined whether the inter mode or the direct mode is used as the conversion mode.

動き補償予測部59は、図15の画像符号化装置が符号化モードとして、インターモードを使用している場合、可変長復号部58から出力された動きベクトルと上記参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する。
また、動き補償予測部59は、図15の画像符号化装置が符号化モードとして、ダイレクトモードを使用している場合、可変長復号部58から出力されたダイレクトモード切替フラグが“0”であれば、図15の画像符号化装置における動き補償予測部11と同様に、空間ダイレクトベクトルと時間ダイレクトベクトルを生成して、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を選択し、その選択したダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する。
The motion compensation prediction unit 59 uses the motion vector output from the variable length decoding unit 58 and the above reference image when the image encoding apparatus in FIG. 15 uses the inter mode as the encoding mode. A prediction image is generated by performing the prediction process.
Further, the motion compensation prediction unit 59, when the image coding apparatus in FIG. 15 uses the direct mode as the coding mode, the direct mode switching flag output from the variable length decoding unit 58 is “0”. For example, similarly to the motion compensation prediction unit 11 in the image encoding device of FIG. 15, a spatial direct vector and a temporal direct vector are generated, and either the spatial direct vector or the temporal direct vector is selected and the selected A predicted image is generated by performing motion compensation prediction processing using the direct vector and the reference image indicated by the identification number.

動き補償予測部59は、図15の画像符号化装置が符号化モードとして、ダイレクトモードを使用している場合、可変長復号部58から出力されたダイレクトモード切替フラグが“1”であれば、空間ダイレクトベクトルを生成し、その空間ダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する。
また、動き補償予測部59は、図15の画像符号化装置が符号化モードとして、ダイレクトモードを使用している場合、可変長復号部58から出力されたダイレクトモード切替フラグが“2”であれば、時間ダイレクトベクトルを生成し、その時間ダイレクトベクトルと識別番号が示す参照画像を用いて、動き補償予測処理を実施することで、予測画像を生成する。
When the image coding apparatus in FIG. 15 uses the direct mode as the coding mode, the motion compensation prediction unit 59, if the direct mode switching flag output from the variable length decoding unit 58 is “1”, A predicted image is generated by generating a spatial direct vector and performing motion compensation prediction processing using the spatial direct vector and the reference image indicated by the identification number.
Further, the motion compensation prediction unit 59, when the image coding apparatus of FIG. 15 uses the direct mode as the coding mode, the direct mode switching flag output from the variable length decoding unit 58 is “2”. For example, a predicted image is generated by generating a temporal direct vector and performing a motion compensation prediction process using the reference image indicated by the temporal direct vector and the identification number.

以下、動き補償予測部59の処理内容を具体的に説明する。
動き補償予測部59のダイレクトベクトル生成部61は、可変長復号部58から出力されたマクロブロックタイプ/サブマクロブロックタイプがダイレクトモードを使用している旨を示している場合、上記実施の形態1と同様に、復号対象のマクロブロック毎に、空間ダイレクトモードの空間ダイレクトベクトルと時間ダイレクトモードの時間ダイレクトベクトルを生成し、その空間ダイレクトベクトル又は時間ダイレクトベクトルのいずれか一方を動きベクトルとして動き補償処理部62に出力する。
Hereinafter, the processing content of the motion compensation prediction unit 59 will be specifically described.
When the direct vector generation unit 61 of the motion compensated prediction unit 59 indicates that the macroblock type / sub macroblock type output from the variable length decoding unit 58 uses the direct mode, the first embodiment described above. Similarly, for each macroblock to be decoded, a spatial direct vector in the spatial direct mode and a temporal direct vector in the temporal direct mode are generated, and motion compensation processing is performed using either the spatial direct vector or temporal direct vector as a motion vector. To the unit 62.

即ち、ダイレクトベクトル生成部61の空間ダイレクトベクトル生成部71は、上記実施の形態1と同様に、動きベクトルメモリ51により格納されている復号済みマクロブロックの動きベクトルの中から、復号対象のマクロブロックの周囲に位置している復号済みマクロブロックの動きベクトルを読み出し、その動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成する。
ダイレクトベクトル生成部61の時間ダイレクトベクトル生成部72は、上記実施の形態1と同様に、動きベクトルメモリ51により格納されている復号済みマクロブロックの動きベクトルの中から、復号対象のマクロブロックの時間的に近傍にある復号済みピクチャの動きベクトルであって、復号対象のマクロブロックと空間的に同じ位置にあるマクロブロックの動きベクトルを読み出し、その動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成する。
That is, the spatial direct vector generation unit 71 of the direct vector generation unit 61 performs a decoding target macroblock from among the motion vectors of decoded macroblocks stored in the motion vector memory 51, as in the first embodiment. Is read out, and a spatial direct vector in the spatial direct mode is generated from the motion vector.
Similar to the first embodiment, the time direct vector generation unit 72 of the direct vector generation unit 61 selects the time of the macroblock to be decoded from the motion vectors of the decoded macroblock stored in the motion vector memory 51. A motion vector of a decoded picture that is in the vicinity of the macro block that is located in the same spatial position as the macro block to be decoded is read, and a temporal direct vector in temporal direct mode is generated from the motion vector .

ダイレクトベクトル生成部61のダイレクトベクトル判定部74は、可変長復号部58から出力されたダイレクトモード切替フラグが“0”である場合、空間ダイレクトベクトル生成部71が空間ダイレクトベクトルを生成すると、その空間ダイレクトベクトルを用いて、空間ダイレクトモードの評価値を算出し、また、時間ダイレクトベクトル生成部72が時間ダイレクトベクトルを生成すると、その時間ダイレクトベクトルを用いて、時間ダイレクトモードの評価値を算出する。
そして、ダイレクトベクトル判定部74は、図7のダイレクトベクトル判定部73と同様に、その空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、その空間ダイレクトベクトル又は時間ダイレクトベクトルを選択し、その選択したダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
When the direct mode switching flag output from the variable length decoding unit 58 is “0”, the direct vector determination unit 74 of the direct vector generation unit 61 generates a spatial direct vector when the spatial direct vector generation unit 71 generates a spatial direct vector. The spatial direct mode evaluation value is calculated using the direct vector, and when the temporal direct vector generation unit 72 generates the temporal direct vector, the temporal direct mode evaluation value is calculated using the temporal direct vector.
Then, the direct vector determination unit 74 compares the evaluation value of the spatial direct mode with the evaluation value of the temporal direct mode, and selects the spatial direct vector or the temporal direct vector, similar to the direct vector determination unit 73 of FIG. Then, the selected direct vector is output to the motion compensation processing unit 62 as a motion vector.

ダイレクトベクトル判定部74は、ダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
また、ダイレクトベクトル判定部74は、ダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
When the direct mode switching flag is “1”, the direct vector determination unit 74 selects the spatial direct vector generated by the spatial direct vector generation unit 71, and uses the spatial direct vector as a motion vector to the motion compensation processing unit 62. Output.
Further, when the direct mode switching flag is “2”, the direct vector determination unit 74 selects the temporal direct vector generated by the temporal direct vector generation unit 72, and uses the temporal direct vector as a motion vector as a motion compensation processing unit. To 62.

以下、ダイレクトベクトル判定部74の処理内容を具体的に説明する。
ダイレクトベクトル判定部74の動き補償部84は、可変長復号部58から出力されたダイレクトモード切替フラグが“0”である場合、図8の動き補償部81と同様に、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを用いて、空間ダイレクトモードの前方予測画像と後方予測画像を生成するとともに、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを用いて、時間ダイレクトモードの前方予測画像と後方予測画像を生成する。
また、動き補償部84は、ダイレクトモード切替フラグが“1”である場合、空間ダイレクトベクトル生成部71により生成された空間ダイレクトベクトルを類似度算出部85に出力し、そのダイレクトモード切替フラグが“2”である場合、時間ダイレクトベクトル生成部72により生成された時間ダイレクトベクトルを類似度算出部85に出力する。
Hereinafter, the processing content of the direct vector determination part 74 is demonstrated concretely.
When the direct mode switching flag output from the variable length decoding unit 58 is “0”, the motion compensation unit 84 of the direct vector determination unit 74 is similar to the motion compensation unit 81 of FIG. Forward prediction image and backward prediction image in the spatial direct mode are generated using the spatial direct vector generated by, and forward prediction in the temporal direct mode is generated using the temporal direct vector generated by the temporal direct vector generation unit 72. An image and a backward prediction image are generated.
When the direct mode switching flag is “1”, the motion compensation unit 84 outputs the spatial direct vector generated by the spatial direct vector generation unit 71 to the similarity calculation unit 85, and the direct mode switching flag is “ In the case of 2 ″, the temporal direct vector generated by the temporal direct vector generation unit 72 is output to the similarity calculation unit 85.

類似度算出部85は、ダイレクトモード切替フラグが“0”である場合、図8の類似度算出部82と同様に、空間ダイレクトモードの評価値として、空間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出するとともに、時間ダイレクトモードの評価値として、時間ダイレクトモードの前方予測画像と後方予測画像の類似度を算出する。
また、類似度算出部85は、ダイレクトモード切替フラグが“1”である場合、動き補償部84から出力された空間ダイレクトベクトルをダイレクトベクトル選択部86に出力し、ダイレクトモード切替フラグが“2”である場合、動き補償部84から出力された時間ダイレクトベクトルをダイレクトベクトル選択部86に出力する。
When the direct mode switching flag is “0”, the similarity calculation unit 85, like the similarity calculation unit 82 in FIG. 8, uses the spatial direct mode forward prediction image and the backward prediction image as the evaluation value of the spatial direct mode. The similarity between the forward predicted image and the backward predicted image in the temporal direct mode is calculated as an evaluation value in the temporal direct mode.
When the direct mode switching flag is “1”, the similarity calculation unit 85 outputs the spatial direct vector output from the motion compensation unit 84 to the direct vector selection unit 86, and the direct mode switching flag is “2”. If it is, the temporal direct vector output from the motion compensation unit 84 is output to the direct vector selection unit 86.

ダイレクトベクトル選択部86は、ダイレクトモード切替フラグが“0”である場合、図8のダイレクトベクトル選択部83と同様に、類似度算出部85により算出された空間ダイレクトモードにおける前方予測画像と後方予測画像の類似度と、時間ダイレクトモードにおける前方予測画像と後方予測画像の類似度とを比較し、空間ダイレクトベクトル又は時間ダイレクトベクトルのうち、前方予測画像と後方予測画像の類似度が高い方のダイレクトモードのダイレクトベクトルを選択し、そのダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
また、ダイレクトベクトル選択部86は、ダイレクトモード切替フラグが“1”である場合、類似度算出部85から出力された空間ダイレクトベクトルを選択し、その空間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力し、ダイレクトモード切替フラグが“2”である場合、類似度算出部85から出力された時間ダイレクトベクトルを選択し、その時間ダイレクトベクトルを動きベクトルとして動き補償処理部62に出力する。
When the direct mode switching flag is “0”, the direct vector selection unit 86, similarly to the direct vector selection unit 83 in FIG. 8, forward prediction image and backward prediction in the spatial direct mode calculated by the similarity calculation unit 85. Compare the similarity of the image with the similarity of the forward prediction image and the backward prediction image in the temporal direct mode, and the direct of the spatial direct vector or the temporal direct vector with the higher similarity between the forward prediction image and the backward prediction image The mode direct vector is selected, and the direct vector is output to the motion compensation processing unit 62 as a motion vector.
Further, when the direct mode switching flag is “1”, the direct vector selection unit 86 selects the spatial direct vector output from the similarity calculation unit 85, and uses the spatial direct vector as a motion vector to perform the motion compensation processing unit 62. When the direct mode switching flag is “2”, the temporal direct vector output from the similarity calculation unit 85 is selected, and the temporal direct vector is output to the motion compensation processing unit 62 as a motion vector.

以上で明らかなように、この実施の形態3によれば、スライスヘッダに含まれているダイレクトモード切替フラグである“direct_spatial_mv_pred_flag”が無意(例えば、“0”)である場合に限り、上記実施の形態1と同様な予測画像生成処理を実施し、そのダイレクトモード切替フラグが有意(例えば、“1”又は“2”)である場合、そのダイレクトモード切替フラグが指示するダイレクトモードのダイレクトベクトルを選択する(例えば、フラグ=1の場合、空間ダイレクトモードの空間ダイレクトベクトルを選択し、フラグ=2の場合、時間ダイレクトモードの時間ダイレクトベクトルを選択する)ように構成したので、単位時間当たりに行える演算量や使用可能なメモリ量に応じて適切なモードを選択できる効果を奏する。
また、画像符号化装置及び画像復号装置における処理の揺らぎを吸収して、適切な処理量で符号化や復号を行うことが可能になる。
As is apparent from the above, according to the third embodiment, only when the “direct_spatial_mv_pred_flag” that is the direct mode switching flag included in the slice header is insignificant (for example, “0”), Perform predictive image generation processing similar to that in Form 1, and if the direct mode switching flag is significant (for example, “1” or “2”), select the direct mode direct vector indicated by the direct mode switching flag (For example, when the flag = 1, the spatial direct vector of the spatial direct mode is selected, and when the flag = 2, the temporal direct vector of the temporal direct mode is selected.) Depending on the amount and available memory Achieve the-option can effect.
In addition, it is possible to perform encoding and decoding with an appropriate processing amount by absorbing fluctuations in processing in the image encoding device and the image decoding device.

この発明は、不必要な動きベクトルの符号化を避けて、符号量の増加を防止する必要がある画像符号化装置及び画像符号化方法に適している。
また、この発明は、上記のような画像符号化装置により生成された符号化データを復号する必要がある画像復号装置及び画像復号方法に適している。
The present invention is suitable for an image encoding apparatus and an image encoding method that need to avoid unnecessary encoding of motion vectors and prevent an increase in code amount.
The present invention is also suitable for an image decoding apparatus and an image decoding method that require decoding encoded data generated by the image encoding apparatus as described above.

1 動きベクトルメモリ、2,11 動き補償予測部 減算器(量子化手段)、4 符号化モード判定部(量子化手段)、5 圧縮部(量子化手段)、6 局部復号部、7 加算器、8 ループフィルタ、9 フレームメモリ、10,12 可変長符号化部(可変長符号化手段)、21 動きベクトル探索部、22 ダイレクトベクトル生成部、23 動き補償処理部(予測画像生成手段)、31 空間ダイレクトベクトル生成部(ダイレクトベクトル生成手段)、32 時間ダイレクトベクトル生成部(ダイレクトベクトル生成手段)、33,34 ダイレクトベクトル判定部、41,44 動き補償部(評価値算出手段)、42,45 類似度算出部(評価値算出手段)、43,46 ダイレクトベクトル選択部(ダイレクトベクトル選択手段)、51 動きベクトルメモリ、52,58 可変長復号部(可変長復号手段)、53 予測誤差復号部(逆量子化手段)、54,59 動き補償予測部、55 加算器(画像加算手段)、56 ループフィルタ(画像加算手段)、57 フレームメモリ、61 ダイレクトベクトル生成部、62 動き補償処理部(予測画像生成手段)、71 空間ダイレクトベクトル生成部(ダイレクトベクトル生成手段)、72 時間ダイレクトベクトル生成部(ダイレクトベクトル生成手段)、73,74 ダイレクトベクトル判定部、81,84 動き補償部(評価値算出手段)、82,85 類似度算出部(評価値算出手段)、83,86 ダイレクトベクトル選択部(ダイレクトベクトル選択手段)。   DESCRIPTION OF SYMBOLS 1 Motion vector memory, 2,11 Motion compensation prediction part Subtractor (quantization means), 4 Coding mode determination part (quantization means), 5 Compression part (quantization means), 6 Local decoding part, 7 Adder, 8 loop filter, 9 frame memory, 10, 12 variable length encoding unit (variable length encoding unit), 21 motion vector search unit, 22 direct vector generation unit, 23 motion compensation processing unit (predicted image generation unit), 31 space Direct vector generation unit (direct vector generation unit), 32-hour direct vector generation unit (direct vector generation unit), 33, 34 Direct vector determination unit, 41, 44 Motion compensation unit (evaluation value calculation unit), 42, 45 Similarity Calculation unit (evaluation value calculation unit), 43, 46 Direct vector selection unit (direct vector selection unit), 5 Motion vector memory, 52, 58 variable length decoding unit (variable length decoding unit), 53 prediction error decoding unit (inverse quantization unit), 54, 59 motion compensation prediction unit, 55 adder (image addition unit), 56 loop filter (Image addition means), 57 frame memory, 61 direct vector generation section, 62 motion compensation processing section (predicted image generation means), 71 spatial direct vector generation section (direct vector generation means), 72 time direct vector generation section (direct vector) Generation means), 73, 74 direct vector determination unit, 81, 84 motion compensation unit (evaluation value calculation unit), 82, 85 similarity calculation unit (evaluation value calculation unit), 83, 86 direct vector selection unit (direct vector selection) means).

Claims (10)

入力画像を構成しているブロック毎に、当該ブロックの周囲に位置している符号化済みブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、当該ブロックの時間的に近傍にある符号化済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成手段と、上記ダイレクトベクトル生成手段により生成された空間ダイレクトベクトルを用いて、上記空間ダイレクトモードの評価値を算出するとともに、上記ダイレクトベクトル生成手段により生成された時間ダイレクトベクトルを用いて、上記時間ダイレクトモードの評価値を算出する評価値算出手段と、上記評価値算出手段により算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、上記空間ダイレクトベクトル又は上記時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択手段と、上記ダイレクトベクトル選択手段により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する予測画像生成手段と、上記予測画像生成手段により生成された予測画像と上記入力画像の差分画像を量子化し、上記差分画像の量子化係数を出力する量子化手段と、上記量子化手段から出力された量子化係数を可変長符号化して、上記量子化係数の符号化データを出力する可変長符号化手段とを備えた画像符号化装置。   For each block making up the input image, a spatial direct vector in spatial direct mode is generated from the motion vector of the encoded block located around the block, and the code that is temporally adjacent to the block A direct vector generation unit that generates a temporal direct vector of a temporal direct mode from a motion vector of a converted picture and a spatial direct vector generated by the direct vector generation unit, and calculates an evaluation value of the spatial direct mode The evaluation value calculation means for calculating the evaluation value of the temporal direct mode using the temporal direct vector generated by the direct vector generation means, and the evaluation value and time of the spatial direct mode calculated by the evaluation value calculation means direct A direct vector selection means for comparing the evaluation values of the mode and selecting either the spatial direct vector or the temporal direct vector, and a motion compensation prediction process using the direct vector selected by the direct vector selection means By performing the above, a prediction image generation unit that generates a prediction image, a difference image between the prediction image generated by the prediction image generation unit and the input image, and a quantum that outputs a quantization coefficient of the difference image are output. An image encoding apparatus comprising: encoding means; and variable-length encoding means for variable-length encoding the quantization coefficient output from the quantization means and outputting encoded data of the quantization coefficient. 評価値算出手段は、空間ダイレクトモードの評価値として、ダイレクトベクトル生成手段により生成された空間ダイレクトベクトルを用いて、上記空間ダイレクトモードの前方予測画像と後方予測画像を生成して、上記前方予測画像と上記後方予測画像の類似度を算出する一方、時間ダイレクトモードの評価値として、上記ダイレクトベクトル生成手段により生成された時間ダイレクトベクトルを用いて、上記時間ダイレクトモードの前方予測画像と後方予測画像を生成して、上記前方予測画像と上記後方予測画像の類似度を算出することを特徴とする請求項1記載の画像符号化装置。   The evaluation value calculation means generates the forward prediction image and the backward prediction image of the spatial direct mode using the spatial direct vector generated by the direct vector generation means as the evaluation value of the spatial direct mode, and generates the forward prediction image And calculating the similarity between the backward prediction image and the temporal direct mode using the temporal direct vector generated by the direct vector generation unit as the temporal direct mode evaluation value. 2. The image encoding apparatus according to claim 1, wherein the image encoding device generates and calculates a similarity between the forward prediction image and the backward prediction image. 評価値算出手段は、空間ダイレクトモードの評価値として、符号化対象のブロックの周囲に位置している符号化済みブロックの動きベクトルの分散値を算出する一方、時間ダイレクトモードの評価値として、符号化対象のブロックの時間的に近傍にある符号化済みピクチャにおいて、符号化対象のブロックと空間的に同じ位置にあるブロックの周囲に位置している符号化済みブロックの動きベクトルの分散値を算出することを特徴とする請求項1記載の画像符号化装置。   The evaluation value calculation means calculates the variance value of the motion vector of the encoded block located around the block to be encoded as the evaluation value in the spatial direct mode, while the code value as the evaluation value in the temporal direct mode. Calculates the variance value of the motion vector of an encoded block that is located around a block that is spatially the same position as the encoding target block in an encoded picture that is temporally adjacent to the encoding target block The image encoding apparatus according to claim 1, wherein: ダイレクトベクトル選択手段は、選択対象のダイレクトモードを示すダイレクトモード切替フラグを入力すると、評価値算出手段により算出された評価値の比較結果に拘らず、上記ダイレクトモード切替フラグが示すダイレクトモードのダイレクトベクトルを選択し、
可変長符号化手段は、上記ダイレクトモード切替フラグと量子化手段から出力された量子化係数を可変長符号化して、上記ダイレクトモード切替フラグ及び上記量子化係数の符号化データを出力することを特徴とする請求項1記載の画像符号化装置。
When the direct vector selection unit inputs a direct mode switching flag indicating the direct mode to be selected, the direct vector of the direct mode indicated by the direct mode switching flag regardless of the comparison result of the evaluation values calculated by the evaluation value calculation unit. Select
The variable-length encoding means performs variable-length encoding on the direct mode switching flag and the quantization coefficient output from the quantization means, and outputs the encoded data of the direct mode switching flag and the quantization coefficient. The image encoding apparatus according to claim 1.
符号化データから量子化係数を復号する可変長復号手段と、上記可変長復号手段により復号された量子化係数を逆量子化する逆量子化手段と、復号対象のブロックの周囲に位置している復号済みブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、復号対象のブロックの時間的に近傍にある復号済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成手段と、上記ダイレクトベクトル生成手段により生成された空間ダイレクトベクトルを用いて、上記空間ダイレクトモードの評価値を算出するとともに、上記ダイレクトベクトル生成手段により生成された時間ダイレクトベクトルを用いて、上記時間ダイレクトモードの評価値を算出する評価値算出手段と、上記評価値算出手段により算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、上記空間ダイレクトベクトル又は上記時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択手段と、上記ダイレクトベクトル選択手段により選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する予測画像生成手段と、上記予測画像生成手段により生成された予測画像と上記逆量子化手段の逆量子化結果が示す差分画像を加算して、画像符号化装置の入力画像に相当する復号画像を得る画像加算手段とを備えた画像復号装置。   The variable length decoding means for decoding the quantized coefficient from the encoded data, the inverse quantization means for dequantizing the quantized coefficient decoded by the variable length decoding means, and the periphery of the block to be decoded Direct vector generation that generates a spatial direct vector in the spatial direct mode from the motion vector of the decoded block and also generates a temporal direct vector in the temporal direct mode from the motion vector of the decoded picture that is temporally adjacent to the block to be decoded And an evaluation value of the spatial direct mode using the spatial direct vector generated by the direct vector generating unit and the temporal direct vector generated by the direct vector generating unit. Calculate the evaluation value of the mode The evaluation value calculation means and the evaluation value of the spatial direct mode calculated by the evaluation value calculation means and the evaluation value of the temporal direct mode are compared, and either the spatial direct vector or the temporal direct vector is selected. Direct vector selection means, prediction image generation means for generating a prediction image by performing motion compensation prediction processing using the direct vector selected by the direct vector selection means, and the prediction image generation means An image decoding apparatus comprising: an image addition unit that adds a predicted image and a difference image indicated by an inverse quantization result of the inverse quantization unit to obtain a decoded image corresponding to an input image of the image encoding device. 評価値算出手段は、空間ダイレクトモードの評価値として、ダイレクトベクトル生成手段により生成された空間ダイレクトベクトルを用いて、上記空間ダイレクトモードの前方予測画像と後方予測画像を生成して、上記前方予測画像と上記後方予測画像の類似度を算出する一方、時間ダイレクトモードの評価値として、上記ダイレクトベクトル生成手段により生成された時間ダイレクトベクトルを用いて、上記時間ダイレクトモードの前方予測画像と後方予測画像を生成して、上記前方予測画像と上記後方予測画像の類似度を算出することを特徴とする請求項5記載の画像復号装置。   The evaluation value calculation means generates the forward prediction image and the backward prediction image of the spatial direct mode using the spatial direct vector generated by the direct vector generation means as the evaluation value of the spatial direct mode, and generates the forward prediction image And calculating the similarity between the backward prediction image and the temporal direct mode using the temporal direct vector generated by the direct vector generation unit as the temporal direct mode evaluation value. 6. The image decoding apparatus according to claim 5, wherein the image decoding device generates and calculates a similarity between the forward predicted image and the backward predicted image. 評価値算出手段は、空間ダイレクトモードの評価値として、復号対象のブロックの周囲に位置している復号済みブロックの動きベクトルの分散値を算出する一方、時間ダイレクトモードの評価値として、復号対象のブロックの時間的に近傍にある復号済みピクチャにおいて、復号対象のブロックと空間的に同じ位置にあるブロックの周囲に位置している復号済みブロックの動きベクトルの分散値を算出することを特徴とする請求項5記載の画像復号装置。   The evaluation value calculation means calculates the variance value of the motion vector of the decoded block located around the block to be decoded as the evaluation value of the spatial direct mode, while the evaluation value of the decoding target as the evaluation value of the temporal direct mode. Calculating a variance of motion vectors of a decoded block located around a block that is spatially the same position as a decoding target block in a decoded picture that is temporally adjacent to the block The image decoding device according to claim 5. 可変長復号手段は、符号化データから量子化係数及びダイレクトモード切替フラグを復号し、
ダイレクトベクトル選択手段は、評価値算出手段により算出された評価値の比較結果に拘らず、上記可変長復号手段により復号されたダイレクトモード切替フラグが示すダイレクトモードのダイレクトベクトルを選択することを特徴とする請求項5記載の画像復号装置。
The variable length decoding means decodes the quantization coefficient and the direct mode switching flag from the encoded data,
The direct vector selection means selects the direct mode direct vector indicated by the direct mode switching flag decoded by the variable length decoding means, regardless of the comparison result of the evaluation values calculated by the evaluation value calculation means. The image decoding device according to claim 5.
ダイレクトベクトル生成手段が入力画像を構成しているブロック毎に、当該ブロックの周囲に位置している符号化済みブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、当該ブロックの時間的に近傍にある符号化済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成処理ステップと、評価値算出手段が上記ダイレクトベクトル生成処理ステップで生成された空間ダイレクトベクトルを用いて、上記空間ダイレクトモードの評価値を算出するとともに、上記ダイレクトベクトル生成処理ステップで生成された時間ダイレクトベクトルを用いて、上記時間ダイレクトモードの評価値を算出する評価値算出処理ステップと、ダイレクトベクトル選択手段が上記評価値算出処理ステップで算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、上記空間ダイレクトベクトル又は上記時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択処理ステップと、予測画像生成手段が上記ダイレクトベクトル選択処理ステップで選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する予測画像生成処理ステップと、量子化手段が上記予測画像生成処理ステップで生成された予測画像と上記入力画像の差分画像を量子化し、上記差分画像の量子化係数を出力する量子化処理ステップと、可変長符号化手段が上記量子化処理ステップで出力された量子化係数を可変長符号化して、上記量子化係数の符号化データを出力する可変長符号化処理ステップとを備えた画像符号化方法。   For each block that constitutes the input image, the direct vector generation means generates a spatial direct vector in the spatial direct mode from the motion vector of the encoded block located around the block, and the time of the block. A direct vector generation processing step for generating a temporal direct vector in temporal direct mode from a motion vector of a coded picture in the vicinity of the image, and an evaluation value calculation means using the spatial direct vector generated in the direct vector generation processing step. An evaluation value calculation processing step for calculating an evaluation value for the spatial direct mode and calculating an evaluation value for the temporal direct mode using the temporal direct vector generated in the direct vector generation processing step; A direct vector for selecting one of the spatial direct vector and the temporal direct vector by comparing the spatial direct mode evaluation value calculated in the evaluation value calculation processing step with the temporal direct mode evaluation value by the shuttle selection means. A selection processing step, a prediction image generation unit that generates a prediction image by performing motion compensation prediction processing using the direct vector selected in the direct vector selection processing step, and a quantization unit. Quantize the difference image between the prediction image generated in the prediction image generation processing step and the input image, and output a quantization coefficient of the difference image, and variable length encoding means includes the quantization processing The quantized coefficient output in step is variable length coded, and the quantized coefficient Picture coding method and a variable length coding processing step of outputting the coded data. 可変長復号手段が符号化データから量子化係数を復号する可変長復号処理ステップと、逆量子化手段が上記可変長復号処理ステップで復号された量子化係数を逆量子化する逆量子化処理ステップと、ダイレクトベクトル生成手段が復号対象のブロックの周囲に位置している復号済みブロックの動きベクトルから空間ダイレクトモードの空間ダイレクトベクトルを生成するとともに、復号対象のブロックの時間的に近傍にある復号済みピクチャの動きベクトルから時間ダイレクトモードの時間ダイレクトベクトルを生成するダイレクトベクトル生成処理ステップと、評価値算出手段が上記ダイレクトベクトル生成処理ステップで生成された空間ダイレクトベクトルを用いて、上記空間ダイレクトモードの評価値を算出するとともに、上記ダイレクトベクトル生成処理ステップで生成された時間ダイレクトベクトルを用いて、上記時間ダイレクトモードの評価値を算出する評価値算出処理ステップと、ダイレクトベクトル選択手段が上記評価値算出処理ステップで算出された空間ダイレクトモードの評価値と時間ダイレクトモードの評価値を比較して、上記空間ダイレクトベクトル又は上記時間ダイレクトベクトルのいずれか一方を選択するダイレクトベクトル選択処理ステップと、予測画像生成手段が上記ダイレクトベクトル選択処理ステップで選択されたダイレクトベクトルを用いて動き補償予測処理を実施することで、予測画像を生成する予測画像生成処理ステップと、画像加算手段が上記予測画像生成処理ステップで生成された予測画像と上記逆量子化処理ステップにおける逆量子化結果が示す差分画像を加算して、画像符号化装置の入力画像に相当する復号画像を得る画像加算処理ステップとを備えた画像復号方法。   A variable length decoding unit in which the variable length decoding unit decodes the quantized coefficient from the encoded data, and an inverse quantization unit in which the inverse quantizing unit dequantizes the quantized coefficient decoded in the variable length decoding step. And the direct vector generation means generates a spatial direct vector in the spatial direct mode from the motion vectors of the decoded blocks located around the block to be decoded, and has already been decoded in the temporal vicinity of the block to be decoded. A direct vector generation processing step that generates a temporal direct vector in temporal direct mode from a motion vector of a picture, and an evaluation value calculation means that uses the spatial direct vector generated in the direct vector generation processing step to evaluate the spatial direct mode. And calculate the value An evaluation value calculation processing step for calculating the evaluation value in the temporal direct mode using the temporal direct vector generated in the vector generation processing step, and a spatial direct mode in which the direct vector selection means is calculated in the evaluation value calculation processing step. A direct vector selection processing step for selecting either the spatial direct vector or the temporal direct vector, and a predicted image generation means in the direct vector selection processing step By performing motion compensation prediction processing using the selected direct vector, a prediction image generation processing step that generates a prediction image, and a prediction image generated by the image addition means in the prediction image generation processing step and the inverse quantum In reverse processing steps By adding the differential image indicated by the Coca result, an image decoding method and an image addition processing step of obtaining a decoded image corresponding to the input image of the image coding apparatus.
JP2011553735A 2010-02-12 2011-01-26 Image encoding device, image decoding device, image encoding method, and image decoding method Expired - Fee Related JP5442039B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011553735A JP5442039B2 (en) 2010-02-12 2011-01-26 Image encoding device, image decoding device, image encoding method, and image decoding method

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2010029080 2010-02-12
JP2010029080 2010-02-12
JP2011553735A JP5442039B2 (en) 2010-02-12 2011-01-26 Image encoding device, image decoding device, image encoding method, and image decoding method
PCT/JP2011/000419 WO2011099242A1 (en) 2010-02-12 2011-01-26 Image encoding device, image decoding device, image encoding method, and image decoding method

Publications (2)

Publication Number Publication Date
JPWO2011099242A1 true JPWO2011099242A1 (en) 2013-06-13
JP5442039B2 JP5442039B2 (en) 2014-03-12

Family

ID=44367531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011553735A Expired - Fee Related JP5442039B2 (en) 2010-02-12 2011-01-26 Image encoding device, image decoding device, image encoding method, and image decoding method

Country Status (3)

Country Link
JP (1) JP5442039B2 (en)
TW (1) TW201143455A (en)
WO (1) WO2011099242A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713931B (en) 2010-09-30 2019-09-03 三菱电机株式会社 Dynamic image encoding device and its method, moving image decoding apparatus and its method
JP2014183544A (en) * 2013-03-21 2014-09-29 Fujitsu Ltd Image processing unit and image processing method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004165703A (en) * 2002-09-20 2004-06-10 Toshiba Corp Moving picture coding method and decoding method
JP2007097063A (en) * 2005-09-30 2007-04-12 Fujitsu Ltd Motion picture encoding program, motion picture encoding method and motion picture encoding apparatus
JP2007221202A (en) * 2006-02-14 2007-08-30 Victor Co Of Japan Ltd Moving picture encoder and moving picture encoding program
JP2007251497A (en) * 2006-03-15 2007-09-27 Fujitsu Ltd Method, device, and program for encoding moving picture
JP2008283490A (en) * 2007-05-10 2008-11-20 Ntt Docomo Inc Moving image encoding device, method and program, and moving image decoding device, method and program
JP2010028221A (en) * 2008-07-15 2010-02-04 Sony Corp Motion vector detecting device, motion vector detecting method, image encoding device, and program
WO2010095559A1 (en) * 2009-02-20 2010-08-26 ソニー株式会社 Image processing device and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004165703A (en) * 2002-09-20 2004-06-10 Toshiba Corp Moving picture coding method and decoding method
JP2007097063A (en) * 2005-09-30 2007-04-12 Fujitsu Ltd Motion picture encoding program, motion picture encoding method and motion picture encoding apparatus
JP2007221202A (en) * 2006-02-14 2007-08-30 Victor Co Of Japan Ltd Moving picture encoder and moving picture encoding program
JP2007251497A (en) * 2006-03-15 2007-09-27 Fujitsu Ltd Method, device, and program for encoding moving picture
JP2008283490A (en) * 2007-05-10 2008-11-20 Ntt Docomo Inc Moving image encoding device, method and program, and moving image decoding device, method and program
JP2010028221A (en) * 2008-07-15 2010-02-04 Sony Corp Motion vector detecting device, motion vector detecting method, image encoding device, and program
WO2010095559A1 (en) * 2009-02-20 2010-08-26 ソニー株式会社 Image processing device and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ALEXIS MICHAEL TOURAPIS, ET AL.: "Direct Mode Coding for Bipredictive Slices in the H.264 Standard", IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, vol. 15, no. 1, JPN6011011904, January 2005 (2005-01-01), pages 119 - 126, ISSN: 0002682822 *
大久保榮監修, 改定三版 H.264/AVC教科書, vol. 第1版第1刷, JPN6011011905, 1 January 2009 (2009-01-01), pages 330, ISSN: 0002682823 *

Also Published As

Publication number Publication date
TW201143455A (en) 2011-12-01
JP5442039B2 (en) 2014-03-12
WO2011099242A1 (en) 2011-08-18

Similar Documents

Publication Publication Date Title
JP6312787B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture encoding apparatus, moving picture encoding method, moving picture encoded data, and recording medium
KR100774296B1 (en) Method and apparatus for encoding and decoding motion vectors
KR101420957B1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP2004336369A (en) Moving image encoder, moving image decoder, moving image encoding method, moving image decoding method, moving image encoding program and moving image decoding program
WO2011061880A1 (en) Image encoder apparatus, image decoder apparatus, image encoding method, and image decoding method
KR20070011225A (en) Method and apparatus for minimizing number of reference pictures used for inter-coding
KR20130020697A (en) Dynamic image encoding device and dynamic image decoding device
JP5195032B2 (en) Encoding device / decoding device, encoding method / decoding method, and program
US8699576B2 (en) Method of and apparatus for estimating motion vector based on sizes of neighboring partitions, encoder, decoding, and decoding method
JP5209572B2 (en) Image encoding apparatus and image decoding apparatus
JP5442039B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
KR20050098292A (en) Predictive encoding of motion vectors including a flag notifying the presence of coded residual motion vector data
JP2013077865A (en) Image encoding apparatus, image decoding apparatus, image encoding method and image decoding method
JP5281597B2 (en) Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program
JP2012186762A (en) Video encoding device, video decoding device, video encoding method, and video decoding method
KR100774297B1 (en) Method and apparatus for decoding motion vectors
JP2013098711A (en) Video encoding device, video decoding device, video encoding method, and video decoding method
KR20110067648A (en) Method for encoding/decoding image and apparatus for performing the same
JP2012054618A (en) Moving image encoding apparatus and encoding method, and moving image decoding apparatus and decoding method
KR100774298B1 (en) Method and apparatus for decoding motion vectors
KR100774300B1 (en) Method and apparatus for decoding motion vectors
KR100774299B1 (en) Method and apparatus for decoding motion vectors
JP5693628B2 (en) Image decoding device
JP5931160B2 (en) Image encoding apparatus and bit stream
JP2013009164A (en) Moving image coding device, moving image decoding device, moving image coding method, and moving image decoding method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130827

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131025

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131217

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees