JP2019213018A - Image decoding apparatus and image encoding apparatus - Google Patents

Image decoding apparatus and image encoding apparatus Download PDF

Info

Publication number
JP2019213018A
JP2019213018A JP2018106505A JP2018106505A JP2019213018A JP 2019213018 A JP2019213018 A JP 2019213018A JP 2018106505 A JP2018106505 A JP 2018106505A JP 2018106505 A JP2018106505 A JP 2018106505A JP 2019213018 A JP2019213018 A JP 2019213018A
Authority
JP
Japan
Prior art keywords
target block
unit
block
motion information
image
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
JP2018106505A
Other languages
Japanese (ja)
Inventor
知宏 猪飼
Tomohiro Igai
知宏 猪飼
知典 橋本
Tomonori Hashimoto
知典 橋本
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2018106505A priority Critical patent/JP2019213018A/en
Publication of JP2019213018A publication Critical patent/JP2019213018A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

To prevent a memory band in an image decoding apparatus and an image encoding apparatus from being large.SOLUTION: An inter prediction image generation unit refers to motion information of a reference block that satisfies following conditions to generate a predicted image of a target block. The reference block is a block whose at least one of a vertical length (K) and a horizontal length (L) from a boundary of an encoding tree unit containing the target block out of blocks not adjacent to the target block is equal to or less than a predetermined value.SELECTED DRAWING: Figure 15

Description

本発明の実施形態は画像復号装置および画像符号化装置に関する。   Embodiments described herein relate generally to an image decoding apparatus and an image encoding apparatus.

動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。   In order to efficiently transmit or record a moving image, a moving image encoding device that generates encoded data by encoding the moving image, and a moving image that generates a decoded image by decoding the encoded data An image decoding device is used.

具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。   Specific examples of the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).

このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化ツリーユニット(CTU:Coding Tree Unit)、符号化ツリーユニットを分割することで得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU)、変換ユニット(TU)からなる階層構造により管理され、CUごとに符号化/復号される。   In such a moving image coding system, an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding tree unit (CTU: Coding Tree Unit) obtained by dividing the slice. ), A coding unit obtained by dividing the coding tree unit (sometimes referred to as a coding unit (CU)), and a prediction unit that is a block obtained by dividing the coding unit (PU) and a hierarchical structure composed of conversion units (TU), and encoded / decoded for each CU.

また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。また、近年の動画像符号化及び復号の技術として非特許文献1が挙げられる。   In such a moving image coding method, a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image). A prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of the method for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction). Further, Non-Patent Document 1 can be cited as a technique for encoding and decoding moving images in recent years.

例えば、インター予測については、フレーム間の動き補償により予測画像が生成される。符号量の削減のため、動き補償に関する情報(動き補償パラメータ)は直接符号化されないことが多い。そのため、インター予測では、予測対象ブロック周辺の復号状況等に基づく動き補償パラメータの推定が行われる。一例として、マージ予測においては、動き補償パラメータ候補(マージ候補)のリストが生成される。次に、当該リストからインデックスで選択されるマージ候補を用いて、予測対象ブロックの予測画像の動き補償が行われる。マージ候補のリストには、予測対象ブロックとは別のブロックである参照ブロックの動き情報に基づき導出される空間候補が含まれる。空間候補の導出において、参照ブロックは、復号対象となる予測対象ブロックの左上に隣接するブロック、右上に隣接するブロック、右下に隣接するブロック、および、予測対象ブロックとは隣接せずに離れている位置のブロックの少なくとも一方から選択される。   For example, for inter prediction, a predicted image is generated by motion compensation between frames. In order to reduce the amount of code, information regarding motion compensation (motion compensation parameters) is often not directly encoded. For this reason, in inter prediction, motion compensation parameters are estimated based on the decoding situation around the prediction target block. As an example, in merge prediction, a list of motion compensation parameter candidates (merge candidates) is generated. Next, motion compensation of the prediction image of the prediction target block is performed using the merge candidate selected by the index from the list. The list of merge candidates includes spatial candidates derived based on motion information of a reference block that is a block different from the prediction target block. In the derivation of the spatial candidates, the reference block is not adjacent to the prediction target block to be decoded, but adjacent to the upper left block, the upper right adjacent block, the lower right adjacent block, and the prediction target block. It is selected from at least one of the blocks at the position.

また、動きベクトルをデコーダ側で導出する技術として、予測対象ブロック(サブブロック)に隣接するブロック(サブブロック)をテンプレートとし、該隣接ブロックの動きベクトルを用いて予測対象ブロックの動きベクトルを導出するテンプレートマッチングが知られている。   As a technique for deriving a motion vector on the decoder side, a block (subblock) adjacent to the prediction target block (subblock) is used as a template, and a motion vector of the prediction target block is derived using the motion vector of the adjacent block. Template matching is known.

"Algorithm Description of Joint Exploration Test Model 5", JVET-E1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 12-20 January 2017"Algorithm Description of Joint Exploration Test Model 5", JVET-E1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 12-20 January 2017

マージ予測においては、予測対象ブロックが属するCTUとは異なるCTUに属するブロックが参照ブロックとなることが生じ得る。予測対象ブロックが含まれるCTUとは異なるCTUに含まれるブロックの動き情報は画像復号装置および画像符号化装置の内部メモリに保存されていない。そのため、該動き情報にアクセスするためには、外部メモリアクセスが必要となる。よって、メモリバンドが大きくなるという第1の課題が生じていた。   In merge prediction, a block belonging to a CTU different from the CTU to which the prediction target block belongs may become a reference block. The motion information of the block included in the CTU different from the CTU including the prediction target block is not stored in the internal memory of the image decoding apparatus and the image encoding apparatus. Therefore, external memory access is required to access the motion information. Therefore, the first problem that the memory band becomes large has occurred.

また、従来のテンプレートマッチングにおいては、直前に復号処理したCUの動きベクトルが用いられる。そのため、直前に処理されるCUにおける復号処理が終了しなければ、次のCUの予測画像生成処理が開始できないという第2の課題が生じていた。   In the conventional template matching, the motion vector of the CU decoded immediately before is used. For this reason, there has been a second problem that the predicted image generation process of the next CU cannot be started unless the decoding process in the CU processed immediately before is completed.

本発明の目的は、上記の第1及び第2の課題の少なくとも何れかの解決を図ることのできる画像復号装置、画像符号化装置、および予測画像生成装置を提供することである。   An object of the present invention is to provide an image decoding device, an image encoding device, and a predicted image generation device that can solve at least one of the first and second problems.

上記課題を解決するために、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの予測画像を生成する予測画像生成部を備え、上記予測画像生成部は、上記対象ブロックに隣接しないブロックのうち、上記対象ブロックを含む符号化ツリーユニットの境界からの垂直方向の距離及び水平方向の距離の少なくとも何れかが所定の値以下であるブロックの動き情報を参照して、上記対象ブロックの予測画像を生成する。   In order to solve the above-described problem, an image decoding device according to an aspect of the present invention is an image decoding device that decodes encoded data, and includes a prediction image generation unit that generates a prediction image of a target block. The image generation unit includes blocks that are not adjacent to the target block and have at least one of a vertical distance and a horizontal distance from a boundary of an encoding tree unit including the target block that is equal to or less than a predetermined value. A prediction image of the target block is generated with reference to the motion information.

また、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記動き情報導出部は、上記対象ブロックの直前に処理したブロックに含まれる画素を、上記テンプレート領域には設定しない。   An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes encoded data, and includes a motion information deriving unit that derives motion information of a target block and the target block with reference to the motion information. The motion information deriving unit generates a motion image of the target block by performing template matching with reference to a decoded template region set in accordance with the target block. The information is derived, and the motion information deriving unit does not set the pixel included in the block processed immediately before the target block in the template region.

また、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記対象ブロックには、インデックスが割り振られており、上記動き情報導出部は、上記対象ブロックに割り振られているインデックスに応じて、上記テンプレート領域を設定する。   An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes encoded data, and includes a motion information deriving unit that derives motion information of a target block and the target block with reference to the motion information. The motion information deriving unit generates a motion image of the target block by performing template matching with reference to a decoded template region set in accordance with the target block. Information is derived, and an index is allocated to the target block, and the motion information deriving unit sets the template area according to the index allocated to the target block.

また、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記動き情報導出部は、上記対象ブロックより上方に位置する画素のみを、上記テンプレート領域の候補とする。   An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes encoded data, and includes a motion information deriving unit that derives motion information of a target block and the target block with reference to the motion information. The motion information deriving unit generates a motion image of the target block by performing template matching with reference to a decoded template region set in accordance with the target block. The information is derived, and the motion information deriving unit sets only the pixels located above the target block as candidates for the template region.

また、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記動き情報導出部は、上記対象ブロックが、どのように分割されたブロックであるのかに応じて、上記テンプレート領域を設定する。   An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes encoded data, and includes a motion information deriving unit that derives motion information of a target block and the target block with reference to the motion information. The motion information deriving unit generates a motion image of the target block by performing template matching with reference to a decoded template region set in accordance with the target block. The information is derived, and the motion information deriving unit sets the template region according to how the target block is a divided block.

また、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部を備え、上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、ラスタースキャン順における下流側からラスタースキャン順における上流側に遡る処理順を少なくとも一部に含むスキャン順に従って、対象ブロックが設定される。
An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes encoded data, and includes a motion information deriving unit that derives motion information of a target block and the target block with reference to the motion information. A predicted image generation unit that generates a predicted image of the motion information, the motion information derivation unit,
Processing for deriving motion information of the target block by performing template matching with reference to the decoded template region set according to the target block, and going back from the downstream side in the raster scan order to the upstream side in the raster scan order The target block is set according to the scan order including at least part of the order.

また、本発明の一態様に係る画像復号装置は、符号化データを復号する画像復号装置であって、対象ブロックの動き情報を導出する動き情報導出部と、上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部と、上記予測画像生成部におけるブロックのスキャン順を設定するスキャン順設定部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記スキャン順設定部は、上記符号化データに含まれるフラグを参照して、上記予測画像生成部におけるブロックのスキャン順を設定する。   An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes encoded data, a motion information deriving unit that derives motion information of a target block, and the target by referring to the motion information. A prediction image generation unit that generates a prediction image of the block; and a scan order setting unit that sets a scan order of the block in the prediction image generation unit, wherein the motion information deriving unit is set according to the target block By performing template matching with reference to the decoded template region, the motion information of the target block is derived, and the scan order setting unit refers to the flag included in the encoded data, and the prediction image generation unit Sets the scan order of blocks at.

上記課題を解決するために、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの予測画像を生成する予測画像生成部を備え、上記予測画像生成部は、上記対象ブロックに隣接しないブロックのうち、上記対象ブロックを含む符号化ツリーユニットの境界からの垂直方向の距離及び水平方向の距離の少なくとも何れかが所定の値以下であるブロックの動き情報を参照して、上記対象ブロックの予測画像を生成する。   In order to solve the above-described problem, an image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and the prediction image of the target block is A prediction image generation unit for generating, wherein the prediction image generation unit includes at least a vertical distance and a horizontal distance from a boundary of a coding tree unit including the target block among blocks not adjacent to the target block. A prediction image of the target block is generated with reference to the motion information of a block that is less than or equal to a predetermined value.

また、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記動き情報導出部は、上記対象ブロックの直前に処理したブロックに含まれる画素を、上記テンプレート領域には設定しない。   An image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and a motion information deriving unit that derives motion information of the target block. And a predicted image generating unit that generates a predicted image of the target block with reference to the motion information, and the motion information deriving unit referred to the encoded template region set according to the target block By performing template matching, the motion information of the target block is derived, and the motion information deriving unit does not set the pixel included in the block processed immediately before the target block in the template region.

また、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記対象ブロックには、インデックスが割り振られており、上記動き情報導出部は、上記対象ブロックに割り振られているインデックスに応じて、上記テンプレート領域を設定する。   An image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and a motion information deriving unit that derives motion information of the target block. And a predicted image generating unit that generates a predicted image of the target block with reference to the motion information, and the motion information deriving unit referred to the encoded template region set according to the target block By performing template matching, the motion information of the target block is derived, an index is allocated to the target block, and the motion information deriving unit is configured according to the index allocated to the target block, Set the template area.

また、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記動き情報導出部は、上記対象ブロックより上方に位置する画素のみを、上記テンプレートの候補とする。   An image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and a motion information deriving unit that derives motion information of the target block. And a predicted image generating unit that generates a predicted image of the target block with reference to the motion information, and the motion information deriving unit referred to the encoded template region set according to the target block By performing template matching, the motion information of the target block is derived, and the motion information deriving unit sets only pixels located above the target block as candidates for the template.

また、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記動き情報導出部は、上記対象ブロックが、どのように分割されたブロックであるのかに応じて、上記テンプレートに設定する領域を変更する。   An image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and a motion information deriving unit that derives motion information of the target block. And a predicted image generation unit that generates a predicted image of the target block with reference to the motion information, and the motion information deriving unit refers to a template that refers to a decoded template region set according to the target block By performing matching, the motion information of the target block is derived, and the motion information deriving unit changes the region set in the template according to how the target block is a divided block. To do.

また、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部を備え、上記動き情報導出部は、上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、ラスタースキャン順における下流側からラスタースキャン順における上流側に遡る処理順を少なくとも一部に含むスキャン順に従って、対象ブロックが設定される。   An image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and a motion information deriving unit that derives motion information of the target block. And a predicted image generating unit that generates a predicted image of the target block with reference to the motion information, and the motion information deriving unit refers to a template matching that refers to a decoded template region set according to the target block As a result, the motion information of the target block is derived, and the target block is set according to the scan order including at least a part of the processing order going back from the downstream side in the raster scan order to the upstream side in the raster scan order.

また、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、対象ブロックの動き情報を導出する動き情報導出部と、上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部と、上記予測画像生成部におけるブロックのスキャン順を設定するスキャン順設定部とを備え、上記動き情報導出部は、上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、上記スキャン順設定部は、符号化されるデータに上記予測画像生成部におけるブロックのスキャン順を示すフラグを含ませる。   An image encoding device according to an aspect of the present invention is an image encoding device that encodes a residual between a predicted image and an encoding target image, and a motion information deriving unit that derives motion information of the target block. A prediction image generation unit that generates a prediction image of the target block with reference to the motion information, and a scan order setting unit that sets a scan order of the blocks in the prediction image generation unit, and the motion information deriving unit Derives the motion information of the target block by performing template matching with reference to the encoded template region set according to the target block, and the scan order setting unit converts the encoded data into the encoded data. A flag indicating the scan order of blocks in the predicted image generation unit is included.

以上の構成によれば、上記の第1及び第2の課題の少なくとも何れかの解決を図ることができる。   According to the above configuration, at least one of the first and second problems can be solved.

本実施形態に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on this embodiment. PU分割モードのパターンを示す図である。(a)〜(h)は、それぞれ、PU分割モードが、2Nx2N、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNの場合のパーティション形状について示している。It is a figure which shows the pattern of PU division | segmentation mode. (A) to (h) show the partition shapes when the PU partitioning modes are 2Nx2N, 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN, respectively. 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。It is a conceptual diagram which shows an example of a reference picture and a reference picture list. 本第1の実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus which concerns on the 1st embodiment. 本第1の実施形態に係る画像復号装置の構成を示す概略図である。It is the schematic which shows the structure of the image decoding apparatus which concerns on this 1st Embodiment. 本第1の実施形態に係る画像符号化装置のインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part of the image coding apparatus which concerns on the 1st embodiment. 本第1の実施形態に係るマージ予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the merge prediction parameter derivation | leading-out part which concerns on the 1st embodiment. 本第1の実施形態に係るマージ候補導出部の構成を示す概略図である。It is the schematic which shows the structure of the merge candidate derivation | leading-out part which concerns on the 1st embodiment. 本第1の実施形態に係るAMVP予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the AMVP prediction parameter derivation | leading-out part which concerns on the 1st embodiment. 本第1の実施形態に係る画像符号化装置のインター予測パラメータ符号化部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter encoding part of the image coding apparatus which concerns on the 1st embodiment. 本第1の実施形態に係るインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part which concerns on the 1st embodiment. 本第1の実施形態に係るインター予測パラメータ復号部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter decoding part which concerns on the 1st embodiment. (a)は、バイラテラルマッチング(Bilateral matching)について説明するための図である。(b)は、テンプレートマッチング(Template matching)について説明するための図である。(A) is a figure for demonstrating bilateral matching (Bilateral matching). (B) is a figure for demonstrating template matching (Template matching). 本第1の実施形態の変形例に係るavailability判定部の判定の一例を示す模式図である。It is a schematic diagram which shows an example of the determination of the availability determination part which concerns on the modification of this 1st Embodiment. 本第1の実施形態の変形例に係るavailability判定部の判定の他の一例を示す模式図である。It is a schematic diagram which shows another example of the determination of the availability determination part which concerns on the modification of this 1st Embodiment. 本第1の実施形態の変形例に係るavailability判定部の判定のさらに他の一例を示す模式図である。It is a schematic diagram which shows another example of the determination of the availability determination part which concerns on the modification of the 1st embodiment. (a)から(f)は、本第2の実施形態に係る画像復号装置における符号化ノードの分割を示す図である。(A) to (f) is a diagram showing division of coding nodes in the image decoding apparatus according to the second embodiment. 本第2の実施形態に係る画像復号装置が行う分木タイプのシグナリングを示す図である。It is a figure which shows the branch type signaling performed by the image decoding apparatus according to the second embodiment. 本第2の実施形態に係る画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image decoding apparatus which concerns on the 2nd embodiment. 本第2の実施形態に係る復号処理を説明するフローチャートである。It is a flowchart explaining the decoding process which concerns on the 2nd embodiment. 本第2の実施形態に係るBT/TT情報復号処理の流れの一例の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of an example of the flow of the BT / TT information decoding process which concerns on the 2nd embodiment. 本第2の実施形態に係るQT情報復号処理に関するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax regarding the QT information decoding process which concerns on the 2nd embodiment. 本第2の実施形態に係るQT情報復号処理に関するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax regarding the QT information decoding process which concerns on the 2nd embodiment. 本第2の実施形態に係るBT/TT情報復号処理に関するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax regarding the BT / TT information decoding process which concerns on the 2nd embodiment. 本第2の実施形態に係るTT情報復号処理に関するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax regarding the TT information decoding process which concerns on the 2nd embodiment. 本第2の実施形態に係るBT情報復号処理に関するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax regarding the BT information decoding process which concerns on the 2nd embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の一例を示す図である。(A) to (c) is a diagram illustrating an example of a template region set by the matching motion deriving unit according to the second embodiment. (a)から(d)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の一例を示す図である。(A) to (d) is a diagram showing an example of a template region set by the matching motion deriving unit according to the second embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の一例を示す図である。(A) to (c) is a diagram illustrating an example of a template region set by the matching motion deriving unit according to the second embodiment. (a)から(d)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の他の一例を示す図である。(A) to (d) is a diagram showing another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)および(b)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の他の一例を示す図である。(A) And (b) is a figure which shows another example of the template area | region which the matching motion derivation part concerning this 2nd embodiment sets up. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の他の一例を示す図である。(A) to (c) is a diagram showing another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)および(b)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) And (b) is a figure which shows another example of the template area | region which the matching motion derivation | leading-out part which concerns on the 2nd embodiment sets. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (c) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(d)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (d) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (c) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (c) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(d)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (d) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (c) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(d)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域の変形例を示す図である。(A) to (d) is a diagram showing a modification of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(c)は、本第2の実施形態に係る分割されたブロックのスキャン順の一例を示す図である。(d)から(f)は、本第2の実施形態に係る分割されたブロックのスキャン順の他の一例である。(A) to (c) is a diagram showing an example of a scan order of divided blocks according to the second embodiment. (D) to (f) are other examples of the scan order of the divided blocks according to the second embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (c) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(d)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (d) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. (a)から(c)は、本第2の実施形態に係るマッチング動き導出部が設定するテンプレート領域のさらに他の一例を示す図である。(A) to (c) is a diagram showing still another example of the template region set by the matching motion deriving unit according to the second embodiment. 本第2の実施形態に係るQT分割されたブロックに対し、alt_cu_scan_flagに応じてスキャン順序を変更するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax which changes a scan order according to alt_cu_scan_flag with respect to the block by which QT division | segmentation which concerns on the 2nd embodiment was carried out. 本第2の実施形態に係るTT分割されたブロックに対し、alt_cu_scan_flagに応じてスキャン順序を変更するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax which changes a scanning order according to alt_cu_scan_flag with respect to the block by which TT division | segmentation which concerns on this 2nd Embodiment. 本第2の実施形態に係るBT分割されたブロックに対し、alt_cu_scan_flagに応じてスキャン順序を変更するシンタックスの一例を示す図である。It is a figure which shows an example of the syntax which changes a scanning order according to alt_cu_scan_flag with respect to the block by which BT division which concerns on the 2nd embodiment was carried out. 本実施形態に係る画像符号化装置を搭載した送信装置、および、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on this embodiment, and the receiver which mounts an image decoding apparatus. (A) shows a transmission device equipped with an image encoding device, and (b) shows a reception device equipped with an image decoding device. 本実施形態に係る画像符号化装置を搭載した記録装置、および、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。It is the figure shown about the structure of the recording device carrying the image coding apparatus which concerns on this embodiment, and the reproducing | regenerating apparatus carrying an image decoding apparatus. (A) shows a recording device equipped with an image encoding device, and (b) shows a playback device equipped with an image decoding device. 本実施形態に係る画像伝送システムの構成を示す概略図である。It is the schematic which shows the structure of the image transmission system which concerns on this embodiment.

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

図48は、本実施形態に係る画像伝送システム1の構成を示す概略図である。   FIG. 48 is a schematic diagram illustrating a configuration of the image transmission system 1 according to the present embodiment.

画像伝送システム1は、符号化対象画像を符号化した符号を伝送し、伝送された符号を復号し画像を表示するシステムである。画像伝送システム1は、画像符号化装置(動画像符号化装置)11、ネットワーク21、画像復号装置(動画像復号装置)31及び画像表示装置41を含んで構成される。   The image transmission system 1 is a system that transmits a code obtained by encoding an image to be encoded, decodes the transmitted code, and displays an image. The image transmission system 1 includes an image encoding device (moving image encoding device) 11, a network 21, an image decoding device (moving image decoding device) 31, and an image display device 41.

画像符号化装置11には、単一レイヤもしくは複数レイヤの画像を示す画像Tが入力される。レイヤとは、ある時間を構成するピクチャが1つ以上ある場合に、複数のピクチャを区別するために用いられる概念である。たとえば、同一ピクチャを、画質や解像度の異なる複数のレイヤで符号化するとスケーラブル符号化になり、異なる視点のピクチャを複数のレイヤで符号化するとビュースケーラブル符号化となる。複数のレイヤのピクチャ間で予測(インターレイヤ予測、インタービュー予測)を行う場合には、符号化効率が大きく向上する。また予測を行わない場合(サイマルキャスト)の場合にも、符号化データをまとめることができる。   An image T indicating a single layer image or a plurality of layers of images is input to the image encoding device 11. A layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed. When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.

ネットワーク21は、画像符号化装置11が生成した符号化ストリームTeを画像復号装置31に伝送する。ネットワーク21は、インターネット(internet)、広域ネットワーク(WAN:Wide Area Network)、小規模ネットワーク(LAN:Local Area Network)またはこれらの組み合わせである。ネットワーク21は、必ずしも双方向の通信網に限らず、地上デジタル放送、衛星放送等の放送波を伝送する一方向の通信網であっても良い。また、ネットワーク21は、DVD(Digital Versatile Disc)、BD(Blue-ray Disc)等の符号化ストリームTeを記録した記憶媒体で代替されても良い。   The network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31. The network 21 is the Internet, a wide area network (WAN), a small network (LAN), or a combination thereof. The network 21 is not necessarily limited to a bidirectional communication network, and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. The network 21 may be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).

画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。   The image decoding device 31 decodes each encoded stream Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.

画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、空間スケーラブル符号化、SNRスケーラブル符号化では、画像復号装置31、画像表示装置41が高い処理能力を有する場合には、画質の高い拡張レイヤ画像を表示し、より低い処理能力しか有しない場合には、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。   The image display device 41 displays all or part of one or a plurality of decoded images Td generated by the image decoding device 31. The image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. In addition, in the spatial scalable coding and SNR scalable coding, when the image decoding device 31 and the image display device 41 have a high processing capability, a high-quality enhancement layer image is displayed and only a lower processing capability is provided. Displays a base layer image that does not require higher processing capability and display capability as an extension layer.

<演算子>
本明細書で用いる演算子を以下に記載する。
<Operator>
The operators used in this specification are described below.

>>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=はOR代入演算子である。   >> is right bit shift, << is left bit shift, & is bitwise AND, | is bitwise OR, and | = is OR assignment operator.

x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。   x? y: z is a ternary operator that takes y when x is true (other than 0) and takes z when x is false (0).

Clip3(a, b, c) は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。   Clip3 (a, b, c) is a function that clips c to a value greater than or equal to a and less than or equal to b, returns a if c <a, returns b if c> b, otherwise Is a function that returns c (where a <= b).

<符号化ストリームTeの構造>
本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of encoded stream Te>
Prior to detailed description of the image encoding device 11 and the image decoding device 31 according to the present embodiment, a data structure of an encoded stream Te generated by the image encoding device 11 and decoded by the image decoding device 31 will be described. .

図1は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図1の(a)〜(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。   FIG. 1 is a diagram illustrating a hierarchical structure of data in the encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (A) to (f) of FIG. 1 respectively show an encoded video sequence defining a sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, and an encoded slice defining a slice data It is a figure which shows the coding unit (Coding Unit; CU) contained in the coding tree unit contained in data and coding slice data, and a coding tree unit.

(符号化ビデオシーケンス)
符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図1の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図1では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類およびレイヤの数はこれによらない。
(Encoded video sequence)
In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 1A, the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID. Although FIG. 1 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, the type of layer and the number of layers are not dependent on this.

ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。   The video parameter set VPS is a set of encoding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and encoding parameters related to individual layers in a moving image composed of a plurality of layers. A set is defined.

シーケンスパラメータセットSPSでは、対象シーケンスを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。   In the sequence parameter set SPS, a set of encoding parameters referred to by the image decoding device 31 in order to decode the target sequence is defined. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.

ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。   In the picture parameter set PPS, a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined. For example, a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included. There may be a plurality of PPSs. In that case, one of a plurality of PPSs is selected from each picture in the target sequence.

(符号化ピクチャ)
符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図1の(b)に示すように、スライスS0〜SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
(Encoded picture)
In the coded picture, a set of data referred to by the image decoding device 31 in order to decode the picture PICT to be processed is defined. As shown in FIG. 1B, the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).

なお、以下、スライスS0〜SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 Hereinafter, when it is not necessary to distinguish each of the slices S0 to SNS -1 , the subscripts may be omitted. The same applies to data included in an encoded stream Te described below and to which other subscripts are attached.

(符号化スライス)
符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図1の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
(Encoded slice)
In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 1C, the slice S includes a slice header SH and slice data SDATA.

スライスヘッダSHには、対象スライスの復号方法を決定するために画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。   The slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice. Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.

スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。   As slice types that can be specified by the slice type specification information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.

なお、スライスヘッダSHには、上記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。   Note that the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.

(符号化スライスデータ)
符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図1の(d)に示すように、符号化ツリーユニット(CTU:Coding Tree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
(Encoded slice data)
In the encoded slice data, a set of data referred to by the image decoding device 31 for decoding the slice data SDATA to be processed is defined. The slice data SDATA includes a coding tree unit (CTU) as shown in FIG. A CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).

