JP2011234337A - Moving image encoding apparatus, moving image encoding method and moving image encoding program - Google Patents

Moving image encoding apparatus, moving image encoding method and moving image encoding program Download PDF

Info

Publication number
JP2011234337A
JP2011234337A JP2010217754A JP2010217754A JP2011234337A JP 2011234337 A JP2011234337 A JP 2011234337A JP 2010217754 A JP2010217754 A JP 2010217754A JP 2010217754 A JP2010217754 A JP 2010217754A JP 2011234337 A JP2011234337 A JP 2011234337A
Authority
JP
Japan
Prior art keywords
boundary
temporary
motion vector
prediction
motion
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.)
Pending
Application number
JP2010217754A
Other languages
Japanese (ja)
Other versions
JP2011234337A5 (en
Inventor
Shigeru Fukushima
茂 福島
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.)
JVCKenwood Corp
Original Assignee
JVCKenwood 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 JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2010217754A priority Critical patent/JP2011234337A/en
Priority to KR1020147000905A priority patent/KR20140017018A/en
Priority to CN201180026733.7A priority patent/CN102918842B/en
Priority to KR1020127029274A priority patent/KR101419634B1/en
Priority to EP11765201.6A priority patent/EP2557791A4/en
Priority to PCT/JP2011/001690 priority patent/WO2011125299A1/en
Publication of JP2011234337A publication Critical patent/JP2011234337A/en
Priority to US13/631,114 priority patent/US20130064299A1/en
Publication of JP2011234337A5 publication Critical patent/JP2011234337A5/ja
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To solve the problem that, since motion compensation prediction is performed in accordance with a prepared shape pattern in conventional moving image encoding/decoding, an optical shape pattern can not be selected and improvement in encoding efficiency is limited.SOLUTION: A temporary region dividing section 101 divides an encoding target block into a plurality of temporary regions on a predetermined temporary boundary. A motion vector detecting section 102 detects a motion vector for each temporary region. A main region dividing/motion compensating section 103 uses the motion vector of each temporary region to produce a plurality of predictive blocks corresponding to the encoding target block from a reference image, determines a main boundary based on activities of the plurality of predictive blocks, and couples regions obtained by dividing each predictive block on the main boundary between the predictive blocks, thereby producing a combined predictive block. A variable length encoding section 105 encodes a predictive differential block obtained by subtracting the combined predictive block from the encoding target block and the motion vector of each temporary region.

Description

本発明は、動画像の符号化技術に関し、特に動き補償予測を利用した動画像の符号化技術に関する。   The present invention relates to a moving picture coding technique, and more particularly to a moving picture coding technique using motion compensated prediction.

MPEG(Moving Picture Experts Group)に代表される動画像の圧縮符号化では、画面間の相関を利用して符号量を圧縮する動き補償予測が多く用いられる。MPEG等で用いられる動き補償予測では、所定サイズのブロック毎に、既に復号済の参照画像から、符号化対象画像と参照画像の相対位置関係を示す動きベクトルを用いて予測画像を生成する。その後、符号化側では、符号化対象原画像と動き補償予測により生成された予測画像との差分である予測誤差を算出し、予測誤差のみを復号側に伝送する。これにより、動き補償予測を用いない場合と比較して伝送する符号量を大幅に削減できる。   In compression coding of moving images represented by MPEG (Moving Picture Experts Group), motion compensation prediction that compresses a code amount by using correlation between screens is often used. In motion compensated prediction used in MPEG or the like, a predicted image is generated for each block of a predetermined size from a reference image that has already been decoded using a motion vector that indicates the relative positional relationship between the encoding target image and the reference image. Thereafter, the encoding side calculates a prediction error that is a difference between the original image to be encoded and a prediction image generated by motion compensated prediction, and transmits only the prediction error to the decoding side. Thereby, compared with the case where motion compensation prediction is not used, the code amount transmitted can be reduced significantly.

一般に、符号化・復号処理はマクロブロック(所定ブロックサイズの画素群、例えば16×16)単位で行われる。動き補償予測もマクロブロック単位で行われることが多いが、この場合、マクロブロックよりも小さな物体等の動きを捉えることが難しく、結果として符号化効率が低下する。そこで、動き補償予測をさらに効率良く機能させる方法として、マルチブロックパターン動き補償予測が用いられる。   In general, encoding / decoding processing is performed in units of macroblocks (pixel group having a predetermined block size, for example, 16 × 16). Motion compensation prediction is often performed in units of macroblocks, but in this case, it is difficult to capture the motion of an object or the like that is smaller than the macroblock, resulting in a decrease in coding efficiency. Therefore, multi-block pattern motion compensated prediction is used as a method for making motion compensated prediction function more efficiently.

マルチブロックパターン動き補償予測では、マクロブロック内をさらにサブブロックに分割し、サブブロック毎に異なる動きベクトルを用いて動き補償予測を行うことが可能である。使用する動き補償予測ブロックの分割パターンは、符号化側と復号側の同一規則として予め定義しておく。符号化側では定義されたブロックパターンの中から動き補償予測のブロックパターンを選択し、ブロックパターンの選択情報を復号側に伝送する。復号側では、受信したブロックパターンの選択情報に基づき動き補償予測を行う。マルチブロックパターン動き補償予測では、符号化側で動き補償予測に最適なブロックパターンを選択すると、動き補償予測後の予測誤差が減少し、符号化効率が向上する。   In multi-block pattern motion compensation prediction, a macro block can be further divided into sub blocks, and motion compensation prediction can be performed using different motion vectors for each sub block. The division pattern of the motion compensation prediction block to be used is defined in advance as the same rule on the encoding side and the decoding side. On the encoding side, a block pattern for motion compensation prediction is selected from the defined block patterns, and block pattern selection information is transmitted to the decoding side. On the decoding side, motion compensation prediction is performed based on the received block pattern selection information. In multi-block pattern motion compensated prediction, when the optimum block pattern for motion compensated prediction is selected on the encoding side, the prediction error after motion compensated prediction is reduced, and the encoding efficiency is improved.

具体的なブロックパターンの例として、ISO/IECとITU−Tの合同ビデオチーム(JVT)が国際標準化したMPEG−4 AVC(Advanced Video Coding)では、マクロブロック(16×16ブロック)内をさらに16×8/8×16/8×8/8×4/4×8/4×4のブロックパターンに分割して動き補償予測を行うことが可能である。符号化側では、ブロックパターンを選択し、ブロックパターンの選択情報をビットストリーム内に符号化する。復号側では、ビットストリーム内に符号化されているブロックパターンに応じてマクロブロックを領域分割し、分割された領域毎に動き補償予測を行う。   As an example of a specific block pattern, in MPEG-4 AVC (Advanced Video Coding) internationally standardized by a joint video team (JVT) of ISO / IEC and ITU-T, there are further 16 macroblocks (16 × 16 blocks). It is possible to perform motion compensation prediction by dividing into block patterns of × 8/8 × 16/8 × 8/8 × 4/4 × 8/4 × 4. On the encoding side, a block pattern is selected, and block pattern selection information is encoded in the bitstream. On the decoding side, the macroblock is divided into regions according to the block pattern encoded in the bitstream, and motion compensation prediction is performed for each divided region.

更に、特許文献1や特許文献2には、さまざまな動き補償予測形状パターンを定義し、より柔軟な形状で動き補償予測を行う技術が開示されている。   Furthermore, Patent Literature 1 and Patent Literature 2 disclose techniques for defining motion compensation prediction shape patterns and performing motion compensation prediction with a more flexible shape.

特許第4025570号公報Japanese Patent No. 4025570 再公表特許第WO2003−026315号公報Republished Patent No. WO2003-026315

しかしながら、特許文献1や特許文献2に開示された方法では、定義する動き補償予測形状パターンを増やした場合、形状パターン数が増加するにつれ、伝送する形状パターンの選択情報に費やす符号量が多くなってしまう。つまり、形状パターンが増加したことによる予測誤差の減少と、形状パターン選択に関する符号量増加はトレードオフ関係にあるため、単に形状パターン数を増やすだけでは全体的な符号化効率を向上させることは難しい。   However, in the methods disclosed in Patent Document 1 and Patent Document 2, when the number of motion compensated prediction shape patterns to be defined is increased, the amount of code consumed for selection information of the shape pattern to be transmitted increases as the number of shape patterns increases. End up. In other words, a decrease in prediction error due to an increase in shape patterns and an increase in code amount related to shape pattern selection are in a trade-off relationship, so it is difficult to improve overall coding efficiency simply by increasing the number of shape patterns. .

このように従来の動画像符号化/復号では、予め定義した形状パターンの動き補償予測しか行えないため、最適な形状で動き補償予測を行うことができず、符号化効率を向上させることができない。また、定義する動き補償予測形状パターンを増やした場合、動き補償予測形状パターンの選択に関する付加情報の符号量が増加するため、全体的な符号化効率が向上するとは限らない。   As described above, in the conventional moving image encoding / decoding, only motion compensation prediction of a predefined shape pattern can be performed. Therefore, motion compensation prediction cannot be performed with an optimal shape, and encoding efficiency cannot be improved. . In addition, when the number of motion compensation predicted shape patterns to be defined is increased, the amount of additional information related to the selection of motion compensated predicted shape patterns increases, and thus the overall coding efficiency is not always improved.

本発明はこうした状況に鑑みてなされたものであり、その目的は、動き補償予測のブロックパターンに関する付加情報の符号量を増加させることなく、さまざまなブロックパターンでの動き補償予測を可能にすることで、予測誤差を減少させて符号化効率を向上させる技術を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to enable motion compensation prediction in various block patterns without increasing the amount of additional information regarding the block pattern of motion compensation prediction. Therefore, an object of the present invention is to provide a technique for improving the coding efficiency by reducing the prediction error.

上記課題を解決するために、本発明のある態様の動画像符号化装置は、符号化対象ブロックを所定の仮境界で複数の仮領域に分割する仮領域分割部(101)と、各仮領域に対して動きベクトルを検出する動きベクトル検出部(102)と、各仮領域の動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した複数の予測ブロックを生成し、複数の予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部(103)と、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部(105)とを備える。   In order to solve the above-described problem, a moving picture encoding apparatus according to an aspect of the present invention includes a temporary area dividing unit (101) that divides an encoding target block into a plurality of temporary areas at predetermined temporary boundaries, and each temporary area. Using a motion vector detection unit (102) for detecting a motion vector and a motion vector of each temporary area, generating a plurality of prediction blocks corresponding to the coding target block from a reference image, and a plurality of prediction blocks A motion compensation unit (103) that generates a combined prediction block by determining a main boundary based on the activity of the combination and combining regions obtained by dividing the prediction blocks at the main boundary between the prediction blocks And a prediction difference block obtained by subtracting the combined prediction block from the encoding target block, and an encoding unit (105) that encodes a motion vector of each temporary area.

本発明の別の態様は、動画像符号化方法である。この方法は、符号化対象ブロックを所定の仮境界で複数の仮領域に分割するステップと、各仮領域に対して動きベクトルを検出するステップと、各仮領域の動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した複数の予測ブロックを生成し、複数の予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成するステップと、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化するステップとを備える。   Another aspect of the present invention is a video encoding method. This method includes a step of dividing a block to be encoded into a plurality of temporary regions at a predetermined temporary boundary, a step of detecting a motion vector for each temporary region, and a reference image using the motion vector of each temporary region. Generating a plurality of prediction blocks corresponding to the encoding target block, determining a main boundary based on activities of the plurality of prediction blocks, and dividing each prediction block by the main boundary Generating a combined prediction block by combining the prediction blocks, a prediction difference block obtained by subtracting the combined prediction block from the encoding target block, and a step of encoding a motion vector of each temporary region. Prepare.

なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, etc. are also effective as an aspect of the present invention.

本発明によれば、動き補償予測のブロックパターンに関する付加情報の符号量を増加させることなく、さまざまなブロックパターンでの動き補償予測を可能にすることで、予測誤差を減少させて符号化効率を向上させることができる。   According to the present invention, it is possible to reduce the prediction error and increase the coding efficiency by enabling the motion compensation prediction in various block patterns without increasing the code amount of the additional information regarding the block pattern of the motion compensation prediction. Can be improved.

