JP2020005200A - Image decoding device and image encoding device - Google Patents

Image decoding device and image encoding device Download PDF

Info

Publication number
JP2020005200A
JP2020005200A JP2018125223A JP2018125223A JP2020005200A JP 2020005200 A JP2020005200 A JP 2020005200A JP 2018125223 A JP2018125223 A JP 2018125223A JP 2018125223 A JP2018125223 A JP 2018125223A JP 2020005200 A JP2020005200 A JP 2020005200A
Authority
JP
Japan
Prior art keywords
block
sub
image
prediction
unit
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
JP2018125223A
Other languages
Japanese (ja)
Inventor
天洋 周
Tianyang Zhou
天洋 周
知宏 猪飼
Tomohiro Igai
知宏 猪飼
瑛一 佐々木
Eiichi Sasaki
瑛一 佐々木
友子 青野
Tomoko Aono
友子 青野
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 JP2018125223A priority Critical patent/JP2020005200A/en
Publication of JP2020005200A publication Critical patent/JP2020005200A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

To provide an image decoding device and an image encoding device which solve a problem that OBMC processing increases memory band or the processing becomes complicated and heavy.SOLUTION: A prediction image generation part of an image decoding device includes: an intra prediction image generation part; and an inter prediction image generation part 309 for generating a prediction image for each sub-block. When the difference between a motion vector of a target sub-block and the motion vector of the sub-block adjacent to the target sub-block is equal to or smaller than a predetermined value, the prediction image generation part performs prediction image generation processing using OBMC processing. Moreover, when the target sub-block is a sub-block of a predetermined size or less and the target sub-block is a bidirectional prediction sub-block, the prediction image generation part generates the prediction image by assigning the same motion information as the motion information of the adjacent sub-block adjacent to the target sub-block to the target sub-block.SELECTED DRAWING: Figure 22

Description

本発明の実施形態は、動画像復号装置、および動画像符号化装置に関する。   An embodiment of the present invention relates to a video decoding device and a video encoding device.

動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。   In order to efficiently transmit or record a moving image, a moving image encoding device that generates encoded data by encoding a 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 picture coding method include, for example, methods 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 method, an image (picture) constituting a moving image is a slice obtained by dividing the image, and a coding tree unit (CTU: Coding Tree Unit) obtained by dividing the slice. ), A coding unit obtained by dividing the coding tree unit (sometimes called a coding unit (CU)), and a prediction unit which is a block obtained by dividing the coding unit. (PU) and a transform unit (TU), and are managed and encoded / decoded for each CU.

また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。   In addition, in such a moving image encoding method, a predicted image is generally generated based on a locally decoded image obtained by encoding / decoding an input image, and the predicted image is converted from the input image (original image). The prediction residual obtained by subtraction (sometimes called a “difference image” or a “residual image”) is encoded. As a method of generating a predicted image, there are an inter-screen prediction (inter prediction) and an intra-screen prediction (intra prediction).

また、近年の動画像符号化及び復号の技術として非特許文献1が挙げられる。   In addition, Non-Patent Literature 1 is a recent technique for encoding and decoding moving images.

"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

近年の動画像符号化及び復号技術においては、予測画像を生成する際の動き補償処理にOBMC(Overlapped block motion compensation)処理が適用される場合がある。OBMC処理は、対象サブブロック(例えば、PU)に付加されたインター予測パラメータを用いて生成される補間画像と、対象サブブロックの隣接サブブロックの動きパラメータを用いて生成される補間画像とを用いて、対象サブブロックの補間画像を生成する処理である。一方で、OBMC処理は、画像データにアクセスするためのメモリバンドが大きくなるという第1の課題が生じていた。   2. Description of the Related Art In recent video coding and decoding technologies, an OBMC (Overlapped block motion compensation) process may be applied to a motion compensation process when a predicted image is generated. The OBMC process uses an interpolated image generated using inter prediction parameters added to a target sub-block (eg, PU) and an interpolated image generated using motion parameters of sub-blocks adjacent to the target sub-block. This is a process for generating an interpolated image of the target sub-block. On the other hand, the OBMC process has a first problem that a memory band for accessing image data is increased.

また、2つの参照ピクチャを用いて予測画像を生成する双方向予測をサイズの小さい対象サブブロックに対して行う場合、予測画像生成の処理が複雑になり当該処理は重くなるという第2の課題が生じていた。   In addition, when performing bidirectional prediction for generating a predicted image using two reference pictures for a target sub-block having a small size, a second problem that a process of generating a predicted image is complicated and the process becomes heavy is disadvantageous. Had occurred.

上記課題を解決するために、本発明の一態様に係る画像復号装置は、対象画像を符号化して得られた符号化データを復号する画像復号装置であって、サブブロック毎に予測画像を生成する予測画像生成部を備え、上記予測画像生成部は、対象サブブロックの動きベクトルと、当該対象サブブロックに隣接するサブブロックの動きベクトルとの差分が、所定の値以下である場合に、OBMC処理を用いた予測画像生成処理を行う。   In order to solve the above problem, an image decoding device according to an aspect of the present invention is an image decoding device that decodes encoded data obtained by encoding a target image, and generates a predicted image for each sub-block. A prediction image generation unit that performs the OBMC when the difference between the motion vector of the target sub-block and the motion vector of the sub-block adjacent to the target sub-block is equal to or smaller than a predetermined value. A predicted image generation process using the process is performed.

また、上記課題を解決するために、本発明の一態様に係る画像復号装置は対象画像を符号化して得られた符号化データを復号する画像復号装置であって、ブロック毎に予測画像を生成する予測画像生成部を備え、上記予測画像生成部は、対象サブブロックが所定のサイズ以下のサブブロックであって、対象サブブロックが双方向予測サブブロックである場合に、当該対象サブブロックに対して、当該対象サブブロックに隣接する隣接サブブロックの動き情報と同じ動き情報を割り当てて、上記予測画像を生成する。   According to another embodiment of the present invention, there is provided an image decoding apparatus for decoding encoded data obtained by encoding a target image, wherein the image decoding apparatus generates a predicted image for each block. A prediction image generation unit, the prediction image generation unit, the target sub-block is a sub-block of a predetermined size or less, when the target sub-block is a bidirectional prediction sub-block, the target sub-block Then, the same motion information as the motion information of the adjacent sub-block adjacent to the target sub-block is assigned to generate the predicted image.

また、上記課題を解決するために、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、サブブロック毎に予測画像を生成する予測画像生成部を備え、上記予測画像生成部は、対象サブブロックの動きベクトルと、当該対象ブロックに隣接するサブブロックの動きベクトルとの差分が、所定の値以下である場合に、OBMC処理を用いた予測画像生成処理を行う。   Further, in order to solve the above 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. A prediction image generation unit that generates a prediction image, wherein the prediction image generation unit determines that a difference between a motion vector of the target sub-block and a motion vector of a sub-block adjacent to the target block is equal to or smaller than a predetermined value. Next, a predicted image generation process using the OBMC process is performed.

また、上記課題を解決するために、本発明の一態様に係る画像符号化装置は、予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、サブブロック毎に予測画像を生成する予測画像生成部を備え、上記予測画像生成部は、対象サブブロックが所定のサイズ以下のブロックであって、対象サブブロックが双方向予測サブブロックである場合に、当該対象サブブロックに対して、当該対象サブブロックに隣接する隣接サブブロックの動き情報と同じ動き情報を割り当てて、上記予測画像を生成する。   Further, in order to solve the above 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. A prediction image generation unit that generates a prediction image, wherein the prediction image generation unit is configured to, when the target sub-block is a block of a predetermined size or less and the target sub-block is a bidirectional prediction sub-block, The same motion information as the motion information of the adjacent sub-block adjacent to the target sub-block is assigned to the block, and the predicted image is generated.

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

本実施形態に係る符号化ストリームのデータの階層構造を示す図である。FIG. 3 is a diagram illustrating a hierarchical structure of data of an encoded stream according to the embodiment. 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。FIG. 4 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. 本実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram showing the composition of the picture coding device concerning this embodiment. 本実施形態に係る画像復号装置の構成を示す概略図である。It is a schematic diagram showing a configuration of an image decoding device according to the present embodiment. 本実施形態に係るマージ予測パラメータ導出部の構成を示す概略図である。It is a schematic diagram showing the composition of the merge prediction parameter derivation part concerning this embodiment. 本実施形態に係るAMVP予測パラメータ導出部の構成を示す概略図である。It is a schematic diagram showing the composition of the AMVP prediction parameter derivation part concerning this embodiment. 本実施形態に係る画像符号化装置のインター予測パラメータ符号化部の構成を示す概略図である。It is a schematic diagram showing the composition of the inter prediction parameter encoding part of the picture encoding device concerning this embodiment. 本実施形態に係るインター予測画像生成部の構成を示す概略図である。It is a schematic diagram showing the composition of the inter prediction picture generation part concerning this embodiment. 本実施形態に係るインター予測パラメータ復号部の構成を示す概略図である。It is a schematic diagram showing the composition of the inter prediction parameter decoding part concerning this embodiment. 動きベクトルを予測する対象であるPU(横幅nPbW)を構成する各サブブロックの動きベクトルspMvLX[xi][yi]を導出する例を示す図である。FIG. 13 is a diagram illustrating an example of deriving a motion vector spMvLX [xi] [yi] of each sub-block configuring a PU (width nPbW) for which a motion vector is predicted. (a)は、バイラテラルマッチング(Bilateral matching)について説明するための図である。(b)は、テンプレートマッチング(Template matching)について説明するための図である。(A) is a figure for demonstrating bilateral matching (Bilateral matching). (B) is a figure for explaining template matching (Template matching). 本変形例に係るサブブロック予測パラメータ導出部が行うサブブロックマージ処理を表す疑似コードの一例を示す図である。FIG. 14 is a diagram illustrating an example of pseudo code representing a sub-block merging process performed by a sub-block prediction parameter derivation unit according to the present modification. 本変形例に係るサブブロック予測パラメータ導出部が行う、双方向予測を行うか否かを判定する処理を表す疑似コードの一例を示す図である。FIG. 15 is a diagram illustrating an example of pseudo code representing a process performed by a sub-block prediction parameter derivation unit according to the present modification to determine whether to perform bidirectional prediction. 本変形例に係るサブブロック予測パラメータ導出部が行う、双方向予測を行うか否かを判定する処理を表す疑似コードの他の一例を示す図である。FIG. 21 is a diagram illustrating another example of the pseudo code indicating the process performed by the sub-block prediction parameter derivation unit according to the present modification to determine whether to perform bidirectional prediction. 本変形例に係るサブブロック予測パラメータ導出部が行うサブブロックマージ処理を表す疑似コードの一例を示す図である。FIG. 14 is a diagram illustrating an example of pseudo code representing a sub-block merging process performed by a sub-block prediction parameter derivation unit according to the present modification. 本変形例に係るサブブロック予測パラメータ導出部が行うサブブロックマージ処理を表す疑似コードの他の一例を示す図である。FIG. 15 is a diagram illustrating another example of the pseudo code indicating the sub-block merging process performed by the sub-block prediction parameter derivation unit according to the present modification. 本実施形態に係る隣接PUの動きパラメータを利用して予測画像生成を行う領域の一例を示す図である。FIG. 7 is a diagram illustrating an example of a region in which a predicted image is generated using a motion parameter of an adjacent PU according to the embodiment. 本実施形態に係るOBMC処理を行う動き補償部の要部構成を示すブロック図である。FIG. 3 is a block diagram illustrating a main configuration of a motion compensation unit that performs an OBMC process according to the embodiment. 本実施形態に係るOBMC処理に係る動き補償部の処理の流れの一例を示すフローチャートである。9 is a flowchart illustrating an example of a flow of a process of a motion compensation unit according to the OBMC process according to the embodiment. 本実施形態に係るOBMC処理を表す疑似コードの一例を示す図である。FIG. 5 is a diagram illustrating an example of pseudo code representing an OBMC process according to the embodiment. 隣接サブブロックの動きパラメータが未知であるか否かを説明する図である。It is a figure explaining whether a motion parameter of an adjacent subblock is unknown. 本変形例に係るOBMC処理を行う動き補償部の要部構成を示すブロック図である。FIG. 14 is a block diagram illustrating a main configuration of a motion compensation unit that performs an OBMC process according to a modification. 本変形例に係る対象サブブロックと該対象サブロックに隣接する同じPU内のサブブロックとをマージしたブロックの一例を示す図である。FIG. 21 is a diagram illustrating an example of a block obtained by merging a target sub-block according to the present modification with sub-blocks in the same PU adjacent to the target sub-block. 本変形例に係るマージの対象となる対象サブブロックに隣接する同じPU内のサブブロックの一例を示す図である。FIG. 15 is a diagram illustrating an example of a sub-block in the same PU adjacent to a target sub-block to be merged according to the present modified example. 本変形例に係るOBMC処理を表す疑似コードの一例を示す図である。FIG. 14 is a diagram illustrating an example of pseudo code representing an OBMC process according to the present modification. 本変形例に係るOBMC処理実施判定部がmergeBlkFlagを導出するための判定式の一例を示す図である。FIG. 14 is a diagram illustrating an example of a determination formula for an OBMC processing execution determination unit according to the present modification to derive mergeBlkFlag. 本変形例に係るOBMC処理を表す疑似コードの他の一例を示す図である。FIG. 14 is a diagram illustrating another example of the pseudo code representing the OBMC process according to the modification. 本変形例に係るOBMC処理実施判定部がmergeBlkFlagを導出するための判定式の他の一例を示す図である。FIG. 14 is a diagram illustrating another example of a determination formula for the OBMC processing execution determination unit according to the modification to derive mergeBlkFlag. 本変形例に係る対象サブブロックに隣接するサブブロックの一例を示す図である。FIG. 14 is a diagram illustrating an example of a sub-block adjacent to a target sub-block according to the present modification. 本変形例に係るOBMC処理を表す疑似コードの一例を示す図である。FIG. 14 is a diagram illustrating an example of pseudo code representing an OBMC process according to the present modification. 本変形例に係るOBMC処理実施判定部がsmallMVFlagを導出するための判定式の一例を示している。15 shows an example of a determination formula for an OBMC process execution determination unit according to the present modification to derive smallMVFlag. 本変形例に係るOBMC処理実施判定部がsmallMVFlagを導出するための判定式の他の一例を示している。15 shows another example of a determination formula for the OBMC processing execution determination unit according to the present modification to derive smallMVFlag. 本変形例に係るOBMC処理を表す疑似コードの他の一例を示す図である。FIG. 14 is a diagram illustrating another example of the pseudo code representing the OBMC process according to the modification. 本変形例に係るOBMC処理実施判定部がsmallMVFlagを導出するための判定式の一例を示す図である。FIG. 14 is a diagram illustrating an example of a determination formula for an OBMC process execution determination unit according to the present modification to derive smallMVFlag. 本実施形態に係る画像符号化装置を搭載した送信装置、および、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。FIG. 1 is a diagram illustrating a configuration of a transmission device equipped with an image encoding device according to the present embodiment and a reception device equipped with an image decoding device. (A) shows a transmitting device equipped with an image encoding device, and (b) shows a receiving device equipped with an image decoding device. 本実施形態に係る画像符号化装置を搭載した記録装置、および、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。FIG. 1 is a diagram illustrating a configuration of a recording device equipped with an image encoding device according to the present embodiment and a playback device equipped with an image decoding device. (A) shows a recording device equipped with an image encoding device, and (b) shows a reproducing device equipped with an image decoding device. 本実施形態に係る画像伝送システムの構成を示す概略図である。1 is a schematic diagram illustrating a configuration of an image transmission system according to an embodiment.

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

図37は、本実施形態に係る画像伝送システム1の構成を示す概略図である。   FIG. 37 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 encoding target image, decodes the transmitted code, and displays the 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が入力される。   An image T is input to the image encoding device 11.

ネットワーク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: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof. The network 21 is not limited to a two-way communication network, but may be a one-way communication network for transmitting broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. Further, the network 21 may be replaced with a storage medium that records the encoded stream Te such as a DVD (Digital Versatile Disc) and a BD (Blue-ray Disc).

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

画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、画像復号装置31が高い処理能力を有する場合には、画質の高い画像を表示し、より低い処理能力しか有しない場合には、画質の低い画像を表示する。   The image display device 41 displays all or a part of one or a plurality of decoded images Td generated by the image decoding device 31. The image display device 41 includes a display device such as a liquid crystal display and an organic EL (Electro-luminescence) display. When the image decoding device 31 has a high processing capability, an image with a high image quality is displayed. When the image decoding device 31 has only a low processing capability, an image with a low image quality is displayed.

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

>>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=はOR代入演算子である。   >> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, and | = is an 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 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, and returns a if c <a, returns b if c> b, and returns b if c> b Is a function that returns c (where a <= b).

<符号化ストリームTeの構造>
本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of encoded stream Te>
Prior to the 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 showing a hierarchical structure of data in an encoded stream Te. The coded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. 1A to 1F 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 slice data, respectively. FIG. 3 is a diagram illustrating data, a coding tree unit included in the coding slice data, and a coding unit (Coding Unit; CU) included in the coding tree unit.

(符号化ビデオシーケンス)
符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図1の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。
(Encoded video sequence)
In the encoded video sequence, a set of data referred to by the image decoding device 31 to decode 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. Contains extended information SEI (Supplemental Enhancement Information).

ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。   The video parameter set VPS includes, in a moving image composed of a plurality of layers, a set of encoding parameters common to a plurality of moving images and a plurality of layers included in the moving image and encoding parameters associated with each layer. Sets are 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 to decode the target sequence is defined. For example, the width and height of a picture are defined. Note that a plurality of SPSs may exist. In that case, one of the plurality of SPSs is selected from the PPS.

ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。   The picture parameter set PPS defines a set of encoding parameters that the image decoding device 31 refers to for decoding each picture in the target sequence. For example, a reference value (pic_init_qp_minus26) of a quantization width used for decoding a picture and a flag (weighted_pred_flag) indicating application of weighted prediction are included. Note that a plurality of PPSs may exist. In that case, any one of the 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 for decoding the picture PICT to be processed is defined. As shown in FIG. 1B, the picture PICT includes slices S0 to SNS -1 (NS is the total number of slices included in the picture PICT).

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