(符号化ツリーユニット)
図1の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割により分割される。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。CTUは、分割フラグ(cu_split_flag)を含み、cu_split_flagが1の場合には、4つの符号化ノードCNに分割される。cu_split_flagが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニット(CU:Coding Unit)をノードとして持つ。符号化ユニットCUは符号化ノードの末端ノードであり、これ以上分割されない。符号化ユニットCUは、符号化処理の基本的な単位となる。
(Encoding tree unit)
As shown in (e) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode the encoding tree unit to be processed is defined. The coding tree unit is divided by recursive quadtree division. A tree-structured node obtained by recursive quadtree partitioning is referred to as a coding node (CN). An intermediate node of the quadtree is an encoding node, and the encoding tree unit itself is defined as the highest encoding node. The CTU includes a split flag (cu_split_flag), and when cu_split_flag is 1, it is split into four coding nodes CN. When cu_split_flag is 0, the coding node CN is not divided and has one coding unit (CU: Coding Unit) as a node. The encoding unit CU is a terminal node of the encoding node and is not further divided. The encoding unit CU is a basic unit of the encoding process.

また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、32x32画素、16x16画素、および、8x8画素の何れかをとり得る。   When the size of the coding tree unit CTU is 64x64 pixels, the size of the coding unit can be any of 64x64 pixels, 32x32 pixels, 16x16 pixels, and 8x8 pixels.

(符号化ユニット)
図1の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
(Encoding unit)
As shown in (f) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode an encoding unit to be processed is defined. Specifically, the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH. In the CU header, a prediction mode, a division method (PU division mode), and the like are defined.

予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測情報(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。   In the prediction tree, prediction information (a reference picture index, a motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality of parts is defined. In other words, the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit. The prediction tree includes one or a plurality of prediction units obtained by the above-described division. Hereinafter, a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”. The sub block is composed of a plurality of pixels. When the sizes of the prediction unit and the sub-block are equal, the number of sub-blocks in the prediction unit is one. If the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 × 8 and the sub-block is 4 × 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.

予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。   The prediction process may be performed for each prediction unit (sub-block).

予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。   Broadly speaking, there are two types of division in the prediction tree: intra prediction and inter prediction. Intra prediction is prediction within the same picture, and inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).

イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。   In the case of intra prediction, there are 2Nx2N (the same size as the coding unit) and NxN division methods.

また、インター予測の場合、分割方法は、符号化データのPU分割モード(part_mode)により符号化され、2Nx2N(符号化ユニットと同一サイズ)、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNなどがある。なお、2NxN、Nx2Nは1:1の対称分割を示し、2NxnU、2NxnDおよびnLx2N、nRx2Nは、1:3、3:1の非対称分割を示す。CUに含まれるPUを順にPU0、PU1、PU2、PU3と表現する。   Also, in the case of inter prediction, the division method is encoded by the PU division mode (part_mode) of encoded data, 2Nx2N (same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc. 2NxN and Nx2N indicate 1: 1 symmetrical division, and 2NxnU, 2NxnD and nLx2N and nRx2N indicate 1: 3 and 3: 1 asymmetric division. The PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.

図2の(a)〜(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。   2A to 2H specifically illustrate the shape of the partition (the position of the boundary of the PU partition) in each PU partition mode.

また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。   In the transform tree, the encoding unit is divided into one or a plurality of transform units, and the position and size of each transform unit are defined. In other words, a transform unit is one or more non-overlapping areas that make up a coding unit. The conversion tree includes one or a plurality of conversion units obtained by the above division.

変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。   There are two types of division in the conversion tree: one in which an area having the same size as that of the encoding unit is allocated as a conversion unit, and the other in division by recursive quadtree division as in the above-described CU division.

変換処理は、この変換ユニットごとに行われる。   The conversion process is performed for each conversion unit.

(予測パラメータ)
予測ユニット(PU:Prediction Unit)の予測画像は、PUに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測の予測パラメータもしくはインター予測の予測パラメータがある。以下、インター予測の予測パラメータ(インター予測パラメータ)について説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0、predFlagL1と、参照ピクチャインデックスrefIdxL0、refIdxL1と、動きベクトルmvL0、mvL1から構成される。予測リスト利用フラグpredFlagL0、predFlagL1は、各々L0リスト、L1リストと呼ばれる参照ピクチャリストが用いられるか否かを示すフラグであり、値が1の場合に対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
(Prediction parameter)
A prediction image of a prediction unit (PU: Prediction Unit) is derived from a prediction parameter associated with the PU. The prediction parameters include a prediction parameter for intra prediction or a prediction parameter for inter prediction. Hereinafter, prediction parameters for inter prediction (inter prediction parameters) will be described. The inter prediction parameter includes prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1. The prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists called L0 list and L1 list are used, respectively, and a reference picture list corresponding to a value of 1 is used. In this specification, when “flag indicating whether or not it is XX” is described, when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter). However, other values can be used as true values and false values in an actual apparatus or method.

符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、フラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idマージc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。   Syntax elements for deriving inter prediction parameters included in the encoded data include, for example, PU partition mode part_mode, flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_id merge c, reference picture index refIdxLX, prediction vector index mvp_LX_idx There is a difference vector mvdLX.

(参照ピクチャリスト)
参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図3は、参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。図3(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図3(b)に、参照ピクチャリストの例を示す。参照ピクチャリストは、参照ピクチャの候補を表すリストであり、1つのピクチャ(スライス)が1つ以上の参照ピクチャリストを有してもよい。図の例では、対象ピクチャB3は、L0リストRefPicList0およびL1リストRefPicList1の2つの参照ピクチャリストを持つ。対象ピクチャがB3の場合の参照ピクチャは、I0、P1、B2であり、参照ピクチャはこれらのピクチャを要素として持つ。個々の予測ユニットでは、参照ピクチャリストRefPicListX中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図では、refIdxL0およびrefIdxL1により参照ピクチャP1とB2が参照される例を示す。
(Reference picture list)
The reference picture list is a list including reference pictures stored in the reference picture memory 306. FIG. 3 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. In FIG. 3A, a rectangle is a picture, an arrow is a picture reference relationship, a horizontal axis is time, I, P, and B in the rectangle are intra pictures, uni-predictive pictures, bi-predictive pictures, and numbers in the rectangles are decoded. Show the order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, and B4, and the display order is I0, B3, B2, B4, and P1. FIG. 3B shows an example of the reference picture list. The reference picture list is a list representing candidate reference pictures, and one picture (slice) may have one or more reference picture lists. In the illustrated example, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. When the target picture is B3, the reference pictures are I0, P1, and B2, and the reference picture has these pictures as elements. In each prediction unit, which picture in the reference picture list RefPicListX is actually referred to is specified by the reference picture index refIdxLX. The figure shows an example in which reference pictures P1 and B2 are referenced by refIdxL0 and refIdxL1.

(マージ予測とAMVP予測)
予測パラメータの復号(符号化)方法には、マージ予測(merge)モードとAMVP(Adaptive Motion Vector Prediction、適応動きベクトル予測)モードがある、マージフラグmerge_flagは、これらを識別するためのフラグである。マージ予測モードは、予測リスト利用フラグpredFlagLX(またはインター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍PUの予測パラメータから導出するモードであり、AMVPモードは、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めるモードである。なお、動きベクトルmvLXは、予測ベクトルmvpLXを識別する予測ベクトルインデックスmvp_LX_idxと差分ベクトルmvdLXとして符号化される。
(Merge prediction and AMVP prediction)
The prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode. The merge flag merge_flag is a flag for identifying these. The merge prediction mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data and are derived from the prediction parameters of already processed neighboring PUs, The AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data. The motion vector mvLX is encoded as a prediction vector index mvp_LX_idx for identifying the prediction vector mvpLX and a difference vector mvdLX.

インター予測識別子inter_pred_idcは、参照ピクチャの種類および数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストの参照ピクチャリストで管理された参照ピクチャを用いることを示し、1枚の参照ピクチャを用いること(単予測)を示す。PRED_BIは2枚の参照ピクチャを用いること(双予測BiPred)を示し、L0リストとL1リストで管理された参照ピクチャを用いる。予測ベクトルインデックスmvp_LX_idxは予測ベクトルを示すインデックスであり、参照ピクチャインデックスrefIdxLXは、参照ピクチャリストで管理された参照ピクチャを示すインデックスである。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。   The inter prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate that reference pictures managed by reference picture lists of the L0 list and the L1 list are used, respectively, and that one reference picture is used (single prediction). PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and reference pictures managed by the L0 list and the L1 list are used. The prediction vector index mvp_LX_idx is an index indicating a prediction vector, and the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list. Note that LX is a description method used when L0 prediction and L1 prediction are not distinguished from each other. By replacing LX with L0 and L1, parameters for the L0 list and parameters for the L1 list are distinguished.

マージインデックスmerge_idxは、処理が完了したPUから導出される予測パラメータ候補(マージ候補)のうち、いずれかの予測パラメータを復号対象PUの予測パラメータとして用いるかを示すインデックスである。   The merge index merge_idx is an index indicating whether any prediction parameter is used as a prediction parameter of a decoding target PU among prediction parameter candidates (merge candidates) derived from a PU for which processing has been completed.

(動きベクトル)
動きベクトルmvLXは、異なる2つのピクチャ上のブロック間のずれ量を示す。動きベクトルmvLXに関する予測ベクトル、差分ベクトルを、それぞれ予測ベクトルmvpLX、差分ベクトルmvdLXと呼ぶ。
(Motion vector)
The motion vector mvLX indicates a shift amount between blocks on two different pictures. A prediction vector and a difference vector related to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.

(インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
インター予測識別子inter_pred_idcと、予測リスト利用フラグpredFlagL0、predFlagL1の関係は以下のとおりであり、相互に変換可能である。
(Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX)
The relationship between the inter prediction identifier inter_pred_idc and the prediction list use flags predFlagL0 and predFlagL1 is as follows and can be converted into each other.

inter_pred_idc = (predFlagL1<<1) + predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
なお、インター予測パラメータは、予測リスト利用フラグを用いても良いし、インター予測識別子を用いてもよい。また、予測リスト利用フラグを用いた判定は、インター予測識別子を用いた判定に置き替えてもよい。逆に、インター予測識別子を用いた判定は、予測リスト利用フラグを用いた判定に置き替えてもよい。
inter_pred_idc = (predFlagL1 << 1) + predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
Note that a prediction list use flag or an inter prediction identifier may be used as the inter prediction parameter. Further, the determination using the prediction list use flag may be replaced with the determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with the determination using the prediction list use flag.

(画像復号装置の構成)
次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312を含んで構成される。
(Configuration of image decoding device)
Next, the configuration of the image decoding device 31 according to the present embodiment will be described. FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment. The image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely. A quantization / inverse transform unit 311 and an adder 312 are included.

また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。   The prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304. The predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.

エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測情報および、差分画像を生成するための残差情報などがある。   The entropy decoding unit 301 performs entropy decoding on an encoded stream Te input from the outside, and separates and decodes individual codes (syntax elements). The separated codes include prediction information for generating a prediction image and residual information for generating a difference image.

エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化係数を逆量子化・逆変換部311に出力する。この量子化係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)、KLT(Karyhnen Loeve Transform、カルーネンレーベ変換)等の周波数変換を行い量子化して得られる係数である。   The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. Some of the separated codes are, for example, a prediction mode predMode, a PU partition mode part_mode, a merge flag merge_flag, a merge index merge_idx, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX. Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantized coefficient to the inverse quantization / inverse transform unit 311. In the coding process, this quantization coefficient is applied to the residual signal by DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karyhnen Loeve Transform) It is a coefficient obtained by performing frequency conversion such as

インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。   Based on the code input from the entropy decoding unit 301, the inter prediction parameter decoding unit 303 refers to the prediction parameter stored in the prediction parameter memory 307 and decodes the inter prediction parameter.

インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。インター予測パラメータ復号部303の詳細については後述する。   The inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.

イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータとは、CUを1つのピクチャ内で予測する処理で用いるパラメータ、例えば、イントラ予測モードIntraPredModeである。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。   Based on the code input from the entropy decoding unit 301, the intra prediction parameter decoding unit 304 refers to the prediction parameter stored in the prediction parameter memory 307 and decodes the intra prediction parameter. The intra prediction parameter is a parameter used in a process of predicting a CU within one picture, for example, an intra prediction mode IntraPredMode. The intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.

イントラ予測パラメータ復号部304は、輝度と色差で異なるイントラ予測モードを導出しても良い。この場合、イントラ予測パラメータ復号部304は、輝度の予測パラメータとして輝度予測モードIntraPredModeY、色差の予測パラメータとして、色差予測モードIntraPredModeCを復号する。輝度予測モードIntraPredModeYは、35モードであり、プレーナ予測(0)、DC予測(1)、方向予測(2〜34)が対応する。色差予測モードIntraPredModeCは、プレーナ予測(0)、DC予測(1)、方向予測(2〜34)、LMモード(35)の何れかを用いるものである。イントラ予測パラメータ復号部304は、IntraPredModeCは輝度モードと同じモードであるか否かを示すフラグを復号し、フラグが輝度モードと同じモードであることを示せば、IntraPredModeCにIntraPredModeYを割り当て、フラグが輝度モードと異なるモードであることを示せば、IntraPredModeCとして、プレーナ予測(0)、DC予測(1)、方向予測(2〜34)、LMモード(35)を復号しても良い。   The intra prediction parameter decoding unit 304 may derive different intra prediction modes depending on the luminance and color difference. In this case, the intra prediction parameter decoding unit 304 decodes the luminance prediction mode IntraPredModeY as the luminance prediction parameter and the color difference prediction mode IntraPredModeC as the color difference prediction parameter. The luminance prediction mode IntraPredModeY is a 35 mode, and corresponds to planar prediction (0), DC prediction (1), and direction prediction (2 to 34). The color difference prediction mode IntraPredModeC uses any one of the planar prediction (0), the DC prediction (1), the direction prediction (2 to 34), and the LM mode (35). The intra prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the luminance mode. If the flag indicates that the mode is the same as the luminance mode, IntraPredModeC is assigned to IntraPredModeC, and the flag indicates luminance. If the mode is different from the mode, planar prediction (0), DC prediction (1), direction prediction (2 to 34), and LM mode (35) may be decoded as IntraPredModeC.

ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。   The loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.

参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCU毎に予め定めた位置に記憶する。   The reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each decoding target picture and CU.

予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。   The prediction parameter memory 307 stores the prediction parameter at a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, the prediction parameter memory 307 stores the inter prediction parameter decoded by the inter prediction parameter decoding unit 303, the intra prediction parameter decoded by the intra prediction parameter decoding unit 304, and the prediction mode predMode separated by the entropy decoding unit 301. . The stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.

予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、入力された予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてPUもしくはサブブロックの予測画像を生成する。   The prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301, and also receives prediction parameters from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of a PU or sub-block using the input prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode.

ここで、予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてインター予測によりPUもしくはサブブロックの予測画像を生成する。   Here, when the prediction mode predMode indicates the inter prediction mode, the inter prediction image generation unit 309 uses the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture (reference picture block). To generate a prediction image of a PU or sub-block.

インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。ここで、参照ピクチャブロックとは、参照ピクチャ上の画素の集合(通常矩形であるのでブロックと呼ぶ)であり、PUもしくはサブブロックの予測画像を生成するために参照する領域である。   The inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1. The reference picture block at the position indicated by mvLX is read from the reference picture memory 306. The inter prediction image generation unit 309 performs prediction based on the read reference picture block to generate a prediction image of the PU. The inter prediction image generation unit 309 outputs the generated prediction image of the PU to the addition unit 312. Here, a reference picture block is a set of pixels on a reference picture (usually called a block because it is a rectangle), and is an area that is referred to in order to generate a predicted image of a PU or sub-block.

予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照ピクチャを用いてイントラ予測を行う。具体的には、イントラ予測画像生成部310は、復号対象のピクチャであって、既に復号されたPUのうち、復号対象PUから予め定めた範囲にある隣接PUを参照ピクチャメモリ306から読み出す。予め定めた範囲とは、復号対象PUがいわゆるラスタースキャンの順序で順次移動する場合、例えば、左、左上、上、右上の隣接PUのうちのいずれかであり、イントラ予測モードによって異なる。ラスタースキャンの順序とは、各ピクチャにおいて、上端から下端まで各行について、順次左端から右端まで移動させる順序である。   When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the read reference picture. Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded. The predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode. The raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.

イントラ予測画像生成部310は、読み出した隣接PUに基づいてイントラ予測モードIntraPredModeが示す予測モードで予測を行ってPUの予測画像を生成する。イントラ予測画像生成部310は、生成したPUの予測画像を加算部312に出力する。   The intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode based on the read adjacent PU, and generates a predicted image of the PU. The intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.

逆量子化・逆変換部311は、エントロピー復号部301から入力された量子化係数を逆量子化して変換係数を求める。逆量子化・逆変換部311は、求めた変換係数について逆DCT、逆DST、逆KLT等の逆周波数変換を行い、残差信号を算出する。逆量子化・逆変換部311は、算出した残差信号を加算部312に出力する。   The inverse quantization / inverse transform unit 311 performs inverse quantization on the quantization coefficient input from the entropy decoding unit 301 to obtain a transform coefficient. The inverse quantization / inverse transform unit 311 performs inverse frequency transform such as inverse DCT, inverse DST, and inverse KLT on the obtained transform coefficient, and calculates a residual signal. The inverse quantization / inverse transform unit 311 outputs the calculated residual signal to the adder 312.

加算部312は、インター予測画像生成部309またはイントラ予測画像生成部310から入力されたPUの予測画像と逆量子化・逆変換部311から入力された残差信号を画素毎に加算して、PUの復号画像を生成する。加算部312は、生成したPUの復号画像を参照ピクチャメモリ306に記憶し、生成したPUの復号画像をピクチャ毎に統合した復号画像Tdを外部に出力する。   The addition unit 312 adds the prediction image of the PU input from the inter prediction image generation unit 309 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse conversion unit 311 for each pixel, Generate a decoded PU image. The adding unit 312 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td obtained by integrating the generated decoded image of the PU for each picture to the outside.

(インター予測パラメータ復号部の構成)
次に、インター予測パラメータ復号部303の構成について説明する。
(Configuration of inter prediction parameter decoding unit)
Next, the configuration of the inter prediction parameter decoding unit 303 will be described.

図12は、本実施形態に係るインター予測パラメータ復号部303の構成を示す概略図である。インター予測パラメータ復号部303は、インター予測パラメータ復号制御部3031、AMVP予測パラメータ導出部3032、加算部3038、マージ予測パラメータ導出部3036およびサブブロック予測パラメータ導出部3037を含んで構成される。   FIG. 12 is a schematic diagram illustrating a configuration of the inter prediction parameter decoding unit 303 according to the present embodiment. The inter prediction parameter decoding unit 303 includes an inter prediction parameter decoding control unit 3031, an AMVP prediction parameter derivation unit 3032, an addition unit 3038, a merge prediction parameter derivation unit 3036, and a sub-block prediction parameter derivation unit 3037.

インター予測パラメータ復号制御部3031は、インター予測に関連する符号(シンタックス要素)の復号をエントロピー復号部301に指示し、符号化データに含まれる符号(シンタックス要素)、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXを抽出する。   The inter prediction parameter decoding control unit 3031 instructs the entropy decoding unit 301 to decode a code (syntax element) related to inter prediction, and a code (syntax element) included in the encoded data, for example, PU partition mode part_mode , Merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, and difference vector mvdLX are extracted.

インター予測パラメータ復号制御部3031は、まず、マージフラグmerge_flagを抽出する。インター予測パラメータ復号制御部3031が、あるシンタックス要素を抽出すると表現する場合は、あるシンタックス要素の復号をエントロピー復号部301に指示し、該当のシンタックス要素を符号化データから読み出すことを意味する。   The inter prediction parameter decoding control unit 3031 first extracts a merge flag merge_flag. When the inter prediction parameter decoding control unit 3031 expresses that a certain syntax element is to be extracted, it means that the entropy decoding unit 301 is instructed to decode a certain syntax element, and the corresponding syntax element is read from the encoded data. To do.

マージフラグmerge_flagが0、すなわち、AMVP予測モードを示す場合、インター予測パラメータ復号制御部3031は、エントロピー復号部301を用いて符号化データからAMVP予測パラメータを抽出する。AMVP予測パラメータとして、例えば、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。AMVP予測パラメータ導出部3032は予測ベクトルインデックスmvp_LX_idxから予測ベクトルmvpLXを導出する。詳細は後述する。インター予測パラメータ復号制御部3031は、差分ベクトルmvdLXを加算部3038に出力する。加算部3038では、予測ベクトルmvpLXと差分ベクトルmvdLXを加算し、動きベクトルを導出する。   When the merge flag merge_flag is 0, that is, indicates the AMVP prediction mode, the inter prediction parameter decoding control unit 3031 uses the entropy decoding unit 301 to extract AMVP prediction parameters from the encoded data. Examples of AMVP prediction parameters include an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX. The AMVP prediction parameter derivation unit 3032 derives a prediction vector mvpLX from the prediction vector index mvp_LX_idx. Details will be described later. The inter prediction parameter decoding control unit 3031 outputs the difference vector mvdLX to the addition unit 3038. The adding unit 3038 adds the prediction vector mvpLX and the difference vector mvdLX to derive a motion vector.

マージフラグmerge_flagが1、すなわち、マージ予測モードを示す場合、インター予測パラメータ復号制御部3031は、マージ予測に係る予測パラメータとして、マージインデックスmerge_idxを抽出する。インター予測パラメータ復号制御部3031は、抽出したマージインデックスmerge_idxをマージ予測パラメータ導出部3036(詳細は後述する)に出力し、サブブロック予測モードフラグsubPbMotionFlagをサブブロック予測パラメータ導出部3037に出力する。サブブロック予測パラメータ導出部3037は、サブブロック予測モードフラグsubPbMotionFlagの値に応じて、PUを複数のサブブロックに分割し、サブブロック単位で動きベクトルを導出する。すなわち、サブブロック予測モードでは、予測ブロックは4x4もしくは8x8という小さいブロック単位で予測される。後述の画像符号化装置11においては、CUを複数のパーティション(2NxN、Nx2N、NxNなどのPU)に分割し、パーティション単位で予測パラメータのシンタックスを符号化する方法に対して、サブブロック予測モードでは複数のサブブロックを集合(セット)にまとめ、当該集合毎に予測パラメータのシンタックスを符号化するため、少ない符号量で多くのサブブロックの動き情報を符号化することができる。   When the merge flag merge_flag is 1, that is, indicates the merge prediction mode, the inter prediction parameter decoding control unit 3031 extracts the merge index merge_idx as a prediction parameter related to merge prediction. The inter prediction parameter decoding control unit 3031 outputs the extracted merge index merge_idx to the merge prediction parameter derivation unit 3036 (details will be described later), and outputs the sub-block prediction mode flag subPbMotionFlag to the sub-block prediction parameter derivation unit 3037. The subblock prediction parameter deriving unit 3037 divides the PU into a plurality of subblocks according to the value of the subblock prediction mode flag subPbMotionFlag, and derives a motion vector in units of subblocks. That is, in the sub-block prediction mode, the prediction block is predicted in units of blocks as small as 4x4 or 8x8. In the image encoding device 11 to be described later, a sub-block prediction mode is used for a method in which a CU is divided into a plurality of partitions (PUs such as 2NxN, Nx2N, and NxN) and the syntax of prediction parameters is encoded in units of partitions. Since a plurality of sub-blocks are grouped into a set and the syntax of the prediction parameter is encoded for each set, motion information of a large number of sub-blocks can be encoded with a small amount of code.

詳細に説明すると、サブブロック予測パラメータ導出部3037は、サブブロック予測モードにてサブブロック予測を行う、時空間サブブロック予測部30371、マッチング動き導出部30373、の少なくとも一つを備える。   More specifically, the sub-block prediction parameter derivation unit 3037 includes at least one of a spatio-temporal sub-block prediction unit 30371 and a matching motion derivation unit 30373 that perform sub-block prediction in the sub-block prediction mode.

(サブブロック予測モードフラグ)
ここで、画像復号装置31、画像符号化装置11(詳細は後述する)における、あるPUの予測モードがサブブロック予測モードであるか否かを示すサブブロック予測モードフラグsubPbMotionFlagの導出方法について説明する。画像復号装置31、画像符号化装置11は、後述する空間サブブロック予測SSUB、時間サブブロック予測TSUB、マッチング動き導出MATのいずれを用いたかに基づいて、サブブロック予測モードフラグsubPbMotionFlagを導出する。たとえば、あるPUで選択された予測モードをN(たとえばNは選択されたマージ候補を示すラベル)とした場合には、以下の式によりサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。
(Subblock prediction mode flag)
Here, a method for deriving a sub-block prediction mode flag subPbMotionFlag indicating whether a prediction mode of a certain PU is a sub-block prediction mode in the image decoding device 31 and the image encoding device 11 (details will be described later) will be described. . The image decoding device 31 and the image encoding device 11 derive a sub-block prediction mode flag subPbMotionFlag based on which of later-described spatial sub-block prediction SSUB, temporal sub-block prediction TSUB, and matching motion derivation MAT is used. For example, when the prediction mode selected by a certain PU is N (for example, N is a label indicating the selected merge candidate), the sub-block prediction mode flag subPbMotionFlag may be derived by the following equation.

subPbMotionFlag = (N == TSUB) || (N == SSUB) || (N == MAT)
ここで||は、論理和を示す(以下同様)。
subPbMotionFlag = (N == TSUB) || (N == SSUB) || (N == MAT)
Here, || represents a logical sum (the same applies hereinafter).

また、画像復号装置31、画像符号化装置11は、空間サブブロック予測SSUB、時間サブブロック予測TSUB、マッチング動き導出MATのうち、一部の予測を行う構成でもよい。。すなわち、画像復号装置31、画像符号化装置11が空間サブブロック予測SSUBを行う構成である場合には、以下のようにサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。   The image decoding device 31 and the image encoding device 11 may be configured to perform some predictions among the spatial sub-block prediction SSUB, the temporal sub-block prediction TSUB, and the matching motion derivation MAT. . That is, when the image decoding device 31 and the image encoding device 11 are configured to perform spatial subblock prediction SSUB, the subblock prediction mode flag subPbMotionFlag may be derived as follows.

subPbMotionFlag = (N == SSUB))
(サブブロック予測部)
次に、サブブロック予測部について説明する。
subPbMotionFlag = (N == SSUB))
(Sub-block prediction unit)
Next, the sub-block prediction unit will be described.

(時空間サブブロック予測部30371)
時空間サブブロック予測部30371は、時間的に対象PUに隣接する参照画像上(たとえば直前のピクチャ)のPUの動きベクトル、もしくは、空間的に対象PUに隣接するPUの動きベクトルから、対象PUを分割して得られるサブブロックの動きベクトルを導出する。具体的には、参照画像上のPUの動きベクトルを対象PUが参照する参照ピクチャに合わせてスケーリングすることにより、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW / nSbW - 1、j=0, 1, 2,・・・,nPbH / nSbH - 1)を導出する(時間サブブロック予測)。ここで、(xPb, yPb)は対象PUの左上座標、nPbW, nPbHは対象PUのサイズ、nSbW, nSbHはサブブロックのサイズである。
(Spatio-temporal sub-block prediction unit 30371)
The spatio-temporal sub-block prediction unit 30371 calculates the target PU from the motion vector of the PU on the reference image temporally adjacent to the target PU (for example, the immediately preceding picture) or the motion vector of the PU spatially adjacent to the target PU. The motion vector of the sub-block obtained by dividing is derived. Specifically, the motion vector spMvLX [xi] [yi] (xi = xPb) of each sub-block in the target PU is scaled by matching the motion vector of the PU on the reference image with the reference picture referenced by the target PU. + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ..., nPbH / nSbH-1) Derived (temporal sub-block prediction). Here, (xPb, yPb) is the upper left coordinate of the target PU, nPbW, nPbH are the size of the target PU, and nSbW, nSbH are the sizes of the sub-blocks.

また、対象PUに隣接するPUの動きベクトルと、対象PUを分割して得られるサブブロックとの距離に応じて、加重平均を計算することで、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW / nSbW - 1、j=0, 1, 2,・・・,nPbH / nSbH - 1)を導出してもよい(空間サブブロック予測)。   Also, by calculating a weighted average according to the distance between the motion vector of the PU adjacent to the target PU and the sub-block obtained by dividing the target PU, the motion vector spMvLX [ xi] [yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ... , NPbH / nSbH-1) may be derived (spatial sub-block prediction).