実施の形態1の動画像符号化装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a moving image encoding apparatus according to Embodiment 1. FIG. 実施の形態1の動画像復号装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a moving image decoding apparatus according to Embodiment 1. FIG. マクロブロックを水平方向に2分割するパターンを説明する図である。It is a figure explaining the pattern which divides a macroblock into 2 in a horizontal direction. マクロブロックを垂直方向に2分割するパターンを説明する図である。It is a figure explaining the pattern which divides a macroblock into 2 in the perpendicular direction. マクロブロックの仮領域毎に検出される動きベクトルを示す図である。It is a figure which shows the motion vector detected for every temporary area | region of a macroblock. 仮領域毎に検出された動きベクトルから生成される動き補償予測画像を示す図である。It is a figure which shows the motion compensation estimated image produced | generated from the motion vector detected for every temporary area | region. 各仮領域の動きベクトルから生成される動き補償予測画像を合成して得られる合成動き補償予測画像を示す図である。It is a figure which shows the synthetic | combination motion compensation prediction image obtained by synthesize | combining the motion compensation prediction image produced | generated from the motion vector of each temporary area | region. 各仮領域の動きベクトルから生成される動き補償予測画像を合成して合成動き補償予測画像を生成する方法を説明する図である。It is a figure explaining the method of synthesize | combining the motion compensation estimated image produced | generated from the motion vector of each temporary area | region, and producing | generating a synthetic | combination motion compensation prediction image. 図1の本領域分割・動き補償部による本境界の決定手順を説明するフローチャートである。6 is a flowchart for explaining a main boundary determination procedure by the main region dividing / motion compensating unit in FIG. 1. 動き補償予測画像についての本境界決定に関するアクティビティを説明する図である。It is a figure explaining the activity regarding this boundary determination about a motion compensation prediction image. 本境界候補を2画素間隔に定義する場合の第1アクティビティ及び第2アクティビティの算出の例を説明する図である。It is a figure explaining the example of calculation of the 1st activity and the 2nd activity in the case of defining this boundary candidate as a 2 pixel interval. 実施の形態2の動画像符号化装置による動きベクトルの調整手順を説明するフローチャートである。10 is a flowchart for explaining a motion vector adjustment procedure by the moving picture encoding apparatus according to the second embodiment. 実施の形態3の動画像符号化装置による仮境界の調整手順を説明するフローチャートである。10 is a flowchart for explaining a procedure for adjusting a temporary boundary by the moving image encoding apparatus according to the third embodiment. 実施の形態1〜3の動画像符号化装置により符号化される動画像のビットストリームの第一のシンタックスパターンを示す図である。It is a figure which shows the 1st syntax pattern of the bit stream of the moving image encoded by the moving image encoder of Embodiment 1-3. スライス単位で動き補償予測の形状を復号側で自動的に決定するかどうかを示す第1フラグがON/OFFそれぞれの場合のマクロブロックタイプmb_typeのセマンティックスを示す図である。It is a figure which shows the semantics of macroblock type mb_type in case the 1st flag which shows whether the shape of a motion compensation prediction is determined automatically by a decoding side per slice is ON / OFF. マクロブロック単位で動き補償予測の形状を復号側で自動的に決定するかどうかを示す第2フラグを伝送する第二のシンタックスパターンを示す図である。It is a figure which shows the 2nd syntax pattern which transmits the 2nd flag which shows whether the shape of motion compensation prediction is determined automatically by a decoding side per macroblock. スライスレベルで動き補償予測の形状を復号側で自動的に決定するアルゴリズムを切り替える第三のシンタックスパターンを示す図である。It is a figure which shows the 3rd syntax pattern which switches the algorithm which determines automatically the shape of a motion compensation prediction at the slice level by the decoding side. マクロブロックの分割方向をシンタックス上で区別しない第四のシンタックスパターンを示す図である。It is a figure which shows the 4th syntax pattern which does not distinguish the division | segmentation direction of a macroblock on a syntax. 第四のシンタックスパターンのマクロブロックタイプのセマンティックスを示す図である。It is a figure which shows the macroblock type semantics of a 4th syntax pattern. 領域分割をマクロブロックタイプと連動させずに決定する第五のシンタックスパターンを示す図である。It is a figure which shows the 5th syntax pattern which determines area | region division | segmentation without interlocking | linking with a macroblock type. 本発明の実施の形態を双方向予測に対して適用する場合について説明する図である。It is a figure explaining the case where embodiment of this invention is applied with respect to bidirectional | two-way prediction. マクロブロックを2次元に領域分割する方法を示す図である。It is a figure which shows the method of dividing | segmenting a macroblock into two dimensions. マクロブロックを2次元に分割して動き補償を行う手順を説明するフローチャートである。It is a flowchart explaining the procedure which divides | segments a macroblock into two dimensions and performs motion compensation. マクロブロックを3つの領域に分割する方法を示す図である。It is a figure which shows the method of dividing | segmenting a macroblock into three area | regions. マクロブロックを3分割して動き補償を行う手順を説明するフローチャートである。It is a flowchart explaining the procedure which divides a macroblock into 3 and performs motion compensation.

以下、本発明の実施の形態について図面を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(実施の形態1)
図1は、実施の形態1の動画像符号化装置の構成を示すブロック図である。実施の形態1の動画像符号化装置は、仮領域分割部101、動きベクトル検出部102、本領域分割・動き補償部103、直交変換・量子化部104、可変長符号化部105、逆量子化・逆直交変換部106、参照画像メモリ107、減算部108、および加算部109を備える。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of the moving picture encoding apparatus according to the first embodiment. The moving image encoding apparatus according to Embodiment 1 includes a provisional region dividing unit 101, a motion vector detecting unit 102, a main region dividing / motion compensating unit 103, an orthogonal transform / quantizing unit 104, a variable length encoding unit 105, and an inverse quantum. And an inverse orthogonal transform unit 106, a reference image memory 107, a subtraction unit 108, and an addition unit 109.

仮領域分割部101は、例えば16×16マクロブロックなどの符号化対象となっている画素群について、任意の境界で領域を分割する。この領域分割は動きベクトル検出のための符号化側の独自手法であり、どのような境界で領域分割しても構わないが、動き補償予測の効率が向上する境界で領域分割するのが望ましい。ここでは、最も単純な仮領域分割として、水平方向又は垂直方向にのみマクロブロックを2分割する場合を例として挙げて説明する。   The temporary area dividing unit 101 divides an area at an arbitrary boundary for a pixel group to be encoded, such as a 16 × 16 macroblock. This region division is a unique method on the coding side for motion vector detection, and the region may be divided at any boundary, but it is desirable to perform region division at a boundary that improves the efficiency of motion compensation prediction. Here, as the simplest provisional area division, a case where a macroblock is divided into two only in the horizontal direction or the vertical direction will be described as an example.

図3(a)〜(c)は、マクロブロックを水平方向に2分割するパターンを説明する図である。図3(a)は、上から4画素目の水平境界でマクロブロックを16×4の上側領域と16×12の下側領域に2分割したパターンであり、図3(b)は、上から8画素目の水平境界でマクロブロックを16×8の上側領域と16×8の下側領域に2分割したパターンであり、図3(c)は、上から12画素目の水平境界でマクロブロックを16×12の上側領域と16×4の下側領域に2分割したパターンである。   FIGS. 3A to 3C are diagrams for explaining a pattern in which a macroblock is divided into two in the horizontal direction. FIG. 3A shows a pattern in which a macroblock is divided into a 16 × 4 upper region and a 16 × 12 lower region at the horizontal boundary of the fourth pixel from the top, and FIG. This is a pattern in which the macroblock is divided into a 16 × 8 upper area and a 16 × 8 lower area at the horizontal boundary of the eighth pixel, and FIG. 3C shows the macroblock at the horizontal boundary of the twelfth pixel from the top. Is divided into a 16 × 12 upper region and a 16 × 4 lower region.

図4(a)〜(c)は、マクロブロックを垂直方向に2分割するパターンを説明する図である。図4(a)は、左から4画素目の垂直境界でマクロブロックを4×16の左側領域と12×16の右側領域に2分割したパターンであり、図4(b)は、左から8画素目の垂直境界でマクロブロックを8×16の左側領域と8×16の右側領域に2分割したパターンであり、図4(c)は、左から12画素目の垂直境界でマクロブロックを12×16の左側領域と4×16の右側領域に2分割したパターンである。   FIGS. 4A to 4C are diagrams for explaining a pattern in which a macroblock is divided into two in the vertical direction. FIG. 4A shows a pattern in which a macroblock is divided into a 4 × 16 left region and a 12 × 16 right region at the vertical boundary of the fourth pixel from the left, and FIG. The macroblock is divided into two 8 × 16 left and 8 × 16 right regions at the vertical boundary of the pixel, and FIG. 4C shows 12 macroblocks at the vertical boundary of the 12th pixel from the left. The pattern is divided into two parts, a left side area of x16 and a right side area of 4x16.

仮領域分割部101により決められるマクロブロックの境界を「仮境界」(provisional boundary)と呼び、仮境界により分割されたマクロブロック内の各領域を「仮領域」(provisional region)と呼ぶ。   The boundary of the macroblock determined by the provisional region dividing unit 101 is called a “provisional boundary”, and each region in the macroblock divided by the provisional boundary is called a “provisional region”.

ここでは、水平方向または垂直方向に2分割するパターンを3つ示したが、水平境界または垂直境界の候補位置を増やして4以上の分割パターンを設けてもよい。また、斜め方向の境界で分割したり、折れ曲がった境界で分割してもよい。   Here, three patterns that are divided into two in the horizontal direction or the vertical direction are shown, but four or more division patterns may be provided by increasing the candidate positions of the horizontal boundary or the vertical boundary. Further, it may be divided at an oblique boundary or may be divided at a bent boundary.

仮領域分割部101は、符号化対象となる原画像信号について、各水平境界に関する水平アクティビティ、または各垂直境界に関する垂直アクティビティを計算する。後述のように、折れ曲がった境界でマクロブロックを分割した場合は、折れ曲がった境界に沿ってアクティビティを計算する。   The temporary area dividing unit 101 calculates a horizontal activity related to each horizontal boundary or a vertical activity related to each vertical boundary for the original image signal to be encoded. As described later, when a macroblock is divided at a bent boundary, the activity is calculated along the bent boundary.

画像信号のアクティビティとは、画素に対して何らかの演算を施した値のことである。マクロブロックを領域分割する境界に関するアクティビティとして、たとえば、境界をまたぐ2画素間の絶対差分和(SAD)を用いることができる。例えば、マクロブロック内のX座標をi、Y座標をjとして、点(i,j)における画素値をAi,jとすると、上からj画素目の水平境界jの水平アクティビティは以下のように定義される。
水平アクティビティ=Σi=0 15|Ai,j−Ai,jー1
ここで、Σi=0 15は、添え字iを0から15まで動かした場合の総和である。
The activity of the image signal is a value obtained by performing some operation on the pixel. For example, an absolute difference sum (SAD) between two pixels across the boundary can be used as an activity related to the boundary for dividing the macroblock. For example, assuming that the X coordinate in the macroblock is i, the Y coordinate is j, and the pixel value at the point (i, j) is Ai, j , the horizontal activity at the horizontal boundary j of the jth pixel from the top is as follows: Defined in
Horizontal activity = Σ i = 0 15 | A i, j −A i, j−1 |
Here, Σ i = 0 15 is the total sum when the subscript i is moved from 0 to 15.

