JP2011254395A - 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
JP2011254395A
JP2011254395A JP2010128164A JP2010128164A JP2011254395A JP 2011254395 A JP2011254395 A JP 2011254395A JP 2010128164 A JP2010128164 A JP 2010128164A JP 2010128164 A JP2010128164 A JP 2010128164A JP 2011254395 A JP2011254395 A JP 2011254395A
Authority
JP
Japan
Prior art keywords
motion vector
block
prediction
motion
region
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
JP2010128164A
Other languages
Japanese (ja)
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 JP2010128164A priority Critical patent/JP2011254395A/en
Publication of JP2011254395A publication Critical patent/JP2011254395A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve an encoding efficiency of the conventional moving image encoding/decoding which is motion compensation predicted in a shape pattern prepared in advance.SOLUTION: A first motion vector detection section 108 detects a first motion vector in a local decoded template area adjacent vertically or horizontally to an encoding target block. A virtual area division section 101 divides the encoding target block into two virtual areas. A second motion vector detection section 102 detects a second motion vector by using an original image of the encoding target block to the virtual area having a smaller part adjacent to the template area. A main area division and motion compensation section 103 generates two prediction blocks corresponding to the encoding target block from a reference image by using the first and the second motion vectors, determines a main boundary based on activities of the two prediction blocks and combines areas which are obtained by dividing the each prediction block by the main boundary to generate a synthesis prediction block.

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.

上記課題を解決するために、本発明のある態様の動画像符号化装置は、符号化対象ブロックに隣接した局所復号済みの所定領域の第1動きベクトルを決定する第1動きベクトル決定部(108)と、前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割する仮領域分割部(101)と、2つの仮領域の内、前記所定領域に隣接する部分が少ない方の仮領域に対して、符号化対象ブロックの原画像を用いて、第2動きベクトルを検出する第2動きベクトル検出部(102)と、前記第1動きベクトルおよび前記第2動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部(103)と、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部(105)とを備える。   In order to solve the above-described problem, a moving image encoding apparatus according to an aspect of the present invention includes a first motion vector determination unit (108) that determines a first motion vector of a predetermined region that has been locally decoded and is adjacent to an encoding target block. ), A temporary area dividing unit (101) that divides the encoding target block into two temporary areas at a predetermined temporary boundary, and a temporary area that has a smaller portion adjacent to the predetermined area of the two temporary areas On the other hand, a second motion vector detection unit (102) that detects a second motion vector using the original image of the encoding target block, and a reference image using the first motion vector and the second motion vector Obtained two prediction blocks corresponding to the block to be encoded, determined the main boundary based on the activities of the two prediction blocks, and obtained by dividing each prediction block at the main boundary A motion compensation unit (103) that generates a composite prediction block by combining a region between the prediction blocks, a prediction difference block obtained by subtracting the composite prediction block from the encoding target block, and a motion of each temporary region And an encoding unit (105) for encoding the vector.

本発明の別の態様もまた、動画像符号化装置である。この装置は、符号化対象ブロックに水平方向に隣接した局所復号済みの第1所定領域の第1動きベクトルと、前記符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域の第2動きベクトルとを決定する動きベクトル決定部(108)と、前記第1動きベクトルおよび前記第2動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部(103)と、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部(105)とを備える。   Another aspect of the present invention is also a moving image encoding apparatus. The apparatus includes: a first motion vector of a first predetermined region that has been locally decoded adjacent to a block to be encoded; and a second motion vector of a second predetermined region that has been decoded and that is adjacent to the block to be encoded. A motion vector determination unit (108) that determines two motion vectors, and using the first motion vector and the second motion vector, generate two prediction blocks corresponding to the coding target block from a reference image; Motion compensation that generates a combined prediction block by determining a main boundary based on activities of two prediction blocks and combining regions obtained by dividing the prediction blocks at the main boundary between the prediction blocks Part (103), a prediction difference block obtained by subtracting the combined prediction block from the encoding target block, and a motion vector of each temporary area Comprising encoding unit for the (105).

本発明のさらに別の態様もまた、動画像符号化装置である。この装置は、符号化対象ブロックに水平方向に隣接した局所復号済みの第1所定領域に対する第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域に対する第2動きベクトルを決定し、第1動きベクトルおよび第2動きベクトルの内、いずれか一方の動きベクトルを採用する第1・第2動きベクトル決定部(108)と、前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割する仮領域分割部と、2つの仮領域の内、前記第1・第2動きベクトル決定部により採用された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出する第3動きベクトル検出部(102)と、前記第1・第2動きベクトル決定部により採用された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部(103)と、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部(105)とを備える。   Yet another embodiment of the present invention is also a moving image encoding apparatus. The apparatus includes: a first motion vector for a first predetermined region that has been locally decoded adjacent to a current block to be encoded; and a second motion vector for a second predetermined region that has been locally decoded and adjacent to a current block to be encoded. A first and second motion vector determination unit (108) that determines a motion vector and adopts one of the first motion vector and the second motion vector; and A temporary area dividing unit that divides into two temporary areas at the boundary, and a temporary area that is not adjacent to the predetermined area in which the motion vector employed by the first and second motion vector determining units is determined, of the two temporary areas On the other hand, the third motion vector detection unit (102) that detects the third motion vector using the original image of the block to be encoded and the first and second motion vector determination units adopt it. Using the generated motion vector and the third motion vector, generate two prediction blocks corresponding to the block to be encoded from a reference image, determine a boundary based on activities of the two prediction blocks, A motion compensation unit (103) that generates a combined prediction block by combining regions obtained by dividing a prediction block at the main boundary between the prediction blocks, and the combined prediction block from the encoding target block An encoding unit (105) that encodes the subtracted prediction difference block and the motion vector of each temporary area is provided.

本発明のさらに別の態様もまた、動画像符号化装置である。この装置は、符号化対象ブロックに水平方向に隣接した局所復号済みの第1所定領域の第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域の第2動きベクトルとを決定するとともに、第1動きベクトルおよび第2動きベクトルの内、一方の動きベクトルを主動きベクトル、他方の動きベクトルを副動きベクトルとして選択する第1・第2動きベクトル決定部(108)と、前記第1動きベクトルおよび前記第2動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した第1および第2予測ブロックを生成し、第1および第2予測ブロックのアクティビティに基づいて第1の本境界を決定する動き補償部(103)と、前記第1の本境界により2つの分割された本領域の内、前記第1・第2動きベクトル決定部により副動きベクトルとして選択された動きベクトルが決定された所定領域に隣接する部分の多い方の本領域を選択し、選択された本領域を所定の仮境界でさらに2つの仮領域に分割する仮領域分割部(101)と、2つの仮領域の内、前記副動きベクトルとして選択された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出する第3動きベクトル検出部(102)とを含む。前記動き補償部は、前記副動きベクトルとして選択された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した第3および第4予測ブロックを生成し、第3および第4予測ブロックのアクティビティに基づいて第2の本境界を決定し、前記第1または第2予測ブロックを前記第1の本境界で分割して得た領域と、第3および第4予測ブロックを前記第2の本境界で分割して得た領域とを前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する。この装置は、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部(105)をさらに備える。   Yet another embodiment of the present invention is also a moving image encoding apparatus. The apparatus includes a first motion vector of a first predetermined region that has been locally decoded adjacent to a block to be encoded in a horizontal direction, and a second motion vector of a second predetermined region that has been decoded and that is adjacent to the block to be encoded in a vertical direction. First and second motion vector determination units that determine a motion vector and select one of the first motion vector and the second motion vector as a main motion vector and the other motion vector as a sub motion vector ( 108) and the first motion vector and the second motion vector to generate first and second prediction blocks corresponding to the coding target block from a reference image, and activities of the first and second prediction blocks A motion compensator (103) for determining a first main boundary based on the first main boundary, and the first and second main regions divided by the first main boundary. The main region having a larger portion adjacent to the predetermined region where the motion vector selected as the sub motion vector by the two motion vector determination unit is selected is selected, and the selected main region is further divided into two temporary regions at a predetermined temporary boundary. A temporary area dividing unit (101) that divides the area into two areas, and a temporary area that is not adjacent to the predetermined area in which the motion vector selected as the sub-motion vector among the two temporary areas is determined. And a third motion vector detection unit (102) that detects a third motion vector using the original image. The motion compensation unit generates a third and a fourth prediction block corresponding to the coding target block from a reference image using the motion vector selected as the sub motion vector and the third motion vector, And a region obtained by determining a second main boundary based on the activity of the fourth prediction block and dividing the first or second prediction block at the first main boundary; and third and fourth prediction blocks Are combined with the regions obtained by dividing the second main boundary by the second main boundary to generate a combined prediction block. The apparatus further includes an encoding unit (105) that encodes a prediction difference block obtained by subtracting the combined prediction block from the encoding target block and a motion vector of each temporary region.

本発明のさらに別の態様は、動画像符号化方法である。この方法は、符号化対象ブロックに水平方向に隣接した局所復号済みの第1所定領域に対する第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域に対する第2動きベクトルを決定し、第1動きベクトルおよび第2動きベクトルの内、いずれか一方の動きベクトルを採用するステップと、前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割するステップと、2つの仮領域の内、前記第1・第2動きベクトル決定部により採用された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出するステップと、前記第1・第2動きベクトル決定部により採用された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成するステップと、前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化するステップとを備える。   Yet another aspect of the present invention is a video encoding method. This method includes a first motion vector for a first predetermined region that has been locally decoded adjacent to an encoding target block and a second motion vector for a second predetermined region that has been adjacent to the encoding target block and that is adjacent in the vertical direction. Determining a motion vector, adopting one of the first motion vector and the second motion vector, and dividing the encoding target block into two temporary regions at a predetermined temporary boundary; Among the two temporary areas, for the temporary area that is not adjacent to the predetermined area for which the motion vector adopted by the first and second motion vector determination units is used, using the original image of the encoding target block, A step of detecting a third motion vector, and using the motion vector employed by the first and second motion vector determination units and the third motion vector Two prediction blocks corresponding to the encoding target block are generated from an image, main boundaries are determined based on activities of the two prediction blocks, and regions obtained by dividing the prediction blocks at the main boundaries are obtained as described above. Generating a combined prediction block by combining the prediction blocks, encoding a prediction difference block obtained by subtracting the combined prediction block from the encoding target block, and a motion vector of each temporary region; Is provided.

なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。   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. 水平境界で分割されたマクロブロックの仮領域毎に検出される動きベクトルを示す図である。It is a figure which shows the motion vector detected for every temporary area | region of the macroblock divided | segmented by the horizontal boundary. 垂直境界で分割されたマクロブロックの仮領域毎に検出される動きベクトルを示す図である。It is a figure which shows the motion vector detected for every temporary area | region of the macroblock divided | segmented by the vertical boundary. テンプレートを利用した動きベクトル検出方法を説明する図である。It is a figure explaining the motion vector detection method using a template. 仮領域毎に検出された動きベクトルから生成される動き補償予測画像を示す図である。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. 仮領域分割および本境界決定の手順を示すフローチャートである。It is a flowchart which shows the procedure of temporary area | region division | segmentation and this boundary determination. 符号化対象ブロックの仮分割の好適な方法を説明する図である。It is a figure explaining the suitable method of the temporary division | segmentation of an encoding object block. 図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. 実施の形態の動画像符号化装置により符号化される動画像のビットストリームの第1のシンタックスパターンを示す図である。It is a figure which shows the 1st syntax pattern of the bit stream of the moving image encoded by the moving image encoding device of embodiment. スライス単位で動き補償予測の形状を復号側で自動的に決定するかどうかを示すフラグがON/OFFそれぞれの場合のマクロブロックタイプmb_typeのセマンティックスを示す図である。It is a figure which shows the semantics of macroblock type mb_type in case the flag which shows whether the shape of a motion compensation prediction is determined automatically on a decoding side by slice unit is ON / OFF, respectively. 実施の形態2の動画像符号化装置の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a moving image encoding apparatus according to a second embodiment. 実施の形態2の動画像復号装置の構成を示すブロック図である。6 is a block diagram illustrating a configuration of a moving image decoding apparatus according to Embodiment 2. FIG. 実施の形態2における本境界決定手順を示すフローチャートである。10 is a flowchart showing a main boundary determination procedure in the second embodiment. 各テンプレート領域から算出された動きベクトルを利用して本境界が決定される様子を示す図である。It is a figure which shows a mode that this boundary is determined using the motion vector calculated from each template area | region. スライス単位で動き補償予測の形状を復号側で自動的に決定するかどうかを示すフラグがON/OFFそれぞれの場合のマクロブロックタイプmb_typeのセマンティックスを示す図である。It is a figure which shows the semantics of macroblock type mb_type in case the flag which shows whether the shape of a motion compensation prediction is determined automatically on a decoding side by slice unit is ON / OFF, respectively. 実施の形態3における本境界決定手順を示すフローチャートである。10 is a flowchart showing a main boundary determination procedure in the third embodiment. 各テンプレート領域から算出された動きベクトルを利用して本境界が決定される様子を示す図である。It is a figure which shows a mode that this boundary is determined using the motion vector calculated from each template area | region. 実施の形態4の動画像符号化装置の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a moving image encoding device according to a fourth embodiment. 実施の形態4の動画像復号装置の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a moving picture decoding apparatus according to a fourth embodiment. 実施の形態4における本境界決定手順を示すフローチャートである。10 is a flowchart showing a main boundary determination procedure in the fourth embodiment. 各テンプレート領域から算出された動きベクトルを利用して本境界が決定される様子を示す図である。It is a figure which shows a mode that this boundary is determined using the motion vector calculated from each template area | region.

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