上記、時間サブブロック予測の候補TSUB、空間サブブロック予測の候補SSUBを、マージモードの一つのモード(マージ候補)として選択する。   The temporal sub-block prediction candidate TSUB and the spatial sub-block prediction candidate SSUB are selected as one mode (merge candidate) of the merge mode.

(マッチング動き導出部30373)
マッチング動き導出部30373は、バイラテラルマッチングまたはテンプレートマッチングの何れかのマッチング処理を行うことにより、PUを構成するブロック又はサブブロックの動きベクトルspMvLXを導出する。図13は、(a)バイラテラルマッチング(Bilateral matching)、(b)テンプレートマッチング(Template matching)を説明するための図である。マッチング動き導出モードは、マージモードの一つのマージ候補(マッチング候補)として選択される。
(Matching motion deriving unit 30373)
The matching motion deriving unit 30373 derives a motion vector spMvLX of a block or sub-block constituting the PU by performing a matching process of either bilateral matching or template matching. FIG. 13 is a diagram for explaining (a) bilateral matching and (b) template matching. The matching motion derivation mode is selected as one merge candidate (matching candidate) in the merge mode.

マッチング動き導出部30373は、物体が等速運動をすると仮定して、複数の参照画像における領域のマッチングにより動きベクトルを導出する。バイラテラルマッチングでは、ある物体が、参照画像Aのある領域、対象ピクチャCur_Picの対象PU、参照画像Bのある領域を等速運動で通過するものと仮定して、参照画像A、B間のマッチングにより対象PUの動きベクトルを導出する。テンプレートマッチングでは、対象PUの隣接領域と対象PUの動きベクトルが等しいと仮定して、対象PUの隣接領域Temp_Cur(テンプレート)と参照ピクチャ上の参照ブロックの隣接領域Temp_L0の動き補償画像のマッチングにより動きベクトルを導出する。マッチング動き導出部では、対象PUを複数のサブブロックに分割し、分割したサブブロック単位で後述のバイラテラルマッチングもしくはテンプレートマッチングを行うことにより、サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW / nSbW - 1、j=0, 1, 2,・・・,nPbH / nSbH - 1)を導出する。   The matching motion deriving unit 30373 derives a motion vector by matching regions in a plurality of reference images, assuming that the object moves at a constant velocity. In bilateral matching, it is assumed that a certain object passes through a certain region of the reference image A, a target PU of the target picture Cur_Pic, and a certain region of the reference image B with constant velocity motion, and matching between the reference images A and B To derive the motion vector of the target PU. In template matching, it is assumed that the motion vector of the target PU adjacent region and the target PU are equal, and motion is performed by matching motion compensated images between the target PU adjacent region Temp_Cur (template) and the reference block adjacent region Temp_L0 on the reference picture. Derive a vector. The matching motion derivation unit divides the target PU into a plurality of sub-blocks, and performs bilateral matching or template matching (to be described later) in units of the divided sub-blocks, thereby sub-block motion vectors spMvLX [xi] [yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ..., nPbH / nSbH-1 ) Is derived.

図13の(b)は、上記マッチング処理のうち、テンプレートマッチング(Template matching)について説明するための図である。   FIG. 13B is a diagram for explaining template matching among the above matching processes.

図13の(b)に示すように、テンプレートマッチングでは、対象ピクチャCur_PicにおけるサブブロックCur_blockの動きベクトルを導出するために、一度に1枚の参照ピクチャが参照される。   As shown in FIG. 13B, in template matching, one reference picture is referred to at a time in order to derive a motion vector of the sub-block Cur_block in the current picture Cur_Pic.

より具体的には、まず、例えば参照ピクチャインデックスrefIdxL0によって指定される参照画像Ref0(参照ピクチャAと呼ぶ)内の領域であって、
(xPos,yPos)=(xCur + MV0_x, yCur + MV0_y)
によって特定される左上座標(xPos, yPos)を有する参照ブロックBlock_Aが特定される。ここで、(xCur, yCur)は、サブブロックCur_blockの左上座標である。
More specifically, first, for example, an area in a reference image Ref0 (referred to as reference picture A) designated by a reference picture index refIdxL0,
(XPos, yPos) = (xCur + MV0_x, yCur + MV0_y)
The reference block Block_A having the upper left coordinates (xPos, yPos) specified by is specified. Here, (xCur, yCur) is the upper left coordinate of the sub-block Cur_block.

次に、対象ピクチャCur_PicにおいてサブブロックCur_blockに隣接したテンプレート領域Temp_Curと、参照ピクチャAにおいてBlock_Aに隣接したテンプレート領域Temp_L0とが設定される。図13の(b)に示す例において、テンプレート領域Temp_Curは、サブブロックCur_blockの上側に隣接する領域及びサブブロックCur_blockの左側に隣接する領域とから構成されている。また、テンプレート領域Temp_L0は、Block_Aの上側に隣接する領域及びBlock_Aの左側に隣接する領域とから構成されている。   Next, template region Temp_Cur adjacent to sub-block Cur_block in target picture Cur_Pic and template region Temp_L0 adjacent to Block_A in reference picture A are set. In the example illustrated in FIG. 13B, the template region Temp_Cur is configured by a region adjacent to the upper side of the sub-block Cur_block and a region adjacent to the left side of the sub-block Cur_block. The template area Temp_L0 is composed of an area adjacent to the upper side of Block_A and an area adjacent to the left side of Block_A.

次にTemp_CurとTempL0とのマッチングコストが最小になる(MV0_x,MV0_y)が決定され、サブブロックに付与される動きベクトルspMvL0となる。   Next, it is determined (MV0_x, MV0_y) that minimizes the matching cost between Temp_Cur and TempL0, and becomes the motion vector spMvL0 assigned to the sub-block.

なお、テンプレートマッチングでは、参照画像Ref0とは異なる参照画像Ref1に対して同様の処理を行ってもよい。この場合、参照ピクチャインデックスrefIdxL1によって指定される参照画像Ref1(参照ピクチャAと呼ぶ)内の領域であって、
(xPos,yPos)=(xCur + MV1_x, yCur + MV1_y)
によって特定される左上座標(xPos, yPos)を有する参照ブロックBlock_Aが特定され、参照ピクチャAにおいてBlock_Aに隣接したテンプレート領域Temp_L1とが設定される。
最終的にTemp_CurとTempL1とのマッチングコストが最小になる(MV1_x,MV1_y)が決定され、サブブロックに付与される動きベクトルspMvL1となる。
In the template matching, the same processing may be performed on the reference image Ref1 different from the reference image Ref0. In this case, an area in the reference image Ref1 (referred to as reference picture A) designated by the reference picture index refIdxL1,
(XPos, yPos) = (xCur + MV1_x, yCur + MV1_y)
The reference block Block_A having the upper left coordinates (xPos, yPos) specified by is specified, and the template area Temp_L1 adjacent to Block_A in the reference picture A is set.
Finally, it is determined (MV1_x, MV1_y) that minimizes the matching cost between Temp_Cur and TempL1, and becomes the motion vector spMvL1 assigned to the sub-block.

また、テンプレートマッチングでも、2枚の参照画像Ref0、Ref1に対して処理してもよい。この場合、上記に説明した1枚の参照画像Ref0のマッチングと、1枚の参照画像Ref1のマッチングを順に行う。   Also, template matching may be performed on two reference images Ref0 and Ref1. In this case, the matching of one reference image Ref0 and the matching of one reference image Ref1 described above are sequentially performed.

図7は、本実施形態に係るマージ予測パラメータ導出部3036の構成を示す概略図である。マージ予測パラメータ導出部3036は、マージ候補導出部30361とマージ候補選択部30362、マージ候補格納部30363を備える。マージ候補格納部30363は、マージ候補導出部30361から入力されたマージ候補を格納する。なお、マージ候補は、予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLXを含んで構成されている。マージ候補格納部30363において、格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。   FIG. 7 is a schematic diagram illustrating a configuration of the merge prediction parameter deriving unit 3036 according to the present embodiment. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361, a merge candidate selection unit 30362, and a merge candidate storage unit 30363. The merge candidate storage unit 30363 stores the merge candidates input from the merge candidate derivation unit 30361. The merge candidate includes a prediction list use flag predFlagLX, a motion vector mvLX, and a reference picture index refIdxLX. In the merge candidate storage unit 30363, an index is assigned to the stored merge candidate according to a predetermined rule.

マージ候補導出部30361は、すでに復号処理が行われた隣接PUの動きベクトルと参照ピクチャインデックスrefIdxLXをそのまま用いてマージ候補を導出する。   The merge candidate derivation unit 30361 derives a merge candidate using the motion vector of the adjacent PU that has already been decoded and the reference picture index refIdxLX as they are.

(空間マージ候補導出処理)
空間マージ候補導出処理として、マージ候補導出部30361は、所定の規則に従って、予測パラメータメモリ307が記憶している予測パラメータ(予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLX)を読み出し、読み出した予測パラメータをマージ候補として導出する。読み出される予測パラメータは、復号対象PUから予め定めた範囲内にあるPU(例えば、復号対象PUの左下端、左上端、右上端にそれぞれ接するPUの全部または一部)のそれぞれに係る予測パラメータである。
(Spatial merge candidate derivation process)
As the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads and reads the prediction parameters (prediction list use flag predFlagLX, motion vector mvLX, reference picture index refIdxLX) stored in the prediction parameter memory 307 according to a predetermined rule. The predicted parameters are derived as merge candidates. The prediction parameter to be read is a prediction parameter related to each of the PUs within a predetermined range from the decoding target PU (for example, all or part of the PUs in contact with the lower left end, the upper left end, and the upper right end of the decoding target PU, respectively). is there.

(時間マージ候補導出処理)
時間マージ導出処理として、マージ候補導出部30361は、復号対象PUの右下の座標を含む参照画像中のPUの予測パラメータを予測パラメータメモリ307から読みだしマージ候補とする。参照画像の指定方法は、例えば、スライスヘッダにおいて指定された参照ピクチャインデックスrefIdxLXでも良いし、復号対象PUに隣接するPUの参照ピクチャインデックスrefIdxLXのうち最小のものを用いて指定しても良い。
(Time merge candidate derivation process)
As the temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameter of the PU in the reference image including the lower right coordinate of the decoding target PU from the prediction parameter memory 307 and sets it as a merge candidate. The reference picture designation method may be, for example, the reference picture index refIdxLX designated in the slice header, or may be designated using the smallest reference picture index refIdxLX of the PU adjacent to the decoding target PU.

マージ候補選択部30362は、マージ候補格納部30363に格納されているマージ候補のうち、インター予測パラメータ復号制御部3031から入力されたマージインデックスmerge_idxに対応するインデックスが割り当てられたマージ候補を、対象PUのインター予測パラメータとして選択する。マージ候補選択部30362は選択したマージ候補を予測パラメータメモリ307に記憶するとともに、予測画像生成部308に出力する。   The merge candidate selection unit 30362 selects, from the merge candidates stored in the merge candidate storage unit 30363, a merge candidate to which an index corresponding to the merge index merge_idx input from the inter prediction parameter decoding control unit 3031 is assigned. As an inter prediction parameter. The merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs it to the prediction image generation unit 308.

図9は、本実施形態に係るAMVP予測パラメータ導出部3032の構成を示す概略図である。AMVP予測パラメータ導出部3032は、ベクトル候補導出部3033とベクトル候補選択部3034、およびベクトル候補格納部3035を備える。ベクトル候補導出部3033は、参照ピクチャインデックスrefIdxに基づいて予測パラメータメモリ307が記憶する既に処理済みのPUの動きベクトルmvLXから予測ベクトル候補を導出し、ベクトル候補格納部3035予測ベクトル候補リストmvpListLX[]に格納する。   FIG. 9 is a schematic diagram illustrating a configuration of the AMVP prediction parameter derivation unit 3032 according to the present embodiment. The AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033, a vector candidate selection unit 3034, and a vector candidate storage unit 3035. The vector candidate derivation unit 3033 derives a prediction vector candidate from the already processed PU motion vector mvLX stored in the prediction parameter memory 307 based on the reference picture index refIdx, and the vector candidate storage unit 3035 prediction vector candidate list mvpListLX [] To store.

ベクトル候補選択部3034は、予測ベクトル候補リストmvpListLX[]の予測ベクトル候補のうち予測ベクトルインデックスmvp_LX_idxが示す動きベクトルmvpListLX[mvp_LX_idx]を予測ベクトルmvpLXとして選択する。ベクトル候補選択部3034は、選択した予測ベクトルmvpLXを加算部3038に出力する。   The vector candidate selection unit 3034 selects the motion vector mvpListLX [mvp_LX_idx] indicated by the prediction vector index mvp_LX_idx from the prediction vector candidates in the prediction vector candidate list mvpListLX [] as the prediction vector mvpLX. The vector candidate selection unit 3034 outputs the selected prediction vector mvpLX to the addition unit 3038.

なお、予測ベクトル候補は、復号処理が完了したPUであって、復号対象PUから予め定めた範囲のPU(例えば、隣接PU)の動きベクトルをスケーリングすることで導出する。なお、隣接PUは、復号対象PUに空間的に隣接するPU、例えば、左PU、上PUの他、復号対象PUに時間的に隣接する領域、例えば、復号対象PUと同じ位置を含み、表示時刻が異なるPUの予測パラメータから得られた領域を含む。   Note that a prediction vector candidate is a PU for which decoding processing has been completed, and is derived by scaling a motion vector of a PU (for example, an adjacent PU) within a predetermined range from the decoding target PU. The adjacent PU includes a PU that is spatially adjacent to the decoding target PU, for example, the left PU and the upper PU, and an area that is temporally adjacent to the decoding target PU, for example, the same position as the decoding target PU. It includes areas obtained from prediction parameters of PUs with different times.

加算部3038は、AMVP予測パラメータ導出部3032から入力された予測ベクトルmvpLXとインター予測パラメータ復号制御部3031から入力された差分ベクトルmvdLXを加算して動きベクトルmvLXを算出する。加算部3038は、算出した動きベクトルmvLXを予測画像生成部308および予測パラメータメモリ307に出力する。   The adding unit 3038 adds the prediction vector mvpLX input from the AMVP prediction parameter deriving unit 3032 and the difference vector mvdLX input from the inter prediction parameter decoding control unit 3031 to calculate a motion vector mvLX. The adding unit 3038 outputs the calculated motion vector mvLX to the predicted image generation unit 308 and the prediction parameter memory 307.

(インター予測画像生成部309)
図11は、本実施形態に係る予測画像生成部308に含まれるインター予測画像生成部309の構成を示す概略図である。インター予測画像生成部309は、動き補償部(予測画像生成装置)3091、重み予測部3094を含んで構成される。
(Inter prediction image generation unit 309)
FIG. 11 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 309 included in the predicted image generation unit 308 according to the present embodiment. The inter prediction image generation unit 309 includes a motion compensation unit (prediction image generation device) 3091 and a weight prediction unit 3094.

(動き補償)
動き補償部3091は、インター予測パラメータ復号部303から入力された、インター予測パラメータ(予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLX)に基づいて、参照ピクチャメモリ306から、参照ピクチャインデックスrefIdxLXで指定された参照ピクチャRefXにおいて、復号対象PUの位置を起点として、動きベクトルmvLXだけずれた位置にあるブロックを読み出すことによって補間画像(動き補償画像predSamplesLX)を生成する。ここで、動きベクトルmvLXの精度が整数精度でない場合には、動き補償フィルタと呼ばれる小数位置の画素を生成するためのフィルタを施して、動き補償画像を生成する。
(Motion compensation)
The motion compensation unit 3091 receives the reference picture index refIdxLX from the reference picture memory 306 based on the inter prediction parameters (prediction list utilization flag predFlagLX, reference picture index refIdxLX, motion vector mvLX) input from the inter prediction parameter decoding unit 303. In the reference picture RefX specified in (2), an interpolation image (motion compensation image predSamplesLX) is generated by reading out a block at a position shifted by the motion vector mvLX, starting from the position of the decoding target PU. Here, when the accuracy of the motion vector mvLX is not integer accuracy, a motion compensation image is generated by applying a filter for generating a pixel at a decimal position called a motion compensation filter.

(重み予測)
重み予測部3094は、入力される動き補償画像predSamplesLXに重み係数を乗算することによりPUの予測画像を生成する。予測リスト利用フラグの一方(predFlagL0もしくはpredFlagL1)が1の場合(単予測の場合)で、重み予測を用いない場合には入力された動き補償画像predSamplesLX(LXはL0もしくはL1)を画素ビット数bitDepthに合わせる以下の式の処理を行う。
(Weight prediction)
The weight prediction unit 3094 generates a prediction image of the PU by multiplying the input motion compensation image predSamplesLX by a weight coefficient. When one of the prediction list use flags (predFlagL0 or predFlagL1) is 1 (in the case of single prediction) and the weight prediction is not used, the input motion compensated image predSamplesLX (LX is L0 or L1) is represented by the number of pixel bits bitDepth The following equation is processed to match

predSamples[x][y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesLX[x][y] + offset1 ) >> shift1 )
ここで、shift1 = 14 - bitDepth、offset1=1<<(shift1-1)である。
また、参照リスト利用フラグの両者(predFlagL0とpredFlagL1)が1の場合(双予測BiPredの場合)で、重み予測を用いない場合には、入力された動き補償画像predSamplesL0、predSamplesL1を平均し画素ビット数に合わせる以下の式の処理を行う。
predSamples [x] [y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesLX [x] [y] + offset1) >> shift1)
Here, shift1 = 14−bitDepth, offset1 = 1 << (shift1-1).
When both of the reference list use flags (predFlagL0 and predFlagL1) are 1 (in the case of bi-prediction BiPred) and weight prediction is not used, the input motion compensation images predSamplesL0 and predSamplesL1 are averaged and the number of pixel bits The following equation is processed to match

predSamples[x][y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesL0[x][y] + predSamplesL1[x][y] + offset2 ) >> shift2 )
ここで、shift2=15-bitDepth、offset2=1<<(shift2-1)である。
predSamples [x] [y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesL0 [x] [y] + predSamplesL1 [x] [y] + offset2) >> shift2)
Here, shift2 = 15-bitDepth, offset2 = 1 << (shift2-1).

(マージ候補導出部30361の変形例)
ここで、マージ候補導出部30361の変形例について、図8、図14から図16を用いて説明する。本変形例においては、マージ予測パラメータ導出部3036は、予測対象ブロックに隣接する復号処理済のブロック(CUまたはPU)および予測対象ブロックから離れた位置の復号処理済のブロックの少なくとも一方を参照ブロックとする。そして、マージ候補導出部30361は、当該参照ブロックの動き情報(動きベクトルおよび参照ピクチャインデックスrefIdxLX)を用いてマージ候補を導出する。
(Modification of merge candidate derivation unit 30361)
Here, modified examples of the merge candidate derivation unit 30361 will be described with reference to FIGS. 8 and 14 to 16. In this modification, the merge prediction parameter derivation unit 3036 refers to at least one of a decoded block (CU or PU) adjacent to the prediction target block and a decoded block at a position away from the prediction target block. And Then, merge candidate derivation unit 30361 derives a merge candidate using the motion information (motion vector and reference picture index refIdxLX) of the reference block.

但し、予測対象ブロックから離れた位置のブロックについては以下の条件を満たす場合に限り、マージ候補導出部30361はその動き情報をマージ候補とする。詳細には、動き情報がマージ候補に用いられるブロックは、予測対象ブロックを含む符号化ツリーユニット(CTU)の境界からの垂直方向の距離及び水平方向の距離の少なくとも何れかが所定の値以下であるブロックに限られる。   However, the merge candidate deriving unit 30361 sets the motion information as a merge candidate only when the following condition is satisfied for a block at a position away from the prediction target block. Specifically, a block in which motion information is used as a merge candidate is such that at least one of a vertical distance and a horizontal distance from a boundary of a coding tree unit (CTU) including a prediction target block is a predetermined value or less. Limited to a certain block.

すなわち、インター予測画像生成部309は対象ブロックに隣接しないブロックのうち、以下のブロックの動き情報を参照して対象ブロックの予測画像を生成する。インター予測画像生成部309によって動き情報が参照される当該ブロックは、対象ブロックを含む符号化ツリーユニットの境界からの垂直方向の距離及び水平方向の距離の少なくとも何れかが所定の値以下のブロックである。   That is, the inter prediction image generation unit 309 generates a prediction image of the target block with reference to the following block motion information among the blocks that are not adjacent to the target block. The block whose motion information is referred to by the inter prediction image generation unit 309 is a block in which at least one of the distance in the vertical direction and the distance in the horizontal direction from the boundary of the coding tree unit including the target block is a predetermined value or less. is there.

上記の構成によれば、対象ブロックを含むCTU境界から所定の距離よりも離れたブロックの動き情報はマージ候補の導出において参照されない。   According to the above configuration, the motion information of blocks that are more than a predetermined distance away from the CTU boundary including the target block is not referred to in the merging candidate derivation.

例えば、マージ予測において、CTU境界から所定の距離よりも離れたブロックの動き情報をマージ候補から除外させることができる。予測対象ブロックが含まれるCTUとは異なるCTUに含まれるブロックの動き情報は画像復号装置31および画像符号化装置11の内部メモリに保存されていない。したがって、CTU境界から所定の距離よりも離れたブロックの動き情報を、マージ候補に含める個数は削減される。そのため、画像復号装置31および画像符号化装置11における外部メモリアクセスが低減される。よって、画像復号装置31および画像符号化装置11におけるメモリバンドが大きくなることを抑制することができる。   For example, in merge prediction, motion information of blocks that are more than a predetermined distance from the CTU boundary can be excluded from merge candidates. The motion information of the block included in the CTU different from the CTU including the prediction target block is not stored in the internal memories of the image decoding device 31 and the image encoding device 11. Therefore, the number of motion information of blocks that are separated from the CTU boundary by a predetermined distance is included in the merge candidates. Therefore, external memory access in the image decoding device 31 and the image encoding device 11 is reduced. Therefore, it is possible to suppress an increase in the memory band in the image decoding device 31 and the image encoding device 11.

(マージ候補導出部30361の構成)
図8は、本変形例に係るマージ候補導出部30361の構成の一例を示す概略図である。
(Configuration of merge candidate derivation unit 30361)
FIG. 8 is a schematic diagram illustrating an example of the configuration of the merge candidate derivation unit 30361 according to the present modification.

マージ候補導出部30361は、空間マージ候補導出部303611を備え、空間マージ候補導出部303611はavailability判定部3036111を備えている。   The merge candidate derivation unit 30361 includes a spatial merge candidate derivation unit 303611, and the spatial merge candidate derivation unit 303611 includes an availability determination unit 3036111.

availability判定部3036111は、予測対象ブロックとは離れた位置の復号処理済のブロックの動き情報(動きベクトル、参照ピクチャインデックスrefIdxLX等)を空間マージ候補として適用するか否かを判定する。availability判定部3036111の詳細な判定例については後述する。   The availability determination unit 3036111 determines whether to apply the motion information (motion vector, reference picture index refIdxLX, etc.) of the decoded block at a position away from the prediction target block as a spatial merge candidate. A detailed determination example of the availability determination unit 3036111 will be described later.

availability判定部3036111は、復号処理済のブロックの動き情報を空間マージ候補として適用すると判定すると、availableFlagPを1に設定する。availableFlagPが1である場合、空間マージ候補導出部303611は当該復号処理済のブロックの動き情報を空間マージ候補として、マージ候補格納部30363に格納する。   If the availability determination unit 3036111 determines to apply the motion information of the decoded block as a spatial merge candidate, it sets availableFlagP to 1. When availableFlagP is 1, the spatial merge candidate derivation unit 303611 stores the motion information of the decoded block in the merge candidate storage unit 30363 as a spatial merge candidate.

availability判定部3036111は、復号処理済のブロックの動き情報を空間マージ候補として適用しないと判定すると、availableFlagPを0に設定する。availableFlagPが0である場合、空間マージ候補導出部303611は当該復号処理済のブロックの動き情報を空間マージ候補としない。   If the availability determination unit 3036111 determines that the motion information of the decoded block is not applied as a spatial merge candidate, it sets availableFlagP to 0. When availableFlagP is 0, the spatial merge candidate derivation unit 303611 does not set the motion information of the decoded block as a spatial merge candidate.

(availability判定部3036111の判定例1)
ここで、availability判定部3036111の判定の一例について、図14を用いて説明する。図14はavailability判定部3036111の判定の一例を示す模式図である。
(Judgment example 1 of availability judgment unit 3036111)
Here, an example of determination by the availability determination unit 3036111 will be described with reference to FIG. FIG. 14 is a schematic diagram illustrating an example of determination by the availability determination unit 3036111.

本例では、availability判定部3036111は、予測対象CUを含むCTU境界からの垂直方向の距離が所定の値以下のブロックの動き情報を空間マージ候補として判定する。   In this example, the availability determination unit 3036111 determines motion information of a block whose vertical distance from a CTU boundary including the prediction target CU is a predetermined value or less as a spatial merge candidate.

図14に示すように、予測対象ブロックを含むCTUの左上座標を(xCTU, yCTU)とする。また、availability判定部3036111が空間マージ候補に利用するか否かを判定するブロックの座標を(xNbP, yNbP)とする。   As shown in FIG. 14, the upper left coordinates of the CTU including the prediction target block are (xCTU, yCTU). Further, the coordinates of a block for determining whether or not the availability determination unit 3036111 uses the spatial merge candidate are (xNbP, yNbP).

availability判定部3036111は、判定されるブロックのy座標(yNbP)が以下の条件を満たす場合、該ブロックの動き情報を空間マージ候補と判定する。   When the y coordinate (yNbP) of the block to be determined satisfies the following condition, the availability determination unit 3036111 determines the motion information of the block as a spatial merge candidate.

条件:予測対象ブロックを含むCTUの左上座標のy座標から所定の値(K)だけ上に設定されたy座標の値または、それよりも下に位置する。例えば、図14に示す例では、ブロックA、A1、A2、B、B1、C、C1、D、D1、D2、EおよびE1の位置は、CTUの左上座標のy座標が示す位置から所定の値(K)だけ上に設定されたy座標の値よりも下に位置する。そのため、当該ブロックの動き情報は空間マージ候補として判定される。   Condition: The value of the y coordinate set above the y coordinate of the upper left coordinate of the CTU including the prediction target block by a predetermined value (K) or lower than that. For example, in the example shown in FIG. 14, the positions of the blocks A, A1, A2, B, B1, C, C1, D, D1, D2, E, and E1 are predetermined from the position indicated by the y coordinate of the upper left coordinates of the CTU. It is located below the value of the y coordinate set above by the value (K). Therefore, the motion information of the block is determined as a spatial merge candidate.

また、availability判定部3036111は、判定されるブロックのy座標であるyNbPが予測対象ブロックを含むCTUの左上座標のy座標が示す位置から所定の値(K)だけ上に設定されたy座標の値よりも上に位置している場合に、該ブロックの動き情報を空間マージ候補と判定しない。例えば、図14に示す例では、ブロックB2、C2およびE2の位置は、CTUの左上座標のy座標が示す位置から所定の値(K)だけ上に設定されたy座標の値よりも上に位置する。そのため、当該ブロックの動き情報は空間マージ候補として判定されない。   In addition, the availability determination unit 3036111 uses the y-coordinate of the y-coordinate that is set by a predetermined value (K) above the position indicated by the y-coordinate of the upper-left coordinate of the CTU that includes the prediction target block. If it is located above the value, the motion information of the block is not determined as a spatial merge candidate. For example, in the example shown in FIG. 14, the positions of the blocks B2, C2, and E2 are higher than the value of the y coordinate set by a predetermined value (K) above the position indicated by the y coordinate of the upper left coordinate of the CTU. To position. Therefore, the motion information of the block is not determined as a spatial merge candidate.