(符号化スライス)
符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図1の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
(Coding 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. The slice S includes a slice header SH and slice data SDATA, as shown in FIG.

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

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

なお、スライスヘッダ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 to decode the slice data SDATA to be processed is defined. The slice data SDATA includes a coding tree unit (CTU: Coding Tree Unit) as shown in FIG. A CTU is a block of a fixed size (for example, 64 × 64) constituting a slice, and may be referred to as a maximum coding unit (LCU).

(符号化ツリーユニット)
図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は、符号化処理の基本的な単位となる。
(Coding tree unit)
As shown in FIG. 1E, a set of data referred to by the image decoding device 31 to decode the coding 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 division is referred to as a coding node (CN). The intermediate node of the quadtree is a coding node, and the coding tree unit itself is defined as the highest coding node. The CTU includes a split flag (cu_split_flag). When cu_split_flag is 1, the CTU 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 coding unit CU is a terminal node of the coding node and is not further divided. The encoding unit CU is a basic unit of the encoding process.

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

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

予測ツリーでは、符号化ユニットを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 is defined. In other words, a prediction unit is one or more non-overlapping regions that make up a coding unit. Further, 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. If the size of the prediction unit and the sub-block are equal, there is one sub-block in the prediction unit. 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, which 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 splits in the prediction tree: intra prediction and inter prediction. Intra prediction refers to 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, the division method includes 2Nx2N (the same size as the coding unit) and NxN.

また、インター予測の場合、分割方法は、符号化データの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 the encoded data, and 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN and others. Note that 2NxN and Nx2N indicate a 1: 1 symmetric division,
2NxnU, 2NxnD and nLx2N, nRx2N show asymmetric splits of 1: 3, 3: 1. The PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in order.

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

変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。   The division in the transform tree includes one in which an area having the same size as the encoding unit is assigned as the transform unit, and one in which the recursive quadtree division is performed 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を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
(Forecast parameters)
A prediction image of a prediction unit (PU: Prediction Unit) is derived by a prediction parameter attached to the PU. The prediction parameter includes a prediction parameter for intra prediction or a prediction parameter for inter prediction. Hereinafter, the prediction parameters of the inter prediction (inter prediction parameters) will be described. The inter prediction parameter includes a prediction list use flag predFlagL0, predFlagL1, a reference picture index refIdxL0, refIdxL1, and a motion vector mvL0, mvL1. The prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether reference picture lists called L0 list and L1 list are used, respectively. When the value is 1, the corresponding reference picture list is used. Note that in this specification, when a “flag indicating whether or not XX” is described, a flag other than 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. Treat 1 as true and 0 as false (the same applies hereinafter). However, other values can be used as a true value and a false value in an actual device or method.

符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。   Syntax elements for deriving the inter prediction parameter included in the encoded data include, for example, PU division 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, There is a difference vector mvdLX.

(参照ピクチャリスト)
参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図2は、参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。図2(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図2(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. 2 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. In FIG. 2A, 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-prediction pictures, bi-prediction pictures, and numbers in the rectangles are decoding. Indicates the order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, P1. FIG. 2B shows an example of the reference picture list. The reference picture list is a list representing reference picture candidates, 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 current picture is B3, 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. A merge flag merge_flag is a flag for identifying these. The merge prediction mode is a mode in which a prediction list use flag predFlagLX (or an inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX are not included in encoded data, and are derived from prediction parameters of already processed neighboring PUs. The AMVP mode is a mode in which an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, and a motion vector mvLX are included in 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 a reference picture managed by a reference picture list of an L0 list and an L1 list is used, respectively, and indicate that one reference picture is used (uni-prediction). PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and uses reference pictures managed in an L0 list and an L1 list. 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 a reference picture list. Note that LX is a description method used when L0 prediction and L1 prediction are not distinguished, and the parameters for the L0 list and the parameters for the L1 list are distinguished by replacing LX with L0 and L1.

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

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

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
As the inter prediction parameter, a prediction list use flag or an inter prediction identifier may be used. Further, the determination using the prediction list use flag may be replaced with a determination using an inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with a determination using a prediction list use flag.

(双予測biPredの判定)
双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
(Judgment of bi-prediction biPred)
The flag biPred as to whether it is bi-prediction BiPred can be derived based on whether both of the two prediction list use flags are “1”. For example, it can be derived by the following equation.

biPred = (predFlagL0 == 1 && predFlagL1 == 1)
フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。たとえば以下の式で導出できる。
biPred = (predFlagL0 == 1 && predFlagL1 == 1)
The flag biPred can also be derived based on whether or not the inter prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, it can be derived by the following equation.

biPred = (inter_pred_idc == PRED_BI) ? 1 : 0
上記式は、以下の式でも表現できる。
biPred = (inter_pred_idc == PRED_BI)? 1: 0
The above equation can also be expressed by the following equation.

biPred = (inter_pred_idc == PRED_BI)
なお、PRED_BIはたとえば3の値を用いることができる。
biPred = (inter_pred_idc == PRED_BI)
Note that a value of, for example, 3 can be used for PRED_BI.

(画像復号装置の構成)
次に、本実施形態に係る画像復号装置31の構成について説明する。図4は、本実施形態に係る画像復号装置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. 4 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 a reverse. It is configured to include a quantization / inverse transforming unit 311 and an adding unit 312.

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

エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測情報および、差分画像を生成するための残差情報などがある。   The entropy decoding unit 301 performs entropy decoding on the 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, residual information for generating a difference image, and the like.

エントロピー復号部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、カルーネンレーベ変換)等の周波数変換を行い量子化して得られる係数である。   Entropy decoding section 301 outputs a part of the separated code to prediction parameter decoding section 302. The part of the separated code is, for example, prediction mode predMode, PU division 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. Control of which code is to be decoded is performed based on an instruction from the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantized coefficients to the inverse quantization / inverse transform unit 311. In the encoding process, the quantized coefficients are used for DCT (Discrete Cosine Transform, Discrete Cosine Transform), DST (Discrete Sine Transform, Discrete Sine Transform), KLT (Karyhnen Loeve Transform, Karhunen-Loeve transform) Is a coefficient obtained by performing frequency conversion and quantization.

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

インター予測パラメータ復号部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 the decoded inter prediction parameter in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.

イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。   Intra prediction parameter decoding section 304 decodes the intra prediction parameters with reference to the prediction parameters stored in prediction parameter memory 307 based on the code input from entropy decoding section 301. The intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameters to the prediction image generation unit 308, and stores the decoded intra prediction parameters in the prediction parameter memory 307.

ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。   The loop filter 305 applies a filter 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 position predetermined 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 parameters at predetermined positions for each picture to be decoded and each 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 use 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 mode generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and receives the 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 a sub-block in the prediction mode indicated by the prediction mode predMode, using the input prediction parameters and the read reference picture (reference picture block).

ここで、予測モード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 perform the inter prediction. Generates a predicted image of a PU or a sub-block.

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

予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照ピクチャを用いてイントラ予測を行う。   When the prediction mode predMode indicates the intra prediction mode, the intra prediction image generation unit 310 performs the intra prediction using the intra prediction parameters input from the intra prediction parameter decoding unit 304 and the read reference pictures.

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

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

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

図9は、本実施形態に係るインター予測パラメータ復号部303の構成を示す概略図である。インター予測パラメータ復号部303は、インター予測パラメータ復号制御部3031、AMVP予測パラメータ導出部3032、加算部3038、マージ予測パラメータ導出部3036およびサブブロック予測パラメータ導出部3037を含んで構成される。   FIG. 9 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 deriving unit 3032, an adding unit 3038, a merge prediction parameter deriving unit 3036, and a sub-block prediction parameter deriving 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 codes (syntax elements) included in the encoded data, for example, the PU division 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.

インター予測パラメータ復号制御部3031は、まず、マージフラグmerge_flagを抽出する。インター予測パラメータ復号制御部3031が、あるシンタックス要素を抽出すると表現する場合は、あるシンタックス要素の復号をエントロピー復号部301に指示し、該当のシンタックス要素を符号化データから読み出すことを意味する。   First, the inter prediction parameter decoding control unit 3031 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 decoding of a certain syntax element is instructed to the entropy decoding unit 301 and the corresponding syntax element is read from the encoded data. I 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, indicating the AMVP prediction mode, the inter prediction parameter decoding control unit 3031 extracts the AMVP prediction parameter from the encoded data using the entropy decoding unit 301. The AMVP prediction parameters include, for example, 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 deriving unit 3032 derives a prediction vector mvpLX from the prediction vector index mvp_LX_idx. Details will be described later. Inter prediction parameter decoding control section 3031 outputs difference vector mvdLX to addition section 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, indicating the merge prediction mode, the inter prediction parameter decoding control unit 3031 extracts a 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 sub-block prediction parameter deriving unit 3037 divides the PU into a plurality of sub-blocks according to the value of the sub-block prediction mode flag subPbMotionFlag, and derives a motion vector for each sub-block. That is, in the sub-block prediction mode, a prediction block is predicted in a small block unit of 4 × 4 or 8 × 8. In an image encoding device 11 described below, a CU is divided into a plurality of partitions (PUs such as 2NxN, Nx2N, and NxN), and a sub-block prediction mode is used for encoding a prediction parameter syntax in partition units. 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 many sub-blocks can be encoded with a small code amount.

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

(サブブロック予測モードフラグ)
ここで、画像復号装置31、画像符号化装置11(詳細は後述する)における、あるPUの予測モードがサブブロック予測モードであるか否かを示すサブブロック予測モードフラグsubPbMotionFlagの導出方法について説明する。画像復号装置31、画像符号化装置11は、後述する空間サブブロック予測SSUB、時間サブブロック予測TSUB、アフィン予測AFFINE、マッチング動き導出MATのいずれを用いたかに基づいて、サブブロック予測モードフラグsubPbMotionFlagを導出する。たとえば、あるPUで選択された予測モードをN(たとえばNは選択されたマージ候補を示すラベル)とした場合には、以下の式によりサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。
(Sub-block prediction mode flag)
Here, a method of deriving a sub-block prediction mode flag subPbMotionFlag indicating whether the prediction mode of a certain PU is the 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 set a sub-block prediction mode flag subPbMotionFlag based on which of a spatial sub-block prediction SSUB, a temporal sub-block prediction TSUB, an affine prediction AFFINE, and a matching motion derivation MAT described later is used. Derive. 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 == AFFINE) || (N == MAT)
ここで||は、論理和を示す(以下同様)。
subPbMotionFlag = (N == TSUB) || (N == SSUB) || (N == AFFINE) || (N == MAT)
Here, || indicates a logical sum (the same applies hereinafter).

(サブブロック予測部)
次に、サブブロック予測部について説明する。
(Sub-block predictor)
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はサブブロックのサイズである。
(Spatiotemporal 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. Is derived to obtain a motion vector of a sub-block obtained by dividing. Specifically, by scaling the motion vector of the PU on the reference image according to the reference picture referenced by the target PU, the motion vector spMvLX [xi] [yi] of each sub-block in the target PU (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ..., nPbH / nSbH-1) Deriving (temporal sub-block prediction). Here, (xPb, yPb) is the upper left coordinate of the target PU, nPbW, nPbH is 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 candidate TSUB for temporal sub-block prediction and the candidate SSUB for spatial sub-block prediction are selected as one of the merge modes (merge candidate).

(アフィン予測部)
アフィン予測部30372は、対象PUのアフィン予測パラメータを導出する。本実施形態では、アフィン予測パラメータとして、対象PUの2つの制御点(V0、V1)の動きベクトル(mv0_x, mv0_y)(mv1_x, mv1_y)を導出する。具体的には、対象PUの隣接PUの動きベクトルから予測することにより、各制御点の動きベクトルを導出してもよいし、さらに、制御点の動きベクトルとして導出された予測ベクトルと符号化データから導出される差分ベクトルの和により、各制御点の動きベクトルを導出してもよい。
(Affine prediction unit)
The affine prediction unit 30372 derives affine prediction parameters of the target PU. In the present embodiment, motion vectors (mv0_x, mv0_y) (mv1_x, mv1_y) of two control points (V0, V1) of the target PU are derived as affine prediction parameters. Specifically, the motion vector of each control point may be derived by predicting from the motion vector of the PU adjacent to the target PU, or the prediction vector and the coded data The motion vector of each control point may be derived from the sum of the difference vectors derived from.

図10は、対象PU(nPbW×nPbH)を構成する各サブブロックの動きベクトルspMvLXを、制御点V0の動きベクトル(mv0_x, mv0_y)およびV1の動きベクトル(mv1_x, mv1_y)から導出する例を示す図である。各サブブロックの動きベクトルspMvLXは、図10に示すように、各サブブロックの中心に位置する点毎の動きベクトルとして導出する。   FIG. 10 shows an example in which the motion vector spMvLX of each sub-block constituting the target PU (nPbW × nPbH) is derived from the motion vector (mv0_x, mv0_y) of the control point V0 and the motion vector (mv1_x, mv1_y) of V1. FIG. As shown in FIG. 10, the motion vector spMvLX of each sub-block is derived as a motion vector for each point located at the center of each sub-block.

(マッチング動き導出部30373)
マッチング動き導出部30373は、バイラテラルマッチングまたはテンプレートマッチングの何れかのマッチング処理を行うことにより、PUを構成するブロック又はサブブロックの動きベクトルspMvLXを導出する。図11は、(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 a sub-block constituting the PU by performing either a matching process of bilateral matching or template matching. FIG. 11 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.

マッチング動き導出部では、対象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 divides the target PU into a plurality of sub-blocks and performs bilateral matching or template matching described below in units of the divided sub-blocks, thereby obtaining 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.

(サブブロック予測パラメータ導出部3037の変形例)
次に、サブブロック予測パラメータ導出部3037の変形例について、図12から図16を参照して、説明する。
(Modification of Sub-block Prediction Parameter Deriving Unit 3037)
Next, a modification of the sub-block prediction parameter deriving unit 3037 will be described with reference to FIGS.

本変形例に係るサブブロック予測パラメータ導出部3037は、対象サブブロックが所定のサイズ以下のサブブロックであって、対象サブブロックが双方向予測サブブロックである場合に以下の処理を行う。サブブロック予測パラメータ導出部3037は、当該対象サブブロックに対して、当該対象サブブロックに隣接する隣接サブブロックの動き情報と同じ動き情報を割り当てる。   The sub-block prediction parameter deriving unit 3037 according to the present modification performs the following processing when the target sub-block is a sub-block having a predetermined size or less and the target sub-block is a bidirectional prediction sub-block. The sub-block prediction parameter deriving unit 3037 assigns the same motion information as the motion information of the adjacent sub-block adjacent to the current sub-block to the current sub-block.

上記の構成によれば、サブブロック予測パラメータ導出部3037は所定のサイズ以下の対象サブブロックに、当該対象サブブロックに隣接サブブロックと同じ動き情報を割り当てる。そのため、インター予測画像生成部309は所定のサイズ以下の対象サブブロックと隣接サブブロックとを同一のブロックとして双方向予測することができる。換言すると、サブブロック予測パラメータ導出部3037は所定のサイズ以下の対象サブブロックと隣接サブブロックとをマージ(結合)すると表現することができる。例えば、本変形例は、ATMVP等のような4×4単位のサブブロック毎に動きベクトルを導出するような構成において対象サブブロックを双方向予測する場合、4×4単位の対象サブブロックと4×4単位の隣接サブブロックとをマージする。   According to the above configuration, the sub-block prediction parameter deriving unit 3037 allocates the same motion information as the adjacent sub-block to the target sub-block to the target sub-block having a predetermined size or less. Therefore, the inter-prediction image generation unit 309 can perform bidirectional prediction with the target sub-block and the adjacent sub-block having a predetermined size or less as the same block. In other words, the sub-block prediction parameter deriving unit 3037 can be expressed as merging (combining) a target sub-block having a predetermined size or less with an adjacent sub-block. For example, in the present modification, when a target sub-block is bidirectionally predicted in a configuration in which a motion vector is derived for each 4 × 4 unit sub-block such as ATMVP or the like, a 4 × 4 unit target sub-block Merge with × 4 adjacent sub-blocks.

そのため、双方向予測を用いた予測画像生成における処理を軽減することができるという効果を奏する。   Therefore, there is an effect that it is possible to reduce processing in generating a predicted image using bidirectional prediction.

(サブブロック予測パラメータ導出部3037の処理例1)
次に、サブブロック予測パラメータ導出部3037が行う処理例について、図12から図14を参照して説明する。図12は、本例に係るサブブロック予測パラメータ導出部3037が行うサブブロックマージ処理を表す疑似コードの一例を示す図である。図12において、(nPbW, nPbH)は対象サブブロックを含むブロックのブロックサイズ(対象PUのサイズ)を示している。また、図12において、(subX, subY)は、対象ブロック(対象PU)内における対象サブブロックの位置(サブブロック単位)を示している。。図12に示すように、対象サブブロックが4×4単位より小さいサブブロックであり、かつ、対象サブブロックに双方向予測(双予測)が指定されている場合、サブブロック予測パラメータ導出部3037は、対象サブブロックと隣接サブブロックとをマージする。例えば、サブブロック予測パラメータ導出部3037は対象サブブロックに双方向予測を適用することを示す双方向予測フラグBiPredを以下の式により導出してもよい(双方向予測を行うか否かを判定してもよい)。なお、(xSb, ySb)は対象サブブロック(例えば、対象PU)の左上座標を画素単位で示している。
(Processing example 1 of sub-block prediction parameter deriving unit 3037)
Next, an example of processing performed by the sub-block prediction parameter deriving unit 3037 will be described with reference to FIGS. FIG. 12 is a diagram illustrating an example of pseudo code representing a sub-block merging process performed by the sub-block prediction parameter deriving unit 3037 according to the present example. In FIG. 12, (nPbW, nPbH) indicates the block size of the block including the target sub-block (the size of the target PU). Also, in FIG. 12, (subX, subY) indicates the position (subblock unit) of the target subblock in the target block (target PU). . As illustrated in FIG. 12, when the target sub-block is a sub-block smaller than 4 × 4 units and bidirectional prediction (bi-prediction) is specified for the target sub-block, the sub-block prediction parameter deriving unit 3037 , The target sub-block and the adjacent sub-block are merged. For example, the sub-block prediction parameter deriving unit 3037 may derive a bi-prediction flag BiPred indicating that bi-prediction is applied to the target sub-block by the following equation (determining whether or not to perform bi-prediction). May be). Note that (xSb, ySb) indicates the upper left coordinates of the target sub-block (for example, the target PU) in pixel units.

bipred = (predFlagL0[xSb][ySb] == 1 && predFlagL1[xSb][ySb] == 1) ? 1 : 0
ここで、(xSb, ySb)は対象サブブロックの位置を画素単位で示している。
bipred = (predFlagL0 [xSb] [ySb] == 1 && predFlagL1 [xSb] [ySb] == 1)? 1: 0
Here, (xSb, ySb) indicates the position of the target sub-block in pixel units.

また、サブブロック予測パラメータ導出部3037は、サブブロックのスキャン順に沿って、1つおきのサブブロックについて双方向予測を行うか否かを判定してもよい。この場合、サブブロック予測パラメータ導出部3037は対象サブブロックに双方向予測を適用することを示す双方向予測フラグBiPredを以下の式により導出してもよい。なお、nSbW, nSbHはサブブロックのサイズを示している。   Further, the sub-block prediction parameter deriving unit 3037 may determine whether or not to perform bi-directional prediction on every other sub-block according to the scanning order of the sub-blocks. In this case, the sub-block prediction parameter deriving unit 3037 may derive a bi-prediction flag BiPred indicating that bi-prediction is applied to the target sub-block by the following equation. Note that nSbW and nSbH indicate the size of the sub-block.

((xSb % (2*nSbW)) && predFlagL0[xSb][ySb] == 1 && predFlagL1[xSb][ySb] == 1)
図13は、サブブロック予測パラメータ導出部3037が行う、双方向予測を行うか否かを1つおきのサブブロックについて判定する処理を表す疑似コードの一例を示す図である。
((xSb% (2 * nSbW)) && predFlagL0 [xSb] [ySb] == 1 && predFlagL1 [xSb] [ySb] == 1)
FIG. 13 is a diagram illustrating an example of pseudo code representing a process performed by the sub-block prediction parameter deriving unit 3037 to determine whether to perform bidirectional prediction for every other sub-block.

図14は、サブブロック予測パラメータ導出部3037が行う、双方向予測を行うか否かを1つおきのサブブロックについて判定する処理を表す疑似コードの他の一例を示す図である。図14に示す例では、サブブロック予測パラメータ導出部3037は、双方向予測が対象サブブロックに適用され、かつ、対象サブブロックの動きベクトルと隣接サブブロックの動きベクトルが異なる場合の処理の一例が示されている。本例においては、サブブロック予測パラメータ導出部3037は、対象サブブロックおよび隣接サブブロックに同じ動きベクトルを割り当てることによって、対象サブブロックと隣接サブブロックとをマージする。また、図14に示すように、サブブロック予測パラメータ導出部3037は、1つおきのサブブロック(8x4単位)毎に、右の隣接サブブロックを参照し、マージを行うか否かを判定する。   FIG. 14 is a diagram illustrating another example of pseudo code indicating a process performed by the sub-block prediction parameter deriving unit 3037 to determine whether to perform bidirectional prediction for every other sub-block. In the example illustrated in FIG. 14, the sub-block prediction parameter deriving unit 3037 performs an example of a process performed when bidirectional prediction is applied to the current sub-block and the motion vector of the current sub-block is different from the motion vector of the adjacent sub-block. It is shown. In this example, the sub-block prediction parameter deriving unit 3037 merges the current sub-block and the adjacent sub-block by allocating the same motion vector to the current sub-block and the adjacent sub-block. Further, as shown in FIG. 14, the sub-block prediction parameter deriving unit 3037 refers to the right adjacent sub-block for every other sub-block (8 × 4 unit) and determines whether or not to perform merging.

(マージされたサブブロックに割り当てられる動きベクトルの例1)
次に、マージされたサブブロックに割り当てられる動きベクトルの例について、図15および図16を参照して説明する。図15および図16は本例に係るサブブロック予測パラメータ導出部3037が行うサブブロックマージ処理を表す疑似コードの一例を示す図である。
(Example 1 of motion vector assigned to merged sub-block)
Next, an example of a motion vector assigned to the merged sub-block will be described with reference to FIGS. FIGS. 15 and 16 are diagrams showing an example of pseudo code representing a sub-block merging process performed by the sub-block prediction parameter deriving unit 3037 according to the present example.

図15に示す例では、サブブロック予測パラメータ導出部3037は隣接サブブロックに対象サブブロックに付加された動きベクトルを割り当てる。なお、サブブロック予測パラメータ導出部3037は対象サブブロックに隣接サブブロックに付加された動きベクトルを割り当ててもよい。本例における、対象サブブロックおよび隣接サブブロックに割り当てられる共通の動きベクトルcMvL0およびcMvL1は、以下の式によって表すことができる。   In the example illustrated in FIG. 15, the sub-block prediction parameter deriving unit 3037 allocates a motion vector added to the current sub-block to an adjacent sub-block. Note that the sub-block prediction parameter deriving unit 3037 may assign the motion vector added to the adjacent sub-block to the target sub-block. In this example, the common motion vectors cMvL0 and cMvL1 allocated to the target sub-block and the adjacent sub-block can be represented by the following equations.

mvL0[xSb][ySb] = mvL0[xSb+nSbW][ySb] = cMvL0
mvL1[xSb][ySb] = mvL1[xSb+nSbW][ySb] = cMvL1
predFlagL0[xSb+1][ySb] = 1
predFlagL1[xSb+1][ySb] = 1
図16に示す例では、サブブロック予測パラメータ導出部3037は、対象サブブロックと隣接サブブロックとに同じ動きベクトルを割り当てる。例えば、対象サブブロックの動きベクトルと隣接サブブロックの動きベクトルとの平均ベクトルを、対象サブブロックのおよび隣接サブブロックに割り当てる。
mvL0 [xSb] [ySb] = mvL0 [xSb + nSbW] [ySb] = cMvL0
mvL1 [xSb] [ySb] = mvL1 [xSb + nSbW] [ySb] = cMvL1
predFlagL0 [xSb + 1] [ySb] = 1
predFlagL1 [xSb + 1] [ySb] = 1
In the example illustrated in FIG. 16, the sub-block prediction parameter deriving unit 3037 allocates the same motion vector to the target sub-block and the adjacent sub-block. For example, the average vector of the motion vector of the target sub-block and the motion vector of the adjacent sub-block is assigned to the target sub-block and the adjacent sub-block.

上記の構成によれば、所定のサイズ以下の対象サブブロックおよび隣接サブブロックに対して、所定のサイズ以下の対象サブブロックに、対象サブブロックの動きベクトルと、隣接サブブロックの動きベクトルとの平均ベクトルを割り当てる。すなわち、所定のサイズ以下の対象サブブロックと隣接サブブロックとを同一のサブブロックとして双方向予測することができる。そのため、双方向予測を用いた予測画像生成の処理を軽減することができるという効果を奏する。   According to the above configuration, the average of the motion vector of the target sub-block and the motion vector of the adjacent sub-block is calculated for the target sub-block having the predetermined size or less and the adjacent sub-block. Assign a vector. That is, the target sub-block and the adjacent sub-block having a predetermined size or less can be bidirectionally predicted as the same sub-block. Therefore, there is an effect that the processing of generating a predicted image using bidirectional prediction can be reduced.

本例における、対象サブブロックおよび隣接サブブロックに割り当てられる共通の動きベクトルcMvL0およびcMvL1は、以下の式によって表すことができる。   In this example, the common motion vectors cMvL0 and cMvL1 allocated to the target sub-block and the adjacent sub-block can be represented by the following equations.

cMvL0 = (mvL0[xSb][ySb] + mvL0[xSb+nSbW][ySb] + 1) >>1
cMvL1 = (mvL1[xSb][ySb] + mvL1[xSb+nSbW][ySb] + 1) >>1
図5は、本実施形態に係るマージ予測パラメータ導出部3036の構成を示す概略図である。マージ予測パラメータ導出部3036は、マージ候補導出部30361とマージ候補選択部30362、マージ候補格納部30363を備える。マージ候補格納部30363は、マージ候補導出部30361から入力されたマージ候補を格納する。なお、マージ候補は、予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLXを含んで構成されている。マージ候補格納部30363において、格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。
cMvL0 = (mvL0 [xSb] [ySb] + mvL0 [xSb + nSbW] [ySb] +1) >> 1
cMvL1 = (mvL1 [xSb] [ySb] + mvL1 [xSb + nSbW] [ySb] +1) >> 1
FIG. 5 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 candidate input from the merge candidate derivation unit 30361. The merging 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 deriving unit 30361 derives a merge candidate using the motion vector of the adjacent PU already decoded and the reference picture index refIdxLX as they are.

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

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

マージ候補導出部30361によって導出された上記マージ候補はマージ候補格納部30363に格納される。   The merge candidate derived by the merge candidate deriving unit 30361 is stored in the merge candidate storage unit 30363.

マージ候補選択部30362は、マージ候補格納部30363に格納されているマージ候補のうち、インター予測パラメータ復号制御部3031から入力されたマージインデックスmerge_idxに対応するインデックスが割り当てられたマージ候補を、対象PUのインター予測パラメータとして選択する。マージ候補選択部30362は選択したマージ候補を予測パラメータメモリ307に記憶するとともに、予測画像生成部308に出力する。   The merge candidate selection unit 30362 determines, from among 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 a target PU. Is selected as an inter prediction parameter. The merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs the selected merge candidate to the prediction image generation unit 308.

図6は、本実施形態に係るAMVP予測パラメータ導出部3032の構成を示す概略図である。AMVP予測パラメータ導出部3032は、ベクトル候補導出部3033とベクトル候補選択部3034、およびベクトル候補格納部3035を備える。ベクトル候補導出部3033は、参照ピクチャインデックスrefIdxに基づいて予測パラメータメモリ307が記憶する既に処理済みのPUの動きベクトルmvLXから予測ベクトル候補を導出し、ベクトル候補格納部3035予測ベクトル候補リストmvpListLX[]に格納する。   FIG. 6 is a schematic diagram illustrating a configuration of the AMVP prediction parameter deriving 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 a vector candidate storage unit 3035 prediction vector candidate list mvpListLX [] To be stored.

ベクトル候補選択部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 among the prediction vector candidates of 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 the 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) in a predetermined range from the decoding target PU. Note that the adjacent PU includes, in addition to the PU spatially adjacent to the decoding target PU, for example, the left PU and the upper PU, a region temporally adjacent to the decoding target PU, for example, the same position as the decoding target PU. Includes regions obtained from prediction parameters of PUs with different times.

加算部3038は、AMVP予測パラメータ導出部3032から入力された予測ベクトルmvpLXとインター予測パラメータ復号制御部3031から入力された差分ベクトルmvdLXを加算して動きベクトルmvLXを算出する。加算部3038は、算出した動きベクトルmvLXを予測画像生成部308および予測パラメータメモリ307に出力する。   The adding unit 3038 calculates the motion vector mvLX by adding 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. The addition unit 3038 outputs the calculated motion vector mvLX to the prediction image generation unit 308 and the prediction parameter memory 307.

(インター予測画像生成部309)
図8は、本実施形態に係る予測画像生成部308に含まれるインター予測画像生成部309の構成を示す概略図である。インター予測画像生成部309は、動き補償部(予測画像生成装置)3091、重み予測部3094を含んで構成される。
(Inter prediction image generation unit 309)
FIG. 8 is a schematic diagram illustrating a configuration of the inter prediction image generation unit 309 included in the prediction 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 reads the reference picture index refIdxLX from the reference picture memory 306 based on the inter prediction parameters (predFlagLX, reference picture index refIdxLX, motion vector mvLX) input from the inter prediction parameter decoding unit 303. In the reference picture RefX specified by, starting from the position of the decoding target PU, a block located at a position shifted by the motion vector mvLX is read to generate an interpolation image (motion-compensated images predSamplesLX). Here, when the precision of the motion vector mvLX is not integer precision, a filter called a motion compensation filter for generating a pixel at a decimal position is applied to generate a motion compensated image.

(OBMC処理)
図17〜図21を参照して、一般的なOBMC処理について説明する。
(OBMC processing)
A general OBMC process will be described with reference to FIGS.

(OBMC処理概要)
本実施形態に係る動き補償部3091はOBMC(Overlapped block motion compensation)処理を用いて予測画像を生成してもよい。ここで、OBMC処理について説明する。OBMC処理とは、対象サブブロック(対象PU)に付加されたインター予測パラメータ(以下、動きパラメータ)を用いて生成される補間画像(PU補間画像)と、対象サブブロックの隣接サブブロックの動きパラメータを用いて生成される補間画像(OBMC補間画像)とを用いて、対象サブブロックの補間画像(動き補償画像)を生成する処理である。OBMCは、サブブロック予測モードフラグsubPbMotionFlagが0の場合(ブロック単位で予測する場合)と、サブブロック予測モードフラグsubPbMotionFlagが1(サブブロック単位で予測する場合)の場合との双方に対応する。以降の記載において、予測がサブブロック単位の場合、PUはサブブロックと読み替える。
(Overview of OBMC processing)
The motion compensation unit 3091 according to the present embodiment may generate a predicted image using OBMC (Overlapped block motion compensation) processing. Here, the OBMC process will be described. The OBMC processing includes an interpolation image (PU interpolation image) generated using an inter prediction parameter (hereinafter, motion parameter) added to a target sub-block (target PU), and a motion parameter of a sub-block adjacent to the target sub-block. This is a process of generating an interpolated image (motion-compensated image) of the target sub-block by using an interpolated image (OBMC interpolated image) generated using. The OBMC corresponds to both the case where the sub-block prediction mode flag subPbMotionFlag is 0 (when performing prediction in units of blocks) and the case where the sub-block prediction mode flag subPbMotionFlag is 1 (when performing prediction in units of sub-blocks). In the following description, when prediction is performed in units of sub-blocks, the PU is read as a sub-block.

特に、PU間の境界との距離が近い対象PU内の画素(境界画素)において、隣接PUの動きパラメータに基づくOBMC補間画像により、対象PUの補間画像を補正する処理が行われてもよい。   In particular, for a pixel (boundary pixel) in the target PU that is short in distance from the boundary between PUs, a process of correcting the interpolated image of the target PU may be performed using an OBMC interpolated image based on the motion parameters of the adjacent PU.

図17は、本実施形態に係る隣接PUの動きパラメータを利用して予測画像生成を行う領域の一例を示す図である。図17に示すように、予測画像生成にOBMC処理が適用される場合、黒色で塗りつぶしたPU境界から所定の距離内にある画素がOBMC処理の適用対象となる。   FIG. 17 is a diagram illustrating an example of a region in which a predicted image is generated by using a motion parameter of an adjacent PU according to the present embodiment. As shown in FIG. 17, when the OBMC process is applied to the generation of a predicted image, pixels within a predetermined distance from a PU boundary filled with black are applied to the OBMC process.

なお、対象PUと隣接PUの形状は必ずしも同じではないので、OBMC処理はPUを分割したサブブロック単位で実施するのが望ましい。サブブロックのサイズは4x4,8x8〜PUサイズまで様々な値をとることができる。このとき、サブブロックの境界画素において、隣接サブブロックの動きパラメータを利用したOBMC補間画像生成および補正処理をOBMC処理と呼ぶ。   Since the shape of the target PU and the shape of the adjacent PU are not necessarily the same, it is preferable that the OBMC process is performed in units of sub-blocks obtained by dividing the PU. The size of the sub-block can take various values from 4 × 4, 8 × 8 to PU size. At this time, the OBMC interpolation image generation and correction processing using the motion parameters of the adjacent sub-block at the boundary pixel of the sub-block is called OBMC processing.

(補間画像生成)
図18は本実施形態に係るOBMC処理を行うインター予測画像生成部309が備えている動き補償部3091の要部構成を示すブロック図である。図18に示すように、動き補償部3091は、補間画像生成部3092(PU補間画像生成部30911およびOBMC補間画像生成部30912)とOBMC補正部3093とを備えている。
(Interpolated image generation)
FIG. 18 is a block diagram illustrating a main configuration of a motion compensation unit 3091 included in the inter prediction image generation unit 309 that performs the OBMC process according to the present embodiment. As shown in FIG. 18, the motion compensation unit 3091 includes an interpolation image generation unit 3092 (a PU interpolation image generation unit 30911 and an OBMC interpolation image generation unit 30912) and an OBMC correction unit 3093.

補間画像生成部3092は、インター予測パラメータ(予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLX、OBMCフラグOBMC_flag)に基づいて、補間画像を導出する。   The interpolated image generation unit 3092 derives an interpolated image based on inter prediction parameters (prediction flag use flag predFlagLX, reference picture index refIdxLX, motion vector mvLX, OBMC flag OBMC_flag).

PU補間画像生成部30911は、インター予測パラメータ復号部303から入力された予測リスト利用フラグpredFlagLX[xPb][yPb]、参照ピクチャインデックスrefIdxLX[xPb][yPb]、動きベクトルmvLX[xPb][yPb]に基づいて、PU補間画像Pred_C[x][y](x=0..nPbW-1, y=0..nPbH-1)を生成する。PU補間画像生成部30911は、生成したPU補間画像Pred_C[x][y]をOBMC補正部3093に送信する。なお、(xPb、yPb)はPUの左上座標、nPbW、nPbHは、PUの幅および高さである。なお、ここでは、サフィックスのCはcurrentを意味する。   The PU interpolation image generation unit 30911 includes a prediction list use flag predFlagLX [xPb] [yPb] input from the inter prediction parameter decoding unit 303, a reference picture index refIdxLX [xPb] [yPb], and a motion vector mvLX [xPb] [yPb]. , A PU interpolation image Pred_C [x] [y] (x = 0..nPbW-1, y = 0..nPbH-1) is generated. The PU interpolation image generation unit 30911 transmits the generated PU interpolation image Pred_C [x] [y] to the OBMC correction unit 3093. (XPb, yPb) is the upper left coordinate of the PU, and nPbW, nPbH are the width and height of the PU. Here, the suffix C means current.

換言すると、対象予測ユニット(PU)の動き情報を対象サブブロックに対応する参照画像上のサブブロックに適用することにより補間画像を生成する。   In other words, an interpolation image is generated by applying the motion information of the target prediction unit (PU) to a sub-block on the reference image corresponding to the target sub-block.

また、OBMC補間画像生成部30912は、インター予測パラメータ復号部303から入力された、OBMC_flag、予測リスト利用フラグpredFlagLXN[xNb][yNb]、隣接参照ブロックの参照ピクチャインデックスrefIdxLXN[xNb][yNb]、隣接参照ブロックの動きベクトルmvLXN[xNb][yNb]に基づいて、OBMC補間画像Pred_N[x][y](x=0..nPbW-1, y=0..nPbH-1)を生成する。   Also, the OBMC interpolation image generation unit 30912 receives the OBMC_flag, the prediction list use flag predFlagLXN [xNb] [yNb], the reference picture index refIdxLXN [xNb] [yNb] of the adjacent reference block input from the inter prediction parameter decoding unit 303. An OBMC interpolation image Pred_N [x] [y] (x = 0..nPbW-1, y = 0..nPbH-1) is generated based on the motion vector mvLXN [xNb] [yNb] of the adjacent reference block.

換言すると、対象サブブロックに隣接する隣接サブブロックの動き情報を、対象サブブロックに対応する参照画像上のサブブロックに適用することにより追加補間画像を生成する。OBMC補間画像生成部30912は生成したOBMC補間画像Pred_N[x][y]をOBMC補正部3093に送信する。なお、(xNb、yNb)はPUの隣接サブブロックの位置である。なお、ここでは、サフィックスのNはneighbourを意味する。   In other words, the additional interpolation image is generated by applying the motion information of the adjacent sub-block adjacent to the target sub-block to the sub-block on the reference image corresponding to the target sub-block. The OBMC interpolation image generation unit 30912 transmits the generated OBMC interpolation image Pred_N [x] [y] to the OBMC correction unit 3093. Note that (xNb, yNb) is the position of a sub-block adjacent to the PU. Here, the suffix N means neighbor.

なお、以上の説明では、PU補間画像生成部30911、OBMC補間画像生成部30912を区別しているが、どちらも動きパラメータから補間画像を生成する処理を行うことから、2つの処理を行う手段を一つ用意して、この手段で実行してもよい。   In the above description, the PU interpolated image generation unit 30911 and the OBMC interpolated image generation unit 30912 are distinguished. However, since both perform the process of generating the interpolated image from the motion parameters, there is one means for performing the two processes. May be prepared and executed by this means.

補間画像生成部3092に入力される動きベクトルmvLXまたは動きベクトルmvLXNが整数精度ではなく1/M画素精度(Mは2以上の自然数)である場合、補間画像生成部3092(PU補間画像生成部30911、OBMC補間画像生成部30912)は、補間フィルタにより、整数画素位置の参照画像の画素値から、補間画像を生成する。   When the motion vector mvLX or the motion vector mvLXN input to the interpolation image generation unit 3092 is not 1-M pixel accuracy (M is a natural number of 2 or more) instead of integer accuracy, the interpolation image generation unit 3092 (PU interpolation image generation unit 30911) , An OBMC interpolated image generation unit 30912) generates an interpolated image from the pixel value of the reference image at the integer pixel position by using an interpolation filter.

動きベクトルmvLXが整数精度でない場合、補間画像生成部3092は、位相nFracに対応するNTAPタップのフィルタ係数mcFilter[nFrac][k](k=0..NTAP-1)と、参照画像の画素の積和演算とから、上述したPU補間画像Pred_C[x][y]、または、OBMC補間画像Pred_N[x][y]を生成する。   If the motion vector mvLX is not of integer precision, the interpolated image generation unit 3092 determines the filter coefficient mcFilter [nFrac] [k] (k = 0..NTAP-1) of the NTAP tap corresponding to the phase nFrac and the pixel of the reference image. From the product-sum operation, the above-described PU interpolation image Pred_C [x] [y] or the OBMC interpolation image Pred_N [x] [y] is generated.

具体的には、補間画像生成部3092は、予測ブロック(PUもしくはサブブロック)の左上座標(xb, yb)、サイズ(nW, nH)、動きベクトルmvLX、参照画像refImg(参照ピクチャインデクスrefIdxLXの指す参照ピクチャ)、補間フィルタ係数mcFilter[]、補間フィルタのタップ数NTAPを入力パラメータとして補間画像を生成する。   Specifically, the interpolation image generation unit 3092 specifies the upper left coordinates (xb, yb), size (nW, nH), motion vector mvLX, reference image refImg (pointed by the reference picture index refIdxLX) of the prediction block (PU or sub-block). A reference image), an interpolation filter coefficient mcFilter [], and an interpolation filter tap number NTAP are used as input parameters to generate an interpolation image.