ただし、アクティビティは絶対差分和(SAD)でなくてもよい。以下に示すような絶対二乗和(SSD)であってもよい。
水平アクティビティ=Σi=0 15(Ai,j−Ai,jー1
However, the activity may not be an absolute difference sum (SAD). An absolute sum of squares (SSD) as shown below may be used.
Horizontal activity = Σ i = 0 15 (A i, j −A i, j−1 ) 2

同様に、マクロブロックの左からi画素目の垂直境界iの垂直アクティビティは以下のように定義される。
垂直アクティビティ=Σj=0 15|Ai,j−Aiー1,j
Similarly, the vertical activity at the vertical boundary i of the i-th pixel from the left of the macroblock is defined as follows.
Vertical activity = Σ j = 0 15 | A i, j −A i−1, j |

アクティビティは物体のエッジなどで大きい値になる。仮領域分割部101は、アクティビティ値が最も大きい境界でマクロブロックの領域を仮分割する。   The activity becomes a large value at the edge of the object. The temporary area dividing unit 101 tentatively divides a macroblock area at a boundary having the largest activity value.

動きベクトル検出部102は、仮領域分割部101により分割された各仮領域について動きベクトルを検出する。   The motion vector detection unit 102 detects a motion vector for each temporary region divided by the temporary region division unit 101.

図5は、マクロブロックの仮領域毎に検出される動きベクトルを示す図である。仮領域分割部101が、マクロブロックを図3(a)のように上から4画素目の水平境界で仮分割した場合を例に取ると、動きベクトル検出部102は、図5に示すように、16×4の上側領域と16×12の下側領域のそれぞれについて動きベクトルを検出する。   FIG. 5 is a diagram showing motion vectors detected for each temporary area of the macroblock. For example, when the temporary area dividing unit 101 tentatively divides the macroblock at the horizontal boundary of the fourth pixel from the top as shown in FIG. 3A, the motion vector detecting unit 102 is as shown in FIG. , Motion vectors are detected for each of the 16 × 4 upper region and the 16 × 12 lower region.

ここで、動きベクトルはブロックマッチング法を用いて検出する。動きベクトル検出のアルゴリズムは指定した探索領域内の候補ベクトルをすべて評価するフルサーチの他、さまざまな動き特性から探索する候補ベクトルを絞り込んで探索する高速サーチなどいろいろな方法が存在する。仮領域分割部101で分割したブロック毎に動きベクトルを検出することができるものであれば、どのような動きベクトル検出アルゴリズムを用いることも可能である。   Here, the motion vector is detected using a block matching method. As a motion vector detection algorithm, there are various methods such as a full search that evaluates all candidate vectors in a designated search region and a high-speed search that narrows down and searches candidate vectors based on various motion characteristics. Any motion vector detection algorithm can be used as long as a motion vector can be detected for each block divided by the temporary region dividing unit 101.

本領域分割・動き補償部103は、動きベクトル検出部102で検出された各仮領域の動きベクトルを用いて、参照画像メモリ107に蓄積されている参照画像から動き補償予測を行う。本領域分割・動き補償部103は、後述の手順で、各仮領域の動きベクトルから生成される複数の動き補償予測画像を合成して合成動き補償予測画像を生成する。   The region segmentation / motion compensation unit 103 performs motion compensation prediction from the reference image stored in the reference image memory 107 using the motion vector of each temporary region detected by the motion vector detection unit 102. The region segmentation / motion compensation unit 103 synthesizes a plurality of motion compensated prediction images generated from the motion vectors of the temporary regions in a procedure described later to generate a combined motion compensated prediction image.

図6(a)、(b)は、仮領域毎に検出された動きベクトルから生成される動き補償予測画像を示す。図7(a)〜(c)は、各仮領域の動きベクトルから生成される動き補償予測画像を合成して得られる合成動き補償予測画像を示す。   6A and 6B show motion compensated prediction images generated from motion vectors detected for each temporary region. FIGS. 7A to 7C show synthesized motion compensated predicted images obtained by synthesizing motion compensated predicted images generated from the motion vectors of the temporary regions.

仮領域分割部101が、マクロブロックを図3(a)に示すように上から4画素目の水平境界で仮分割した場合を例に説明する。動きベクトル検出部102は、図5に示すように、16×4の上側領域と16×12の下側領域のそれぞれについて動きベクトルを検出した結果、符号化対象マクロブロックには2つの動きベクトル(第1、第2動きベクトル)が存在する。本領域分割・動き補償部103は、図6(a)、(b)に示すように、動きベクトル検出部102により検出された動きベクトル毎に、参照画像を用いて、仮に当該マクロブロックの大きさ(ここでは16×16)で動き補償予測した場合の画像を生成する。図6(a)は、16×4の上側領域の第1動きベクトルを用いて生成された第1動き補償予測画像であり、図6(b)は、16×12の下側領域の第2動きベクトルを用いて生成された第2動き補償予測画像である。   An example will be described in which the temporary region dividing unit 101 tentatively divides a macroblock at the horizontal boundary of the fourth pixel from the top as shown in FIG. As illustrated in FIG. 5, the motion vector detection unit 102 detects motion vectors for each of the 16 × 4 upper region and the 16 × 12 lower region, and as a result, the motion target macroblock includes two motion vectors ( There are first and second motion vectors). As shown in FIGS. 6A and 6B, the region segmentation / motion compensation unit 103 uses a reference image for each motion vector detected by the motion vector detection unit 102 and temporarily determines the size of the macroblock. Then, an image in the case of motion compensation prediction is generated at (here, 16 × 16). FIG. 6A is a first motion compensated prediction image generated using the first motion vector of the 16 × 4 upper region, and FIG. 6B is a second image of the lower region of 16 × 12. It is the 2nd motion compensation prediction picture generated using a motion vector.

本領域分割・動き補償部103は、図6(a)、(b)に示す第1、第2動き補償予測画像を、図7に示す(a)〜(c)のいずれかのパターンに合成して合成動き補償予測画像を生成する。第1、第2動き補償予測画像は符号化対象マクロブロックと同一の大きさであり、合成動き補償予測画像を生成するために、ある境界で分割される。本領域分割・動き補償部103により決められるマクロブロックの境界を「本境界」(actual boundary)と呼び、本境界により分割されたマクロブロックの領域を「本領域」(actual region)と呼び、仮領域分割部101により決められる「仮境界」、「仮領域」と区別する。   The region segmentation / motion compensation unit 103 synthesizes the first and second motion compensated prediction images shown in FIGS. 6A and 6B into any one of patterns (a) to (c) shown in FIG. Thus, a combined motion compensated prediction image is generated. The first and second motion compensated prediction images are the same size as the encoding target macroblock, and are divided at a certain boundary in order to generate a combined motion compensation prediction image. The boundary of the macroblock determined by the region dividing / motion compensating unit 103 is referred to as “actual boundary”, the region of the macroblock divided by the boundary is referred to as “actual region”. It is distinguished from “temporary boundary” and “temporary region” determined by the region dividing unit 101.

図7(a)〜(c)は、本領域分割・動き補償部103が決定する本境界の候補を示したものである。図7(a)は上から4画素目の水平境界を本境界とし、図7(b)は上から8画素目の水平境界を本境界とし、図7(c)は上から12画素目の水平境界を本境界として、それぞれ、本境界より上側の本領域は第1動き補償予測画像の対応する領域、本境界より下側の本領域は第2動き補償予測画像の対応する領域で表したものである。   FIGS. 7A to 7C show candidates for the main boundary determined by the region division / motion compensation unit 103. FIG. 7A, the horizontal boundary of the fourth pixel from the top is the main boundary, FIG. 7B is the horizontal boundary of the eighth pixel from the top, and FIG. 7C is the twelfth pixel from the top. With the horizontal boundary as the main boundary, the main region above the main boundary is represented by the region corresponding to the first motion compensated prediction image, and the main region below the main boundary is represented by the region corresponding to the second motion compensated prediction image. Is.

本領域分割・動き補償部103は、エッジ強度などを表す評価値にもとづいて、本境界を決定し、決定された本境界で第1、第2動き補償予測画像を分割して合成する。   The main region dividing / motion compensating unit 103 determines the main boundary based on the evaluation value indicating the edge strength and the like, and divides and synthesizes the first and second motion compensated prediction images at the determined main boundary.

図8(a)〜(c)は、各仮領域の動きベクトルから生成される動き補償予測画像を合成して合成動き補償予測画像を生成する方法を説明する図である。本領域分割・動き補償部103は、本境界決定後、図8(a)の第1動きベクトルに対応する第1動き補償予測画像と図8(b)の第2動きベクトルに対応する第2動き補償予測画像を用いて、本境界より上の領域を第1動き補償予測画像として動き補償予測し、本境界より下の領域を第2動き補償予測画像として動き補償予測する。この例では、本境界より上の16×4の領域には、第1動き補償予測画像の対応する領域が複製され、本境界より下の16×12の領域には、第2動き補償予測画像の対応する領域が複製される。   FIGS. 8A to 8C are diagrams illustrating a method of generating a combined motion compensated prediction image by combining motion compensated prediction images generated from the motion vectors of the temporary regions. After the boundary determination, the main segmentation / motion compensation unit 103 determines the first motion compensated prediction image corresponding to the first motion vector in FIG. 8A and the second motion vector corresponding to the second motion vector in FIG. Using the motion compensated prediction image, motion compensation prediction is performed using the region above the main boundary as the first motion compensation prediction image, and the region below the main boundary is used as the second motion compensation prediction image. In this example, the corresponding region of the first motion compensated prediction image is duplicated in the 16 × 4 region above the main boundary, and the second motion compensated prediction image is reproduced in the 16 × 12 region below the main boundary. The corresponding region of is duplicated.

ここでは水平方向の領域分割を例に説明したが垂直方向の領域分割の場合も同様の方法で実施可能である。また、今回は本境界候補を図7(a)〜(c)の3通りとする場合を説明したが、本境界の候補をさらに増やしてもよい。ただし、後述するように、直交変換・量子化部104の直交変換サイズとの関係を十分に考慮しておく必要がある。   Here, the horizontal region division has been described as an example, but the vertical region division can also be performed in the same manner. Moreover, although the case where the main boundary candidates are three kinds of FIGS. 7A to 7C has been described this time, the main boundary candidates may be further increased. However, as described later, it is necessary to sufficiently consider the relationship with the orthogonal transform size of the orthogonal transform / quantization unit 104.

図1に戻り、減算部108は、符号化対象原画像と本領域分割・動き補償部103で算出した動き補償予測画像との差分により、予測残差成分を算出し、直交変換・量子化部104に与える。直交変換・量子化部104は、予測残差成分の直交変換・量子化を行う。   Returning to FIG. 1, the subtraction unit 108 calculates a prediction residual component based on the difference between the original image to be encoded and the motion compensated prediction image calculated by the main region division / motion compensation unit 103, and generates an orthogonal transform / quantization unit. 104. The orthogonal transform / quantization unit 104 performs orthogonal transform / quantization of the prediction residual component.

ここで、直交変換・量子化部104は、動き補償予測のサイズに対応した直交変換サイズを使用して直交変換を行う。つまり、動き補償予測のサイズとして16×4/16×8/16×12(垂直方向に4の倍数)が許容されている場合、少なくとも16×4又は8×4又は4×4(垂直方向に4の倍数)の直交変換サイズを使用できるようにする。他の例として、動き補償予測のサイズとして16×2/16×4/16×6/16×8/16×10/16×12(垂直方向に2の倍数)が許容されている場合、少なくとも16×2又は8×2又は4×2(垂直方向に2の倍数)の直交変換サイズを使用できるようにする。これにより、動き補償予測の予測誤差を直交変換する際に、直交変換する予測誤差集合の中に動き補償予測の境界が含まれることがなくなる。これにより、動き補償予測の境界をまたいだ画素を予測誤差として一緒に直交変換することによる直交変換効率の低下を防止することができ、符号化効率を一層向上させる効果を奏する。   Here, the orthogonal transform / quantization unit 104 performs orthogonal transform using an orthogonal transform size corresponding to the size of motion compensation prediction. That is, when 16 × 4/16 × 8/16 × 12 (multiple of 4 in the vertical direction) is allowed as the size of motion compensation prediction, at least 16 × 4, 8 × 4, or 4 × 4 (vertical direction) An orthogonal transform size of a multiple of 4). As another example, when 16 × 2/16 × 4/16 × 6/16 × 8/16 × 10/16 × 12 (a multiple of 2 in the vertical direction) is allowed as the size of motion compensation prediction, at least An orthogonal transform size of 16 × 2 or 8 × 2 or 4 × 2 (a multiple of 2 in the vertical direction) can be used. As a result, when the prediction error of motion compensation prediction is orthogonally transformed, the motion compensation prediction boundary is not included in the prediction error set to be orthogonally transformed. As a result, it is possible to prevent a decrease in orthogonal transform efficiency caused by performing orthogonal transform together as a prediction error on pixels that straddle the boundary of motion compensation prediction, and the effect of further improving the coding efficiency is achieved.

可変長符号化部105は、直交変換・量子化部104で直交変換・量子化された予測残差成分を可変長符号化するとともに、動きベクトル検出部102で検出した動きベクトルを可変長符号化する。従来のようにマクロブロックを固定境界で分割する場合は、動きベクトルはラスタ順(すなわち、左上のブロックから右下のブロックへの順)で伝送する。本実施の形態のように動き補償予測の形状を復号側で自動的に決定する場合は、動き補償予測の各領域内の一番左上画素の位置がラスタ順で先のものから順に動きベクトルを伝送する。これにより、従来技術と同様、複数の動きベクトルを伝送する順序によって、動き補償予測の対象領域を一意的に表現することが可能である。   The variable length coding unit 105 performs variable length coding on the prediction residual component orthogonally transformed and quantized by the orthogonal transformation / quantization unit 104 and variable length coding the motion vector detected by the motion vector detection unit 102. To do. When a macroblock is divided at a fixed boundary as in the prior art, motion vectors are transmitted in raster order (ie, from the upper left block to the lower right block). When the shape of motion compensated prediction is automatically determined on the decoding side as in the present embodiment, the position of the upper left pixel in each region of motion compensated prediction is the motion vector in the raster order from the previous one. To transmit. As a result, as in the prior art, the target region for motion compensation prediction can be uniquely expressed by the order in which a plurality of motion vectors are transmitted.

逆量子化・逆直交変換部106は、直交変換・量子化部104によって直交変換・量子化された予測残差成分に対して、逆直交変換及び逆量子化を行う。直交変換・量子化部104と同様に、動き補償予測のサイズに対応したサイズで逆直交変換できるようにしておく。   The inverse quantization / inverse orthogonal transform unit 106 performs inverse orthogonal transform and inverse quantization on the prediction residual component orthogonally transformed / quantized by the orthogonal transform / quantization unit 104. Similar to the orthogonal transform / quantization unit 104, inverse orthogonal transform can be performed with a size corresponding to the size of motion compensation prediction.

加算部109は、逆量子化・逆直交変換部106により復号された予測残差成分と、本領域分割・動き補償部103により算出された動き補償予測画像とを加算することで参照画像を生成し、参照画像メモリ107に格納する。   The adding unit 109 generates a reference image by adding the prediction residual component decoded by the inverse quantization / inverse orthogonal transform unit 106 and the motion compensated prediction image calculated by the region division / motion compensation unit 103. And stored in the reference image memory 107.

図2は、実施の形態1の動画像復号装置の構成を示すブロック図である。実施の形態1の動画像復号装置は、可変長復号部201、本領域分割・動き補償部203、逆量子化・逆直交変換部206、加算部209、および参照画像メモリ207を備える。   FIG. 2 is a block diagram illustrating a configuration of the moving picture decoding apparatus according to the first embodiment. The moving picture decoding apparatus according to Embodiment 1 includes a variable length decoding unit 201, a main region division / motion compensation unit 203, an inverse quantization / inverse orthogonal transform unit 206, an addition unit 209, and a reference image memory 207.

可変長復号部201は、直交変換・量子化されている予測残差成分信号及び動きベクトルを可変長復号する。図1の動画像符号化装置により符号化されたビットストリームでは、マクロブロックを分割した領域毎に動きベクトルが符号化されているため、可変長復号部201により、分割領域毎に動きベクトルが復号される。ここで、マクロブロック内の動きベクトルが復号された順序によって、動き補償予測の対象領域を一意に決定することができる。   The variable length decoding unit 201 performs variable length decoding on the prediction residual component signal and the motion vector that have been orthogonally transformed and quantized. In the bit stream encoded by the moving image encoding apparatus in FIG. 1, since a motion vector is encoded for each area into which a macroblock is divided, the variable length decoding unit 201 decodes the motion vector for each divided area. Is done. Here, the target region for motion compensation prediction can be uniquely determined by the order in which the motion vectors in the macroblock are decoded.

本領域分割・動き補償部203は、図1の動画像符号化装置の本領域分割・動き補償部103と同一の機能を持ち、可変長復号部201で復号された動きベクトルを用いて参照画像メモリ207に蓄積されている参照画像から動き補償予測を行う。ここで、動きベクトルはマクロブロックの分割領域毎に取得されている。本領域分割・動き補償部203は、図1の動画像符号化装置の本領域分割・動き補償部103と同様の手順で、各分割領域の動きベクトルから生成される複数の動き補償予測画像を合成して合成動き補償予測画像を生成する。   The region segmentation / motion compensation unit 203 has the same function as the region segmentation / motion compensation unit 103 of the moving image coding apparatus in FIG. 1, and uses the motion vector decoded by the variable length decoding unit 201 as a reference image. Motion compensation prediction is performed from the reference image stored in the memory 207. Here, the motion vector is acquired for each divided area of the macroblock. The region segmentation / motion compensation unit 203 performs a plurality of motion compensated prediction images generated from the motion vectors of each segment region in the same procedure as the region segmentation / motion compensation unit 103 of the video encoding device in FIG. A combined motion compensated prediction image is generated by combining.