上記判定は以下の式にて表すことができる。
availableFlagP = (yNbP < yCTU - K) ? 0 : 1
if ( availableFlagP )
{
mvLXP = MvLX[ xNbP ][ yNbP ]
refIdxLXP = RefIdxLX[ xNbP ][ yNbP ]
predFlagLXP = PredFlagLX[ xNbP ][ yNbP ]

mergeCandList[ i++ ] = P
}
なお、availability判定部3036111は、予測対象CUが属する符号化ツリーユニット(CTU)の境界からの水平方向の距離が所定の値以下のブロックの動き情報を空間マージ候補として適用すると判定してもよい。
The above determination can be expressed by the following equation.
availableFlagP = (yNbP <yCTU-K)? 0: 1
if (availableFlagP)
{
mvLXP = MvLX [xNbP] [yNbP]
refIdxLXP = RefIdxLX [xNbP] [yNbP]
predFlagLXP = PredFlagLX [xNbP] [yNbP]

mergeCandList [i ++] = P
}
Note that the availability determination unit 3036111 may determine that the motion information of a block whose horizontal distance from the boundary of the coding tree unit (CTU) to which the prediction target CU belongs is a predetermined value or less is applied as a spatial merge candidate. .

また、上記の所定の値であるKは、座標値で1から16の値であることが好ましい。   The predetermined value K is preferably a coordinate value of 1 to 16.

なお、以下のように、8x8や16x16単位など粗い単位で参照しても良い。つまり、参照位置は以下のように間引いても良い(以降の構成でも同様)。
if ( availableFlagP )
{
xNbP = (xNbP >>shiftL) << shiftL)
yNbP = (yNbP >>shiftK) << shiftK)
mvLXP = MvLX[ xNbP ][ yNbP ]
refIdxLXP = RefIdxLX[ xNbP ][ yNbP ]
predFlagLXP = PredFlagLX[ xNbP ][ yNbP ]
mergeCandList[ i++ ] = P
}
ここでshiftL、shiftKは、座標を間引くためのシフト値であり、3, 4, 5などを用いることができる。
In addition, you may refer in coarse units, such as 8x8 and 16x16 units, as follows. That is, the reference position may be thinned out as follows (the same applies to the subsequent configurations).
if (availableFlagP)
{
xNbP = (xNbP >> shiftL) << shiftL)
yNbP = (yNbP >> shiftK) << shiftK)
mvLXP = MvLX [xNbP] [yNbP]
refIdxLXP = RefIdxLX [xNbP] [yNbP]
predFlagLXP = PredFlagLX [xNbP] [yNbP]
mergeCandList [i ++] = P
}
Here, shiftL and shiftK are shift values for thinning out the coordinates, and 3, 4, 5, etc. can be used.

(availability判定部3036111の判定例2)
次に、availability判定部3036111の判定の他の例について、図15を用いて説明する。図15はavailability判定部3036111の判定の他の例を示す模式図である。
(Determination example 2 of availability determination unit 3036111)
Next, another example of the determination by the availability determination unit 3036111 will be described with reference to FIG. FIG. 15 is a schematic diagram illustrating another example of the determination by the availability determination unit 3036111.

本例では、availability判定部3036111は、予測対象CUを含む符号化ツリーユニット(CTU)の境界からの垂直方向の距離が所定の値以下、かつ、水平方向の距離が所定の値以下のブロックの動き情報を空間マージ候補として判定する。。   In this example, the availability determination unit 3036111 has a block whose vertical distance from the boundary of the coding tree unit (CTU) including the prediction target CU is a predetermined value or less and whose horizontal distance is a predetermined value or less. The motion information is determined as a spatial merge candidate. .

図15に示すように、予測対象ブロックを含むCTUの左上座標を(xCTU, yCTU)とする。また、availability判定部3036111が空間マージ候補に利用するか否かを判定するブロックの座標を(xNbP, yNbP)とする。   As shown in FIG. 15, the upper left coordinates of the CTU including the prediction target block are (xCTU, yCTU). Further, the coordinates of a block for determining whether or not the availability determination unit 3036111 uses the spatial merge candidate are (xNbP, yNbP).

availability判定部3036111は、判定されるブロックが以下の条件(1)および条件(2)の両方を満たす場合に当該ブロックの動き情報を空間マージ候補と判定する。条件(1):判定されるブロックのy座標(yNbP)が、予測対象ブロックを含むCTUの左上座標のy座標が示す位置から所定の値(K)だけ上に設定されたy座標の値か、それよりも下に位置する。条件(2):判定されるブロックのx座標(xNbP)が、予測対象ブロックを含むCTUの左上座標のx座標が示す位置から所定の値(L)だけ左に設定されたx座標の値か、それよりも右に位置する。   The availability determination unit 3036111 determines that the motion information of the block is a spatial merge candidate when the determined block satisfies both the following conditions (1) and (2). Condition (1): Whether the y-coordinate (yNbP) of the block to be determined is a y-coordinate value set by a predetermined value (K) above the position indicated by the y-coordinate of the upper left coordinate of the CTU that includes the prediction target block Located below it. Condition (2): Whether the x coordinate (xNbP) of the block to be determined is the x coordinate value set to the left by a predetermined value (L) from the position indicated by the x coordinate of the upper left coordinate of the CTU including the prediction target block Located to the right of it.

図15に示す例では、ブロックA、A1、B、B1、C、C1、D、D1、EおよびE1は上述の条件(1)および条件(2)の両方を満たす。そのため、当該ブロックの動き情報は空間マージ候補として判定される。また、図15に示す例では、ブロックA2、B2、C2、D2およびE2は上述の条件(1)および条件(2)の少なくとも一方を満たさない。そのため、当該ブロックの動き情報は空間マージ候補として判定されない。   In the example shown in FIG. 15, the blocks A, A1, B, B1, C, C1, D, D1, E, and E1 satisfy both the above-described condition (1) and condition (2). Therefore, the motion information of the block is determined as a spatial merge candidate. In the example shown in FIG. 15, the blocks A2, B2, C2, D2, and E2 do not satisfy at least one of the above condition (1) and condition (2). Therefore, the motion information of the block is not determined as a spatial merge candidate.

上記判定は以下の式にて表すことができる。
availableFlagP = (yNbP < yCTU - K) || (xNbP < xCTU - L)? 0 : 1
if ( availableFlagP )
{
mvLXP = MvLX[ xNbP ][ yNbP ]
refIdxLXP = RefIdxLX[ xNbP ][ yNbP ]
predFlagLXP = PredFlagLX[ xNbP ][ yNbP ]

mergeCandList[ i++ ] = P
}
なお、上記の所定の値であるK及びLは、座標値で1から16の値であることが好ましい。
The above determination can be expressed by the following equation.
availableFlagP = (yNbP <yCTU-K) || (xNbP <xCTU-L)? 0: 1
if (availableFlagP)
{
mvLXP = MvLX [xNbP] [yNbP]
refIdxLXP = RefIdxLX [xNbP] [yNbP]
predFlagLXP = PredFlagLX [xNbP] [yNbP]

mergeCandList [i ++] = P
}
The predetermined values K and L are preferably coordinate values of 1 to 16.

(availability判定部3036111の判定対象となるブロックの例)
次に、availability判定部3036111の判定対象となるブロックの一例について、図16を用いて説明する。図16はavailability判定部3036111の判定の対象となるブロックの一例を示す模式図である。詳細には、図16は上記判定例1における、availability判定部3036111の判定対象となるブロックの一例を示す図である。本例においては、availability判定部3036111によって判定されるブロックが間引かれる。すなわち、availability判定部3036111は、粗い単位(例えば8x8や16x16の単位)の座標に位置するブロックについて、上記判定を行う。例えば、図16の破線で示す領域毎に1つのブロックのみがavailability判定部3036111で判定される。
(Example of block to be determined by availability determination unit 3036111)
Next, an example of a block that is a determination target of the availability determination unit 3036111 will be described with reference to FIG. FIG. 16 is a schematic diagram illustrating an example of a block to be determined by the availability determination unit 3036111. Specifically, FIG. 16 is a diagram illustrating an example of a block that is a determination target of the availability determination unit 3036111 in the determination example 1 described above. In this example, blocks determined by the availability determination unit 3036111 are thinned out. That is, the availability determination unit 3036111 performs the above determination on a block located at the coordinates of a coarse unit (for example, a unit of 8x8 or 16x16). For example, only one block is determined by the availability determination unit 3036111 for each area indicated by a broken line in FIG.

上記判定は以下の式にて表すことができる。つまり、間引き後の座標である((yNbP >>shiftK) << shiftK)を用いて、CTU境界からの距離の判定をおこなってもよい。   The above determination can be expressed by the following equation. That is, the distance from the CTU boundary may be determined using the coordinates after thinning ((yNbP >> shiftK) << shiftK).

if ((yNbP >>shiftK) << shiftK) >= yCTU - K)
{
xNbP = (xNbP >>shiftL) << shiftL)
yNbP = (yNbP >>shiftK) << shiftK)

mvLXP = MvLX[ xNbP ][ yNbP ]
refIdxLXP = RefIdxLX[ xNbP ][ yNbP ]
predFlagLXP = PredFlagLX[ xNbP ][ yNbP ]
}
このように判定することによって、参照位置の間引きを行う空間マージ候補の導出において、間引き前の位置(xNb, yNb)では、対象CTUから見て所定の範囲であるにもかかわらず、間引き後の位置((xNbP >>shiftL) << shiftL), (yNbP >>shiftK) << shiftK))が所定の範囲を超える問題がなくなる。
if ((yNbP >> shiftK) <<shiftK)> = yCTU-K)
{
xNbP = (xNbP >> shiftL) << shiftL)
yNbP = (yNbP >> shiftK) << shiftK)

mvLXP = MvLX [xNbP] [yNbP]
refIdxLXP = RefIdxLX [xNbP] [yNbP]
predFlagLXP = PredFlagLX [xNbP] [yNbP]
}
By deciding in this way, in the derivation of the spatial merge candidate that performs the thinning of the reference position, the position before thinning (xNb, yNb) is a predetermined range when viewed from the target CTU, even though it is within a predetermined range. The problem that the position ((xNbP >> shiftL) << shiftL), (yNbP >> shiftK) << shiftK)) exceeds the predetermined range is eliminated.

なお、上述の例においては、availability判定部3036111の判定例1におけるavailability判定部3036111の判定対象となるブロックの例を示したが、判定例2においても判定対象となるブロックを本例と同様にしてもよい。   In the above example, the example of the block that is the determination target of the availability determination unit 3036111 in the determination example 1 of the availability determination unit 3036111 is shown. However, in the determination example 2, the block that is the determination target is the same as this example. May be.

(参照位置の間引き量の変更)
また、availability判定部3036111は、判定されるブロックのy座標であるyNbPが予測対象ブロックを含むCTUの左上座標のy座標が示す位置から所定の値(K)だけ上に設定されたy座標の値よりも下に位置しているか否かに応じて、動き情報を参照する座標の間引き量を変更しても良い。例えば、空間マージ候補の参照位置(xNbP, yNbP)の位置が対象CTUの位置からみて所定の値よりも上にある場合には、間引き量(shiftK、shiftL)によって参照位置を間引いても良い。ここでは、参照位置が対象CTUからみて所定の範囲を超えるか否かを示すdecimationFlagを導出し、所定の位置より遠い場合には間引きを行う。
decimationFlag = (yNbP < yCTU - K) ? 0 : 1
if ( decimationFlag )
{
xNbP = (xNbP >>shiftL) << shiftL)
yNbP = (yNbP >>shiftK) << shiftK)
}
mvLXP = MvLX[ xNbP ][ yNbP ]
refIdxLXP = RefIdxLX[ xNbP ][ yNbP ]
predFlagLXP = PredFlagLX[ xNbP ][ yNbP ]
ここでshiftL、shiftKは、座標を間引くためのシフト値であり、3, 4, 5などを用いることができる。
(Change of thinning amount of reference position)
In addition, the availability determination unit 3036111 uses the y-coordinate of the y-coordinate that is set by a predetermined value (K) above the position indicated by the y-coordinate of the upper-left coordinate of the CTU that includes the prediction target block. The thinning-out amount of the coordinates referring to the motion information may be changed depending on whether the position is lower than the value. For example, when the position of the reference position (xNbP, yNbP) of the spatial merge candidate is above a predetermined value as viewed from the position of the target CTU, the reference position may be thinned by the thinning amount (shiftK, shiftL). Here, a determinationFlag indicating whether or not the reference position exceeds a predetermined range as viewed from the target CTU is derived, and if the reference position is far from the predetermined position, thinning is performed.
decimationFlag = (yNbP <yCTU-K)? 0: 1
if (decimationFlag)
{
xNbP = (xNbP >> shiftL) << shiftL)
yNbP = (yNbP >> shiftK) << shiftK)
}
mvLXP = MvLX [xNbP] [yNbP]
refIdxLXP = RefIdxLX [xNbP] [yNbP]
predFlagLXP = PredFlagLX [xNbP] [yNbP]
Here, shiftL and shiftK are shift values for thinning out the coordinates, and 3, 4, 5, etc. can be used.

例1:K = 1、shiftL = shiftK = 2とすると、CTU境界に接しているブロックは間引きを行わず、CTU境界に接していないブロックは8x8単位に間引く。   Example 1: When K = 1 and shiftL = shiftK = 2, blocks that are in contact with the CTU boundary are not thinned out, and blocks that are not in contact with the CTU boundary are thinned out to 8 × 8 units.

例2:K = 1、shiftL = 2, shiftK = 1とすると、CTU境界に接しているブロックは間引きを行わず、CTU境界に接していないブロックは8x4単位に間引く。   Example 2: When K = 1, shiftL = 2, and shiftK = 1, blocks that are in contact with the CTU boundary are not thinned out, and blocks that are not in contact with the CTU boundary are thinned out to 8 × 4 units.

例3:K = 1、shiftL = 1, shiftK = 2とすると、CTU境界に接しているブロックは間引きを行わず、CTU境界に接していないブロックは4x8単位に間引く。   Example 3: When K = 1, shiftL = 1, and shiftK = 2, blocks that are in contact with the CTU boundary are not thinned out, and blocks that are not in contact with the CTU boundary are thinned out to 4 × 8 units.

さらに、例えば、空間マージ候補の参照位置(xNbP, yNbP)の位置が対象CTUの位置からみて所定の値よりも上にあるか否かに応じて間引き量を変更しても良い。参照位置が対象CTUからみて所定の範囲を超えるか否かを示すdecimationFlagを導出し、decimationFlagのフラグが偽の場合(通常時)には第1のシフト量shiftL1, shiftK1を用い、フラグが真の場合には第1のシフト量よりも大きい第2のシフト量(shiftL2, shiftK2)を用いてもよい。   Further, for example, the thinning amount may be changed depending on whether or not the position of the reference position (xNbP, yNbP) of the spatial merge candidate is above a predetermined value as viewed from the position of the target CTU. A decisionFlag indicating whether or not the reference position exceeds the predetermined range from the target CTU is derived. If the flag of the decisionFlag is false (normal), the first shift amount shiftL1, shiftK1 is used, and the flag is true In this case, a second shift amount (shiftL2, shiftK2) larger than the first shift amount may be used.

shiftL = decimationFlag ? shiftL2 : shiftL1
shiftK = decimationFlag ? shiftK2 : shiftK1
xNbP = (xNbP >>shiftL) << shiftL)
yNbP = (yNbP >>shiftK) << shiftK)
ここでshiftL2 > shiftL1, shiftK2 > shiftK1。例えばshiftL2 = shiftK2 = 3、shiftL2 = shiftK2 = 2でもよい。
shiftL = decimationFlag? shiftL2: shiftL1
shiftK = decimationFlag? shiftK2: shiftK1
xNbP = (xNbP >> shiftL) << shiftL)
yNbP = (yNbP >> shiftK) << shiftK)
Where shiftL2> shiftL1, shiftK2> shiftK1. For example, shiftL2 = shiftK2 = 3 and shiftL2 = shiftK2 = 2 may be used.

なお、decimationFlagの導出には以下の式のように対象ブロックを含むCTUの座標(xCTU, yCTU)の両方を用いてもよい。
decimationFlag = (yNbP < yCTU - K) || (xNbP < xCTU - L) ? 0 : 1
なお、decimationFlagの導出時に参照する点の座標を間引いておいても良い。
Note that both of the CTU coordinates (xCTU, yCTU) including the target block may be used to derive the decisionFlag as in the following equation.
decimationFlag = (yNbP <yCTU-K) || (xNbP <xCTU-L)? 0: 1
Note that the coordinates of points to be referred to when deriving the decisionFlag may be thinned out.

decimationFlag = ((yNbP >>shiftK) << shiftK) < yCTU - K ? 0 : 1
もしくは以下でも良い。
decimationFlag = ((yNbP >> shiftK) << shiftK) <yCTU-K? 0: 1
Alternatively, the following may be used.

decimationFlag = (((yNbP >>shiftK) << shiftK) < yCTU - K) || (((xNbP >>shiftL) << shiftL) < yCTU - L) ? 0 : 1
上記の構成によれば、対象CTUより離れた位置の動き情報を参照する場合に、参照位置を間引くため、対象CTUより離れた位置の動き情報を粗く格納することができる。これにより動き情報を格納するメモリサイズを削減できる。
decimationFlag = (((yNbP >> shiftK) << shiftK) <yCTU-K) || (((xNbP >> shiftL) << shiftL) <yCTU-L)? 0: 1
According to the above configuration, when referring to the motion information at a position away from the target CTU, the reference position is thinned out, so that the motion information at a position away from the target CTU can be roughly stored. Thereby, the memory size for storing motion information can be reduced.

(画像符号化装置の構成)
次に、本実施形態に係る画像符号化装置11の構成について説明する。図4は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
(Configuration of image encoding device)
Next, the configuration of the image encoding device 11 according to the present embodiment will be described. FIG. 4 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment. The image encoding device 11 includes a predicted image generation unit 101, a subtraction unit 102, a transform / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse transform unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory. (Prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, encoding parameter determination unit 110, and prediction parameter encoding unit 111. The prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.

予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。   For each picture of the image T, the predicted image generation unit 101 generates a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture. Here, the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111.

予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。例えば、図6は、予測画像生成部101に含まれるインター予測画像生成部1011の構成を示す概略図である。インター予測画像生成部1011は、動き補償部10111、重み予測部10112を含んで構成される。動き補償部10111および重み予測部10112については、上述の動き補償部3091、重み予測部3094のそれぞれと同様の構成であるためここでの説明を省略する。   The predicted image generation unit 101 has the same operation as the predicted image generation unit 308 already described. For example, FIG. 6 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 1011 included in the predicted image generation unit 101. The inter prediction image generation unit 1011 includes a motion compensation unit 10111 and a weight prediction unit 10112. Since the motion compensation unit 10111 and the weight prediction unit 10112 have the same configurations as the motion compensation unit 3091 and the weight prediction unit 3094 described above, description thereof is omitted here.

予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ブロックの画素値をもとにPUの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。   The predicted image generation unit 101 generates a predicted image P of the PU based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter encoding unit. The predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.

減算部102は、予測画像生成部101から入力されたPUの予測画像Pの信号値を、画像Tの対応するPUの画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号を変換・量子化部103に出力する。   The subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal. The subtraction unit 102 outputs the generated residual signal to the transform / quantization unit 103.

変換・量子化部103は、減算部102から入力された残差信号について周波数変換を行い、変換係数を算出する。変換・量子化部103は、算出した変換係数を量子化して量子化係数を求める。変換・量子化部103は、求めた量子化係数をエントロピー符号化部104及び逆量子化・逆変換部105に出力する。   The transformation / quantization unit 103 performs frequency transformation on the residual signal input from the subtraction unit 102 and calculates a transformation coefficient. The transform / quantization unit 103 quantizes the calculated transform coefficient to obtain a quantized coefficient. The transform / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse transform unit 105.

エントロピー符号化部104には、変換・量子化部103から量子化係数が入力され、予測パラメータ符号化部111から符号化パラメータが入力される。入力される符号化パラメータには、例えば、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpredMode、及びマージインデックスmerge_idx等の符号がある。   The entropy encoding unit 104 receives the quantization coefficient from the transform / quantization unit 103 and the encoding parameter from the prediction parameter encoding unit 111. Examples of input encoding parameters include codes such as a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode predMode, and a merge index merge_idx.

エントロピー符号化部104は、入力された量子化係数と符号化パラメータをエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。   The entropy encoding unit 104 generates an encoded stream Te by entropy encoding the input quantization coefficient and encoding parameter, and outputs the generated encoded stream Te to the outside.

逆量子化・逆変換部105は、変換・量子化部103から入力された量子化係数を逆量子化して変換係数を求める。逆量子化・逆変換部105は、求めた変換係数について逆周波数変換を行い、残差信号を算出する。逆量子化・逆変換部105は、算出した残差信号を加算部106に出力する。   The inverse quantization / inverse transform unit 105 inversely quantizes the quantization coefficient input from the transform / quantization unit 103 to obtain a transform coefficient. The inverse quantization / inverse transform unit 105 performs inverse frequency transform on the obtained transform coefficient to calculate a residual signal. The inverse quantization / inverse transform unit 105 outputs the calculated residual signal to the addition unit 106.

加算部106は、予測画像生成部101から入力されたPUの予測画像Pの信号値と逆量子化・逆変換部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像を参照ピクチャメモリ109に記憶する。   The addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse conversion unit 105 for each pixel, and performs decoding. Generate an image. The adding unit 106 stores the generated decoded image in the reference picture memory 109.

ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)を施す。   The loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.

予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。   The prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each picture and CU to be encoded.

参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。   The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.

符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述した予測パラメータやこの予測パラメータに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてPUの予測画像Pを生成する。   The encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters. The encoding parameter is a parameter to be encoded that is generated in association with the above-described prediction parameter or the prediction parameter. The predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.

符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すコスト値を算出する。コスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。   The encoding parameter determination unit 110 calculates a cost value indicating the amount of information and the encoding error for each of the plurality of sets. The cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient λ. The code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization error and the encoding parameter. The square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102. The coefficient λ is a real number larger than a preset zero. The encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated cost value. As a result, the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters. The encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.

予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。   The prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101. The parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.

インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。インター予測パラメータ符号化部112の構成については、後述する。   The inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110. The inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters. Some of the configurations are the same as the configuration to be performed. The configuration of the inter prediction parameter encoding unit 112 will be described later.

イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。   The intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.

(インター予測パラメータ符号化部の構成)
次に、インター予測パラメータ符号化部112の構成について説明する。インター予測パラメータ符号化部112は、図12のインター予測パラメータ復号部303に対応する手段であり、図10に構成を示す。
(Configuration of inter prediction parameter encoding unit)
Next, the configuration of the inter prediction parameter encoding unit 112 will be described. The inter prediction parameter encoding unit 112 is a unit corresponding to the inter prediction parameter decoding unit 303 in FIG. 12, and the configuration is shown in FIG.

インター予測パラメータ符号化部112は、インター予測パラメータ符号化制御部1121、AMVP予測パラメータ導出部1122、減算部1123、サブブロック予測パラメータ導出部1125、マージ予測パラメータ導出部1126及び図示しない、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部などを含んで構成される。   The inter prediction parameter encoding unit 112 includes an inter prediction parameter encoding control unit 1121, an AMVP prediction parameter derivation unit 1122, a subtraction unit 1123, a sub-block prediction parameter derivation unit 1125, a merge prediction parameter derivation unit 1126, and a partition mode derivation (not shown). , A merge flag deriving unit, an inter prediction identifier deriving unit, a reference picture index deriving unit, a vector difference deriving unit, and the like.

特に、マージ予測パラメータ導出部1126は上述のマージ予測パラメータ導出部3036に対応する構成であってもよい。すなわち、マージ予測パラメータ導出部1126がマージ候補導出部30361、空間マージ候補導出部303611およびavailability判定部3036111に対応する構成を備えていてもよい。   In particular, the merge prediction parameter derivation unit 1126 may be configured to correspond to the merge prediction parameter derivation unit 3036 described above. That is, the merge prediction parameter deriving unit 1126 may include a configuration corresponding to the merge candidate deriving unit 30361, the spatial merge candidate deriving unit 303611, and the availability determining unit 3036111.

分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部は各々、PU分割モードpart_mode、マージフラグmerge_flag、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、差分ベクトルmvdLXを導出する。インター予測パラメータ符号化部112は、動きベクトル(mvLX、subMvLX)と参照ピクチャインデックスrefIdxLX、PU分割モードpart_mode、インター予測識別子inter_pred_idc、あるいはこれらを示す情報を予測画像生成部101に出力する。   The partition mode deriving unit, the merge flag deriving unit, the inter prediction identifier deriving unit, the reference picture index deriving unit, and the vector difference deriving unit are respectively the PU partition mode part_mode, the merge flag merge_flag, the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the difference vector Derives mvdLX. The inter prediction parameter encoding unit 112 outputs the motion vector (mvLX, subMvLX), the reference picture index refIdxLX, the PU partition mode part_mode, the inter prediction identifier inter_pred_idc, or information indicating these to the prediction image generating unit 101.

またインター予測パラメータ符号化部112は、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、サブブロック予測モードフラグsubPbMotionFlagをエントロピー符号化部104に出力する。   Further, the inter prediction parameter encoding unit 112 entropy PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX, sub-block prediction mode flag subPbMotionFlag. The data is output to the encoding unit 104.

インター予測パラメータ符号化制御部1121は、マージインデックス導出部11211とベクトル候補インデックス導出部11212を含む。マージインデックス導出部11211は、符号化パラメータ決定部110から入力された動きベクトルと参照ピクチャインデックスを、予測パラメータメモリ108から読み出したマージ候補のPUが持つ動きベクトルと参照ピクチャインデックスと比較して、マージインデックスmerge_idxを導出し、エントロピー符号化部104に出力する。マージ候補とは、符号化対象となる符号化対象CUから予め定めた範囲にある参照PU(例えば、符号化対象ブロックの左下端、左上端、右上端に接する参照PU)であって、符号化処理が完了したPUである。ベクトル候補インデックス導出部11212は予測ベクトルインデックスmvp_LX_idxを導出する。   The inter prediction parameter coding control unit 1121 includes a merge index deriving unit 11211 and a vector candidate index deriving unit 11212. The merge index derivation unit 11211 compares the motion vector and reference picture index input from the encoding parameter determination unit 110 with the motion vector and reference picture index of the merge candidate PU read from the prediction parameter memory 108, and performs merge An index merge_idx is derived and output to the entropy encoding unit 104. A merge candidate is a reference PU (for example, a reference PU that touches the lower left end, upper left end, and upper right end of the encoding target block) within a predetermined range from the encoding target CU to be encoded. The PU has been processed. The vector candidate index deriving unit 11212 derives a prediction vector index mvp_LX_idx.

サブブロック予測パラメータ導出部1125には、符号化パラメータ決定部110がサブブロック予測モードの使用を決定した場合、subPbMotionFlagの値に従って、空間サブブロック予測、時間サブブロック予測、マッチング動き導出のいずれかのサブブロック予測の動きベクトルと参照ピクチャインデックスを導出する。動きベクトルと参照ピクチャインデックスは、画像復号装置の説明で述べたように、隣接PU、参照ピクチャブロック等の動きベクトルや参照ピクチャインデックスを予測パラメータメモリ108から読み出し、導出する。   When the encoding parameter determination unit 110 determines to use the subblock prediction mode, the subblock prediction parameter derivation unit 1125 selects one of spatial subblock prediction, temporal subblock prediction, and matching motion derivation according to the value of subPbMotionFlag. A motion vector and a reference picture index for sub-block prediction are derived. As described in the description of the image decoding apparatus, the motion vector and the reference picture index are derived by reading out the motion vector and the reference picture index such as the adjacent PU and the reference picture block from the prediction parameter memory 108.

AMVP予測パラメータ導出部1122は、上述のAMVP予測パラメータ導出部3032(図12参照)と同様な構成を有する。   The AMVP prediction parameter derivation unit 1122 has the same configuration as the AMVP prediction parameter derivation unit 3032 (see FIG. 12).

減算部1123は、符号化パラメータ決定部110から入力された動きベクトルmvLXから、AMVP予測パラメータ導出部1122から入力された予測ベクトルmvpLXを減算して差分ベクトルmvdLXを生成する。差分ベクトルmvdLXはエントロピー符号化部104に出力される。   The subtraction unit 1123 subtracts the prediction vector mvpLX input from the AMVP prediction parameter derivation unit 1122 from the motion vector mvLX input from the coding parameter determination unit 110 to generate a difference vector mvdLX. The difference vector mvdLX is output to the entropy encoding unit 104.