PU補間画像Pred_C[x][y]の導出において、補間画像生成部3092は、(xb,yb)=(xPb,yPb)、(nW,nH)=(nPbW,nPbH)、mvLX=対象PU(対象サブブロック)の動きベクトルmvLX[xb][yb]、参照画像refImg=refIdxLX[xb][yb]の示す参照ピクチャ、動きベクトル精度M、タップ数NTAPを入力パラメータとして用いる。なお、PUをサブブロックに分割して処理する場合は、(xb,yb)=(xPb+nSbW*i,yPb+nSbH*j)(ここでi=0,1,2,…nPbW/nSbW-1,j=0,1,2,…nPbH/nSbH-1)、(nW,nH)=(nSbW,nSbH)をセットする。OBMC補間画像Pred_N[x][y]の導出においては、補間画像生成部3092は、(xb,yb)=(xPb+nSbW*i,yPb+nSbH*j)(ここでi=0,1,2,…nPbW/nSbW-1,j=0,1,2,…nPbH/nSbH-1)、(nW,nH)=(nSbW,nSbH)、mvLX=mvLXN[xNb][yNb]、参照画像refImg=refIdxLXN[xb][yb]の示す参照ピクチャ、動きベクトル精度M、タップ数NTAPを入力パラメータとして用いる。   In deriving the PU interpolation image Pred_C [x] [y], the interpolation image generation unit 3092 calculates (xb, yb) = (xPb, yPb), (nW, nH) = (nPbW, nPbH), mvLX = target PU ( The motion vector mvLX [xb] [yb] of the target sub-block), the reference picture indicated by the reference image refImg = refIdxLX [xb] [yb], the motion vector accuracy M, and the number of taps NTAP are used as input parameters. When the PU is divided into sub-blocks and processed, (xb, yb) = (xPb + nSbW * i, yPb + nSbH * j) (where i = 0, 1, 2,... NPbW / nSbW− 1, j = 0, 1, 2,... NPbH / nSbH-1), (nW, nH) = (nSbW, nSbH) are set. In deriving the OBMC interpolation image Pred_N [x] [y], the interpolation image generation unit 3092 calculates (xb, yb) = (xPb + nSbW * i, yPb + nSbH * j) (where i = 0, 1, 2, ... nPbW / nSbW-1, j = 0,1,2, ... nPbH / nSbH-1), (nW, nH) = (nSbW, nSbH), mvLX = mvLXN [xNb] [yNb], reference image refImg = refIdxLXN [xb] [yb], the reference picture, the motion vector accuracy M, and the number of taps NTAP are used as input parameters.

補間画像生成部3092は、まず、予測ブロック内座標(x, y)に対応する整数位置(xInt, yInt)および位相(xFrac, yFrac)を以下の式で導出する。   First, the interpolation image generation unit 3092 derives an integer position (xInt, yInt) and a phase (xFrac, yFrac) corresponding to the coordinates (x, y) in the prediction block by the following formula.

xInt = xb + (mvLX[0] >> (log2(M))) + x
xFrac = mvLX[0] & (M-1)
yInt = yb + (mvLX[1] >> (log2(M))) + y
yFrac = mvLX[1] & (M-1)
ここで、x=0..nW-1、y=0..nH-1、Mは動きベクトルmvLXの精度(1/M画素精度)を示す。
xInt = xb + (mvLX [0] >> (log2 (M))) + x
xFrac = mvLX [0] & (M-1)
yInt = yb + (mvLX [1] >> (log2 (M))) + y
yFrac = mvLX [1] & (M-1)
Here, x = 0..nW-1, y = 0..nH-1, and M indicate the accuracy (1 / M pixel accuracy) of the motion vector mvLX.

すなわち、上記式で示すように、補間画像生成部3092は、対象サブブロック、あるいは、隣接サブブロックの動き情報を適用した参照画像上のサブブロック位置を導出する。   That is, as shown in the above equation, the interpolation image generation unit 3092 derives a sub-block position on the reference image to which the motion information of the target sub-block or the adjacent sub-block is applied.

補間画像生成部3092は、参照画像refImgに補間フィルタを用いて垂直補間処理を行うことで、一時的画像temp[][]を導出する(以下のΣはk = 0..NTAP-1のkに関する和、shift1は値のレンジを調整する正規化パラメータ)。   The interpolation image generation unit 3092 derives a temporary image temp [] [] by performing vertical interpolation processing on the reference image refImg using an interpolation filter (the following Σ is k = 0..k of NTAP-1). Sum, shift1 is a normalization parameter that adjusts the range of values).