(実施の形態1)
図1は、実施の形態1の動画像符号化装置の構成を示すブロック図である。実施の形態1の動画像符号化装置は、仮領域分割部101、第2動きベクトル検出部102、本領域分割・動き補償部103、直交変換・量子化部104、可変長符号化部105、逆量子化・逆直交変換部106、参照画像メモリ107、第1動きベクトル検出部108、加算部109、および減算部110を備える。
(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 temporary region dividing unit 101, a second 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, An inverse quantization / inverse orthogonal transformation unit 106, a reference image memory 107, a first motion vector detection unit 108, an addition unit 109, and a subtraction unit 110 are provided.

第1動きベクトル検出部108は、符号化対象ブロックに隣接する局所復号済領域の画素群(以下、「テンプレート」と呼ぶ)を用いて、テンプレート領域の動きベクトルを検出する。第1動きベクトル検出部108は、動きベクトルを伝送せずに復号側で自動的に動きベクトルを算出できることに特長がある。そのため、動きベクトルの符号量を削減でき、総合的な符号化効率を向上させることが可能である。   The first motion vector detection unit 108 detects a motion vector of the template region using a pixel group of a locally decoded region adjacent to the encoding target block (hereinafter referred to as “template”). The first motion vector detection unit 108 is characterized in that a motion vector can be automatically calculated on the decoding side without transmitting a motion vector. Therefore, the amount of motion vector codes can be reduced, and the overall coding efficiency can be improved.

テンプレートを用いた動きベクトル検出(以下、「テンプレートME」と呼ぶ)は、符号化/復号対象領域の動きは隣接領域の動きと非常に近いという動画像の特性を利用して、動きベクトルを伝送せずに符号化/復号対象領域の動きベクトルを得る技術である。よって、テンプレートとして使用する領域として、符号化/復号対象領域にできるだけ隣接している領域を選択すると、精度の高い動きベクトルを得ることができる。   Motion vector detection using a template (hereinafter referred to as “template ME”) transmits a motion vector using the characteristics of a moving image that the motion of an encoding / decoding target region is very close to the motion of an adjacent region. This is a technique for obtaining a motion vector of an encoding / decoding target region without performing the processing. Therefore, when a region that is adjacent to the encoding / decoding target region as much as possible is selected as a region to be used as a template, a highly accurate motion vector can be obtained.

仮領域分割部101は、例えば16×16マクロブロックなどの符号化対象となっている画素群について、任意の境界で領域を分割する。この領域分割は動きベクトル検出のための符号化側の独自手法であり、どのような境界で領域分割しても構わないが、動き補償予測の効率が向上する境界で領域分割するのが望ましい。   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.

好適には、仮領域分割部101は、第1動きベクトル検出部108により検出された第1動きベクトルによってマクロブロックを動き補償予測したときの予測誤差や境界アクティビティを評価して、マクロブロックを仮分割する。   Preferably, the temporary area dividing unit 101 evaluates a prediction error and a boundary activity when the macroblock is motion-compensated and predicted by the first motion vector detected by the first motion vector detecting unit 108, and determines the macroblock as a temporary block. To divide.

仮領域分割部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”.

仮領域分割部101により決定された仮境界により、マクロブロックは、第1動きベクトルの検出に用いられたテンプレート領域に隣接する仮領域と、テンプレート領域に隣接する部分がより少ない(あるいはテンプレート領域に隣接しない)仮領域に分割される。   Due to the temporary boundary determined by the temporary region dividing unit 101, the macroblock has a temporary region adjacent to the template region used for detection of the first motion vector and a portion adjacent to the template region (or a template region). It is divided into temporary areas that are not adjacent.

第2動きベクトル検出部102は、仮領域分割部101により分割された仮領域のいずれか一方、好適には、テンプレート領域に隣接する部分が少ない方の仮領域について、符号化対象の原画像を用いて、通常の動き検出によって動きベクトルを検出する。第2動きベクトル検出部102により検出された仮領域の動きベクトルは、復号側に伝送が必要である。   The second motion vector detecting unit 102 selects the original image to be encoded for one of the temporary regions divided by the temporary region dividing unit 101, preferably for the temporary region having a smaller part adjacent to the template region. Used to detect motion vectors by normal motion detection. The motion vector of the temporary area detected by the second motion vector detection unit 102 needs to be transmitted to the decoding side.

図3は、マクロブロックの仮領域毎に検出される動きベクトルを示す図である。仮領域分割部101が、マクロブロックを水平境界で仮分割する場合を例に取る。第1動きベクトル検出部108は、符号化対象ブロック300の水平方向の仮境界302よりも上側の領域について、テンプレート領域304を用いて、復号側で算出可能で伝送不要な動きベクトル310を検出する。一方、第2動きベクトル検出部102は、符号化対象ブロック300の仮境界302より下側の領域について通常の動きベクトル探索アルゴリズムを用いて、伝送を要する動きベクトル320を検出する。   FIG. 3 is a diagram showing motion vectors detected for each temporary area of the macroblock. The case where the temporary area dividing unit 101 temporarily divides a macroblock at a horizontal boundary is taken as an example. The first motion vector detection unit 108 detects a motion vector 310 that can be calculated on the decoding side and does not need to be transmitted using the template region 304 for the region above the horizontal temporary boundary 302 of the encoding target block 300. . On the other hand, the second motion vector detection unit 102 detects a motion vector 320 that needs to be transmitted using a normal motion vector search algorithm for a region below the temporary boundary 302 of the encoding target block 300.

図4は、マクロブロックを垂直境界で仮分割する場合に、マクロブロックの仮領域毎に検出される動きベクトルを示す図である。第1動きベクトル検出部108は、符号化対象ブロック300の垂直方向の仮境界302よりも左側の領域について、テンプレート領域306を用いて、復号側で算出可能で伝送不要な動きベクトル330を検出する。一方、第2動きベクトル検出部102は、符号化対象ブロック300の仮境界302より右側の領域について通常の動きベクトル探索アルゴリズムを用いて、伝送を要する動きベクトル320を検出する。   FIG. 4 is a diagram showing motion vectors detected for each temporary area of the macroblock when the macroblock is temporarily divided at the vertical boundary. The first motion vector detection unit 108 uses the template region 306 to detect a motion vector 330 that can be calculated on the decoding side and does not require transmission for the region on the left side of the temporary boundary 302 in the vertical direction of the block 300 to be encoded. . On the other hand, the second motion vector detection unit 102 detects a motion vector 320 that needs to be transmitted using a normal motion vector search algorithm for a region on the right side of the temporary boundary 302 of the encoding target block 300.

図5(a)〜(c)は、テンプレートを利用した動きベクトル検出方法を説明する図である。符号化側/復号側のどちらでも同じ検出方法が用いられる。図5(a)に示すように、符号化/復号対象ブロック300の上辺または左辺、あるいはその両方に隣接する既に符号化/復号が済んだ領域をテンプレート領域304として設定し、予め定めた手法で動きベクトルを検出する。ここでは所定サーチ範囲内のすべての候補をサーチするフルサーチに基づいて説明する。   FIGS. 5A to 5C are diagrams illustrating a motion vector detection method using a template. The same detection method is used on both the encoding side and the decoding side. As shown in FIG. 5A, a region that has already been encoded / decoded adjacent to the upper side and / or the left side of the encoding / decoding target block 300 is set as a template region 304, and a predetermined method is used. Detect motion vectors. Here, description will be made based on a full search for searching all candidates within a predetermined search range.

図5(b)および図5(c)に示すように、フルサーチでは、サーチ範囲内のすべての候補動きベクトルについて、符号化/復号対象画像500内のテンプレート領域304と参照画像510内の同一テンプレート形状の領域314との間でブロックマッチングを行い、SADなどの評価値が最小となる最適な領域を動きベクトル310とする。このように決定した動きベクトル310はテンプレート領域304について最適なベクトルであり、符号化/復号対象ブロック300の動きがテンプレート領域304の動きと同一である場合は、符号化/復号対象ブロック300においても最適動きベクトルとなる。ただし、テンプレート領域304が符号化/復号対象ブロック300よりも離れすぎている場合や、符号化/復号対象ブロック300で異なる動きが発生している場合は、必ずしも最適動きベクトルにはならない。そのためテンプレートを適切に選択することが重要である。   As shown in FIGS. 5B and 5C, in the full search, the template region 304 in the encoding / decoding target image 500 and the reference image 510 are the same for all candidate motion vectors in the search range. Block matching is performed with the template-shaped region 314, and an optimal region where an evaluation value such as SAD is minimized is set as a motion vector 310. The motion vector 310 determined in this way is an optimal vector for the template region 304. If the motion of the encoding / decoding target block 300 is the same as that of the template region 304, the encoding / decoding target block 300 also has the motion vector 310 determined in this way. It becomes the optimal motion vector. However, when the template region 304 is too far away from the encoding / decoding target block 300 or when a different motion occurs in the encoding / decoding target block 300, the optimal motion vector is not necessarily obtained. Therefore, it is important to select a template appropriately.

テンプレートMEを利用すると動きベクトルを伝送せずに、復号側で動きベクトルを算出可能なため、動きベクトルの符号量を削減できる。本発明では、テンプレートMEを用いて算出した動きベクトルを利用して、動き補償予測の形状を復号側で自動決定する。   When the template ME is used, since the motion vector can be calculated on the decoding side without transmitting the motion vector, the code amount of the motion vector can be reduced. In the present invention, the shape of motion compensation prediction is automatically determined on the decoding side using the motion vector calculated using the template ME.

本領域分割・動き補償部103は、第1動きベクトル検出部108および第2動きベクトル検出部102で検出された各仮領域の動きベクトルを用いて、参照画像メモリ107に蓄積されている参照画像から動き補償予測を行う。本領域分割・動き補償部103は、後述の手順で、各仮領域の動きベクトルから生成される複数の動き補償予測画像を合成して合成動き補償予測画像を生成する。   The region segmentation / motion compensation unit 103 uses the motion vector of each temporary region detected by the first motion vector detection unit 108 and the second motion vector detection unit 102 to store the reference image stored in the reference image memory 107. Motion compensation prediction. 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に示すように、仮境界より上側の領域に対して第1動きベクトル、仮境界より下側の領域に対して第2動きベクトルが検出されている。本領域分割・動き補償部103は、図6(a)、(b)に示すように、検出された動きベクトル毎に、参照画像を用いて、仮に当該マクロブロックの大きさ(ここでは16×16)で動き補償予測した場合の画像を生成する。図6(a)は、上側領域の第1動きベクトルを用いて生成された第1動き補償予測画像であり、図6(b)は、下側領域の第2動きベクトルを用いて生成された第2動き補償予測画像である。   An example will be described in which the temporary area dividing unit 101 temporarily divides a macroblock at a horizontal boundary. As shown in FIG. 3, the first motion vector is detected for the region above the temporary boundary, and the second motion vector is detected for the region below the temporary boundary. As shown in FIGS. 6A and 6B, the region segmentation / motion compensation unit 103 temporarily uses the reference image for each detected motion vector to temporarily determine the size of the macroblock (here, 16 × An image in the case of motion compensation prediction in 16) is generated. FIG. 6A is a first motion compensated prediction image generated using the first motion vector in the upper region, and FIG. 6B is generated using the second motion vector in the lower region. It is a 2nd motion compensation prediction image.

本領域分割・動き補償部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に戻り、減算部110は、符号化対象原画像と本領域分割・動き補償部103で算出した動き補償予測画像との差分により、予測残差成分を算出し、直交変換・量子化部104に与える。直交変換・量子化部104は、予測残差成分の直交変換・量子化を行う。   Returning to FIG. 1, the subtraction unit 110 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 quantization and inverse orthogonal transform 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、第1動きベクトル検出部208、加算部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 segmentation / motion compensation unit 203, an inverse quantization / inverse orthogonal transform unit 206, a first motion vector detection unit 208, an addition unit 209, and a reference. An image memory 207 is provided.

可変長復号部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.

第1動きベクトル検出部208は、図1の動画像符号化装置の第1動きベクトル検出部108と同一の機能を持ち、復号対象ブロックに隣接する復号済領域の画素群(「テンプレート」)を用いて、テンプレート領域の動きベクトルを検出する。   The first motion vector detection unit 208 has the same function as that of the first motion vector detection unit 108 of the moving picture encoding device in FIG. 1 and selects a pixel group (“template”) in a decoded area adjacent to the decoding target block. Use to detect the motion vector of the template region.

本領域分割・動き補償部203は、図1の動画像符号化装置の本領域分割・動き補償部103と同一の機能を持ち、可変長復号部201で復号された動きベクトルと、第1動きベクトル検出部208により検出された動きベクトルとを用いて参照画像メモリ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 encoding device in FIG. 1, and the motion vector decoded by the variable length decoding unit 201 and the first motion Motion compensation prediction is performed from the reference image stored in the reference image memory 207 using the motion vector detected by the vector detection unit 208. Here, the motion vector is acquired or detected 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 quantization and inverse orthogonal transform 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.

以上の構成による動画像符号化装置の動作を説明する。まず、図9および図10を参照して、テンプレート領域を用いて検出された動きベクトルをもとに仮領域分割し、本境界を決定する処理を説明する。次に、図11および図12を参照して、本境界決定処理を詳細に説明する。   The operation of the moving picture coding apparatus having the above configuration will be described. First, with reference to FIG. 9 and FIG. 10, a process of dividing a temporary area based on a motion vector detected using a template area and determining a main boundary will be described. Next, the boundary determination process will be described in detail with reference to FIGS. 11 and 12.

図9は、仮領域分割および本境界決定の手順を示すフローチャートである。ここでは、水平方向に領域分割する場合を説明する。   FIG. 9 is a flowchart showing a procedure for temporary area division and main boundary determination. Here, a case where the region is divided in the horizontal direction will be described.

まず、第1動きベクトル検出部108は、所定のテンプレート領域を用いて第1動きベクトルを検出する(S101)。動きベクトル検出のアルゴリズムは指定した探索領域内の候補ベクトルをすべて評価するフルサーチの他、さまざまな動き特性から探索する候補ベクトルを絞り込んで探索する高速サーチなどいろいろな方法が存在する。所定のテンプレート領域を用いて動きベクトルを検出し、符号化/復号対象領域の動きベクトルとすることができるものであれば、どのような動きベクトル検出アルゴリズムを用いることも可能である。また、テンプレート領域の定義は図3や図4で例示したものに限定されず、符号化対象ブロックに隣接する領域であれば、さまざまな形状で定義することが可能である。   First, the first motion vector detection unit 108 detects a first motion vector using a predetermined template region (S101). 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 using a predetermined template region and used as a motion vector of an encoding / decoding target region. Further, the definition of the template area is not limited to that illustrated in FIGS. 3 and 4 and can be defined in various shapes as long as it is an area adjacent to the encoding target block.

次に、仮領域分割部101は、第1動きベクトル検出部108が検出した第1の動きベクトルを用いて符号化対象領域の動き補償予測を行い、予測誤差や境界アクティビティを用いて符号化対象ブロックを仮分割する(S102)。   Next, the temporary area dividing unit 101 performs motion compensation prediction of the encoding target area using the first motion vector detected by the first motion vector detecting unit 108, and uses the prediction error and the boundary activity to encode the encoding target. The block is temporarily divided (S102).

ここで、画像信号のアクティビティとは、画素に対して何らかの演算を施した値のことである。マクロブロックを領域分割する境界に関するアクティビティとして、たとえば、境界をまたぐ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まで動かした場合の総和である。
Here, 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 |

アクティビティは物体のエッジなどで大きい値になる。符号化対象ブロックの仮分割の1つの方法として、仮領域分割部101は、アクティビティ値が最も大きい境界でマクロブロックの領域を仮分割する。   The activity becomes a large value at the edge of the object. As one method of provisional division of an encoding target block, the provisional area division unit 101 provisionally divides a macroblock area at a boundary having the largest activity value.

符号化対象ブロックの仮分割の方法は、符号化側のみの手法であるため、どのようなアルゴリズムも適用可能であるが、できるだけ本領域分割に近づくような仮分割を行った方が符号化効率の高い動きベクトルを検出可能である。   Since the method of provisional division of the encoding target block is a method only on the encoding side, any algorithm can be applied, but it is better to perform provisional division that is as close to the main region division as possible. High motion vector can be detected.

図10は、符号化対象ブロックの仮分割の好適な方法を説明する図である。第1動きベクトルを用いて符号化対象領域の全体について動き補償予測を行った時の動き補償予測画像360と符号化対象原画像300との間の誤差を絶対差分和(SAD)等で評価した結果に基づいて仮境界302を決定する。つまり、この誤差が大きい領域については、他の動きベクトルで動き補償予測した方が予測効率が向上するため、誤差が所定の閾値以上の領域と閾値未満の領域とで符号化対象ブロックを仮分割し、予測効率の低い領域(ここではテンプレート領域に隣接しない下側領域)については符号化側で動きベクトルを検出して伝送するようにする。   FIG. 10 is a diagram for explaining a preferred method of provisional division of the encoding target block. The error between the motion compensated prediction image 360 and the encoding target original image 300 when performing motion compensation prediction on the entire encoding target region using the first motion vector was evaluated by an absolute difference sum (SAD) or the like. A temporary boundary 302 is determined based on the result. In other words, for regions where this error is large, prediction efficiency improves when motion compensation prediction is performed using other motion vectors, so the block to be encoded is temporarily divided into regions where the error is greater than or equal to a predetermined threshold and regions where the error is less than the threshold. For the region with low prediction efficiency (here, the lower region not adjacent to the template region), the motion vector is detected and transmitted on the encoding side.

図9のフローチャートに戻る。テンプレート領域に隣接しない仮分割された下側領域について、第2動きベクトル検出部102は、通常の動き検出によって第2の動きベクトルを検出する(S103)。最後に、本領域分割・動き補償部103は、第1の動きベクトルと第2の動きベクトルを用いて動き補償予測した画像の境界アクティビティに基づき、符号化対象領域の本領域分割を行う(S104)。本領域分割処理の詳細については次に説明する。   Returning to the flowchart of FIG. For the temporarily divided lower region that is not adjacent to the template region, the second motion vector detection unit 102 detects the second motion vector by normal motion detection (S103). Finally, the main region division / motion compensation unit 103 performs main region division of the encoding target region based on the boundary activity of the image subjected to motion compensation prediction using the first motion vector and the second motion vector (S104). ). Details of this area division processing will be described next.

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