なお、上述した実施形態における画像符号化装置11、画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆変換部311、加算部312、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、ループフィルタ107、符号化パラメータ決定部110、予測パラメータ符号化部111をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、画像符号化装置11、画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。   In addition, a part of the image encoding device 11 and the image decoding device 31 in the above-described embodiment, for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse transformation. Unit 311, addition unit 312, predicted image generation unit 101, subtraction unit 102, transform / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse transform unit 105, loop filter 107, encoding parameter determination unit 110, The prediction parameter encoding unit 111 may be realized by a computer. In that case, the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer system and executed. Here, the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices. The “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system. Furthermore, the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, In such a case, a volatile memory inside a computer system serving as a server or a client may be included and a program that holds a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.

また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。   Moreover, you may implement | achieve part or all of the image coding apparatus 11 in the embodiment mentioned above, and the image decoding apparatus 31 as integrated circuits, such as LSI (Large Scale Integration). Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, an integrated circuit based on the technology may be used.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。   As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to

(第2の実施形態)
(ブロック分割の種類)
本実施形態に係る符号化ノード(CN:Coding Node)の分割について説明する。図17は、画像復号装置31における符号化ノード(CN、ブロック)の分割を示す図である。本実施形態においては、画像復号装置31は、符号化ツリーユニットまたはCNを4分木分割(QT分割)、2分木/binary tree分割(BT分割)または3分木/ternary tree分割(TT分割)によって分割し、符号化処理の基本的な単位である符号化ユニット(CU:CodingUnit)に分割する。図17の(a)は、ブロックのQT分割を示している。また、図17の(b)は、ブロックを水平方向(HOR)にBT分割する例を示している。また、図17の(c)は、ブロックを垂直方向(VER)にBT分割する例を示している。図17の(b)および(c)に示すように、BT分割はブロックの分割される辺を1対1に分割する。また、図17の(d)は、ブロックを分割しない例を示している。図17の(e)は、ブロックを水平方向(HOR)にTT分割する例を示している。図17の(f)は、ブロックを垂直方向(VER)にTT分割する例を示している。TT分割はブロックの分割される辺を1対2対1に分割する。
(Second Embodiment)
(Type of block division)
A description will be given of division of a coding node (CN) according to the present embodiment. FIG. 17 is a diagram illustrating division of coding nodes (CN, blocks) in the image decoding device 31. In the present embodiment, the image decoding device 31 divides the coding tree unit or CN into quadtree division (QT division), binary tree / binary tree division (BT division), or triple tree / ternary tree division (TT division). ), And is divided into coding units (CU: Coding Units) which are basic units of the coding process. FIG. 17A shows QT division of a block. FIG. 17B shows an example in which the block is divided into BT in the horizontal direction (HOR). FIG. 17C shows an example in which the block is divided into BT in the vertical direction (VER). As shown in FIGS. 17B and 17C, the BT division divides the sides of the block into one-to-one correspondence. FIG. 17D shows an example in which the block is not divided. FIG. 17E shows an example in which a block is TT-divided in the horizontal direction (HOR). FIG. 17F shows an example in which a block is TT-divided in the vertical direction (VER). In the TT division, the divided side of the block is divided into 1 to 2 to 1.

なお、本明細書では、分割に関して、「水平」および「垂直」という用語は、分割線の方向を指すものとする。したがって、「水平分割」「水平方向の分割」とは、水平な境界線による分割、すなわち、上と下の2つのブロックに分割することを意味する。また、「垂直分割」「垂直方向の分割」とは、垂直な境界線による分割、すなわち、左と右の2つのブロックに分割することを意味する。   In the present specification, regarding the division, the terms “horizontal” and “vertical” refer to the direction of the dividing line. Accordingly, “horizontal division” and “horizontal division” mean division by a horizontal boundary line, that is, division into two blocks, upper and lower. “Vertical division” and “vertical division” mean division by a vertical boundary line, that is, division into two blocks, left and right.

なお、本明細書では例示していないが別の用語法も存在する。すなわち、本明細書の水平分割を、あるブロックが垂直方向に並ぶ2つ以上のブロックに分割されるため、垂直に分割(split vertically)と呼ぶこともある。また、本明細書の垂直分割を、あるブロックが水平方向に並ぶ2つ以上のブロックに分割されるため水平に分割(split horizontally)と呼ぶこともある。上記、別の用語法における、垂直分割の記載が本明細書の水平分割を意味することがあるので注意が必要である(又はその逆)。この場合には、当該用語が意味するところにおいて適宜読み替える。   Although not exemplified in this specification, there is another terminology. That is, the horizontal division of the present specification is divided into two or more blocks in which a certain block is arranged in the vertical direction, and may be referred to as split vertically. In addition, the vertical division of the present specification may be called split horizontally because a certain block is divided into two or more blocks arranged in the horizontal direction. It should be noted that the description of vertical division in the above other terminology may mean horizontal division in the present specification (or vice versa). In this case, the term is appropriately read in the meaning of the term.

図18は、画像復号装置31が行う分木タイプのシグナリングを示す図である。図18に示すように、画像復号装置31は、CTUまたはCNに対して4分木(Quad tree)分割を繰り返すことによってRT(region tree)分割を行う。その後、画像復号装置31はPT(Partition Tree, multi tree)分割(BT分割またはTT分割)のフラグがあると、ブロックを水平に分割するか、あるいは、垂直に分割するかを判断する。その後、画像復号装置31は当該分割がBT分割であるか、あるいは、TT分割であるかを判断し、ブロックを分割する。   FIG. 18 is a diagram illustrating tree-type signaling performed by the image decoding device 31. As illustrated in FIG. 18, the image decoding device 31 performs RT (region tree) division by repeating quadtree division on CTU or CN. Thereafter, when there is a PT (Partition Tree, multi tree) partitioning (BT partitioning or TT partitioning) flag, the image decoding device 31 determines whether to divide the block horizontally or vertically. Thereafter, the image decoding device 31 determines whether the division is BT division or TT division, and divides the block.

(画像復号装置31の構成)
図19に、本実施形態に係る画像復号装置31の構成を示す。図19は、本実施形態に係る画像復号装置31の要部構成を示すブロック図である。図19では、図を簡略化するために、一部の部材の図示を省略している。また、説明の便宜上、図3に示した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
(Configuration of Image Decoding Device 31)
FIG. 19 shows a configuration of the image decoding device 31 according to the present embodiment. FIG. 19 is a block diagram illustrating a main configuration of the image decoding device 31 according to the present embodiment. In FIG. 19, in order to simplify the drawing, illustration of some members is omitted. For convenience of explanation, members having the same functions as those shown in FIG. 3 are denoted by the same reference numerals, and description thereof is omitted.

図19に示すように、画像復号装置31は、復号モジュール9、CN情報復号部10(復号部)、予測画像生成部308、逆量子化・逆DCT部311、参照ピクチャメモリ306、加算部312、ループフィルタ305、ヘッダ復号部19、及びCU復号部20を備えている。また、図19においては図示を省略しているが、本実施形態に係る画像復号装置31は、図12に示すようなサブブロック予測パラメータ導出部3037を備えている。また、本実施形態に係るサブブロック予測パラメータ導出部3037は、図12に示すようなマッチング動き導出部30373を備えている。CU復号部20は、さらにPU情報復号部12及びTT情報復号部13を備えており、TT情報復号部13は、さらにTU復号部22を備えている。   As illustrated in FIG. 19, the image decoding device 31 includes a decoding module 9, a CN information decoding unit 10 (decoding unit), a predicted image generation unit 308, an inverse quantization / inverse DCT unit 311, a reference picture memory 306, and an addition unit 312. A loop filter 305, a header decoding unit 19, and a CU decoding unit 20. Although not shown in FIG. 19, the image decoding device 31 according to the present embodiment includes a sub-block prediction parameter deriving unit 3037 as shown in FIG. Further, the sub-block prediction parameter deriving unit 3037 according to this embodiment includes a matching motion deriving unit 30373 as shown in FIG. The CU decoding unit 20 further includes a PU information decoding unit 12 and a TT information decoding unit 13, and the TT information decoding unit 13 further includes a TU decoding unit 22.

復号モジュール9は、バイナリデータからシンタックス値を復号する復号処理を行う。より具体的には、復号モジュール9は、供給元から供給される符号化データ及びシンタックス種別に基づいて、CABAC等のエントロピー符号化方式により符号化されているシンタックス値を復号し、復号したシンタックス値を供給元に返す。   The decoding module 9 performs a decoding process for decoding a syntax value from binary data. More specifically, the decoding module 9 decodes and decodes a syntax value encoded by an entropy encoding method such as CABAC based on encoded data and syntax type supplied from the supplier. Returns the syntax value to the supplier.

以下に示す例では、符号化データ及びシンタックス種別の供給元は、CN情報復号部10、CU復号部20(PU情報復号部12及びTT情報復号部13)である。   In the example shown below, the sources of encoded data and syntax type are the CN information decoding unit 10 and the CU decoding unit 20 (PU information decoding unit 12 and TT information decoding unit 13).

ヘッダ復号部19は、画像符号化装置11から入力された符号化データのVPS(video parameter set)、SPS、PPS、スライスヘッダを復号する。   The header decoding unit 19 decodes the VPS (video parameter set), SPS, PPS, and slice header of the encoded data input from the image encoding device 11.

CN情報復号部10は、復号モジュール9を用いて、画像符号化装置11から入力された符号化データについて、符号化ツリーユニット及び符号化ノードの復号処理を行う。CN情報復号部10は、具体的には、以下の手順により符号化データから、CTU情報及びCN情報を復号する。   The CN information decoding unit 10 uses the decoding module 9 to perform decoding processing of the encoding tree unit and the encoding node on the encoded data input from the image encoding device 11. Specifically, the CN information decoding unit 10 decodes the CTU information and the CN information from the encoded data according to the following procedure.

まず、CN情報復号部10は、復号モジュール9を用いて、CTUに含まれるCTU情報からツリーユニットヘッダCTUHを復号する。次に、CN情報復号部10は、CNに含まれるCN情報から、対象CNをQT分割するか否かを示すQT分割フラグ、対象CNをBT分割またはTT分割するか否かを示すPT分割フラグ、BT分割またはTT分割の分割方向を示す分割方向フラグ(mt_dir_flag)、PT分割の分割方法(BT分割またはTT分割)を示す分割モード選択フラグ(split_mt_flag)を復号し、QT分割フラグ及びPT分割フラグがさらなる分割を通知しなくなるまで対象CNを再帰的に分割し復号する。最後に、CTU情報からツリーユニットフッタCTUFを復号する。   First, the CN information decoding unit 10 uses the decoding module 9 to decode the tree unit header CTUH from the CTU information included in the CTU. Next, the CN information decoding unit 10 determines, from the CN information included in the CN, a QT division flag indicating whether the target CN is QT-divided, and a PT division flag indicating whether the target CN is BT-divided or TT-divided , A division direction flag (mt_dir_flag) indicating a division direction of BT division or TT division, a split mode selection flag (split_mt_flag) indicating a division method of PT division (BT division or TT division), a QT division flag and a PT division flag The target CN is recursively divided and decoded until no further division is notified. Finally, the tree unit footer CTUF is decoded from the CTU information.

ツリーユニットヘッダCTUH及びツリーユニットフッタCTUFには、対象符号化ツリーユニットの復号方法を決定するために画像復号装置31が参照する符号化パラメータが含まれる。また、CN情報には、QT分割フラグ、PT分割フラグ、分割方向フラグ及び分割モード選択フラグの他、対象CN及び下位または上位の符号化ノードで適用されるパラメータを含んでいてもよい。   The tree unit header CTUH and the tree unit footer CTUF include coding parameters referred to by the image decoding device 31 in order to determine a decoding method of the target coding tree unit. In addition to the QT division flag, the PT division flag, the division direction flag, and the division mode selection flag, the CN information may include parameters applied in the target CN and the lower or higher encoding node.

CU復号部20は、PU情報復号部12及びTT情報復号部13から構成され、最下位の符号化ノードCN(すなわちCU)のPUI情報及びTTI情報を復号する。   The CU decoding unit 20 includes a PU information decoding unit 12 and a TT information decoding unit 13, and decodes PUI information and TTI information of the lowest coding node CN (ie, CU).

PU情報復号部12では各PUのPU情報(マージフラグ(merge_flag)、マージインデックス(merge_idx)、予測動きベクトルインデックス(mvp_idx)、参照画像インデックス(ref_idx)、インター予測識別子(inter_pred_idc)、差分ベクトル(mvd)、及びOBMCフラグOBMC_flag等)を、復号モジュール9を用いて復号する。   In the PU information decoding unit 12, PU information (merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx), inter prediction identifier (inter_pred_idc), difference vector (mvd) of each PU ) And the OBMC flag OBMC_flag) using the decoding module 9.

TT情報復号部13は、各TTI(TU分割フラグsplit_transform_flag、CU残差フラグcbf_cb、cbf_cr、cbf_luma等、及びTU)を、復号モジュール9を用いて復号する。   The TT information decoding unit 13 decodes each TTI (TU division flag split_transform_flag, CU residual flag cbf_cb, cbf_cr, cbf_luma, etc., and TU) using the decoding module 9.

また、TT情報復号部13は、TU復号部22を備えている。TU復号部22は、TUに残差が含まれている場合に、QP更新情報(量子化補正値)を復号する。なお、QP更新情報は、量子化パラメータQPの予測値である量子化パラメータ予測値qPpredからの差分値を示す値である。またTU復号部22は、量子化予測残差(residual_coding)を復号する。   Further, the TT information decoding unit 13 includes a TU decoding unit 22. The TU decoding unit 22 decodes the QP update information (quantization correction value) when a residual is included in the TU. The QP update information is a value indicating a difference value from the quantization parameter predicted value qPpred, which is a predicted value of the quantization parameter QP. The TU decoding unit 22 decodes the quantized prediction residual (residual_coding).

CN情報復号部10によるCN情報復号の動作について、図20を参照して説明する。図20は、本実施形態に係るCN情報復号部10のQT情報復号処理、BT/TT情報復号処理を説明するフローチャートである。また、図22および図23はQT情報復号処理に関するシンタックスの一例を示す図である。なお、図20に示すステップの番号と図22および図23に示すシンタックスの構成に付した番号とが同じである場合、それらは対応した処理を示している。例えば、図20におけるS1421と図23におけるSYN1421とは対応した処理を示している。   The operation of CN information decoding by the CN information decoding unit 10 will be described with reference to FIG. FIG. 20 is a flowchart for explaining the QT information decoding process and the BT / TT information decoding process of the CN information decoding unit 10 according to this embodiment. FIGS. 22 and 23 are diagrams showing an example of syntax related to the QT information decoding process. When the step numbers shown in FIG. 20 and the numbers given to the syntax configurations shown in FIGS. 22 and 23 are the same, they indicate corresponding processes. For example, S1421 in FIG. 20 and SYN1421 in FIG. 23 indicate corresponding processes.

CN情報復号部10によるCN情報復号では、QT情報復号と、BT情報またはTT情報(BT/TT情報)復号とを行う。まず、CN情報復号部10によるQT情報復号について順に説明する。   In CN information decoding by the CN information decoding unit 10, QT information decoding and BT information or TT information (BT / TT information) decoding are performed. First, QT information decoding by the CN information decoding unit 10 will be described in order.

まず、CN情報復号部10は、符号化データからCN情報を復号し、再帰的に符号化ノード(CN:Coding Node)を復号する。具体的には、CN情報復号部10は、QT情報を復号し、対象符号化ツリーcoding_quadtree(x0, y0, log2CbSize, cqtDepth)を復号する。なお、x0, y0は、対象符号化ノードの左上座標、log2CbSizeは符号化ノードのサイズであるCNサイズの、2を底とした対数である対数CNサイズ(例えば、CNサイズが64, 128, 256であれば6, 7, 8)である。cqtDepthは符号化ノードの階層を示すCN階層(QT深度)である。   First, the CN information decoding unit 10 decodes CN information from encoded data, and recursively decodes a coding node (CN). Specifically, the CN information decoding unit 10 decodes the QT information and decodes the target encoding tree coding_quadtree (x0, y0, log2CbSize, cqtDepth). Note that x0 and y0 are the upper left coordinates of the target encoding node, log2CbSize is the CN size that is the size of the encoding node, and the logarithmic CN size that is the logarithm of 2 (for example, the CN size is 64, 128, 256). If so, 6, 7, 8). cqtDepth is a CN hierarchy (QT depth) indicating a hierarchy of coding nodes.

CN情報復号部10は、復号したCN情報にQT分割フラグがあるか否かを判定する。具体的には、CN情報復号部10は、対数CNサイズlog2CbSizeが所定の最小CNサイズの対数値MinCbLog2SizeYより大きいか否かを判定する。対数CNサイズlog2CbSizeがMinCbLog2SizeYより大きい場合には(S1411でYES)、QT分割フラグがあると判定し、S1421に遷移する。それ以外の場合には(S1411でNO)、S1422に遷移する(S1411)。   The CN information decoding unit 10 determines whether or not the decoded CN information has a QT division flag. Specifically, the CN information decoding unit 10 determines whether or not the logarithmic CN size log2CbSize is larger than a logarithmic value MinCbLog2SizeY of a predetermined minimum CN size. If the logarithmic CN size log2CbSize is larger than MinCbLog2SizeY (YES in S1411), it is determined that there is a QT division flag, and the process proceeds to S1421. In other cases (NO in S1411), the process proceeds to S1422 (S1411).

対数CNサイズlog2CbSizeがMinCbLog2SizeYより大きいと判定された場合、CN情報復号部10は、シンタックス要素であるQT分割フラグ(split_cu_flag)を復号する(S1421)。   When it is determined that the logarithmic CN size log2CbSize is larger than MinCbLog2SizeY, the CN information decoding unit 10 decodes a QT split flag (split_cu_flag) that is a syntax element (S1421).

それ以外の場合(対数CNサイズlog2CbSizeがMinCbLog2SizeY以下)、つまり、符号化データにQT分割フラグsplit_cu_flagが現れない場合、CN情報復号部10は、符号化データからのQT分割フラグsplit_cu_flagの復号を省略し、QT分割フラグplit_cu_flagを0として導出する(S1422)。   In other cases (logarithmic CN size log2CbSize is equal to or smaller than MinCbLog2SizeY), that is, when the QT split flag split_cu_flag does not appear in the encoded data, the CN information decoding unit 10 omits decoding of the QT split flag split_cu_flag from the encoded data The QT division flag plit_cu_flag is derived as 0 (S1422).

QT分割フラグsplit_cu_flagが0以外(=1)である場合(S1431でYES)、CN情報復号部10は、一階層下に移行してステップS1411以降の処理を繰り返す。それ以外の場合(1431でYES、QT分割フラグsplit_cu_flagが0の場合)には、BT/TT情報復号処理に遷移する。   When the QT division flag split_cu_flag is other than 0 (= 1) (YES in S1431), the CN information decoding unit 10 moves down one layer and repeats the processes in and after step S1411. In other cases (YES in 1431, QT split flag split_cu_flag is 0), the process proceeds to BT / TT information decoding processing.

CN情報復号部10は、QT分割を行う。具体的には、CN情報復号部10は、CN階層cqtDepth+ 1の位置(x0, y0)、(x1, y0)、(x0, y1)、(x1, y1)で、対数CNサイズlog2CbSize - 1の4つの符号化ノードCNを復号する(S1441)。
coding_quadtree(x0, y0, log2CbSize - 1, cqtDepth + 1 )
coding_quadtree(x1, y0, log2CbSize - 1, cqtDepth + 1 )
coding_quadtree(x0, y1, log2CbSize - 1, cqtDepth + 1 )
coding_quadtree(x1, y1, log2CbSize - 1, cqtDepth + 1 )
すなわち、復号されるブロックは、ラスタースキャン順にスキャンされる。
The CN information decoding unit 10 performs QT division. Specifically, the CN information decoding unit 10 has the logarithmic CN size log2CbSize−1 at the positions (x0, y0), (x1, y0), (x0, y1), (x1, y1) of the CN hierarchy cqtDepth + 1. Four encoded nodes CN are decoded (S1441).
coding_quadtree (x0, y0, log2CbSize-1, cqtDepth + 1)
coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1)
coding_quadtree (x0, y1, log2CbSize-1, cqtDepth + 1)
coding_quadtree (x1, y1, log2CbSize-1, cqtDepth + 1)
That is, the blocks to be decoded are scanned in the raster scan order.

ここで、x0, y0は、対象符号化ノードの左上座標、x1, y1は、以下の式のように、(x0,y0)に、対数CNサイズ(1 <<log2CbSize)の1/2を加えて導出される。
x1 = x0 + (1<<( log2CbSize - 1 ) )
y1 = y0 + (1<<( log2CbSize - 1 ) )
なお、<<は左シフトを示す。1<<Nは2のN乗と同値である(以下同様)。同様に>>は右シフトを示す。
Here, x0, y0 are the upper left coordinates of the target encoding node, and x1, y1 are (x0, y0) plus 1/2 the logarithmic CN size (1 << log2CbSize) as shown in the following formula: Is derived.
x1 = x0 + (1 << (log2CbSize-1))
y1 = y0 + (1 << (log2CbSize-1))
Note that << indicates a left shift. 1 << N is equivalent to 2 raised to the Nth power (the same applies hereinafter). Similarly, >> indicates a right shift.

そして、CN情報復号部10は、符号化ノードの階層を示すCN階層cqtDepthに1を加算し、符号化ユニットサイズの対数値である対数CNサイズlog2CbSizeを1だけ減算(CNサイズを1/2)して更新する。
cqtDepth = cqtDepth + 1
log2CbSize = log2CbSize - 1
CN情報復号部10は、下位の符号化ノードにおいても、更新された左上座標、対数CNサイズ、CN階層を用いて、S1411から開始されるQT情報復号を継続する。
Then, the CN information decoding unit 10 adds 1 to the CN layer cqtDepth indicating the layer of the encoding node, and subtracts the logarithmic CN size log2CbSize, which is a logarithmic value of the encoding unit size, by 1 (CN size is 1/2). And update.
cqtDepth = cqtDepth + 1
log2CbSize = log2CbSize-1
The CN information decoding unit 10 continues the QT information decoding started from S1411 using the updated upper left coordinate, logarithmic CN size, and CN hierarchy even in the lower encoding node.

(CN情報復号部10のQT情報復号処理の流れ)
次に、CN情報復号部10によるBT/TT情報復号処理の概要について、図21を参照して説明する。図21は、CN情報復号部10のBT/TT情報復号処理の流れの一例の概要を示すフローチャートである。また、図24Aから図24CはBT/TT情報復号処理に関するシンタックスの一例を示す図である。
(Flow of QT information decoding process of CN information decoding unit 10)
Next, an outline of the BT / TT information decoding process performed by the CN information decoding unit 10 will be described with reference to FIG. FIG. 21 is a flowchart showing an outline of an example of the flow of the BT / TT information decoding process of the CN information decoding unit 10. 24A to 24C are diagrams illustrating an example of syntax related to the BT / TT information decoding process.

上述のS1431にて、QT分割フラグsplit_cu_flagが0の場合に、CN情報復号部10は対象ブロックがBTあるいはTT分割できるか否かを対象ブロックのサイズ等から判定し、PT分割フラグ(MT分割フラグ)の復号の要否を判定する(S1501:PT分割フラグ判定)。PT分割フラグは対象ブロックをBT分割またはTT分割するか否かを示すフラグである。PT分割フラグの復号が「要」である場合(S1501でYES)、CN情報復号部10はPT分割フラグを復号する(S1502)。続いて、CN情報復号部10は復号したPT分割フラグが0であるか否かを判定する(S1503)。PT分割フラグが0である場合(S1503でNO)、処理は終了する。PT分割フラグが0以外である場合(S1503でYES)、CN情報復号部10は、分割対象ブロックの分割方向が設定されているブロックの分割の制限等によって一意で決まるか否かなどを判定し、分割方向フラグの復号の要否の判定を行う(S1504:分割方向フラグ判定)。分割方向フラグの復号が「要」である場合(分割方向が一意に決まらない場合等)(S1504でYES)、CN情報復号部10は分割方向フラグを復号し(S1505)、分割方向を決定し、処理はS1506に続く。分割方向フラグの復号が「不要」である場合(分割方向が一意で決まる場合等)(S1504でNO)、CN情報復号部10は分割方向フラグを復号せずに、処理はS1506に続く。S1506にて、CN情報復号部10は、分割対象ブロックの分割モード(TT分割、BT分割)が設定されているブロックの分割の制限等によって分割モードが一意で決まるか否かなどを判定し、分割モード選択フラグの復号の要否の判定を行う(S1506:分割モード選択フラグ判定)。分割モード選択フラグの復号が「要」である場合(分割モードが一意で決まらない場合等)(S1506でYES)、CN情報復号部10は分割モード選択フラグを復号し(S1507)、分割モードを決定し、処理はS1508に続く。分割モード選択フラグの復号がの復号が「不要」である場合(分割モードが一意で決まる場合等)(S1506でNO)、CN情報復号部10は分割モード選択フラグを復号せずに、処理はS1508に続く。続いて、S1508にて、CN情報復号部10は分割対象ブロックを決定した方向と決定した分割モードとによって分割する(S1508)。   When the QT split flag split_cu_flag is 0 in S1431, the CN information decoding unit 10 determines whether or not the target block can be BT or TT split based on the size of the target block and the like, and the PT split flag (MT split flag) ) (S1501: PT division flag determination). The PT division flag is a flag indicating whether or not the target block is subjected to BT division or TT division. If decoding of the PT division flag is “necessary” (YES in S1501), the CN information decoding unit 10 decodes the PT division flag (S1502). Subsequently, the CN information decoding unit 10 determines whether or not the decoded PT division flag is 0 (S1503). If the PT division flag is 0 (NO in S1503), the process ends. When the PT division flag is other than 0 (YES in S1503), the CN information decoding unit 10 determines whether or not it is uniquely determined by the restriction on the division of the block in which the division direction of the division target block is set. Then, it is determined whether or not the division direction flag needs to be decoded (S1504: division direction flag determination). When decoding of the division direction flag is “necessary” (when the division direction is not uniquely determined, etc.) (YES in S1504), the CN information decoding unit 10 decodes the division direction flag (S1505) and determines the division direction. The process continues to S1506. If decoding of the division direction flag is “unnecessary” (eg, the division direction is uniquely determined) (NO in S1504), the CN information decoding unit 10 does not decode the division direction flag, and the process continues to S1506. In S1506, the CN information decoding unit 10 determines whether or not the division mode is uniquely determined by the division limitation of the block in which the division mode (TT division, BT division) of the division target block is set, and the like. It is determined whether or not the division mode selection flag needs to be decoded (S1506: division mode selection flag determination). When decoding of the division mode selection flag is “necessary” (when the division mode is not uniquely determined or the like) (YES in S1506), the CN information decoding unit 10 decodes the division mode selection flag (S1507), and sets the division mode. The decision is made and processing continues to S1508. When decoding of the split mode selection flag is “unnecessary” (when the split mode is uniquely determined, etc.) (NO in S1506), the CN information decoding unit 10 does not decode the split mode selection flag, Continue to S1508. Subsequently, in S1508, the CN information decoding unit 10 divides according to the direction in which the division target block is determined and the determined division mode (S1508).