逆量子化・逆直交変換部206は、図1の動画像符号化装置の逆量子化・逆直交変換部106と同一の機能を持ち、可変長復号部201で復号された予測残差成分に対して逆直交変換及び逆量子化を行う。   The inverse quantization / inverse orthogonal transform unit 206 has the same function as the inverse quantization / inverse orthogonal transform unit 106 of the moving image coding apparatus in FIG. 1, and uses the prediction residual component decoded by the variable length decoding unit 201. On the other hand, inverse orthogonal transform and inverse quantization are performed.

加算部209は、逆量子化・逆直交変換部206により復号された予測残差成分と、本領域分割・動き補償部203により算出された動き補償予測画像とを加算することにより、画像信号を復号する。参照画像メモリ207は、図1の動画像符号化装置の参照画像メモリ107と同一であり、復号された参照画像を蓄積する。   The addition unit 209 adds the prediction residual component decoded by the inverse quantization / inverse orthogonal transformation unit 206 and the motion compensated prediction image calculated by the region division / motion compensation unit 203, thereby obtaining an image signal. Decrypt. The reference image memory 207 is the same as the reference image memory 107 of the moving image encoding apparatus in FIG. 1, and stores the decoded reference image.

以上の構成による動画像符号化装置の動作、特に、本領域分割・動き補償部103の動作を説明する。   The operation of the moving picture encoding apparatus having the above configuration, particularly the operation of the region dividing / motion compensating unit 103 will be described.

図9は、本領域分割・動き補償部103による本領域の決定手順を説明するフローチャートである。   FIG. 9 is a flowchart for explaining the procedure for determining the main region by the main region dividing / motion compensating unit 103.

まず、仮領域分割部101により分割されたN個(N≧2)の仮領域毎に動きベクトル検出部102は動きベクトルを検出する。ここではN=2とする。動きベクトル検出部102で検出した第1動きベクトルを用いて、マクロブロックと同一の大きさで動き補償予測し、第1動き補償予測画像を生成する(S01)。同様に、動きベクトル検出部102で検出した第2動きベクトルを用いて、マクロブロックと同一の大きさで動き補償予測し、第2動き補償予測画像を生成する(S02)。   First, the motion vector detecting unit 102 detects a motion vector for each of N (N ≧ 2) temporary regions divided by the temporary region dividing unit 101. Here, N = 2. Using the first motion vector detected by the motion vector detection unit 102, motion compensation prediction is performed with the same size as the macroblock, and a first motion compensation predicted image is generated (S01). Similarly, using the second motion vector detected by the motion vector detection unit 102, motion compensation prediction is performed with the same size as the macroblock, and a second motion compensation predicted image is generated (S02).

次に、本境界の各候補について、図10(a)〜(d)に示す第1〜第4アクティビティを算出する(S03〜S06)。ただし、ステップS03〜S06は順不同で行うことが可能である。また、ステップS03〜S06のすべてを行わずに、境界評価に使用したいアクティビティだけを算出することももちろん可能である。   Next, the first to fourth activities shown in FIGS. 10A to 10D are calculated for each candidate of this boundary (S03 to S06). However, steps S03 to S06 can be performed in any order. Further, it is of course possible to calculate only the activity that is desired to be used for boundary evaluation without performing all of steps S03 to S06.

まず、図10(a)のように、第1動き補償予測画像について、本境界候補に関する境界アクティビティ(第1アクティビティ)を算出する(S03)。ここで、アクティビティには本境界候補をまたぐ2画素間の絶対差分和(SAD)を用いる。第1アクティビティは物体のエッジなどで値が大きくなるため、値が大きいほど該当境界で領域を分割した方が動き補償予測の予測効率が向上する。同様に、図10(b)のように、第2動き補償予測画像について、本境界候補に関する境界アクティビティ(第2アクティビティ)を算出する(S04)。第2アクティビティは第1アクティビティと同様に、値が大きいほど該当境界で領域を分割した方が動き補償予測の予測効率が向上する。   First, as shown in FIG. 10A, a boundary activity (first activity) related to the boundary candidate is calculated for the first motion compensated prediction image (S03). Here, the absolute difference sum (SAD) between two pixels straddling the boundary candidate is used for the activity. Since the value of the first activity increases at the edge of the object, the prediction efficiency of the motion compensation prediction is improved by dividing the region at the corresponding boundary as the value increases. Similarly, as shown in FIG. 10B, a boundary activity (second activity) regarding the boundary candidate is calculated for the second motion compensated prediction image (S04). Similar to the first activity, the second activity improves the prediction efficiency of motion compensation prediction by dividing the region at the corresponding boundary as the value increases.

ここで、本境界候補を1画素間隔境界に定義しない場合の第1アクティビティ及び第2アクティビティの算出方法を説明する。本境界候補がn画素(n≧2)間隔に定義されている場合、ある本境界候補に関する境界アクティビティを算出する際、当該本境界候補Yの周辺で本境界候補が定義されていない領域の境界アクティビティをフィルタリングして使用する。   Here, a calculation method of the first activity and the second activity when the boundary candidate is not defined as the one-pixel interval boundary will be described. When the boundary candidate is defined at an interval of n pixels (n ≧ 2), when calculating the boundary activity related to a certain main boundary candidate, the boundary of the region where the main boundary candidate is not defined around the main boundary candidate Y Filter and use activities.

図11は、本境界候補を2画素間隔に定義する場合の第1アクティビティ及び第2アクティビティの算出の例を説明する図である。図11は、16×16画素のマクロブロックについて本境界候補が2画素間隔(2,4,6,8,10,12,14)に設定されている場合である。本境界候補の位置は実線で、本境界候補が設定されていない位置は点線で図示している。本境界位置Yにおける第1および第2アクティビティは、本境界候補が設定されていない周辺位置Y−1、Y+1におけるアクティビティを考慮して、次式で求める。
新たなアクティビティ(Y)=(ACT(Y−1)+2*ACT(Y)+ACT(Y+1)+2)/4
ここで、ACT(Y)、ACT(Y−1)、ACT(Y+1)はそれぞれ位置Y、Y−1、Y+1における図10(a)、(b)で説明した境界アクティビティである。
FIG. 11 is a diagram for explaining an example of calculation of the first activity and the second activity when the boundary candidate is defined at an interval of two pixels. FIG. 11 shows a case where this boundary candidate is set at a 2-pixel interval (2, 4, 6, 8, 10, 12, 14) for a 16 × 16 pixel macroblock. The position of this boundary candidate is shown by a solid line, and the position where this boundary candidate is not set is shown by a dotted line. The first and second activities at the main boundary position Y are obtained by the following equations in consideration of the activities at the peripheral positions Y−1 and Y + 1 where no main boundary candidate is set.
New activity (Y) = (ACT (Y-1) + 2 * ACT (Y) + ACT (Y + 1) +2) / 4
Here, ACT (Y), ACT (Y-1), and ACT (Y + 1) are the boundary activities described in FIGS. 10A and 10B at the positions Y, Y-1, and Y + 1, respectively.

このように、本境界が2画素間隔で設定された場合、本境界候補として使用しない位置(Y−1)及び(Y+1)におけるアクティビティを、本境界候補として使用する位置Yのアクティビティに影響を与えるようにする。これにより、たとえば、急峻なエッジが境界候補でない位置に発生している場合であっても、急峻なエッジのある位置のアクティビティを境界候補位置のアクティビティに反映させることができる。1画素毎にすべての境界を境界候補に設定しなくても、候補に外れた位置のアクティビティを参酌することができるため、演算量を抑制しつつ適切な本境界判定に寄与することができる。   As described above, when the main boundary is set at an interval of two pixels, the activities at the positions (Y−1) and (Y + 1) not used as the main boundary candidates affect the activity at the position Y used as the main boundary candidates. Like that. Thereby, for example, even when a steep edge occurs at a position that is not a boundary candidate, it is possible to reflect the activity at a position having a steep edge in the activity at the boundary candidate position. Even if all the boundaries are not set as the boundary candidates for each pixel, it is possible to consider the activities at positions that are out of the candidates, so that it is possible to contribute to appropriate main boundary determination while suppressing the amount of calculation.

本例ではアクティビティ算出のフィルタリング係数を1:2:1としたが、他の係数でフィルタリングを施してももちろん構わない。また、本境界候補は、2画素間隔ではなく、3画素間隔以上にしてもよい。例えば、本境界候補を4画素間隔にした場合、本境界位置Yにおける第1および第2アクティビティは、本境界候補が設定されていない周辺位置Y−2、Y−1、Y+1、Y+2におけるアクティビティを考慮して、フィルタリング係数1:2:4:2:1のもと、次式で求める。
新たなアクティビティ(Y)=(ACT(Y−2)+2*ACT(Y−1)+4*ACT(Y)+2*ACT(Y+1)+ACT(Y+2)+5)/10
In this example, the filtering coefficient for calculating the activity is set to 1: 2: 1. However, it is of course possible to perform filtering with other coefficients. Further, the boundary candidates may be not less than two pixel intervals but more than three pixel intervals. For example, when the main boundary candidate is set to an interval of four pixels, the first and second activities at the main boundary position Y are the activities at the peripheral positions Y−2, Y−1, Y + 1, and Y + 2 where the main boundary candidate is not set. Considering this, the following equation is obtained under the filtering coefficient 1: 2: 4: 2: 1.
New activity (Y) = (ACT (Y−2) + 2 * ACT (Y−1) + 4 * ACT (Y) + 2 * ACT (Y + 1) + ACT (Y + 2) +5) / 10

続いて、図10(c)のように、マクロブロック内の本境界候補より上の領域を第1動き補償予測画像として動き補償予測し、本境界候補より下の領域を第2動き補償予測画像として合成した合成動き補償予測画像について、本境界候補に関する境界アクティビティ(第3アクティビティ)を算出する(S05)。第3アクティビティは本境界候補をまたぐ2画素間の絶対差分和であるから、本境界候補の上下に位置する第1動き補償予測画像の画素と第2動き補償予測画像の画素の値の絶対差分の和になる。したがって、第3アクティビティは値が小さいほど、合成動き補償予測画像の境界が滑らかになり、予測誤差信号に高周波成分が発生しにくいため、動き補償予測の予測効率が向上する。
ここで、第3アクティビティに対して、ある本境界候補に関する境界アクティビティを算出する際、当該本境界候補Yの周辺で本境界候補が定義されていない領域の境界アクティビティをフィルタリングして使用することももちろん可能である。
Subsequently, as shown in FIG. 10C, the region above the main boundary candidate in the macroblock is motion-compensated and predicted as the first motion compensated prediction image, and the region below the main boundary candidate is the second motion compensated prediction image. As for the synthesized motion compensated prediction image synthesized as follows, a boundary activity (third activity) related to this boundary candidate is calculated (S05). Since the third activity is the sum of absolute differences between two pixels straddling the boundary candidate, the absolute difference between the values of the pixels of the first motion compensated prediction image and the pixels of the second motion compensated prediction image located above and below the boundary candidate. The sum of Therefore, the smaller the value of the third activity, the smoother the boundary of the synthesized motion compensated prediction image, and the high frequency component is less likely to be generated in the prediction error signal, so that the prediction efficiency of motion compensation prediction is improved.
Here, when calculating a boundary activity related to a certain main boundary candidate with respect to the third activity, it is also possible to filter and use a boundary activity in an area where the main boundary candidate is not defined around the main boundary candidate Y. Of course it is possible.

最後に、図10(d)のように、第1動き補償予測画像と第2動き補償予測画像の差分画像について、本境界候補に関する境界アクティビティ(第4アクティビティ)を算出する(S06)。第4アクティビティは、物体の境界などで値が大きくなるため、値が大きいほど該当境界で領域を分割した方が動き補償予測の予測効率が向上する。
ここで、第4アクティビティに対して、ある本境界候補に関する境界アクティビティを算出する際、当該本境界候補Yの周辺で本境界候補が定義されていない領域の境界アクティビティをフィルタリングして使用することももちろん可能である。
Finally, as shown in FIG. 10D, a boundary activity (fourth activity) regarding the boundary candidate is calculated for the difference image between the first motion compensated predicted image and the second motion compensated predicted image (S06). Since the value of the fourth activity increases at the boundary of the object, the prediction efficiency of the motion compensation prediction is improved by dividing the region at the boundary as the value increases.
Here, when calculating a boundary activity related to a certain main boundary candidate for the fourth activity, it is also possible to filter and use a boundary activity in an area where the main boundary candidate is not defined around the main boundary candidate Y. Of course it is possible.

境界評価に使用するアクティビティをすべて算出した後に、予め定義した評価値を用いて本境界候補を評価する(S07)。例えば、評価値は以下のように定義する。
評価値=−A*ACT1−B*ACT2+C*ACT3−D*ACT4
ここで、ACT1は第1アクティビティ値を表し、ACT2は第2アクティビティ値を表し、ACT3は第3アクティビティ値を表し、ACT4は第4アクティビティ値を表す。また、A,B,C,Dはそれぞれ0以上の定数である。
After all the activities used for the boundary evaluation are calculated, this boundary candidate is evaluated using a predefined evaluation value (S07). For example, the evaluation value is defined as follows.
Evaluation value = −A * ACT1-B * ACT2 + C * ACT3-D * ACT4
Here, ACT1 represents a first activity value, ACT2 represents a second activity value, ACT3 represents a third activity value, and ACT4 represents a fourth activity value. A, B, C, and D are constants of 0 or more.

上記評価値をすべての本境界候補について算出し、最小値を持つ本境界候補を最終的な本境界に決定する(S08)。   The evaluation value is calculated for all main boundary candidates, and the main boundary candidate having the minimum value is determined as the final main boundary (S08).