temp[x][y] = (ΣmcFilter [ yFrac ][ k ] * refImg[ xInt ][ yInt + k - NTAP/2 + 1 ] + offset1) >> shift1
続いて、補間画像生成部3092は、一時的画像temp[][]の水平補間処理により、補間画像Pred[][]を導出する(以下のΣはk = 0..NTAP-1のkに関する和、shift2は値のレンジを調整する正規化パラメータ)。
temp [x] [y] = (ΣmcFilter [yFrac] [k] * refImg [xInt] [yInt + k-NTAP / 2 + 1] + offset1) >> shift1
Subsequently, the interpolated image generation unit 3092 derives an interpolated image Pred [] [] by performing horizontal interpolation processing on the temporary image temp [] [] (the following Σ relates to k of k = 0..NTAP-1). Sum, shift2 is a normalization parameter that adjusts the range of values).

Pred[x][y] = (ΣmcFilter[ xFrac ][ k ] * temp[ xInt + k - NTAP/2 + 1 ][ yInt ] + offset2) >> shift2
(フィルタ係数の例)
次に、動きベクトル精度M=4において、NTAP= 2, 4, 6, 8の各タップ数に対応する補間フィルタmcFilterN2, mcFilterN4, mcFilterN6, mcFilterN8の例を示す。なお、フィルタ係数はこれに限定されない。
mcFilterN8[] = {
{ 0, 0, 0, 64, 0, 0, 0, 0 },
{ -1, 4, -10, 58, 17, -5, 1, 0 },
{ -1, 4, -11, 40, 40, -11, 4, -1 },
{ 0, 1, -5, 17, 58, -10, 4, -1 }
}
mcFilterN6[] = {
{ 0, 0, 64, 0, 0, 0 },
{ 2, -8, 56, 18, -6, 2 },
{ 2, -10, 40, 40, -10, 2 },
{ 2, -6, 18, 56, -8, 2 },
}
mcFilterN4[] = {
{ 0, 64, 0, 0 },
{ -4, 54, 16, -2 },
{ -4, 36, 36, -4 },
{ -2, 16, 54, -4 }
}
mcFilterN2[] = {
{ 64, 0 },
{ 48, 16},
{ 32, 32},
{ 16, 48}
}
なお、OBMC処理を行わない場合は、PU補間画像生成部30911のみが処理を実行する構成としてもよい。
Pred [x] [y] = (ΣmcFilter [xFrac] [k] * temp [xInt + k-NTAP / 2 + 1] [yInt] + offset2) >> shift2
(Example of filter coefficient)
Next, examples of the interpolation filters mcFilterN2, mcFilterN4, mcFilterN6, and mcFilterN8 corresponding to each tap number of NTAP = 2, 4, 6, 8 when the motion vector accuracy is M = 4. Note that the filter coefficient is not limited to this.
mcFilterN8 [] = {
{0, 0, 0, 64, 0, 0, 0, 0},
{-1, 4, -10, 58, 17, -5, 1, 0},
{-1, 4, -11, 40, 40, -11, 4, -1},
{0, 1, -5, 17, 58, -10, 4, -1}
}
mcFilterN6 [] = {
{0, 0, 64, 0, 0, 0},
{2, -8, 56, 18, -6, 2},
{2, -10, 40, 40, -10, 2},
{2, -6, 18, 56, -8, 2},
}
mcFilterN4 [] = {
{0, 64, 0, 0},
{-4, 54, 16, -2},
{-4, 36, 36, -4},
{-2, 16, 54, -4}
}
mcFilterN2 [] = {
{64, 0},
{48, 16},
{32, 32},
{16, 48}
}
When the OBMC process is not performed, only the PU interpolation image generation unit 30911 may perform the process.

(加重平均)
OBMC処理を行う構成においては、上述のOBMC補正部3093は受信したOBMC補間画像Pred_N[x][y]およびPU補間画像Pred_C[x][y]に対して加重平均処理を行うことにより、予測画像Pred_[x][y]を生成または更新する。詳細に説明すると、OBMC補正部3093は、インター予測パラメータ復号部303から入力されたOBMCフラグOBMC_flagが1(OBMC処理が有効)の場合、以下の式で示す加重平均処理を行う。
(weighted average)
In the configuration for performing the OBMC process, the above-described OBMC correction unit 3093 performs the weighted averaging process on the received OBMC interpolated image Pred_N [x] [y] and the PU interpolated image Pred_C [x] [y], thereby performing prediction. Generate or update image Pred_ [x] [y]. More specifically, when the OBMC flag OBMC_flag input from the inter prediction parameter decoding unit 303 is 1 (OBMC processing is valid), the OBMC correction unit 3093 performs a weighted average process represented by the following equation.

予測画像Pred_[x][y]=((w1*PU補間画像Pred_C[x][y]+w2*OBMC補間画像Pred_N[x][y])+o)>>shift
ここで、加重平均処理における重みw1、w2について説明する。加重平均処理における重みw1、w2は、PU境界からの対象画素の距離(画素数)に応じて決定する。シフト値shiftは、距離に応じて変更してもよいし、固定してもよい。
Prediction image Pred_ [x] [y] = ((w1 * PU interpolation image Pred_C [x] [y] + w2 * OBMC interpolation image Pred_N [x] [y]) + o) >> shift
Here, the weights w1 and w2 in the weighted average processing will be described. The weights w1 and w2 in the weighted averaging process are determined according to the distance (the number of pixels) of the target pixel from the PU boundary. The shift value shift may be changed according to the distance, or may be fixed.

以下に、OBMC処理サイズであるnOBMCWおよびnOBMCHが4画素の場合の予測画像Pred_[x][y]の生成について説明する。   Hereinafter, generation of a predicted image Pred_ [x] [y] in a case where the OBMC processing sizes nOBMCW and nOBMCH are four pixels will be described.

シフト値を距離に応じて変更する場合、例えば、{w1, w2, o, shift} = {3, 1, 2, 2}, {7, 1 , 4, 3}, {15, 1 , 8, 4}, {31, 1 , 16, 5}としてもよい。この場合、予測画像Pred_[x][y]は以下の式で生成される。   To change the shift value according to the distance, for example, {w1, w2, o, shift} = {3, 1, 2, 2}, {7, 1, 4, 3}, {15, 1, 8, 4}, {31, 1, 16, 5}. In this case, the predicted image Pred_ [x] [y] is generated by the following equation.

Pred_[x][y]=(3*Pred_C[x][y]+1*Pred_N[x][y]+2)>>2 距離=0画素
Pred_[x][y]=(7*Pred_C[x][y]+1*Pred_N[x][y]+4)>>3 距離=1画素
Pred_[x][y]=(15*Pred_C[x][y]+1*Pred_N[x][y]+8)>>4 距離=2画素
Pred_[x][y]=(31*Pred_C[x][y]+1*Pred_N[x][y]+16)>>5 距離=3画素
また、シフト値を距離に応じず固定する場合、例えば、{w1, w2} = {24, 8}, {28, 4}, {30, 2}, {31, 1}, o = 16, shift = 5としてもよい。この場合、予測画像Pred_[x][y]は以下の式で生成される。
Pred_ [x] [y] = (3 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +2) >> 2 Distance = 0 pixel
Pred_ [x] [y] = (7 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +4) >> 3 Distance = 1 pixel
Pred_ [x] [y] = (15 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +8) >> 4 Distance = 2 pixels
Pred_ [x] [y] = (31 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +16) >> 5 Distance = 3 pixels Also, when the shift value is fixed regardless of the distance For example, {w1, w2} = {24, 8}, {28, 4}, {30, 2}, {31, 1}, o = 16, shift = 5. In this case, the predicted image Pred_ [x] [y] is generated by the following equation.

Pred_[x][y]=(24*Pred_C[x][y]+8*Pred_N[x][y]+16)>>5 距離=0画素
Pred_[x][y]=(28*Pred_C[x][y]+4*Pred_N[x][y]+16)>>5 距離=1画素
Pred_[x][y]=(30*Pred_C[x][y]+2*Pred_N[x][y]+16)>>5 距離=2画素
Pred_[x][y]=(31*Pred_C[x][y]+1*Pred_N[x][y]+16)>>5 距離=3画素
なお、シフト値を距離に応じて変更する場合の上記式から生成されるPred_[x][y]と、シフト値を距離に応じず固定する場合の上記式から生成されるPred_[x][y]は等価となる。
Pred_ [x] [y] = (24 * Pred_C [x] [y] + 8 * Pred_N [x] [y] +16) >> 5 Distance = 0 pixel
Pred_ [x] [y] = (28 * Pred_C [x] [y] + 4 * Pred_N [x] [y] +16) >> 5 Distance = 1 pixel
Pred_ [x] [y] = (30 * Pred_C [x] [y] + 2 * Pred_N [x] [y] +16) >> 5 Distance = 2 pixels
Pred_ [x] [y] = (31 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +16) >> 5 Distance = 3 pixels When changing the shift value according to the distance Pred_ [x] [y] generated from the above equation is equivalent to Pred_ [x] [y] generated from the above equation when the shift value is fixed regardless of the distance.

また、OBMC処理サイズであるnOBMCWおよびnOBMCHが2画素の場合の予測画像Pred_[x][y]の生成は以下の通りである。   The generation of the predicted image Pred_ [x] [y] when the OBMC processing sizes nOBMCW and nOBMCH are two pixels is as follows.

シフト値を距離に応じて変更する場合、例えば、{w1, w2, o, shift} = {3, 1, 2, 2}, {7, 1 , 4, 3}としてもよい。この場合、予測画像Pred_[x][y]は以下の式で生成される。   When the shift value is changed according to the distance, for example, {w1, w2, o, shift} = {3, 1, 2, 2}, {7, 1, 4, 3}. In this case, the predicted image Pred_ [x] [y] is generated by the following equation.

Pred_[x][y]=(3*Pred_C[x][y]+1*Pred_N[x][y]+2)>>2 距離=0画素
Pred_[x][y]=(7*Pred_C[x][y]+1*Pred_N[x][y]+4)>>3 距離=1画素
また、シフト値を距離に応じず固定する場合、例えば、{w1, w2} = {24, 8}, {28, 4}, o = 16, shift = 5としてもよい。この場合、予測画像Pred_[X][Y]は以下の式で生成される。
Pred_ [x] [y] = (3 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +2) >> 2 Distance = 0 pixel
Pred_ [x] [y] = (7 * Pred_C [x] [y] + 1 * Pred_N [x] [y] +4) >> 3 Distance = 1 pixel Also, when the shift value is fixed regardless of the distance For example, {w1, w2} = {24, 8}, {28, 4}, o = 16, shift = 5. In this case, the predicted image Pred_ [X] [Y] is generated by the following equation.

Pred_[x][y]=(24*Pred_C[x][y]+8*Pred_N[x][y]+16)>>5 距離=0画素
Pred_[x][y]=(28*Pred_C[x][y]+4*Pred_N[x][y]+16)>>5 距離=1画素
OBMC処理では、複数の隣接PU(対象PUの上左下右に隣接するPU)の動きパラメータを用いて予測画像が生成される。ここで、複数の隣接PUの動きパラメータから、Pred_[x][y]を生成する方法の概要を説明する。
Pred_ [x] [y] = (24 * Pred_C [x] [y] + 8 * Pred_N [x] [y] +16) >> 5 Distance = 0 pixel
Pred_ [x] [y] = (28 * Pred_C [x] [y] + 4 * Pred_N [x] [y] +16) >> 5 Distance = 1 pixel
In the OBMC process, a predicted image is generated using the motion parameters of a plurality of adjacent PUs (PUs adjacent to the upper left, lower right, and lower sides of the target PU). Here, an outline of a method of generating Pred_ [x] [y] from the motion parameters of a plurality of adjacent PUs will be described.

はじめに、OBMC補正部3093は、PU補間画像Pred_C[x][y]、および、対象PUの上側に隣接するPUの動きパラメータを用いて作成したOBMC補間画像Pred_N[x][y]を上記式に適用して予測画像Pred_[x][y]を生成する。   First, the OBMC correction unit 3093 converts the PU interpolation image Pred_C [x] [y] and the OBMC interpolation image Pred_N [x] [y] created using the motion parameters of the PU adjacent above the target PU into the above equation. To generate a predicted image Pred_ [x] [y].

予測画像Pred_[x][y]=((w1*予測画像Pred_C[x][y]+w2*OBMC補間画像Pred_N[x][y])+o)>>shift
次に、OBMC補正部3093は、対象PUの左側に隣接するPUの動きパラメータを用いて作成したOBMC補間画像Pred_N[x][y]、および、先に生成した予測画像Pred[x][y]を用いて予測画像Pred_[x][y]を更新する。すなわち、以下の式により更新する。
Predicted image Pred_ [x] [y] = ((w1 * predicted image Pred_C [x] [y] + w2 * OBMC interpolated image Pred_N [x] [y]) + o) >> shift
Next, the OBMC corrector 3093 corrects the OBMC interpolation image Pred_N [x] [y] created using the motion parameters of the PU adjacent to the left side of the target PU, and the predicted image Pred [x] [y generated earlier. ] To update the predicted image Pred_ [x] [y]. That is, it is updated by the following equation.

予測画像Pred_[x][y]=((w1*予測画像Pred_[x][y]+w2*OBMC補間画像Pred_N[x][y])+o)>>shift
OBMC補正部3093は、Pred_N[x][y]を対象PUの下側に隣接するPUの動きパラメータを用いて作成したOBMC補間画像とし、以下の式により予測画像Pred_[x][y]を更新する。
Predicted image Pred_ [x] [y] = ((w1 * predicted image Pred_ [x] [y] + w2 * OBMC interpolated image Pred_N [x] [y]) + o) >> shift
The OBMC correction unit 3093 sets Pred_N [x] [y] as the OBMC interpolation image created using the motion parameters of the PU adjacent to the lower side of the target PU, and calculates the predicted image Pred_ [x] [y] by the following equation. Update.

予測画像Pred_[x][y]=((w1*予測画像Pred_[x][y]+w2*OBMC補間画像Pred_N[x][y])+o)>>shift
OBMC補正部3093は、Pred_N[x][y]を対象PUの右側に隣接するPUの動きパラメータを用いて作成したOBMC補間画像とし、以下の式により予測画像Pred_[x][y]を更新する。
Predicted image Pred_ [x] [y] = ((w1 * predicted image Pred_ [x] [y] + w2 * OBMC interpolated image Pred_N [x] [y]) + o) >> shift
The OBMC correction unit 3093 sets Pred_N [x] [y] as an OBMC interpolated image created using the motion parameters of the PU adjacent to the right side of the target PU, and updates the predicted image Pred_ [x] [y] according to the following equation. I do.

予測画像Pred_[x][y]=((w1*予測画像Pred_[x][y]+w2*OBMC補間画像Pred_N[x][y])+o)>>shift
上記の構成によれば、動き補償部3091は対象PUに隣接するPUの動きパラメータを用いて追加の補間画像を生成する。そして、動き補償部3091は生成した補間画像を用いて予測画像を生成することができる。そのため、予測精度の高い予測画像を生成することができる。
Predicted image Pred_ [x] [y] = ((w1 * predicted image Pred_ [x] [y] + w2 * OBMC interpolated image Pred_N [x] [y]) + o) >> shift
According to the above configuration, the motion compensation unit 3091 generates an additional interpolated image using the motion parameters of the PU adjacent to the target PU. Then, the motion compensation unit 3091 can generate a prediction image using the generated interpolation image. Therefore, a predicted image with high prediction accuracy can be generated.

また、OBMC処理の対象となるサブブロックのサイズは任意のサイズで良い(4×4〜PUサイズ)。また、OBMC処理の対象となるサブブロックを含むPUの分割様式についても、2N×N、N×2N、N×N等の任意の分割様式で良い。   The size of the sub-block to be subjected to the OBMC process may be any size (4 × 4 to PU size). Further, the partitioning method of the PU including the sub-block to be subjected to the OBMC process may be any partitioning method such as 2N × N, N × 2N, and N × N.

(OBMC処理の流れ)
次に、本実施形態に係るOBMC処理の流れについて説明する。
(Flow of OBMC processing)
Next, the flow of the OBMC process according to the present embodiment will be described.

図19は、本実施形態に係る動き補償部3091の処理の流れを示すフローチャートである。また、図20はOBMC処理を表す疑似コードの一例を示す図である。図20において、(xSb, ySb)は対象サブブロック(例えば、対象PU)の左上座標を画素単位で示している。また、図20において、(nPbW, nPbH)はブロックサイズ(対象PUのサイズ)を示している。また、図20において、(subX, subY)は、対象ブロック(対象PU)内における対象サブブロックの位置(サブブロック単位)を示している。また、図20において、dirは、OBMC処理での隣接参照ブロックの方向を示している。また、nSbW、nSbHは、サブブロックの幅と高さである。   FIG. 19 is a flowchart illustrating the flow of the process of the motion compensation unit 3091 according to the present embodiment. FIG. 20 is a diagram showing an example of a pseudo code representing the OBMC process. In FIG. 20, (xSb, ySb) indicates the upper left coordinates of the target sub-block (for example, the target PU) in pixel units. In FIG. 20, (nPbW, nPbH) indicates the block size (the size of the target PU). In FIG. 20, (subX, subY) indicates the position of the target sub-block (sub-block unit) within the target block (target PU). In FIG. 20, dir indicates the direction of an adjacent reference block in the OBMC process. Also, nSbW and nSbH are the width and height of the sub-block.

補間画像生成部3092はPU補間画像Pred_C[x][y]を導出する(S1)。   The interpolation image generation unit 3092 derives a PU interpolation image Pred_C [x] [y] (S1).

動き補償部3091は、OBMCフラグOBMC_flagを受信し、OBMCフラグOBMC_flagが1であるか否かを判断する(S11)。OBMC_flagが1である、すなわち、OBMCがオンである場合(S11でYES)、補間画像生成部3092およびOBMC補正部3093は以下のサブブロックループ処理および方向ループ処理を行う(S2)。   The motion compensation unit 3091 receives the OBMC flag OBMC_flag, and determines whether or not the OBMC flag OBMC_flag is 1 (S11). When OBMC_flag is 1, that is, when OBMC is on (YES in S11), the interpolation image generation unit 3092 and the OBMC correction unit 3093 perform the following sub-block loop processing and direction loop processing (S2).

詳細には、補間画像生成部3092およびOBMC補正部3093はPUを構成する各サブブロックについて、ループ処理を行う。すなわち、OBMC処理を行うサブブロックが定められる。サブブロックループのループ変数は座標(subX, subY)とし、補間画像生成部3092およびOBMC補正部3093はPU内のサブブロックの座標を順に設定することでループ処理を行う(ループの終端はS7)。   More specifically, the interpolated image generation unit 3092 and the OBMC correction unit 3093 perform a loop process for each sub-block constituting the PU. That is, a sub-block for performing the OBMC process is determined. The loop variables of the sub-block loop are coordinates (subX, subY), and the interpolated image generation unit 3092 and the OBMC correction unit 3093 perform a loop process by sequentially setting the coordinates of the sub-blocks in the PU (the end of the loop is S7). .

さらに、補間画像生成部3092および、OBMC補正部3093は上above、左left、下bottom、右rightの各方向dirについて、ループ処理を行う。方向ループのループ変数dirに対し、方向セットdirSet(dirSet = {above、left、bottom、right})に含まれる方向の値を順に設定することでループ処理を行う(ループの終端はS7)。なお、above, left, bottom, rightに0, 1, 2, 3の値を割り当て、dirSet = {0, 1, 2, 3}に対して処理を行ってもよい。   Further, the interpolated image generation unit 3092 and the OBMC correction unit 3093 perform a loop process for each direction dir of upper above, left left, lower bottom, and right right. The loop process is performed by sequentially setting the values of the directions included in the direction set dirSet (dirSet = {above, left, bottom, right}) for the loop variable dir of the direction loop (the end of the loop is S7). Note that values of 0, 1, 2, and 3 may be assigned to above, left, bottom, and right, and processing may be performed on dirSet = {0, 1, 2, 3}.

なお、対象CUが2N×2Nのパーティションであって、かつ、予測モードがマージモード(スキップモードを含む)の場合、エントロピー復号部301はOBMCフラグOBMC_flagを符号化データから復号せず、OBMCが有効であることを示す値(1)を導出する。すなわち、対象PUが2N×2Nかつマージモードの場合には常にOBMC処理をオンとする。   When the target CU is a 2N × 2N partition and the prediction mode is the merge mode (including the skip mode), the entropy decoding unit 301 does not decode the OBMC flag OBMC_flag from the encoded data, and the OBMC is valid. Then, a value (1) indicating that is obtained is derived. That is, when the target PU is 2N × 2N and in the merge mode, the OBMC process is always turned on.

以下、ループ中では、S2で定められた隣接サブブロックの方向dirおよびS2で定められた座標のサブブロックについて、S3、S4の条件を満たす場合に、補間画像生成部3092は、OBMC補間画像Pred_N[x][y]を生成し(S5)、OBMC補正部3093において予測画像を補正する(S6)。   Hereinafter, in the loop, when the conditions of S3 and S4 are satisfied for the direction dir of the adjacent sub-block determined in S2 and the sub-block of the coordinates specified in S2, the interpolation image generation unit 3092 sets the OBMC interpolation image Pred_N [x] [y] is generated (S5), and the predicted image is corrected by the OBMC correction unit 3093 (S6).