本領域分割・動き補償部103は、第1動きベクトル検出部108で検出した第1動きベクトルを用いて、マクロブロックと同一の大きさで動き補償予測し、第1動き補償予測画像を生成する(S01)。同様に、第2動きベクトル検出部102で検出した第2動きベクトルを用いて、マクロブロックと同一の大きさで動き補償予測し、第2動き補償予測画像を生成する(S02)。   The region segmentation / motion compensation unit 103 uses the first motion vector detected by the first motion vector detection unit 108 to perform motion compensation prediction with the same size as the macroblock, and generates a first motion compensation predicted image. (S01). Similarly, using the second motion vector detected by the second 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).

次に、本境界の各候補について、図12(a)〜(d)に示す第1〜第4アクティビティを算出する(S03〜S06)。ただし、ステップS03〜S06は順不同で行うことが可能である。また、ステップS03〜S06のすべてを行わずに、境界評価に使用したいアクティビティだけを算出することももちろん可能である。   Next, the first to fourth activities shown in FIGS. 12A to 12D 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.

まず、図12(a)のように、第1動き補償予測画像について、本境界候補に関する境界アクティビティ(第1アクティビティ)を算出する(S03)。ここで、アクティビティには本境界候補をまたぐ2画素間の絶対差分和(SAD)を用いる。第1アクティビティは物体のエッジなどで値が大きくなるため、値が大きいほど該当境界で領域を分割した方が動き補償予測の予測効率が向上する。同様に、図12(b)のように、第2動き補償予測画像について、本境界候補に関する境界アクティビティ(第2アクティビティ)を算出する(S04)。第2アクティビティは第1アクティビティと同様に、値が大きいほど該当境界で領域を分割した方が動き補償予測の予測効率が向上する。   First, as shown in FIG. 12A, a boundary activity (first activity) related to this 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. 12B, 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.

続いて、図12(c)のように、マクロブロック内の本境界候補より上の領域を第1動き補償予測画像として動き補償予測し、本境界候補より下の領域を第2動き補償予測画像として合成した合成動き補償予測画像について、本境界候補に関する境界アクティビティ(第3アクティビティ)を算出する(S05)。第3アクティビティは本境界候補をまたぐ2画素間の絶対差分和であるから、本境界候補の上下に位置する第1動き補償予測画像の画素と第2動き補償予測画像の画素の値の絶対差分の和になる。したがって、第3アクティビティは値が小さいほど、合成動き補償予測画像の境界が滑らかになり、予測誤差信号に高周波成分が発生しにくいため、動き補償予測の予測効率が向上する。   Subsequently, as shown in FIG. 12C, the region above the main boundary candidate in the macroblock is subjected to motion compensation prediction as the first motion compensated prediction image, and the region below the main boundary candidate is set to 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.

最後に、図12(d)のように、第1動き補償予測画像と第2動き補償予測画像の差分画像について、本境界候補に関する境界アクティビティ(第4アクティビティ)を算出する(S06)。第4アクティビティは、物体の境界などで値が大きくなるため、値が大きいほど該当境界で領域を分割した方が動き補償予測の予測効率が向上する。   Finally, as shown in FIG. 12D, 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.

境界評価に使用するアクティビティをすべて算出した後に、予め定義した評価値を用いて本境界候補を評価する(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により設定される仮領域を調整するか、第1動きベクトル検出部108および第2動きベクトル検出部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 area set by the temporary area dividing unit 101 or adjusting the motion vector detected by the first motion vector detecting unit 108 and the second motion vector detecting unit 102, an optimal temporary boundary or If both the optimal motion vector and the optimal main boundary are realized at the same time, the encoding efficiency can be further improved.

具体的には、本領域分割・動き補償部103により決定される本境界が仮境界と異なる場合は、第1動きベクトル検出部108または第2動きベクトル検出部102、あるいはその両方は、動きベクトル検出をやり直す。やり直しの方法はどのような方法でも良いが、例えば動きベクトル探索時の誤差評価値の内、2番目に小さい値(第2最小値)を残しておき、第2最小値の位置から動きベクトル検出を続行するなどの手法が可能である。動きベクトル検出部102によって再検出された動きベクトルを用いて、本領域分割・動き補償部103は、本境界決定処理を再度行う。本境界が仮境界に一致するか、十分に近いものとなるまで、動きベクトル検出部102による動きベクトル検出処理と本領域分割・動き補償部103による本境界決定処理を繰り返す。   Specifically, when the main boundary determined by the main region division / motion compensation unit 103 is different from the temporary boundary, the first motion vector detection unit 108 and / or the second motion vector detection unit 102 may detect the motion vector. Redo detection. 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. 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.

あるいは、別の方法として、仮領域分割部101が複数の仮境界候補を設定し、仮境界候補毎に、第1動きベクトル検出部108および第2動きベクトル検出部102が動きベクトルを検出し、本領域分割・動き補償部103は仮境界毎に本境界決定処理を行う。そして、本領域分割・動き補償部103は、複数の仮境界の中で合成動き補償予測画像の予測効率が最も良いものを選ぶ。   Alternatively, as another method, the temporary region dividing unit 101 sets a plurality of temporary boundary candidates, and for each temporary boundary candidate, the first motion vector detection unit 108 and the second motion vector detection unit 102 detect a motion vector, The region dividing / motion compensating unit 103 performs the boundary determination process 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.

いずれの方法を取っても、結果的に、本領域分割・動き補償部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の動画像符号化装置により符号化される動画像のビットストリームのシンタックスについて説明する。   Next, the syntax of a moving image bit stream encoded by the moving image encoding apparatus according to Embodiment 1 will be described.

図13は、MPEG−4 AVCのシンタックスをベースとした第1のシンタックスパターンを示す。図13(a)のように、まず、スライス単位で予測画像の特徴量を用いて動き補償予測の形状を復号側で自動的に決定するかどうかを示すフラグ(use_auto_mc_size)を伝送する。フラグuse_auto_mc_sizeがOFFの場合は、従来通り図13(b)に示すマクロブロックタイプmb_typeに基づきマクロブロックを固定的に分割して動き補償予測を行う。フラグuse_auto_mc_sizeがONの場合、予測画像の特徴量を用いて動き補償予測の形状を復号側で自動的に決定して動き補償予測を行う。マクロブロック単位では、MPEG−4 AVCと同様にmb_typeを伝送することに加えてdec_me_flagを伝送する。   FIG. 13 shows a first syntax pattern based on the MPEG-4 AVC syntax. As shown in FIG. 13A, first, a 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 flag use_auto_mc_size is OFF, the motion compensation prediction is performed by dividing the macroblock fixedly based on the macroblock type mb_type shown in FIG. When the 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 macroblock units, dec_me_flag is transmitted in addition to transmitting mb_type in the same way as MPEG-4 AVC.

図14は、フラグuse_auto_mc_sizeがON/OFFそれぞれの場合のマクロブロックタイプmb_typeのセマンティックスを示す。マクロブロックタイプmb_type=0の場合は16×16のマクロブロックを領域分割せずに動き補償予測を行う。マクロブロックタイプmb_type=1の場合、フラグuse_auto_mc_sizeがOFFの場合は16×8で動き補償予測を行うが、フラグuse_auto_mc_sizeがONの場合、マクロブロックを16×Aと16×(16−A)の2つの領域に自動分割して動き補償予測を行う。ここで、dec_me_flagがONの場合は16×Aの領域の動きベクトルは伝送されずに16×(16−A)の動きベクトルのみ伝送されることが特長である。同様に、マクロブロックタイプmb_type=2の場合、フラグuse_auto_mc_sizeがOFFの場合は8×16ブロックで動き補償予測を行うが、フラグuse_auto_mc_sizeがONの場合、マクロブロックをA×16と(16−A)×16の2つの領域に自動分割して動き補償予測を行う。これも同様に、dec_me_flagがONの場合はA×16の領域の動きベクトルは伝送されずに(16−A)×16の動きベクトルのみ伝送される。マクロブロックタイプmb_type=3の場合は8×8ブロックで動き補償予測を行う。このように、dec_me_flagがONの場合は、伝送する動きベクトルは1本であり、dec_me_flagがOFFの場合の2本と比較して減少するため、動きベクトルの符号量が減少し、全体の符号化効率が向上する。   FIG. 14 shows the semantics of the macroblock type mb_type when the 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, when the flag use_auto_mc_size is OFF, motion compensation prediction is performed with 16 × 8. However, when the flag use_auto_mc_size is ON, the macro block is 2 × 16 × A and 16 × (16−A). Motion-compensated prediction is performed by automatically dividing into two regions. Here, when dec_me_flag is ON, a motion vector of a 16 × A region is not transmitted, and only a 16 × (16-A) motion vector is transmitted. Similarly, in the case of the macro block type mb_type = 2, when the flag use_auto_mc_size is OFF, motion compensation prediction is performed with 8 × 16 blocks. However, when the flag use_auto_mc_size is ON, the macro block is A × 16 (16−A). Motion-compensated prediction is performed by automatically dividing into two regions of × 16. Similarly, when dec_me_flag is ON, only the motion vector of (16−A) × 16 is transmitted without transmitting the motion vector of the region of A × 16. When the macro block type mb_type = 3, motion compensation prediction is performed with 8 × 8 blocks. In this way, when dec_me_flag is ON, the number of motion vectors to be transmitted is one and decreases compared to two when dec_me_flag is OFF, so the code amount of the motion vector is reduced and the entire coding is performed. Efficiency is improved.

(実施の形態2)
本発明の実施の形態2の動画像符号化装置および動画像復号装置を説明する。実施の形態1では、テンプレート領域を用いて第1動きベクトルを取得することで、第1動きベクトルを復号側に伝送不要とする一方、符号化側で独自に検出する第2動きベクトルについては復号側に伝送を要した。実施の形態2では、2つのテンプレート領域を利用することで、第1および第2動きベクトルの双方を復号側に伝送不要とする。2つのテンプレート形状から得られる2本の動きベクトルを用いて動き補償予測の形状を決定することで、動きベクトルを全く伝送せずに動き補償予測の形状を復号側で自動的に決定可能である。
(Embodiment 2)
A video encoding device and video decoding device according to Embodiment 2 of the present invention will be described. In Embodiment 1, by acquiring the first motion vector using the template region, the first motion vector is not required to be transmitted to the decoding side, while the second motion vector that is uniquely detected on the encoding side is decoded. Transmission required. In the second embodiment, by using two template areas, it is not necessary to transmit both the first and second motion vectors to the decoding side. By determining the shape of motion compensation prediction using two motion vectors obtained from two template shapes, the shape of motion compensation prediction can be automatically determined on the decoding side without transmitting any motion vector. .

図15は、実施の形態2の動画像符号化装置の構成を示すブロック図である。実施の形態1とは異なり、実施の形態2の動画像符号化装置は、仮領域分割部101と第2動きベクトル検出部102の構成をもたず、第1・第2動きベクトル検出部108が、2つのテンプレート領域から第1および第2動きベクトルを検出する。実施の形態2では、符号化対象ブロックに対して2つのテンプレート領域を定めれば、2本の動きベクトルを検出できるため、符号化対象ブロックを仮領域に分割する処理は不要である。   FIG. 15 is a block diagram showing a configuration of the moving picture coding apparatus according to the second embodiment. Unlike the first embodiment, the moving picture coding apparatus according to the second embodiment does not have the configuration of the temporary region dividing unit 101 and the second motion vector detecting unit 102, and the first and second motion vector detecting units 108. Detects the first and second motion vectors from the two template regions. In the second embodiment, if two template regions are defined for the encoding target block, two motion vectors can be detected, so that the process of dividing the encoding target block into temporary regions is unnecessary.

本領域分割・動き補償部103は、第1・第2動きベクトル検出部108で検出された第1および第2動きベクトルを用いて、本境界を決定し、参照画像メモリ107に蓄積されている参照画像から動き補償予測を行う。本領域分割・動き補償部103は、各本領域の動きベクトルから生成される複数の動き補償予測画像を合成して合成動き補償予測画像を生成する。   The region segmentation / motion compensation unit 103 determines the boundary using the first and second motion vectors detected by the first and second motion vector detection units 108 and is stored in the reference image memory 107. Motion compensation prediction is performed from the reference image. The main region dividing / motion compensation unit 103 combines a plurality of motion compensated prediction images generated from the motion vectors of each main region to generate a combined motion compensated prediction image.

図16は、実施の形態2の動画像復号装置の構成を示すブロック図である。実施の形態1と異なる構成と動作について説明する。第1・第2動きベクトル検出部208は、図15の動画像符号化装置の第1・第2動きベクトル検出部108と同一の機能を持ち、復号対象ブロックに隣接する復号済領域の画素群(「テンプレート」)を用いて、テンプレート領域の動きベクトルを検出する。   FIG. 16 is a block diagram illustrating a configuration of the moving picture decoding apparatus according to the second embodiment. A configuration and operation different from those of the first embodiment will be described. The first and second motion vector detection units 208 have the same functions as the first and second motion vector detection units 108 of the moving image encoding device in FIG. 15, and are a group of pixels in a decoded area adjacent to the decoding target block. (“Template”) is used to detect the motion vector of the template region.

本領域分割・動き補償部203は、図15の動画像符号化装置の本領域分割・動き補償部103と同一の機能を持ち、第1・第2動きベクトル検出部208により検出された第1および第2動きベクトルを用いて参照画像メモリ207に蓄積されている参照画像から動き補償予測を行う。本領域分割・動き補償部203は、図15の動画像符号化装置の本領域分割・動き補償部103と同様の手順で、各分割領域の動きベクトルから生成される複数の動き補償予測画像を合成して合成動き補償予測画像を生成する。   The region segmentation / motion compensation unit 203 has the same function as the region segmentation / motion compensation unit 103 of the moving picture coding apparatus in FIG. 15 and is detected by the first and second motion vector detection units 208. Also, motion compensation prediction is performed from the reference image stored in the reference image memory 207 using the second motion vector. 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.

図17は、実施の形態2における本境界決定手順を示すフローチャートである。   FIG. 17 is a flowchart showing the boundary determination procedure in the second embodiment.

まず、図18(a)に示すように、符号化対象ブロック300に水平方向に隣接する第1テンプレート領域304を用いて第1動きベクトル310を検出する(S11)。これは実施の形態1で説明した手順と同様である。同様に、図18(b)に示すように、符号化対象ブロック300に垂直方向に隣接する第2テンプレート領域306を用いて第2動きベクトル330を検出する(S12)。ここで、各テンプレート領域304、306は図18(a)、(b)の形状に限定されない。符号化対象ブロックに隣接する領域ならばどのような形状に定義してもよい。   First, as shown in FIG. 18A, the first motion vector 310 is detected using the first template region 304 adjacent to the encoding target block 300 in the horizontal direction (S11). This is the same as the procedure described in the first embodiment. Similarly, as shown in FIG. 18B, the second motion vector 330 is detected using the second template region 306 that is adjacent to the encoding target block 300 in the vertical direction (S12). Here, the template regions 304 and 306 are not limited to the shapes shown in FIGS. It may be defined in any shape as long as it is an area adjacent to the encoding target block.

次に、本領域分割・動き補償部103は、第1動きベクトルと第2動きベクトルを用いて動き補償予測した画像の境界アクティビティに基づき、符号化対象領域の本領域分割を行う(S13)。図18(c)に示すように本境界400を垂直方向に定めた場合と、図18(d)に示すように本境界400を水平方向に定めた場合の両方について、境界アクティビティを求め、評価値の良い方の本境界を選択する。   Next, the main region division / motion compensation unit 103 performs main region division of the encoding target region based on the boundary activity of the image subjected to motion compensation prediction using the first motion vector and the second motion vector (S13). Boundary activity is obtained and evaluated for both the case where the main boundary 400 is set in the vertical direction as shown in FIG. 18C and the case where the main boundary 400 is set in the horizontal direction as shown in FIG. The book boundary with the better value is selected.

ここでは、2つのテンプレート領域から2つの動きベクトルを求め、符号化対象領域を2つの本領域に分割したが、3以上のテンプレート領域から3以上の動きベクトルを求め、符号化対象領域を3以上の本領域に分割してもよい。このように、複数のテンプレートの形状から複数の動きベクトルを算出して動き補償予測を復号側で自動的に決定することで、動きベクトルを全く伝送せずに、任意の形状での動き補償予測が可能になる。   Here, two motion vectors are obtained from two template regions, and the encoding target region is divided into two main regions. However, three or more motion vectors are obtained from three or more template regions, and three or more encoding target regions are obtained. You may divide into this book area. In this way, by calculating a plurality of motion vectors from a plurality of template shapes and automatically determining motion compensated prediction on the decoding side, motion compensated prediction in an arbitrary shape is possible without transmitting any motion vectors. Is possible.

テンプレートマッチングの形状を変えた時に得られる複数の動きベクトルを用いて動き補償予測の形状を決定する場合のシンタックスについて説明する。シンタックスは実施の形態1と同様であり、mb_typeのセマンティックスのみが異なる。   The syntax for determining the shape of motion compensated prediction using a plurality of motion vectors obtained when the shape of template matching is changed will be described. The syntax is the same as that of the first embodiment, and only the semantics of mb_type is different.

図19は、フラグuse_auto_mc_sizeがON/OFFそれぞれの場合のマクロブロックタイプmb_typeのセマンティックスを示す。図19(a)は、フラグuse_auto_mc_sizeがOFFの場合であり、実施の形態1と同じである。図19(b)は、フラグuse_auto_mc_sizeがONの場合であり、mb_typeのセマンティックスは、16×Aと16×(16−A)の水平方向に領域分割するのと、A×16と(16−A)×16の垂直方向に領域分割するのが、mb_type=1として区別されずに扱われる。   FIG. 19 shows the semantics of the macroblock type mb_type when the flag use_auto_mc_size is ON / OFF. FIG. 19A shows a case where the flag use_auto_mc_size is OFF, which is the same as in the first embodiment. FIG. 19B shows a case where the flag use_auto_mc_size is ON, and the semantics of mb_type is divided into 16 × A and 16 × (16-A) horizontal directions, A × 16, and (16-A). ) × 16 vertical region division is handled without distinction as mb_type = 1.