図21のフローチャートに対応するシンタックスを図24Aから図24Cに示す。この中で、例えば、水平方向のTT分割は図24Bに示すように以下の式で示すことができる。
coding_ternary_tree(x0, y0, log2CbWidth - 2, log2CbHeight, cqtDepth + 1 )
coding_ternary_tree(x1, y0, log2CbWidth - 1, log2CbHeight, cqtDepth + 1 )
coding_ternary_tree(x2, y0, log2CbWidth - 2, log2CbHeight, cqtDepth + 1 )
また、水平方向のBT分割は図24Cに示すように以下の式で示すことができる。
coding_binary_tree(x0, y0, log2CbWidth - 2, log2CbHeight, cqtDepth + 1 )
coding_binary_tree(x1, y0, log2CbWidth - 2, log2CbHeight, cqtDepth + 1 )
TT分割およびBT分割において復号されるブロックは、上記式に示すブロックの順でスキャンされることになる。
The syntax corresponding to the flowchart of FIG. 21 is shown in FIGS. 24A to 24C. Among them, for example, the horizontal TT division can be expressed by the following equation as shown in FIG. 24B.
coding_ternary_tree (x0, y0, log2CbWidth-2, log2CbHeight, cqtDepth + 1)
coding_ternary_tree (x1, y0, log2CbWidth-1, log2CbHeight, cqtDepth + 1)
coding_ternary_tree (x2, y0, log2CbWidth-2, log2CbHeight, cqtDepth + 1)
Further, the BT division in the horizontal direction can be expressed by the following equation as shown in FIG. 24C.
coding_binary_tree (x0, y0, log2CbWidth-2, log2CbHeight, cqtDepth + 1)
coding_binary_tree (x1, y0, log2CbWidth-2, log2CbHeight, cqtDepth + 1)
The blocks decoded in the TT division and the BT division are scanned in the order of the blocks shown in the above formula.

続いて、当該分割によって生じたブロックに対してBT/TT情報復号処理を繰り返し行うループ処理を行う(S1509、S1510、S1511)。当該ループ処理が終了すると処理は終了する。   Subsequently, a loop process for repeatedly performing the BT / TT information decoding process on the block generated by the division is performed (S1509, S1510, S1511). When the loop process ends, the process ends.

(テンプレートマッチングにおけるテンプレート領域設定)
第1の実施形態にて説明したように、マッチング動き導出部(動き情報導出部)30373は、テンプレートマッチングにおいて動きベクトル(動き情報)を導出する。詳細には、マッチング動き導出部30373は、対象ブロックに隣接しており復号済みの領域Temp_Cur(テンプレート)と参照ピクチャ上の参照ブロックの隣接領域Temp_L0の動き補償画像とのマッチングにより動きベクトルを導出する。以下に、本実施形態に係るテンプレートマッチングにおけるテンプレート領域の設定の例について説明する。以下に説明する各「テンプレート領域設定の例」にて示す構成は、対象ブロックの直前に処理されるブロックに含まれる画素がテンプレートマッチングのテンプレート領域に設定されることを抑制することを目的とした構成である。
(Template area setting in template matching)
As described in the first embodiment, the matching motion deriving unit (motion information deriving unit) 30373 derives a motion vector (motion information) in template matching. Specifically, the matching motion deriving unit 30373 derives a motion vector by matching the decoded region Temp_Cur (template) adjacent to the target block and the motion compensated image of the adjacent region Temp_L0 of the reference block on the reference picture. . Hereinafter, an example of setting a template area in template matching according to the present embodiment will be described. The configuration shown in each “example of template area setting” described below is intended to suppress setting of a pixel included in a block processed immediately before the target block as a template area for template matching. It is a configuration.

(テンプレートマッチングにおけるテンプレート領域設定の例1)
本例に係るマッチング動き導出部30373は、対象ブロックの直前に処理したブロックに含まれる画素をテンプレートマッチングのテンプレートに設定しない。
(Example 1 of template area setting in template matching)
The matching motion deriving unit 30373 according to this example does not set the pixel included in the block processed immediately before the target block as the template for template matching.

上記の構成によれば、マッチング動き導出部30373は、対象ブロックの直前に復号するブロックに含まれる画素をテンプレート領域に設定せずに動きベクトルを導出する。すなわち、画像復号装置31は、直前に処理されるブロックにおける復号処理の終了を待たずに、次のブロックの予測画像生成処理を開始することができるという効果を奏する。なお、本実施形態においては、上記対象ブロックをCUとしてもよい。   According to the above configuration, the matching motion deriving unit 30373 derives a motion vector without setting the pixel included in the block to be decoded immediately before the target block as the template region. In other words, the image decoding device 31 can start the predicted image generation processing for the next block without waiting for the end of the decoding processing for the block processed immediately before. In the present embodiment, the target block may be a CU.

次に、本例に係るテンプレートマッチングにおけるテンプレート領域の設定について、図25から図27を参照して詳細に説明する。図25から図27は本例に係るマッチング動き導出部30373が設定するテンプレート領域の一例を示す図である。   Next, setting of a template area in template matching according to the present example will be described in detail with reference to FIGS. 25 to 27 are diagrams showing an example of a template area set by the matching motion deriving unit 30373 according to this example.

図25から図27に示すCTUは第1のQT分割によって分割され、第1のQT分割によって生成された各ブロックはさらに以下のように分割されている。第1のQT分割により生成された左上のブロックは分割されない。第1のQT分割により生成された右上のブロックは、垂直方向のBT分割が行われている。第1のQT分割により生成された左下のブロックは、第2のQT分割が行われている。第1のQT分割により生成された右下のブロックは、水平方向のTT分割が行われている。   The CTU shown in FIG. 25 to FIG. 27 is divided by the first QT division, and each block generated by the first QT division is further divided as follows. The upper left block generated by the first QT division is not divided. In the upper right block generated by the first QT division, vertical BT division is performed. The lower left block generated by the first QT division is subjected to the second QT division. The lower right block generated by the first QT division is subjected to horizontal TT division.

図25から図27において、Tを付しているブロックはテンプレートマッチングの対象となる対象ブロックであり、Pを付しているブロックは対象ブロック(T)の直前に復号処理されるブロック(以降、「直前のブロック」とよぶ)である。また、図25から図27に示されている塗りつぶされている領域は対象ブロック(T)に対して設定されるテンプレート領域である。   In FIG. 25 to FIG. 27, a block with T is a target block to be subjected to template matching, and a block with P is a block (hereinafter referred to as a block to be decoded) immediately before the target block (T). It is called “Previous Block”). In addition, the filled area shown in FIGS. 25 to 27 is a template area set for the target block (T).

図25の(a)は、第1のQT分割によって生成された左上のブロックが対象ブロックとなった場合のテンプレート領域を示している。   FIG. 25A shows a template region when the upper left block generated by the first QT division is the target block.

図25の(b)および(c)は、第1のQT分割によって生成された右上のブロックをさらに垂直方向にBT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (B) and (c) of FIG. 25 show template regions when each block generated by further BT-dividing the upper right block generated by the first QT division in the vertical direction becomes the target block. ing.

図26の(a)から(d)は、第1のQT分割によって生成された左下のブロックをさらにQT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (A) to (d) of FIG. 26 show template regions in the case where each block generated by further QT-dividing the lower left block generated by the first QT division becomes the target block.

図27の(a)から(c)は、第1のQT分割によって生成された右下のブロックをさらに水平方向にTT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (A) to (c) of FIG. 27 show template regions in the case where each block generated by further TT-dividing the lower right block generated by the first QT division in the horizontal direction becomes the target block. Show.

第1の実施形態では、テンプレート領域Temp_Curは、対象ブロック(サブブロックCur_block)の上側に隣接する領域及び対象ブロックの左側に隣接する領域から構成される。   In the first embodiment, the template region Temp_Cur includes a region adjacent to the upper side of the target block (sub block Cur_block) and a region adjacent to the left side of the target block.

一方で、本例においては、下記のようにテンプレート領域が制限される。   On the other hand, in this example, the template area is limited as follows.

図25の(b)および(c)、図26の(b)および(d)に示すように、本例においては対象ブロックの左側に隣接するブロックが直前のブロックである場合、対象ブロックの左側に隣接する領域はテンプレート領域にならない。すなわち、対象ブロックの左側に隣接するブロックが直前のブロックである場合、対象ブロックの上側に隣接する領域がテンプレート領域に設定される。   As shown in FIGS. 25B and 25C and FIGS. 26B and 26D, in this example, when the block adjacent to the left side of the target block is the immediately preceding block, the left side of the target block. The area adjacent to is not a template area. That is, when the block adjacent to the left side of the target block is the immediately preceding block, the region adjacent to the upper side of the target block is set as the template region.

また、図27の(b)および図27の(c)に示すように、対象ブロックの上側に隣接するブロックが直前のブロックである場合、対象ブロックの上側に隣接する領域はテンプレート領域に設定されない。すなわち、対象ブロックの上側に隣接するブロックが直前のブロックである場合、対象ブロックの左側に隣接する領域がテンプレート領域に設定される。   As shown in FIGS. 27B and 27C, when the block adjacent to the upper side of the target block is the immediately preceding block, the area adjacent to the upper side of the target block is not set as the template area. . That is, when the block adjacent to the upper side of the target block is the immediately preceding block, the area adjacent to the left side of the target block is set as the template area.

また、図25の(a)、図26の(a)および(c)、図27の(a)に示すように、対象ブロックの左側および上側に隣接するブロックが直前のブロックでない場合、対象ブロックの上側および左側に隣接する領域がテンプレート領域に設定される。   In addition, as shown in FIGS. 25A, 26A and 26C, and FIG. 27A, if the block adjacent to the left and upper sides of the target block is not the immediately preceding block, the target block A region adjacent to the upper side and the left side is set as a template region.

マッチング動き導出部30373は、対象ブロックの上側に隣接する領域または対象ブロックの左側に隣接する領域をテンプレート領域とするか否かを、以下のように判断してもよい。   The matching motion deriving unit 30373 may determine whether or not to use the region adjacent to the upper side of the target block or the region adjacent to the left side of the target block as a template region as follows.

以下の2つの条件(1)および(2)の両方が満たされる場合、対象ブロックの左側に隣接する領域は直前のブロックと重複する。   When both of the following two conditions (1) and (2) are satisfied, the region adjacent to the left side of the target block overlaps with the immediately preceding block.

条件(1):対象ブロックのx座標の値が、直前のブロックのx座標の値に直前のブロックの幅を加えた値に等しい。   Condition (1): The x coordinate value of the target block is equal to the x coordinate value of the immediately preceding block plus the width of the immediately preceding block.

条件(2):対象ブロックのy座標の値が、直前のブロックのy座標の値以上、かつ、直前のブロックのy座標に直前のブロックの高さを加えた値未満である。   Condition (2): The value of the y coordinate of the target block is not less than the value of the y coordinate of the immediately preceding block and less than the value of the y coordinate of the immediately preceding block plus the height of the immediately preceding block.

条件(1)および(2)の両方が満たされる場合、マッチング動き導出部30373は、対象ブロックの左側に隣接する領域はテンプレート領域に利用できないと判断する。例えば、マッチング動き導出部30373は対象ブロックの左側に隣接する領域をテンプレート領域に利用することができるか否かを示すフラグであるleftAvailを0に設定する。   When both the conditions (1) and (2) are satisfied, the matching motion derivation unit 30373 determines that the region adjacent to the left side of the target block cannot be used as the template region. For example, the matching motion deriving unit 30373 sets leftAvail, which is a flag indicating whether or not an area adjacent to the left side of the target block can be used as a template area, to 0.

対象ブロックの座標を(xCU, yCU)とし、直前のブロックの座標を(xPrevCU, yPrevCU)とし、直前のブロックのサイズ(幅,高さ)を(wPrev, hPrev)とすると、上記の判断を以下の式として示すことができる。   If the target block coordinates are (xCU, yCU), the previous block coordinates are (xPrevCU, yPrevCU), and the previous block size (width, height) is (wPrev, hPrev), the above judgment is as follows: It can be shown as a formula of

leftAvail = !{ (xCU == xPrevCU + wPrevCU) && (yPrevCU <= yCU) && (yCU < yPrevCU + hPrev) }
また、以下の2つの条件(3)および(4)の両方が満たされる場合、対象ブロックの上側に隣接する領域は直前のブロックと重複する。
leftAvail =! {(xCU == xPrevCU + wPrevCU) && (yPrevCU <= yCU) && (yCU <yPrevCU + hPrev)}
When both of the following two conditions (3) and (4) are satisfied, the area adjacent to the upper side of the target block overlaps with the immediately preceding block.

条件(3):対象ブロックのy座標の値が、直前のブロックのy座標の値に直前のブロックの高さを加えた値に等しい。   Condition (3): The value of the y coordinate of the target block is equal to the value of the y coordinate of the immediately preceding block plus the height of the immediately preceding block.

条件(4):対象ブロックのx座標の値が、直前のブロックのx座標の値以上、かつ、直前のブロックのx座標に直前のブロックの幅を加えた値未満である。   Condition (4): The x-coordinate value of the target block is equal to or greater than the x-coordinate value of the immediately preceding block and less than the value obtained by adding the width of the immediately preceding block to the x coordinate of the immediately preceding block.

条件(3)および(4)の両方が満たされる場合、マッチング動き導出部30373は、対象ブロックの上側に隣接する領域はテンプレート領域に利用できないと判断する。例えば、マッチング動き導出部30373は対象ブロックの上側に隣接する領域をテンプレート領域に利用することができるか否かを示すフラグであるaboveAvailを0(利用不可)に設定する。   When both the conditions (3) and (4) are satisfied, the matching motion derivation unit 30373 determines that the area adjacent to the upper side of the target block cannot be used as the template area. For example, the matching motion deriving unit 30373 sets aboveAvail, which is a flag indicating whether or not an area adjacent to the upper side of the target block can be used as a template area, to 0 (unusable).

上記の判断は以下の式として示すことができる。
aboveAvail = !{ (yCU == yPrevCU + hPrevCU) && (xPrevCU <= xCU) && (xCU < xPrevCU + wPrev) }
マッチング動き導出部30373はleftAvailとaboveAvailとの何れかが1の場合に、導出したテンプレート領域を用いて、マッチングにより対象ブロックの動きベクトルを導出する。なお、マッチング動き導出部30373はleftAvail=aboveAvail=1の場合には左と上、leftAvail=1の場合には左、aboveAvail=1の場合には上に隣接する領域をテンプレート領域として導出する。
The above judgment can be expressed as the following equation.
aboveAvail =! {(yCU == yPrevCU + hPrevCU) && (xPrevCU <= xCU) && (xCU <xPrevCU + wPrev)}
When either leftAvail or aboveAvail is 1, the matching motion deriving unit 30373 derives the motion vector of the target block by matching using the derived template region. Note that the matching motion deriving unit 30373 derives the left and upper areas when leftAvail = aboveAvail = 1, the left area when leftAvail = 1, and the upper adjacent area when aboveAvail = 1 as a template area.

(テンプレートマッチングにおけるテンプレート領域設定の例2)
本例に係るマッチング動き導出部30373は、対象ブロックに割り振られているインデックスに応じて、テンプレートマッチングのテンプレート領域を設定する。
(Example 2 of template area setting in template matching)
The matching motion deriving unit 30373 according to this example sets a template region for template matching according to the index allocated to the target block.

例えば、当該インデックスは、対象ブロックのスキャン順(処理順)、対象ブロックの空間的配置に応じて、上位ブロック(親ブロック)の分割により当該対象ブロックが生成された時にCN情報復号部10によって設定されてもよい。上記構成によれば、対象ブロックに割り振られたインデックスに応じて対象ブロックのテンプレート領域を設定することにより、対象ブロックの処理順及び空間的配置に応じてテンプレート領域を設定することができるという効果を奏する。   For example, the index is set by the CN information decoding unit 10 when the target block is generated by dividing the upper block (parent block) according to the scan order (processing order) of the target block and the spatial arrangement of the target block. May be. According to the above configuration, by setting the template area of the target block according to the index allocated to the target block, it is possible to set the template area according to the processing order and spatial arrangement of the target block. Play.

次に、本例に係るテンプレートマッチングにおけるテンプレート領域の設定について、図28から図30を参照して詳細に説明する。図28から図30は本例に係るマッチング動き導出部30373が設定するテンプレート領域の一例を示す図である。   Next, setting of a template area in template matching according to the present example will be described in detail with reference to FIGS. 28 to 30 are diagrams showing an example of a template area set by the matching motion deriving unit 30373 according to this example.

図28から図30において、Tを付しているブロックはテンプレートマッチングの対象となる対象ブロックであり、Pを付しているブロックは直前のブロックである。本例においては、各ブロックはラスタースキャンの順に復号処理されるものとする。また、図28から図30に示されている塗りつぶされている領域は対象ブロック(T)のテンプレート領域である。   In FIG. 28 to FIG. 30, a block given T is a target block to be subjected to template matching, and a block given P is the immediately preceding block. In this example, each block is decoded in the order of raster scan. Also, the filled area shown in FIGS. 28 to 30 is the template area of the target block (T).

はじめに、QT分割によって生成されたブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域について説明する。図28の(a)から(d)は、QT分割によって生成されたブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。   First, an index allocated to a block generated by QT division and a template area corresponding to the index will be described. (A) to (d) of FIG. 28 are diagrams showing an example of an index allocated to a block generated by QT division and a template region corresponding to the index.

図28の(a)は、QT分割によって生成された左上のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。。図28の(a)に示すように、QT分割によって生成された左上のブロックには、インデックスとして、blk_idx = 0がCN情報復号部10によって割り振られる。blk_idx = 0が割り振られたブロックに対して、マッチング動き導出部30373は、テンプレート領域を、当該インデックスを用いて設定しない。   FIG. 28A is a diagram illustrating an example of an index allocated to the upper left block generated by the QT division and a template region corresponding to the index. . As shown in (a) of FIG. 28, blk_idx = 0 is allocated as an index by the CN information decoding unit 10 to the upper left block generated by the QT division. For the block to which blk_idx = 0 is assigned, the matching motion derivation unit 30373 does not set the template area using the index.

また、図28の(b)は、QT分割によって生成された右上のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図28の(b)に示すように、QT分割によって生成された右上のブロックには、インデックスとして、blk_idx = 1がCN情報復号部10によって割り振られる。また、右上のブロックの直前のブロックは、当該QT分割によって生成された左上のブロックとなる。右上のブロックのテンプレート領域が直前のブロック(左上のブロック)に含まれていることを避けるため、右上のブロックのテンプレート領域には、対象ブロックの上側に隣接する領域が設定される。すなわち、マッチング動き導出部30373は、blk_idx = 1が割り振られたブロックのテンプレート領域に、対象ブロックの上側に隣接する領域を設定する。   FIG. 28B is a diagram illustrating an example of an index allocated to the upper right block generated by the QT division and a template region corresponding to the index. As shown in (b) of FIG. 28, blk_idx = 1 is assigned as an index by the CN information decoding unit 10 to the upper right block generated by the QT division. The block immediately before the upper right block is the upper left block generated by the QT division. In order to avoid that the template area of the upper right block is included in the immediately preceding block (upper left block), an area adjacent to the upper side of the target block is set in the template area of the upper right block. That is, the matching motion derivation unit 30373 sets a region adjacent to the upper side of the target block in the template region of the block to which blk_idx = 1 is allocated.

また、図28の(c)は、QT分割によって生成された左下のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図28の(c)に示すように、QT分割によって生成された左下のブロックには、インデックスとして、blk_idx = 2が割り振られる。また、左下のブロックの直前のブロックは、当該QT分割によって生成された右上のブロックとなる。すなわち、左下のブロックの上側に隣接する領域および左側に隣接する領域は、直前のブロック(右上のブロック)に含まれない。そのため、左下のブロックのテンプレート領域には、対象ブロックの上側に隣接する領域および左側に隣接する領域が設定される。すなわち、マッチング動き導出部30373は、blk_idx = 2が割り振られたブロックのテンプレート領域に対象ブロックの上側に隣接する領域および対象ブロックの左側に隣接する領域を設定する。   FIG. 28C is a diagram illustrating an example of an index allocated to the lower left block generated by the QT division and a template region corresponding to the index. As shown in (c) of FIG. 28, blk_idx = 2 is allocated as an index to the lower left block generated by the QT division. The block immediately before the lower left block is the upper right block generated by the QT division. That is, the area adjacent to the upper side of the lower left block and the area adjacent to the left side are not included in the immediately preceding block (upper right block). Therefore, a region adjacent to the upper side of the target block and a region adjacent to the left side are set in the template region of the lower left block. That is, the matching motion deriving unit 30373 sets a region adjacent to the upper side of the target block and a region adjacent to the left side of the target block in the template region of the block to which blk_idx = 2 is allocated.

また、図28の(d)は、QT分割によって生成された右下のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図28の(d)に示すように、QT分割によって生成された右下のブロックには、インデックスとして、blk_idx = 3がCN情報復号部10によって割り振られる。また、右下のブロックの直前のブロックは、当該QT分割によって生成された左下のブロックとなる。右下のブロックのテンプレート領域が直前のブロック(左下のブロック)に含まれていることを避けるため、右下のブロックのテンプレート領域には、対象ブロックの上側に隣接する領域が設定される。すなわち、マッチング動き導出部30373は、blk_idx = 3が割り振られたブロックのテンプレート領域に、対象ブロックの上側に隣接する領域を設定する。   FIG. 28D is a diagram illustrating an example of an index allocated to the lower right block generated by QT division and a template region corresponding to the index. As shown in (d) of FIG. 28, blk_idx = 3 is allocated by the CN information decoding unit 10 as an index to the lower right block generated by the QT division. The block immediately before the lower right block is the lower left block generated by the QT division. In order to avoid that the template area of the lower right block is included in the immediately preceding block (lower left block), an area adjacent to the upper side of the target block is set in the template area of the lower right block. That is, the matching motion derivation unit 30373 sets a region adjacent to the upper side of the target block in the template region of the block to which blk_idx = 3 is allocated.

QT分割によって生成されたブロック(split_cu_flag==1の場合)における、マッチング動き導出部30373によるテンプレート領域の設定は以下の式として示すことができる。
availAbove = (blk_idx > 0) ? 1 : 0
availLeft = (blk_idx == 2) ? 1 : 0
なお、上記availAboveは対象ブロックの上側に隣接する領域をテンプレート領域に利用することができるか否かを示すフラグである。また、上記availLeftは対象ブロックの左側に隣接する領域をテンプレート領域に利用することができるか否かを示すフラグである。上記各フラグが示す値が0の場合は対応領域が利用不可であることを示し、上記各フラグが示す値が1の場合は対応領域が利用可能であることを示す。
The template region setting by the matching motion deriving unit 30373 in the block generated by QT division (when split_cu_flag == 1) can be expressed as the following equation.
availAbove = (blk_idx> 0)? 1: 0
availLeft = (blk_idx == 2)? 1: 0
The availAbove is a flag indicating whether or not an area adjacent to the upper side of the target block can be used as a template area. The availLeft is a flag indicating whether or not an area adjacent to the left side of the target block can be used as a template area. When the value indicated by each flag is 0, it indicates that the corresponding area is unusable, and when the value indicated by each flag is 1, it indicates that the corresponding area is available.

次に、BT分割およびTT分割によって生成されたブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域について説明する。図29の(a)および(b)は、垂直方向のBT分割によって生成されたブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。   Next, an index allocated to a block generated by BT division and TT division and a template area corresponding to the index will be described. FIGS. 29A and 29B are diagrams showing an example of an index allocated to a block generated by BT division in the vertical direction and a template region corresponding to the index.

図29の(a)は、垂直方向のBT分割によって生成された左のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図29の(a)に示すように、垂直方向のBT分割によって生成された左のブロックには、インデックスとして、blk_idx = 0がCN情報復号部10によって割り振られる。blk_idx = 0が割り振られたブロックに対して、マッチング動き導出部30373はテンプレート領域を、該インデックスを用いて設定しない。   FIG. 29A is a diagram illustrating an example of an index allocated to the left block generated by the BT division in the vertical direction and a template region corresponding to the index. As shown in (a) of FIG. 29, blk_idx = 0 is assigned by the CN information decoding unit 10 as an index to the left block generated by the BT division in the vertical direction. For the block to which blk_idx = 0 is assigned, the matching motion derivation unit 30373 does not set the template area using the index.

また、図29の(b)は、垂直方向のBT分割によって生成された右のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図29の(b)に示すように、BT分割によって生成された右のブロックには、インデックスとして、blk_idx = 1がCN情報復号部10によって割り振られる。また、右のブロックの直前のブロックは、当該BT分割によって生成された左のブロックとなる。右のブロックのテンプレート領域が直前のブロック(左のブロック)に含まれていることを避けるため、右のブロックのテンプレート領域には、対象ブロックの上側に隣接する領域が設定される。すなわち、マッチング動き導出部30373は、BT分割の分割方向および対象ブロックに割り振られたインデックスに応じて、テンプレート領域を設定する。   FIG. 29B is a diagram illustrating an example of an index allocated to the right block generated by the BT division in the vertical direction and a template region corresponding to the index. As shown in (b) of FIG. 29, blk_idx = 1 is allocated as an index by the CN information decoding unit 10 to the right block generated by BT division. Also, the block immediately before the right block is the left block generated by the BT division. In order to avoid that the template area of the right block is included in the immediately preceding block (left block), an area adjacent to the upper side of the target block is set in the template area of the right block. That is, the matching motion derivation unit 30373 sets the template area according to the division direction of the BT division and the index assigned to the target block.

図30の(a)から(c)は、水平方向のTT分割によって生成されたブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。   FIGS. 30A to 30C are diagrams showing an example of an index allocated to a block generated by TT division in the horizontal direction and a template region corresponding to the index.

図30の(a)は、水平方向のTT分割によって生成された上のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図30の(a)に示すように、水平方向のTT分割によって生成された上のブロックには、インデックスとして、blk_idx = 0がCN情報復号部10によって割り振られる。blk_idx = 0が割り振られたブロックに対しては、マッチング動き導出部30373はテンプレート領域を、該インデックスを用いて設定しない。   FIG. 30A is a diagram illustrating an example of an index allocated to the upper block generated by the TT division in the horizontal direction and a template region corresponding to the index. As shown in FIG. 30A, blk_idx = 0 is assigned as an index by the CN information decoding unit 10 to the upper block generated by the TT division in the horizontal direction. For a block to which blk_idx = 0 is assigned, the matching motion derivation unit 30373 does not set a template area using the index.

また、図30の(b)は、水平方向のTT分割によって生成された中央のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図30の(b)に示すように、水平方向のTT分割によって生成された中央のブロックには、インデックスとして、blk_idx = 1がCN情報復号部10によって割り振られる。また、中央のブロックの直前のブロックは、当該TT分割によって生成された上のブロックとなる。中央のブロックのテンプレート領域が直前のブロック(上のブロック)に含まれていることを避けるため、中央のブロックのテンプレート領域には、対象ブロックの左側に隣接する領域が設定される。   FIG. 30B is a diagram illustrating an example of an index allocated to the central block generated by the TT division in the horizontal direction and a template area corresponding to the index. As shown in FIG. 30B, the CN information decoding unit 10 assigns blk_idx = 1 as an index to the central block generated by the TT division in the horizontal direction. Further, the block immediately before the central block is the upper block generated by the TT division. In order to avoid that the template area of the central block is included in the immediately preceding block (upper block), an area adjacent to the left side of the target block is set in the template area of the central block.

また、図30の(c)は、水平方向のTT分割によって生成された下のブロックに割り振られるインデックスおよび当該インデックスに対応するテンプレート領域の一例を示す図である。図30の(c)に示すように、水平方向のTT分割によって生成された下のブロックには、インデックスとして、blk_idx = 2がCN情報復号部10によって割り振られる。また、下のブロックの直前のブロックは、当該TT分割によって生成された中央のブロックとなる。下のブロックのテンプレート領域が直前のブロック(中央のブロック)に含まれていることを避けるため、下のブロックのテンプレート領域には、対象ブロックの左側に隣接する領域が設定される。すなわち、マッチング動き導出部30373は、TT分割の分割方向および対象ブロックに割り振られたインデックスに応じて、テンプレート領域を設定する。   FIG. 30C is a diagram illustrating an example of an index allocated to a lower block generated by the TT division in the horizontal direction and a template region corresponding to the index. As shown in FIG. 30C, blk_idx = 2 is assigned by the CN information decoding unit 10 as an index to the lower block generated by the TT division in the horizontal direction. In addition, the block immediately before the lower block is a central block generated by the TT division. In order to avoid that the template area of the lower block is included in the immediately preceding block (center block), an area adjacent to the left side of the target block is set in the template area of the lower block. That is, the matching motion derivation unit 30373 sets a template region according to the division direction of the TT division and the index assigned to the target block.