サブブロックループ処理の詳細について説明する。OBMC補間画像生成部30912は、対象サブブロックの方向dirに位置する隣接サブブロックの予測パラメータがvalidであるか否かを判断する(S3)。なお、方向dirが上、左、下、右の場合の動きパラメータを参照する隣接サブブロックの位置(xNb, yNb)は各々、(xSb, ySb-1)、(xSb-1, ySb)、(xSb, ySb+nSbH)、(xSb+nSbW, ySb)とする。   The details of the sub-block loop processing will be described. The OBMC interpolation image generation unit 30912 determines whether or not the prediction parameter of the adjacent sub-block located in the direction dir of the target sub-block is valid (S3). Note that the positions (xNb, yNb) of adjacent sub-blocks that refer to the motion parameters when the direction dir is upper, left, lower, and right are (xSb, ySb-1), (xSb-1, ySb), and ( xSb, ySb + nSbH) and (xSb + nSbW, ySb).

S3を詳細に説明すると、OBMC補間画像生成部30912は、当該方向の隣接サブブロックの動きパラメータが利用可能(valid)であるか否かを判断する。例えば、隣接サブブロックの予測モードがイントラ予測の場合、隣接サブブロックが画面外である場合、又は、隣接サブブロックの動きパラメータが未知の場合に、OBMC補間画像生成部30912は隣接サブブロックの動きパラメータは利用できないと判断する。換言すると、隣接サブブロック(xNb, yNb)の予測モードがイントラ予測以外のモードであり、かつ、隣接サブブロックの位置(xNb, yNb)が画面内であり、かつ、隣接サブブロック(xNb, yNb)の動きパラメータが既知を示すパラメータ(たとえば、参照ピクチャインデックスが-1以外)の場合、OBMC補間画像生成部30912は隣接サブブロックの動きパラメータを利用できると判断する。また、隣接サブブロックがイントラブロックコピーのPUである場合、隣接サブブロックは動きパラメータを保持するが、OBMC補間画像生成部30912は動きパラメータを利用できないと判断してもよい。   Describing S3 in detail, the OBMC interpolation image generation unit 30912 determines whether or not the motion parameter of the adjacent sub-block in the direction is valid. For example, when the prediction mode of the adjacent sub-block is intra prediction, when the adjacent sub-block is out of the screen, or when the motion parameter of the adjacent sub-block is unknown, the OBMC interpolation image generation unit 30912 determines the motion of the adjacent sub-block. It is determined that the parameter cannot be used. In other words, the prediction mode of the adjacent sub-block (xNb, yNb) is a mode other than the intra prediction, and the position (xNb, yNb) of the adjacent sub-block is in the screen, and the adjacent sub-block (xNb, yNb) ) Is a parameter indicating a known motion parameter (for example, the reference picture index is other than −1), the OBMC interpolation image generation unit 30912 determines that the motion parameter of the adjacent sub-block can be used. When the adjacent sub-block is a PU of an intra block copy, the adjacent sub-block holds the motion parameter, but the OBMC interpolation image generation unit 30912 may determine that the motion parameter cannot be used.

隣接サブブロックの動きパラメータが未知の場合について、図21を用いて詳細に説明する。図21は、隣接サブブロックの動きパラメータが未知であるか否かを説明する図である。例えば、Zスキャンオーダで走査されると、すでに処理された隣接CU(上および左の隣接CU)に含まれるPUの動きパラメータは既知となる。しかし、処理前CU(下および右の隣接CU)に含まれるPUの動きパラメータは未知となる。なお、同一CU内のPUの動きパラメータは同時に導出されるため、左、上、右、下に隣接するPUの動きパラメータは既知となる。換言すると、CU境界(図21の太線で示す)においては、左および上に隣接しているPUの動きパラメータのみを用いてOBMC処理が実行される。一方で、PU境界(図21の破線で示す)においては、左、上、右、下に隣接しているPUの動きパラメータを用いてOBMC処理が実行される。   The case where the motion parameter of the adjacent sub-block is unknown will be described in detail with reference to FIG. FIG. 21 is a diagram illustrating whether or not the motion parameter of the adjacent sub-block is unknown. For example, when scanned in the Z scan order, the motion parameters of the PUs included in the already processed neighboring CUs (upper and left neighboring CUs) are known. However, the motion parameters of the PUs included in the pre-processing CU (the lower and right neighboring CUs) are unknown. Since the motion parameters of the PUs in the same CU are derived at the same time, the motion parameters of the left, upper, right, and lower adjacent PUs are known. In other words, at the CU boundary (indicated by the thick line in FIG. 21), the OBMC process is executed using only the motion parameters of the PUs adjacent to the left and upper. On the other hand, at the PU boundary (indicated by the broken line in FIG. 21), the OBMC process is performed using the motion parameters of the PUs adjacent to the left, upper, right, and lower.

以下、本発明では、サブブロック(PU)の境界を以下のようにCU境界とPU境界に区別する。   Hereinafter, in the present invention, boundaries between sub-blocks (PUs) are distinguished into CU boundaries and PU boundaries as follows.

CU境界:対象サブブロックと隣接サブブロックとの境界のうち、対象サブブロックを含むCUと隣接サブブロックを含むCUとが異なるCUに属するとき、この境界をCU境界と呼ぶ。たとえば図21では、対象PUと上隣接CUとの境界、対象PUと左隣接CUとの境界、対象PUと下隣接CUとの境界はCU境界である。   CU boundary: Among the boundaries between the target sub-block and the adjacent sub-block, when the CU including the target sub-block and the CU including the adjacent sub-block belong to different CUs, this boundary is called a CU boundary. For example, in FIG. 21, the boundary between the target PU and the upper adjacent CU, the boundary between the target PU and the left adjacent CU, and the boundary between the target PU and the lower adjacent CU are CU boundaries.

PU境界:対象サブブロックと隣接サブブロックとの境界のうち、CU境界以外の境界(対象サブブロックを含むCUと隣接サブブロックを含むCUが同一のCUに属する)をPU境界と呼ぶ。たとえば図21では、対象PUと対象PUの右側のPUとの境界はPU境界である。   PU boundary: Among the boundaries between the target sub-block and the adjacent sub-block, a boundary other than the CU boundary (the CU including the target sub-block and the CU including the adjacent sub-block belong to the same CU) is called a PU boundary. For example, in FIG. 21, the boundary between the target PU and the PU on the right side of the target PU is a PU boundary.

隣接サブブロックがvalidである場合(S3でYES)、OBMC補間画像生成部30912は隣接サブブロック(xNb, yNb)の動きパラメータが、対象サブブロックの動きパラメータと等しいかどうかを判定する(S4)。ここでは、動きパラメータが異なる場合にDiffMotionAvailを1、等しい場合にDiffMotionAvailを0に設定する。逆に隣接サブブロックがvalidではない場合(S3でNOの場合)には、同一性判定処理(S4)、OBMC補間画像生成(S5)と、予測画像の補正(S6)を省略し、次のサブブロックの処理に遷移する(S7)
S4を詳細に説明すると、たとえば、OBMC補間画像生成部30912は、同一性判定に用いる動きパラメータとして、動きベクトルを用いてもよい。この場合、隣接サブブロック(xNb, yNb)の動きベクトルmvLXNが、対象サブブロックの動きベクトルmvLXと等しいかどうかを判断する。
If the adjacent sub-block is valid (YES in S3), the OBMC interpolation image generation unit 30912 determines whether the motion parameter of the adjacent sub-block (xNb, yNb) is equal to the motion parameter of the target sub-block (S4). . Here, DiffMotionAvail is set to 1 if the motion parameters are different, and 0 if they are equal. Conversely, when the adjacent sub-block is not valid (NO in S3), the identity determination processing (S4), the generation of the OBMC interpolation image (S5), and the correction of the predicted image (S6) are omitted, and the following Transition to sub-block processing (S7)
Describing S4 in detail, for example, the OBMC interpolated image generation unit 30912 may use a motion vector as a motion parameter used for identity determination. In this case, it is determined whether the motion vector mvLXN of the adjacent sub-block (xNb, yNb) is equal to the motion vector mvLX of the target sub-block.

OBMC補間画像生成部30912は、同一性判定に用いる動きパラメータとして、動きベクトルに加えてさらに参照ピクチャインデックスに基づいて判断してもよい。   The OBMC interpolation image generation unit 30912 may make a determination based on a reference picture index in addition to the motion vector as a motion parameter used for the identity determination.

対象サブブロックの動きベクトルを(mvLX[0], mvLX[1])、参照ピクチャインデックスを(refIdxLX)、隣接サブブロックの動きベクトルを(mvLXN[0], mvLXN[1])、参照ピクチャインデックスを(refIdxLXN)とすると、動きベクトルまたは参照ピクチャインデックスが、対象サブブロックと隣接サブブロックとで異なる場合、OBMC補間画像生成部30912はDiffMotionAvail=1に設定し、OBMC補間画像生成部30912は動きパラメータが異なると判断する(S4でNO)。   The motion vector of the target sub-block is (mvLX [0], mvLX [1]), the reference picture index is (refIdxLX), the motion vector of the adjacent sub-block is (mvLXN [0], mvLXN [1]), and the reference picture index is When (refIdxLXN), if the motion vector or the reference picture index differs between the target sub-block and the adjacent sub-block, the OBMC interpolation image generation unit 30912 sets DiffMotionAvail = 1, and the OBMC interpolation image generation unit 30912 sets the motion parameter to It is determined that they are different (NO in S4).

動きパラメータの同一性の判断を式で表すと、
DiffMotionAvail = (mvLX[0] != mvLXN[0]) || (mvLX[1] != mvLXN[1]) || (refIdxLX!= refIdxLXN)
であり、動きパラメータが異なる場合、DiffMotionAvail=1となる。
When the determination of the identity of the motion parameters is expressed by an equation,
DiffMotionAvail = (mvLX [0]! = MvLXN [0]) || (mvLX [1]! = MvLXN [1]) || (refIdxLX! = RefIdxLXN)
When the motion parameters are different, DiffMotionAvail = 1.

また、動きベクトルおよび参照ピクチャインデックスが、対象サブブロックと隣接サブブロックとで等しい場合、DiffMotionAvail=0となる。この場合、OBMC補間画像生成部30912は動きパラメータが等しいと判断する(S4でYES)。   When the motion vector and the reference picture index are equal between the current sub-block and the adjacent sub-block, DiffMotionAvail = 0. In this case, the OBMC interpolation image generation unit 30912 determines that the motion parameters are equal (YES in S4).