実施の形態2では、2つのテンプレート領域を用いて得られる第1および第2動きベクトルは、復号側でも同じ処理で得られるため、動きベクトルを復号側に伝送する必要は全くない。   In the second embodiment, the first and second motion vectors obtained using the two template regions are obtained by the same process on the decoding side, so there is no need to transmit the motion vector to the decoding side.

(実施の形態3)
本発明の実施の形態3の動画像符号化装置および動画像復号装置を説明する。実施の形態3は、実施の形態1と同一の構成を取るが、第1動きベクトル検出部108は、2つのテンプレート形状から得られる第1および第2動きベクトルの内、1本の動きベクトルを採用する点が実施の形態1とは異なる。
(Embodiment 3)
A video encoding device and video decoding device according to Embodiment 3 of the present invention will be described. The third embodiment has the same configuration as that of the first embodiment, but the first motion vector detection unit 108 selects one motion vector from the first and second motion vectors obtained from the two template shapes. This is different from the first embodiment.

図20は、実施の形態3における本境界決定手順を示すフローチャートである。   FIG. 20 is a flowchart showing the boundary determination procedure in the third embodiment.

まず、図21(a)に示すように、符号化対象ブロック300に水平方向に隣接する第1テンプレート領域304を用いて第1動きベクトル310を検出する(S21)。これは実施の形態1で説明した手順と同様である。同様に、図21(b)に示すように、符号化対象ブロック300に垂直方向に隣接する第2テンプレート領域306を用いて第2動きベクトル330を検出する(S22)。   First, as shown in FIG. 21A, the first motion vector 310 is detected using the first template region 304 that is adjacent to the encoding target block 300 in the horizontal direction (S21). This is the same as the procedure described in the first embodiment. Similarly, as shown in FIG. 21B, the second motion vector 330 is detected using the second template region 306 that is adjacent to the encoding target block 300 in the vertical direction (S22).

次に、本領域分割・動き補償部103は、第1動きベクトル310を検出した際の評価値(たとえば、SAD等により評価された予測誤差)と第2動きベクトル330を検出した際の評価値を比較し、小さい方のSADを持つ動きベクトルをより信頼できる動きとみなし、第1動きベクトルとして採用する(S23)。ここで、第1テンプレート領域304と第2テンプレート領域306の面積(画素数)が同一の場合は評価値をそのまま比較することができるが、各領域の画素数が異なる場合は、画素数の違いを吸収するために重みをつけて比較する。すなわち、評価値を一画素当たりの値に換算して使用する。また、動きベクトル検出の際の評価値はSADに限らずSSDやSATD(Sum of Absolute Transfered Difference)を用いることができる。   Next, the region segmentation / motion compensation unit 103 detects an evaluation value when the first motion vector 310 is detected (for example, a prediction error evaluated by SAD or the like) and an evaluation value when the second motion vector 330 is detected. And the motion vector having the smaller SAD is regarded as a more reliable motion and is adopted as the first motion vector (S23). Here, if the areas (number of pixels) of the first template region 304 and the second template region 306 are the same, the evaluation values can be compared as they are, but if the number of pixels in each region is different, the difference in the number of pixels. Compare with weight to absorb. That is, the evaluation value is converted into a value per pixel and used. Further, the evaluation value at the time of motion vector detection is not limited to SAD, and SSD or SATD (Sum of Absolute Transfered Difference) can be used.