BT分割またはTT分割によって生成されたブロック(split_mt_flag==1の場合)における、マッチング動き導出部30373によるテンプレート領域の設定は以下の式として示すことができる。なお、split_mt_flagはBT分割またはTT分割するか否かを示すフラグであり、当該フラグの値が1を示す場合、CN情報復号部10はBT分割またはTT分割を行う。
availAbove = (mt_dir_flag == 1) && (blk_idx > 0) ? 1 : 0
availLeft = (mt_dir_flag == 0) && (blk_idx > 0) ? 1 : 0
なお、mt_dir_flagはBT分割またはTT分割の分割方向を示す分割方向フラグであり、当該フラグの値が1である場合の分割方向は垂直方向であり、当該フラグの値が0である場合の分割方向は水平方向である。
The template region setting by the matching motion deriving unit 30373 in the block generated by BT division or TT division (when split_mt_flag == 1) can be expressed as the following equation. Note that split_mt_flag is a flag indicating whether to perform BT partitioning or TT partitioning. When the value of the flag indicates 1, the CN information decoding unit 10 performs BT partitioning or TT partitioning.
availAbove = (mt_dir_flag == 1) &&(blk_idx> 0)? 1: 0
availLeft = (mt_dir_flag == 0) &&(blk_idx> 0)? 1: 0
Note that mt_dir_flag is a division direction flag indicating the division direction of BT division or TT division. When the value of the flag is 1, the division direction is the vertical direction, and when the value of the flag is 0, the division direction Is horizontal.

上述の例においては、垂直方向のBT分割および水平方向のTT分割によって生成されるブロックのテンプレート領域について説明した。一方で、水平方向のBT分割および垂直方向のTT分割によって生成されるブロックのテンプレート領域についても、上述の構成を適宜適用してもよい。   In the above example, the template region of the block generated by the vertical BT division and the horizontal TT division has been described. On the other hand, the above-described configuration may be applied as appropriate to a template region of a block generated by horizontal BT division and vertical TT division.

(テンプレートマッチングにおけるテンプレート領域設定の例3)
本例に係る対象ブロックは、対象ブロックよりも上位のブロックである上位ブロック(親ブロック)を分割することによって生じる。また、マッチング動き導出部30373は、上記対象ブロックに割り振られているインデックスと上記上位ブロックに割り振られているインデックスとの両方のインデックスに応じて、上記テンプレート領域を設定する。
(Example 3 of template area setting in template matching)
The target block according to this example is generated by dividing an upper block (parent block) that is a block higher than the target block. Also, the matching motion deriving unit 30373 sets the template area according to both the index allocated to the target block and the index allocated to the upper block.

上記の構成によれば、マッチング動き導出部30373は、対象ブロックに割り振られているインデックスに加え、上位のブロックに割り振られているインデックスを用いて、対象ブロックのテンプレート領域を設定する。そのため、直前のブロックに含まれる領域を除外したテンプレート領域を正確に設定できるという効果を奏する。   According to the above configuration, the matching motion deriving unit 30373 sets the template area of the target block using the index allocated to the upper block in addition to the index allocated to the target block. Therefore, there is an effect that the template area excluding the area included in the immediately preceding block can be accurately set.

次に、本例に係るテンプレートマッチングにおけるテンプレート領域の設定について、図31を参照して詳細に説明する。図31は本例に係るマッチング動き導出部30373が設定するテンプレート領域の一例を示す図である。   Next, setting of a template area in template matching according to this example will be described in detail with reference to FIG. FIG. 31 is a diagram showing an example of a template area set by the matching motion deriving unit 30373 according to this example.

図31において、Tを付しているブロックはテンプレートマッチングの対象となる対象ブロックである。また、塗りつぶされている領域は対象ブロック(T)のテンプレート領域である。なお、図31は複数のブロックのそれぞれのテンプレート領域を示している。図31に示すように、CTUがQT分割され、該QT分割によって生成される各上位ブロックがBT分割されることによってブロック(CU)が生成される。詳細には、CTUをQT分割することによって生成された左上の上位ブロックおよび左下の上位ブロックは垂直方向にBT分割される。また、CTUをQT分割することによって生成される右上の上位ブロックおよび右下の上位ブロックは水平方向にBT分割される。   In FIG. 31, blocks marked with T are target blocks that are targets of template matching. The filled area is the template area of the target block (T). FIG. 31 shows template regions of a plurality of blocks. As shown in FIG. 31, the CTU is QT-divided, and each upper block generated by the QT division is BT-divided to generate a block (CU). Specifically, the upper left upper block and the lower left upper block generated by QT dividing the CTU are BT-divided in the vertical direction. Further, the upper right upper block and the lower right upper block generated by QT dividing the CTU are BT divided in the horizontal direction.

CN情報復号部10は、CTUをQT分割して生成した左上の上位ブロックにインデックスparent_blk_idx == 0を割り振る。また、CN情報復号部10は、左上の上位ブロックを垂直方向にBT分割して生成した左のブロックにインデックスblk_idx == 0を割り振り、右のブロックにインデックスblk_idx == 1を割り振る。blk_idxは図中の各ブロックに記載された番号である。   The CN information decoding unit 10 assigns the index parent_blk_idx == 0 to the upper left upper block generated by dividing the CTU by QT. Also, the CN information decoding unit 10 assigns the index blk_idx == 0 to the left block generated by performing BT division on the upper left upper block in the vertical direction, and assigns the index blk_idx == 1 to the right block. blk_idx is a number written in each block in the figure.

また、CN情報復号部10は、CTUをQT分割して生成した右上の上位ブロックにインデックスparent_blk_idx = 1を割り振る。また、CN情報復号部10は、右上の上位ブロックを水平方向にBT分割して生成した上のブロックにインデックスblk_idx = 0を割り、下のブロックにインデックスblk_idx = 1を割り振る。   Also, the CN information decoding unit 10 assigns the index parent_blk_idx = 1 to the upper right upper block generated by dividing the CTU by QT. Also, the CN information decoding unit 10 assigns the index blk_idx = 0 to the upper block generated by performing BT division on the upper right upper block in the horizontal direction, and assigns the index blk_idx = 1 to the lower block.

また、CN情報復号部10は、CTUをQT分割して生成した左下の上位ブロックにインデックスparent_blk_idx = 2を割り振る。また、CN情報復号部10は、左下の上位ブロックを垂直方向にBT分割して生成した左のブロックにインデックスblk_idx = 0を割り振り、右のブロックにインデックスblk_idx = 1を割り振る。   Also, the CN information decoding unit 10 assigns the index parent_blk_idx = 2 to the upper left lower block generated by dividing the CTU by QT. Also, the CN information decoding unit 10 assigns the index blk_idx = 0 to the left block generated by BT division of the lower left upper block in the vertical direction, and assigns the index blk_idx = 1 to the right block.

また、CN情報復号部10は、CTUをQT分割して生成した右下の上位ブロックにインデックスparent_blk_idx = 3を割り振る。また、CN情報復号部10は、右下の上位ブロックを水平方向にBT分割して生成した上のブロックにインデックスblk_idx = 0を割り、下のブロックにインデックスblk_idx = 1を割り振る。   Also, the CN information decoding unit 10 assigns the index parent_blk_idx = 3 to the upper right lower block generated by QT-dividing the CTU. Also, the CN information decoding unit 10 assigns the index blk_idx = 0 to the upper block generated by BT division of the lower right upper block in the horizontal direction, and assigns the index blk_idx = 1 to the lower block.

図31の(a)は、blk_idx = 0が割り振られた各ブロックのテンプレート領域の一例を示す図である。   FIG. 31A shows an example of a template area of each block to which blk_idx = 0 is assigned.

図31の(a)に示すように、マッチング動き導出部30373はparent_blk_idx = 0が割り振られた上位ブロックを垂直方向にBT分割して生成した左のブロックのテンプレート領域を、ブロックに割り振られたインデックスを用いて設定しない。   As shown in FIG. 31 (a), the matching motion deriving unit 30373 uses the left block template region generated by performing BT division on the upper block to which parent_blk_idx = 0 is allocated in the vertical direction, and the index allocated to the block. Do not set using.

また、マッチング動き導出部30373は、parent_blk_idx= 1が割り振られた上位ブロックを水平方向にBT分割して生成した上のブロックのテンプレート領域に、対象ブロックの上側に隣接する領域を設定する。   Also, the matching motion derivation unit 30373 sets a region adjacent to the upper side of the target block in the template region of the upper block generated by performing BT division on the upper block to which parent_blk_idx = 1 is allocated in the horizontal direction.

また、マッチング動き導出部30373は、parent_blk_idx = 2が割り振られた上位ブロックを垂直方向にBT分割して生成した左のブロックのテンプレート領域に、対象ブロックの左側に隣接する領域を設定する。   Also, the matching motion derivation unit 30373 sets a region adjacent to the left side of the target block in the template region of the left block generated by performing BT division on the upper block to which parent_blk_idx = 2 is allocated in the vertical direction.

また、マッチング動き導出部30373は、parent_blk_idx = 3が割り振られた上位ブロックを水平方向にBT分割して生成した上のブロックのテンプレート領域に、対象ブロックの上側に隣接する領域を設定する。   Also, the matching motion derivation unit 30373 sets a region adjacent to the upper side of the target block in the template region of the upper block generated by BT-dividing the upper block to which parent_blk_idx = 3 is allocated in the horizontal direction.

図31の(b)は、blk_idx = 1が割り振られた各ブロックに設定されるテンプレート領域の一例を示す図である。   FIG. 31B is a diagram illustrating an example of a template area set in each block to which blk_idx = 1 is assigned.

図31の(b)に示すように、マッチング動き導出部30373は、parent_blk_idx = 0が割り振られた上位ブロックを垂直方向にBT分割して生成した右のブロックのテンプレート領域に対象ブロックの上側に隣接する領域を設定する。   As shown in FIG. 31 (b), the matching motion deriving unit 30373 is adjacent to the upper right side of the target block in the template area of the right block generated by BT-dividing the upper block to which parent_blk_idx = 0 is assigned in the vertical direction. Set the area to be used.

また、マッチング動き導出部30373は、parent_blk_idx = 1が割り振られた上位ブロックを水平方向にBT分割して生成した下のブロックのテンプレート領域に、対象ブロックの左側に隣接する領域を設定する。   Also, the matching motion derivation unit 30373 sets a region adjacent to the left side of the target block in the template region of the lower block generated by performing BT division on the upper block to which parent_blk_idx = 1 is allocated in the horizontal direction.

また、マッチング動き導出部30373はparent_blk_idx = 2が割り振られた上位ブロックを垂直方向にBT分割して生成した右のブロックのテンプレート領域に、対象ブロックの上側に隣接する領域を設定する。   Also, the matching motion deriving unit 30373 sets an area adjacent to the upper side of the target block in the template area of the right block generated by BT-dividing the upper block to which parent_blk_idx = 2 is assigned in the vertical direction.

また、マッチング動き導出部30373は、parent_blk_idx = 3が割り振られた上位ブロックを水平方向にBT分割して生成した下のブロックのテンプレート領域に、対象ブロックの左側に隣接する領域を設定する。   Also, the matching motion derivation unit 30373 sets a region adjacent to the left side of the target block in the template region of the lower block generated by performing BT division on the upper block to which parent_blk_idx = 3 is allocated in the horizontal direction.

上述の対象ブロックに割り振られたインデックスと上位ブロックに割り振られたインデックスとを用いたマッチング動き導出部30373によるテンプレート領域の設定は以下の式として示すことができる。
availAbove =
{(mt_dir_flag == 1) && (blk_idx > 0) } ||
{(parent_blk_idx == 1) && (blk_idx == 0) } ||
{(parent_blk_idx == 3) && (blk_idx == 0) } ||

availLeft =
{(mt_dir_flag == 0) && (blk_idx > 0) } ||
{(parent_blk_idx == 2) && (blk_idx == 0) }
なお、上述の例では上位ブロックをBT分割して生成された対象ブロックのテンプレート領域について説明した。一方、上述の例を、上位ブロックをTT分割して生成された対象ブロックのテンプレート領域に適宜適用してもよい。
Setting of the template area by the matching motion deriving unit 30373 using the index allocated to the target block and the index allocated to the upper block can be expressed as the following expression.
availAbove =
{(mt_dir_flag == 1) &&(blk_idx> 0)} ||
{(parent_blk_idx == 1) && (blk_idx == 0)} ||
{(parent_blk_idx == 3) && (blk_idx == 0)} ||

availLeft =
{(mt_dir_flag == 0) &&(blk_idx> 0)} ||
{(parent_blk_idx == 2) && (blk_idx == 0)}
In the above example, the template area of the target block generated by BT division of the upper block has been described. On the other hand, the above example may be applied as appropriate to the template area of the target block generated by TT-dividing the upper block.

また、「テンプレートマッチングにおけるテンプレート領域設定の例2」にて説明したように、QT分割によって生成されたブロックにおける、マッチング動き導出部30373によるテンプレート領域の設定は式として示すことができる。   Further, as described in “Example 2 of template area setting in template matching”, the setting of the template area by the matching motion deriving unit 30373 in the block generated by the QT division can be expressed as an expression.

本例のBT分割により生成された対象ブロックのテンプレート領域の設定、および、「テンプレートマッチングにおけるテンプレート領域設定の例2」に示したQT分割によって生成される対象ブロックのテンプレート領域の設定は以下の式で示すことができる。
availAbove =
{(split_cu_flag == 1) && (blk_idx > 0 } ||
{(mt_dir_flag == 1) && (blk_idx > 0) } ||
{(parent_blk_idx == 1) && (blk_idx == 0) } ||
{(parent_blk_idx == 3) && (blk_idx == 0) }

availLeft =
{(split_cu_flag == 1) && (blk_idx == 2) } ||
{(mt_dir_flag == 0) && (blk_idx > 0) } ||
{(parent_blk_idx == 2) && (blk_idx == 0) }
(テンプレートマッチングにおけるテンプレート領域設定の例4)
本例に係るマッチング動き導出部30373は、対象ブロックより上方に位置する画素のみを、対象ブロックのテンプレートの候補とする。
The setting of the template area of the target block generated by the BT division of this example and the setting of the template area of the target block generated by the QT division shown in “Example 2 of template area setting in template matching” are as follows: Can be shown.
availAbove =
{(split_cu_flag == 1) &&(blk_idx> 0} ||
{(mt_dir_flag == 1) &&(blk_idx> 0)} ||
{(parent_blk_idx == 1) && (blk_idx == 0)} ||
{(parent_blk_idx == 3) && (blk_idx == 0)}

availLeft =
{(split_cu_flag == 1) && (blk_idx == 2)} ||
{(mt_dir_flag == 0) &&(blk_idx> 0)} ||
{(parent_blk_idx == 2) && (blk_idx == 0)}
(Example 4 of template area setting in template matching)
The matching motion deriving unit 30373 according to this example sets only pixels located above the target block as candidates for the template of the target block.

例えば、直前のブロックが対象ブロックの上側に隣接するブロックとなる場合は、水平方向にTT分割またはBT分割して生成された2つ目以降のブロックが対象ブロックとなる場合のみである。したがって、多くの対象ブロックにおいて、直前のブロックは上側に隣接するブロックとはならない。そのため、上記の構成によれば、対象ブロックの直前に処理されるブロックに含まれる画素がテンプレートマッチングのテンプレート領域に設定されることを抑制することができる。   For example, when the immediately preceding block becomes a block adjacent to the upper side of the target block, this is only when the second and subsequent blocks generated by TT division or BT division in the horizontal direction become the target block. Therefore, in many target blocks, the immediately preceding block is not an adjacent block on the upper side. Therefore, according to said structure, it can suppress that the pixel contained in the block processed immediately before an object block is set to the template area | region of template matching.

図32から図34は本例に係るマッチング動き導出部30373が設定するテンプレート領域の一例を示す図である。   FIGS. 32 to 34 are diagrams showing an example of a template area set by the matching motion deriving unit 30373 according to this example.

図32から図34に示すCTUの分割については、上述の「テンプレートマッチングにおけるテンプレート領域設定の例1」に示す例と同様である。そのため、ここでの詳細な説明は行わない。   The CTU division shown in FIGS. 32 to 34 is the same as the example shown in “Example 1 of template region setting in template matching” described above. Therefore, detailed description is not given here.

図32から図34において、Tを付しているブロックはテンプレートマッチングの対象となる対象ブロックであり、Pを付しているブロックは直前のブロックである。また、図32から図34に示されている塗りつぶされている領域は対象ブロック(T)のテンプレート領域である。   In FIGS. 32 to 34, a block with T is a target block to be subjected to template matching, and a block with P is the immediately preceding block. Also, the filled area shown in FIGS. 32 to 34 is the template area of the target block (T).

図32の(a)は、第1のQT分割によって生成された左上のブロックが対象ブロックとなった場合のテンプレート領域を示している。   FIG. 32A shows a template area when the upper left block generated by the first QT division is the target block.

図32の(b)および(c)は、第1のQT分割によって生成された右上のブロックをさらに垂直方向にBT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (B) and (c) of FIG. 32 show template regions when each block generated by further BT-dividing the upper right block generated by the first QT division in the vertical direction becomes the target block. ing.

図33の(a)から(d)は、第1のQT分割によって生成された左下のブロックをさらにQT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (A) to (d) of FIG. 33 show template regions in the case where each block generated by further QT-dividing the lower left block generated by the first QT division becomes the target block.

図34の(a)から(c)は、第1のQT分割によって生成された右下のブロックをさらに水平方向にTT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。図32から図34では、図34の(b)および図34の(c)に示す場合に限り、直前のブロックが上側に隣接するブロックとなる。   (A) to (c) of FIG. 34 show template regions when each block generated by further TT-dividing the lower right block generated by the first QT division in the horizontal direction becomes the target block. Show. In FIGS. 32 to 34, only in the cases shown in FIGS. 34 (b) and 34 (c), the immediately preceding block becomes a block adjacent to the upper side.

図32から図34に示すように、マッチング動き導出部30373は対象ブロックの上側に隣接する領域をテンプレート領域に設定する。また、マッチング動き導出部30373は対象ブロックの左側に隣接するブロックをテンプレート領域に設定しない。すなわち、本例においては、マッチング動き導出部30373はaboveAvailを常に1に設定し、leftAvailを常に0に設定する。   As shown in FIGS. 32 to 34, the matching motion deriving unit 30373 sets a region adjacent to the upper side of the target block as a template region. Also, the matching motion derivation unit 30373 does not set a block adjacent to the left side of the target block as a template region. That is, in this example, the matching motion deriving unit 30373 always sets aboveAvail to 1 and always sets leftAvail to 0.

(テンプレートマッチングにおけるテンプレート領域設定の例5)
本例に係るマッチング動き導出部30373は、対象ブロックが、どのように分割されたブロックであるのかに応じて、テンプレート領域を設定する。
(Example 5 of template area setting in template matching)
The matching motion derivation unit 30373 according to this example sets a template region according to how the target block is a divided block.

詳細には、対象ブロックがどの方向のBT分割、どの方向のTT分割またはQT分割によって生成されたブロックであるのかに応じて、マッチング動き導出部30373は対象ブロックのテンプレート領域を設定する。   Specifically, the matching motion deriving unit 30373 sets the template region of the target block according to which direction the BT division, the TT division or the QT division in which direction the target block is generated.

上記の構成によれば、対象ブロックを生成するBT分割およびTT分割の分割方向に応じて、マッチング動き導出部30373は対象ブロックのテンプレート領域を設定する。また、マッチング動き導出部30373は、対象ブロックを生成する分割がQT分割である場合は、それに応じたテンプレート領域を設定する。そのため、対象ブロックの直前に処理されるブロックに含まれる画素がテンプレートマッチングのテンプレート領域に設定されることを抑制することができる。   According to the above configuration, the matching motion deriving unit 30373 sets the template area of the target block according to the BT division and TT division directions for generating the target block. In addition, when the division for generating the target block is the QT division, the matching motion deriving unit 30373 sets a template region corresponding to the division. Therefore, it can suppress that the pixel contained in the block processed immediately before an object block is set to the template area | region of template matching.

本例に係るテンプレートマッチングにおけるテンプレート領域の設定について、図35から図37を参照して詳細に説明する。図35から図37は本例に係るマッチング動き導出部30373が設定するテンプレート領域の一例を示す図である。   Setting of a template area in template matching according to this example will be described in detail with reference to FIGS. FIGS. 35 to 37 are diagrams showing an example of a template area set by the matching motion deriving unit 30373 according to this example.

図35から図37に示すCTUの分割については、上述の「テンプレートマッチングにおけるテンプレート領域設定の例1」に示す例と同様である。そのため、ここでの詳細な説明は行わない。   The CTU division shown in FIGS. 35 to 37 is the same as the example shown in “Example 1 of template area setting in template matching” described above. Therefore, detailed description is not given here.

図35から図37において、Tを付しているブロックはテンプレートマッチングの対象となる対象ブロックであり、Pを付しているブロックは直前のブロックである。また、図35から図37に示されている塗りつぶされている領域は対象ブロック(T)のテンプレート領域である。   In FIG. 35 to FIG. 37, a block with T is a target block to be subjected to template matching, and a block with P is the immediately preceding block. Also, the filled area shown in FIGS. 35 to 37 is the template area of the target block (T).

図35の(a)は、第1のQT分割によって生成された左上のブロックが対象ブロックとなった場合のテンプレート領域を示している。   FIG. 35A shows a template region when the upper left block generated by the first QT division is the target block.

図35の(b)および(c)は、第1のQT分割によって生成された右上のブロックをさらに垂直方向にBT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (B) and (c) of FIG. 35 show a template area when each block generated by further BT-dividing the upper right block generated by the first QT division in the vertical direction becomes the target block. ing.

図36の(a)から(d)は、第1のQT分割によって生成された左下のブロックをさらにQT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   36A to 36D show template regions in the case where each block generated by further QT-dividing the lower left block generated by the first QT division becomes the target block.

図37の(a)から(c)は、第1のQT分割によって生成された右下のブロックをさらに水平方向にTT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (A) to (c) of FIG. 37 show template regions when each block generated by further TT-dividing the lower right block generated by the first QT division in the horizontal direction becomes the target block. Show.

図35の(b)および(c)に示すように、本例においては、マッチング動き導出部30373は垂直方向のBT分割および垂直方向のTT分割によって生成された対象ブロックのテンプレート領域を対象ブロックの上側に隣接する領域に設定する。また、図37の(a)から(c)に示すように、本例においては、マッチング動き導出部30373は水平方向のBT分割および水平方向のTT分割によって生成された対象ブロックのテンプレート領域を対象ブロックの左側に隣接する領域に設定する。さらに、図36の(a)から(d)に示すように、本例においては、マッチング動き導出部30373はQT分割によって生成された対象ブロックのテンプレート領域を対象ブロックの上側に隣接する領域に設定してもよい。   As shown in FIGS. 35B and 35C, in this example, the matching motion derivation unit 30373 uses the template area of the target block generated by the vertical BT division and the vertical TT division as the target block. Set to the upper adjacent area. In addition, as shown in FIGS. 37A to 37C, in this example, the matching motion deriving unit 30373 targets the template region of the target block generated by the horizontal BT division and the horizontal TT division. Set to the area adjacent to the left side of the block. Further, as shown in FIGS. 36A to 36D, in this example, the matching motion derivation unit 30373 sets the template area of the target block generated by the QT division to an area adjacent to the upper side of the target block. May be.

すなわち、垂直方向のBT分割および垂直方向のTT分割(split_mt_dir == 1)にて生成された対象ブロックに対して、マッチング動き導出部30373は対象ブロックのテンプレート領域を対象ブロックの上側に隣接する領域に設定する。また、水平方向のBT分割および水平方向のTT分割(split_mt_dir == 0)にて生成された対象ブロックに対して、マッチング動き導出部30373は対象ブロックのテンプレート領域を対象ブロックの左側に隣接する領域に設定する。   That is, for a target block generated by vertical BT partitioning and vertical TT partitioning (split_mt_dir == 1), the matching motion derivation unit 30373 has a template region of the target block adjacent to the upper side of the target block. Set to. For the target block generated by the horizontal BT division and the horizontal TT division (split_mt_dir == 0), the matching motion derivation unit 30373 sets the template area of the target block adjacent to the left side of the target block. Set to.

マッチング動き導出部30373による、対象ブロックの分割方法に応じたテンプレート領域の設定は以下の式として示すことができる。
aboveAvail = (split_mt_dir == 1) ? 1 : 0
leftAvail = (split_mt_dir == 0) ? 1 : 0
さらに、マッチング動き導出部30373は、QT分割(split_cu_split == 1)にて生成された対象ブロックのテンプレート領域を対象ブロックの上側に隣接する。上記設定は以下の式として示すことができる。
aboveAvail = (split_cu_split == 1) ? 1 : 0
(テンプレートマッチングにおけるテンプレート領域設定の例6)
本例においては、上記「テンプレートマッチングにおけるテンプレート領域設定の例4」および上記「テンプレートマッチングにおけるテンプレート領域設定の例5」の変形例について、図38を参照して説明する。図38は、本変形例に係るマッチング動き導出部30373が設定するテンプレート領域の一例を示す図である。
The setting of the template area according to the target block dividing method by the matching motion deriving unit 30373 can be expressed as the following expression.
aboveAvail = (split_mt_dir == 1)? 1: 0
leftAvail = (split_mt_dir == 0)? 1: 0
Further, the matching motion deriving unit 30373 is adjacent to the template block of the target block generated by the QT division (split_cu_split == 1) above the target block. The above setting can be expressed as the following equation.
aboveAvail = (split_cu_split == 1)? 1: 0
(Example 6 of template area setting in template matching)
In this example, modified examples of “Example 4 of template region setting in template matching” and “Example 5 of template region setting in template matching” will be described with reference to FIG. FIG. 38 is a diagram illustrating an example of a template region set by the matching motion derivation unit 30373 according to the present modification.

図38に示されている塗りつぶされている領域は対象ブロック(CU)のテンプレート領域である。図38の(a)および(c)に示すように、マッチング動き導出部30373が設定する対象ブロックの上側に隣接する領域は、対象ブロックの上方から左側に拡張していてもよい。また、図38の(b)および(d)に示すように、マッチング動き導出部30373が設定する対象ブロックの左側に隣接する領域は、対象ブロックの左方から上側に拡張していてもよい。   The filled area shown in FIG. 38 is a template area of the target block (CU). As shown in (a) and (c) of FIG. 38, the region adjacent to the upper side of the target block set by the matching motion deriving unit 30373 may be extended from the upper side to the left side of the target block. Further, as shown in FIGS. 38B and 38D, the region adjacent to the left side of the target block set by the matching motion deriving unit 30373 may be extended from the left side to the upper side of the target block.

(テンプレートマッチングにおけるテンプレート領域設定の例7−1)
本例に係るマッチング動き導出部30373は、ラスタースキャン順における下流側からラスタースキャン順における上流側に遡る処理順を少なくとも一部に含むスキャン順に従って、対象ブロックを設定する。以降、ラスタースキャン順における下流側からラスタースキャン順における上流側に遡る順序のスキャンを双予測スキャンとよぶ。
(Example 7-1 of template area setting in template matching)
The matching motion deriving unit 30373 according to this example sets the target block according to a scan order including at least a part of the processing order that goes back from the downstream side in the raster scan order to the upstream side in the raster scan order. Hereinafter, the scan in the order from the downstream side in the raster scan order to the upstream side in the raster scan order is referred to as a bi-predictive scan.

ここで、分割されたブロックをラスタースキャンでスキャンする場合のブロックのスキャン順および分割されたブロックを双予測スキャンでスキャンする場合のブロックのスキャン順について説明する。   Here, the scanning order of the blocks when the divided blocks are scanned by the raster scan and the scanning order of the blocks when the divided blocks are scanned by the bi-predictive scan will be described.

図39の(a)から(c)は、分割されたブロックをラスタースキャンによってスキャンする場合のスキャン順の一例を示す図である。図39の(a)に示すように、QT分割されたブロックは左上、右上、左下、右下の順でスキャンされる。マッチング動き導出部30373は当該順序で分割されたブロックの処理を行う。また、図39の(b)に示すように、水平方向にBT分割されたブロックは上、下の順でスキャンされる。なお、図には示していないが垂直方向にBT分割されたブロックは左、右の順でスキャンされる。また、図39の(c)に示すように、水平方向にTT分割されたブロックは上、中央、下の順でスキャンされる。なお、図には示していないが垂直方向にTT分割されたブロックは左、中央、右の順でスキャンされる。マッチング動き導出部30373は当該順序で分割されたブロックの処理を行う。   39A to 39C are diagrams illustrating an example of the scan order when the divided blocks are scanned by the raster scan. As shown in FIG. 39 (a), QT-divided blocks are scanned in the order of upper left, upper right, lower left, and lower right. The matching motion deriving unit 30373 performs processing of the blocks divided in the order. Further, as shown in FIG. 39B, the blocks divided in the BT direction in the horizontal direction are scanned in the order of top and bottom. Although not shown in the figure, the blocks that are BT-divided in the vertical direction are scanned in the order of left and right. Also, as shown in FIG. 39C, the blocks that are TT-divided in the horizontal direction are scanned in the order of top, center, and bottom. Although not shown in the figure, the blocks that are TT-divided in the vertical direction are scanned in the order of left, center, and right. The matching motion deriving unit 30373 performs processing of the blocks divided in the order.

また、図39の(d)から(f)は、分割されたブロックを双予測スキャンによってスキャンする場合のスキャン順の一例を示す図である。図39の(d)に示すように、QT分割されたブロックは右上、左上、右下、左下の順でスキャンされる。マッチング動き導出部30373は当該順序で分割されたブロックの処理を行う。また、図39の(e)に示すように、水平方向にBT分割されたブロックは下、上の順でスキャンされる。なお、図には示していないが垂直方向にBT分割されたブロックは右、左、の順でスキャンされる。また、図39の(f)に示すように、水平方向にTT分割されたブロックは中央、上、下の順でスキャンされる。なお、図には示していないが垂直方向にTT分割されたブロックは中央、左、右の順でスキャンされる。マッチング動き導出部30373は分割されたブロックの処理を当該順序で行う。   Further, (d) to (f) of FIG. 39 are diagrams illustrating an example of the scan order when the divided blocks are scanned by bi-predictive scanning. As shown in FIG. 39 (d), QT-divided blocks are scanned in the order of upper right, upper left, lower right, and lower left. The matching motion deriving unit 30373 performs processing of the blocks divided in the order. Further, as shown in FIG. 39 (e), the blocks divided into BT in the horizontal direction are scanned in the order of lower and upper. Although not shown in the figure, the blocks that are BT-divided in the vertical direction are scanned in the order of right, left. Also, as shown in FIG. 39 (f), the blocks that have been TT-divided in the horizontal direction are scanned in the order of center, top, and bottom. Although not shown in the figure, the blocks that are TT-divided in the vertical direction are scanned in the order of center, left, and right. The matching motion derivation unit 30373 performs processing of the divided blocks in the order.

本例においては、マッチング動き導出部30373は分割されて生成されたブロックを双予測スキャンの順序によってスキャンする。   In this example, the matching motion deriving unit 30373 scans the blocks generated by the division according to the bi-predictive scan order.

図40から図42は本例に係るマッチング動き導出部30373が分割されたブロックに対して設定するテンプレート領域の一例を示す図である。   40 to 42 are diagrams showing an example of a template area set for the divided blocks by the matching motion deriving unit 30373 according to this example.

図40から図42に示すCTUの分割については、上述の「テンプレートマッチングにおけるテンプレート領域設定の例1」に示す例と同様である。そのため、ここでの詳細な説明は行わない。   The division of CTUs shown in FIGS. 40 to 42 is the same as the example shown in “Example 1 of template region setting in template matching” described above. Therefore, detailed description is not given here.

図40から図42において、各ブロックに付している番号は、当該ブロックがスキャンされる順番を示している。図40から図42に示すように、第1のQT分割の後にさらに分割されて生成されたブロックについて、マッチング動き導出部30373は双予測スキャンの順序にてスキャンする。Tを付しているブロックはテンプレートマッチングの対象となる対象ブロックであり、Pを付しているブロックは直前のブロックである。また、図40から図42に示されている塗りつぶされている領域は対象ブロック(T)のテンプレート領域である。   In FIGS. 40 to 42, the numbers given to the blocks indicate the order in which the blocks are scanned. As shown in FIGS. 40 to 42, the matching motion derivation unit 30373 scans the blocks generated by further division after the first QT division in the order of bi-prediction scanning. A block with T is a target block to be subjected to template matching, and a block with P is the immediately preceding block. Also, the filled area shown in FIGS. 40 to 42 is the template area of the target block (T).

図40の(a)は、第1のQT分割によって生成された左上のブロックが対象ブロックとなった場合のテンプレート領域を示している。   FIG. 40A shows a template region when the upper left block generated by the first QT division is the target block.

図40の(b)および(c)は、第1のQT分割によって生成された右上のブロックをさらに垂直方向にBT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (B) and (c) of FIG. 40 show template regions when the upper right block generated by the first QT division is further subjected to BT division in the vertical direction and each block generated is the target block. ing.

図41の(a)から(d)は、第1のQT分割によって生成された左下のブロックをさらにQT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   41A to 41D show template regions in the case where each block generated by further QT-dividing the lower left block generated by the first QT division becomes the target block.

図42の(a)から(c)は、第1のQT分割によって生成された右下のブロックをさらに水平方向にTT分割して生成された各ブロックが対象ブロックとなった場合のテンプレート領域を示している。   (A) to (c) of FIG. 42 show template regions in the case where each block generated by further TT-dividing the lower right block generated by the first QT division in the horizontal direction becomes the target block. Show.

上記の構成によれば、対象ブロックの左側に隣接するブロックおよび対象ブロックの上側に隣接するブロックが対象ブロックの直前に処理されるブロックになることを抑制することができる。すなわち、画像復号装置31は、直前のブロックの復号処理を待たずに、次のブロックの予測画像生成処理を開始することができる。   According to said structure, it can suppress that the block adjacent to the left side of an object block and the block adjacent to the upper side of an object block become a block processed immediately before an object block. That is, the image decoding device 31 can start the predicted image generation process for the next block without waiting for the decoding process for the immediately preceding block.

また、図40の(c)に示すスキャン番号2が付されたブロックおよび図42に示すスキャン番号9が付されたブロック等については、当該ブロックのテンプレートが上側、および、左側に隣接する領域の場合、直前のブロックに含まれない。例えば、上述のラスタースキャンの順に処理が行われた場合、スキャン番号2が付されたブロックの左側に隣接する領域は直前のブロックに含まれ、スキャン番号9が付されたブロックの上側に隣接する領域は直前のブロックに含まれる。そのため、当該ブロックの上側に隣接する領域および当該ブロックの左側に隣接する領域は当該ブロックのテンプレート領域とすることができない。   For the block with scan number 2 shown in FIG. 40 (c) and the block with scan number 9 shown in FIG. 42, etc., the template of the block is the area adjacent to the upper side and the left side. If it is not included in the previous block. For example, when processing is performed in the order of the raster scan described above, the area adjacent to the left side of the block assigned scan number 2 is included in the immediately preceding block and is adjacent to the upper side of the block assigned scan number 9. The area is included in the immediately preceding block. Therefore, the area adjacent to the upper side of the block and the area adjacent to the left side of the block cannot be the template area of the block.

(テンプレートマッチングにおけるテンプレート領域設定の例7−2)
本例に係るマッチング動き導出部(スキャン順設定部)30373は、符号化データに含まれるフラグを参照して、予測画像生成部308におけるブロックのスキャン順を設定する。
(Example 7-2 of template area setting in template matching)
The matching motion derivation unit (scan order setting unit) 30373 according to this example sets the block scan order in the predicted image generation unit 308 with reference to the flag included in the encoded data.

上記の構成によれば、マッチング動き導出部30373は、符号化データに含まれるフラグを参照して、インター予測画像生成部309におけるブロックのスキャン順を設定する。例えば、上記フラグが示す順序がラスタースキャン順における下流側からラスタースキャン順における上流側に遡る処理順としてもよい。この場合、対象ブロックの左側に隣接するブロックおよび対象ブロックの上側に隣接するブロックが対象ブロックの直前に処理されるブロックになることを抑制することができる。すなわち、直前のブロックの復号処理を待たずに、次のブロックの予測画像生成処理を開始することができる。   According to the above configuration, the matching motion deriving unit 30373 sets the block scan order in the inter predicted image generation unit 309 with reference to the flag included in the encoded data. For example, the order indicated by the flag may be a processing order that goes back from the downstream side in the raster scan order to the upstream side in the raster scan order. In this case, it is possible to suppress the block adjacent to the left side of the target block and the block adjacent to the upper side of the target block from being processed immediately before the target block. That is, the predicted image generation process for the next block can be started without waiting for the decoding process for the immediately preceding block.

例えば、画像符号化装置11のインター予測パラメータ符号化部112は、予測画像生成におけるブロックのスキャン順を示すalt_cu_scan_flagを導出する。alt_cu_scan_flag == 0の場合、マッチング動き導出部30373はラスタースキャン(Zスキャン)の順序で分割された各ブロックの動きベクトル(動き情報)を導出する。また、alt_cu_scan_flag == 1の場合、マッチング動き導出部30373は双予測スキャンの順序で分割された各ブロックの動きベクトルを導出(スキャン)する。また、マッチング動き導出部30373は、alt_cu_scan_flag == 1、すなわち、双予測スキャンを示す場合のみ、テンプレートマッチングにおける動きベクトルを導出する構成としてもよい。   For example, the inter prediction parameter encoding unit 112 of the image encoding device 11 derives alt_cu_scan_flag indicating the scan order of blocks in predictive image generation. When alt_cu_scan_flag == 0, the matching motion deriving unit 30373 derives a motion vector (motion information) of each block divided in the order of raster scan (Z scan). When alt_cu_scan_flag == 1, the matching motion deriving unit 30373 derives (scans) the motion vector of each block divided in the bi-predictive scan order. The matching motion deriving unit 30373 may be configured to derive a motion vector in template matching only when alt_cu_scan_flag == 1, that is, when bi-predictive scanning is indicated.

上記のスキャン順序の設定は、図43から図45に示すシンタックスで表現してもよい。図43は、図23に示すQT分割されたブロックに対し、alt_cu_scan_flagに応じてスキャン順序を変更するシンタックスの一例を示す図である。図44は、図24Bに示すTT分割されたブロックに対し、alt_cu_scan_flagに応じてスキャン順序を変更するシンタックスの一例を示す図である。図45は、図24Cに示すBT分割されたブロックに対し、alt_cu_scan_flagに応じてスキャン順序を変更するシンタックスの一例を示す図である。   The above scan order setting may be expressed by the syntax shown in FIGS. 43 to 45. FIG. 43 is a diagram illustrating an example of syntax for changing the scan order in accordance with alt_cu_scan_flag for the QT-divided block illustrated in FIG. 23. FIG. 44 is a diagram illustrating an example of syntax for changing the scan order according to alt_cu_scan_flag for the TT-divided block illustrated in FIG. 24B. FIG. 45 is a diagram illustrating an example of syntax for changing the scan order in accordance with alt_cu_scan_flag for the BT-divided block illustrated in FIG. 24C.

(画像符号化装置11の構成)
本実施形態に係る画像符号化装置11のマッチング動き導出部11253は、本実施形態に係る画像復号装置31における上述のマッチング動き導出部30373に対応するように同様の構成であってもよい。
(Configuration of Image Encoding Device 11)
The matching motion deriving unit 11253 of the image encoding device 11 according to this embodiment may have the same configuration so as to correspond to the above-described matching motion deriving unit 30373 in the image decoding device 31 according to this embodiment.

〔応用例〕
上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
[Application example]
The image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images. The moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.

まず、上述した画像符号化装置11及び画像復号装置31を、動画像の送信及び受信に利用できることを、図46を参照して説明する。   First, it will be described with reference to FIG. 46 that the image encoding device 11 and the image decoding device 31 described above can be used for transmission and reception of moving images.

図46の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図46の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。   FIG. 46A is a block diagram illustrating a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted. As illustrated in (a) of FIG. 46, the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and with the encoded data obtained by the encoding unit PROD_A1. Thus, a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided. The above-described image encoding device 11 is used as the encoding unit PROD_A1.

送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図46の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。   Transmission device PROD_A, as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided. FIG. 46A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.

なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。   Note that the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.

図46の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図46の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。   FIG. 46B is a block diagram illustrating a configuration of a receiving device PROD_B in which the image decoding device 31 is mounted. As illustrated in (b) of FIG. 46, the reception device PROD_B includes a reception unit PROD_B1 that receives a modulation signal, a demodulation unit PROD_B2 that obtains encoded data by demodulating the modulation signal received by the reception unit PROD_B1, and a demodulation A decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2. The above-described image decoding device 31 is used as the decoding unit PROD_B3.

受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図46の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。   The receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided. In FIG. 46B, a configuration in which all of these are provided in the receiving device PROD_B is illustrated, but a part may be omitted.

なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。   Note that the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.

なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。   Note that the transmission medium for transmitting the modulation signal may be wireless or wired. Further, the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.

例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。   For example, a terrestrial digital broadcast broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting. A broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.

また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。   Also, a server (workstation, etc.) / Client (television receiver, personal computer, smartphone, etc.) such as a VOD (Video On Demand) service or a video sharing service using the Internet is a transmission device that transmits and receives modulated signals by communication. This is an example of PROD_A / receiving device PROD_B (normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN). Here, the personal computer includes a desktop PC, a laptop PC, and a tablet PC. The smartphone also includes a multi-function mobile phone terminal.

なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。   Note that the client of the video sharing service has a function of encoding a moving image captured by a camera and uploading it to the server in addition to a function of decoding the encoded data downloaded from the server and displaying it on the display. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.

次に、上述した画像符号化装置11及び画像復号装置31を、動画像の記録及び再生に利用できることを、図47を参照して説明する。   Next, the fact that the above-described image encoding device 11 and image decoding device 31 can be used for recording and reproduction of moving images will be described with reference to FIG.

図47の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図47の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。   FIG. 47A is a block diagram illustrating a configuration of a recording apparatus PROD_C in which the above-described image encoding device 11 is mounted. As shown in (a) of FIG. 47, the recording apparatus PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M. A writing unit PROD_C2 for writing. The above-described image encoding device 11 is used as the encoding unit PROD_C1.

なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)などのように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(Universal Serial Bus)フラッシュメモリなどのように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)などのように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。   The recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.