同一性判定に用いる動きパラメータとして、参照ピクチャインデックスの代わりにPOC(Picture Order Countを用いてもよい。この場合、動きベクトルまたはPOCが、対象サブブロックと隣接サブブロックとで異なる場合、OBMC補間画像生成部30912は、DiffMotionAvail=1に設定し、OBMC補間画像生成部30912は動きパラメータが異なると判断する(S4でNO)
動きパラメータの同一性の判断を式で表すと、
DiffMotionAvail = (mvLX[0] != mvLXN[0]) || (mvLX[1] != mvLXN[1]) || (refPOC!= refPOCN)
ここでrefPOCおよびrefPOCNは、対象サブブロックおよび隣接サブブロックの参照画像のPOCである。
As a motion parameter used for the identity determination, a POC (Picture Order Count) may be used instead of the reference picture index. In this case, if the motion vector or the POC differs between the target sub-block and the adjacent sub-block, the OBMC interpolation image The generation unit 30912 sets DiffMotionAvail = 1, and the OBMC interpolation image generation unit 30912 determines that the motion parameters are different (NO in S4).
When the determination of the identity of the motion parameters is expressed by an equation,
DiffMotionAvail = (mvLX [0]! = MvLXN [0]) || (mvLX [1]! = MvLXN [1]) || (refPOC! = RefPOCN)
Here, refPOC and refPOCN are POCs of reference images of the target sub-block and the adjacent sub-block.

隣接サブブロックの動きパラメータが、対象サブブロックの動きパラメータと等しくない場合(S4でNO)、OBMC補間画像生成部30912は対象サブブロックのOBMC補間画像Pred_N[x][y]を生成(導出)し(S5)、OBMC補正部3093は、対象サブブロックのOBMC補間画像Pred_N[x][y]およびPU補間画像Pred_C[x][y]を用いて予測画像Pred_[x][y]を生成または更新する(S6)。   If the motion parameter of the adjacent sub-block is not equal to the motion parameter of the target sub-block (NO in S4), the OBMC interpolation image generation unit 30912 generates (derives) the OBMC interpolation image Pred_N [x] [y] of the target sub-block. Then (S5), the OBMC correction unit 3093 generates a prediction image Pred_ [x] [y] using the OBMC interpolation image Pred_N [x] [y] and the PU interpolation image Pred_C [x] [y] of the target sub-block. Or, it is updated (S6).

S5を詳細に説明すると、OBMC補間画像生成部30912は、隣接サブブロックの動きパラメータを用いてOBMC補間画像Pred_N[x][y]を生成(導出)する。予測モードがサブブロック予測でない(PUを分割しないで処理する)場合、OBMC補間画像生成部30912はOBMC処理サイズの幅を示すnOBMCWおよび高さを示すnOBMCHを4画素に設定する。また、予測モードがサブブロック予測である場合、OBMC補間画像生成部30912はOBMC処理サイズであるnOBMCWおよびnOBMCHを2画素に設定する。   Explaining S5 in detail, the OBMC interpolation image generation unit 30912 generates (derives) an OBMC interpolation image Pred_N [x] [y] using the motion parameters of the adjacent sub-blocks. When the prediction mode is not the sub-block prediction (processing is performed without dividing the PU), the OBMC interpolation image generation unit 30912 sets nOBMCW indicating the width of the OBMC processing size and nOBMCH indicating the height to four pixels. When the prediction mode is sub-block prediction, the OBMC interpolation image generation unit 30912 sets nOBMCW and nOBMCH, which are the OBMC processing sizes, to two pixels.

OBMC補間画像生成部30912は、dir == aboveのとき、対象サブブロックの上に隣接するサブブロック(xNb, yNb)=(xSb, ySb-1)の動きパラメータを参照し、(xSb, ySb)を左上座標とするサイズ(nSbW, nOBMCH)の領域の補間画像を導出する。   When dir == above, the OBMC interpolation image generation unit 30912 refers to the motion parameter of the sub-block (xNb, yNb) = (xSb, ySb-1) adjacent to the target sub-block, and (xSb, ySb) The interpolation image of the area of the size (nSbW, nOBMCH) where is set to the upper left coordinate is derived.

また、OBMC補間画像生成部30912は、dir == leftのとき、対象サブブロックの左に隣接するサブブロック(xNb, yNb)= (xSb-1, ySb)の動きパラメータを参照し、(xSb, ySb)を左上座標とするサイズ(nOBMCW, nSbH)の領域の補間画像を導出する。   Also, when dir == left, the OBMC interpolation image generation unit 30912 refers to the motion parameter of the subblock (xNb, yNb) = (xSb-1, ySb) adjacent to the left of the target subblock, and (xSb, An interpolated image of an area of size (nOBMCW, nSbH) with ySb) as the upper left coordinate is derived.

また、OBMC補間画像生成部30912は、dir == bottomのとき、対象サブブロックの下に隣接するサブブロック(xNb, yNb)= (xSb, ySb+nSbH)の動きパラメータを参照し、(xSb, ySb+nSbH-nOBMCH)を左上座標とするサイズ(nSbW, nOBMCH)の領域の補間画像を導出する。   Also, when dir == bottom, the OBMC interpolation image generation unit 30912 refers to the motion parameter of the sub-block (xNb, yNb) = (xSb, ySb + nSbH) adjacent to the target sub-block, and (xSb, An interpolation image of a region of size (nSbW, nOBMCH) with ySb + nSbH-nOBMCH) as the upper left coordinate is derived.

また、OBMC補間画像生成部30912は、dir == rightのとき、対象サブブロックの右に隣接するサブブロック(xNb, yNb)= (xSb+nSbW, ySb)の動きパラメータを参照し、(xSb+nSbW-nOBMCW, ySb)を左上座標とするサイズ(nOBMCW, nSbH)の領域の補間画像を導出する。   Further, when dir == right, the OBMC interpolation image generation unit 30912 refers to the motion parameter of the sub-block (xNb, yNb) = (xSb + nSbW, ySb) adjacent to the right of the target sub-block, and (xSb + An interpolated image of a region of size (nOBMCW, nSbH) using nSbW-nOBMCW, ySb) as the upper left coordinate is derived.

上記の処理は疑似コードで以下のように示すことができる。疑似コードでは、参照画像refPic、左上座標(xb, yb)、サイズnW, nH、動きベクトルmvRefの補間画像生成処理をInterpolation(refPic, xb, yb, nW, nH, mvRef)で表す。ここでは座標(x, y)の動きパラメータをmvLX[x][y]、refIdxLX[x][y]で表す。
nOBMCW = nOBMCH = (PUがサブブロックでない) ? 4 : 2
if ( dir == above )
mvRef = mvLXN[xSb][ySb-1]、refPic=refIdxLXN[xSb][ySb-1]
predN = Interpolation (refPic, xSb, ySb, nSbW, nOBMCH, mvRef )
else if ( dir == left )
mvRef = mvLXN[xSb-1][ySb]、refPic=refIdxLXN[xSb-1][ySb]
predN = Interpolation (refPic, xSb, ySb, nOBMCW, nSbH, mvRef )
else if ( dir == bottom )
mvRef = mvLXN[xSb][ySb+nSbH]、refPic=refIdxLXN[xSb][ySb+nSbH]
predN = Interpolation (refPic, xSb , ySb+nSbH-nOBMCH, nSbW, nOBMCH, mvRef )
else if ( dir == right )
mvRef = mvLXN[xSb+nSbW][ySb]、refPic=refIdxLXN[xSb+nSbW][ySb]
predN = Interpolation (refPic, xSb+nSbW-nOBMCW, ySb, nOBMCW, nSbH, mvRef )
次に、OBMC補正部3093は、対象サブブロックOBMC補間画像Pred_N[x][y]およびPU補間画像Pred_C[x][y]を参照して加重平均処理を行い、予測画像Pred_[x][y]を生成または更新する(S6)。
The above process can be shown in pseudo code as follows: In the pseudo code, an interpolation image generation process of the reference image refPic, the upper left coordinates (xb, yb), the size nW, nH, and the motion vector mvRef is represented by Interpolation (refPic, xb, yb, nW, nH, mvRef). Here, the motion parameters of the coordinates (x, y) are represented by mvLX [x] [y] and refIdxLX [x] [y].
nOBMCW = nOBMCH = (PU is not a sub-block)? 4: 2
if (dir == above)
mvRef = mvLXN [xSb] [ySb-1], refPic = refIdxLXN [xSb] [ySb-1]
predN = Interpolation (refPic, xSb, ySb, nSbW, nOBMCH, mvRef)
else if (dir == left)
mvRef = mvLXN [xSb-1] [ySb], refPic = refIdxLXN [xSb-1] [ySb]
predN = Interpolation (refPic, xSb, ySb, nOBMCW, nSbH, mvRef)
else if (dir == bottom)
mvRef = mvLXN [xSb] [ySb + nSbH], refPic = refIdxLXN [xSb] [ySb + nSbH]
predN = Interpolation (refPic, xSb, ySb + nSbH-nOBMCH, nSbW, nOBMCH, mvRef)
else if (dir == right)
mvRef = mvLXN [xSb + nSbW] [ySb], refPic = refIdxLXN [xSb + nSbW] [ySb]
predN = Interpolation (refPic, xSb + nSbW-nOBMCW, ySb, nOBMCW, nSbH, mvRef)
Next, the OBMC correction unit 3093 performs weighted averaging processing with reference to the target sub-block OBMC interpolation image Pred_N [x] [y] and the PU interpolation image Pred_C [x] [y], and performs a prediction image Pred_ [x] [ y] is generated or updated (S6).

S6を詳細に説明すると、OBMC補正部3093は、隣接サブブロックとの境界からの距離に応じて、OBMC補間画像Pred_N[x][y]およびPU補間画像Pred_C[x][y]を参照して加重平均処理を行う。加重平均処理については以下の通りである。   Describing S6 in detail, the OBMC correction unit 3093 refers to the OBMC interpolation image Pred_N [x] [y] and the PU interpolation image Pred_C [x] [y] according to the distance from the boundary with the adjacent sub-block. Weighted averaging. The weighted average processing is as follows.

Pred_[x][y] = Pred_C[x][y]
dir == aboveのとき、OBMC補正部3093は、i = 0.. nSbW-1、j = 0.. nOBMCH-1として、予測画像Pred_[x][y]を下記の式から導出する。
Pred_ [x] [y] = Pred_C [x] [y]
When dir == above, the OBMC correction unit 3093 derives a predicted image Pred_ [x] [y] from the following equation, where i = 0..nSbW-1 and j = 0..nOBMCH-1.

x = xSb + i, y = ySb + j
Pred_[x][y] = (w1 * Pred_[x][y] + w2 * Pred_N[i][j] + o) >> shift
w1 = weightOBMC [ j ], w2 = (1<<shift) - w1, o = (1<<(shift-1))
また、dir == leftのとき、OBMC補正部3093は、i = 0.. nOBMCW-1, j = 0.. nSbH-1として、予測画像Pred_[x][y]を下記の式から導出する。
x = xSb + i, y = ySb + j
Pred_ [x] [y] = (w1 * Pred_ [x] [y] + w2 * Pred_N [i] [j] + o) >> shift
w1 = weightOBMC [j], w2 = (1 << shift)-w1, o = (1 << (shift-1))
When dir == left, the OBMC correction unit 3093 derives a predicted image Pred_ [x] [y] from the following equation, assuming i = 0..nOBMCW-1, j = 0..nSbH-1. .

x = xSb + i, y = ySb + j
Pred_[x][y] = (w1 * Pred_[x][y] + w2 * Pred_N[i][j] + o) >> shift
w1 = weightOBMC [ i ] , w2 = (1<<shift) - w1, o = (1<<(shift-1))
また、dir == bottomのとき、OBMC補正部3093は、i = 0.. nSbW-1, j = 0.. nOBMCH-1として、予測画像Pred_[x][y]を下記の式から導出する。
x = xSb + i, y = ySb + j
Pred_ [x] [y] = (w1 * Pred_ [x] [y] + w2 * Pred_N [i] [j] + o) >> shift
w1 = weightOBMC [i], w2 = (1 << shift)-w1, o = (1 << (shift-1))
Also, when dir == bottom, the OBMC correction unit 3093 derives a predicted image Pred_ [x] [y] from the following equation, with i = 0..nSbW-1, j = 0..nOBMCH-1. .

x = xSb + i, y = ySb + nSbH - nOBMCH + j
Pred_[x][y] = (w1 * Pred_[x][y] + w2 * Pred_N[i][j] + o) >> shift
w1 = weightOBMC [ nOBMCH-1 - j ] , w2 = (1<<shift) - w1, o = (1<<(shift-1))
また、dir == rightのとき、OBMC補正部3093は、i = 0.. nOBMCW-1, j = 0.. nSbH-1として、予測画像Pred_[x][y]を下記の式から導出する。
x = xSb + i, y = ySb + nSbH-nOBMCH + j
Pred_ [x] [y] = (w1 * Pred_ [x] [y] + w2 * Pred_N [i] [j] + o) >> shift
w1 = weightOBMC [nOBMCH-1-j], w2 = (1 << shift)-w1, o = (1 << (shift-1))
Also, when dir == right, the OBMC correction unit 3093 derives a predicted image Pred_ [x] [y] from the following equation, with i = 0..nOBMCW-1, j = 0..nSbH-1. .

x = xSb + nSbW - nOBMCW + i, y = ySbH + j
Pred_[x][y] = (w1 * Pred_[x][y] + w2 * Pred_N[i][j] + o) >> shift
w1 = weightOBMC [ nOBMCW-1 - i ] , w2 = (1<<shift) - w1, o = (1<<(shift-1))
上述のように重みは、境界からの距離(画素数)に応じて設定されており、重みテーブルweightOBMCは、以下の通りとしてもよい。
x = xSb + nSbW-nOBMCW + i, y = ySbH + j
Pred_ [x] [y] = (w1 * Pred_ [x] [y] + w2 * Pred_N [i] [j] + o) >> shift
w1 = weightOBMC [nOBMCW-1-i], w2 = (1 << shift)-w1, o = (1 << (shift-1))
As described above, the weight is set according to the distance (the number of pixels) from the boundary, and the weight table weightOBMC may be as follows.

weightOBMC[] = {24, 28, 30, 31}, shift = 5
あるいは、
weightOBMC[] = {8, 4, 2, 1}, shift = 5
次に、動き補償部3091は、OBMC処理対象のサブブロックのうち、未処理のサブブロックがあるか否かおよび全ての方向の隣接サブブロックの動きパラメータを用いてS3〜S6のOBMC処理が行われたか否かを判断する(S7)。
weightOBMC [] = {24, 28, 30, 31}, shift = 5
Or
weightOBMC [] = {8, 4, 2, 1}, shift = 5
Next, the motion compensating unit 3091 performs the OBMC processing of S3 to S6 by using whether or not there is an unprocessed subblock among the subblocks to be subjected to the OBMC processing and the motion parameters of the adjacent subblocks in all directions. It is determined whether or not it has been touched (S7).

未処理のサブブロックがなく、全ての方向の隣接サブブロックの動きパラメータを用いてOBMC処理が行われた場合(S7でNO)、処理は終了する。   If there is no unprocessed sub-block and the OBMC process has been performed using the motion parameters of the adjacent sub-blocks in all directions (NO in S7), the process ends.

なお、未処理のサブブロックがある場合または全ての方向の隣接サブブロックの動きパラメータを用いてOBMC処理が行われていない場合(S7でYES)、S2に移行し、次の方向の処理を行う。   If there is an unprocessed sub-block or if the OBMC process has not been performed using the motion parameters of the adjacent sub-blocks in all directions (YES in S7), the process proceeds to S2 and the process in the next direction is performed. .

なお、OBMC_flag=0の場合、PRED_[][]=PRED_C[][]である。   When OBMC_flag = 0, PRED _ [] [] = PRED_C [] [].

(動き補償の変形例)
(動き補償部3091)
次に、動き補償部3091が行う動き補償の変形例について説明する。図22は本変形例に係るOBMC処理を行うインター予測画像生成部309が備えている動き補償部3091の要部構成を示すブロック図である。図22に示すように、動き補償部3091は、補間画像生成部3092(PU補間画像生成部30911およびOBMC補間画像生成部30912)とOBMC補正部3093とOBMC処理実施判定部3095を備えている。なお、本変形例に係る補間画像生成部3092およびOBMC補正部3093が行う処理については、既に説明した補間画像生成部3092およびOBMC補正部3093が行う処理と異なる点のみを説明する。
(Modification of motion compensation)
(Motion compensation unit 3091)
Next, a modified example of the motion compensation performed by the motion compensation unit 3091 will be described. FIG. 22 is a block diagram illustrating a main configuration of a motion compensation unit 3091 included in the inter prediction image generation unit 309 that performs the OBMC process according to the present modification. As shown in FIG. 22, the motion compensation unit 3091 includes an interpolation image generation unit 3092 (PU interpolation image generation unit 30911 and OBMC interpolation image generation unit 30912), an OBMC correction unit 3093, and an OBMC processing execution determination unit 3095. It should be noted that the processing performed by the interpolation image generation unit 3092 and the OBMC correction unit 3093 according to the present modified example will be described only with respect to differences from the processing performed by the interpolation image generation unit 3092 and the OBMC correction unit 3093 described above.

(OBMC処理実施判定部3095)
本変形例に係るOBMC処理実施判定部3095は、対象サブブロックの動きベクトルと、当該対象サブブロックに隣接するサブブロックの動きベクトルとの差分が、所定の値以下である場合に、補間画像生成部3092およびOBMC補正部3093におけるOBMC処理を実行すると判定する。
(OBMC processing execution determination unit 3095)
The OBMC processing execution determination unit 3095 according to the present modification generates an interpolated image when the difference between the motion vector of the target sub-block and the motion vector of the sub-block adjacent to the target sub-block is equal to or smaller than a predetermined value. It is determined that the OBMC processing in the unit 3092 and the OBMC correction unit 3093 is to be performed.

(OBMC処理実施判定部3095の判定例1)
次に、OBMC処理実施判定部3095が行う判定の一例について説明する。本例においては、OBMC処理実施判定部3095は、対象サブブロックの動きベクトルと、当該対象サブブロックに隣接する同じPU(対象サブブロックを含むブロック)内のサブブロック(隣接サブブロック)の動きベクトルとが同じである否かを判定する。すなわち、本例においては対象ブロックの動きベクトルと、隣接サブブロックの動きベクトルとの差分が0である場合に、OBMC処理が実行される。対象サブブロックの動きベクトルと、該隣接サブブロックの動きベクトルとが同じである場合に、動き補償部3091はOBMC処理を用いた予測画像生成処理を行う。また、上記OBMC処理は、該対象サブブロックと該隣接サブブロックとをマージ(結合)したサブブロックに対して行われる。換言すると、OBMC処理実施判定部3095は、対象サブブロックの動きベクトルと、該隣接サブブロックの動きベクトルとが同じである否かを判定することによって、対象サブブロックと該隣接サブブロックとがマージ可能であるか否かを判定する。対象サブブロックと該隣接サブブロックとがマージ可能である場合、補間画像生成部3092およびOBMC補正部3093は当該マージを行ったサブブロックに対してOBMC処理を行う。
(Judgment example 1 of OBMC processing execution judgment unit 3095)
Next, an example of the determination performed by the OBMC processing execution determination unit 3095 will be described. In this example, the OBMC processing execution determination unit 3095 determines the motion vector of the target sub-block and the motion vector of the sub-block (adjacent sub-block) in the same PU (block including the target sub-block) adjacent to the target sub-block Are determined to be the same. That is, in this example, when the difference between the motion vector of the target block and the motion vector of the adjacent sub-block is 0, the OBMC process is performed. When the motion vector of the target sub-block is the same as the motion vector of the adjacent sub-block, the motion compensator 3091 performs a predicted image generation process using the OBMC process. The OBMC process is performed on a sub-block obtained by merging (combining) the target sub-block and the adjacent sub-block. In other words, the OBMC processing execution determination unit 3095 determines whether the motion vector of the target sub-block is the same as the motion vector of the adjacent sub-block, thereby merging the target sub-block and the adjacent sub-block. It is determined whether or not it is possible. If the target sub-block and the adjacent sub-block can be merged, the interpolation image generation unit 3092 and the OBMC correction unit 3093 perform the OBMC process on the merged sub-block.

図23は、対象サブブロックと該対象サブロックに隣接する同じPU内のサブブロックとをマージしたサブブロックの一例を示す図である。図23に記載された細い枠線は各サブブロックを示している。また、図23に記載された矢印は各サブブロックの動きベクトルを示している。また、図23に記載された太い枠線はサブブロックがマージ可能な場合、マージされたサブブロックを示している。図23に示すように、対象サブブロックの動きベクトルと、該隣接サブブロックの動きベクトルとが同じである場合に、OBMC補間画像生成部30912は、これらのサブブロックをマージする。   FIG. 23 is a diagram illustrating an example of a sub-block obtained by merging a target sub-block and a sub-block in the same PU adjacent to the target sub-block. The thin frame lines shown in FIG. 23 indicate each sub-block. Also, the arrows described in FIG. 23 indicate the motion vectors of each sub-block. Further, a thick frame line shown in FIG. 23 indicates a merged sub-block when the sub-block can be merged. As shown in FIG. 23, when the motion vector of the target sub-block is the same as the motion vector of the adjacent sub-block, the OBMC interpolation image generation unit 30912 merges these sub-blocks.

上記記載は、隣接するサブブロックSiとサブブロックSjとが同じ動きベクトルを有する場合(マージ可能な場合)に、サブブロックSiとサブブロックSjとの間でOBMC処理が実行されることを意味するものではない。   The above description means that when adjacent sub-blocks Si and Sj have the same motion vector (when merging is possible), OBMC processing is performed between sub-block Si and sub-block Sj. Not something.

具体的には、OBMC補間画像生成部30912は、対象サブブロックStのある方向dirA(例えば右)にあるサブブロックSa(隣接サブブロック)が対象サブブロックStと同じ動きベクトルを有し、対象サブブロックStとサブブロックSaとがマージ可能であると判断する場合に以下のOBMC処理を行う。OBMC補間画像生成部30912は方向dirAとは異なる方向のdirB(例えば上)に接するサブブロックSb(隣接参照サブブロック)と対象サブブロックStとの間で加重平均などのOBMC処理(補正処理)を行う。   Specifically, the OBMC interpolation image generation unit 30912 determines that the sub-block Sa (adjacent sub-block) in the direction dirA (for example, right) of the target sub-block St has the same motion vector as the target sub-block St, and When it is determined that the block St and the sub-block Sa can be merged, the following OBMC processing is performed. The OBMC interpolation image generation unit 30912 performs OBMC processing (correction processing) such as weighted averaging between the target sub-block St and the sub-block Sb (adjacent reference sub-block) adjacent to dirB (for example, above) in a direction different from the direction dirA. Do.

この場合、OBMC補間画像生成部30912は、隣接参照サブブロックSbの動きベクトルMVbを用いて導出された対象サブブロックStの予測画像PredBを用いて、対象サブブロックStの予測画像Predを補正する。なお、対象サブブロックStと上記のdirAに隣接するサブブロックSa(隣接サブブロック)との間ではOBMCの補正処理は行う必要はない。サブブロックSaの動きベクトルMVaは、対象サブブロックStの動きベクトルMVtと等しいので、サブブロックSaの動きベクトルMVaを用いて導出された対象サブブロックStの予測画像PredAは、対象サブブロックStの予測画像Predと同一となる。したがって、OBMCの補正処理を行わなくてもよい。同じ予測画像同士で補正処理を行っても予測画像に変化がないためOBMCの補正処理を行ってもよい。   In this case, the OBMC interpolation image generation unit 30912 corrects the predicted image Pred of the target sub-block St using the predicted image PredB of the target sub-block St derived using the motion vector MVb of the adjacent reference sub-block Sb. It is not necessary to perform the OBMC correction process between the target sub-block St and the sub-block Sa (adjacent sub-block) adjacent to the above dirA. Since the motion vector MVA of the sub-block Sa is equal to the motion vector MVt of the target sub-block St, the predicted image PredA of the target sub-block St derived using the motion vector MVA of the sub-block Sa is the prediction of the target sub-block St. It is the same as the image Pred. Therefore, it is not necessary to perform the OBMC correction process. Even if the correction processing is performed between the same predicted images, there is no change in the predicted images, so that the OBMC correction processing may be performed.

ここで、本判定例における、マージの対象となる対象サブブロックに隣接する同じPU内のサブブロックについて、図24を参照して説明する。図24は、対象サブブロックに隣接する同じPU内のサブブロックの一例を示す図である。図24に示すように、サブブロックTは対象PUに含まれるサブブロックである。また、図24に示すように、サブブロックTのマージ対象になるサブブロックTNは対象PUに含まれているサブブロックであり、サブブロックTの後に処理されるサブブロックである。また、本例ではOBMC処理において、サブブロックTNの動きベクトルとサブブロックTの動きベクトルとが同じ場合、これらのサブブロックをマージして1つのサブブロックとする。   Here, the sub-block in the same PU adjacent to the target sub-block to be merged in this determination example will be described with reference to FIG. FIG. 24 is a diagram illustrating an example of a subblock in the same PU adjacent to the target subblock. As shown in FIG. 24, the sub-block T is a sub-block included in the target PU. Further, as shown in FIG. 24, the sub-block TN to be merged with the sub-block T is a sub-block included in the target PU, and is a sub-block processed after the sub-block T. In this example, in the OBMC process, when the motion vector of the sub-block TN is the same as the motion vector of the sub-block T, these sub-blocks are merged into one sub-block.

図25は、本例に係るOBMC処理を表す疑似コードの一例を示す図である。図25に示すように、OBMC処理実施判定部3095は対象サブブロックが対象ブロック(例えば、対象PU)内の隣接サブブロックとマージ可能であるかを判定してもよい。OBMC処理実施判定部3095がマージ可能であると判定した場合に、補間画像生成部3092およびOBMC補正部3093はマージしたサブブロックに対してOBMC処理を行う。OBMC処理実施判定部3095がマージ不可と判定した場合、補間画像生成部3092およびOBMC補正部3093は対象サブブロックに対しOBMC処理を行わず、次のサブブロックに移行する。   FIG. 25 is a diagram showing an example of pseudo code representing the OBMC process according to the present example. As illustrated in FIG. 25, the OBMC process execution determination unit 3095 may determine whether the target sub-block can be merged with an adjacent sub-block in the target block (eg, the target PU). When the OBMC processing execution determination unit 3095 determines that merging is possible, the interpolation image generation unit 3092 and the OBMC correction unit 3093 perform OBMC processing on the merged sub-block. If the OBMC processing execution determination unit 3095 determines that merging is not possible, the interpolation image generation unit 3092 and the OBMC correction unit 3093 do not perform OBMC processing on the target sub-block, and shift to the next sub-block.

より詳細には、OBMC処理実施判定部3095は、対象サブブロックが対象ブロック内の隣接サブブロックとマージ可能であるか否かを示すmergeBlkFlagを導出する。図26は、OBMC処理実施判定部3095がmergeBlkFlagを導出するための判定式の一例を示している。なお、図26においては、対象サブブロックに隣接する同じPU内のサブブロックの位置を(xNbC, yNbC)としている。   More specifically, the OBMC process execution determination unit 3095 derives mergeBlkFlag indicating whether or not the target sub-block can be merged with an adjacent sub-block in the target block. FIG. 26 illustrates an example of a determination formula for the OBMC process execution determination unit 3095 to derive mergeBlkFlag. In FIG. 26, the position of a subblock in the same PU adjacent to the target subblock is (xNbC, yNbC).

図26に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと、当該対象サブブロックに隣接する同じPU内のサブブロックの動きベクトルとが同じである否かに応じて、mergeBlkFlagを導出する。OBMC処理実施判定部3095は、導出したmergeBlkFlagを補間画像生成部3092およびOBMC補正部3093に出力する。補間画像生成部3092およびOBMC補正部3093は、mergeBlkFlagを参照し、対象サブブロックがマージ可能である場合にOBMC処理を行う。   As shown in FIG. 26, the OBMC processing execution determination unit 3095 determines whether the motion vector of the target sub-block is the same as the motion vector of the sub-block in the same PU adjacent to the target sub-block, and determines whether the mergeBlkFlag Is derived. The OBMC processing execution determination unit 3095 outputs the derived mergeBlkFlag to the interpolation image generation unit 3092 and the OBMC correction unit 3093. The interpolation image generation unit 3092 and the OBMC correction unit 3093 refer to mergeBlkFlag and perform OBMC processing when the target sub-block can be merged.

上記の構成によれば、対象サブブロックの動きベクトルと当該対象サブブロックに隣接する同じPU内のサブブロックの動きベクトルとが同じである場合、すなわち、対象サブブロックと隣接サブブロックとがマージ可能である場合に、OBMC処理が行われる。   According to the above configuration, when the motion vector of the target sub-block is the same as the motion vector of the sub-block in the same PU adjacent to the target sub-block, that is, the target sub-block and the adjacent sub-block can be merged. If, the OBMC process is performed.

例えば、4×4単位の対象サブブロックと4×4単位の隣接サブブロックとをマージした8×4単位のブロックに対してOBMC処理が行われる。   For example, OBMC processing is performed on an 8 × 4 unit block obtained by merging a 4 × 4 unit target sub-block and a 4 × 4 unit adjacent sub-block.

そのため、小さいサイズの対象サブブロックに対するOBMC処理を回避することができる。よって、OBMC処理における処理量を減らすことができ、画像データにアクセスするためのメモリバンドが大きくなることを抑制することができるという効果を奏する。   Therefore, it is possible to avoid the OBMC processing for the target sub-block having a small size. Therefore, it is possible to reduce the amount of processing in the OBMC processing, and to suppress an increase in a memory band for accessing image data.

図27は、本例に係るOBMC処理を表す疑似コードの他の一例を示す図である。図27に示すように、OBMC処理実施判定部3095は対象サブブロックが対象ブロック内の水平方向に隣接する同じPU(対象サブブロックを含むブロック)内のサブブロックとマージ可能であるかを判定してもよい。OBMC処理実施判定部3095がマージ可能と判定した場合に、補間画像生成部3092およびOBMC補正部3093は対象サブブロックと、対象ブロックに対して水平方向に隣接する同じPU内のサブブロックとをマージしたサブブロックに対してOBMC処理を行う。   FIG. 27 is a diagram illustrating another example of the pseudo code representing the OBMC process according to the present example. As shown in FIG. 27, the OBMC processing execution determination unit 3095 determines whether the target sub-block can be merged with a horizontally adjacent sub-block in the same PU (block including the target sub-block) in the target block. You may. When the OBMC processing execution determination unit 3095 determines that merging is possible, the interpolation image generation unit 3092 and the OBMC correction unit 3093 merge the target sub-block and a sub-block in the same PU horizontally adjacent to the target block. OBMC processing is performed on the set sub-block.

より詳細には、OBMC処理実施判定部3095は、対象サブブロックが対象ブロック内の水平方向に隣接する同じPU内のサブブロックとマージ可能であるか否かを示すmergeBlkFlagを導出する。図28は、OBMC処理実施判定部3095がmergeBlkFlagを導出するための判定式の一例を示している。なお、隣接サブブロックが対象サブブロックに水平方向に隣接している場合、対象サブブロックの位置は(xSb = subX*nSbW, ySb=subY*nSbH)となり、対象サブブロックに隣接するサブブロックの位置は(xNbC=(subX+1)*nSbW, yNb=subY*nSbH)となる。図28に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと、該隣接サブブロックの動きベクトルとが同じである否かに応じて、mergeBlkFlagを導出する。   More specifically, the OBMC processing execution determination unit 3095 derives mergeBlkFlag indicating whether or not the target sub-block can be merged with a horizontally adjacent sub-block in the same PU in the target block. FIG. 28 illustrates an example of a determination formula for the OBMC process execution determination unit 3095 to derive mergeBlkFlag. When the adjacent sub-block is adjacent to the target sub-block in the horizontal direction, the position of the target sub-block is (xSb = subX * nSbW, ySb = subY * nSbH), and the position of the sub-block adjacent to the target sub-block Is (xNbC = (subX + 1) * nSbW, yNb = subY * nSbH). As shown in FIG. 28, the OBMC processing execution determination unit 3095 derives mergeBlkFlag depending on whether the motion vector of the target sub-block is the same as the motion vector of the adjacent sub-block.

既に説明したように、対象サブブロックStのある方向dirA(例えば右)にあるサブブロックSaが対象サブブロックStと同じ動きベクトルを有し、サブブロックStとサブブロックSaとがマージ可能であると判断された場合に、以下のOBMC処理が行われる。すなわち、OBMC補間画像生成部30912は方向dirAとは異なる方向のdirB(例えば上)に接するサブブロックSb(隣接参照サブブロック)とサブブロックStとの間でOBMC処理を行う。この場合、OBMC補間画像生成部30912は、サブブロックSbの動きベクトルを用いて導出された対象サブブロックStの予測画像PredBを用いて、対象サブブロックStの予測画像Predを補正する。   As described above, it is assumed that the sub-block Sa in the direction dirA (for example, right) of the target sub-block St has the same motion vector as the target sub-block St, and the sub-block St and the sub-block Sa can be merged. When it is determined, the following OBMC processing is performed. That is, the OBMC interpolation image generation unit 30912 performs the OBMC process between the sub-block St and the sub-block Sb (adjacent reference sub-block) that is in contact with dirB (for example, above) in a direction different from the direction dirA. In this case, the OBMC interpolation image generating unit 30912 corrects the predicted image Pred of the target sub-block St using the predicted image PredB of the target sub-block St derived using the motion vector of the sub-block Sb.

なお、「水平方向に隣接する」とは、対象サブブロックに対して同じブロック内で右側に位置することを意味する。または、「水平方向に隣接する」とは、対象サブブロックに対して同じブロック内で左側もしくは右側に位置することを意味する。   Note that “adjacent in the horizontal direction” means that the target sub-block is located on the right side in the same block. Alternatively, “being horizontally adjacent” means being located on the left or right side within the same block with respect to the target sub-block.

上記の構成によれば、対象サブブロックと対象サブブロックに対して水平方向に隣接する同じPU内のサブブロックとがマージ可能である場合に、マージしたサブブロックに対してOBMC処理が行われる。そのため、OBMC処理における処理量を減らすことができ、画像データにアクセスするためのメモリバンドが大きくなることを抑制することができるという効果を奏する。   According to the above configuration, when a target sub-block and a sub-block in the same PU horizontally adjacent to the target sub-block can be merged, the OBMC process is performed on the merged sub-block. Therefore, it is possible to reduce the amount of processing in the OBMC processing, and to suppress an increase in a memory band for accessing image data.

また、本例は、サブブロックの処理が水平方向優先であるラスタースキャン順に行われる構成に適している。   This example is suitable for a configuration in which the processing of the sub-block is performed in the raster scan order in which the priority in the horizontal direction is given.

(OBMC処理実施判定部3095の判定例2)
次に、OBMC処理実施判定部3095が行う判定の他の一例について説明する。本例においては、OBMC処理実施判定部3095は、対象サブブロックの動きベクトルと、当該対象サブブロックに隣接する隣接サブブロックの動きベクトルとの差分が、所定の値以下である場合に、補間画像生成部3092およびOBMC補正部3093におけるOBMC処理を実行すると判定する。本例における対象サブブロックに隣接する隣接サブブロックとは、対象サブブロックのOBMC処理に利用され得る動きベクトルを有するサブブロックである。ここで、本判定例における、対象サブブロックに隣接するサブブロック(隣接参照サブブロック)の具体例について、図29を参照して説明する。図29は、隣接参照サブブロックの一例を示す図である。
(Judgment example 2 of OBMC processing execution judgment unit 3095)
Next, another example of the determination performed by the OBMC processing execution determination unit 3095 will be described. In this example, when the difference between the motion vector of the target sub-block and the motion vector of the adjacent sub-block adjacent to the target sub-block is equal to or smaller than a predetermined value, the It is determined that the OBMC processing in the generation unit 3092 and the OBMC correction unit 3093 is to be performed. The adjacent sub-block adjacent to the target sub-block in this example is a sub-block having a motion vector that can be used for the OBMC processing of the target sub-block. Here, a specific example of the sub-block adjacent to the target sub-block (adjacent reference sub-block) in this determination example will be described with reference to FIG. FIG. 29 is a diagram illustrating an example of the adjacent reference sub-block.

図29に示すように、対象サブブロックTは対象CUに含まれる対象サブブロックである。例えば、OBMC処理実施判定部3095は対象サブブロックTの上、左、右、下に隣接するサブブロックについて、対象サブブロックTのOBMC処理に利用され得る動きベクトルを有するか否かを判定する。図29に示す例では、対象サブブロックTの隣接サブブロックTA、隣接サブブロックTL、隣接サブブロックTRおよび隣接サブブロックTBは、対象サブブロックTのOBMC処理に利用され得る動きベクトルを有するブロックである。すなわち、図29に示す例では、OBMC処理実施判定部3095は対象サブブロックTの上、左、右、下に隣接するサブブロックの動きベクトルについて、対象サブブロックの動きベクトルとの差分が所定の値以下であるか否かの判定が行われる。   As shown in FIG. 29, the target sub-block T is a target sub-block included in the target CU. For example, the OBMC processing execution determination unit 3095 determines whether a subblock adjacent above, to the left, to the right of, or below the target subblock T has a motion vector that can be used for the OBMC processing of the target subblock T. In the example illustrated in FIG. 29, the adjacent sub-block TA, adjacent sub-block TL, adjacent sub-block TR, and adjacent sub-block TB of the target sub-block T are blocks having motion vectors that can be used for the OBMC process of the target sub-block T. is there. That is, in the example illustrated in FIG. 29, the OBMC processing execution determination unit 3095 determines that the difference between the motion vector of the sub-block adjacent to the upper, left, right, and lower of the target sub-block T from the motion vector of the target sub-block is a predetermined A determination is made whether it is less than or equal to the value.

換言すると、対象サブブロックTの隣接サブブロックTA、隣接サブブロックTL、隣接サブブロックTRおよび隣接サブブロックTBは、対象サブブロックTのOBMC処理に利用され得る動きベクトルを有するサブブロックである。すなわち、動きベクトルの判定が行われる該隣接サブブロックは、OBMC処理の参照サブブロックになりうるサブブロック(隣接参照サブブロック)である。隣接参照サブブロックは、例えば、dirによって指定されるサブブロックである(図20、図30等参照)。   In other words, the adjacent sub-block TA, adjacent sub-block TL, adjacent sub-block TR, and adjacent sub-block TB of the target sub-block T are sub-blocks having motion vectors that can be used for OBMC processing of the target sub-block T. That is, the adjacent sub-block for which the motion vector is determined is a sub-block (adjacent reference sub-block) that can be a reference sub-block in the OBMC process. The adjacent reference sub-block is, for example, a sub-block specified by dir (see FIG. 20, FIG. 30, etc.).

図30は、本例に係るOBMC処理を表す疑似コードの一例を示す図である。図30に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとの差分が所定の値よりも小さいか否かを判定する。対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとの差分が所定の値よりも小さい場合、補間画像生成部生成部3092およびOBMC補正部3093は当該隣接参照サブブロックの動きベクトルを用いてOBMC処理を行う。   FIG. 30 is a diagram illustrating an example of a pseudo code representing the OBMC process according to the present example. As shown in FIG. 30, the OBMC processing execution determination unit 3095 determines whether the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is smaller than a predetermined value. When the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is smaller than a predetermined value, the interpolation image generation unit generation unit 3092 and the OBMC correction unit 3093 use the motion vector of the adjacent reference sub-block. Perform OBMC processing.

より詳細には、OBMC処理実施判定部3095は、対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとの差分が所定の値よりも小さいかを示すsmallMVFlagを導出する。図31は、OBMC処理実施判定部3095がsmallMVFlagを導出するための判定式の一例を示している。図31に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとの差分mvdiffが、所定の値THよりも小さいか否かに応じた値を示すsmallMVFlagを導出する。なお、図31において、(xSb, ySb)は対象サブブロック(例えば、対象PU)の左上座標を画素単位で示している。また、隣接参照サブブロックの左上座標を(xNb,yNb)としている。   More specifically, the OBMC process execution determination unit 3095 derives a smallMVFlag indicating whether a difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is smaller than a predetermined value. FIG. 31 illustrates an example of a determination formula for the OBMC process execution determination unit 3095 to derive a smallMVFlag. As shown in FIG. 31, the OBMC processing execution determination unit 3095 indicates a value according to whether or not the difference mvdiff between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is smaller than a predetermined value TH. Derive smallMVFlag. In FIG. 31, (xSb, ySb) indicates the upper left coordinates of the target sub-block (for example, the target PU) in pixel units. The upper left coordinate of the adjacent reference sub-block is set to (xNb, yNb).

また、図32は、OBMC処理実施判定部3095がsmallMVFlagを導出するための判定式の他の一例を示している。図32に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとのx方向の差分およびy方向の差分の何れかが所定の値THよりも小さいか否かに応じた値を示すsmallMVFlagを導出してもよい。図32においては、mvL0diffHおよびmvL1diffHは対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとのx方向の差分を示している。また、mvL0diffVおよびmvL1diffVは対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとのy方向の差分を示している。   FIG. 32 illustrates another example of a determination formula for the OBMC process execution determination unit 3095 to derive a smallMVFlag. As shown in FIG. 32, the OBMC processing execution determination unit 3095 determines that either the difference in the x direction or the difference in the y direction between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is smaller than a predetermined value TH. A smallMVFlag indicating a value according to whether or not may be derived. In FIG. 32, mvL0diffH and mvL1diffH indicate the difference in the x direction between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block. In addition, mvL0diffV and mvL1diffV indicate a difference in the y direction between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block.

また、(xSb, ySb)は対象サブブロック(例えば、対象PU)の左上座標を画素単位で示している。また、対象サブブロックに隣接するサブブロックの左上座標を(xNb,yNb)としている。例えば、対象サブブロックの左上座標(xSb, ySb)および隣接参照サブブロックの左上座標(xNb,yNb)を以下の示すように導出しても良い。   (XSb, ySb) indicates the upper left coordinates of the target sub-block (for example, the target PU) in pixel units. Also, the upper left coordinate of the sub-block adjacent to the target sub-block is set to (xNb, yNb). For example, the upper left coordinates (xSb, ySb) of the target sub-block and the upper left coordinates (xNb, yNb) of the adjacent reference sub-block may be derived as follows.

(xSb, ySb) = (subX*4, subY*4) // T
(xNb, yNb) = (xSb, ySb-1) = (subX*4, subY*4-1) // TA
(xNb, yNb) = (xSb-1, ySb) = (subX*4-1, subY*4) // TL
(xNb, yNb) = (xSb+nSbW, ySb) = (subX*4+nSbW, subY*4) // TB
(xNb, yNb) = (xSb, ySb+nSbH) = (subX*4, subY*4+nSbH) // TR
OBMC処理実施判定部3095は、導出したsmallMVFlagを補間画像生成部3092およびOBMC補正部3093に出力する。補間画像生成部3092およびOBMC補正部3093は、smallMVFlagを参照し、対象サブブロックのOBMC処理を行う。
(xSb, ySb) = (subX * 4, subY * 4) // T
(xNb, yNb) = (xSb, ySb-1) = (subX * 4, subY * 4-1) // TA
(xNb, yNb) = (xSb-1, ySb) = (subX * 4-1, subY * 4) // TL
(xNb, yNb) = (xSb + nSbW, ySb) = (subX * 4 + nSbW, subY * 4) // TB
(xNb, yNb) = (xSb, ySb + nSbH) = (subX * 4, subY * 4 + nSbH) // TR
The OBMC processing execution determination unit 3095 outputs the derived smallMVFlag to the interpolation image generation unit 3092 and the OBMC correction unit 3093. The interpolation image generation unit 3092 and the OBMC correction unit 3093 perform OBMC processing on the target sub-block with reference to the smallMVFlag.

上記の構成によれば、当該対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとの差分が、所定の値以下である場合に、補間画像生成部3092およびOBMC補正部3093はOBMC処理を行う。   According to the above configuration, when the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is equal to or smaller than a predetermined value, the interpolation image generation unit 3092 and the OBMC correction unit 3093 perform the OBMC process. Do.

例えば、対象サブブロックの動きベクトルと、該隣接参照サブブロックのOBMC処理に用いる動きベクトルとの差分が小さい場合、OBMC処理に用いる参照画像は以下のようになる。すなわち、対象サブブロックに付加された動きベクトルを用いて参照される参照画像と該隣接参照サブブロックの動きベクトルを用いて参照される参照画像の重複領域は大きくなる。   For example, when the difference between the motion vector of the target sub-block and the motion vector used for the OBMC process of the adjacent reference sub-block is small, the reference image used for the OBMC process is as follows. That is, the overlapping area of the reference image referred to using the motion vector added to the target sub-block and the reference image referred to using the motion vector of the adjacent reference sub-block increases.

そのため、対象サブブロックの動きベクトルと、OBMC処理に用いる該隣接参照サブブロックの動きベクトルとの差分が小さい場合、OBMC処理を行ってもメモリバンドが大きくなることを抑制することができる。なお、上記対象サブブロックは、PU等のブロックであってもよい。   Therefore, when the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block used for the OBMC process is small, it is possible to suppress an increase in the memory band even when the OBMC process is performed. The target sub-block may be a block such as a PU.

図33は、本例に係るOBMC処理を表す疑似コードの他の一例を示す図である。図33に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと、対象サブブロックに隣接する隣接参照サブブロックの動きベクトルとの差分が、0ではなく、且つ、所定の値より小さいか否かを判定する。当該差分が0ではなく、且つ、所定の値より小さい場合に、補間画像生成部生成部3092およびOBMC補正部3093は隣接参照サブブロックの動きベクトルを用いてOBMC処理を行う。   FIG. 33 is a diagram illustrating another example of the pseudo code representing the OBMC process according to the present example. As shown in FIG. 33, the OBMC processing execution determination unit 3095 determines that the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block adjacent to the target sub-block is not 0, and is larger than a predetermined value. It is determined whether it is small. When the difference is not 0 and smaller than a predetermined value, the interpolation image generation unit generation unit 3092 and the OBMC correction unit 3093 perform the OBMC process using the motion vector of the adjacent reference sub-block.

図34は、OBMC処理実施判定部3095がsmallMVFlagを導出するための判定式の一例を示している。図34に示すように、OBMC処理実施判定部3095は対象サブブロックの動きベクトルと隣接参照サブブロックの動きベクトルとの差分mvdiffが、0ではなく、かつ、所定の値THよりも小さいか否かに応じた値を示すsmallMVFlagを導出する。   FIG. 34 illustrates an example of a determination formula for the OBMC process execution determination unit 3095 to derive a smallMVFlag. As shown in FIG. 34, the OBMC process execution determination unit 3095 determines whether the difference mvdiff between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block is not 0 and is smaller than a predetermined value TH. Derive a smallMVFlag indicating a value corresponding to.

対象サブブロックの動きベクトルと、OBMC処理に用いられる隣接参照サブブロックの動きベクトルとの差分が0である場合、補間画像は以下のようになる。すなわち、対象サブブロックに付加された動きベクトルを用いて生成される補間画像と該隣接参照サブブロックの動きベクトルを用いて生成される補間画像とは同じになる。   When the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block used for the OBMC process is 0, the interpolated image is as follows. That is, the interpolated image generated using the motion vector added to the target sub-block is the same as the interpolated image generated using the motion vector of the adjacent reference sub-block.

そのため、対象サブブロックの動きベクトルと、OBMC処理に用いられる該隣接参照サブブロックの動きベクトルとの差分が0である場合、OBMC処理は不要となる。上記の構成によれば、不要なOBMC処理を行うことを抑制することができるという効果を奏する。   Therefore, when the difference between the motion vector of the target sub-block and the motion vector of the adjacent reference sub-block used in the OBMC process is 0, the OBMC process is not required. According to the above configuration, there is an effect that unnecessary OBMC processing can be suppressed.

(重み予測)
重み予測部3094は、入力される動き補償画像predSamplesLXに重み係数を乗算することによりPUの予測画像を生成する。予測リスト利用フラグの一方(predFlagL0もしくはpredFlagL1)が1の場合(単予測の場合)で、重み予測を用いない場合には入力された動き補償画像predSamplesLX(LXはL0もしくはL1)を画素ビット数bitDepthに合わせる以下の式の処理を行う。
(Weight prediction)
The weight prediction unit 3094 generates a PU predicted image by multiplying the input motion compensated image predSamplesLX by a weight coefficient. When one of the prediction list use flags (predFlagL0 or predFlagL1) is 1 (in the case of simple prediction), and when weight prediction is not used, the input motion-compensated image predSamplesLX (LX is L0 or L1) is the number of pixel bits bitDepth. Perform the processing of the following equation 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 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 compensated images predSamplesL0 and predSamplesL1 are averaged and the pixel bit number is calculated. Perform the processing of the following equation 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 and offset2 = 1 << (shift2-1).

さらに、単予測の場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0とオフセットo0を符号化データから導出し、以下の式の処理を行う。   Furthermore, in the case of simple prediction, when weight prediction is performed, the weight prediction unit 3094 derives a weight prediction coefficient w0 and an offset o0 from the encoded data, and performs the processing of the following equation.

predSamples[x][y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( (predSamplesLX[x][y] * w0 + 2^(log2WD - 1)) >> log2WD ) + o0 )
ここで、log2WDは所定のシフト量を示す変数である。
predSamples [x] [y] = Clip3 (0, (1 << bitDepth)-1, ((predSamplesLX [x] [y] * w0 + 2 ^ (log2WD-1)) >> log2WD) + o0)
Here, log2WD is a variable indicating a predetermined shift amount.

さらに、双予測BiPredの場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0、w1、o0、o1を符号化データから導出し、以下の式の処理を行う。   Furthermore, in the case of bi-prediction BiPred, when performing weight prediction, the weight prediction unit 3094 derives weight prediction coefficients w0, w1, o0, and o1 from the encoded data, and performs the processing of the following equation.

predSamples[x][y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesL0 [x][y] * w0 + predSamplesL1[x][y] * w1 + ((o0 + o1 + 1) << log2WD) ) >> (log2WD + 1) )
(画像符号化装置の構成)
次に、本実施形態に係る画像符号化装置11の構成について説明する。図3は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
predSamples [x] [y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesL0 [x] [y] * w0 + predSamplesL1 [x] [y] * w1 + ((o0 + o1 + 1) << log2WD)) >> (log2WD + 1))
(Configuration of image encoding device)
Next, the configuration of the image encoding device 11 according to the present embodiment will be described. FIG. 3 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 transformation / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse transformation unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory. (Prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, coding parameter determination unit 110, and prediction parameter coding unit 111. The prediction parameter coding unit 111 includes an inter prediction parameter coding unit 112 and an intra prediction parameter coding unit 113.

予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてPUの予測画像Pを生成する。予測画像生成部101は、生成したPUの予測画像Pを減算部102に出力する。   The prediction image generation unit 101 generates a prediction image P of the prediction unit PU for each picture of the image T for each coding unit CU that is a region 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 parameters input from the prediction parameter encoding unit 111. The predicted image generation unit 101 generates a predicted image P of the PU using one of a plurality of prediction methods for the read reference picture block. The predicted image generation unit 101 outputs the generated PU predicted image P to the subtraction unit 102.

なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作であるためここでの説明を省略する。   The operation of the predicted image generation unit 101 is the same as that of the already described predicted image generation unit 308, and a description thereof will be omitted.

予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。   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 generates a residual signal by subtracting 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. The subtraction unit 102 outputs the generated residual signal to the transform / quantization unit 103.

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

エントロピー符号化部104には、変換・量子化部103から量子化係数が入力され、予測パラメータ符号化部111から符号化パラメータが入力される。入力される符号化パラメータには、例えば、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpredMode、及びマージインデックスmerge_idx等の符号がある。   The entropy coding unit 104 receives a quantization coefficient from the transform / quantization unit 103 and a coding parameter from the prediction parameter coding unit 111. The input coding 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 coding unit 104 generates a coded stream Te by entropy coding the input quantization coefficients and coding parameters, and outputs the generated coded stream Te to the outside.

逆量子化・逆変換部105は、変換・量子化部103から入力された量子化係数を逆量子化して変換係数を求める。逆量子化・逆変換部105は、求めた変換係数について逆周波数変換を行い、残差信号を算出する。逆量子化・逆変換部105は、算出した残差信号を加算部106に出力する。   The inverse quantization / inverse transform unit 105 inversely quantizes the quantized coefficient input from the transform / quantization unit 103 to obtain a transform coefficient. The inverse quantization / inverse transform unit 105 performs an 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 PU predicted image P input from the predicted image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse transformation 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 applies a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image generated by the adding unit 106.

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

参照ピクチャメモリ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つのセットを選択する。符号化パラメータとは、上述した予測パラメータやこの予測パラメータに関連して生成される符号化の対象となるパラメータである。   The encoding parameter determination unit 110 selects one set from a plurality of sets of encoding parameters. The coding parameter is the above-described prediction parameter or a parameter to be coded which is generated in association with the prediction parameter.

符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すコスト値を算出する。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。   The encoding parameter determination unit 110 calculates a magnitude of the information amount and a cost value indicating an encoding error for each of the plurality of sets. 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 unselected set of encoding parameters. The coding parameter determination unit 110 stores the determined coding parameter in the prediction parameter memory 108.

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

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

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

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

インター予測パラメータ符号化部112は、インター予測パラメータ符号化制御部1121、AMVP予測パラメータ導出部1122、減算部1123、サブブロック予測パラメータ導出部1125などを含んで構成される。インター予測パラメータ符号化部112は、動きベクトル(mvLX、subMvLX)と参照ピクチャインデックスrefIdxLX、PU分割モードpart_mode、インター予測識別子inter_pred_idc、あるいはこれらを示す情報を予測画像生成部101に出力する。またインター予測パラメータ符号化部112は、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、サブブロック予測モードフラグsubPbMotionFlagをエントロピー符号化部104に出力する。   The inter prediction parameter coding unit 112 includes an inter prediction parameter coding control unit 1121, an AMVP prediction parameter derivation unit 1122, a subtraction unit 1123, a sub block prediction parameter derivation unit 1125, and the like. The inter prediction parameter coding 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 predicted image generation unit 101. Further, the inter prediction parameter coding unit 112 sets the PU partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, the difference vector mvdLX, and the sub block prediction mode flag Output to encoding section 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 deriving unit 11211 compares the motion vector and the reference picture index input from the coding parameter determination unit 110 with the motion vector and the reference picture index of the PU of the merge candidate read from the prediction parameter memory 108, and performs merging. The index merge_idx is derived and output to the entropy coding unit 104. A merge candidate is a reference PU (for example, a reference PU adjacent to the lower left end, the upper left end, and the upper right end of an encoding target block) within a predetermined range from the encoding target CU to be encoded. This is the PU for which processing has been completed. The vector candidate index deriving unit 11212 derives a predicted vector index mvp_LX_idx.

サブブロック予測パラメータ導出部1125には、符号化パラメータ決定部110がサブブロック予測モードの使用を決定した場合、subPbMotionFlagの値に従って、空間サブブロック予測、時間サブブロック予測、アフィン予測、マッチング動き導出のいずれかのサブブロック予測の動きベクトルと参照ピクチャインデックスを導出する。動きベクトルと参照ピクチャインデックスは、画像復号装置の説明で述べたように、隣接PU、参照ピクチャブロック等の動きベクトルや参照ピクチャインデックスを予測パラメータメモリ108から読み出し、導出する。なお、サブブロック予測パラメータ導出部1125は、上述のサブブロック予測パラメータ導出部3037が行う処理と同様の処理を行ってもよい。   When the encoding parameter determination unit 110 determines to use the sub-block prediction mode, the sub-block prediction parameter derivation unit 1125 performs spatial sub-block prediction, temporal sub-block prediction, affine prediction, and matching motion derivation according to the value of subPbMotionFlag. A motion vector and a reference picture index for any 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 the motion vector of the adjacent PU and the reference picture block and the reference picture index from the prediction parameter memory 108. The sub-block prediction parameter deriving unit 1125 may perform the same processing as the processing performed by the above-described sub-block prediction parameter deriving unit 3037.

AMVP予測パラメータ導出部1122は、上述のAMVP予測パラメータ導出部3032(図9参照)と同様な構成を有する。   The AMVP prediction parameter deriving unit 1122 has a configuration similar to that of the above-described AMVP prediction parameter deriving unit 3032 (see FIG. 9).

すなわち、予測モードpredModeがインター予測モードを示す場合、AMVP予測パラメータ導出部1122には符号化パラメータ決定部110から動きベクトルmvLXが入力される。AMVP予測パラメータ導出部1122は、入力された動きベクトルmvLXに基づいて予測ベクトルmvpLXを導出する。AMVP予測パラメータ導出部1122は、導出した予測ベクトルmvpLXを減算部1123に出力する。なお、参照ピクチャインデックスrefIdx及び予測ベクトルインデックスmvp_LX_idxは、エントロピー符号化部104に出力される。   That is, when the prediction mode predMode indicates the inter prediction mode, the motion vector mvLX is input from the coding parameter determination unit 110 to the AMVP prediction parameter derivation unit 1122. The AMVP prediction parameter deriving unit 1122 derives a prediction vector mvpLX based on the input motion vector mvLX. The AMVP prediction parameter derivation unit 1122 outputs the derived prediction vector mvpLX to the subtraction unit 1123. Note that the reference picture index refIdx and the prediction vector index mvp_LX_idx are output to the entropy coding unit 104.

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

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

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

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。   As described above, one 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 gist of the present invention. It is possible to

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

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

図35の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図35の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。   FIG. 35A is a block diagram illustrating a configuration of a transmission device PROD_A on which the image encoding device 11 is mounted. As shown in (a) of FIG. 35, the transmission device PROD_A modulates a carrier wave with the coding unit PROD_A1 that obtains coded data by coding a moving image and the coded data obtained by the coding unit PROD_A1. And a transmitting unit PROD_A3 for transmitting the modulated signal obtained by the modulating unit PROD_A2. 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を更に備えていてもよい。図35の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。   The transmission device PROD_A is a camera PROD_A4 that captures a moving image, a recording medium PROD_A5 that records the moving image, an input terminal PROD_A6 for externally inputting the moving image, and a supply source of the moving image to be input to the encoding unit PROD_A1. , An image processing unit A7 for generating or processing an image. FIG. 35 (a) illustrates a configuration in which the transmitting device PROD_A is provided with all of these components, but a portion thereof may be omitted.

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

図35の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図35の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。   FIG. 35B is a block diagram illustrating a configuration of the receiving device PROD_B including the image decoding device 31. As shown in FIG. 35 (b), the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, 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を更に備えていてもよい。図35の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。   The receiving device PROD_B has a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the 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. FIG. 35 (b) illustrates a configuration in which the receiving device PROD_B includes all of them, but a part of the configuration may be omitted.

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

なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。   The transmission medium for transmitting the modulated signal may be wireless or wired. The transmission mode for transmitting the modulated signal may be broadcast (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). (Which refers to an embodiment). That is, the transmission of the modulated 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 station (such as a broadcasting facility) / a 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 (broadcasting facility or the like) / receiving station (television receiver or the like) 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が含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。   Servers (workstations, etc.) / Clients (television receivers, personal computers, smartphones, etc.) for VOD (Video On Demand) services and video sharing services using the Internet are transmission devices that transmit and receive modulated signals by communication. This is an example of PROD_A / reception device PROD_B (usually, 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. In addition, the smartphone includes a multifunctional mobile phone terminal.

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

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

図36の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図36の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。   FIG. 36A is a block diagram illustrating a configuration of a recording device PROD_C in which the above-described image encoding device 11 is mounted. As shown in (a) of FIG. 36, the recording device PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and encoded data obtained by the encoding unit PROD_C1 on a recording medium PROD_M. And 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 (1) a type built in the recording device PROD_C such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), or (2) an SD memory. It may be of a type connected to the recording device PROD_C, such as a card or a USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registered) Such as a trademark, for example, may be loaded into a drive device (not shown) built in the recording device PROD_C.

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

なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。   The receiving unit PROD_C5 may receive a moving image that has not been encoded, or may receive encoded data encoded using a transmission encoding method different from the recording encoding method. May be used. In the latter case, a transmission decoding unit (not shown) for decoding encoded data encoded by the transmission encoding method may be interposed between the receiving 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の一例である。   Such a recording device PROD_C includes, for example, 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 moving image supply source). . 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), and a smartphone ( In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main source of the moving image) is an example of such a recording device PROD_C.

図36の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図36の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。   (B) of FIG. 36 is a block diagram illustrating a configuration of a playback device PROD_D including the above-described image decoding device 31. As shown in FIG. 36 (b), the playback device PROD_D reads the encoded data written on the recording medium PROD_M, and reads the encoded data read by the read unit PROD_D1 to decode the moving image. And a decoding unit PROD_D2 for obtaining the same. 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に内蔵されたドライブ装置(不図示)に装填されるものであってもよい。   Note that the recording medium PROD_M may be (1) a type built in the playback device PROD_D, such as an HDD or SSD, or (2) a type such as an SD memory card or a USB flash memory. It may be of a type that is connected to the playback device PROD_D, or (3) may be a device such as a DVD or BD that is loaded into a drive device (not shown) built in the playback device PROD_D. Good.

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

なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。   Note that the transmission unit PROD_D5 may transmit an uncoded moving image, or may transmit coded data coded by a transmission coding method different from the recording coding method. May be used. In the latter case, an encoding unit (not shown) for encoding a moving image using a transmission encoding method may be interposed 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の一例である。   Such a playback device PROD_D includes, for example, a DVD player, a BD player, an HDD player, and the like (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 a moving image), a digital signage (also referred to as an electronic signboard or an electronic bulletin board, etc.) Desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main destination of the moving image), laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the video A main supply destination of an image), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main supply destination of a moving image) and the like are also examples of such a playback device PROD_D.