第1動きベクトル310が採用された場合、第1テンプレート領域304に隣接するのは符号化/復号対象ブロックの左側領域であるため、本境界の方向を垂直方向に決定する。第2動きベクトル330が採用された場合、第2テンプレート領域306に隣接するのは符号化/復号対象ブロックの上側領域であるため、本境界の方向を水平方向に決定する。   When the first motion vector 310 is adopted, since the region adjacent to the first template region 304 is the left region of the encoding / decoding target block, the direction of this boundary is determined as the vertical direction. When the second motion vector 330 is adopted, since the region adjacent to the second template region 306 is the upper region of the encoding / decoding target block, the direction of the main boundary is determined in the horizontal direction.

以降の処理は実施の形態1と同様であり、符号化側では、仮境界を決定し(S24)、テンプレート領域に隣接していないか、隣接している部分が少ない予測効率の低い側の領域に対して、通常の動き検出により、第3動きベクトル350を検出する(S25)。図21(a)の第1動きベクトル310を採用した場合は、仮領域分割された下側領域について、第3動きベクトル350を検出し、図21(b)の第2動きベクトル330を採用した場合は、仮領域分割された右側領域について、第3動きベクトル350を検出する。   The subsequent processing is the same as in the first embodiment, and on the encoding side, a temporary boundary is determined (S24), and the region that is not adjacent to the template region or has few adjacent portions and has low prediction efficiency is used. On the other hand, the third motion vector 350 is detected by normal motion detection (S25). When the first motion vector 310 of FIG. 21A is employed, the third motion vector 350 is detected for the lower region obtained by dividing the temporary region, and the second motion vector 330 of FIG. 21B is employed. In this case, the third motion vector 350 is detected for the right region obtained by dividing the temporary region.

最後に、ステップS23で採用された動きベクトルと、第3動きベクトル350とを用いて、実施の形態1と同様の方法で本境界を決定する(S26)。図21(a)の第1動きベクトル310を採用した場合は、図21(c)に示すように、垂直方向の本境界400が決定され、図21(b)の第2動きベクトル330を採用した場合は、図21(d)に示すように、水平方向の本境界400が決定される。   Finally, using the motion vector employed in step S23 and the third motion vector 350, the boundary is determined by the same method as in the first embodiment (S26). When the first motion vector 310 of FIG. 21A is employed, the vertical boundary 400 is determined as shown in FIG. 21C, and the second motion vector 330 of FIG. 21B is employed. In such a case, the main boundary 400 in the horizontal direction is determined as shown in FIG.

実施の形態3では、2つのテンプレート領域を用いて得られた第1および第2動きベクトルの内、最終的に採用された方の動きベクトルは復号側でも得られるため、伝送する必要はないが、符号化側の通常の動き検出により検出された第3動きベクトルは符号化側でしか得られない情報であるため、復号側に伝送する。復号側では、2つのテンプレート領域を用いて得られる第1および第2動きベクトルの内、符号化側と同じ方法で選択される動きベクトルと、符号化側から伝送された第3動きベクトルとを用いて動き補償予測する。   In the third embodiment, it is not necessary to transmit the first and second motion vectors obtained by using the two template regions, since the finally adopted motion vector is also obtained on the decoding side. Since the third motion vector detected by the normal motion detection on the encoding side is information that can be obtained only on the encoding side, it is transmitted to the decoding side. On the decoding side, out of the first and second motion vectors obtained using the two template regions, a motion vector selected by the same method as that on the encoding side, and a third motion vector transmitted from the encoding side, Motion compensation prediction.

実施の形態3では、2本の動きベクトル候補から採用する動きベクトルを自動判断する際に領域分割の方向も同時に決定することができるため、実施の形態2と同様に図21に示すシンタックスパターンを用いることができる。   In the third embodiment, the direction of region division can be determined at the same time when automatically determining a motion vector to be adopted from two motion vector candidates, so that the syntax pattern shown in FIG. 21 is the same as in the second embodiment. Can be used.

(実施の形態4)
本発明の実施の形態4の動画像符号化装置および動画像復号装置を説明する。実施の形態4は、実施の形態2と同様に、2つのテンプレート領域を利用することで、第1および第2動きベクトルの双方を復号側に伝送不要とすることに加えて、符号化側で独自に検出する第3動きベクトルについては復号側に伝送することで、領域を3分割する。
(Embodiment 4)
A moving picture coding apparatus and a moving picture decoding apparatus according to Embodiment 4 of the present invention will be described. In the fourth embodiment, similarly to the second embodiment, by using two template regions, both the first and second motion vectors are not required to be transmitted to the decoding side. The third motion vector that is uniquely detected is transmitted to the decoding side to divide the region into three.

図22は、実施の形態4の動画像符号化装置の構成を示すブロック図である。実施の形態2と同様、第1・第2動きベクトル検出部108は、2つのテンプレート領域から第1および第2動きベクトルを検出する。実施の形態4は、実施の形態2とは違い、仮領域分割部101と第3動きベクトル検出部102の構成を有する。第3動きベクトル検出部102は、第1および第2テンプレート領域のいずれにも隣接しない予測効率の低い第3の領域(サブ領域)に対して、通常の動き検出によって第3動きベクトルを検出する。   FIG. 22 is a block diagram illustrating a configuration of the moving picture coding apparatus according to the fourth embodiment. Similar to the second embodiment, the first and second motion vector detectors 108 detect the first and second motion vectors from the two template regions. Unlike the second embodiment, the fourth embodiment has a configuration of a temporary area dividing unit 101 and a third motion vector detecting unit 102. The third motion vector detection unit 102 detects a third motion vector by normal motion detection for a third region (subregion) with low prediction efficiency that is not adjacent to any of the first and second template regions. .

仮領域分割部101は、第1・第2動きベクトル検出部108により得られた第1および第2動きベクトルにもとづいて、符号化対象ブロックを3分割する際の仮境界を定める。   The temporary area dividing unit 101 determines a temporary boundary when the encoding target block is divided into three based on the first and second motion vectors obtained by the first and second motion vector detecting units.

本領域分割・動き補償部103は、第1・第2動きベクトル検出部108で検出された第1および第2動きベクトルと、第3動きベクトル検出部102により検出された第3動きベクトルとを用いて、実施の形態1と同様の方法で本境界を決定し、参照画像メモリ107に蓄積されている参照画像から動き補償予測を行う。   The region segmentation / motion compensation unit 103 receives the first and second motion vectors detected by the first and second motion vector detection units 108 and the third motion vector detected by the third motion vector detection unit 102. The boundary is determined by the same method as in the first embodiment, and motion compensation prediction is performed from the reference image stored in the reference image memory 107.

図23は、実施の形態4の動画像復号装置の構成を示すブロック図である。実施の形態1と異なる構成と動作について説明する。第1・第2動きベクトル検出部208は、図22の動画像符号化装置の第1・第2動きベクトル検出部108と同一の機能を持ち、復号対象ブロックに隣接する復号済領域の画素群(「テンプレート」)を用いて、テンプレート領域の動きベクトルを検出する。   FIG. 23 is a block diagram illustrating a configuration of the moving picture decoding apparatus according to the fourth embodiment. A configuration and operation different from those of the first embodiment will be described. The first and second motion vector detection units 208 have the same functions as the first and second motion vector detection units 108 of the moving image encoding device in FIG. 22 and are a group of pixels in a decoded area adjacent to the decoding target block. (“Template”) is used to detect the motion vector of the template region.

本領域分割・動き補償部203は、図22の動画像符号化装置の本領域分割・動き補償部103と同一の機能を持ち、可変長復号部201で復号された第3動きベクトルと、第1・第2動きベクトル検出部208により検出された第1および第2動きベクトルとを用いて参照画像メモリ207に蓄積されている参照画像から動き補償予測を行う。本領域分割・動き補償部203は、図22の動画像符号化装置の本領域分割・動き補償部103と同様の手順で、各分割領域の動きベクトルから生成される複数の動き補償予測画像を合成して合成動き補償予測画像を生成する。   The region segmentation / motion compensation unit 203 has the same function as the region segmentation / motion compensation unit 103 of the video encoding device in FIG. 22, and the third motion vector decoded by the variable length decoding unit 201, Using the first and second motion vectors detected by the first / second motion vector detection unit 208, motion compensation prediction is performed from the reference image stored in the reference image memory 207. 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.

図24は、実施の形態4における本境界決定手順を示すフローチャートである。   FIG. 24 is a flowchart showing the boundary determination procedure in the fourth embodiment.

まず、図25(a)に示すように、符号化/復号対象ブロック300に水平方向に隣接する第1テンプレート領域304を用いて第1動きベクトル310を検出する(S31)。これは実施の形態1で説明した手順と同様である。同様に、図25(b)に示すように、符号化対象ブロック300に垂直方向に隣接する第2テンプレート領域306を用いて第2動きベクトル330を検出する(S32)。   First, as shown in FIG. 25A, the first motion vector 310 is detected using the first template region 304 that is adjacent to the encoding / decoding target block 300 in the horizontal direction (S31). This is the same as the procedure described in the first embodiment. Similarly, as shown in FIG. 25B, the second motion vector 330 is detected using the second template region 306 that is adjacent to the encoding target block 300 in the vertical direction (S32).

ここで、第1テンプレート領域304は、符号化/復号対象ブロック300の左下半分だけに隣接し、第2テンプレート領域306は、符号化/復号対象ブロック300の右上半分だけに隣接している。このようなテンプレート形状の設定は、精度の高い動きベクトルを算出するために重要である。すなわち、最終的に3分割される領域が図25(c)、(d)のような形状になることを想定して、予め動き補償予測に使用される領域と隣接しなくなることが予想される領域をテンプレート領域から除外しておくことで、検出される動きベクトルの精度を高めている。   Here, the first template region 304 is adjacent to only the lower left half of the encoding / decoding target block 300, and the second template region 306 is adjacent to only the upper right half of the encoding / decoding target block 300. Such setting of the template shape is important for calculating a highly accurate motion vector. That is, assuming that the region finally divided into three is shaped as shown in FIGS. 25C and 25D, it is expected that the region will not be adjacent to the region used for motion compensation prediction in advance. By excluding the region from the template region, the accuracy of the detected motion vector is increased.