ここで、本境界と仮境界は同一になることが望ましいが、決定された本境界は必ずしも仮境界とは同一にならない。動きベクトル検出用の仮境界は、符号化側で最適な動きベクトルを求めるための境界であり、符号化側のみ利用可能な符号化対象原画像も使用して算出することができる。一方、本境界は符号化側・復号側共に一意的に算出可能でなければならず、算出した(復号側では伝送されてきた)複数の動きベクトルと、その動き補償予測画像(すなわち予測残差成分が加算される前の画像)で判断している。そのため、本境界と仮境界は同一でなくても符号化側と復号側のミスマッチなどは発生しない。   Here, it is desirable that the main boundary and the temporary boundary are the same, but the determined main boundary is not necessarily the same as the temporary boundary. The temporary boundary for motion vector detection is a boundary for obtaining an optimal motion vector on the encoding side, and can be calculated using an original image to be encoded that can be used only on the encoding side. On the other hand, this boundary must be able to be uniquely calculated on both the encoding side and the decoding side, and a plurality of calculated motion vectors (transmitted on the decoding side) and their motion compensated prediction images (that is, prediction residuals). Image before the component is added). For this reason, there is no mismatch between the encoding side and the decoding side even if the main boundary and the temporary boundary are not the same.

しかしながら、本境界と仮境界が異なることは、本境界決定後の合成動き補償予測画像に対して最適な動きベクトルを検出できていないことを意味し、予測効率が必ずしも向上しないことがある。そのため、仮領域分割部101により設定される仮領域を調整するか、動きベクトル検出部102により検出される動きベクトルを調整することで、最適な仮境界あるいは最適な動きベクトルと、最適な本境界との双方を同時に実現すれば、符号化効率を更に向上させることができる。   However, the difference between the main boundary and the temporary boundary means that an optimal motion vector has not been detected for the combined motion compensated prediction image after the determination of the main boundary, and the prediction efficiency may not necessarily be improved. Therefore, by adjusting the temporary region set by the temporary region dividing unit 101 or adjusting the motion vector detected by the motion vector detecting unit 102, the optimal temporary boundary or the optimal motion vector and the optimal main boundary are adjusted. If both are realized at the same time, the encoding efficiency can be further improved.

以下、動きベクトル検出部102により検出される動きベクトルを調整することで、本領域分割・動き補償部103により生成される合成動き補償予測画像の予測効率を最適化する構成を実施の形態2として説明する。また、仮領域分割部101により設定される仮境界を調整することで、本領域分割・動き補償部103により生成される合成動き補償予測画像の予測効率を最適化する構成を実施の形態3として説明する。   Hereinafter, a configuration for optimizing the prediction efficiency of the combined motion compensated prediction image generated by the region division / motion compensation unit 103 by adjusting the motion vector detected by the motion vector detection unit 102 as the second embodiment will be described. explain. Further, a configuration for optimizing the prediction efficiency of the combined motion compensated prediction image generated by the main region division / motion compensation unit 103 by adjusting the temporary boundary set by the temporary region division unit 101 is described as a third embodiment. explain.

(実施の形態2)
実施の形態2の動画像符号化装置は、図1の動画像符号化装置と同一の構成であるが、実施の形態2では、本領域分割・動き補償部103から動きベクトル検出部102に動きベクトルの調整を指示するための信号を送る経路がさらに加わる。これにより、動きベクトル検出部102および本領域分割・動き補償部103の処理は、ループを形成し、本領域分割・動き補償部103が決定する本境界が、仮領域分割部101による仮境界と一致するか、十分に近いものとなるまで、動きベクトル検出部102が動きベクトルを調整する。
(Embodiment 2)
The moving picture coding apparatus according to the second embodiment has the same configuration as that of the moving picture coding apparatus shown in FIG. 1, but in the second embodiment, the motion dividing unit 103 moves from the region dividing / motion compensating unit 103 to the motion vector detecting unit 102. A route for sending a signal for instructing the vector adjustment is further added. Thereby, the processing of the motion vector detection unit 102 and the main region dividing / motion compensating unit 103 forms a loop, and the main boundary determined by the main region dividing / motion compensating unit 103 is the temporary boundary by the temporary region dividing unit 101. The motion vector detection unit 102 adjusts the motion vector until they match or are close enough.

図12は、実施の形態2の動画像符号化装置による動きベクトルの調整手順を説明するフローチャートである。動きベクトル検出部102は、仮境界に基づいて動きベクトルを検出し(S11)、次に、本領域分割・動き補償部103が、動きベクトル検出部102により検出された動きベクトルのもとで本境界決定処理を行う(S12)。本境界決定処理は、図9で述べたように、本境界候補の中から境界アクティビティの評価値が最良であるものを選択することで行われる。   FIG. 12 is a flowchart for explaining a motion vector adjustment procedure by the moving picture coding apparatus according to the second embodiment. The motion vector detection unit 102 detects a motion vector based on the temporary boundary (S11), and then the region segmentation / motion compensation unit 103 performs a main motion detection based on the motion vector detected by the motion vector detection unit 102. A boundary determination process is performed (S12). As described with reference to FIG. 9, this boundary determination process is performed by selecting the boundary candidate having the best evaluation value of the boundary activity from among the boundary candidates.

本領域分割・動き補償部103により決定された本境界が仮境界と等しい場合、動きベクトル検出部102による動きベクトル検出を終了するが、決定された本境界が仮境界と異なる場合は、動きベクトル検出部102による動きベクトル検出を続行する(S13)。本境界と仮境界が異なる場合には、動きベクトル検出部102は、例えば、2つの領域に仮分割されたどちらかの領域で動きベクトル検出をやり直す。やり直しの方法はどのような方法でも良いが、例えば動きベクトル探索時の誤差評価値の内、2番目に小さい値(第2最小値)を残しておき、第2最小値の位置から動きベクトル検出を続行するなどの手法が可能である。   When the main boundary determined by the main area division / motion compensation unit 103 is equal to the temporary boundary, the motion vector detection by the motion vector detection unit 102 is terminated. When the determined main boundary is different from the temporary boundary, the motion vector The motion vector detection by the detection unit 102 is continued (S13). When the main boundary and the temporary boundary are different, the motion vector detection unit 102 redoes the motion vector detection in one of the regions temporarily divided into two regions, for example. Any method may be used for redoing, for example, the second smallest value (second minimum value) of the error evaluation values at the time of motion vector search is left, and the motion vector is detected from the position of the second minimum value. It is possible to continue the process.

動きベクトル検出部102によって再検出された動きベクトルを用いて、本領域分割・動き補償部103は、本境界決定処理を再度行う。本境界が仮境界に一致するか、十分に近いものとなるまで、動きベクトル検出部102による動きベクトル検出処理と本領域分割・動き補償部103による本境界決定処理を繰り返す。   Using the motion vector redetected by the motion vector detection unit 102, the region segmentation / motion compensation unit 103 performs the boundary determination process again. The motion vector detection processing by the motion vector detection unit 102 and the main boundary determination processing by the region division / motion compensation unit 103 are repeated until the main boundary coincides with the temporary boundary or becomes sufficiently close.

(実施の形態3)
実施の形態3の動画像符号化装置は、図1の動画像符号化装置と同一の構成であるが、実施の形態3では、仮領域分割部101は複数の仮境界候補を設定し、動きベクトル検出部102は仮境界候補毎に動きベクトルを検出し、本領域分割・動き補償部103は仮境界毎に本境界決定処理を行う。そして、本領域分割・動き補償部103は、複数の仮境界の中で合成動き補償予測画像の予測効率が最も良いものを選ぶ。
(Embodiment 3)
The moving picture coding apparatus according to the third embodiment has the same configuration as that of the moving picture coding apparatus shown in FIG. 1, but in the third embodiment, the temporary area dividing unit 101 sets a plurality of temporary boundary candidates and moves The vector detection unit 102 detects a motion vector for each temporary boundary candidate, and the region segmentation / motion compensation unit 103 performs main boundary determination processing for each temporary boundary. Then, the region segmentation / motion compensation unit 103 selects the one having the best prediction efficiency of the combined motion compensated prediction image among the plurality of temporary boundaries.

図13は、実施の形態3の動画像符号化装置による仮境界の調整手順を説明するフローチャートである。仮領域分割部101は、仮境界候補を複数設定し、動きベクトル検出部102は、それぞれの仮境界候補で分割される仮領域毎に動きベクトルを検出する(S21)。本領域分割・動き補償部103は、各仮境界候補で分割される仮領域毎に検出された動きベクトルにもとづいて本境界決定処理を行い(S22)、合成動き補償予測画像の予測効率を評価する(S23)。予測効率の評価は、原画像と合成動き補償予測画像の差分に対するSAD等で評価する。この評価を複数の仮境界候補について行い(S24)、仮境界候補の中で最も動き補償予測画像の予測効率が最も良い仮境界を選ぶ。本領域分割・動き補償部103は、選択された仮境界に対する動きベクトルに対して決定される本境界のもとで生成された合成動き補償予測画像を最終結果として出力する。   FIG. 13 is a flowchart for explaining a procedure for adjusting a temporary boundary by the moving picture coding apparatus according to the third embodiment. The temporary region dividing unit 101 sets a plurality of temporary boundary candidates, and the motion vector detecting unit 102 detects a motion vector for each temporary region divided by each temporary boundary candidate (S21). The region segmentation / motion compensation unit 103 performs the boundary determination process based on the motion vector detected for each temporary region divided by each temporary boundary candidate (S22), and evaluates the prediction efficiency of the combined motion compensated prediction image. (S23). The prediction efficiency is evaluated by SAD or the like for the difference between the original image and the synthesized motion compensated prediction image. This evaluation is performed for a plurality of temporary boundary candidates (S24), and the temporary boundary with the highest prediction efficiency of the motion compensated prediction image is selected from the temporary boundary candidates. The region segmentation / motion compensation unit 103 outputs, as a final result, a combined motion compensated prediction image generated under the main boundary determined for the motion vector for the selected temporary boundary.

別の方法として、実施の形態2のように、本領域分割・動き補償部103から仮領域分割部101に仮境界の調整を指示するための信号を送る経路を加え、仮領域分割部101、動きベクトル検出部102および本領域分割・動き補償部103の処理が、ループを形成するように構成してもよい。本領域分割・動き補償部103が決定する本境界が、仮領域分割部101による仮境界と一致するか、十分に近いものとなるまで、仮領域分割部101は仮境界を調整する。本領域分割・動き補償部103により決定された本境界が仮境界と等しい場合、仮領域分割部101による仮境界の設定は終了するが、決定された本境界が仮境界と異なる場合は、仮領域分割部101は別の仮境界の候補を設定し、動きベクトル検出部102は、再設定された仮境界で分割される仮領域毎に動きベクトルを再検出し、本領域分割・動き補償部103は、本境界決定処理を再度行う。本境界が仮境界に一致するか、十分に近いものとなるまで、仮領域分割部101による仮境界設定処理と本領域分割・動き補償部103による本境界決定処理を繰り返す。   As another method, as in the second embodiment, a path for sending a signal for instructing the adjustment of the temporary boundary from the main region dividing / motion compensating unit 103 to the temporary region dividing unit 101 is added. The processes of the motion vector detection unit 102 and the region segmentation / motion compensation unit 103 may be configured to form a loop. The temporary region dividing unit 101 adjusts the temporary boundary until the main boundary determined by the main region dividing / motion compensating unit 103 matches the temporary boundary by the temporary region dividing unit 101 or becomes sufficiently close. When the main boundary determined by the main region dividing / motion compensating unit 103 is equal to the temporary boundary, the setting of the temporary boundary by the temporary region dividing unit 101 ends. However, when the determined main boundary is different from the temporary boundary, The region dividing unit 101 sets another temporary boundary candidate, and the motion vector detecting unit 102 redetects a motion vector for each temporary region divided by the reset temporary boundary, and this region dividing / motion compensating unit 103 performs the boundary determination process again. The temporary boundary setting process by the temporary area dividing unit 101 and the main boundary determination process by the main area dividing / motion compensating unit 103 are repeated until the main boundary matches or becomes sufficiently close to the temporary boundary.

いずれの方法を取っても、結果的に、本領域分割・動き補償部103が最終決定する本境界は、仮領域分割部101が設定する仮境界と一致するか、十分に近いものとなり、予測効率が向上する。   Regardless of which method is used, as a result, the main boundary finally determined by the main region dividing / motion compensating unit 103 is coincident with or sufficiently close to the temporary boundary set by the temporary region dividing unit 101. Efficiency is improved.

次に、実施の形態1〜3の動画像符号化装置により符号化される動画像のビットストリームのシンタックスについて説明する。   Next, the syntax of a moving image bit stream encoded by the moving image encoding apparatus according to the first to third embodiments will be described.

図14は、MPEG−4 AVCのシンタックスをベースとした第一のシンタックスパターンを示す。図14(a)のように、まず、スライス単位で予測画像の特徴量を用いて動き補償予測の形状を復号側で自動的に決定するかどうかを示す第1フラグ(use_auto_mc_size)を伝送する。第1フラグuse_auto_mc_sizeがOFFの場合は、従来通り図14(b)に示すマクロブロックタイプmb_typeに基づきマクロブロックを固定的に分割して動き補償予測を行う。第1フラグuse_auto_mc_sizeがONの場合、予測画像の特徴量を用いて動き補償予測の形状を復号側で自動的に決定して動き補償予測を行う。マクロブロック単位では、MPEG−4 AVCと同様に、mb_typeを伝送して動き補償予測の形状を判断する。   FIG. 14 shows a first syntax pattern based on the MPEG-4 AVC syntax. As shown in FIG. 14A, first, a first flag (use_auto_mc_size) indicating whether or not the shape of motion compensated prediction is automatically determined on the decoding side using the feature amount of the predicted image in units of slices is transmitted. When the first flag use_auto_mc_size is OFF, the motion block prediction is performed by dividing the macroblock fixedly based on the macroblock type mb_type shown in FIG. When the first flag use_auto_mc_size is ON, motion compensated prediction is performed by automatically determining the shape of motion compensated prediction on the decoding side using the feature amount of the predicted image. In the macro block unit, as in MPEG-4 AVC, mb_type is transmitted to determine the shape of motion compensation prediction.