また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図47の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。   In addition, the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images A unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided. FIG. 47A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.

なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。   The receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.

このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4または受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5または画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3または受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。   Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is a main source of moving images). . In addition, a camcorder (in this case, the camera PROD_C3 is a main source of moving images), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images), a smartphone (this In this case, the camera PROD_C3 or the reception unit PROD_C5 is a main source of moving images), and the like is also an example of such a recording apparatus PROD_C.

図47の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図47の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。   FIG. 47 (b) is a block diagram showing a configuration of a playback device PROD_D in which the above-described image decoding device 31 is mounted. As shown in (b) of FIG. 47, the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written on the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain. The above-described image decoding device 31 is used as the decoding unit PROD_D2.

なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。   The recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.

また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図47の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。   In addition, the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image. PROD_D5 may be further provided. FIG. 47B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.

なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。   The transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.

このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4または送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型またはタブレット型PC(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。   Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination). . In addition, a television receiver (in this case, the display PROD_D3 is a main supply destination of moving images), a digital signage (also referred to as an electronic signboard or an electronic bulletin board), and the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images Desktop PC (in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main video source), laptop or tablet PC (in this case, display PROD_D3 or transmission unit PROD_D5 is video) A smartphone (which is a main image supply destination), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination), and the like are also examples of such a playback device PROD_D.

(ハードウェア的実現およびソフトウェア的実現)
また、上述した画像復号装置31および画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Hardware implementation and software implementation)
Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement | achieve by software using.

後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(Random Access Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   In the latter case, each device includes a CPU that executes instructions of a program that realizes each function, a ROM (Read Only Memory) that stores the program, a RAM (Random Access Memory) that expands the program, the program, and various types A storage device (recording medium) such as a memory for storing data is provided. The object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD-R(CD Recordable)/ブルーレイディスク(Blu-ray Disc:登録商標)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable and Programmable Read-Only Memory:登録商標)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。   Examples of the recording medium include magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROM (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical discs), and the like. ) / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (registered trademark) and other optical discs, IC cards (including memory cards) / Cards such as optical cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) / Semiconductor memories such as flash ROM, or PLD (Programmable logic device) ) Or FPGA (Field Programmable Gate Array).

また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna television/Cable Television)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、BlueTooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance:登録商標)、携帯電話網、衛星回線、地上デジタル放送網等の無線でも利用可能である。なお、本発明の実施形態は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   Further, each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited as long as it can transmit the program code. For example, the Internet, Intranet, Extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television / Cable Television) communication network, Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like. The transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, infra-red data such as IrDA (Infrared Data Association) or remote control, such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. , BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. It can also be used wirelessly. The embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The embodiments of the present invention are not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. That is, embodiments obtained by combining technical means appropriately changed within the scope of the claims are also included in the technical scope of the present invention.

本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、および、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。   Embodiments of the present invention can be preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.

11・・・・・・画像符号化装置
101・・・・・予測画像生成部
112・・・・・インター予測パラメータ符号化部(スキャン順設定部)
11253・・・マッチング動き導出部(動き情報導出部、スキャン順設定部)
31・・・・・・画像復号装置
309・・・・・インター予測画像生成部(予測画像生成部)
30373・・・マッチング動き導出部(動き情報導出部、スキャン順設定部)
11... Image coding apparatus 101... Prediction image generation unit 112... Inter prediction parameter coding unit (scan order setting unit)
11253 ... Matching motion deriving unit (motion information deriving unit, scan order setting unit)
31... Image decoding device 309... Inter prediction image generation unit (prediction image generation unit)
30373 ... Matching motion deriving unit (motion information deriving unit, scan order setting unit)

Claims (16)

符号化データを復号する画像復号装置であって、
対象ブロックの予測画像を生成する予測画像生成部を備え、
上記予測画像生成部は、
上記対象ブロックに隣接しないブロックのうち、
上記対象ブロックを含む符号化ツリーユニットの境界からの垂直方向の距離及び水平方向の距離の少なくとも何れかが所定の値以下であるブロックの動き情報を参照して、上記対象ブロックの予測画像を生成する
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A prediction image generation unit that generates a prediction image of the target block;
The predicted image generation unit
Of the blocks not adjacent to the target block,
A prediction image of the target block is generated with reference to motion information of a block in which at least one of a vertical distance and a horizontal distance from the boundary of the coding tree unit including the target block is equal to or less than a predetermined value An image decoding apparatus characterized by:
符号化データを復号する画像復号装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記動き情報導出部は、上記対象ブロックの直前に処理したブロックに含まれる画素を、上記テンプレート領域には設定しない
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
The image decoding apparatus, wherein the motion information deriving unit does not set a pixel included in a block processed immediately before the target block in the template region.
符号化データを復号する画像復号装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記対象ブロックには、インデックスが割り振られており、
上記動き情報導出部は、上記対象ブロックに割り振られているインデックスに応じて、上記テンプレート領域を設定する
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
An index is allocated to the target block,
The image decoding apparatus, wherein the motion information deriving unit sets the template region in accordance with an index assigned to the target block.
上記対象ブロックは、上記対象ブロックよりも上位のブロックである上位ブロックを分割することによって生じ、
上記動き情報導出部は、上記対象ブロックに割り振られているインデックスと上記上位ブロックに割り振られているインデックスとの両方のインデックスに応じて、上記テンプレート領域を設定する
ことを特徴とする請求項3に記載の画像復号装置。
The target block is generated by dividing an upper block that is a higher block than the target block,
The said motion information derivation | leading-out part sets the said template area | region according to the index of both the index allocated to the said object block, and the index allocated to the said high-order block, The Claim 3 characterized by the above-mentioned. The image decoding device described.
符号化データを復号する画像復号装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記動き情報導出部は、上記対象ブロックより上方に位置する画素のみを、上記テンプレート領域の候補とする
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
The image decoding apparatus according to claim 1, wherein the motion information deriving unit sets only pixels located above the target block as candidates for the template region.
符号化データを復号する画像復号装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記動き情報導出部は、上記対象ブロックが、どのように分割されたブロックであるのかに応じて、上記テンプレート領域を設定する
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
The image decoding apparatus according to claim 1, wherein the motion information deriving unit sets the template area according to how the target block is a divided block.
符号化データを復号する画像復号装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部を備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
ラスタースキャン順における下流側からラスタースキャン順における上流側に遡る処理順を少なくとも一部に含むスキャン順に従って、対象ブロックが設定される
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A motion information deriving unit for deriving motion information of the target block and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information;
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
An image decoding apparatus, wherein a target block is set according to a scan order including at least a part of a processing order that goes back from the downstream side in the raster scan order to the upstream side in the raster scan order.
符号化データを復号する画像復号装置であって、
対象ブロックの動き情報を導出する動き情報導出部と、
上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部と、
上記予測画像生成部におけるブロックのスキャン順を設定するスキャン順設定部と
を備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記スキャン順設定部は、上記符号化データに含まれるフラグを参照して、上記予測画像生成部におけるブロックのスキャン順を設定する
ことを特徴とする画像復号装置。
An image decoding device for decoding encoded data,
A motion information deriving unit for deriving motion information of the target block;
A predicted image generation unit that generates a predicted image of the target block with reference to the motion information;
A scan order setting unit that sets the scan order of blocks in the predicted image generation unit,
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
The image decoding apparatus, wherein the scan order setting unit sets a scan order of blocks in the predicted image generation unit with reference to a flag included in the encoded data.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの予測画像を生成する予測画像生成部を備え、
上記予測画像生成部は、
上記対象ブロックに隣接しないブロックのうち、
上記対象ブロックを含む符号化ツリーユニットの境界からの垂直方向の距離及び水平方向の距離の少なくとも何れかが所定の値以下であるブロックの動き情報を参照して、上記対象ブロックの予測画像を生成する
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A prediction image generation unit that generates a prediction image of the target block;
The predicted image generation unit
Of the blocks not adjacent to the target block,
A prediction image of the target block is generated with reference to motion information of a block in which at least one of a vertical distance and a horizontal distance from the boundary of the coding tree unit including the target block is equal to or less than a predetermined value An image encoding apparatus characterized by:
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記動き情報導出部は、上記対象ブロックの直前に処理したブロックに含まれる画素を、上記テンプレート領域には設定しない
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the encoded template area set according to the target block, the motion information of the target block is derived,
The image coding apparatus according to claim 1, wherein the motion information deriving unit does not set a pixel included in a block processed immediately before the target block in the template region.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記対象ブロックには、インデックスが割り振られており、
上記動き情報導出部は、上記対象ブロックに割り振られているインデックスに応じて、上記テンプレート領域を設定する
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the encoded template area set according to the target block, the motion information of the target block is derived,
An index is allocated to the target block,
The image coding apparatus, wherein the motion information deriving unit sets the template region in accordance with an index assigned to the target block.
上記対象ブロックは、上記対象ブロックよりも上位のブロックである上位ブロックを分割することによって生じ、
上記動き情報導出部は、上記対象ブロックに割り振られているインデックスと上記上位ブロックに割り振られているインデックスとの両方のインデックスに応じて、上記テンプレート領域を設定する
ことを特徴とする請求項11に記載の画像符号化装置。
The target block is generated by dividing an upper block that is a higher block than the target block,
The motion information deriving unit sets the template region according to both the index allocated to the target block and the index allocated to the upper block. The image encoding device described.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記動き情報導出部は、上記対象ブロックより上方に位置する画素のみを、上記テンプレート領域の候補とする
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the encoded template area set according to the target block, the motion information of the target block is derived,
The image coding apparatus according to claim 1, wherein the motion information deriving unit sets only pixels located above the target block as candidates for the template region.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部とを備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記動き情報導出部は、上記対象ブロックが、どのように分割されたブロックであるのかに応じて、上記テンプレート領域を設定する
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A motion information deriving unit for deriving motion information of the target block, and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information,
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
The image coding apparatus according to claim 1, wherein the motion information deriving unit sets the template area according to how the target block is a divided block.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの動き情報を導出する動き情報導出部と上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部を備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された復号済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
ラスタースキャン順における下流側からラスタースキャン順における上流側に遡る処理順を少なくとも一部に含むスキャン順に従って、対象ブロックが設定される
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A motion information deriving unit for deriving motion information of the target block and a predicted image generating unit for generating a predicted image of the target block with reference to the motion information;
The motion information deriving unit
By performing template matching with reference to the decoded template area set according to the target block, the motion information of the target block is derived,
An image encoding device, wherein a target block is set according to a scan order including at least a part of a processing order that goes back from a downstream side in a raster scan order to an upstream side in a raster scan order.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
対象ブロックの動き情報を導出する動き情報導出部と、
上記動き情報を参照して上記対象ブロックの予測画像を生成する予測画像生成部と、
上記予測画像生成部におけるブロックのスキャン順を設定するスキャン順設定部と
を備え、
上記動き情報導出部は、
上記対象ブロックに応じて設定された符号化済のテンプレート領域を参照したテンプレートマッチングを行うことにより、上記対象ブロックの動き情報を導出し、
上記スキャン順設定部は、符号化されるデータに上記予測画像生成部におけるブロックのスキャン順を示すフラグを含ませる
ことを特徴とする画像符号化装置。
An image encoding device that encodes a residual between a predicted image and an encoding target image,
A motion information deriving unit for deriving motion information of the target block;
A predicted image generation unit that generates a predicted image of the target block with reference to the motion information;
A scan order setting unit for setting the scan order of blocks in the predicted image generation unit,
The motion information deriving unit
By performing template matching with reference to the encoded template area set according to the target block, the motion information of the target block is derived,
The image coding apparatus, wherein the scan order setting unit includes a flag indicating a scan order of blocks in the predicted image generation unit in data to be encoded.
JP2018106505A 2018-06-01 2018-06-01 Image decoding apparatus and image encoding apparatus Pending JP2019213018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018106505A JP2019213018A (en) 2018-06-01 2018-06-01 Image decoding apparatus and image encoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018106505A JP2019213018A (en) 2018-06-01 2018-06-01 Image decoding apparatus and image encoding apparatus

Publications (1)

Publication Number Publication Date
JP2019213018A true JP2019213018A (en) 2019-12-12

Family

ID=68845499

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018106505A Pending JP2019213018A (en) 2018-06-01 2018-06-01 Image decoding apparatus and image encoding apparatus

Country Status (1)

Country Link
JP (1) JP2019213018A (en)

Similar Documents

Publication Publication Date Title
JP7421586B2 (en) Decoding device and encoding device
JP7026049B2 (en) Affine motion vector derivation device, predictive image generator, motion image decoding device, and motion image coding device
CN110574374B (en) Image decoding device
US11979602B2 (en) Motion vector generation device, a prediction image generation device, a video decoding device and a video coding device
WO2018116925A1 (en) Intra prediction image generating device, image decoding device, and image coding device
WO2018221368A1 (en) Moving image decoding device, and moving image encoding device
WO2018037853A1 (en) Image decoding apparatus and image coding apparatus
WO2018110203A1 (en) Moving image decoding apparatus and moving image encoding apparatus
WO2018116802A1 (en) Image decoding device, image coding device, and image predicting device
JP2021010046A (en) Image encoding device and image decoding device
WO2019221072A1 (en) Image encoding device, encoded stream extraction device, and image decoding device
WO2018230493A1 (en) Video decoding device, video encoding device, prediction image generation device and motion vector derivation device
WO2018110462A1 (en) Image decoding device and image encoding device
WO2020116456A1 (en) Moving image decoding device
CN108605138B (en) Predictive image generation device, moving image decoding device, and moving image encoding device
WO2018173895A1 (en) Predicted-image generation device, video decoding device, and video coding device
WO2018110180A1 (en) Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device
WO2019230904A1 (en) Image decoding device and image encoding device
WO2018173432A1 (en) Prediction image generation device, moving image decoding device, and moving image encoding device
WO2018037723A1 (en) Image decoding device and image coding device
JP2020036101A (en) Image decoder, and image encoder
WO2018061550A1 (en) Image decoding device and image coding device
JP2019201254A (en) Image decoding apparatus and image encoding apparatus
JP2020145650A (en) Image decoding device and image coding device
JP2020108012A (en) Image decoding device and image encoding device