次に、実施の形態3と同様の方法で、第1動きベクトル310を検出した際の評価値と第2動きベクトル330を検出した際の評価値を比較し、評価値が良い方の動きベクトルをメイン動きベクトルとし、評価値が悪い方の動きベクトルをサブ動きベクトルとする(S33)。第1動きベクトル310がメイン動きベクトルとなった場合、第1テンプレート領域304に隣接する符号化/復号対象ブロック300の領域は左側であるため、ブロック300を最初に分割する垂直方向の本境界400を決定する。また、第2動きベクトル330がメイン動きベクトルとなった場合、第2テンプレート領域306に隣接する符号化/復号対象ブロック300の領域は上側であるため、ブロック300を最初に分割する水平方向の本境界400を決定する(S34)。ブロック300の最初の分割は、2つのテンプレートを利用して得られる2つの動きベクトルにもとづいてなされるため、第2の実施の形態と同様、仮境界を定める必要はなく、最初から本境界が定まる。   Next, the evaluation value when the first motion vector 310 is detected is compared with the evaluation value when the second motion vector 330 is detected by the same method as in the third embodiment, and the motion vector with the better evaluation value is compared. Is the main motion vector, and the motion vector with the worse evaluation value is the sub motion vector (S33). When the first motion vector 310 becomes the main motion vector, the region of the encoding / decoding target block 300 adjacent to the first template region 304 is on the left side, and thus the vertical main boundary 400 that divides the block 300 first. To decide. When the second motion vector 330 becomes the main motion vector, the region of the encoding / decoding target block 300 adjacent to the second template region 306 is on the upper side. The boundary 400 is determined (S34). Since the first division of the block 300 is performed based on two motion vectors obtained by using two templates, it is not necessary to define a temporary boundary as in the second embodiment, and the main boundary is determined from the beginning. Determined.

次に、最初の本境界400によって分割された領域のうち、メイン動きベクトルに対応するテンプレート領域に直接隣接していない方の領域、すなわちサブ動きベクトルに対応する方の領域について、サブ動きベクトルと第3動きベクトルを用いて本境界の方向を決定する(S35)。ステップS35ではメイン動きベクトルで動き補償予測した領域の方がサブ動きベクトルで動き補償予測した領域よりも信頼できるため、サブ動きベクトルで動き補償予測した領域についてさらに領域分割する。実施の形態1と同様、符号化側では、まず仮境界を決定し、テンプレート領域に隣接していないか、隣接している部分が少ない予測効率の低い側の領域に対して、通常の動き検出により、第3動きベクトル350を検出する。ブロック300が垂直方向の本境界400で最初に分割された場合、右側領域をさらに上下に仮領域分割された第3の右下領域について、第3動きベクトル350を検出する。ブロック300が水平方向の本境界400で最初に分割された場合、下側領域をさらに左右に仮領域分割した第3の右下領域について、第3動きベクトル350を検出する。   Next, out of the regions divided by the first main boundary 400, the region not directly adjacent to the template region corresponding to the main motion vector, that is, the region corresponding to the sub motion vector, The direction of the main boundary is determined using the third motion vector (S35). In step S35, the region that has been motion compensation predicted by the main motion vector is more reliable than the region that has been motion compensation predicted by the sub motion vector, and therefore the region that has been motion compensation predicted by the sub motion vector is further divided into regions. As in the first embodiment, the encoding side first determines a temporary boundary, and performs normal motion detection for a region that is not adjacent to the template region or has a small number of adjacent portions and has low prediction efficiency. Thus, the third motion vector 350 is detected. When the block 300 is first divided at the main boundary 400 in the vertical direction, the third motion vector 350 is detected for the third lower right area obtained by further dividing the right area further vertically. When the block 300 is first divided at the main boundary 400 in the horizontal direction, the third motion vector 350 is detected for the third lower right area obtained by further dividing the lower area into the left and right temporary areas.

そして、最後に、サブ動きベクトルと第3動きベクトル350とを用いて、実施の形態1と同様の方法で本境界を決定する。ブロック300が垂直方向の第1の本境界400で最初に分割された場合は、図25(c)に示すように、右側領域についてさらに上下に分割する水平方向の第2の本境界402が決定され、ブロック300が水平方向の第1の本境界400で最初に分割された場合は、図25(d)に示すように、下側領域についてさらに左右に分割する垂直方向の第2の本境界402が決定される。   Finally, using the sub motion vector and the third motion vector 350, the boundary is determined by the same method as in the first embodiment. When the block 300 is first divided at the first book boundary 400 in the vertical direction, as shown in FIG. 25C, the second book boundary 402 in the horizontal direction to be further divided up and down in the right region is determined. When the block 300 is first divided at the first book boundary 400 in the horizontal direction, as shown in FIG. 25D, the second book boundary in the vertical direction is further divided into the left and right regions as shown in FIG. 402 is determined.

実施の形態4では、2つのテンプレート領域を用いて得られた第1および第2動きベクトルは復号側でも得られるため、伝送する必要はないが、符号化側の通常の動き検出により検出された第3動きベクトルは符号化側でしか得られない情報であるため、復号側に伝送する。   In the fourth embodiment, since the first and second motion vectors obtained using the two template regions are also obtained on the decoding side, they need not be transmitted, but are detected by normal motion detection on the coding side. Since the third motion vector is information that can be obtained only on the encoding side, it is transmitted to the decoding side.

実施の形態4では、2本の動きベクトルの中で、より効率の高い動きベクトルを基準として第1の本境界400を決定し、基準動きベクトルよりは信頼度が低い残りの動きベクトルで動き補償予測する領域の方を第2の本境界402でさらに領域分割して動き補償予測するため、効率の高い動き補償予測を行うことが可能である。   In the fourth embodiment, the first main boundary 400 is determined based on a more efficient motion vector among the two motion vectors, and motion compensation is performed using the remaining motion vectors having lower reliability than the reference motion vector. Since the region to be predicted is further divided into regions at the second main boundary 402 to perform motion compensation prediction, it is possible to perform motion compensation prediction with high efficiency.

このように、実施の形態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.

ここまでは、MPEGのPピクチャなどで用いられる片方向予測について本発明の実施の形態を説明してきたが、本発明の実施の形態をBピクチャなどで用いられる双方向予測(通常は前方向予測と後方向予測)に対して適用することもできる。双方向予測とは、2つの参照画像から動き補償予測を行うことで得た2つの画像を平均化又は重みづけ平均化することにより、予測画像を得る技術である。各領域について各予測方向(前方向、後方向)に動きベクトルがある点を除けば、片方向予測の場合と同様に、双方向予測に対して本発明の実施の形態を適用することができる。双方向予測により予測誤差を削減しつつ、適切な領域分割により更に予測誤差を削減可能である。   Up to this point, the embodiment of the present invention has been described for unidirectional prediction used in MPEG P pictures and the like. However, the embodiment of the present invention is bidirectional prediction (usually forward prediction used in B pictures). And backward prediction). 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. Except for the point that there is a motion vector in each prediction direction (forward direction, backward direction) for each region, the embodiment of the present invention can be applied to bidirectional prediction as in the case of unidirectional prediction. . While reducing the prediction error by bidirectional prediction, the prediction error can be further reduced by appropriate region division.

また、本発明の実施の形態は、自動算出する動きベクトルとして、テンプレートMEを利用した動きベクトルの自動算出だけでなく、予測動きベクトル(PMV)を用いることや、周辺ブロックの動きベクトルをそのまま利用することももちろん可能である。この場合も動きベクトルの符号量を削減しつつ動き補償予測の形状を自動的に決定するが可能である。   In addition, the embodiment of the present invention uses not only a motion vector automatically calculated using a template ME as a motion vector to be automatically calculated, but also a predicted motion vector (PMV) or uses motion vectors of surrounding blocks as they are. Of course it is also possible to do. In this case as well, it is possible to automatically determine the shape of the motion compensation prediction while reducing the code amount of the motion vector.

また、ここまでは単一の画像コンポーネント(輝度)について説明したが、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.

以上述べたように、本発明の実施の形態によれば、複数の動きベクトルから得られる複数の予測画像の特徴量を用いて、動き補償予測の形状を復号側で自動的に決定することによって、動き補償予測形状パターンの情報を伝送せずに、動き補償予測の形状を可変にすることができる。したがって、さまざまな形状での柔軟な動き補償予測が可能となり、その結果、付加情報の符号量を増加させることなく、動き補償予測の予測誤差を減少させることができ、符号化効率が向上する。   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.

符号化/復号対象領域に隣接する復号済領域をテンプレートとして復号側で自動算出される動きベクトルを用いて、復号側で自動的に動き補償予測の形状を決定するため、動き補償予測の形状に関する付加情報符号量を削減できる。それに加えて、動きベクトルを伝送する必要がないので、動きベクトルの符号量も削減可能である。これにより、符号化効率を向上させることが可能である。   The motion compensation prediction shape is automatically determined on the decoding side using the motion vector automatically calculated on the decoding side using the decoded region adjacent to the encoding / decoding target region as a template. The amount of additional information code can be reduced. In addition, since there is no need to transmit a motion vector, the code amount of the motion vector can be reduced. Thereby, encoding efficiency can be improved.

また、複数のテンプレートの形状から複数の動きベクトルを算出して動き補償予測の形状を復号側で自動的に決定するため、動きベクトルを全く伝送せずに、任意の形状での動き補償予測が可能である。これにより、符号化効率を更に向上させることが可能である。   In addition, since a plurality of motion vectors are calculated from a plurality of template shapes and the shape of motion compensation prediction is automatically determined on the decoding side, motion compensation prediction in an arbitrary shape can be performed without transmitting any motion vectors. Is possible. Thereby, it is possible to further improve the encoding efficiency.

さらに、複数のテンプレートの形状から精度の高い動きベクトルを採用し、符号化/復号対象領域の予測効率の低い領域については動きベクトルを伝送することもできる。これにより、予測効率の高い領域にのみ復号側で自動的に算出する動きベクトルを適用可能となり、さらに符号化効率を向上させることが可能である。   Furthermore, a motion vector with high accuracy can be adopted from the shapes of a plurality of templates, and a motion vector can be transmitted for a region with low prediction efficiency of a region to be encoded / decoded. This makes it possible to apply a motion vector automatically calculated on the decoding side only to a region with high prediction efficiency, and further improve the encoding efficiency.

以上の符号化及び復号に関する処理は、ハードウェアを用いた伝送、蓄積、受信装置として実現することができるのは勿論のこと、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 第2動きベクトル検出部、 103 本領域分割・動き補償部、 104 直交変換・量子化部、 105 可変長符号化部、 106 逆量子化・逆直交変換部、 107 参照画像メモリ、 108 第1動きベクトル検出部、 109 加算部、 110 減算部、 201 可変長復号部、 203 本領域分割・動き補償部、 206 逆量子化・逆直交変換部、 207 参照画像メモリ、 208 第1動きベクトル検出部、 209 加算部。   101 Temporary region division unit, 102 Second motion vector detection unit, 103 Region division / motion compensation unit, 104 Orthogonal transformation / quantization unit, 105 Variable length coding unit, 106 Inverse quantization / inverse orthogonal transformation unit, 107 Image memory, 108 first motion vector detection unit, 109 addition unit, 110 subtraction unit, 201 variable length decoding unit, 203 region division / motion compensation unit, 206 inverse quantization / inverse orthogonal transform unit, 207 reference image memory, 208 A first motion vector detection unit, 209 addition unit.

Claims (6)