図15は、第1フラグuse_auto_mc_sizeがON/OFFそれぞれの場合のマクロブロックタイプmb_typeのセマンティックスを示す。マクロブロックタイプmb_type=0の場合は16×16のマクロブロックを領域分割せずに動き補償予測を行う。マクロブロックタイプmb_type=1の場合、第1フラグuse_auto_mc_sizeがOFFの場合は16×8で動き補償予測を行うが、第1フラグuse_auto_mc_sizeがONの場合、マクロブロックを16×Aと16×(16−A)の2つの領域に自動分割して動き補償予測を行う。同様に、マクロブロックタイプmb_type=2の場合、第1フラグuse_auto_mc_sizeがOFFの場合は8×16ブロックで動き補償予測を行うが、第1フラグuse_auto_mc_sizeがONの場合、マクロブロックをA×16と(16−A)×16の2つの領域に自動分割して動き補償予測を行う。マクロブロックタイプmb_type=3の場合は8×8ブロックで動き補償予測を行う。   FIG. 15 shows the semantics of the macroblock type mb_type when the first flag use_auto_mc_size is ON / OFF. When the macroblock type mb_type = 0, motion compensation prediction is performed without dividing a 16 × 16 macroblock into regions. When the macro block type mb_type = 1, motion compensation prediction is performed with 16 × 8 when the first flag use_auto_mc_size is OFF, but when the first flag use_auto_mc_size is ON, the macro blocks are 16 × A and 16 × (16− A motion compensation prediction is performed by automatically dividing into two regions A). Similarly, when the macro block type mb_type = 2, when the first flag use_auto_mc_size is OFF, motion compensation prediction is performed with 8 × 16 blocks. However, when the first flag use_auto_mc_size is ON, the macro block is A × 16 ( Motion-compensated prediction is automatically performed by dividing into two areas of 16-A) × 16. When the macro block type mb_type = 3, motion compensation prediction is performed with 8 × 8 blocks.

図16は、スライスレベルだけでなく、マクロブロック単位でも動き補償予測の形状を復号側で自動的に決定するかどうかを示す第2フラグ(auto_mc_size_enable)を伝送する第二のシンタックスパターンを示す。第2フラグauto_mc_size_enableがOFFの場合、スライスレベルで第1フラグuse_auto_mc_sizeがOFFになった場合と同様に、従来通りマクロブロックタイプmb_typeに基づきマクロブロックを固定的に分割して動き補償予測を行う。第2フラグauto_mc_size_enableがONの場合、予測画像の特徴量を用いて動き補償予測の形状を復号側で自動的に決定して動き補償予測を行う。第二のシンタックスを用いると、本境界を自動的に決定してしまうことで予測効率が低下する場合を排除できる。   FIG. 16 shows a second syntax pattern for transmitting a second flag (auto_mc_size_enable) indicating whether or not the shape of motion compensated prediction is automatically determined on the decoding side not only at the slice level but also in macroblock units. When the second flag auto_mc_size_enable is OFF, as in the case where the first flag use_auto_mc_size is OFF at the slice level, the macroblock is fixedly divided based on the macroblock type mb_type as before, and motion compensation prediction is performed. When the second flag auto_mc_size_enable is ON, motion compensated prediction is performed by automatically determining the shape of motion compensated prediction on the decoding side using the feature amount of the predicted image. When the second syntax is used, it is possible to eliminate the case where the prediction efficiency is lowered by automatically determining the boundary.

図17は、スライスレベルで動き補償予測の形状を復号側で自動的に決定するアルゴリズムを切り替える第三のシンタックスパターンを示す。スライス単位で第1フラグuse_auto_mc_sizeがONの場合、動き補償予測の形状を復号側で自動的に決定するアルゴリズムタイプを示すアルゴリズムタイプauto_mc_algorithmを伝送する。例えば、アルゴリズムタイプauto_mc_algorithm=0の場合、第1〜第4アクティビティACT1〜ACT4のすべてを用いた評価値に基づき動き補償予測の形状を決定する。アルゴリズムタイプauto_mc_algorithm=1の場合、第4アクティビティACT4を除いた第1〜第3アクティビティACT1〜ACT3だけを用いて評価値に基づき動き補償予測の形状を決定するなどである。このように、アルゴリズムタイプauto_mc_algorithmの値に使用するアクティビティの種類を対応づけることで、動き補償予測の形状を決定するアルゴリズムを切り替えることができる。第三のシンタックスを用いると、符号化側で最適なアルゴリズムタイプを判断して復号側で領域の自動分割を行わせることが可能になるため、符号化効率が更に向上する。   FIG. 17 shows a third syntax pattern for switching an algorithm for automatically determining the shape of motion compensation prediction at the slice level on the decoding side. When the first flag use_auto_mc_size is ON for each slice, an algorithm type auto_mc_algorithm indicating an algorithm type for automatically determining the shape of motion compensated prediction on the decoding side is transmitted. For example, when the algorithm type auto_mc_algorithm = 0, the shape of the motion compensation prediction is determined based on the evaluation values using all of the first to fourth activities ACT1 to ACT4. When the algorithm type auto_mc_algorithm = 1, the shape of the motion compensation prediction is determined based on the evaluation value using only the first to third activities ACT1 to ACT3 excluding the fourth activity ACT4. In this way, by associating the type of activity used with the value of the algorithm type auto_mc_algorithm, the algorithm for determining the shape of the motion compensation prediction can be switched. When the third syntax is used, it is possible to determine an optimal algorithm type on the encoding side and to perform automatic segmentation on the decoding side, thereby further improving the encoding efficiency.

図18は、マクロブロックを水平方向と垂直方向のどちらに領域を分割するか(分割方向)をシンタックス上で区別しない第四のシンタックスパターンを示す。マクロブロック単位でマクロブロックタイプmb_typeを伝送して動き補償予測の形状を判断することは第一のシンタックスパターンと同様だが、マクロブロックタイプmb_typeのセマンティックスが異なる。   FIG. 18 shows a fourth syntax pattern in which it is not distinguished on the syntax whether the macro block is divided into the horizontal direction or the vertical direction (division direction). It is the same as the first syntax pattern to transmit the macroblock type mb_type in units of macroblocks and determine the shape of the motion compensation prediction, but the macroblock type mb_type has different semantics.

図19は、第四のシンタックスパターンのマクロブロックタイプmb_typeのセマンティックスを示す。第1フラグuse_auto_mc_sizeがOFFの場合は、従来通りマクロブロックタイプmb_typeに基づきマクロブロックを固定的に分割して動き補償予測を行い、第1フラグuse_auto_mc_sizeがONの場合、予測画像の特徴量を用いて動き補償予測の形状を復号側で自動的に決定して動き補償予測を行うことは第一のシンタックスパターンと同様である。ただし、16×Aと16×(16−A)の2つの領域に水平方向に分割することと、A×16と(16−A)×16の2つの領域に垂直方向に分割することとが、マクロブロックタイプmb_type=1として区別されずに扱われることが第一のシンタックスパターンとは異なる。マクロブロックタイプmb_type=1の場合、水平方向本境界候補と垂直方向本境界候補のすべての境界評価値を算出し、最小の評価値を持つ境界候補を本境界に決定する。つまり、分割方向(水平方向・垂直方向)を含めて動き補償予測の形状を復号側で自動決定する。第四のシンタックスパターンを用いると、水平方向と垂直方向を区別する分割方向情報を伝送する必要がないため、マクロブロックタイプmb_typeの符号量が減少し、符号化効率が更に向上する。   FIG. 19 shows the semantics of the macro block type mb_type of the fourth syntax pattern. When the first flag use_auto_mc_size is OFF, the macroblock is fixedly divided based on the macroblock type mb_type as before, and motion compensation prediction is performed. When the first flag use_auto_mc_size is ON, the feature amount of the predicted image is used. The motion compensation prediction is performed by automatically determining the shape of the motion compensation prediction on the decoding side, as in the first syntax pattern. However, dividing into two areas of 16 × A and 16 × (16−A) in the horizontal direction and dividing into two areas of A × 16 and (16−A) × 16 in the vertical direction are possible. Unlike the first syntax pattern, the macroblock type mb_type = 1 is treated without distinction. When the macroblock type mb_type = 1, all boundary evaluation values of the horizontal main boundary candidate and the vertical main boundary candidate are calculated, and the boundary candidate having the minimum evaluation value is determined as the main boundary. That is, the shape of motion compensation prediction including the division direction (horizontal direction / vertical direction) is automatically determined on the decoding side. When the fourth syntax pattern is used, since it is not necessary to transmit division direction information for distinguishing between the horizontal direction and the vertical direction, the code amount of the macroblock type mb_type is reduced, and the encoding efficiency is further improved.

図20は、領域分割をマクロブロックタイプmb_typeと連動させずに決定する第五のシンタックスパターンを示す。マクロブロック単位でマクロブロックタイプmb_typeに代わって動きベクトル数motion_vector_num_minus1を伝送する。動きベクトル数motion_vector_num_minus1は(マクロブロック内の動きベクトルの本数−1)の値を表す。本発明の実施の形態では、伝送する動きベクトルの数だけ動き補償予測の領域が分割されるため、少なくとも動きベクトルの本数を伝送すれば、動き補償予測の形状を復号側で自動的に決定できる可能性がある。実施の形態1〜3では動きベクトルが2本の場合の例を説明したが、動きベクトルが2本より多い、たとえば3本の場合の例は実施の形態5で述べる。   FIG. 20 shows a fifth syntax pattern for determining region division without being linked with the macroblock type mb_type. The motion vector number motion_vector_num_minus1 is transmitted instead of the macroblock type mb_type in units of macroblocks. The number of motion vectors motion_vector_num_minus1 represents a value of (number of motion vectors in the macroblock-1). In the embodiment of the present invention, since the motion compensation prediction area is divided by the number of motion vectors to be transmitted, the shape of motion compensation prediction can be automatically determined on the decoding side if at least the number of motion vectors is transmitted. there is a possibility. In the first to third embodiments, an example in which there are two motion vectors has been described. However, an example in which there are more than two motion vectors, for example, three, will be described in a fifth embodiment.

ここまでは、MPEGのPピクチャなどで用いられる片方向予測について本発明の実施の形態を説明してきた。図21を参照して、本発明の実施の形態をBピクチャなどで用いられる双方向予測(通常は前方向予測と後方向予測)に対して適用した場合について説明する。ここで、マクロブロックを水平方向に2分割する場合を例に挙げて説明する。双方向予測とは、2つの参照画像から動き補償予測を行うことで得た2つの画像を平均化又は重みづけ平均化することにより、予測画像を得る技術である。   Up to this point, the embodiments of the present invention have been described for unidirectional prediction used in MPEG P-pictures. Referring to FIG. 21, a case will be described in which the embodiment of the present invention is applied to bi-directional prediction (usually forward prediction and backward prediction) used in B pictures and the like. Here, a case where a macroblock is divided into two in the horizontal direction will be described as an example. Bidirectional prediction is a technique for obtaining a predicted image by averaging or weighted averaging two images obtained by performing motion compensation prediction from two reference images.

まず、仮領域毎に各予測方向(前方向、後方向)の動きベクトルが検出される。図21(a)、(b)は、第1仮領域に対する各予測方向(前方向、後方向)の第1動きベクトルを示す。図21(a)、(b)は、第2仮領域に対する各予測方向(前方向、後方向)の第2動きベクトルを示す。   First, a motion vector in each prediction direction (forward direction, backward direction) is detected for each temporary region. FIGS. 21A and 21B show the first motion vectors in the respective prediction directions (forward and backward directions) with respect to the first temporary area. FIGS. 21A and 21B show the second motion vector in each prediction direction (forward direction, backward direction) with respect to the second temporary area.

図21(e)は、前方向および後方向の第1動きベクトルを用いて双方向予測した第1動き補償予測画像を示し、図21(f)は、前方向および後方向の第2動きベクトルを用いて双方向予測した第2動き補償予測画像を示す。   FIG. 21 (e) shows a first motion compensated prediction image that has been bi-directionally predicted using forward and backward first motion vectors, and FIG. 21 (f) shows forward and backward second motion vectors. The 2nd motion compensation prediction image bi-predicted using is shown.

図21(g)は、本境界決定後、マクロブロックの本境界より上側の本領域を第1動き補償予測画像の対応する領域から複製し、本境界より下側の本領域を第2動き補償予測画像の対応する領域から複製して生成される合成動き補償予測画像を示す。   FIG. 21 (g) shows that after the main boundary is determined, the main area above the main boundary of the macroblock is copied from the corresponding area of the first motion compensated prediction image, and the main area below the main boundary is copied to the second motion compensation. The synthetic | combination motion compensation prediction image produced | generated by duplicating from the area | region corresponding to a prediction image is shown.

このように、双方向予測に対して本発明の実施の形態を適用することは容易であり、双方向予測により予測誤差を削減しつつ、適切な領域分割により更に予測誤差を削減可能である。   As described above, it is easy to apply the embodiment of the present invention to bidirectional prediction, and prediction errors can be further reduced by appropriate region division while reducing prediction errors by bidirectional prediction.

また、本発明の実施の形態は、動きベクトルを直接伝送するのではなく、周辺ブロックの動きベクトルや参照画像の動きベクトルを基に自動算出した動きベクトルを用いて動き補償予測の形状を自動的に決定することももちろん可能である。   The embodiment of the present invention does not directly transmit a motion vector, but automatically uses a motion vector automatically calculated based on a motion vector of a peripheral block or a motion vector of a reference image to automatically change the shape of motion compensation prediction. Of course, it is also possible to decide.