(ハードウェア的実現およびソフトウェア的実現)
また、上述した画像復号装置31および画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Hardware realization and software realization)
Also, 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 a CPU (Central Processing Unit). May be implemented by software.

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

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクや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 tapes such as a magnetic tape and a cassette tape, magnetic disks such as a floppy (registered trademark) disk / hard disk, and CD-ROMs (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical discs). ) / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray Disc: registered trademark) and other discs including optical discs, IC cards (including memory cards) / Electrically Erasable and Programmable Read-Only Memory (EEPROM) / Electrically Erasable and Programmable Read-Only Memory (registered trademark) / Flash ROM and other semiconductor memories or PLDs (Programmable logic devices) ) Or a logic circuit such as an 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 devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. This communication network is not particularly limited as long as it can transmit a 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), a telephone line network, a mobile communication network, a satellite communication network, and the like. Further, the transmission medium constituting the communication network may be any medium capable of transmitting the program code, and is not limited to a specific configuration or a specific type. For example, even if a cable 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., infrared rays such as IrDA (Infrared Data Association) and remote control , BlueTooth (registered trademark), IEEE 802.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. Note that 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 embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made within the scope shown in 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.

本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、および、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。   The embodiments of the present invention can be suitably applied to an image decoding device that decodes coded data obtained by coding image data, and an image coding device that generates coded data obtained by coding image data. 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・・・画像符号化装置(動画像符号化装置)
31・・・画像復号装置(動画像復号装置)
302・・・予測パラメータ復号部(予測画像生成装置)
309・・・インター予測画像生成部(予測画像生成部)
11 ... Image coding device (moving image coding device)
31 ... Image decoding device (moving image decoding device)
302... Prediction parameter decoding unit (prediction image generation device)
309: Inter prediction image generation unit (prediction image generation unit)

Claims (12)

対象画像を符号化して得られた符号化データを復号する画像復号装置であって、
サブブロック毎に予測画像を生成する予測画像生成部を備え、
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックに隣接するサブブロックの動きベクトルとの差分が、所定の値以下である場合に、OBMC処理を用いた予測画像生成処理を行う
ことを特徴とする画像復号装置。
An image decoding apparatus that decodes encoded data obtained by encoding a target image,
A prediction image generation unit that generates a prediction image for each sub-block,
The predicted image generation unit includes:
When a difference between a motion vector of the target sub-block and a motion vector of a sub-block adjacent to the target sub-block is equal to or smaller than a predetermined value, a predicted image generation process using the OBMC process is performed. Image decoding device.
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックに隣接するサブブロックの動きベクトルとの差分が、0ではなく、且つ、所定の値よりも小さい場合に、OBMC処理を用いた予測画像生成処理を行う
ことを特徴とする請求項1に記載の画像復号装置。
The predicted image generation unit includes:
When the difference between the motion vector of the target sub-block and the motion vector of the sub-block adjacent to the target sub-block is not 0 and is smaller than a predetermined value, the predicted image generation process using the OBMC process is performed. The image decoding device according to claim 1, wherein the image decoding is performed.
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックを含むブロックに含まれるサブブロックであって当該対象サブブロックに隣接するサブブロックの動きベクトルとが同じである場合に、OBMC処理を用いた予測画像生成処理を行い、
上記OBMC処理は、該対象サブブロックと該対象サブブロックに隣接するサブブロックとを結合したサブブロックに対して行われる
ことを特徴とする請求項1に記載の画像復号装置。
The predicted image generation unit includes:
When the motion vector of the target sub-block is the same as the motion vector of the sub-block included in the block including the target sub-block and adjacent to the target sub-block, a predicted image using the OBMC process Perform generation processing,
The image decoding apparatus according to claim 1, wherein the OBMC process is performed on a sub-block obtained by combining the target sub-block and a sub-block adjacent to the target sub-block.
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックを含むブロックに含まれるサブブロックであって当該対象サブブロックに対して水平方向に隣接するサブブロックの動きベクトルとが同じである場合に、OBMC処理を用いた予測画像生成処理を行い、
上記OBMC処理は、該対象サブブロックと該対象サブブロックに対して水平方向に隣接するサブブロックとを結合したサブブロックに対して行われる
ことを特徴とする請求項3に記載の画像復号装置。
The predicted image generation unit includes:
When the motion vector of the target sub-block is the same as the motion vector of the sub-block included in the block including the target sub-block and horizontally adjacent to the target sub-block, the OBMC process is performed. Perform a predicted image generation process using
The image decoding apparatus according to claim 3, wherein the OBMC processing is performed on a sub-block obtained by combining the target sub-block and a sub-block horizontally adjacent to the target sub-block.
対象画像を符号化して得られた符号化データを復号する画像復号装置であって、
ブロック毎に予測画像を生成する予測画像生成部を備え、
上記予測画像生成部は、
対象サブブロックが所定のサイズ以下のサブブロックであって、対象サブブロックが双方向予測サブブロックである場合に、当該対象サブブロックに対して、当該対象サブブロックに隣接する隣接サブブロックの動き情報と同じ動き情報を割り当てて、上記予測画像を生成する
ことを特徴とする画像復号装置。
An image decoding apparatus that decodes encoded data obtained by encoding a target image,
A prediction image generation unit that generates a prediction image for each block,
The predicted image generation unit includes:
When the target sub-block is a sub-block of a predetermined size or less, and the target sub-block is a bidirectional prediction sub-block, the motion information of the adjacent sub-block adjacent to the target sub-block with respect to the target sub-block. An image decoding apparatus, wherein the same motion information as above is assigned to generate the predicted image.
上記予測画像生成部は、
上記対象サブブロックに対して、上記対象サブブロックの動きベクトルと、上記隣接サブブロックの動きベクトルとの平均ベクトルを割り当てて、上記予測画像を生成する
ことを特徴とする請求項5に記載の画像復号装置。
The predicted image generation unit includes:
The image according to claim 5, wherein the prediction image is generated by allocating an average vector of a motion vector of the target sub-block and a motion vector of the adjacent sub-block to the target sub-block. Decoding device.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
サブブロック毎に予測画像を生成する予測画像生成部を備え、
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックに隣接するサブブロックの動きベクトルとの差分が、所定の値以下である場合に、OBMC処理を用いた予測画像生成処理を行う
ことを特徴とする画像符号化装置。
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 for each sub-block,
The predicted image generation unit includes:
When a difference between a motion vector of the target sub-block and a motion vector of a sub-block adjacent to the target sub-block is equal to or smaller than a predetermined value, a predicted image generation process using the OBMC process is performed. Image coding device.
上記予測画像生成部は、
対象ブロックの動きベクトルと、当該対象サブブロックに隣接するサブブロックの動きベクトルとの差分が、0ではなく、且つ、所定の値以下である場合に、OBMC処理を用いた予測画像生成処理を行う
ことを特徴とする請求項7に記載の画像符号化装置。
The predicted image generation unit includes:
When the difference between the motion vector of the target block and the motion vector of a sub-block adjacent to the target sub-block is not 0 and is equal to or smaller than a predetermined value, a predicted image generation process using the OBMC process is performed. The image encoding device according to claim 7, wherein:
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックを含むブロックに含まれるサブブロックであって当該対象サブブロックに隣接するサブブロックの動きベクトルとが同じである場合に、OBMC処理を用いた予測画像生成処理を行う
ことを特徴とする請求項7に記載の画像符号化装置。
The predicted image generation unit includes:
When the motion vector of the target sub-block is the same as the motion vector of the sub-block included in the block including the target sub-block and adjacent to the target sub-block, a predicted image using the OBMC process The image encoding device according to claim 7, wherein the image encoding device performs a generation process.
上記予測画像生成部は、
対象サブブロックの動きベクトルと、当該対象サブブロックを含むブロックに含まれるサブブロックであって当該対象サブブロックに対して水平方向に隣接するサブブロックの動きベクトルとが同じである場合に、OBMC処理を用いた予測画像生成処理を行う
ことを特徴とする請求項9に記載の画像符号化装置。
The predicted image generation unit includes:
When the motion vector of the target sub-block is the same as the motion vector of the sub-block included in the block including the target sub-block and horizontally adjacent to the target sub-block, the OBMC process is performed. The image encoding apparatus according to claim 9, wherein a prediction image generation process is performed using the image encoding.
予測画像と符号化対象画像との残差を符号化する画像符号化装置であって、
サブブロック毎に予測画像を生成する予測画像生成部を備え、
上記予測画像生成部は、
対象サブブロックが所定のサイズ以下のブロックであって、対象サブブロックが双方向予測サブブロックである場合に、当該対象サブブロックに対して、当該対象サブブロックに隣接する隣接サブブロックの動き情報と同じ動き情報を割り当てて、上記予測画像を生成する
ことを特徴とする画像符号化装置。
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 for each sub-block,
The predicted image generation unit includes:
When the target sub-block is a block having a predetermined size or less and the target sub-block is a bidirectional prediction sub-block, the motion information of the adjacent sub-block adjacent to the target sub-block is included in the target sub-block. An image encoding device, wherein the same motion information is assigned to generate the predicted image.
上記予測画像生成部は、
上記対象サブブロックに対して、上記対象サブブロックの動きベクトルと、上記隣接サブブロックの動きベクトルとの平均ベクトルを割り当てて、上記予測画像を生成する
ことを特徴とする請求項11に記載の画像符号化装置。
The predicted image generation unit includes:
The image according to claim 11, wherein the prediction image is generated by allocating an average vector of a motion vector of the target sub-block and a motion vector of the adjacent sub-block to the target sub-block. Encoding device.
JP2018125223A 2018-06-29 2018-06-29 Image decoding device and image encoding device Pending JP2020005200A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018125223A JP2020005200A (en) 2018-06-29 2018-06-29 Image decoding device and image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018125223A JP2020005200A (en) 2018-06-29 2018-06-29 Image decoding device and image encoding device

Publications (1)

Publication Number Publication Date
JP2020005200A true JP2020005200A (en) 2020-01-09

Family

ID=69100645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018125223A Pending JP2020005200A (en) 2018-06-29 2018-06-29 Image decoding device and image encoding device

Country Status (1)

Country Link
JP (1) JP2020005200A (en)

Similar Documents

Publication Publication Date Title
US11206429B2 (en) Image decoding device and image encoding device
JP7026049B2 (en) Affine motion vector derivation device, predictive image generator, motion image decoding device, and motion image coding device
CN109792535B (en) Predictive image generation device, moving image decoding device, and moving image encoding device
JP7048503B2 (en) Decoding device, coding device, decoding method, and coding method
US20210136407A1 (en) Video coding apparatus and video decoding apparatus
US11722690B2 (en) Motion vector generation device, a prediction image generation device, a video decoding device and a video coding device
US20200177922A1 (en) Video decoding device and video encoding device
US20200021837A1 (en) Video decoding apparatus and video coding apparatus
WO2018230493A1 (en) Video decoding device, video encoding device, prediction image generation device and motion vector derivation device
US20220345734A1 (en) Video decoding apparatus
US20190158860A1 (en) Video decoding device
WO2019139013A1 (en) Motion vector derivation 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
WO2018173432A1 (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2020108012A (en) Image decoding device and image encoding device
WO2018037919A1 (en) Image decoding device, image coding device, image decoding method, and image coding method
JP2020096279A (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2019201254A (en) Image decoding apparatus and image encoding apparatus
JP2020036101A (en) Image decoder, and image encoder
US11044490B2 (en) Motion compensation filter apparatus, image decoding apparatus, and video coding apparatus
JP2020088577A (en) Predictive image generation device, moving image decoding device, and moving image encoding device
JP2020170901A (en) Predictive image generation device, video decoding device, and video coding device
JP2020005200A (en) Image decoding device and image encoding device
JP2020096329A (en) Prediction image generation device, moving image decoding device, and moving image encoding device