符号化対象ブロックに隣接した局所復号済みの所定領域の第1動きベクトルを決定する第1動きベクトル決定部と、
前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割する仮領域分割部と、
2つの仮領域の内、前記所定領域に隣接する部分が少ない方の仮領域に対して、符号化対象ブロックの原画像を用いて、第2動きベクトルを検出する第2動きベクトル検出部と、
前記第1動きベクトルおよび前記第2動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部と、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部とを備えることを特徴とする動画像符号化装置。
A first motion vector determination unit that determines a first motion vector of a predetermined region that has been locally decoded and is adjacent to an encoding target block;
A temporary area dividing unit that divides the encoding target block into two temporary areas at a predetermined temporary boundary;
A second motion vector detection unit that detects a second motion vector using an original image of an encoding target block for a temporary region having a smaller portion adjacent to the predetermined region of the two temporary regions;
Generating two prediction blocks corresponding to the coding target block from a reference image using the first motion vector and the second motion vector, determining a boundary based on activities of the two prediction blocks, and A motion compensation unit that generates a combined prediction block by combining regions obtained by dividing each prediction block at the main 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所定領域の第1動きベクトルと、前記符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域の第2動きベクトルとを決定する動きベクトル決定部と、
前記第1動きベクトルおよび前記第2動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部と、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部とを備えることを特徴とする動画像符号化装置。
A first motion vector of a first predetermined region that has been locally decoded adjacent to the encoding target block in a horizontal direction, and a second motion vector of a second predetermined region that has been locally decoded and adjacent to the encoding target block in the vertical direction; A motion vector determination unit for determining
Generating two prediction blocks corresponding to the coding target block from a reference image using the first motion vector and the second motion vector, determining a boundary based on activities of the two prediction blocks, and A motion compensation unit that generates a combined prediction block by combining regions obtained by dividing each prediction block at the main 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所定領域に対する第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域に対する第2動きベクトルを決定し、第1動きベクトルおよび第2動きベクトルの内、いずれか一方の動きベクトルを採用する第1・第2動きベクトル決定部と、
前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割する仮領域分割部と、
2つの仮領域の内、前記第1・第2動きベクトル決定部により採用された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出する第3動きベクトル検出部と、
前記第1・第2動きベクトル決定部により採用された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する動き補償部と、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部とを備えることを特徴とする動画像符号化装置。
Determine a first motion vector for a first predetermined region that has been locally decoded adjacent to the current block and a second motion vector for a second predetermined region that has been adjacent to the current block in the vertical direction A first and second motion vector determination unit that employs one of the first motion vector and the second motion vector;
A temporary area dividing unit that divides the encoding target block into two temporary areas at a predetermined temporary boundary;
Of the two provisional areas, the original image of the block to be encoded is used for the provisional area that is not adjacent to the predetermined area for which the motion vector adopted by the first and second motion vector determination units is determined. A third motion vector detection unit for detecting three motion vectors;
Using the motion vector adopted by the first and second motion vector determination units and the third motion vector, two prediction blocks corresponding to the coding target block are generated from a reference image, and two prediction blocks A motion compensation unit that determines a main boundary based on an activity and generates a combined prediction block by combining regions obtained by dividing the prediction blocks at the main 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所定領域の第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域の第2動きベクトルとを決定するとともに、第1動きベクトルおよび第2動きベクトルの内、一方の動きベクトルを主動きベクトル、他方の動きベクトルを副動きベクトルとして選択する第1・第2動きベクトル決定部と、
前記第1動きベクトルおよび前記第2動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した第1および第2予測ブロックを生成し、第1および第2予測ブロックのアクティビティに基づいて第1の本境界を決定する動き補償部と、
前記第1の本境界により2つの分割された本領域の内、前記第1・第2動きベクトル決定部により副動きベクトルとして選択された動きベクトルが決定された所定領域に隣接する部分の多い方の本領域を選択し、選択された本領域を所定の仮境界でさらに2つの仮領域に分割する仮領域分割部と、
2つの仮領域の内、前記副動きベクトルとして選択された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出する第3動きベクトル検出部とを含み、
前記動き補償部は、前記副動きベクトルとして選択された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した第3および第4予測ブロックを生成し、第3および第4予測ブロックのアクティビティに基づいて第2の本境界を決定し、前記第1または第2予測ブロックを前記第1の本境界で分割して得た領域と、第3および第4予測ブロックを前記第2の本境界で分割して得た領域とを前記各予測ブロック間で結合させることにより、合成予測ブロックを生成し、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する符号化部を備えることを特徴とする動画像符号化装置。
The first motion vector of the first predetermined region that has been locally decoded adjacent to the block to be encoded in the horizontal direction, and the second motion vector of the second predetermined region that has been locally decoded and adjacent to the block to be encoded in the vertical direction. A first and second motion vector determination unit for selecting one of the first motion vector and the second motion vector as a main motion vector and the other motion vector as a sub motion vector;
Using the first motion vector and the second motion vector, first and second prediction blocks corresponding to the coding target block are generated from a reference image, and first and second prediction blocks are generated based on activities of the first and second prediction blocks. A motion compensator for determining one main boundary;
Of the two main regions divided by the first main boundary, the portion that is adjacent to the predetermined region in which the motion vector selected as the sub motion vector by the first / second motion vector determination unit is determined A temporary area dividing unit that selects the main area and divides the selected main area into two temporary areas at a predetermined temporary boundary;
Among the two temporary areas, a third motion vector is detected using the original image of the encoding target block for the temporary area that is not adjacent to the predetermined area for which the motion vector selected as the sub-motion vector is determined. A third motion vector detection unit,
The motion compensation unit generates a third and a fourth prediction block corresponding to the coding target block from a reference image using the motion vector selected as the sub motion vector and the third motion vector, And a region obtained by determining a second main boundary based on the activity of the fourth prediction block and dividing the first or second prediction block at the first main boundary; and third and fourth prediction blocks Are combined with each of the prediction blocks to generate a composite prediction block,
A moving picture coding apparatus comprising: a coding unit that codes a prediction difference block obtained by subtracting the combined prediction block from the coding target block and a motion vector of each temporary area.
符号化対象ブロックに水平方向に隣接した局所復号済みの第1所定領域に対する第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域に対する第2動きベクトルを決定し、第1動きベクトルおよび第2動きベクトルの内、いずれか一方の動きベクトルを採用するステップと、
前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割するステップと、
2つの仮領域の内、前記第1・第2動きベクトル決定部により採用された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出するステップと、
前記第1・第2動きベクトル決定部により採用された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成するステップと、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化するステップとを備えることを特徴とする動画像符号化方法。
Determine a first motion vector for a first predetermined region that has been locally decoded adjacent to the current block and a second motion vector for a second predetermined region that has been adjacent to the current block in the vertical direction And adopting one of the first motion vector and the second motion vector,
Dividing the block to be encoded into two temporary regions at a predetermined temporary boundary;
Of the two provisional areas, the original image of the block to be encoded is used for the provisional area that is not adjacent to the predetermined area for which the motion vector adopted by the first and second motion vector determination units is determined. Detecting three motion vectors;
Using the motion vector adopted by the first and second motion vector determination units and the third motion vector, two prediction blocks corresponding to the coding target block are generated from a reference image, and two prediction blocks Determining a main boundary based on an activity, and generating a combined prediction block by combining regions obtained by dividing the prediction blocks at the main 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.
符号化対象ブロックに水平方向に隣接した局所復号済みの第1所定領域に対する第1動きベクトルと、符号化対象ブロックに垂直方向に隣接した局所復号済みの第2所定領域に対する第2動きベクトルを決定し、第1動きベクトルおよび第2動きベクトルの内、いずれか一方の動きベクトルを採用する機能と、
前記符号化対象ブロックを所定の仮境界で2つの仮領域に分割する機能と、
2つの仮領域の内、前記第1・第2動きベクトル決定部により採用された動きベクトルが決定された所定領域に隣接しない仮領域に対して、符号化対象ブロックの原画像を用いて、第3動きベクトルを検出する機能と、
前記第1・第2動きベクトル決定部により採用された動きベクトルおよび前記第3動きベクトルを用いて、参照画像から前記符号化対象ブロックに対応した2つの予測ブロックを生成し、2つの予測ブロックのアクティビティに基づいて本境界を決定し、前記各予測ブロックを前記本境界で分割して得た領域を前記各予測ブロック間で結合させることにより、合成予測ブロックを生成する機能と、
前記合成予測ブロックを前記符号化対象ブロックより減算した予測差分ブロックと、各仮領域の動きベクトルとを符号化する機能とをコンピュータに実現させることを特徴とする動画像符号化プログラム。
Determine a first motion vector for a first predetermined region that has been locally decoded adjacent to the current block and a second motion vector for a second predetermined region that has been adjacent to the current block in the vertical direction A function of adopting one of the first motion vector and the second motion vector;
A function of dividing the block to be encoded into two temporary areas at a predetermined temporary boundary;
Of the two provisional areas, the original image of the block to be encoded is used for the provisional area that is not adjacent to the predetermined area for which the motion vector adopted by the first and second motion vector determination units is determined. A function to detect three motion vectors;
Using the motion vector adopted by the first and second motion vector determination units and the third motion vector, two prediction blocks corresponding to the coding target block are generated from a reference image, and two prediction blocks A function of generating a composite prediction block by determining a main boundary based on an activity, and combining regions obtained by dividing the prediction blocks at the main 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.
JP2010128164A 2010-06-03 2010-06-03 Moving image encoding apparatus, moving image encoding method and moving image encoding program Pending JP2011254395A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010128164A JP2011254395A (en) 2010-06-03 2010-06-03 Moving image encoding apparatus, moving image encoding method and moving image encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010128164A JP2011254395A (en) 2010-06-03 2010-06-03 Moving image encoding apparatus, moving image encoding method and moving image encoding program

Publications (1)

Publication Number Publication Date
JP2011254395A true JP2011254395A (en) 2011-12-15

Family

ID=45417932

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010128164A Pending JP2011254395A (en) 2010-06-03 2010-06-03 Moving image encoding apparatus, moving image encoding method and moving image encoding program

Country Status (1)

Country Link
JP (1) JP2011254395A (en)

Similar Documents

Publication Publication Date Title
WO2013099285A1 (en) Video encoding device, video encoding method and video encoding program, and video decoding device, video decoding method and video decoding program
JP5862824B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, transmission apparatus, transmission method, and transmission program
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
WO2013099283A1 (en) Video encoding device, video encoding method and video encoding program, and video decoding device, video decoding method and video decoding program
JP6065088B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, transmission apparatus, transmission method, and transmission program
JP2012070277A (en) Video encoding device, video encoding method and video encoding program
JP2012070278A (en) Video decoding device, video decoding method and video decoding program
JP5725006B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP5206772B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP5880758B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP5206773B2 (en) Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
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
JP5843041B1 (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
JP2011234337A (en) Moving image encoding apparatus, moving image encoding method and moving image encoding program
KR20070061146A (en) Method for transcoding