また、ここまでは単一の画像コンポーネント(輝度)について説明したが、YUV4:4:4/YUV4:2:2/YUV4:2:0などの複数コンポーネント(輝度及び色差)にも適用することが可能である。ただし、動き補償予測では輝度と色差を同時に行うため、YUV4:2:2やYUV4:2:0などの輝度と色差のサンプル数が異なるフォーマットでは、サンプル数の多い輝度を基準に領域を分割した場合、色差の領域分割位置があいまいになる可能性がある。例えば、YUV4:2:0フォーマットの時に、輝度を16×5と16×11に分割する場合に色差の領域分割が8×2なのか8×3なのか不明になどである。このあいまいさを防止する対策としては、あらかじめサンプル数の少ない色差を基準にして領域を分割することや、あいまいな位置での色差の分割規則を予め決めておく(ブロックの中心を基準に切り捨てる)方法や、境界上の画素は両動き補償予測画像の平均値(フィルタリング)を用いる方法などがある。   Although a single image component (luminance) has been described so far, it can be applied to a plurality of components (luminance and color difference) such as YUV4: 4: 4 / YUV4: 2: 2 / YUV4: 2: 0. Is possible. However, since motion compensation prediction performs luminance and color difference at the same time, in a format with different luminance and color difference samples such as YUV4: 2: 2 and YUV4: 2: 0, the region is divided based on the luminance with a large number of samples. In this case, the area division position of the color difference may be ambiguous. For example, when the luminance is divided into 16 × 5 and 16 × 11 in the YUV 4: 2: 0 format, it is unknown whether the color difference area division is 8 × 2 or 8 × 3. As measures to prevent this ambiguity, the area is divided in advance based on the color difference with a small number of samples, and the division rule for the color difference at the ambiguous position is determined in advance (the block center is discarded). There are a method and a method using an average value (filtering) of both motion compensated prediction images for pixels on the boundary.

(実施の形態4)
実施の形態4の動画像符号化装置および動画像復号装置は、実施の形態1〜3と同一の構成を取るが、実施の形態4の動画像符号化装置は、マクロブロックを2次元に分割して動き補償を行い、2つの動きベクトルを伝送し、動画像復号装置は、動き補償予測の形状を復号側で2次元に分割し、伝送された2つの動きベクトルを用いた動き補償を行う。
(Embodiment 4)
The moving picture encoding apparatus and moving picture decoding apparatus according to the fourth embodiment have the same configurations as those of the first to third embodiments. However, the moving picture encoding apparatus according to the fourth embodiment divides a macroblock into two dimensions. Then, motion compensation is performed and two motion vectors are transmitted, and the video decoding device divides the motion compensated prediction shape into two dimensions on the decoding side, and performs motion compensation using the transmitted two motion vectors. .

図22(a)〜(f)は、マクロブロックを2次元に領域分割する方法を示す。図22(a)のように、実施の形態1〜3で説明した手順を実行することで、マクロブロックに対して水平方向境界と垂直方向境界をそれぞれ定める。水平方向境界より上または下、および、垂直方向境界より左または右の組み合わせにより、図22(b)〜(e)の4通りの2次元分割パターンを定義することができる。   22A to 22F show a method of dividing a macroblock into two dimensions. As shown in FIG. 22A, the horizontal boundary and the vertical boundary are defined for the macroblock by executing the procedure described in the first to third embodiments. The two types of two-dimensional division patterns shown in FIGS. 22B to 22E can be defined by combinations above or below the horizontal boundary and left or right from the vertical boundary.

図22(b)の2次元分割パターンでは、水平方向境界より上、かつ、垂直方向境界より左の領域を第1領域とし、残りの領域(水平方向境界より下、または、垂直方向境界より左の領域)を第2領域とする。   In the two-dimensional division pattern of FIG. 22B, the area above the horizontal boundary and to the left of the vertical boundary is the first area, and the remaining area (below the horizontal boundary or left of the vertical boundary). Area) is the second area.

図22(c)の2次元分割パターンでは、水平方向境界より下、または、垂直方向境界より左の領域を第1領域とし、残りの領域(水平方向境界より上、かつ、垂直方向境界より右の領域)を第2領域とする。   In the two-dimensional division pattern of FIG. 22C, the area below the horizontal boundary or the left of the vertical boundary is the first area, and the remaining area (above the horizontal boundary and to the right of the vertical boundary). Area) is the second area.

図22(d)の2次元分割パターンでは、水平方向境界より上、または、垂直方向境界より右の領域を第1領域とし、残りの領域(水平方向境界より下、かつ、垂直方向境界より左の領域)を第2領域とする。   In the two-dimensional division pattern of FIG. 22D, the region above the horizontal boundary or right of the vertical boundary is defined as the first region, and the remaining region (below the horizontal boundary and left of the vertical boundary). Area) is the second area.

図22(e)の2次元分割パターンでは、水平方向境界より上、または、垂直方向境界より左の領域を第1領域とし、残りの領域(水平方向境界より下、かつ、垂直方向境界より右の領域)を第2領域とする。   In the two-dimensional division pattern of FIG. 22E, the area above the horizontal boundary or the left of the vertical boundary is the first area, and the remaining area (below the horizontal boundary and to the right of the vertical boundary). Area) is the second area.

図22(f)は、これら4つの2次元分割パターンから一つを選んで、第1領域には第1動きベクトルによる動き補償予測画像の対応領域を、第2領域には第2動きベクトルによる動き補償予測画像の対応領域をそれぞれ複製することで得られる合成動き補償予測画像を示す。   In FIG. 22F, one of these four two-dimensional division patterns is selected, the corresponding region of the motion compensated prediction image based on the first motion vector is used for the first region, and the second motion vector is used for the second region. The composite motion compensation prediction image obtained by duplicating the corresponding region of the motion compensation prediction image is shown.

図23は、マクロブロックを2次元に分割して動き補償を行う手順を説明するフローチャートである。まず、実施の形態1と同様の方法で、水平方向境界と垂直方向境界の両境界を決定する(S31)。次に、水平方向境界と垂直方向境界の組み合わせによって2つに分割されたマクロブロックの2次元分割領域について、境界アクティビティの評価値を算出する(S32)。例えば、マクロブロック内のX座標をi、Y座標をjにおける画素値をAi,jとすると、2次元分割領域に境界に沿って、水平方向境界jの水平アクティビティをi=aからi=bまで適用し、垂直方向境界iの垂直アクティビティをj=cからj=dまで適用した場合の2次元平均アクティビティを以下のように定義することができる。
2次元平均アクティビティ=Σi=a |Ai,j−Ai,jー1|/(b−a)+Σj=c |Ai,j−Aiー1,j|/(d−c)
FIG. 23 is a flowchart illustrating a procedure for performing motion compensation by dividing a macroblock into two dimensions. First, both the horizontal boundary and the vertical boundary are determined by the same method as in the first embodiment (S31). Next, the evaluation value of the boundary activity is calculated for the two-dimensional divided area of the macroblock divided into two by the combination of the horizontal boundary and the vertical boundary (S32). For example, if the X coordinate in the macroblock is i, and the pixel value at the Y coordinate is j is A i, j , the horizontal activity at the horizontal boundary j is changed from i = a to i = The two-dimensional average activity when applying up to b and applying the vertical activity at the vertical boundary i from j = c to j = d can be defined as follows.
Two-dimensional average activity = Σ i = a b | A i, j −A i, j−1 | / (b−a) + Σ j = c d | A i, j −A i−1, j | / (d -C)

上記の2次元平均アクティビティを評価値に用いることで、アクティビティ算出に使用したサンプル数に依存せずに、2次元領域分割を評価することが可能である。ステップS32をすべての2次元分割パターン(ここでは4パターン)で繰り返し(S33)、最小評価値を持つ2次元分割候補を選択して、合成動き補償予測画像を生成する。   By using the above two-dimensional average activity as the evaluation value, it is possible to evaluate the two-dimensional region division without depending on the number of samples used for the activity calculation. Step S32 is repeated for all two-dimensional division patterns (here, four patterns) (S33), a two-dimensional division candidate having the minimum evaluation value is selected, and a combined motion compensated prediction image is generated.

このように、実施の形態4では、実施の形態1より柔軟な形状で動き補償予測を行えるため、更に符号化効率が向上する。   As described above, in the fourth embodiment, since motion compensation prediction can be performed with a more flexible shape than in the first embodiment, the coding efficiency is further improved.

(実施の形態5)
実施の形態5の動画像符号化装置および動画像復号装置は、実施の形態1〜3と同一の構成を取るが、実施の形態5の動画像符号化装置は、3つの動きベクトルを用いてマクロブロックを3分割して動き補償を行い、3つの動きベクトルを伝送し、動画像復号装置は、伝送された3つの動きベクトルを用いて、動き補償予測の形状を復号側で3分割して動き補償を行う。
(Embodiment 5)
The moving picture encoding apparatus and moving picture decoding apparatus of the fifth embodiment have the same configurations as those of the first to third embodiments, but the moving picture encoding apparatus of the fifth embodiment uses three motion vectors. The macroblock is divided into three to perform motion compensation, and three motion vectors are transmitted. The moving picture decoding apparatus divides the shape of motion compensated prediction into three on the decoding side using the transmitted three motion vectors. Perform motion compensation.

図24(a)、(b)は、マクロブロックを3つの領域に分割する方法を示す。図24(a)のように、まず、実施の形態1〜3で説明した手順を実行することで、水平方向境界または垂直方向境界により、マクロブロックを2分割する。次に、図24(b)のように、2分割された領域の内、大きい方の領域について、さらに水平方向境界または垂直方向境界を設定することにより、大きい方の領域を2分割する。これにより、マクロブロックは3分割され、各領域で動きベクトルが検出される。   FIGS. 24A and 24B show a method of dividing a macroblock into three regions. As shown in FIG. 24A, first, the procedure described in the first to third embodiments is executed to divide the macroblock into two at the horizontal boundary or the vertical boundary. Next, as shown in FIG. 24B, by setting a horizontal boundary or a vertical boundary for the larger area among the two divided areas, the larger area is divided into two. Thereby, the macroblock is divided into three, and a motion vector is detected in each region.

図25は、マクロブロックを3分割して動き補償を行う手順を説明するフローチャートである。マクロブロックを3領域に分割して動き補償を行うために、3本の動きベクトルを検出して伝送することが必要となる。まず、実施の形態1と同様の方法で、1本目の動きベクトルと2本目の動きベクトルを用いて、水平方向又は垂直方向に領域分割し、動き補償を行う(S41)。次に、1本目の動きベクトルと2本目の動きベクトルによって分割された領域の大小を比較し、大きい方の領域を判断する(S42)。これは、大きい領域の方が領域分割の影響が大きく、予測効率の向上がより大きく見込めるためである。また、領域の大きさが同一の場合は、予めどちらの領域が優先するかを決めておく。最後に、大きい方の領域について、その領域の動きベクトル(1本目の動きベクトル又は2本目の動きベクトル)と3本目の動きベクトルを用いて、水平方向又は垂直方向に領域分割し、動き補償を行う(S43)。   FIG. 25 is a flowchart illustrating a procedure for performing motion compensation by dividing a macroblock into three. In order to perform motion compensation by dividing a macroblock into three regions, it is necessary to detect and transmit three motion vectors. First, using the first motion vector and the second motion vector in the same manner as in the first embodiment, the region is divided in the horizontal direction or the vertical direction, and motion compensation is performed (S41). Next, the size of the region divided by the first motion vector and the second motion vector is compared, and the larger region is determined (S42). This is because the larger region is more affected by the region division, and the prediction efficiency can be expected to improve more greatly. Also, when the size of the area is the same, previously you decide in advance which of the regions are preferentially. Finally, for the larger region, using the motion vector of the region (first motion vector or second motion vector) and the third motion vector, the region is divided in the horizontal direction or the vertical direction, and motion compensation is performed. Perform (S43).

このように、実施の形態5では、3本の動きベクトルを用いて動き補償予測の領域を3分割できる。これにより、複数の小さな動き等にも対応できるため、更に符号化効率が向上する。同様にして領域の分割をさらに進めることにより、動き補償予測の領域を4分割以上にして、動きベクトルの数を4以上にすることもできる。   As described above, in the fifth embodiment, the motion compensation prediction region can be divided into three using three motion vectors. As a result, it is possible to cope with a plurality of small movements and the like, so that the encoding efficiency is further improved. Similarly, by further dividing the region, the region of motion compensation prediction can be divided into four or more and the number of motion vectors can be four or more.

以上述べたように、本発明の実施の形態によれば、複数の動きベクトルから得られる複数の予測画像の特徴量を用いて、動き補償予測の形状を復号側で自動的に決定することによって、動き補償予測形状パターンの情報を伝送せずに、動き補償予測の形状を可変にすることができる。したがって、さまざまな形状での柔軟な動き補償予測が可能となり、その結果、付加情報の符号量を増加させることなく、動き補償予測の予測誤差を減少させることができ、符号化効率が向上する。   As described above, according to the embodiment of the present invention, by using the feature amounts of a plurality of predicted images obtained from a plurality of motion vectors, the shape of motion compensated prediction is automatically determined on the decoding side. The shape of the motion compensation prediction can be made variable without transmitting the information of the motion compensation prediction shape pattern. Therefore, flexible motion compensation prediction in various shapes is possible. As a result, the prediction error of motion compensation prediction can be reduced without increasing the code amount of the additional information, and the coding efficiency is improved.

また、符号化側の動きベクトル検出過程において、復号側で決定される本境界を算出しながら動きベクトルを評価することで、最適な動きベクトルと最適な本境界の双方を同時に実現した。これにより、動き補償予測の予測効率が向上する。また、復号側では伝送されてきた動きベクトルから算出される本境界を用いて動き補償予測を行うだけで、動画像を復号することができる。   Also, in the motion vector detection process on the encoding side, both the optimal motion vector and the optimal main boundary were realized simultaneously by evaluating the motion vector while calculating the main boundary determined on the decoding side. Thereby, the prediction efficiency of motion compensation prediction improves. On the decoding side, a moving image can be decoded only by performing motion compensation prediction using this boundary calculated from the transmitted motion vector.

以上の符号化及び復号に関する処理は、ハードウェアを用いた伝送、蓄積、受信装置として実現することができるのは勿論のこと、ROM(リード・オンリ・メモリ)やフラッシュメモリ等に記憶されているファームウェアや、コンピュータ等のソフトウェアによっても実現することができる。そのファームウェアプログラム、ソフトウェアプログラムをコンピュータ等で読み取り可能な記録媒体に記録して提供することも、有線あるいは無線のネットワークを通してサーバから提供することも、地上波あるいは衛星ディジタル放送のデータ放送として提供することも可能である。   The above processing relating to encoding and decoding can be realized as a transmission, storage, and reception device using hardware, and is stored in a ROM (Read Only Memory), a flash memory, or the like. It can also be realized by firmware or software such as a computer. The firmware program and software program can be recorded on a computer-readable recording medium, provided from a server through a wired or wireless network, or provided as a data broadcast of terrestrial or satellite digital broadcasting Is also possible.

以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on the embodiments. The embodiments are exemplifications, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are within the scope of the present invention. .

101 仮領域分割部、 102 動きベクトル検出部、 103 本領域分割・動き補償部、 104 直交変換・量子化部、 105 可変長符号化部、 106 逆量子化・逆直交変換部、 107 参照画像メモリ、 108 減算部、 109 加算部、 201 可変長復号部、 203 本領域分割・動き補償部、 206 逆量子化・逆直交変換部、 207 参照画像メモリ、 209 加算部。   101 Temporary region segmentation unit, 102 Motion vector detection unit, 103 Region segmentation / motion compensation unit, 104 Orthogonal transformation / quantization unit, 105 Variable length coding unit, 106 Inverse quantization / inverse orthogonal transformation unit, 107 Reference image memory , 108 subtraction unit, 109 addition unit, 201 variable length decoding unit, 203 area division / motion compensation unit, 206 inverse quantization / inverse orthogonal transform unit, 207 reference image memory, 209 addition unit.

Claims (9)

符号化対象ブロックを所定の仮境界で複数の仮領域に分割する仮領域分割部と、
各仮領域に対して動きベクトルを検出する動きベクトル検出部と、
各仮領域の動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した複数の予測ブロックを生成し、複数の予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部と、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部とを備えることを特徴とする動画像符号化装置。
A temporary area dividing unit that divides the encoding target block into a plurality of temporary areas at a predetermined temporary boundary;
A motion vector detection unit for detecting a motion vector for each temporary region;
A plurality of prediction blocks corresponding to the coding target block is generated from a reference image using a motion vector of each temporary region, a main boundary is determined based on activities of the plurality of prediction blocks, and each prediction block is A motion compensation unit that generates a combined prediction block by combining regions obtained by dividing the boundary between the prediction blocks;
A moving picture encoding apparatus comprising: a prediction difference block obtained by subtracting the combined prediction block from the encoding target block; and an encoding unit that encodes a motion vector of each temporary region.
前記動き補償部は、複数の予測ブロックの各隣接画素間のアクティビティに基づいて本境界候補に対応する評価値を算出し、前記評価値を用いて本境界候補の中から本境界を決定することを特徴とする請求項1に記載の動画像符号化装置。   The motion compensation unit calculates an evaluation value corresponding to the main boundary candidate based on an activity between adjacent pixels of a plurality of prediction blocks, and determines the main boundary from the main boundary candidates using the evaluation value. The moving picture coding apparatus according to claim 1, wherein: 前記本境界候補は、2画素間隔以上の所定画素間隔毎に設けられており、前記動き補償部は、本境界候補のアクティビティと、本境界候補に隣接する本境界候補に設定されていない境界のアクティビティとにもとづいて本境界候補に対応する前記評価値を算出することを特徴とする請求項2に記載の動画像符号化装置。   The main boundary candidates are provided at predetermined pixel intervals equal to or greater than two pixel intervals, and the motion compensator detects an activity of the main boundary candidate and a boundary not set as the main boundary candidate adjacent to the main boundary candidate. The moving picture encoding apparatus according to claim 2, wherein the evaluation value corresponding to the boundary candidate is calculated based on the activity. 前記動き補償部により決定された前記本境界が前記仮境界と異なる場合、前記動きベクトル検出部が少なくとも1つの仮領域の動きベクトルを前回とは異なる値に再設定し、前記動き補償部は、再設定対象の仮領域においてはその再設定された動きベクトルを採用した各仮領域の動きベクトルを用いて生成される複数の予測ブロックのアクティビティに基づいて、前記本境界を再決定することを特徴とする請求項1から3のいずれかに記載の動画像符号化装置。   When the main boundary determined by the motion compensation unit is different from the temporary boundary, the motion vector detection unit resets the motion vector of at least one temporary region to a value different from the previous time, and the motion compensation unit includes: In the temporary area to be reset, the main boundary is redetermined based on the activity of a plurality of prediction blocks generated using the motion vector of each temporary area adopting the reset motion vector. The moving picture encoding apparatus according to claim 1. 前記仮領域分割部は複数の仮境界候補を設定し、前記符号化対象ブロックを前記仮境界候補毎に複数の仮領域に分割し、
前記動きベクトル検出部は、仮境界候補毎に各仮領域に対する動きベクトルを検出し、
前記動き補償部は、仮境界候補毎に各仮領域の動きベクトルを用いて、前記合成予測ブロックの候補を生成し、最も予測効率の良い合成予測ブロックの候補を最終的な合成予測ブロックとして選択することを特徴とする請求項1から3のいずれかに記載の動画像符号化装置。
The temporary region dividing unit sets a plurality of temporary boundary candidates, divides the encoding target block into a plurality of temporary regions for each temporary boundary candidate,
The motion vector detection unit detects a motion vector for each temporary region for each temporary boundary candidate,
The motion compensation unit generates a candidate for the combined prediction block using a motion vector of each temporary region for each temporary boundary candidate, and selects a candidate for the combined prediction block having the highest prediction efficiency as a final combined prediction block. The moving picture coding apparatus according to claim 1, wherein the moving picture coding apparatus according to claim 1 is used.
前記動き補償部により決定された前記本境界が前記仮境界と異なる場合、前記仮領域分割部は別の仮境界を再設定し、前記動きベクトル検出部は、再設定された仮境界で分割される仮領域毎に動きベクトルを再検出し、前記動き補償部は、再検出された各仮領域の動きベクトルを用いて生成される複数の予測ブロックのアクティビティに基づいて前記本境界を再決定することを特徴とする請求項1から3のいずれかに記載の動画像符号化装置。   When the main boundary determined by the motion compensation unit is different from the temporary boundary, the temporary region dividing unit resets another temporary boundary, and the motion vector detecting unit is divided at the reset temporary boundary. The motion compensation unit re-determines the main boundary based on the activity of a plurality of prediction blocks generated using the re-detected motion vector of each temporary region. The moving picture coding apparatus according to claim 1, wherein the moving picture coding apparatus is a moving picture coding apparatus. 前記予測ブロックのアクティビティは、前記予測ブロックが分割される本境界をまたぐ画素値を評価した境界アクティビティであることを特徴とする請求項1から6のいずれかに記載の動画像符号化装置。   7. The moving picture encoding apparatus according to claim 1, wherein the activity of the prediction block is a boundary activity obtained by evaluating a pixel value across a main boundary into which the prediction block is divided. 符号化対象ブロックを所定の仮境界で複数の仮領域に分割するステップと、
各仮領域に対して動きベクトルを検出するステップと、
各仮領域の動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した複数の予測ブロックを生成し、複数の予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成するステップと、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化するステップとを備えることを特徴とする動画像符号化方法。
Dividing the block to be encoded into a plurality of temporary regions at a predetermined temporary boundary;
Detecting a motion vector for each temporary region;
A plurality of prediction blocks corresponding to the coding target block is generated from a reference image using a motion vector of each temporary region, a main boundary is determined based on activities of the plurality of prediction blocks, and each prediction block is Generating a synthesized prediction block by combining regions obtained by dividing at the boundary between the prediction blocks;
A moving picture coding method comprising: a prediction difference block obtained by subtracting the synthesized prediction block from the coding target block; and a step of coding a motion vector of each temporary area.
符号化対象ブロックを所定の仮境界で複数の仮領域に分割する機能と、
各仮領域に対して動きベクトルを検出する機能と、
各仮領域の動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した複数の予測ブロックを生成し、複数の予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する機能と、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する機能とをコンピュータに実現させることを特徴とする動画像符号化プログラム。
A function of dividing the block to be encoded into a plurality of temporary areas at a predetermined temporary boundary;
A function to detect a motion vector for each temporary area;
A plurality of prediction blocks corresponding to the coding target block is generated from a reference image using a motion vector of each temporary region, a main boundary is determined based on activities of the plurality of prediction blocks, and each prediction block is A function of generating a combined prediction block by combining regions obtained by dividing at the boundary between the prediction blocks;
A moving picture encoding program that causes a computer to realize a prediction difference block obtained by subtracting the synthesized prediction block from the encoding target block and a function of encoding a motion vector of each temporary area.
JP2010217754A 2010-04-07 2010-09-28 Moving image encoding apparatus, moving image encoding method and moving image encoding program Pending JP2011234337A (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP2010217754A JP2011234337A (en) 2010-04-07 2010-09-28 Moving image encoding apparatus, moving image encoding method and moving image encoding program
KR1020147000905A KR20140017018A (en) 2010-04-07 2011-03-23 Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
CN201180026733.7A CN102918842B (en) 2010-04-07 2011-03-23 Moving image encoding device and method and moving image decoding apparatus and method
KR1020127029274A KR101419634B1 (en) 2010-04-07 2011-03-23 Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
EP11765201.6A EP2557791A4 (en) 2010-04-07 2011-03-23 Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
PCT/JP2011/001690 WO2011125299A1 (en) 2010-04-07 2011-03-23 Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
US13/631,114 US20130064299A1 (en) 2010-04-07 2012-09-28 Moving picture encoding apparatus, moving picture encoding method, and moving picture encoding program, and moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2010088528 2010-04-07
JP2010088528 2010-04-07
JP2010217754A JP2011234337A (en) 2010-04-07 2010-09-28 Moving image encoding apparatus, moving image encoding method and moving image encoding program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2013141542A Division JP2013225927A (en) 2010-04-07 2013-07-05 Moving image encoding device, moving image encoding method and moving image encoding program

Publications (2)

Publication Number Publication Date
JP2011234337A true JP2011234337A (en) 2011-11-17
JP2011234337A5 JP2011234337A5 (en) 2012-11-29

Family

ID=45323139

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2010217754A Pending JP2011234337A (en) 2010-04-07 2010-09-28 Moving image encoding apparatus, moving image encoding method and moving image encoding program
JP2013141542A Pending JP2013225927A (en) 2010-04-07 2013-07-05 Moving image encoding device, moving image encoding method and moving image encoding program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2013141542A Pending JP2013225927A (en) 2010-04-07 2013-07-05 Moving image encoding device, moving image encoding method and moving image encoding program

Country Status (1)

Country Link
JP (2) JP2011234337A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000511366A (en) * 1995-10-25 2000-08-29 サーノフ コーポレイション Apparatus and method for variable block size motion estimation based on quadrant tree
JP2005012439A (en) * 2003-06-18 2005-01-13 Nippon Hoso Kyokai <Nhk> Encoding device, encoding method and encoding program
JP2010081635A (en) * 2009-11-20 2010-04-08 Casio Computer Co Ltd Apparatus, method and program for motion compensation prediction coding

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4142563B2 (en) * 2003-12-12 2008-09-03 株式会社エヌ・ティ・ティ・ドコモ Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP4313710B2 (en) * 2004-03-25 2009-08-12 パナソニック株式会社 Image encoding method and image decoding method
BRPI0818344A2 (en) * 2007-10-12 2015-04-22 Thomson Licensing Methods and apparatus for encoding and decoding video of geometrically partitioned bi-predictive mode partitions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000511366A (en) * 1995-10-25 2000-08-29 サーノフ コーポレイション Apparatus and method for variable block size motion estimation based on quadrant tree
JP2005012439A (en) * 2003-06-18 2005-01-13 Nippon Hoso Kyokai <Nhk> Encoding device, encoding method and encoding program
JP2010081635A (en) * 2009-11-20 2010-04-08 Casio Computer Co Ltd Apparatus, method and program for motion compensation prediction coding

Also Published As

Publication number Publication date
JP2013225927A (en) 2013-10-31

Similar Documents

Publication Publication Date Title
WO2011125299A1 (en) Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
US9055302B2 (en) Video encoder and video decoder
KR20200108431A (en) Deblocking filter selection and application in video coding
US8606026B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method based on reduced-image displacement vector
KR20140016375A (en) Filtering blockiness artifacts for video coding
WO2010082463A1 (en) Image encoding apparatus and image encoding method, image decoding apparatus and image decoding method
WO2012098845A1 (en) Image encoding method, image encoding device, image decoding method, and image decoding device
KR20130119465A (en) Block based sampling coding systems
JP2012070277A (en) Video encoding device, video encoding method and video encoding program
JP6065088B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, transmission apparatus, transmission method, and transmission program
JP2012070278A (en) Video decoding device, video decoding method and video decoding program
JP2007531444A (en) Motion prediction and segmentation for video data
JP5206772B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP2011135460A (en) Moving image encoding apparatus and moving image decoding apparatus
JP5880758B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP2011234338A (en) Dynamic image decoder, dynamic image decoding method and dynamic image decoding program
JP5206773B2 (en) Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2011234337A (en) Moving image encoding apparatus, moving image encoding method and moving image encoding program
JP5513333B2 (en) Moving picture coding apparatus, moving picture coding method, and program
WO2011122659A1 (en) Encoder apparatus and decoder apparatus
JP2011254395A (en) Moving image encoding apparatus, moving image encoding method and moving image encoding program
JP2011254396A (en) Moving image decoding apparatus, moving image decoding method and moving image decoding program
JP6181242B2 (en) Image decoding method
JP5951915B2 (en) Image decoding method
KR20230169986A (en) Intra prediction method and device based on multiple DIMD modes

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120821

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120905

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121015

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130507

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130806

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20131210