JPWO2018061563A1 - Affine motion vector deriving device, predictive image generating device, moving image decoding device, and moving image encoding device - Google Patents

Affine motion vector deriving device, predictive image generating device, moving image decoding device, and moving image encoding device Download PDF

Info

Publication number
JPWO2018061563A1
JPWO2018061563A1 JP2018542005A JP2018542005A JPWO2018061563A1 JP WO2018061563 A1 JPWO2018061563 A1 JP WO2018061563A1 JP 2018542005 A JP2018542005 A JP 2018542005A JP 2018542005 A JP2018542005 A JP 2018542005A JP WO2018061563 A1 JPWO2018061563 A1 JP WO2018061563A1
Authority
JP
Japan
Prior art keywords
affine
unit
motion vector
prediction
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018542005A
Other languages
Japanese (ja)
Other versions
JP7026049B2 (en
Inventor
知宏 猪飼
知宏 猪飼
将伸 八杉
将伸 八杉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FG Innovation Co Ltd
Original Assignee
FG Innovation Co Ltd
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 FG Innovation Co Ltd filed Critical FG Innovation Co Ltd
Publication of JPWO2018061563A1 publication Critical patent/JPWO2018061563A1/en
Application granted granted Critical
Publication of JP7026049B2 publication Critical patent/JP7026049B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/537Motion estimation other than block-based
    • H04N19/54Motion estimation other than block-based using feature points or meshes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

4パラメータアフィンの処理を適用するか、6パラメータアフィンの処理を適用するかを適切に切り換えることができるアフィン動きベクトル導出装置を実現する。AMVP予測パラメータ導出部(3032)およびアフィン予測部(30372)は、対象ブロックを構成する複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、対象ブロックの形状および大きさの少なくとも何れかに応じて、4パラメータアフィンの処理を行うか、6パラメータアフィンの処理を行うかを切り替える。An affine motion vector deriving device is realized which can appropriately switch whether to apply 4-parameter affine processing or 6-parameter affine processing. The AMVP prediction parameter derivation unit (3032) and the affine prediction unit (30372) are control points set in the reference block that shares the vertex with the target block with the motion vector of each of the plurality of sub-blocks that make up the target block. The calculation is performed with reference to the motion vector in step (4), and whether to perform 4-parameter affine processing or 6-parameter affine processing is switched according to at least one of the shape and the size of the target block.

Description

本発明の実施形態は、アフィン動きベクトル導出装置、予測画像生成装置、動画像復号装置、および動画像符号化装置に関する。   Embodiments of the present invention relate to an affine motion vector derivation device, a predicted image generation device, a moving image decoding device, and a moving image coding device.

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

具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。   As a specific moving picture coding method, for example, a method proposed in H.264 / AVC or High-Efficiency Video Coding (HEVC) may be mentioned.

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

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

また、近年の動画像符号化及び復号の技術として非特許文献1のアフィン予測が挙げられる。   Moreover, the affine prediction of Non-Patent Document 1 can be mentioned as a technology of moving picture coding and decoding in recent years.

"Algorithm Description of Joint Exploration Test Model 3", JVET-C1002, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2016-05-31公開"Algorithm Description of Joint Exploration Test Model 3", JVET-C1002, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2016-05-31 published Improved affine motion prediction, JVET-C0062, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2016-05-17公開Improved affine motion prediction, JVET-C0062, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2016-05-17 published

非特許文献1のアフィン予測では、自由度4のアフィン予測(4パラメータアフィン)に基づいて、対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、2点の制御点の動きベクトルを参照して算出する。非特許文献2のアフィン予測では、自由度6のアフィン予測(6パラメータアフィン)に基づいて、3点の制御点の動きベクトルを参照してサブブロックの各々の動きベクトルを算出する。   In the affine prediction of Non-Patent Document 1, the motion vector of each of a plurality of sub-blocks included in the target block is referred to the motion vector of two control points based on the affine prediction with four degrees of freedom (four-parameter affine) Calculate. In the affine prediction of Non-Patent Document 2, motion vectors of subblocks are calculated with reference to motion vectors of three control points based on affine prediction (six-parameter affine) having six degrees of freedom.

上記6パラメータアフィンの処理は上記4パラメータアフィンの処理に比べて、全体としては符号化効率の向上に寄与するが、個々のブロックをみると、アフィンの処理を行う場合に必要な制御点の動きベクトルの符号化における符号量が増加するという課題があった。また、制御点の動きベクトルの精度に影響されやすいため、制御点の動きベクトルの精度が低く、真の動きベクトルからのずれが大きい場合、6パラメータアフィンの処理を適用して算出された動きベクトルの精度はさらに低下してしまう、という第1の課題があった。   Although the processing of the six-parameter affine contributes to the improvement of the coding efficiency as a whole as compared to the processing of the four-parameter affine, the movement of control points necessary for processing the affine when looking at individual blocks There is a problem that the code amount in vector coding increases. In addition, since the motion vector accuracy of the control point is easily influenced by the motion vector accuracy, and the motion vector accuracy of the control point is low and the deviation from the true motion vector is large, the motion vector calculated by applying the six parameter affine process. The first problem is that the accuracy of the problem is further reduced.

また、4パラメータアフィンの処理においては、参照ブロック内に設定された2つの制御点を用いる。適切な2点を制御点として用いなかった場合、4パラメータアフィンの処理の精度が低下してしまう、という第2の課題があった。   Also, in the 4-parameter affine processing, two control points set in the reference block are used. There is a second problem that the processing accuracy of the four-parameter affine decreases if two appropriate points are not used as control points.

上記の第1の課題を解決するために、対象PUを構成するサブブロックの各々の動きベクトルを導出するアフィン動きベクトル導出装置において、前記アフィン動きベクトル導出装置は、対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、前記対象ブロックの形状および大きさの少なくとも何れかに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替える。   In order to solve the first problem described above, in the affine motion vector deriving device that derives the motion vector of each of the subblocks that configure the target PU, the affine motion vector deriving device includes a plurality of subblocks included in the target block. The motion vector of each block is calculated with reference to the motion vector at a control point set in a reference block sharing a vertex with the target block, and at least one of the shape and the size of the target block Accordingly, it is switched whether to calculate the motion vectors of two control points to perform 4-parameter affine processing or calculate the motion vectors of three control points to perform 6-parameter affine processing.

また、上記の第1の課題を解決するために、本発明の一態様に係る予測画像生成装置は、動画像の符号化または復号に用いる予測画像を生成するための予測画像生成装置において、アフィン動きベクトル導出部と、予測画像生成部とを備え、前記アフィン動きベクトル導出部は、対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、前記対象ブロックの形状および大きさの少なくとも何れかに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替え、前記予測画像生成部は、前記制御点の動きベクトルを参照することによって予測画像を生成する。   Further, in order to solve the first problem described above, a predicted image generation device according to an aspect of the present invention is an affine image generation device for generating a predicted image used for encoding or decoding of a moving image. A motion vector deriving unit and a predicted image generating unit are provided, and the affine motion vector deriving unit is configured to set each motion vector of the plurality of sub-blocks included in the target block into a reference block sharing a vertex with the target block. It calculates with reference to the motion vector at the set control point, calculates the motion vector of the two control points according to at least one of the shape and the size of the target block, and processes the 4-parameter affine. Switching between calculation of motion vectors of three control points and processing of six parameters affine, and the predicted image generation unit Generating a predicted image by referring to the motion vector of the serial control points.

また、上記の第1の課題を解決するために、本発明の一態様に係る予測画像生成装置は、動画像の符号化または復号に用いる予測画像を生成するための予測画像生成装置において、アフィン動きベクトル導出部と、予測画像生成部とを備え、前記アフィン動きベクトル導出部は、対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、前記参照ブロックの形状および大きさの少なくとも何れかに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替え、前記予測画像生成部は、前記制御点の動きベクトルを参照することによって予測画像を生成する。   Further, in order to solve the first problem described above, a predicted image generation device according to an aspect of the present invention is an affine image generation device for generating a predicted image used for encoding or decoding of a moving image. A motion vector deriving unit and a predicted image generating unit are provided, and the affine motion vector deriving unit is configured to set each motion vector of the plurality of sub-blocks included in the target block into a reference block sharing a vertex with the target block. It is calculated by referring to the motion vector at the set control point, and according to at least one of the shape and the size of the reference block, the motion vector of two control points is calculated to process the four parameter affine. Switching between calculation of motion vectors of three control points and processing of six parameters affine, and the predicted image generation unit Generating a predicted image by referring to the motion vector of the serial control points.

また、上記の第2の課題を解決するために、本発明の一態様に係る予測画像生成装置は、動画像の符号化または復号に用いる予測画像を生成するための予測画像生成装置において、アフィン動きベクトル導出部と、予測画像生成部とを備え、前記アフィン動きベクトル導出部は、対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、前記対象ブロックの形状、または前記参照ブロックの形状に応じて、4パラメータアフィンの処理に用いる前記制御点を変更し、前記予測画像生成部は、前記制御点の動きベクトルを参照することによって予測画像を生成する。   Further, in order to solve the second problem described above, a predicted image generation device according to an aspect of the present invention is an affine image generation device for generating a predicted image used for encoding or decoding of a moving image. A motion vector deriving unit and a predicted image generating unit are provided, and the affine motion vector deriving unit is configured to set each motion vector of the plurality of sub-blocks included in the target block into a reference block sharing a vertex with the target block. The control point is calculated with reference to the motion vector at the set control point, and the control point used in the processing of the four parameter affine is changed according to the shape of the target block or the shape of the reference block. The image generation unit generates a predicted image by referring to the motion vector of the control point.

本発明の実施形態によれば、対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを精度良く算出するために、4パラメータアフィンの処理を適用するか、6パラメータアフィンの処理を適用するかを適切に切り換えることができる。また、アフィンの処理を行う場合に必要な制御点の動きベクトルの符号化における符号量を低減することできる。   According to the embodiment of the present invention, in order to calculate the motion vector of each of the plurality of sub-blocks included in the target block with high accuracy, whether four-parameter affine processing is applied or six-parameter affine processing is applied Can be switched appropriately. In addition, it is possible to reduce the amount of code in the coding of the motion vector of the control point, which is necessary when performing affine processing.

また、本発明の実施形態によれば、4パラメータアフィンの処理において、適切な制御点を用いることができる。   Also, according to embodiments of the present invention, appropriate control points can be used in the processing of a four parameter affine.

本実施形態に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the coding stream which concerns on this embodiment. PU分割モードのパターンを示す図である。(a)〜(h)は、それぞれ、PU分割モードが、2Nx2N、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNの場合のパーティション形状について示している。It is a figure which shows the pattern of PU split mode. (A) to (h) show the partition shapes when the PU division mode is 2Nx2N, 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN, respectively. 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。It is a conceptual diagram which shows an example of a reference picture and a reference picture list. 本実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus which concerns on this embodiment. 本実施形態に係る画像復号装置の構成を示す概略図である。It is the schematic which shows the structure of the image decoding apparatus which concerns on this embodiment. 本実施形態に係る画像符号化装置のインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part of the image coding apparatus which concerns on this embodiment. 本実施形態に係るマージ予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the merge prediction parameter derivation | leading-out part which concerns on this embodiment. 本実施形態に係るAMVP予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the AMVP prediction parameter derivation | leading-out part which concerns on this embodiment. 本実施形態に係る画像復号装置の動きベクトル復号処理の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the motion vector decoding process of the image decoding apparatus which concerns on this embodiment. 本実施形態に係る画像符号化装置のインター予測パラメータ符号化部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter encoding part of the image coding apparatus which concerns on this embodiment. 本実施形態に係るインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part which concerns on this embodiment. 本実施形態に係るインター予測パラメータ復号部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter decoding part which concerns on this embodiment. 動きベクトルを予測する対象であるPU(横幅nPbW)を構成する各サブブロックの動きベクトルspMvLX[xi][yj]を導出する例を示す図である。It is a figure which shows the example which derives motion vector spMvLX [xi] [yj] of each subblock which comprises PU (horizontal width nPbW) which is object which predicts a motion vector. (a)は、バイラテラルマッチング(Bilateral matching)について説明するための図である。(b)は、テンプレートマッチング(Template matching)について説明するための図である。(A) is a figure for demonstrating bilateral matching (Bilateral matching). (B) is a figure for demonstrating template matching (Template matching). AMVPモードおよびマージモードにおける制御点の動きベクトルの導出のために利用される予測ユニットの位置の例を示す図である。FIG. 7 is a diagram showing an example of the position of a prediction unit used to derive control point motion vectors in AMVP mode and merge mode. 動きベクトルを予測する対象である対象ブロック(横幅W、高さH)の制御点V0が左上頂点に位置する、一辺がBWの正方形のサブブロックの例を示す図である。It is a figure which shows the example of the square sub-block whose one side is BW in which the control point V0 of the object block (horizontal width W, height H) which is the object which predicts a motion vector is located in the upper left vertex. インター予測パラメータ復号部が対象PUの形状に基づいて動きベクトルを導出する制御点の数を決定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process in which the inter prediction parameter decoding part determines the number of control points which derive | lead-out motion vector based on the shape of object PU. インター予測パラメータ復号部が対象PUの形状に基づいて動きベクトルを導出する制御点の数を決定する処理の、別の例を示すフローチャートである。It is a flowchart which shows another example of a process which the number of control points which an inter prediction parameter decoding part derives | leads-out motion vector based on the shape of object PU. インター予測パラメータ復号部が対象PUの形状に基づいて動きベクトルを導出する制御点の数を決定する処理の、さらに別の例を示すフローチャートである。It is a flowchart which shows another example of a process which an inter prediction parameter decoding part determines the number of control points which derive | lead-out motion vector based on the shape of object PU. インター予測パラメータ復号部が対象PUのサイズに基づいて動きベクトルを導出する制御点の数を決定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process in which the inter prediction parameter decoding part determines the number of control points which derive | lead-out a motion vector based on the size of object PU. インター予測パラメータ復号部が対象PUのサイズに基づいて動きベクトルを導出する制御点の数を決定する処理の、別の例を示すフローチャートである。It is a flowchart which shows another example of a process in which the inter prediction parameter decoding part determines the number of control points which derive | lead-out a motion vector based on the size of object PU. 対象PUのサイズを示す値としてlog2(puWidth) + log2(puHeight)を用いた場合の、サイズごとの処理を示す表である。It is a table | surface which shows the process for every size at the time of using log2 (puWidth) + log2 (puHeight) as a value which shows the size of object PU. 対象PUのサイズを示す値としてmin(puWidth, puHeight)を用いた場合の、サイズごとの処理を示す表である。It is a table | surface which shows the process for every size at the time of using min (puWidth, puHeight) as a value which shows the size of object PU. インター予測パラメータ復号部が対象PUの形状およびサイズの両方に基づいて動きベクトルを導出する制御点の数を決定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process which the number of control points which an inter prediction parameter decoding part derives | requires a motion vector based on both the shape and size of object PU. インター予測パラメータ復号部が対象PUの形状およびサイズの両方に基づいて動きベクトルを導出する制御点の数を決定する処理の、別の例を示すフローチャートである。It is a flowchart which shows another example of a process which the number of control points which an inter prediction parameter decoding part derives | leads-out a motion vector based on both the shape and size of object PU. 対象PUのサイズおよび形状ごとの、アフィン予測部の処理の一例を示す表である。It is a table showing an example of processing of an affine prediction part for every size and shape of object PU. 対象PUのサイズおよび形状ごとの、アフィン予測部の処理の別の例を示す表である。It is a table showing another example of processing of the affine prediction unit for each size and shape of the target PU. インター予測パラメータ復号部が隣接ブロックの形状に基づいて4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process which the inter prediction parameter decoding part determines which process of 4 parameter affine and 6 parameter affine to perform based on the shape of an adjacent block. 図28に示した処理による制御点の数の選択の例について説明するための図である。It is a figure for demonstrating the example of selection of the number of control points by the process shown in FIG. インター予測パラメータ復号部が隣接ブロックのサイズに基づいて4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process which the inter prediction parameter decoding part determines which process of 4 parameter affine and 6 parameter affine to perform based on the size of an adjacent block. 図30に示した処理による制御点の数の選択の例について説明するための図である。It is a figure for demonstrating the example of selection of the number of control points by the process shown in FIG. インター予測パラメータ復号部が対象PUの形状に基づいて動きベクトルを導出する制御点の位置を決定する処理のフローチャートである。It is a flowchart of a process which an inter prediction parameter decoding part determines the position of the control point which derives a motion vector based on the shape of object PU. 第3の実施形態のインター予測パラメータ復号部が決定する制御点の位置の例を示す図である。It is a figure which shows the example of the position of the control point which the inter prediction parameter decoding part of 3rd Embodiment determines. インター予測パラメータ復号部が、隣接ブロックの形状に基づいて制御点の動きベクトルの導出に用いる隣接ブロックの点の位置を決定する処理のフローチャートである。It is a flowchart of a process which the inter prediction parameter decoding part determines the position of the point of the adjacent block used for derivation | leading-out of the motion vector of a control point based on the shape of an adjacent block. 第4の実施形態のインター予測パラメータ復号部が決定する制御点の位置の例を示す図である。It is a figure which shows the example of the position of the control point which the inter prediction parameter decoding part of 4th Embodiment determines. インター予測パラメータ復号部が隣接ブロックの形状に基づいて動きベクトルを導出する制御点の位置を決定する処理のフローチャートである。It is a flowchart of a process which an inter prediction parameter decoding part determines the position of the control point which derives a motion vector based on the shape of an adjacent block. 第5の実施形態のインター予測パラメータ復号部303が決定する制御点の位置の例を示す図である。It is a figure which shows the example of the position of the control point which the inter prediction parameter decoding part 303 of 5th Embodiment determines. 本実施形態に係る画像符号化装置を搭載した送信装置、および、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。It is the figure shown about the composition of the transmitting device carrying the picture coding device concerning this embodiment, and the receiving device carrying a picture decoding device. (A) shows a transmitting apparatus equipped with an image coding apparatus, and (b) shows a receiving apparatus equipped with an image decoding apparatus. 本実施形態に係る画像符号化装置を搭載した記録装置、および、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。It is the figure shown about the recording device carrying the picture coding device concerning this embodiment, and the composition of the reproduction device carrying a picture decoding device. (A) shows a recording apparatus equipped with an image coding apparatus, and (b) shows a reproduction apparatus equipped with an image decoding apparatus. 本実施形態に係る画像伝送システムの構成を示す概略図である。It is a schematic diagram showing composition of an image transmission system concerning this embodiment.

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

図40は、本実施形態に係る画像伝送システム1の構成を示す概略図である。   FIG. 40 is a schematic view showing the 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 coding an image to be coded, decodes the transmitted code, and displays the image. The image transmission system 1 is configured to include an image encoding device (moving image encoding device) 11, a network 21, an image decoding device (moving image decoding device) 31, and an image display device 41.

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

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

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

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

<演算子>
本明細書で用いる演算子を以下に記載する。
<Operator>
The operators used herein 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 a sum operation (OR) with another condition.

x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。   x? y: z is a ternary operator that takes y if x is true (other than 0) and z if 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 between a and b, and returns a if c <a, b if c> b, otherwise Is a function that returns c (where a <= b).

<符号化ストリームTeの構造>
本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of Coded Stream Te>
Prior to detailed description of the image encoding device 11 and the image decoding device 31 according to the present embodiment, the data structure of the 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 a coded stream Te. The coded stream Te illustratively includes a sequence and a plurality of pictures forming the sequence. (A) to (f) in FIG. 1 respectively represent a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, a coding slice defining the slice S, and a coding slice defining slice data. It is a figure which shows a coding tree unit contained in data, coding slice data, and a coding unit (Coding Unit; CU) contained in a coding tree unit.

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

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

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

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

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

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

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

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

スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。   As slice types that can be designated by slice type designation information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction at the time of encoding or intra prediction, (3) B-slice using uni-directional prediction, bi-directional 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)と呼ぶこともある。
(Encoding slice data)
In the encoded slice data, a set of data to which the image decoding device 31 refers in order 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 (d) of FIG. The CTU is a block of a fixed size (for example, 64 × 64) that configures a slice, and may also be referred to as a largest coding unit (LCU: Largest Coding Unit).

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

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

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

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

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

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

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

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

図2の(a)〜(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。図2の(a)は、2Nx2Nのパーティションを示し、(b)、(c)、(d)は、それぞれ、2NxN、2NxnU、および、2NxnDのパーティション(横長パーティション)を示す。(e)、(f)、(g)は、それぞれ、Nx2N、nLx2N、nRx2Nである場合のパーティション(縦長パーティション)を示し、(h)は、NxNのパーティションを示す。なお、横長パーティションと縦長パーティションを総称して長方形パーティション、2Nx2N、NxNを総称して正方形パーティションと呼ぶ。   (A) to (h) of FIG. 2 specifically illustrate the shapes of partitions (positions of boundaries of PU division) in respective PU division modes. (A) of FIG. 2 shows a 2Nx2N partition, and (b), (c) and (d) show 2NxN, 2NxnU, and 2NxnD partitions (horizontally long partitions), respectively. (E), (f) and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N and nRx2N, respectively, and (h) shows a partition of NxN. Note that the horizontally long partition and the vertically long partition are collectively referred to as a rectangular partition, and 2Nx2N and NxN are collectively referred to as a square partition.

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

変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。   Partitions in the transform tree may be allocated as a transform unit a region of the same size as the encoding unit, or may be based on recursive quadtree partitioning as in the case of CU partitioning described above.

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

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

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

(参照ピクチャリスト)
参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図3は、参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。図3(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図3(b)に、参照ピクチャリストの例を示す。参照ピクチャリストは、参照ピクチャの候補を表すリストであり、1つのピクチャ(スライス)が1つ以上の参照ピクチャリストを有してもよい。図の例では、対象ピクチャB3は、L0リストRefPicList0およびL1リストRefPicList1の2つの参照ピクチャリストを持つ。対象ピクチャがB3の場合の参照ピクチャは、I0、P1、B2であり、参照ピクチャはこれらのピクチャを要素として持つ。個々の予測ユニットでは、参照ピクチャリストRefPicListX中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図では、refIdxL0およびrefIdxL1により参照ピクチャP1とB2が参照される例を示す。
(Reference picture list)
The reference picture list is a list of reference pictures stored in the reference picture memory 306. FIG. 3 is a conceptual diagram showing an example of a reference picture and a reference picture list. In FIG. 3A, the rectangle is a picture, the arrow is a reference of the picture, the horizontal axis is time, and I, P and B in the rectangle are intra pictures, uni-predicted pictures, bi-predicted pictures, and numbers in the rectangle are decoded. Show 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, B1, P1. FIG. 3B 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 example of the figure, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. Reference pictures when the target picture is B3 are I0, P1, and B2, and the reference pictures have these pictures as elements. In each prediction unit, which picture in the reference picture list RefPicListX is actually referred to is designated 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 forecast and AMVP forecast)
The prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode. The merge flag merge_flag is a flag for identifying these. The merge prediction mode is a mode used to be derived from the prediction parameter of the already processed neighboring PU without including the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX in the encoded data. The AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data. The motion vector mvLX is encoded as a prediction vector index mvp_LX_idx that identifies 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 the number of reference pictures, and takes any one of PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate that reference pictures managed by reference pictures in the L0 list and the L1 list are used, respectively, and indicate that one reference picture is used (uniprediction). PRED_BI indicates using two reference pictures (bi-prediction BiPred), and uses reference pictures managed by the L0 list and the L1 list. The predicted vector index mvp_LX_idx is an index indicating a predicted vector, and the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list. LX is a description method used when L0 prediction and L1 prediction are not distinguished, and parameters for L0 list and parameters for 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, of prediction parameter candidates (merge candidates) derived from the PU for which processing has been completed, any prediction parameter is used as a prediction parameter of a target PU (target block) to be decoded.

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

(インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
インター予測識別子inter_pred_idcと、予測リスト利用フラグpredFlagL0、predFlagL1の関係は以下のとおりであり、相互に変換可能である。
(Inter prediction identifier inter_pred_idc and prediction list usage flag predFlagLX)
The relationship between the inter prediction identifier inter_pred_idc, and the prediction list use flag predFlagL0, 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
The inter prediction parameter may use a prediction list use flag or may use an inter prediction identifier. Further, the determination using the prediction list use flag may be replaced with the determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with the determination using the prediction list utilization flag.

(双予測biPredの判定)
双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
(Judgment of bi-prediction biPred)
The flag biPred of bi-prediction BiPred can be derived depending 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)
For example, a value of 3 can be used as PRED_BI.

(PUアフィン適用フラグ、PUアフィンモードフラグ)
PUアフィン適用フラグpu_affine_enable_flagは、アフィン予測を適用するか否かを示すフラグである。PUアフィンモードフラグpu_affine_mode_flag(単に、アフィンモードとも呼ぶ)は、4パラメータアフィンを適用するか、6パラメータアフィンを適用するかを示すフラグである。
(PU affine application flag, PU affine mode flag)
The PU affine application flag pu_affine_enable_flag is a flag indicating whether to apply affine prediction. The PU affine mode flag pu_affine_mode_flag (also simply referred to as affine mode) is a flag indicating whether to apply a four-parameter affine or a six-parameter affine.

(画像復号装置の構成)
次に、本実施形態に係る画像復号装置31(動画像復号装置)の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆DCT部311、及び加算部312を含んで構成される。
(Configuration of image decoding apparatus)
Next, the configuration of the image decoding device 31 (moving image decoding device) according to the present embodiment will be described. FIG. 5 is a schematic view showing the 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 an inverse A quantization / inverse DCT unit 311 and an addition unit 312 are included.

また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309(予測画像生成部)及びイントラ予測画像生成部310を含んで構成される。   Further, the prediction parameter decoding unit 302 is configured to include 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 (prediction image generation unit) 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 to separate and decode individual codes (syntax elements). The separated codes include prediction information for generating a prediction image and residual information for generating a difference image.

エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化係数を逆量子化・逆DCT部311に出力する。この量子化係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)を行い量子化して得られる係数である。   The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 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, difference vector mvdLX. Control of which code to decode is performed based on an instruction of the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311. The quantization coefficient is a coefficient obtained by performing DCT (Discrete Cosine Transform, discrete cosine transformation) on the residual signal in the encoding process and quantizing the coefficient.

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

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

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

ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。   The loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), or 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 in a predetermined position for each picture and CU to be decoded.

予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。   The prediction parameter memory 307 stores prediction parameters in a predetermined position 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 inter prediction parameters to be stored 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 image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301, and also receives a prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads the reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a PU prediction image using the input prediction parameters and the read reference picture in the prediction mode indicated by the prediction mode predMode.

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

インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。   The inter-predicted image generation unit 309 sets the motion vector mvLX based on the target PU from the reference picture indicated by the reference picture index refIdxLX with respect to the reference picture list (L0 list or L1 list) in which the prediction list use flag predFlagLX is 1. Is read out 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 PU to the addition unit 312.

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

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

イントラ予測パラメータ復号部304において、輝度と色差で異なるイントラ予測モードを導出する場合、イントラ予測画像生成部310は、輝度予測モードIntraPredModeYに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2〜34)の何れかによって輝度のPUの予測画像を生成し、色差予測モードIntraPredModeCに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2〜34)、LMモード(35)の何れかによって色差のPUの予測画像を生成する。   When the intra prediction parameter decoding unit 304 derives an intra prediction mode different in luminance and color difference, the intra prediction image generation unit 310 determines planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredMode Y. The prediction image of PU of luminance is generated by any of prediction (2 to 34), and planar prediction (0), DC prediction (1), direction prediction (2 to 34), LM mode according to the color difference prediction mode IntraPredModeC The prediction image of color difference PU is generated by any of (35).

逆量子化・逆DCT部311は、エントロピー復号部301から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部311は、求めたDCT係数について逆DCT(Inverse Discrete Cosine Transform、逆離散コサイン変換)を行い、残差信号を算出する。逆量子化・逆DCT部311は、算出した残差信号を加算部312に出力する。   The inverse quantization / inverse DCT unit 311 inversely quantizes the quantization coefficient input from the entropy decoding unit 301 to obtain a DCT coefficient. The inverse quantization / inverse DCT unit 311 performs inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficient to calculate a residual signal. The inverse quantization / inverse DCT unit 311 outputs the calculated residual signal to the addition unit 312.

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

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

図12は、本実施形態に係るインター予測パラメータ復号部303の構成を示す概略図である。インター予測パラメータ復号部303は、インター予測パラメータ復号制御部3031、AMVP予測パラメータ導出部3032(アフィン動きベクトル導出部、アフィン動きベクトル導出装置)、加算部3035、マージ予測パラメータ導出部3036およびサブブロック予測パラメータ導出部3037を含んで構成される。   FIG. 12 is a schematic diagram showing a configuration of the inter prediction parameter decoding unit 303 according to the present embodiment. The inter prediction parameter decoding unit 303 includes an inter prediction parameter decoding control unit 3031, an AMVP prediction parameter derivation unit 3032 (affine motion vector derivation unit, affine motion vector derivation device), an addition unit 3035, a merge prediction parameter derivation unit 3036, and subblock prediction The configuration includes a parameter derivation unit 3037.

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

インター予測パラメータ復号制御部3031は、まず、マージフラグmerge_flagを抽出する。インター予測パラメータ復号制御部3031が、あるシンタックス要素を抽出すると表現する場合は、あるシンタックス要素の復号をエントロピー復号部301に指示し、該当のシンタックス要素を符号化データから読み出すことを意味する。   The inter prediction parameter decoding control unit 3031 first extracts the merge flag merge_flag. When the inter prediction parameter decoding control unit 3031 expresses that a syntax element is to be extracted, it instructs the entropy decoding unit 301 to decode a syntax element, which means that the corresponding syntax element is read out from the encoded data. 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を加算部3035に出力する。加算部3035では、予測ベクトルmvpLXと差分ベクトルmvdLXを加算し、動きベクトルを導出する。   If the merge flag merge_flag is 0, that is, indicates the AMVP prediction mode, the inter prediction parameter decoding control unit 3031 extracts an AMVP prediction parameter from the encoded data using the entropy decoding unit 301. As the AMVP prediction parameters, for example, there are inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX. The AMVP prediction parameter derivation unit 3032 derives a prediction vector mvpLX from the prediction vector index mvp_LX_idx. Details will be described later. The inter prediction parameter decoding control unit 3031 outputs the difference vector mvdLX to the addition unit 3035. The adding unit 3035 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 indicates 1, that is, indicates a 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 derivation 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 in units of sub-blocks. That is, in the sub-block prediction mode, a prediction block is predicted in small blocks of 4x4 or 8x8. In a method of dividing a CU into a plurality of partitions (PUs such as 2NxN, Nx2N, NxN, etc.) and encoding syntax of prediction parameters in units of partitions in the image coding device 11 described later, sub block prediction mode In the above, a plurality of sub-blocks are grouped into a set, and the syntax of the prediction parameter is encoded for each set, so that 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 derivation unit 3037 performs sub-block prediction in the sub-block prediction mode. The space-time sub-block prediction unit 30371, affine prediction unit 30372 (affine motion vector derivation unit, affine motion vector derivation device , And a matching prediction unit 30373.

(サブブロック予測モードフラグ)
ここで、画像復号装置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 the 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 derive the sub-block prediction mode flag subPbMotionFlag based on which one of a spatial sub-block prediction SSUB, a temporal sub-block prediction TSUB, an affine prediction AFFINE, and a matching prediction MAT is used. Do. For example, when the prediction mode selected by a certain PU is N (for example, N is a label indicating a 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 (same below).

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

subPbMotionFlag = (N == SSUB)|| (N == AFFINE)
なお、画像復号装置31、画像符号化装置11は、アフィン適用フラグpu_affine_enable_flagを符号化データから復号し、アフィン適用フラグpu_affine_enable_flagが1の場合に、subPbMotionFlagを1と導出しても構わない。この場合、上記アフィン適用フラグpu_affine_enable_flagが1の場合に、アフィン予測部30372を適用してもよい。
subPbMotionFlag = (N == SSUB) || (N = = AFFINE)
Note that the image decoding device 31 and the image encoding device 11 may decode the affine application flag pu_affine_enable_flag from the encoded data, and when the affine application flag pu_affine_enable_flag is 1, the subPbMotionFlag may be derived as 1. In this case, when the affine application flag pu_affine_enable_flag is 1, the affine prediction unit 30372 may be applied.

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

(時空間サブブロック予測部30371)
時空間サブブロック予測部30371は、時間的に対象PUに隣接する参照画像上(たとえば直前のピクチャ)のPUの動きベクトル、もしくは、空間的に対象PUに隣接するPUの動きベクトルから、対象PUを分割して得られるサブブロックの動きベクトルを導出する。具体的には、参照画像上のPUの動きベクトルを対象PUが参照する参照ピクチャに合わせてスケーリングすることにより、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yj] (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はサブブロックのサイズである。
(Space-time sub-block prediction unit 30371)
The spatio-temporal sub-block prediction unit 30371 uses the motion vector of the PU on the reference image (for example, the immediately preceding picture) temporally adjacent to the target PU or the motion vector of the PU spatially adjacent to the target PU To derive the motion vector of the subblock obtained by dividing. Specifically, by scaling the motion vector of the PU on the reference image to the reference picture to which the target PU refers, the motion vector spMvLX [xi] [yj] (xi = xPb) of each subblock in the target PU + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ..., nPbH / nSbH-1) Derive (time 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 subblocks.

また、対象PUに隣接するPUの動きベクトルと、対象PUを分割して得られるサブブロックとの距離に応じて、加重平均を計算することで、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yj] (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 [of each sub-block in the target PU is calculated. xi] [yj] (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 (space sub-block prediction).

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

(アフィン予測部)
アフィン予測部30372は、対象PUのアフィン予測パラメータを導出する。本実施形態では、アフィン予測パラメータとして、対象PUの2つもしくは3つの制御点の動きベクトルを導出する。例えば、3つの制御点(V0、V1、V2)の場合、動きベクトル(MV0_x, MV0_y)(MV1_x, MV1_y)(MV2_x, MV2_y)を導出する。
(Affine Prediction Unit)
The affine prediction unit 30372 derives affine prediction parameters of the target PU. In this embodiment, motion vectors of two or three control points of the target PU are derived as affine prediction parameters. For example, in the case of three control points (V0, V1, V2), motion vectors (MV0_x, MV0_y) (MV1_x, MV1_y) (MV2_x, MV2_y) are derived.

具体的には、対象PUの隣接PUの動きベクトルから予測することにより、各制御点の動きベクトルを導出してもよいし、制御点の予測ベクトルmvpLXと符号化データから導出される差分ベクトルmvdLXとの和により、各制御点の動きベクトルを導出してもよい。   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 difference vector mvdLX derived from the prediction vector mvpLX of the control point and the coded data The motion vector of each control point may be derived by the sum of

図13は、対象PU(nPbW×nPbH)を構成する各サブブロック(xi, yj)の動きベクトルspMvLXを、制御点V0の動きベクトル(MV0_x, MV0_y)およびV1の動きベクトル(MV1_x, MV1_y)から導出する例を示す図である。各サブブロックの動きベクトルspMvLXは、図13に示すように、各サブブロックの中心に位置する点毎の動きベクトルとして導出する。   FIG. 13 shows the motion vector spMvLX of each sub block (xi, yj) constituting the target PU (nPbW × nPbH) from the motion vector (MV0_x, MV0_y) of the control point V0 and the motion vector (MV1_x, MV1_y) of V1. It is a figure which shows the example to derive | lead-out. 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, as shown in FIG.

アフィン予測部30372は対象PUのアフィン予測パラメータに基づいて、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yj] (xi = xPb + nSbW * i, yj = yPb + nSbH* j, i=0, 1, 2,・・・,nPbW / nSbW - 1、j=0, 1, 2,・・・,nPbH / nSbH - 1)を下記の式を用いて、導出する。   The affine prediction unit 30372 calculates the motion vector spMvLX [xi] [yj] of each subblock in the target PU based on the affine prediction parameter of 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) are derived using the following equation.

spMvLX[xi][yj][0]=MV0_x + (MV1_x - MV0_x) / nPbW * (xi + nSbW/2) - (MV1_y - MV0_y) / nPbH * (yj + nSbH/2)
spMvLX[xi][yj][1]=MV0_y + (MV1_y - MV0_y) / nPbW * (xi + nSbW/2) + (MV1_x - MV0_x) / nPbH * (yj + nSbH/2)
ここで、xPb, yPbは、対象PUの左上座標、nPbW, nPbHは、対象PUの幅と高さ、nSbW, nSbHはサブブロックの幅と高さである。
spMvLX [xi] [yj] [0] = MV0_x + (MV1_x-MV0_x) / nPbW * (xi + nSbW / 2)-(MV1_y-MV0_y) / nPbH * (yj + nSbH / 2)
spMvLX [xi] [yj] [1] = MV0_y + (MV1_y-MV0_y) / nPbW * (xi + nSbW / 2) + (MV1_x-MV0_x) / nPbH * (yj + nSbH / 2)
Here, xPb and yPb are the upper left coordinates of the target PU, nPbW and nPbH are the width and height of the target PU, and nSbW and nSbH are the width and height of the subblock.

(処理の流れ)
以下、さらに具体的な実施構成の例として、アフィン予測部30372またはAMVP予測パラメータ導出部3032がアフィン予測を用いて、各サブブロックの動きベクトルmvLXを導出する処理の流れを、ステップに分けて説明する。アフィン予測部30372またはAMVP予測パラメータ導出部3032がアフィン予測を用いて、サブブロックの動きベクトルmvLXを導出する処理は、下記の(STEP1)〜(STEP4)の4つの工程を含んでいる。
(Flow of processing)
Hereinafter, as an example of a more specific implementation configuration, the flow of processing in which the affine prediction unit 30372 or the AMVP prediction parameter derivation unit 3032 derives the motion vector mvLX of each sub block using affine prediction is divided into steps and described Do. The process in which the affine prediction unit 30372 or the AMVP prediction parameter derivation unit 3032 derives the motion vector mvLX of the sub block using affine prediction includes the following four steps (STEP 1) to (STEP 4).

(STEP1)制御点ベクトルの導出
アフィン予測部30372またはAMVP予測パラメータ導出部3032が、候補を導出するためのアフィン予測に用いる2つ以上の制御点として、対象ブロックの代表点(ここではV0およびV1)のそれぞれの動きベクトルを導出する工程である。なお、ブロックの代表点は、対象ブロック上の点、もしくは、対象ブロックの近傍の点を用いる。本明細書では、アフィン予測の制御点に用いるブロックの代表点を「ブロック制御点」と記載する。ブロックの代表点でないアフィン予測の制御点は、「参照制御点」と表現し、区別することがある。
(STEP 1) Derivation of Control Point Vector As the two or more control points used by the affine prediction unit 30372 or the AMVP prediction parameter derivation unit 3032 for affine prediction for deriving a candidate, representative points of the target block (here, V0 and V1) ) Is a step of deriving each motion vector. The representative point of the block is a point on the target block or a point near the target block. In this specification, a representative point of a block used as a control point of affine prediction is referred to as a "block control point". Control points of affine prediction that are not representative points of blocks are sometimes referred to as “reference control points” and may be distinguished.

(STEP2)サブブロックベクトルの導出
アフィン予測部30372またはAMVP予測パラメータ導出部3032が、STEP1で導出された対象ブロックの代表点であるブロック制御点(制御点V0およびV1)の動きベクトルから対象ブロックに含まれる各サブブロックの動きベクトルを導出する工程である。(STEP1)と(STEP2)によって、各サブブロックの動きベクトルmvLXが導出される。
(STEP 2) Derivation of Sub-Block Vector From the motion vector of the block control point (control point V0 and V1), which is a representative point of the target block derived in STEP 1, the affine prediction unit 30372 or the AMVP prediction parameter derivation unit 3032 It is a process of deriving a motion vector of each included sub block. The motion vector mvLX of each sub block is derived by (STEP 1) and (STEP 2).

(STEP3)サブブロック動き補償
動き補償部3091が、インター予測パラメータ復号部303から入力された、予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXに基づいて、参照ピクチャメモリ306から、参照ピクチャインデックスrefIdxLXで指定された参照ピクチャ上の、対象ブロックの位置を起点として、動きベクトルmvLXだけずれた位置にあるブロックを読み出しフィルタリングすることによって動き補償画像predSamplesLXを生成するサブブロック単位の動き補償を行う工程である。
(STEP 3) Sub-block motion compensation Based on the prediction list use flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX input from the inter prediction parameter decoding unit 303, the motion compensation unit 3091 generates a reference picture from the reference picture memory 306 Motion compensation is performed on a subblock basis to generate a motion compensated image predSamplesLX by reading and filtering a block located at a position shifted by the motion vector mvLX from the position of the target block on the reference picture specified by the index refIdxLX It is a process.

(STEP4)サブブロックの動きベクトルの格納
AMVPモードの場合は、上記の(STEP2)においてAMVP予測パラメータ導出部3032によって導出された、各サブブロックの動きベクトルmvLXは予測パラメータメモリ307に格納される。同様に、マージモードの場合も、上記の(STEP2)においてアフィン予測部30372によって導出された、各サブブロックの動きベクトルmvLXは予測パラメータメモリ307に格納される。
(STEP 4) Storage of motion vector of sub block In the case of the AMVP mode, the motion vector mvLX of each sub block derived by the AMVP prediction parameter deriving unit 3032 in the above (STEP 2) is stored in the prediction parameter memory 307. Similarly, also in the merge mode, the motion vector mvLX of each sub block derived by the affine prediction unit 30372 in (STEP 2) above is stored in the prediction parameter memory 307.

なお、アフィン予測を用いたサブブロックの動きベクトルmvLXの導出は、AMVPモードおよびマージモードの双方において実施することが可能である。以下では、(STEP1)〜(STEP4)のうちのいくつかの処理について、AMVPモードの場合およびマージモードの場合についてそれぞれ説明する。   Derivation of the sub-block motion vector mvLX using affine prediction can be performed in both the AMVP mode and the merge mode. Hereinafter, some processes of (STEP 1) to (STEP 4) will be described in the case of the AMVP mode and the case of the merge mode, respectively.

(STEP1詳細)
まず、(STEP1)の処理について、AMVPモードおよびマージモードについて、図15を用いてそれぞれ以下に説明する。図15は、AMVPモードおよびマージモードにおける制御点の動きベクトルの導出のために利用される予測ユニットの位置の例を示す図である。
(STEP 1 details)
First, regarding the process of (STEP 1), the AMVP mode and the merge mode will be respectively described below with reference to FIG. FIG. 15 is a diagram showing an example of the position of a prediction unit used for deriving motion vectors of control points in the AMVP mode and the merge mode.

(AMVPモードにおける制御点の動きベクトルの導出)
AMVP予測パラメータ導出部3032は、参照ピクチャインデックスrefIdxに基づいて予測パラメータメモリ307が記憶する動きベクトルからベクトル候補mvpLXを導出する。そして、AMVP予測パラメータ導出部3032は、読み出された動きベクトルを参照して、対象ブロックの代表点(ここでは点V0、点V1および点V2)の動きベクトルを予測(導出)する。
(Derivation of motion vector of control point in AMVP mode)
The AMVP prediction parameter derivation unit 3032 derives the vector candidate mvpLX from the motion vector stored in the prediction parameter memory 307 based on the reference picture index refIdx. Then, the AMVP prediction parameter derivation unit 3032 predicts (deduces) a motion vector of a representative point of the target block (here, the point V0, the point V1, and the point V2) with reference to the read motion vector.

AMVPモードでは、インター予測パラメータ復号制御部3031が、エントロピー復号部301を用いて符号化データからAMVP予測パラメータを抽出する。このAMVP予測パラメータは、代表点(点V0、点V1および点V2)の予測ベクトルmvpLXを補正するための、別に符号化された差分ベクトルmvdLXを含んでいる。   In the AMVP mode, the inter prediction parameter decoding control unit 3031 extracts AMVP prediction parameters from the coded data using the entropy decoding unit 301. This AMVP prediction parameter includes separately encoded difference vector mvdLX for correcting the prediction vector mvpLX of the representative points (point V0, point V1 and point V2).

AMVP予測パラメータ導出部3032は、図15の(a)に示すように、代表点の一つ(ここでは点V0)に隣接し、対象ブロックと当該代表点(頂点)を共有するブロックA、B、およびC(参照ブロック)の動きベクトルのうちのいずれかを、予測パラメータメモリ307から参照して、代表点の予測ベクトルmvpLXを導出する。さらに、導出された予測ベクトルmvpLXに符号化データから復号された代表点の差分ベクトルmvdLXを加算して、制御点V0の動きベクトルmvLXを導出する。なお、AMVP予測パラメータ導出部3032は、符号化データからインデックスmvp_LX_idxを復号して、ブロックA、B、およびCの動きベクトルのうちのいずれを予測ベクトルとして参照するかを決定してもよい。   As shown in (a) of FIG. 15, the AMVP prediction parameter derivation unit 3032 is adjacent to one of the representative points (here, the point V0), and blocks A and B that share the representative point (apex) with the target block. And a motion vector of C (reference block) are referred to from the prediction parameter memory 307 to derive a prediction vector mvpLX of a representative point. Furthermore, the difference vector mvdLX of the representative point decoded from the encoded data is added to the derived predicted vector mvpLX to derive the motion vector mvLX of the control point V0. Note that the AMVP prediction parameter derivation unit 3032 may decode the index mvp_LX_idx from the encoded data to determine which one of the motion vectors of the blocks A, B, and C to refer to as a prediction vector.

同様に、図15の(a)に示すように、AMVP予測パラメータ導出部3032は、点V0とは別の代表点(ここでは点V1)に隣接し、対象ブロックと当該代表点(頂点)を共有するブロックDおよびE(参照ブロック)の動きベクトルのうちのいずれかを、予測パラメータメモリ307から参照して、代表点V1の予測ベクトルmvpLXを導出する。さらに、導出された予測ベクトルmvpLXに符号化データから復号された代表点V1の差分ベクトルmvdLXを加算して、制御点V1の動きベクトルmvLXを導出する。なお、AMVP予測パラメータ導出部3032は、符号化データからインデックスmvp_LX_idxを復号して、ブロックDおよびEの動きベクトルのうちのいずれを予測ベクトルとして参照するかを決定してもよい。   Similarly, as shown in (a) of FIG. 15, the AMVP prediction parameter derivation unit 3032 is adjacent to the representative point (here, point V1) different from the point V0, and the target block and the representative point (vertex) The prediction vector mvpLX of the representative point V1 is derived with reference to any one of the motion vectors of the blocks D and E (reference blocks) to be shared from the prediction parameter memory 307. Furthermore, the motion vector mvLX of the control point V1 is derived by adding the difference vector mvdLX of the representative point V1 decoded from the encoded data to the derived predicted vector mvpLX. Note that the AMVP prediction parameter derivation unit 3032 may decode the index mvp_LX_idx from the encoded data and determine which of the motion vectors of the blocks D and E to refer to as a prediction vector.

同様に、図15の(b)に示すように、AMVP予測パラメータ導出部3032は、点V0およびV1とは別の代表点(ここでは点V2)に隣接し、対象ブロックと当該代表点(頂点)を共有するブロックFおよびG(参照ブロック)の動きベクトルのうちのいずれかを、予測パラメータメモリ307から参照して、代表点V2の予測ベクトルmvpLXを導出する。さらに、AMVP予測パラメータ導出部3032は、導出された予測ベクトルmvpLXに符号化データから復号された代表点V2の差分ベクトルmvdLXを加算して、制御点V2の動きベクトルmvLXを導出する。なお、AMVP予測パラメータ導出部3032は、符号化データからインデックスmvp_LX_idxを復号して、ブロックFおよびGの動きベクトルのうちのいずれを予測ベクトルとして参照するかを決定してもよい。   Similarly, as shown in (b) of FIG. 15, the AMVP prediction parameter derivation unit 3032 is adjacent to a representative point (here, point V2) different from the points V0 and V1, and the target block and the representative point (vertex ) Is referred to from the prediction parameter memory 307 to derive a prediction vector mvpLX of the representative point V2. Furthermore, the AMVP prediction parameter derivation unit 3032 derives the motion vector mvLX of the control point V2 by adding the difference vector mvdLX of the representative point V2 decoded from the encoded data to the derived prediction vector mvpLX. Note that the AMVP prediction parameter derivation unit 3032 may decode the index mvp_LX_idx from the encoded data to determine which one of the motion vectors of the blocks F and G is to be referred to as a prediction vector.

より具体的には、AMVP予測パラメータ導出部3032は、制御点VN(N=0..2)の予測ベクトル候補を導出し、予測ベクトル候補リストmvpListVNLX[]に格納する。さらに、AMVP予測パラメータ導出部3032は、符号化データから点VNの予測ベクトルインデックスmvpVN_LX_idx、差分ベクトルmvdVNLXから、制御点VNの動きベクトル(MVi_x, MVi_y)を以下の式で導出する。   More specifically, the AMVP prediction parameter derivation unit 3032 derives prediction vector candidates for the control point VN (N = 0.2), and stores the prediction vector candidate list in the prediction vector candidate list mvpList VNLX []. Further, the AMVP prediction parameter derivation unit 3032 derives the motion vector (MVi_x, MVi_y) of the control point VN from the encoded data using the prediction vector index mvpVN_LX_idx of the point VN and the difference vector mvdVNLX according to the following equation.

MVi_x = mvLX[0] = mvpListVNLX[mvpVN_LX_idx][0] + mvdVNLX[0]
MVi_y = mvLX[1] = mvpListVNLX[mvpVN_LX_idx][1] + mvdVNLX[1]
なお、STEP1における制御点の位置は、上記に限定されない。対象ブロックの右下の頂点、または後述するように対象ブロックの周囲の点を用いても良い。
MVi_x = mvLX [0] = mvpList VNLX [mvp VN_LX_idx] [0] + mvd VNLX [0]
MVi_y = mvLX [1] = mvpList VNLX [mvp VN_LX_idx] [1] + mvd VNLX [1]
The position of the control point in STEP 1 is not limited to the above. A lower right vertex of the target block or a point around the target block may be used as described later.

後述するように、4パラメータアフィンと6パラメータアフィンを切り替える構成においては、AMVP予測パラメータ導出部3032は、4パラメータアフィンの場合には、2点、例えば、点V0およびV1の差分ベクトルを符号化データから復号し、2点の制御点の動きベクトルを導出する。6パラメータアフィンの場合には、3点、例えば、点V0、V1、およびV2の差分ベクトルを符号化データから復号し、3点の制御点の動きベクトルを導出する。なお、4パラメータアフィンの場合に導出する制御点は点V0、V1に限定されず、点V0、V2や、点V1、V2や、点V0、V2でも良いし、他の2点でもよい。なお、6パラメータアフィンの場合にも、導出する制御点は点V0、V1、V2に限定されない。   As will be described later, in the configuration in which 4 parameter affine and 6 parameter affine are switched, AMVP prediction parameter derivation unit 3032 encodes difference vectors of two points, for example, points V0 and V1 in the case of 4 parameters affine. Decode from to derive motion vectors of two control points. In the case of six-parameter affine, difference vectors of three points, for example, points V0, V1, and V2 are decoded from the encoded data to derive motion vectors of three control points. The control points derived in the case of the four-parameter affine are not limited to the points V0 and V1, but may be the points V0 and V2, the points V1 and V2, the points V0 and V2, or two other points. Also in the case of six-parameter affine, the control points to be derived are not limited to the points V0, V1, and V2.

(アフィン予測の一般式)
4パラメータのアフィンの一般式を以下に説明する。位置(0, 0)、動きベクトルmv_x,my_yの点V0を起点とする位置(xi, yi)の点Viの動きベクトル(MVi_x, MVi_y)は、4つのパラメータ(mv_x, mv_y, ev, rv)、すなわち、拡大及び回転中心の動きベクトル(並進ベクトルmv_x, mv_y)と拡大パラメータev、回転パラメータrvを用いて、以下の一般式(eq1)によって求められ得る。
(General formula of affine prediction)
The general formula of the four-parameter affine is described below. The motion vector (MVi_x, MVi_y) of the point Vi at the position (xi, yi) starting from the point V0 of the motion vector mv_x, my_y at the position (0, 0) has four parameters (mv_x, mv_y, ev, rv) That is, using the motion vector of the enlargement and rotation center (translation vector mv_x, mv_y), the enlargement parameter ev, and the rotation parameter rv, it can be obtained by the following general equation (eq1).

MVi_x=mv_x + ev * xi - rv * yi
MVi_y=mv_y + rv * xi + ev * yi (eq1)
なお、(xi, yi)=(0, 0)の点の動きベクトル(MV0_x、MV0_y)と(xi, yi)= (xk, yk)の点の動きベクトル(MVk_x、MVk_y)を上記に代入し、(ev、rv)について解くと以下の式が得られる。
MVi_x = mv_x + ev * xi-rv * yi
MVi_y = mv_y + rv * xi + ev * yi (eq1)
Note that the motion vectors (MV0_x, MV0_y) of the points of (xi, yi) = (0, 0) and the motion vectors (MVk_x, MVk_y) of the points of (xi, yi) = (xk, yk) are substituted into the above. When solving for (ev, rv), the following equation is obtained.

ev = {xk * (MVk_x - MV0_x) + yk * (MVk_y - MV0_y)} / (pow(xk,2) + pow(yk,2))
rv = {-yk * (MVk_x - MV0_x) + xk * (MVk_y - MV0_y)} / (pow(xk,2) + pow(yk,2))
なお、pow(x,2)はxの2乗を示す。
ev = {xk * (MVk_x-MV0_x) + yk * (MVk_y-MV0_y)} / (pow (xk, 2) + pow (yk, 2))
rv = {-yk * (MVk_x-MV0_x) + xk * (MVk_y-MV0_y)} / (pow (xk, 2) + pow (yk, 2))
Note that pow (x, 2) represents the square of x.

続いて6パラメータのアフィンの一般式を以下に説明する。位置(0, 0)、動きベクトルmv_x,my_yの点V0を起点とする位置(xi, yi)の点Viの動きベクトル(MVi_x, MVi_y)は、4つのパラメータ(mv_x, mv_y, ev1, rv1, ev2, rv2)を用いて、以下の一般式(eq2)によって求められ得る。   Subsequently, the general formula of the six-parameter affine will be described below. The motion vector (MVi_x, MVi_y) of the point Vi at the position (xi, yi) starting from the point V0 of the position (0, 0), motion vector mv_x, my_y has four parameters (mv_x, mv_y, ev1, rv1, It can be determined by the following general formula (eq2) using ev2, rv2).

MVi_x=mv_x + ev1 * xi + rv2 * yi
MVi_y=mv_y + rv1 * xi + ev2 * yi (eq2)
(マージモードにおける制御点の動きベクトルの導出)
アフィン予測部30372は、図15の(c)に示すような、ブロックA〜Eを含む予測ユニットについて、予測パラメータメモリ307を参照し、アフィン予測が利用されているか否かを確認する。アフィン予測が利用されている予測ユニットとして最初に見つかった予測ユニット(ここでは図15(c)の参照ブロックA)を隣接ブロック(マージ参照ブロック)として選択し、動きベクトルを導出する。なお隣接ブロックは必ずしも対象PUと直接、接している必要はない(共通する辺がある必要はない)。例えば、対象PUの右上の点や左上の点、右下の点のように、対象PUと点を共通するブロックなども隣接ブロックとすることができる。また、対象PUに十分に近い近傍ブロックを隣接ブロックとして用いることもできる。これは、後述する第2〜第5の実施形態においても同様である。
MVi_x = mv_x + ev1 * xi + rv2 * yi
MVi_y = mv_y + rv1 * xi + ev2 * yi (eq2)
(Derivation of control point motion vector in merge mode)
For a prediction unit including blocks A to E as shown in (c) of FIG. 15, the affine prediction unit 30372 refers to the prediction parameter memory 307 and confirms whether affine prediction is used. A prediction unit (here, reference block A in FIG. 15C) which is first found as a prediction unit in which affine prediction is used is selected as an adjacent block (merge reference block) to derive a motion vector. The adjacent block does not have to be in direct contact with the target PU (there is no need to have a common side). For example, a block that shares a point with the target PU, such as the upper right point or the upper left point of the target PU, or the lower right point, can also be an adjacent block. Also, neighboring blocks sufficiently close to the target PU can be used as neighboring blocks. The same applies to the second to fifth embodiments described later.

アフィン予測部30372は、アフィン予測が利用されている、選択された隣接ブロックの左上の角の点(図15の(d)の点v0)、右上の角の点(図15の(d)の点v1)、および左下の角の点(図15の(d)の点v2)、および右下の各の点v3のうちの2点または3点から制御点の動きベクトルを導出する。4パラメータアフィンの場合には一例では、V0(第1の制御点)、V1(第2の制御点)の動きベクトルを導出する。また、6パラメータアフィンの場合には、V0、V1、V2(第3の制御点)の動きベクトルを導出する。なお、図15の(d)に示す例では、動きベクトルを予測する対象であるブロックの横幅はW、高さはHであり、隣接ブロック(図の例では、ブロックAを含む隣接ブロック)の横幅はw、高さはhである。   The affine prediction unit 30372 uses affine prediction and is located at the upper left corner point (point v0 of (d) of FIG. 15) and the upper right corner point ((d) of FIG. 15) of the selected adjacent block. The motion vector of the control point is derived from the point v1), and the lower left corner point (point v2 in (d) of FIG. 15) and the lower right point v3 from each of two or three points. In the case of the four-parameter affine, in one example, motion vectors of V0 (first control point) and V1 (second control point) are derived. Also, in the case of a six-parameter affine, motion vectors of V0, V1, and V2 (third control points) are derived. In the example shown in (d) of FIG. 15, the width of the block for which the motion vector is to be predicted is W and the height is H, and the adjacent block (the adjacent block including the block A in the illustrated example) The width is w and the height is h.

4パラメータアフィンにおいては、以下の式で、制御点VN(N=0..1)の動きベクトル(MVN_x, MVN_y)を導出する。   In the 4-parameter affine, the motion vector (MVN_x, MVN_y) of the control point VN (N = 0.1) is derived by the following equation.

MVN_x = mv_x + ev * xN - rv * yN
MVN_y = mv_y + rv * xN + ev * yN
ここで(ev, rv)はアフィンパラメータ、(xN、yN)は制御点VNのある参照点(例えばv0)からみた相対位置である。mv_x, mv_yは並進ベクトルであり、例えば、点v0の動きベクトル(mv0_x、mv0_y)である。なお並進ベクトルは(mv0_x、mv0_y)に限定されず、点v1、点v2、点v3の動きベクトル(mv1_x、mv1_y)、(mv2_x、mv2_y)、(mv3_x、mv3_y)を用いてもよい。
MVN_x = mv_x + ev * xN-rv * yN
MVN_y = mv_y + rv * xN + ev * yN
Here, (ev, rv) is an affine parameter, and (xN, yN) is a relative position viewed from a reference point (for example, v0) of the control point VN. mv_x and mv_y are translation vectors, for example, a motion vector (mv0_x, mv0_y) of a point v0. The translation vector is not limited to (mv0_x, mv0_y), and motion vectors (mv1_x, mv1_y), (mv2_x, mv2_y), (mv3_x, mv3_y) of points v1, v2, and v3 may be used.

なお、点v0を起点とした点Viの相対位置は下記のように導出される。まず点v0の位置が(xRef, yRef)、点Viの位置が(xPi, yPi)の場合には、点v0を起点とする点Viの相対位置(xi, yi)は、点Viの位置から起点v0との位置の差から、
xi = xPi - xRef
yi = yPi - yRef
となる。上記の例では、点v0の位置が(xP - w, yP + H - h)、点V0、V1、V2の位置が各々、(xP, yP), (xP + W, yP), (xP, yP + H)であるため、点v0を起点とする点Viの相対位置(xi, yi)(ここでi = 0..2)は、以下のように導出される。
The relative position of the point Vi starting from the point v0 is derived as follows. First, if the position of the point v0 is (xRef, yRef) and the position of the point Vi is (xPi, yPi), the relative position (xi, yi) of the point Vi starting from the point v0 is from the position of the point Vi From the difference in position with the origin v0,
xi = xPi-xRef
yi = yPi-yRef
It becomes. In the above example, the position of point v0 is (xP-w, yP + H-h), and the positions of points V0, V1 and V2 are respectively (xP, yP), (xP + W, yP), (xP, (xP, w) Since yP + H), the relative position (xi, yi) (where i = 0 .. 2) of the point Vi starting from the point v0 is derived as follows.

x0 = xP0 - xRef = xP - (xP - w) = w
y0 = yP0 - yRef = yP - (yP + H - h) = h - H
x1 = xP1 - xRef = (xP + W) - (xP - w) = w + W
y1 = yP1 - yRef = yP - (yP + H - h) = h - H
x2 = xP2 - xRef = xP - (xP - w) = w
y2 = yP2 - yRef = (yP + H) - (yP + H - h) = h
またアフィン予測部30372は、以下の式を用いて整数演算で(MVN_x, MVN_y)を導出してもよい。
x0 = xP0-xRef = xP-(xP-w) = w
y0 = yP0-yRef = yP-(yP + H-h) = h-H
x1 = xP1-xRef = (xP + W)-(xP-w) = w + W
y1 = yP1-yRef = yP-(yP + H-h) = h-H
x2 = xP2-xRef = xP-(xP-w) = w
y2 = yP2-yRef = (yP + H)-(yP + H-h) = h
Also, the affine prediction unit 30372 may derive (MVN_x, MVN_y) by integer operation using the following equation.

MVN_x = mv_x +((evBW - rvBH) >> 1) + evBW * iN - rvBH * jN
MVN_y = mv_y +((rvBW + evBH) >> 1) + rvBW * iN + evBH * jN
ここで、(evBW, rvBW)、(evBH, rvBH)はアフィンパラメータ、(iN、jN)は、制御点VNのサブブロックを単位とする座標である。例えば(iN、jN)= (xN >> log2(W), yN >> log2(H))。ここでW, Hはサブブロックの幅と高さである。
MVN_x = mv_x + ((evBW-rvBH) >> 1) + evBW * iN-rvBH * jN
MVN_y = mv_y + ((rvBW + evBH) >> 1) + rvBW * iN + evBH * jN
Here, (evBW, rvBW) and (evBH, rvBH) are affine parameters, and (iN, jN) are coordinates in units of sub blocks of the control point VN. For example, (iN, jN) = (xN >> log2 (W), yN >> log2 (H)). Here, W and H are the width and height of the subblock.

6パラメータアフィンにおいては、以下の式で、制御点の動きベクトルを導出する。   In the six parameter affine, the motion vector of the control point is derived by the following equation.

MVN_x = mv_x + ev1 * xN + rv2 * yN
MVN_y = mv_y + rv1 * xN + ev2 * yN
ここで(ev1, rv1, ev2, rv2)はアフィンパラメータである。
MVN_x = mv_x + ev1 * xN + rv2 * yN
MVN_y = mv_y + rv1 * xN + ev2 * yN
Here, (ev1, rv1, ev2, rv2) are affine parameters.

またアフィン予測部30372は、以下の式を用いて整数演算で(MVN_x, MVN_y)を導出してもよい。   Also, the affine prediction unit 30372 may derive (MVN_x, MVN_y) by integer operation using the following equation.

MVN_x = mv_x +((ev1BW + rv2BH) >> 1) + ev1BW * iN + rv2BH * jN
MVN_y = mv_y +((rv1BW + ev2BH) >> 1) + rv1BW * iN + ev2BH * jN
ここで、(ev1BW、rv1BW、ev2BH、ev2BH)はアフィンパラメータである。
MVN_x = mv_x + ((ev1BW + rv2BH) >> 1) + ev1BW * iN + rv2BH * jN
MVN_y = mv_y + ((rv1BW + ev2BH) >> 1) + rv1BW * iN + ev2BH * jN
Here, (ev1BW, rv1BW, ev2BH, ev2BH) are affine parameters.

上記アフィンパラメータ(ev, rv)、(evBW, rvBW)、(evBH, rvBH)、(ev1, rv1, ev2, rv2) 、(ev1BW、rv1BW、ev2BH、ev2BH)の導出方法は、(STEP2詳細)で後述する。なお、導出の際には、制御点V0, V1, V2, V3を各々隣接ブロック上の参照点v0, v1, v2, v3に置き換え、制御点の動きベクトル(MV1_x, MV1_y), (MV2_x, MV2_y), (MV3_x, MV3_y)を各々参照点の動きベクトル(mv0_x, mv0_y), (mv1_x, mv1_y), (mv2_x, mv2_y), (mv3_x, mv3_y)に置き換える。   The derivation method of the above affine parameters (ev, rv), (evBW, rvBW), (evBH, rvBH), (ev1, rv1, ev2, rv2), (ev1BW, rv1BW, ev2BH, ev2BH) is described in (STEP 2 details) I will mention later. At the time of derivation, control points V0, V1, V2 and V3 are respectively replaced with reference points v0, v1, v2 and v3 on adjacent blocks, and motion vectors of control points (MV1_x, MV1_y), (MV2_x, MV2_y) And (MV3_x, MV3_y) are replaced with motion vectors (mv0_x, mv0_y), (mv1_x, mv1_y), (mv2_x, mv2_y), and (mv3_x, mv3_y) of reference points, respectively.

また、アフィン予測部30372は、図15の(d)の点v0、v1、およびv2の動きベクトル(mv0_x, mv0_y)、(mv1_x, mv1_y)、(mv2_x, mv2_y)から、対象ブロック上の代表点(制御点V0、V1およびV2)の動きベクトルを導出してもよい。導出式は以下の通りである。   In addition, the affine prediction unit 30372 calculates representative points on the target block from the motion vectors (mv0_x, mv0_y), (mv1_x, mv1_y), and (mv2_x, mv2_y) of the points v0, v1 and v2 in (d) in FIG. Motion vectors of (control points V0, V1 and V2) may be derived. The derivation equation is as follows.

MVi_x=mv0_x + (mv1_x - mv0_x) / w * xi + (mv2_x - mv0_x) / h * yi
MVi_y=mv0_y + (mv1_y - mv0_y) / w * xi + (mv2_y - mv0_y) / h * yi
ここで、(xi, yi)は、点v0を起点とした導出対象の点(ここでは制御点V0、V1およびV2)の座標、w, hは、各々、参照点v1とベース参照点v0の距離(=点v1のX座標―点v0のX座標)、参照点v2とベース参照点v0の距離(=点v2のY座標―点v0のY座標)に相当する。
MVi_x = mv0_x + (mv1_x-mv0_x) / w * xi + (mv2_x-mv0_x) / h * yi
MVi_y = mv0_y + (mv1_y-mv0_y) / w * xi + (mv2_y-mv0_y) / h * yi
Here, (xi, yi) are coordinates of points to be derived (here, control points V0, V1 and V2) starting from the point v0, and w and h are respectively the reference point v1 and the base reference point v0. This corresponds to the distance (= X coordinate of point v1−X coordinate of point v0), distance between reference point v2 and base reference point v0 (= Y coordinate of point v2−Y coordinate of point v0).

上記導出式の(xi, yi)に、ベース参照点の点v0を起点とした点V0の位置(x0, y0)=(w, h - H)、点V1の位置(x1, y1)=(w + W, h - H)を代入して、点V0の動きベクトル(MV0_x, MV0_y)および点V1の動きベクトル(MV1_x, MV1_y)を導出すれば、
MV0_x=mv0_x + (mv1_x - mv0_x) / w * w + (mv2_x - mv0_x) / h * (h - H)
MV0_y=mv0_y + (mv1_y - mv0_y) / w * w + (mv2_y - mv0_y) / h * (h - H)
MV1_x=mv0_x + (mv1_x - mv0_x) / w * (w + W) + (mv2_x - mv0_x) / h * (h - H)
MV1_y=mv0_y + (mv1_y - mv0_y) / w * (w + W) + (mv2_y - mv0_y) / h * (h - H)
となる。
The position (x0, y0) = (w, h-H) of the point V0 starting from the point v0 of the base reference point and the position (x1, y1) = (w, h1) of the point V1 Substituting w + W, h-H) to derive the motion vector of point V0 (MV0_x, MV0_y) and the motion vector of point V1 (MV1_x, MV1_y),
MV0_x = mv0_x + (mv1_x-mv0_x) / w * w + (mv2_x-mv0_x) / h * (h-H)
MV0_y = mv0_y + (mv1_y-mv0_y) / w * w + (mv2_y-mv0_y) / h * (h-H)
MV1_x = mv0_x + (mv1_x-mv0_x) / w * (w + W) + (mv2_x-mv0_x) / h * (h-H)
MV1_y = mv0_y + (mv1_y-mv0_y) / w * (w + W) + (mv2_y-mv0_y) / h * (h-H)
It becomes.

なお、STEP1において、制御点の選択は上記に限定されない。   In STEP1, the selection of control points is not limited to the above.

なお、本構成のアフィン予測部30372は、(STEP1)で隣接ブロックの参照点(v0, v1, v2, v3)の動きベクトルから制御点(V0, V1, V2, V3)の動きベクトルを導出し、(STEP2)において、制御点(V0, V1, V2, V3)の動きベクトルから、サブブロックの動きベクトルを導出する構成となっているが、(STEP1)と(STEP2)を統合し、隣接ブロックの参照点(v0, v1, v2, v3)の動きベクトルからサブブロックの動きベクトルを導出する構成としてもよい。   The affine prediction unit 30372 of this configuration derives the motion vector of the control point (V0, V1, V2, V3) from the motion vector of the reference point (v0, v1, v2, v3) of the adjacent block in (STEP1) In (STEP 2), the motion vector of the sub block is derived from the motion vector of the control point (V0, V1, V2, V3), but (STEP 1) and (STEP 2) are integrated to form an adjacent block. The motion vector of the subblock may be derived from the motion vector of the reference point (v0, v1, v2, v3) of

(STEP2詳細)
続いて、(STEP2)の処理について、図16を用いて説明する。図16は、対象ブロック(横幅W、高さH)の制御点V0が左上頂点に位置し、幅BW、高さBHのサブブロックに分割した例を示す図である。(W,H)、(BW,BH)は前述の(nPbW, nPbH)、(nSbW, nSbH)に対応する。
(STEP 2 details)
Subsequently, the process of (STEP 2) will be described with reference to FIG. FIG. 16 is a diagram showing an example in which the control point V0 of the target block (horizontal width W, height H) is located at the top left corner and is divided into sub-blocks of width BW and height BH. (W, H) and (BW, BH) correspond to (nPbW, nPbH) and (nSbW, nSbH) described above.

アフィン予測部30372(AMVP予測パラメータ導出部3032)は、(STEP1)において導出された、ブロック上の代表点である制御点V0、V1およびV2のうち2つまたは3つの制御点の動きベクトルを参照し、(STEP2)では、アフィンパラメータを算出する。すなわち、アフィン予測部30372(AMVP予測パラメータ導出部3032)は、以下のいずれかの処理を行う。
・制御点V0の動きベクトル(MV0_x, MV0_y)、制御点V1の動きベクトル(MV1_x, MV1_y)および制御点V2の動きベクトル(MV2_x, MV2_y)のうち2つの動きベクトルから、アフィンパラメータ(ev、rv)を導出する。
・制御点V0の動きベクトル(MV0_x, MV0_y)、制御点V1の動きベクトル(MV1_x, MV1_y)および制御点V2の動きベクトル(MV2_x, MV2_y)の3つの動きベクトルから、アフィンパラメータ(ev1、rv1、ev2、ev2)を導出する。
The affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) refers to the motion vector of two or three control points among the control points V0, V1 and V2 which are representative points on the block derived in (STEP 1) In (STEP 2), affine parameters are calculated. That is, the affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) performs any of the following processing.
-From two motion vectors among the motion vector of control point V0 (MV0_x, MV0_y), the motion vector of control point V1 (MV1_x, MV1_y), and the motion vector of control point V2 (MV2_x, MV2_y), affine parameters (ev, rv) Derive).
From the three motion vectors of the motion vector of control point V0 (MV0_x, MV0_y), the motion vector of control point V1 (MV1_x, MV1_y) and the motion vector of control point V2 (MV2_x, MV2_y), affine parameters (ev1, rv1, Derivate ev2, ev2).

以下の説明においては、2つの動きベクトルからアフィンパラメータ(ev、rv)を導出する処理について、「4パラメータアフィン」と称する。また、3つの動きベクトルからアフィンパラメータ(ev1、rv1、ev2、ev2)を導出する処理について、「6パラメータアフィン」と称する。   In the following description, the process of deriving affine parameters (ev, rv) from two motion vectors is referred to as “four-parameter affine”. The process of deriving affine parameters (ev1, rv1, ev2, ev2) from three motion vectors is referred to as "6-parameter affine".

アフィンパラメータは小数点数ではなく整数で扱うこともできる。以下、小数点数のアフィンパラメータを(ev、rv)、(ev1、rv1、ev2、ev2)、整数のアフィンパラメータを(evBW, rvBW)、(evBH, rvBH)、(ev1BW、rv1BW、ev2BH、ev2BH)と表現する。   Affine parameters can also be treated as integers rather than decimals. The following are the affine parameters of decimal places (ev, rv), (ev1, rv1, ev2, ev2) and integer affine parameters (evBW, rvBW), (evBH, rvBH), (ev1BW, rv1BW, ev2BH, ev2BH) Express as

なお、整数のアフィンパラメータは、小数点数のアフィンパラメータにサブブロックサイズ(BW, BH)に応じた定数(整数化用定数)を乗じたものである。具体的には、小数点数のアフィンパラメータと整数のアフィンパラメータの間には、以下の関係がある。   The integer affine parameter is obtained by multiplying the affine parameter of the decimal point number by a constant (integerization constant) according to the sub block size (BW, BH). Specifically, there are the following relationships between the decimal affine parameters and the integer affine parameters.

evBW = ev * BW = ev << log2(BW)
rvBW = rv * BW = rv << log2(BW)
evBH = ev * BH = ev << log2(BH)
rvBH = rv * BH = rv << log2(BH)
ev1BW = ev1 * BW = ev1 << log2(BW)
rv1BW = rv1 * BH = rv1 << log2(BW)
ev2BH = ev2 * BW = ev2 << log2(BH)
rv2BH = rv2 * BH = rv2 << log2(BH)
なお、サブブロックの幅BWと高さBHが等しい場合には、(evBW, rvBW) = (evBH, rvBH)となるので、(evBW, rvBW)と(evBH, rvBH)を区別する必要はない。すなわち、以下のアフィンパラメータの導出においては、(evBW, rvBW)だけ、もしくは、(evBH, rvBH)だけを導出すれば十分である。
evBW = ev * BW = ev << log 2 (BW)
rvBW = rv * BW = rv << log 2 (BW)
evBH = ev * BH = ev << log 2 (BH)
rv BH = rv * BH = rv << log 2 (BH)
ev1BW = ev1 * BW = ev1 << log2 (BW)
rv1BW = rv1 * BH = rv1 << log2 (BW)
ev2BH = ev2 * BW = ev2 << log2 (BH)
rv2BH = rv2 * BH = rv2 << log2 (BH)
When the width BW and the height BH of the sub-block are equal, (evBW, rvBW) = (evBH, rvBH), and therefore, it is not necessary to distinguish between (evBW, rvBW) and (evBH, rvBH). That is, in the following derivation of affine parameters, it is sufficient to derive only (evBW, rvBW) or only (evBH, rvBH).

例えば制御点V0およびV1の動きベクトルを用いる場合、アフィン予測部30372(AMVP予測パラメータ導出部3032)はアフィンパラメータを下記の式を用いて、
evBW = (MV1_x - MV0_x) >> shiftWBW
rvBW = (MV1_y - MV0_y) >> shiftWBW
evBH = (MV1_x - MV0_x) >> shiftWBH
rvBH = (MV1_y - MV0_y) >> shiftWBH
shiftWBW = log2(W) - log2(BW)
shiftHBH = log2(H) - log2(BH)
と導出する。
For example, when using the motion vectors of control points V0 and V1, the affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) uses the following equation for the affine parameters,
evBW = (MV1_x-MV0_x) >> shiftWBW
rvBW = (MV1_y-MV0_y) >> shiftWBW
evBH = (MV1_x-MV0_x) >> shiftWBH
rvBH = (MV1_y-MV0_y) >> shiftWBH
shiftWBW = log2 (W)-log2 (BW)
shiftHBH = log2 (H)-log2 (BH)
To derive.

なお、小数点数のアフィンパラメータを用いる場合には下記の式を用いて、
ev = (MV1_x - MV0_x) / W
rv = (MV1_y - MV0_y) / W
と導出してもよい。なお、この式は、一般式制御点V0の位置を(0, 0)、制御点V1の位置を(W, 0)とした場合である。
In addition, when using the affine parameter of the decimal point number, using the following formula,
ev = (MV1_x-MV0_x) / W
rv = (MV1_y-MV0_y) / W
It may be derived as In this equation, the position of the control point V0 of the general formula is (0, 0), and the position of the control point V1 is (W, 0).

また、制御点V0およびV2の動きベクトルを用いる場合、アフィン予測部30372(AMVP予測パラメータ導出部3032)はアフィンパラメータを下記の式を用いて、
evBW = (MV2_y - MV0_y) >> shiftHBW
rvBW = -(MV2_x - MV0_x) >> shiftHBW
evBH = (MV2_y - MV0_y) >> shiftHBH
rvBH = -(MV2_x - MV0_x) >> shiftHBH
shiftHBW = log2(H) - log2(BW)
shiftHBH = log2(H) - log2(BH)
と導出する。なお、この式は、以下の小数点数のアフィンパラメータの導出式
ev = (MV2_y - MV0_y) / H
rv = -(MV2_x - MV0_x) / H
と等しい。
In addition, when using the motion vectors of control points V0 and V2, the affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) uses the following equation for the affine parameter,
evBW = (MV2_y-MV0_y) >> shiftHBW
rvBW =-(MV2_x-MV0_x) >> shiftHBW
evBH = (MV2_y-MV0_y) >> shiftHBH
rvBH =-(MV2_x-MV0_x) >> shiftHBH
shiftHBW = log2 (H)-log2 (BW)
shiftHBH = log2 (H)-log2 (BH)
To derive. Note that this equation is a derivation equation for the affine parameter of the following decimal places
ev = (MV2_y-MV0_y) / H
rv =-(MV2_x-MV0_x) / H
Equal to

また、制御点V1およびV2の動きベクトルを用いる場合、アフィン予測部30372(AMVP予測パラメータ導出部3032)はアフィンパラメータを下記の式を用いて、
evBW = {(MV1_x - MV2_x) - (MV1_y - MV2_y)} >> (shiftWBW + 1)
rvBW = {(MV1_x - MV2_x) + (MV1_y - MV2_y)} >> (shiftWBW + 1)
evBH = {(MV1_x - MV2_x) - (MV1_y - MV2_y)} >> (shiftWBH + 1)
rvBH = {(MV1_x - MV2_x) + (MV1_y - MV2_y)} >> (shiftWBH + 1)
と導出する。なお、この式は、以下の小数点数のアフィンパラメータの導出式
ev = {(MV1_x - MV2_x) - (MV1_y - MV2_y)} / 2W
rv = {(MV1_x - MV2_x) + (MV1_y - MV2_y)} / 2W
と等しい。
Further, in the case of using the motion vectors of control points V1 and V2, the affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) uses the following equation for the affine parameters,
evBW = {(MV1_x-MV2_x)-(MV1_y-MV2_y)} >> (shiftWBW + 1)
rvBW = {(MV1_x-MV2_x) + (MV1_y-MV2_y)} >> (shiftWBW + 1)
evBH = {(MV1_x-MV2_x)-(MV1_y-MV2_y)} >> (shiftWBH + 1)
rvBH = {(MV1_x-MV2_x) + (MV1_y-MV2_y)} >> (shiftWBH + 1)
To derive. Note that this equation is a derivation equation for the affine parameter of the following decimal places
ev = {(MV1_x-MV2_x)-(MV1_y-MV2_y)} / 2W
rv = {(MV1_x-MV2_x) + (MV1_y-MV2_y)} / 2W
Equal to

また、上述した制御点V0〜V2のいずれとも異なる、制御点V3(対象ブロックにおいてV0と対角に位置する制御点)の動きベクトルを用いることもできる。例えば制御点V0およびV3の動きベクトルを用いる場合、アフィン予測部30372(AMVP予測パラメータ導出部3032)は、アフィンパラメータを下記の式を用いて、
evBW = (MV3_x - MV0_x + MV3_y - MV0_y) >> (shiftWBW + 1)
rvBW = (-MV3_x + MV0_x + MV3_y - MV0_y) >> (shiftWBW + 1)
evBH = (MV3_x - MV0_x + MV3_y - MV0_y) >> (shiftWBH + 1)
rvBH = (-MV3_x + MV0_x + MV3_y - MV0_y) >> (shiftWBH + 1)
と導出する。なお、この式は、以下の小数点数のアフィンパラメータの導出式
ev = (MV3_x - MV0_x + MV3_y - MV0_y) / 2W
rv = (-MV3_x + MV0_x + MV3_y - MV0_y) / 2W
と等しい。
Also, a motion vector of a control point V3 (a control point located diagonally to V0 in the target block), which is different from any of the control points V0 to V2 described above, can be used. For example, when using the motion vectors of control points V0 and V3, the affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) uses the following equation for the affine parameters,
evBW = (MV3_x-MV0_x + MV3_y-MV0_y) >> (shiftWBW + 1)
rvBW = (-MV3_x + MV0_x + MV3_y-MV0_y) >> (shiftWBW + 1)
evBH = (MV3_x-MV0_x + MV3_y-MV0_y) >> (shiftWBH + 1)
rvBH = (-MV3_x + MV0_x + MV3_y-MV0_y) >> (shiftWBH + 1)
To derive. Note that this equation is a derivation equation for the affine parameter of the following decimal places
ev = (MV3_x-MV0_x + MV3_y-MV0_y) / 2W
rv = (-MV3_x + MV0_x + MV3_y-MV0_y) / 2W
Equal to

また、制御点V0、V1およびV2の3つの動きベクトルを用いる場合、アフィン予測部30372(AMVP予測パラメータ導出部3032)はアフィンパラメータを下記の式を用いて、
ev1BW = (MV1_x - MV0_x) >> shiftWBW
rv2BH = (MV2_x - MV0_x) >> shiftHBH
rv1BW = (MV1_y - MV0_y) >> shiftWBW
ev2BH = (MV2_y - MV0_y) >> shiftHBH
shiftWBW = log2(W) - log2(BW)
shiftHBH = log2(H) - log2(BH)
と導出する。なお、この式は、以下の小数点数のアフィンパラメータの導出式
ev1 = (MV1_x - MV0_x) / W
rv2 = (MV2_x - MV0_x) / H
rv1 = (MV1_y - MV0_y) / W
ev2 = (MV2_y - MV0_y) / H
と等しい。
When three motion vectors of control points V0, V1 and V2 are used, the affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) uses the following equation for the affine parameter,
ev1BW = (MV1_x-MV0_x) >> shiftWBW
rv2BH = (MV2_x-MV0_x) >> shiftHBH
rv1BW = (MV1_y-MV0_y) >> shiftWBW
ev2BH = (MV2_y-MV0_y) >> shiftHBH
shiftWBW = log2 (W)-log2 (BW)
shiftHBH = log2 (H)-log2 (BH)
To derive. Note that this equation is a derivation equation for the affine parameter of the following decimal places
ev1 = (MV1_x-MV0_x) / W
rv2 = (MV2_x-MV0_x) / H
rv1 = (MV1_y-MV0_y) / W
ev2 = (MV2_y-MV0_y) / H
Equal to

(サブブロックの動きベクトルの導出)
アフィン予測部30372(AMVP予測パラメータ導出部3032)は、上記の式により求めたアフィンパラメータを用いて、サブブロックの動きベクトルを導出する。
(Derivation of motion vector of subblock)
The affine prediction unit 30372 (AMVP prediction parameter derivation unit 3032) derives the motion vector of the sub block using the affine parameters obtained by the above equation.

4パラメータアフィンの場合、アフィンパラメータ(ev, rv)から、サブブロック座標(xi, yi)のサブブロックの動きベクトル(MVi_x, MVi_y)を以下の式AF4P_floatにより、導出する。   In the case of the four-parameter affine, the motion vector (MVi_x, MVi_y) of the subblock of the subblock coordinates (xi, yi) is derived from the affine parameter (ev, rv) by the following equation AF4P_float.

MVi_x = mv_x + ev * xi - rv * yi
MVi_y = mv_y + rv * xi + ev * yi (式AF4P_float)
並進ベクトルのアフィンパラメータmv_x, mv_yとして(MV0_x、MV0_y)を用いてもよいが、これに限定されない。例えば(MV0_x、MV0_y)以外の動きベクトル(MV1_x、MV1_y)や(MV2_x、MV2_y)、(MV3_x、MV3_y)を並進ベクトルとしてもよい。特にV1、V2を制御点とする場合には、V1の動きベクトル(MV1_x、MV1_y)またはV2の動きベクトル(MV2_x、MV2_y)を並進ベクトルとすると良い。
MVi_x = mv_x + ev * xi-rv * yi
MVi_y = mv_y + rv * xi + ev * yi (expression AF4P_float)
Although (MV0_x, MV0_y) may be used as the translation vector affine parameters mv_x and mv_y, it is not limited thereto. For example, motion vectors (MV1_x, MV1_y), (MV2_x, MV2_y), and (MV3_x, MV3_y) other than (MV0_x, MV0_y) may be used as translation vectors. In particular, when V1 and V2 are set as control points, it is preferable to set the motion vector of V1 (MV1_x, MV1_y) or the motion vector of V2 (MV2_x, MV2_y) as a translation vector.

また、アフィンパラメータが整数のアフィンパラメータ(evBW, rvBW)、(evBH, rvBH)であれば、サブブロック位置(i, j)のサブブロックの動きベクトル(MVij_x, MVij_y)を以下の式AF4P_integerにより導出する。   Also, if the affine parameters are integer affine parameters (evBW, rvBW) and (evBH, rvBH), the motion vector (MVij_x, MVij_y) of the subblock at subblock position (i, j) is derived by the following formula AF4P_integer Do.

MVij_x = mv_x +((evBW - rvBH) >> 1) + evBW * i - rvBH * j
MVij_y = mv_y +((rvBW + evBH) >> 1) + rvBW * i + evBH * j (式AF4P_integer)
並進ベクトルとして(MV0_x, MV0_y)を用いる場合には、上記の式は下記式となる。
MVij_x = mv_x + ((evBW-rvBH) >> 1) + evBW * i-rvBH * j
MVij_y = mv_y + ((rvBW + evBH) >> 1) + rvBW * i + evBH * j (Expression AF4P_integer)
When (MV0_x, MV0_y) is used as a translation vector, the above equation becomes the following equation.

MVij_x = MV0_x +((evBW - rvBH) >> 1) + evBW * i - rvBH * j
MVij_y = MV0_y +((rvBW + evBH) >> 1) + rvBW * i + evBH * j
なお、サブブロックの幅BWと高さBHが等しい場合には、(evBW, rvBW)= (evBH, rvBH)
となるので、上記の導出式で(evBW, rvBW)と(evBH, rvBH)を区別する必要はない。すなわち、(evBW, rvBW)のみから導出してもよい。
MVij_x = MV0_x + ((evBW-rvBH) >> 1) + evBW * i-rvBH * j
MVij_y = MV0_y + ((rvBW + evBH) >> 1) + rvBW * i + evBH * j
When the sub-block width BW and height BH are equal, (evBW, rvBW) = (evBH, rvBH)
Therefore, it is not necessary to distinguish between (evBW, rvBW) and (evBH, rvBH) in the above derivation formula. That is, it may be derived from only (evBW, rvBW).

MVij_x = mv_x +((evBW + rvBW) >> 1) + evBW * i - rvBW * j
MVij_y = mv_y +((rvBW + evBW) >> 1) + rvBW * i + evBW * j
また、(evBH, rvBH)のみから導出してもよい。
MVij_x = mv_x + ((evBW + rvBW) >> 1) + evBW * i-rvBW * j
MVij_y = mv_y + ((rvBW + evBW) >> 1) + rvBW * i + evBW * j
Alternatively, it may be derived from (evBH, rvBH) alone.

MVij_x = mv_x +((evBH + rvBH) >> 1) + evBH * i - rvBH * j
MVij_y = mv_y +((rvBH + evBH) >> 1) + rvBH * i + evBH * j
ここで、サブブロック位置(i, j)とサブブロック座標(xi, yj)の関係は以下のとおりである(式XYIJ)。
MVij_x = mv_x + ((evBH + rvBH) >> 1) + evBH * i-rvBH * j
MVij_y = mv_y + ((rvBH + evBH) >> 1) + rvBH * i + evBH * j
Here, the relationship between the subblock position (i, j) and the subblock coordinates (xi, yj) is as follows (equation XYIJ).

xi = BW/2 + BW*i
yj = BH/2 + BH*j (式XYIJ)
i = 0..(B/SW)-1、j = 0..(H/SH)-1
サブブロック位置(i, j)の点は、図16におけるx軸に平行な実線とy軸に平行な実線との交点である。また、サブブロック座標(xi, yj)の点は、図16におけるx軸に平行な破線とy軸に平行な破線との交点である。図16には、一例として、サブブロック位置(i, j) = (1, 1)の点、および当該サブブロック位置に対するサブブロック座標(x1, y1)の点が示されている。
xi = BW / 2 + BW * i
yj = BH / 2 + BH * j (formula XYIJ)
i = 0 .. (B / SW) -1, j = 0 .. (H / SH) -1
The point at the sub block position (i, j) is an intersection point of a solid line parallel to the x axis in FIG. 16 and a solid line parallel to the y axis. The point of the subblock coordinates (xi, yj) is an intersection point of a broken line parallel to the x axis in FIG. 16 and a broken line parallel to the y axis. FIG. 16 shows, as an example, a point of sub block position (i, j) = (1, 1) and a point of sub block coordinates (x1, y1) with respect to the sub block position.

なお、小数点数の導出式から整数の導出式は以下の変形により得られる。上述した小数点数の式AF4P_floatの(xi, yi)に上述の式XYIJを代入して変形すると、
MVij_x = mv_x + ev * (BW / 2 + BW * i) - rv * (BH / 2 + BH * j)
MVij_y = mv_y + rv * (BW / 2 + BW * i) + ev * (BH / 2 + BH * j)
となる。さらに変形すると、
MVij_x = mv_x + ev * BW * (1/2 + i) - rv * BH * (1/2 + j)
MVij_y = mv_y + rv * BW * (1/2 + i) + ev * BH * (1/2 + j)
となる。さらにev*BW=evBW、rv*BH=rvBH、rv*BW=rvBW、ev*BH=evBHにより変形すると、
MVij_x = MV0_x + evBW * (1/2 + i) - rvBH * (1/2 + j)
MVij_y = MV0_y + rvBW * (1/2 + i) + evBH * (1/2 + j)
となる。さらに変形すると、
MVij_x = MV0_x + evBW /2 - rvBH /2 + evBW * i - rvBH * j
MVij_y = MV0_y + rvBW /2 + evBH /2 + rvBW * i + evBH * j
を経て、最終的に上述の整数演算の式AF4P_integer
MVij_x = mv_x +((evBW - rvBH) >> 1) + evBW * i - rvBH * j
MVij_y = mv_y +((rvBW + evBH) >> 1) + rvBW * i + evBH * j
となる。並進ベクトルのアフィンパラメータmv_x, mv_yとして(MV0_x、MV0_y)を用いるとよいが、これに限定されない。例えば動きベクトル(MV1_x、MV1_y)や(MV2_x、MV2_y)、(MV3_x、MV3_y)を並進ベクトルとしてもよい。
It should be noted that an equation for deriving an integer can be obtained from the equation for deriving a decimal point by the following modification. Substituting the above equation XYIJ into (xi, yi) of the above-mentioned decimal point equation AF4P_float,
MVij_x = mv_x + ev * (BW / 2 + BW * i)-rv * (BH / 2 + BH * j)
MVij_y = mv_y + rv * (BW / 2 + BW * i) + ev * (BH / 2 + BH * j)
It becomes. Further deformation
MVij_x = mv_x + ev * BW * (1/2 + i)-rv * BH * (1/2 + j)
MVij_y = mv_y + rv * BW * (1/2 + i) + ev * BH * (1/2 + j)
It becomes. Further, when deformed by ev * BW = evBW, rv * BH = rvBH, rv * BW = rvBW, ev * BH = evBH,
MVij_x = MV0_x + evBW * (1/2 + i)-rvBH * (1/2 + j)
MVij_y = MV0_y + rvBW * (1/2 + i) + evBH * (1/2 + j)
It becomes. Further deformation
MVij_x = MV0_x + evBW / 2-rvBH / 2 + evBW * i-rvBH * j
MVij_y = MV0_y + rvBW / 2 + evBH / 2 + rvBW * i + evBH * j
Finally, the above-mentioned integer arithmetic expression AF4P_integer
MVij_x = mv_x + ((evBW-rvBH) >> 1) + evBW * i-rvBH * j
MVij_y = mv_y + ((rvBW + evBH) >> 1) + rvBW * i + evBH * j
It becomes. It is preferable to use (MV0_x, MV0_y) as the translation vector affine parameters mv_x and mv_y, but is not limited thereto. For example, motion vectors (MV1_x, MV1_y), (MV2_x, MV2_y), and (MV3_x, MV3_y) may be translation vectors.

6パラメータアフィンの場合、アフィンパラメータ(ev1、rv1、ev2、ev2)から、サブブロック座標(xi, yi)のサブブロックの動きベクトル(MVij_x, MVij_y)を以下の式AF6P_floatにより、
MVij_x = mv_x + ev1 * xi + rv2 * yi
MVij_y = mv_y + rv1 * xi + ev2 * yi (式AF6P_float)
と導出する。
In the case of the six-parameter affine, from the affine parameters (ev1, rv1, ev2, ev2), the motion vector (MVij_x, MVij_y) of the subblock of the subblock coordinates (xi, yi) is expressed by the following formula AF6P_float
MVij_x = mv_x + ev1 * xi + rv2 * yi
MVij_y = mv_y + rv 1 * xi + ev 2 * yi (equation AF6P_float)
To derive.

また、アフィンパラメータ(ev1、rv1、ev2、ev2)が整数のアフィンパラメータ(ev1BW、rv1BH、ev2BW、ev2BH)の場合には、サブブロック位置(i, j)のサブブロックの動きベクトル(MVij_x, MVij_y)を以下の式AF6P_integerにより導出する。   When the affine parameters (ev1, rv1, ev2, ev2) are integer affine parameters (ev1BW, rv1BH, ev2BW, ev2BH), the motion vector (MVij_x, MVij_y) of the subblock at subblock position (i, j) ) Is derived by the following equation AF6P_integer.

MVij_x = mv_x +((ev1BW + rv2BH) >> 1) + ev1BW * i + rv2BH * j
MVij_y = mv_y +((rv1BW + ev2BH) >> 1) + rv1BW * i + ev2BH * j (式AF6P_integer)
例えば、並進ベクトルとして(MV0_x, MV0_y)を用いる場合には、上記式は下記式となる。
MVij_x = mv_x + ((ev1BW + rv2BH) >> 1) + ev1BW * i + rv2BH * j
MVij_y = mv_y + ((rv1BW + ev2BH) >> 1) + rv1BW * i + ev2BH * j (Expression AF6P_integer)
For example, when (MV0_x, MV0_y) is used as a translation vector, the above equation becomes the following equation.

MVij_x = MV0_x +((ev1BW + rv2BH) >> 1) + ev1BW * i + rv2BH * j
MVij_y = MV0_y +((rv1BW + ev2BH) >> 1) + rv1BW * i + ev2BH * j (式AF6P_integer)
なお、小数点数の導出式から整数の導出式は以下の変形により得られる。上述した小数点数の式AF6P_floatの(xi, yi)に上述の式XYIJを代入して式を変形すると、
MVij_x = mv_x + ev1 * (BW / 2 + BW * i) + rv2 * (BH / 2 + BH * j)
MVij_y = mv_y + rv1 * (BW / 2 + BW * i) + ev2 * (BH / 2 + BH * j)
となる。さらに変形すると、
MVij_x = mv_x + ev1 * BW * (1/2 + i) + rv2 * BH * (1/2 + j)
MVij_y = mv_y + rv1 * BW * (1/2 + i) + ev2 * BH * (1/2 + j)
となる。さらにev1*BW=ev1BW、rv2*BH=rv2BH、rv1*BW=rv1BW、ev2*BH=ev2BHにより変形すると、
MVij_x = mv_x + ev1BW * (1/2 + i) + rv2BH * (1/2 + j)
MVij_y = mv_y + rv1BW * (1/2 + i) + ev2BH * (1/2 + j)
となる。さらに変形すると、
MVij_x = mv_x + ev1BW /2 + rv2BH /2 + ev1BW * i + rv2BH * j
MVij_y = mv_y + rv1BW /2 + ev2BH /2 + rv1BW * i + ev2BH * j
を経て、最終的に、上述の整数演算の導出式AF6P_integer
MVij_x = mv_x +((ev1BW + rv2BH) >> 1) + ev1BW * i + rv2BH * j
MVij_y = mv_y +((rv1BW + ev2BH) >> 1) + rv1BW * i + ev2BH * j
となる。
MVij_x = MV0_x + ((ev1BW + rv2BH) >> 1) + ev1BW * i + rv2BH * j
MVij_y = MV0_y + ((rv1BW + ev2BH) >> 1) + rv1BW * i + ev2BH * j (Expression AF6P_integer)
It should be noted that an equation for deriving an integer can be obtained from the equation for deriving a decimal point by the following modification. Substituting the above equation XYIJ into (xi, yi) of the above-mentioned decimal point equation AF6P_float, and modifying the equation,
MVij_x = mv_x + ev1 * (BW / 2 + BW * i) + rv2 * (BH / 2 + BH * j)
MVij_y = mv_y + rv1 * (BW / 2 + BW * i) + ev2 * (BH / 2 + BH * j)
It becomes. Further deformation
MVij_x = mv_x + ev1 * BW * (1/2 + i) + rv2 * BH * (1/2 + j)
MVij_y = mv_y + rv1 * BW * (1/2 + i) + ev2 * BH * (1/2 + j)
It becomes. Furthermore, when deformed by ev1 * BW = ev1BW, rv2 * BH = rv2BH, rv1 * BW = rv1BW, ev2 * BH = ev2BH,
MVij_x = mv_x + ev1BW * (1/2 + i) + rv2BH * (1/2 + j)
MVij_y = mv_y + rv1BW * (1/2 + i) + ev2BH * (1/2 + j)
It becomes. Further deformation
MVij_x = mv_x + ev1BW / 2 + rv2BH / 2 + ev1BW * i + rv2BH * j
MVij_y = mv_y + rv1BW / 2 + ev2BH / 2 + rv1BW * i + ev2BH * j
Finally, the above-mentioned integer arithmetic derivation expression AF6P_integer
MVij_x = mv_x + ((ev1BW + rv2BH) >> 1) + ev1BW * i + rv2BH * j
MVij_y = mv_y + ((rv1BW + ev2BH) >> 1) + rv1BW * i + ev2BH * j
It becomes.

(制御点の決定)
インター予測パラメータ復号部303は、所定の処理により4パラメータアフィンおよび6パラメータアフィンのいずれの処理を実行するかを決定する。以下に所定の処理の例を示す。以下の説明に用いるフローチャートにおいては、puWidthは対象PUの幅、puHeightは対象PUの高さをそれぞれ示す。(puWidth,puHeight)は前述の(nPbW, nPbH)に対応する。
(Determination of control point)
The inter prediction parameter decoding unit 303 determines which of the four-parameter affine and the six-parameter affine to execute by a predetermined process. An example of the predetermined process is shown below. In the flowcharts used in the following description, puWidth indicates the width of the target PU, and puHeight indicates the height of the target PU. (PuWidth, puHeight) correspond to (nPbW, nPbH) described above.

(対象PUの形状による決定)
図17は、インター予測パラメータ復号部303が対象PUの形状に基づいて動きベクトルを導出する制御点の数を決定する処理の一例を示すフローチャートである。図17に示す例では、インター予測パラメータ復号部303において、まずインター予測パラメータ復号制御部3031は、対象PUの幅と対象PUの高さとが等しいかを判定する(SA1)。対象PUの幅と対象PUの高さとが等しい場合(SA1でY)、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は6パラメータアフィンの処理を行う(SA2)。対象PUの幅と対象PUの高さとが等しくない場合(SA1でN)、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は4パラメータアフィンの処理を行う(SA3)。
(Determined by the shape of the target PU)
FIG. 17 is a flowchart illustrating an example of processing in which the inter prediction parameter decoding unit 303 determines the number of control points for deriving a motion vector based on the shape of the target PU. In the example shown in FIG. 17, the inter prediction parameter decoding control unit 3031 first determines in the inter prediction parameter decoding unit 303 whether the width of the target PU and the height of the target PU are equal (SA1). If the width of the target PU and the height of the target PU are equal (Y in SA1), the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 6-parameter affine processing (SA2). If the width of the target PU and the height of the target PU are not equal (N in SA1), the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 4-parameter affine processing (SA3).

SA1における判定は、対象PUが正方形であるか否かを判定することと等しい。すなわち、図17に示す例は、対象PUが正方形である場合に6パラメータアフィンの処理を行い、対象PUが正方形でない場合に4パラメータアフィンの処理を行うものである。   The determination in SA1 is equivalent to determining whether the target PU is a square. That is, in the example shown in FIG. 17, processing of six parameter affine is performed when the target PU is a square, and processing of four parameter affine is performed when the target PU is not a square.

また、対象PUの形状に基づいて動きベクトルを導出する処理は、マージモードの場合にのみ適用しても、AMVPの場合にのみ適用しても構わない。図18は、アフィン予測部30372が対象PUの形状に基づいて動きベクトルを導出する制御点の数を決定する処理の、別の例を示すフローチャートである。図18に示す例では、図17に示したSA1の処理に先駆けて、インター予測パラメータ復号制御部3031はマージフラグが1であるか判定する(SB1)。マージフラグが1である場合、すなわちマージモードである場合(SB1でY)、インター予測パラメータ復号部303はSB2〜SB4の処理を行う。SB2〜SB4の処理は、図17に示したSA1〜SA3の処理と同じである。一方、マージフラグが0である場合、すなわちマージモードでない場合(SB1でN)、インター予測パラメータ復号部303はAMVPの動きベクトル導出処理を行う。   Further, the process of deriving the motion vector based on the shape of the target PU may be applied only in the merge mode or only in the AMVP. FIG. 18 is a flowchart showing another example of processing in which the affine prediction unit 30372 determines the number of control points for deriving a motion vector based on the shape of the target PU. In the example illustrated in FIG. 18, prior to the process of SA1 illustrated in FIG. 17, the inter prediction parameter decoding control unit 3031 determines whether the merge flag is 1 (SB1). When the merge flag is 1, that is, in the merge mode (Y in SB1), the inter prediction parameter decoding unit 303 performs the processing of SB2 to SB4. The processes of SB2 to SB4 are the same as the processes of SA1 to SA3 shown in FIG. On the other hand, when the merge flag is 0, that is, when not in the merge mode (N in SB1), the inter prediction parameter decoding unit 303 performs motion vector derivation processing of AMVP.

なお、図18に示した例では、アフィン予測部30372は、マージフラグが1である場合に対象PUが正方形か否かに応じてアフィンパラメータの導出を行う。しかし、本実施形態のアフィン予測部30372は、図18に示した例とは逆に、マージフラグが0である場合、すなわちAMVPである場合に対象PUが正方形か否かに応じてアフィンパラメータの導出を行ってもよい。この場合、アフィンパラメータの導出は、AMVP予測パラメータ導出部3032において実行される。また、制御点の動きベクトルの導出は、上述した(AMVPモードにおける制御点の動きベクトルの導出)に沿って行われる。   Note that, in the example illustrated in FIG. 18, when the merge flag is 1, the affine prediction unit 30372 derives an affine parameter in accordance with whether or not the target PU is a square. However, contrary to the example shown in FIG. 18, the affine prediction unit 30372 according to the present embodiment determines that the affine parameters are different depending on whether the target PU is square or not when the merge flag is 0, that is, when it is AMVP. It may be derived. In this case, derivation of the affine parameters is performed in the AMVP prediction parameter derivation unit 3032. Further, the motion vector of the control point is derived in accordance with the above-mentioned (derivation of the motion vector of the control point in the AMVP mode).

なお、上記では説明していないが、インター予測パラメータ復号部303は、アフィン予測を行うか否かを示すフラグであるアフィン適用フラグpu_affine_enable_flagを復号してもよい。インター予測パラメータ復号部303は、アフィン適用フラグpu_affine_enable_flagが1、すなわち、アフィン予測を適用することを示す場合、アフィン予測の処理を行い、アフィン適用フラグpu_affine_enable_flagが0の場合には、アフィン予測を適用しない。   Although not described above, the inter prediction parameter decoding unit 303 may decode the affine application flag pu_affine_enable_flag, which is a flag indicating whether to perform affine prediction. The inter prediction parameter decoding unit 303 performs an affine prediction process when the affine application flag pu_affine_enable_flag indicates 1, that is, indicates that affine prediction is applied, and does not apply the affine prediction when the affine application flag pu_affine_enable_flag is 0. .

図19は、インター予測パラメータ復号部303が対象PUの形状に基づいて動きベクトルを導出する制御点の数を決定する処理の、さらに別の例を示すフローチャートである。   FIG. 19 is a flowchart showing yet another example of processing in which the inter prediction parameter decoding unit 303 determines the number of control points for deriving a motion vector based on the shape of a target PU.

図19に示す例では、AMVPの場合において、対象PUの形状が正方形の場合には、6パラメータアフィンと4パラメータアフィンを示すフラグであるPUアフィンモードフラグを復号し、それ以外の場合には、PUアフィンモードフラグを復号しない。より、具体的には、インター予測パラメータ復号制御部3031は最初に、マージフラグが1であるか判定する(SC1)。マージフラグが0である(マージ処理を行わないことを示している)場合(SC1でN)、インター予測パラメータ復号制御部3031は対象PUの幅と対象PUの高さとが等しいかを判定する(SC2)。対象PUの幅と対象PUの高さとが等しい場合(SC2でY)、インター予測パラメータ復号制御部3031は、PUアフィンモードフラグを復号する(SC3)。その後、インター予測パラメータ復号制御部3031はPUアフィンモードフラグが1であるか判定する(SC4)。   In the example shown in FIG. 19, in the case of AMVP, when the shape of the target PU is a square, the PU affine mode flag, which is a flag indicating a 6 parameter affine and a 4 parameter affine, is decoded; Do not decode the PU affine mode flag. More specifically, the inter prediction parameter decoding control unit 3031 first determines whether the merge flag is 1 (SC1). If the merge flag is 0 (indicating that the merge process is not performed) (N in SC1), the inter prediction parameter decoding control unit 3031 determines whether the width of the target PU is equal to the height of the target PU ( SC2). If the width of the target PU and the height of the target PU are equal (Y in SC2), the inter prediction parameter decoding control unit 3031 decodes the PU affine mode flag (SC3). Thereafter, the inter prediction parameter decoding control unit 3031 determines whether the PU affine mode flag is 1 (SC4).

AMVP予測パラメータ導出部3032は、PUアフィンモードフラグが1である(6パラメータアフィンの処理を行うことを示している)場合(SC4でY)には6パラメータアフィンの処理を行い、PUアフィンモードフラグが0である場合(SC4でN)には4パラメータアフィンの処理を行う。また、AMVP予測パラメータ導出部3032は、対象PUの幅と対象PUの高さとが等しくない場合(SC2でN)にも4パラメータアフィンの処理を行う。一方、マージフラグが1である場合(SC1でY)には、マージ予測による動きベクトル導出を行う。   The AMVP prediction parameter derivation unit 3032 performs 6 parameter affine processing when the PU affine mode flag is 1 (showing that 6 parameter affine processing is to be performed) (Y in SC4), and the PU affine mode flag If 0 is 0 (N in SC4), 4-parameter affine processing is performed. The AMVP prediction parameter derivation unit 3032 also performs 4-parameter affine processing when the width of the target PU and the height of the target PU are not equal (N in SC2). On the other hand, when the merge flag is 1 (Y in SC1), motion vector derivation is performed by merge prediction.

本構成ではインター予測パラメータ復号部303は、対象ブロックの形状に応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替える。AMVPに適用する場合には、SC1で、対象ブロックの形状に応じて2点の動きベクトル(差分ベクトル)を符号化・復号するか、3点の動きベクトル(差分ベクトル)を符号化・復号するかを切り替えてもよい。マージに適用する場合には、SC1で、対象ブロックの形状に応じて2点の動きベクトルを参照して制御点の動きベクトルを導出するか、3点の動きベクトルを参照して制御点の動きベクトルを導出するかを切り替えてもよい。またSC2では、対象ブロックの形状に応じて2点の動きベクトルを参照して各サブブロックの動きベクトルを導出するか、3点の動きベクトルを参照して各サブブロックの動きベクトルを導出するか、を切り替えてもよい。   In this configuration, the inter prediction parameter decoding unit 303 calculates motion vectors of two control points according to the shape of the target block and performs four parameter affine processing, or calculates motion vectors of three control points. 6 Switch whether to process parameter affine. In the case of application to AMVP, at SC1, either two motion vectors (difference vectors) are encoded / decoded or three motion vectors (difference vectors) are encoded / decoded according to the shape of the target block. You may switch between When applying to merging, in SC1 the motion vector of the control point is derived by referring to the motion vector of 2 points according to the shape of the target block, or the motion of the control point is referred to by the motion vector of 3 points It may be switched whether to derive a vector. In SC2, whether to derive the motion vector of each sub block with reference to the motion vector of 2 points according to the shape of the target block or derive the motion vector of each sub block with reference to the motion vector of 3 points , May be switched.

(対象PUのサイズによる決定)
図20は、インター予測パラメータ復号部303が対象PUのサイズに基づいて動きベクトルを導出する制御点の数を決定する処理の一例を示すフローチャートである。図20に示す例では、インター予測パラメータ復号制御部3031は最初に、対象PUのサイズを示す値が所定の閾値以上であるか判定する(SD1)。対象PUのサイズが所定の閾値以上である場合(SD1でY)、アフィン予測部30372は6パラメータアフィンの処理を行う(SD2)。対象PUのサイズが所定の閾値以上でない場合(SD1でN)、アフィン予測部30372は4パラメータアフィンの処理を行う(SD3)。
(Decision by size of target PU)
FIG. 20 is a flowchart illustrating an example of processing in which the inter prediction parameter decoding unit 303 determines the number of control points for deriving a motion vector based on the size of the target PU. In the example illustrated in FIG. 20, the inter prediction parameter decoding control unit 3031 first determines whether the value indicating the size of the target PU is equal to or greater than a predetermined threshold (SD1). If the size of the target PU is equal to or greater than the predetermined threshold (Y in SD1), the affine prediction unit 30372 performs six-parameter affine processing (SD2). If the size of the target PU is not equal to or larger than the predetermined threshold (N in SD1), the affine prediction unit 30372 performs 4-parameter affine processing (SD3).

対象PUのサイズを示す値としては、例えば以下のものを用いることができる。
・max(puWidth, puHeight)
・min(puWidth, puHeight)
・puWidth + puHeight
・puWidth * puHeight
・log2(puWidth) + log2(puHeight)
ただし、対象PUのサイズを示す値は上記の例に限定されない。
For example, the following can be used as a value indicating the size of the target PU.
Max (puWidth, puHeight)
・ Min (puWidth, puHeight)
-PuWidth + puHeight
・ PuWidth * puHeight
・ Log2 (puWidth) + log2 (puHeight)
However, the value indicating the size of the target PU is not limited to the above example.

また、SD1における判定は以下のものであってもよい。
・対象PUのサイズが所定の閾値より大きいか。
・対象PUのサイズが所定の閾値以下であるか。
・対象PUのサイズが所定の閾値より小さいか。
Further, the determination in SD1 may be as follows.
Whether the size of the target PU is larger than a predetermined threshold value.
• Whether the size of the target PU is less than or equal to a predetermined threshold value.
• Whether the size of the target PU is smaller than a predetermined threshold.

図21は、インター予測パラメータ復号部303が対象PUのサイズに基づいて動きベクトルを導出する制御点の数を決定する処理の、別の例を示すフローチャートである。図21に示す例では、AMVPの場合において、対象PUのサイズが大きいには、6パラメータアフィンと4パラメータアフィンを示すフラグであるPUアフィンモードフラグを復号し、それ以外の場合には、PUアフィンモードフラグを復号しない。より、具体的には、図19に示した例と同様、インター予測パラメータ復号制御部3031は最初に、マージフラグが1であるか判定する(SE1)。マージフラグが0である場合(SE1でN)、インター予測パラメータ復号制御部3031は対象PUのサイズが所定の閾値以上であるか判定する(SE2)。SE2の判定結果に基づいて、インター予測パラメータ復号部303はSE3〜SE6の処理を行う。SE3〜SE6の処理はそれぞれ、図19に示したSC3〜SC6の処理と同様である。   FIG. 21 is a flowchart illustrating another example of processing in which the inter prediction parameter decoding unit 303 determines the number of control points for deriving the motion vector based on the size of the target PU. In the example shown in FIG. 21, in the case of AMVP, the PU affine mode flag, which is a flag indicating 6 parameter affine and 4 parameter affine, is decoded to increase the size of the target PU; Do not decode mode flags. More specifically, as in the example shown in FIG. 19, the inter prediction parameter decoding control unit 3031 first determines whether the merge flag is 1 (SE1). If the merge flag is 0 (N in SE1), the inter prediction parameter decoding control unit 3031 determines whether the size of the target PU is equal to or more than a predetermined threshold (SE2). The inter prediction parameter decoding unit 303 performs the processing of SE3 to SE6 based on the determination result of SE2. The processes of SE3 to SE6 are similar to the processes of SC3 to SC6 shown in FIG.

図22は、対象PUのサイズを示す値としてlog2(puWidth) + log2(puHeight)を用いた場合の、サイズごとの処理を示す表である。図22に示す例では、判定の閾値を8としている。この場合、図22に示す例では、log2(puWidth) + log2(puHeight)が6または7であれば、アフィン予測部30372は対象PUの形状に関わらず4パラメータアフィンの処理を行う。また、log2(puWidth) + log2(puHeight)が8であれば、アフィン予測部30372は対象PUの形状に関わらず6パラメータアフィンの処理を行う。   FIG. 22 is a table showing processing for each size when log2 (puWidth) + log2 (puHeight) is used as a value indicating the size of the target PU. In the example shown in FIG. 22, the threshold value for determination is eight. In this case, in the example shown in FIG. 22, if log2 (puWidth) + log2 (puHeight) is 6 or 7, the affine prediction unit 30372 performs 4-parameter affine processing regardless of the shape of the target PU. Further, if log2 (puWidth) + log2 (puHeight) is 8, the affine prediction unit 30372 performs 6-parameter affine processing regardless of the shape of the target PU.

図23は、対象PUのサイズを示す値としてmin(puWidth, puHeight)を用いた場合の、サイズごとの処理を示す表である。図23に示す例では、判定の閾値を8としている。この場合、図23に示すように、min(puWidth, puHeight)が4であれば、アフィン予測部30372は対象PUの形状に関わらず4パラメータアフィンの処理を行う。また、min(puWidth, puHeight)が8または16であれば、アフィン予測部30372は対象PUの形状に関わらず6パラメータアフィンの処理を行う。   FIG. 23 is a table showing processing for each size when min (puWidth, puHeight) is used as a value indicating the size of the target PU. In the example shown in FIG. 23, the threshold value for determination is eight. In this case, as shown in FIG. 23, if min (puWidth, puHeight) is 4, the affine prediction unit 30372 performs the 4-parameter affine process regardless of the shape of the target PU. If min (puWidth, puHeight) is 8 or 16, the affine prediction unit 30372 performs 6-parameter affine processing regardless of the shape of the target PU.

本構成ではインター予測パラメータ復号部303は、対象ブロックのサイズに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替える。AMVPに適用する場合には、SE1で、対象ブロックのサイズに応じて2点の動きベクトル(差分ベクトル)を符号化・復号するか、3点の動きベクトル(差分ベクトル)を符号化・復号するかを切り替えてもよい。マージに適用する場合には、SE1で、対象ブロックのサイズに応じて2点の動きベクトルを参照して制御点の動きベクトルを導出するか、3点の動きベクトルを参照して制御点の動きベクトルを導出するかを切り替えてもよい。またSE2では、対象ブロックのサイズに応じて2点の動きベクトルを参照して各サブブロックの動きベクトルを導出するか、3点の動きベクトルを参照して各サブブロックの動きベクトルを導出するか、を切り替えてもよい。   In this configuration, the inter prediction parameter decoding unit 303 calculates motion vectors of two control points according to the size of the target block and performs four parameter affine processing, or calculates motion vectors of three control points. 6 Switch whether to process parameter affine. When applied to AMVP, at SE1, either encode / decode two motion vectors (difference vectors) according to the size of the target block, or encode / decode three motion vectors (difference vectors) You may switch between When applying to merging, in SE1, the motion vector of the control point is derived by referring to the motion vector of 2 points according to the size of the target block, or the motion of the control point is referred to by the motion vector of 3 points It may be switched whether to derive a vector. In SE2, whether to derive the motion vector of each sub block with reference to the motion vector of 2 points according to the size of the target block or to derive the motion vector of each sub block with reference to the motion vector of 3 points , May be switched.

(対象PUの形状およびサイズによる決定)
図24は、インター予測パラメータ復号部303が対象PUの形状およびサイズの両方に基づいて動きベクトルを導出する制御点の数を決定する処理の一例を示すフローチャートである。図24に示す例では、インター予測パラメータ復号制御部3031は最初に、対象PUのサイズが所定の閾値以上であるか判定する(SF1)。対象PUのサイズが所定の閾値以上である場合(SF1でY)、アフィン予測部30372は6パラメータアフィンの処理を行う(SF3)。
(Determined by shape and size of target PU)
FIG. 24 is a flowchart illustrating an example of processing in which the inter prediction parameter decoding unit 303 determines the number of control points for deriving a motion vector based on both the shape and the size of the target PU. In the example illustrated in FIG. 24, the inter prediction parameter decoding control unit 3031 first determines whether the size of the target PU is equal to or larger than a predetermined threshold (SF1). If the size of the target PU is equal to or larger than the predetermined threshold (Y in SF1), the affine prediction unit 30372 performs six-parameter affine processing (SF3).

対象PUのサイズが所定の閾値以上でない場合(SF1でN)、インター予測パラメータ復号制御部3031は続けて対象PUの幅と対象PUの高さとが等しいか判定する(SF2)。対象PUの幅と対象PUの高さとが等しい場合(SF2でY)、アフィン予測部30372は6パラメータアフィンの処理を行う(SF3)。対象PUの幅と対象PUの高さとが等しくない場合(SF2でN)、アフィン予測部30372は4パラメータアフィンの処理を行う(SF4)。   If the size of the target PU is not equal to or larger than the predetermined threshold (N in SF1), the inter prediction parameter decoding control unit 3031 continues to determine whether the width of the target PU and the height of the target PU are equal (SF2). If the width of the target PU and the height of the target PU are equal (Y in SF2), the affine prediction unit 30372 performs six-parameter affine processing (SF3). If the width of the target PU and the height of the target PU are not equal (N in SF2), the affine prediction unit 30372 performs 4-parameter affine processing (SF4).

すなわち、図24に示す例では、対象PUが所定のサイズ以上であるか、または正方形である場合に、アフィン予測部30372は6パラメータアフィンの処理を行う。一方、対象PUが所定のサイズより小さく、かつ正方形でない場合に、アフィン予測部30372は4パラメータアフィンの処理を行う。   That is, in the example shown in FIG. 24, when the target PU is equal to or larger than a predetermined size or is a square, the affine prediction unit 30372 performs six parameter affine processing. On the other hand, when the target PU is smaller than a predetermined size and is not square, the affine prediction unit 30372 performs 4-parameter affine processing.

図25は、インター予測パラメータ復号部303が対象PUの形状およびサイズの両方に基づいて動きベクトルを導出する制御点の数を決定する処理の、別の例を示すフローチャートである。図25に示す例では、図19および図21に示した例と同様、インター予測パラメータ復号制御部3031は最初に、マージフラグが1であるか判定する(SG1)。マージフラグが0である場合(SE1でN)、インター予測パラメータ復号制御部3031は図24に示したSF1およびSF2と同様に、対象PUのサイズおよび形状について判定を行う(SG2、SG3)。対象PUのサイズが所定の閾値以上である場合(SG2でY)、または対象PUのサイズが所定の閾値以上でなく(SG2でN)、かつ対象PUが正方形である場合(SG3でY)、アフィン予測部30372はSG4〜SG7の処理(図19に示したSC3〜SC6と同様)を行う。   FIG. 25 is a flowchart illustrating another example of processing in which the inter prediction parameter decoding unit 303 determines the number of control points for deriving a motion vector based on both the shape and the size of the target PU. In the example shown in FIG. 25, the inter prediction parameter decoding control unit 3031 first determines whether the merge flag is 1 (SG1), as in the examples shown in FIGS. If the merge flag is 0 (N in SE1), the inter prediction parameter decoding control unit 3031 determines the size and shape of the target PU, as in SF1 and SF2 shown in FIG. 24 (SG2, SG3). When the size of the target PU is equal to or larger than the predetermined threshold (Y in SG2), or when the size of the target PU is not equal to or larger than the predetermined threshold (N in SG2) and the target PU is square (Y in SG3), The affine prediction unit 30372 performs the processes of SG4 to SG7 (similar to SC3 to SC6 illustrated in FIG. 19).

図26は、対象PUのサイズおよび形状ごとの、アフィン予測部30372の処理の一例を示す表である。図26に示す例では、対象PUのサイズを示す値としてlog2(puWidth) + log2(puHeight)を用い、閾値を8としている。   FIG. 26 is a table showing an example of processing of the affine prediction unit 30372 for each size and shape of the target PU. In the example illustrated in FIG. 26, log2 (puWidth) + log2 (puHeight) is used as a value indicating the size of the target PU, and the threshold is set to 8.

図26に示す例では、対象PUのサイズを示す値が6または7である場合には、対称PUが正方形である場合(図26では8*8である場合)のみアフィン予測部30372は6パラメータアフィンの処理を行う。それ以外の場合には、アフィン予測部30372は4パラメータアフィンの処理を行う。一方、対象PUのサイズが8である場合には、対象PUの形状に関わらず、アフィン予測部30372は6パラメータアフィンの処理を行う。   In the example shown in FIG. 26, when the value indicating the size of the target PU is 6 or 7, the affine prediction unit 30372 has six parameters only when the symmetric PU is a square (8 * 8 in FIG. 26). Perform affine processing. Otherwise, the affine prediction unit 30372 performs four-parameter affine processing. On the other hand, when the size of the target PU is 8, the affine prediction unit 30372 performs six-parameter affine processing regardless of the shape of the target PU.

図27は、対象PUのサイズおよび形状ごとの、アフィン予測部30372の処理の別の例を示す表である。図27に示す例では、対象PUのサイズを示す値としてmin(puWidth, puHeight)を用い、閾値を16としている。   FIG. 27 is a table illustrating another example of processing of the affine prediction unit 30372 for each size and shape of the target PU. In the example illustrated in FIG. 27, min (puWidth, puHeight) is used as a value indicating the size of the target PU, and the threshold is set to 16.

図27に示す例では、対象PUのサイズを示す値が4または8である場合には、対象PUが正方形である場合(図27では8*8である場合)のみアフィン予測部30372は6パラメータアフィンの処理を行う。それ以外の場合には、アフィン予測部30372は4パラメータアフィンの処理を行う。一方、対象PUのサイズが16である場合には、アフィン予測部30372は6パラメータアフィンの処理を行う。   In the example shown in FIG. 27, when the value indicating the size of the target PU is 4 or 8, the affine prediction unit 30372 has six parameters only when the target PU is a square (8 * 8 in FIG. 27). Perform affine processing. Otherwise, the affine prediction unit 30372 performs four-parameter affine processing. On the other hand, when the size of the target PU is 16, the affine prediction unit 30372 performs six-parameter affine processing.

本構成ではインター予測パラメータ復号部303は、対象ブロックの形状とサイズに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替える。AMVPに適用する場合には、SG1で、対象ブロックの形状とサイズに応じて2点の動きベクトル(差分ベクトル)を符号化・復号するか、3点の動きベクトル(差分ベクトル)を符号化・復号するかを切り替えてもよい。マージに適用する場合には、SG1で、対象ブロックの形状とサイズに応じて2点の動きベクトルを参照して制御点の動きベクトルを導出するか、3点の動きベクトルを参照して制御点の動きベクトルを導出するかを切り替えてもよい。またSG2では、対象ブロックの形状とサイズに応じて2点の動きベクトルを参照して各サブブロックの動きベクトルを導出するか、3点の動きベクトルを参照して各サブブロックの動きベクトルを導出するか、を切り替えてもよい。   In this configuration, the inter prediction parameter decoding unit 303 calculates motion vectors of two control points and performs four parameter affine processing according to the shape and size of the target block, or calculates motion vectors of three control points. Switch whether to process 6 parameters affine. When applied to AMVP, SG1 encodes or decodes two motion vectors (difference vectors) according to the shape and size of the target block, or encodes three motion vectors (difference vectors) You may switch whether to decode. When applied to merging, SG1 refers to two motion vectors according to the shape and size of the target block to derive motion vectors of control points, or refers to three motion vectors to control points It may be switched whether to derive a motion vector of In SG2, the motion vector of each sub block is derived with reference to the motion vector of 2 points according to the shape and size of the target block, or the motion vector of each sub block is derived with reference to the motion vector of 3 points You may switch between.

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

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

図14の(a)に示すように、バイラテラルマッチングでは、対象ピクチャCur_PicにおけるサブブロックCur_blockの動きベクトルを導出するために、2枚の参照画像が参照される。より具体的には、まず、サブブロックCur_blockの座標を(xCur,yCur)と表現したとき、参照ピクチャインデックスRef0によって指定される参照画像(参照ピクチャAと呼ぶ)内の領域であって、
(xPos0,yPos0)=(xCur + MV0_x, yCur + MV0_y)
によって特定される左上座標(xPos0,yPos0)を有するBlock_Aと、参照ピクチャインデックスRef1によって指定される参照画像(参照ピクチャBと呼ぶ)内の領域であって、
(xPos1,yPos1)=(xCur+MV1_x, xCur+MV1_y)=(xCur - MV0_x * TD1/TD0, yCur - MV0_y * TD1/TD0)
によって特定される左上座標(xPos1,yPos1)を有するBlock_Bとが設定される。ここで、TD0、及びTD1は、図14の(a)に示すように、それぞれ、対象ピクチャCur_Picと参照ピクチャAとのピクチャ間距離、及び対象ピクチャCur_Picと参照ピクチャBとのピクチャ間距離を表している。
As shown in (a) of FIG. 14, in bilateral matching, two reference images are referred to in order to derive a motion vector of a sub block Cur_block in a target picture Cur_Pic. More specifically, first, when the coordinates of the sub-block Cur_block are expressed as (xCur, yCur), it is an area in a reference image (referred to as a reference picture A) specified by the reference picture index Ref0
(XPos0, yPos0) = (xCur + MV0_x, yCur + MV0_y)
And an area in a reference image (referred to as a reference picture B) specified by a reference picture index Ref1 and Block_A having upper left coordinates (xPos0, yPos0) specified by
(XPos1, yPos1) = (xCur + MV1_x, xCur + MV1_y) = (xCur-MV0_x * TD1 / TD0, yCur-MV0_y * TD1 / TD0)
And Block_B having the upper left coordinates (xPos1, yPos1) specified by. Here, TD0 and TD1 represent the inter-picture distance between the target picture Cur_Pic and the reference picture A and the inter-picture distance between the target picture Cur_Pic and the reference picture B, respectively, as shown in FIG. ing.

次に、Block_AとBlock_Bとのマッチングコストが最小となるように、(MV0_x,MV0_y)が決定される。このようにして導出された(MV0_x,MV0_y)が、サブブロックに付与される動きベクトルとなる。   Next, (MV0_x, MV0_y) is determined such that the matching cost between Block_A and Block_B is minimized. The (MV0_x, MV0_y) derived in this manner is the motion vector assigned to the sub block.

一方、図14の(b)は、上記マッチング処理のうち、テンプレートマッチング(Template matching)について説明するための図である。   On the other hand, (b) of FIG. 14 is a figure for demonstrating template matching (Template matching) among the said matching processes.

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

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

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

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

図7は、本実施形態に係るマージ予測パラメータ導出部3036の構成を示す概略図である。マージ予測パラメータ導出部3036は、マージ候補導出部30361とマージ候補選択部30362、マージ候補格納部30363を備える。マージ候補格納部30363は、マージ候補導出部30361から入力されたマージ候補を格納する。なお、マージ候補は、予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLXを含んで構成されている。マージ候補格納部30363において、格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。   FIG. 7 is a schematic view showing the configuration of the merge prediction parameter derivation 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 merge candidate is configured to include 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をそのまま用いてマージ候補を導出する。それ以外にアフィン予測を用いてマージ候補を導出してもよい。この方法を以下で詳細に説明する。マージ候補導出部30361は、アフィン予測を、後述する空間マージ候補導出処理、時間マージ候補導出処理、結合マージ候補導出処理、およびゼロマージ候補導出処理に用いてもよい。なお、アフィン予測はサブブロック単位で行われ、予測パラメータはサブブロック毎に予測パラメータメモリ307に格納されている。あるいは、アフィン予測は画素単位で行われてもよい。   The merge candidate derivation unit 30361 derives merge candidates using the motion vector of the adjacent PU for which the decoding process has already been performed and the reference picture index refIdxLX as it is. Alternatively, merge candidates may be derived using affine prediction. This method is described in detail below. The merge candidate derivation unit 30361 may use affine prediction for spatial merge candidate derivation processing, temporal merge candidate derivation processing, combined merge candidate derivation processing, and zero merge candidate derivation processing described later. Affine prediction is performed in units of subblocks, and prediction parameters are stored in the prediction parameter memory 307 for each subblock. Alternatively, affine prediction may be performed pixel by pixel.

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

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

(結合マージ候補導出処理)
結合マージ導出処理として、マージ候補導出部30361は、既に導出され、マージ候補格納部30363に格納された2つの異なる導出済マージ候補の動きベクトルと参照ピクチャインデックスを、それぞれL0、L1の動きベクトルとして組み合わせることで結合マージ候補を導出する。マージ候補導出部30361によって導出されたマージ候補はマージ候補格納部30363に格納される。
(Joining merge candidate derivation process)
As the merge merge derivation process, the merge candidate derivation unit 30361 sets the motion vector and reference picture index of two different derived merge candidates that are already derived and stored in the merge candidate storage unit 30363 as L0 and L1 motion vectors, respectively. Combining merge candidates are derived. The merge candidate derived by the merge candidate derivation unit 30361 is stored in the merge candidate storage unit 30363.

(ゼロマージ候補導出処理)
ゼロマージ候補導出処理として、マージ候補導出部30361は、参照ピクチャインデックスrefIdxLXが0であり、動きベクトルmvLXのX成分、Y成分が共に0であるマージ候補を導出する。マージ候補導出部30361によって導出されたマージ候補はマージ候補格納部30363に格納される。
(Zero merge candidate derivation process)
As the zero merge candidate derivation process, the merge candidate derivation unit 30361 derives a merge candidate in which the reference picture index refIdxLX is 0 and both the X component and the Y component of the motion vector mvLX are 0. The merge candidate derived by the merge candidate derivation unit 30361 is stored in the merge candidate storage unit 30363.

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

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

ベクトル候補選択部3034は、予測ベクトル候補リストmvpListLX[]の予測ベクトル候補のうち予測ベクトルインデックスmvp_LX_idxが示す動きベクトルmvpListLX[mvp_LX_idx]を予測ベクトルmvpLXとして選択する。ベクトル候補選択部3034は、選択した予測ベクトルmvpLXを加算部3035に出力する。   The vector candidate selection unit 3034 selects a 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 a prediction vector mvpLX. The vector candidate selection unit 3034 outputs the selected prediction vector mvpLX to the addition unit 3035.

なお、予測ベクトル候補は、復号処理が完了したPUであって、対象PUから予め定めた範囲のPU(例えば、隣接PU)の動きベクトルをスケーリングすることで導出する。なお、隣接PUは、対象PUに空間的に隣接するPU、例えば、左PU、上PUの他、対象PUに時間的に隣接する領域、例えば、対象PUと同じ位置を含み、表示時刻が異なるPUの予測パラメータから得られた領域を含む。   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 target PU. Note that the adjacent PU includes a PU spatially adjacent to the target PU, for example, a left PU, an upper PU, and an area temporally adjacent to the target PU, for example, the same position as the target PU, and the display time is different. It contains the region obtained from the prediction parameters of PU.

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

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

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

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

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).
Also, when both of the reference list use flags (predFlagL0 and predFlagL1) are 1 (in the case of bi-predictive BiPred), and weight prediction is not used, the input motion compensated images predSamplesL0 and predSamplesL1 are averaged and the number of pixel bits Perform the processing of the following formula according to.

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-bit Depth, offset2 = 1 << (shift2-1).

さらに、単予測の場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0とオフセットo0を符号化データから導出し、以下の式の処理を行う。   Furthermore, in the case of single prediction, in the case of performing weight prediction, the weight prediction unit 3094 derives the weight prediction coefficient w0 and the 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, in the case of performing weight prediction, the weight prediction unit 3094 derives weight prediction coefficients w0, w1, o0, and o1 from encoded data, and performs the processing of the following formula.

predSamples[X][Y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesL0 [X][Y] * w0 + predSamplesL1[X][Y] * w1 + ((o0 + o1 + 1) << log2WD) ) >> (log2WD + 1) )
<動きベクトル復号処理>
以下では、図9を参照して、本実施形態に係る動きベクトル復号処理について具体的に説明する。
predSamples [X] [Y] = Clip 3 (0, (1 << bitDepth)-1, (predSamplesL0 [X] [Y] * w0 + predSamplesL1 [X] [Y] * w1 + ((o0 + o1 + 1) << log 2 WD)) >> (log 2 WD + 1))
<Motion vector decoding process>
The motion vector decoding process according to the present embodiment will be specifically described below with reference to FIG.

上述の説明から明らかなように、本実施形態に係る動きベクトル復号処理は、インター予測に関連するシンタックス要素を復号する処理(動きシンタックス復号処理とも呼ぶ)と、動きベクトルを導出する処理(動きベクトル導出処理)とを含んでいる。   As apparent from the above description, in the motion vector decoding process according to the present embodiment, a process of decoding syntax elements related to inter prediction (also referred to as motion syntax decoding process) and a process of deriving a motion vector ( Motion vector derivation processing).

(動きシンタックス復号処理)
図9は、インター予測パラメータ復号制御部3031によって行われるインター予測シンタックス復号処理の流れを示すフローチャートである。図9の説明における以下の説明において、特に明示のない場合、各処理はインター予測パラメータ復号制御部3031によって行われる。
(Motion syntax decoding process)
FIG. 9 is a flowchart showing a flow of inter prediction syntax decoding processing performed by the inter prediction parameter decoding control unit 3031. In the following description of the description of FIG. 9, each processing is performed by the inter prediction parameter decoding control unit 3031 unless otherwise specified.

まず、ステップS101において、マージフラグmerge_flagが復号され、ステップS102において、
merge_flag != 0(merge_flagが0でないか)
が判断される。
First, in step S101, merge flag merge_flag is decoded, and in step S102,
merge_flag! = 0 (whether merge_flag is not 0)
Is judged.

merge_flag !=0 が真(S102でY)の場合、S103においてマージインデックスmerge_idxが復号され、マージモードにおける動きベクトル導出処理(S111)を実行する。   If merge_flag! = 0 is true (Y in S102), the merge index merge_idx is decoded in S103, and motion vector derivation processing in merge mode (S111) is performed.

merge_flag!=0 が偽(S102でN)の場合、S104においてインター予測識別子inter_pred_idcを復号する。   If merge_flag! = 0 is false (N in S102), the inter prediction identifier inter_pred_idc is decoded in S104.

inter_pred_idcがPRED_L1以外(PRED_L0もしくはPRED_BI)の場合、S105、S106、S107において、参照ピクチャインデックスrefIdxL0、差分ベクトルのパラメータmvdL0、予測ベクトルインデックスmvp_L0_idxが各々復号される。   When inter_pred_idc is other than PRED_L1 (PRED_L0 or PRED_BI), the reference picture index refIdxL0, the difference vector parameter mvdL0, and the prediction vector index mvp_L0_idx are respectively decoded in S105, S106, and S107.

inter_pred_idcがPRED_L0以外(PRED_L1もしくはPRED_BI)の場合、S108、S109、S110において、参照ピクチャインデックスrefIdxL1、差分ベクトルのパラメータmvdL1、予測ベクトルインデックスmvp_L1_idxが復号される。続いて、AMVPモードにおける動きベクトル導出処理(S112)を実行する。   When inter_pred_idc is other than PRED_L0 (PRED_L1 or PRED_BI), in S108, S109, and S110, the reference picture index refIdxL1, the difference vector parameter mvdL1, and the prediction vector index mvp_L1_idx are decoded. Subsequently, motion vector derivation processing (S112) in the AMVP mode is executed.

(画像復号装置の効果)
本実施形態の画像復号装置31において、アフィン予測部30372は、対象PUの形状または/およびサイズに基づいて、4パラメータアフィンまたは6パラメータアフィンのいずれかの処理を行う。したがって、信頼性の高いアフィンパラメータを導出できる。また、アフィンパラメータを明示的に符号化する場合の符号量を低減することもできる。
(Effect of image decoding device)
In the image decoding device 31 according to the present embodiment, the affine prediction unit 30372 performs either 4-parameter affine or 6-parameter affine processing based on the shape and / or size of the target PU. Therefore, highly reliable affine parameters can be derived. In addition, it is possible to reduce the amount of code in the case of explicitly encoding affine parameters.

(第2の実施形態)
以下、本発明の第2の実施形態について説明する。第1の実施形態では、インター予測パラメータ復号部303は、対象PUの形状またはサイズ等に基づいて、4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定した。本実施形態では、インター予測パラメータ復号部303は、対象PUに隣接するブロック(隣接ブロック、マージの場合、マージ参照ブロック)の形状またはサイズ等に基づいて、4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定する。なお、インター予測パラメータ復号部303の構成は、実施形態1において説明したものと同様であるため、改めて説明することはしない。
Second Embodiment
Hereinafter, a second embodiment of the present invention will be described. In the first embodiment, the inter prediction parameter decoding unit 303 determines which of the four-parameter affine and the six-parameter affine to perform based on the shape, size, and the like of the target PU. In the present embodiment, the inter prediction parameter decoding unit 303 determines which of the four parameter affine and the six parameter affine based on the shape or size of the block (adjacent block, merge reference block in the case of merge, etc.) adjacent to the target PU. Decide whether to process. The configuration of the inter prediction parameter decoding unit 303 is the same as that described in the first embodiment, and thus will not be described again.

図28は、インター予測パラメータ復号部303が隣接ブロックの形状に基づいて4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定する処理の一例を示すフローチャートである。図28に示す例では、インター予測パラメータ復号部303において、まずインター予測パラメータ復号制御部3031は、隣接ブロックの幅(neighWidth)と高さ(neighHeight)とが等しいかを判定する(SH1)。なお、図28、および後述する図29においては、neighWidthおよびneighHeightについて、それぞれwidthおよびheightと記載されている。   FIG. 28 is a flowchart showing an example of processing in which the inter prediction parameter decoding unit 303 determines which of the four parameter affine and the six parameter affine to perform based on the shape of the adjacent block. In the example shown in FIG. 28, in the inter prediction parameter decoding unit 303, the inter prediction parameter decoding control unit 3031 first determines whether the width (neighWidth) and height (neighHeight) of the adjacent block are equal (SH1). In FIG. 28 and FIG. 29 described later, neighWidth and neighHeight are described as width and height, respectively.

隣接ブロックの幅と高さとが等しい場合(SH1でY)、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は6パラメータアフィンの処理を行う(SH2)。対象PUの幅と対象PUの高さとが等しくない場合(SH1でN)、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は4パラメータアフィンの処理を行う(SH3)。   If the width and height of the adjacent block are equal (Y in SH1), the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 6-parameter affine processing (SH2). If the width of the target PU and the height of the target PU are not equal (N in SH1), the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 4-parameter affine processing (SH3).

(マージ参照ブロックの形状による決定)
図29は、図28に示した処理による制御点の数の選択の例について説明するための図である。図29において、PUは対象PUを、RBは隣接ブロックをそれぞれ示す。
(Determined by the shape of the merge reference block)
FIG. 29 is a diagram for describing an example of selection of the number of control points by the process shown in FIG. In FIG. 29, PU indicates a target PU, and RB indicates an adjacent block.

図29の(a)に示す例では、隣接ブロックの幅と高さとは等しくない。したがって、アフィン予測部30372は隣接ブロック上の2つの動きベクトル(例えばv2およびv3)を参照し対象ブロック上の制御点2点(例えばV1およびV2)の動きベクトルを導出し、4パラメータアフィンの処理を実行する。   In the example shown in FIG. 29A, the width and height of the adjacent block are not equal. Therefore, the affine prediction unit 30372 refers to two motion vectors (for example, v2 and v3) on the adjacent block, derives motion vectors for two control points (for example, V1 and V2) on the target block, and processes the four parameter affine. Run.

図29の(b)に示す例では、隣接ブロックの幅と高さとは等しくない。したがって、アフィン予測部30372は隣接ブロック上の2つの動きベクトル(例えばv1およびv3)を参照し対象ブロック上の制御点2点(例えばV1およびV2)の動きベクトルを導出し、4パラメータアフィンの処理を実行する。   In the example shown in (b) of FIG. 29, the width and height of the adjacent block are not equal. Therefore, the affine prediction unit 30372 refers to two motion vectors (for example, v1 and v3) on the adjacent block, derives motion vectors for two control points (for example, V1 and V2) on the target block, and processes the four parameter affine. Run.

図29の(c)に示す例では、隣接ブロックの幅と高さとは等しい。したがって、アフィン予測部30372は隣接ブロック上の3つの動きベクトル(例えばv1、v2およびv3)を参照し対象ブロック上の制御点3点(例えばV0、V1およびV2)の動きベクトルを導出し、6パラメータアフィンの処理を行う。   In the example shown in (c) of FIG. 29, the width and height of the adjacent block are equal. Therefore, the affine prediction unit 30372 derives motion vectors of three control points (for example, V0, V1 and V2) on the target block by referring to three motion vectors (for example, v1, v2 and v3) on adjacent blocks. Perform parameter affine processing.

図29の(d)に示す例では、隣接ブロックの幅と高さとは等しい。したがって、アフィン予測部30372は隣接ブロック上の3つの動きベクトル(例えばv0、v1およびv2)を参照し対象ブロック上の制御点3点(例えばV0、V1およびV2)の動きベクトルを導出し、6パラメータアフィンの処理を行う。   In the example shown in (d) of FIG. 29, the width and height of the adjacent block are equal. Therefore, the affine prediction unit 30372 derives motion vectors of three control points (for example, V0, V1 and V2) on the target block by referring to three motion vectors (for example, v0, v1 and v2) on adjacent blocks. Perform parameter affine processing.

なお、図29の(a)〜(d)の説明で、アフィン予測部30372が4パラメータアフィンまたは6パラメータアフィンの処理を行う説明をしたが、AMVP予測パラメータ復号部3032が4パラメータアフィンまたは6パラメータアフィンの処理を行ってもよい。   In the description of (a) to (d) in FIG. 29, the affine prediction unit 30372 performs the processing of four parameter affine or six parameter affine, but the AMVP prediction parameter decoding unit 3032 performs four parameter affine or six parameter Affine processing may be performed.

(マージ参照ブロックのサイズによる決定)
図30は、インター予測パラメータ復号部303が隣接ブロックのサイズに基づいて4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定する処理の一例を示すフローチャートである。図30に示す例では、まずインター予測パラメータ復号制御部3031は、隣接ブロックのサイズを示す値が所定の閾値以上であるか判定する(SI1)。隣接ブロックのサイズを示す値が所定の閾値以上である場合(SI1でY)、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は6パラメータアフィンの処理を行う(SI2)。隣接ブロックのサイズを示す値が所定の閾値以上でない場合(SI1でN)、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は4パラメータアフィンの処理を行う(SI3)。
(Determined by the size of the merge reference block)
FIG. 30 is a flowchart showing an example of processing in which the inter prediction parameter decoding unit 303 determines which of the four parameter affine and the six parameter affine to perform based on the size of the adjacent block. In the example illustrated in FIG. 30, first, the inter prediction parameter decoding control unit 3031 determines whether the value indicating the size of the adjacent block is equal to or larger than a predetermined threshold (SI1). If the value indicating the size of the adjacent block is equal to or larger than the predetermined threshold (Y in SI1), the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs six parameter affine processing (SI2). If the value indicating the size of the adjacent block is not equal to or larger than the predetermined threshold (N in SI1), the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 4-parameter affine processing (SI3).

図31は、図30に示した処理による制御点の数の選択の例について説明するための図である。図31において、PUは対象PUを、RBは隣接ブロックをそれぞれ示す。以下の説明では、隣接ブロックのサイズを示す値として、log2(neighWidth) + log2(neighHeight)を用いている。   FIG. 31 is a diagram for describing an example of selection of the number of control points by the process shown in FIG. In FIG. 31, PU indicates a target PU, and RB indicates an adjacent block. In the following description, log2 (neighWidth) + log2 (neighHeight) is used as a value indicating the size of the adjacent block.

図31の(a)、(b)は、隣接ブロックのサイズが所定の閾値THより小さい例を示し、図31の(c)、(d)は、隣接ブロックのサイズが所定の閾値TH以上である例を示す。図31の例では、対象ブロックのサイズを8×8(log2(puWidth)+log2(puHeight)=6)、(a)、(b)、(c)、(d)の隣接ブロックのサイズは各々4×4、4×4、8×8、4×8、TH=5とした例を示すが、対象ブロックおよび参照ブロックのサイズおよび閾値はこれに限定されない。   (A) and (b) of FIG. 31 show an example in which the size of the adjacent block is smaller than the predetermined threshold TH, and in (c) and (d) of FIG. An example is shown. In the example of FIG. 31, the size of the target block is 8 × 8 (log 2 (pu Width) + log 2 (puHeight) = 6), (a), (b), (c), and (d)). Although an example in which 4 × 4, 4 × 4, 8 × 8, 4 × 8, and TH = 5 are shown, the sizes and thresholds of the target block and the reference block are not limited thereto.

図31の(a)に示す例では、隣接ブロックのサイズが所定の閾値THより小さい(log2(neighWidth) + log2(neighHeight) < TH)。したがって、アフィン予測部30372は隣接ブロック上の2つの動きベクトル(例えばv2およびv3)を参照し対象ブロック上の制御点2点(例えばV1およびV2)の動きベクトルを導出し、4パラメータアフィンの処理を実行する。   In the example shown in FIG. 31 (a), the size of the adjacent block is smaller than a predetermined threshold TH (log 2 (neighWidth) + log 2 (neighHeight) <TH). Therefore, the affine prediction unit 30372 refers to two motion vectors (for example, v2 and v3) on the adjacent block, derives motion vectors for two control points (for example, V1 and V2) on the target block, and processes the four parameter affine. Run.

図31の(b)に示す例では、隣接ブロックのサイズが所定の閾値THより小さい(log2(neighWidth) + log2(neighHeight) < TH)。したがって、アフィン予測部30372は隣接ブロック上の2つの動きベクトル(例えばv1およびv3)を参照し対象ブロック上の制御点2点(例えばV1およびV2)の動きベクトルを導出し、4パラメータアフィンの処理を実行する。   In the example illustrated in (b) of FIG. 31, the size of the adjacent block is smaller than a predetermined threshold TH (log 2 (neighWidth) + log 2 (neighHeight) <TH). Therefore, the affine prediction unit 30372 refers to two motion vectors (for example, v1 and v3) on the adjacent block, derives motion vectors for two control points (for example, V1 and V2) on the target block, and processes the four parameter affine. Run.

図31の(c)に示す例では、隣接ブロックのサイズが所定の閾値TH以上である(log2(neighWidth) + log2(neighHeight) >= TH)。したがって、アフィン予測部30372は隣接ブロック上の3つの動きベクトル(例えばv1、v2およびv3)を参照し対象ブロック上の制御点3点(例えばV0、V1およびV2)の動きベクトルを導出し、6パラメータアフィンの処理を行う。   In the example illustrated in (c) of FIG. 31, the size of the adjacent block is equal to or larger than a predetermined threshold TH (log 2 (neighWidth) + log 2 (neighHeight)> = TH). Therefore, the affine prediction unit 30372 derives motion vectors of three control points (for example, V0, V1 and V2) on the target block by referring to three motion vectors (for example, v1, v2 and v3) on adjacent blocks. Perform parameter affine processing.

図31の(d)に示す例では、隣接ブロックのサイズが所定の閾値TH以上である(log2(neighWidth) + log2(neighHeight) >= TH)。したがって、アフィン予測部30372は隣接ブロック上の3つの動きベクトル(例えばv0、v1およびv3)を参照し対象ブロック上の制御点3点(例えばV0、V1およびV2)の動きベクトルを導出し、6パラメータアフィンの処理を行う。   In the example illustrated in (d) of FIG. 31, the size of the adjacent block is equal to or larger than a predetermined threshold TH (log 2 (neighWidth) + log 2 (neighHeight)> = TH). Therefore, the affine prediction unit 30372 derives motion vectors of three control points (for example, V0, V1 and V2) on the target block by referring to three motion vectors (for example, v0, v1 and v3) on adjacent blocks. Perform parameter affine processing.

なお、対象PUのサイズを示す値としては、例えば以下のものを用いることができる。
・max(neighWidth, neighHeight)
・min(neighWidth, neighHeight)
・neighWidth + neighHeight
・neighWidth * neighHeight
・log2(neighWidth) + log2(neighHeight)
ただし、対象PUのサイズを示す値は上記の例に限定されない。
In addition, as a value which shows the size of object PU, the following can be used, for example.
・ Max (neighWidth, neighHeight)
・ Min (neighWidth, neighHeight)
・ NeighWidth + neighHeight
・ NeighWidth * neighHeight
・ Log 2 (neighWidth) + log 2 (neighHeight)
However, the value indicating the size of the target PU is not limited to the above example.

また、隣接ブロックのサイズにおける判定は以下のものであってもよい。
・対象PUのサイズが所定の閾値より大きいか。
・対象PUのサイズが所定の閾値以下であるか。
・対象PUのサイズが所定の閾値より小さいか。
Also, the determination on the size of the adjacent block may be as follows.
Whether the size of the target PU is larger than a predetermined threshold value.
• Whether the size of the target PU is less than or equal to a predetermined threshold value.
• Whether the size of the target PU is smaller than a predetermined threshold.

(画像復号装置の効果)
本実施形態の画像復号装置31において、アフィン予測部30372は、隣接ブロックの形状またはサイズに基づいて、4パラメータアフィンまたは6パラメータアフィンのいずれかの処理を行う。このようなインター予測パラメータ復号部303によっても、信頼性の高いアフィンパラメータを導出できる。また、アフィンパラメータを明示的に符号化する場合の符号量を低減することもできる。
(Effect of image decoding device)
In the image decoding device 31 according to the present embodiment, the affine prediction unit 30372 performs either 4-parameter affine or 6-parameter affine processing based on the shape or size of the adjacent block. Such an inter prediction parameter decoding unit 303 can also derive highly reliable affine parameters. In addition, it is possible to reduce the amount of code in the case of explicitly encoding affine parameters.

(第3の実施形態)
以下、本発明の第3の実施形態について説明する。第1の実施形態ではインター予測パラメータ復号部303は、対象PUの形状またはサイズ等に基づいて、4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定した。本実施形態は、4パラメータアフィンにおける制御点の選択に関するものである。本実施形態において、インター予測パラメータ復号部303は、4パラメータアフィンおよび6パラメータアフィンのいずれの処理を切り替えてもよいし、常に4パラメータアフィンの処理を行ってもよい。本実施形態のインター予測パラメータ復号部303は、対象PUの形状に基づいて、4パラメータアフィンに用いる動きベクトルを導出する制御点の位置を決定する。
Third Embodiment
Hereinafter, a third embodiment of the present invention will be described. In the first embodiment, the inter prediction parameter decoding unit 303 determines which of the four-parameter affine and the six-parameter affine to perform based on the shape, size, and the like of the target PU. This embodiment relates to the selection of control points in a four parameter affine. In the present embodiment, the inter prediction parameter decoding unit 303 may switch any of the four parameter affine and six parameter affine processes, or may always perform the four parameter affine process. The inter prediction parameter decoding unit 303 of the present embodiment determines the position of the control point for deriving the motion vector used for the four parameter affine, based on the shape of the target PU.

図32は、インター予測パラメータ復号部303が対象PUの形状に基づいて動きベクトルを導出する制御点の位置を決定する処理のフローチャートである。図32に示す例では、インター予測パラメータ復号部303において、まずインター予測パラメータ復号制御部3031は、対象PUが正方形であるかを判定する(SJ1)。対象PUが正方形である場合(SJ1でY)、インター予測パラメータ復号制御部3031は、対象PUの対角線上の2頂点を制御点とする(SJ2)。対象PUが正方形でない場合(SJ1でN)、インター予測パラメータ復号制御部3031は、対象PUの長辺を挟む2頂点を制御点とする(SJ3)。その後、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は選択された制御点により4パラメータアフィンの処理を行う(SJ4)。   FIG. 32 is a flowchart of processing in which the inter prediction parameter decoding unit 303 determines the position of a control point for deriving a motion vector based on the shape of a target PU. In the example shown in FIG. 32, in the inter prediction parameter decoding unit 303, the inter prediction parameter decoding control unit 3031 first determines whether the target PU is a square (SJ1). If the target PU is a square (Y in SJ1), the inter prediction parameter decoding control unit 3031 sets two vertices on the diagonal of the target PU as control points (SJ2). If the target PU is not a square (N in SJ1), the inter prediction parameter decoding control unit 3031 sets two vertices sandwiching the long side of the target PU as control points (SJ3). Thereafter, the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 4-parameter affine processing with the selected control point (SJ4).

図33は、本実施形態のインター予測パラメータ復号部303が決定する制御点の位置の例を示す図である。図33の(a)に示すように、対象PUの形状が正方形である場合には、インター予測パラメータ復号部303は対象PUの対角線上の2つの頂点(例えば制御点V1およびV2)を、4パラメータアフィンの処理に用いる制御点として決定する。   FIG. 33 is a diagram illustrating an example of the positions of control points determined by the inter prediction parameter decoding unit 303 according to the present embodiment. As shown in (a) of FIG. 33, when the shape of the target PU is a square, the inter prediction parameter decoding unit 303 sets two vertices (for example, control points V1 and V2) on the diagonal of the target PU to four. Determined as a control point to be used for parameter affine processing.

図33の(b)および(c)に示すように対象PUの形状が正方形でない場合には、インター予測パラメータ復号部303は対象PUの長辺を挟む2つの頂点を、4パラメータアフィンの処理に用いる制御点として決定する。具体的には、例えば図33の(b)に示す例では、インター予測パラメータ復号部303は制御点V0およびV2の動きベクトルを導出し、当該動きベクトルを4パラメータアフィンに用いる。また例えば図33の(c)に示す例では、インター予測パラメータ復号部303は制御点V0およびV1の動きベクトルを導出し、当該動きベクトルを4パラメータアフィンに用いる。   As shown in (b) and (c) of FIG. 33, when the shape of the target PU is not a square, the inter prediction parameter decoding unit 303 processes the two vertices sandwiching the long side of the target PU into a four-parameter affine process. Determined as the control point to be used. Specifically, for example, in the example shown in (b) of FIG. 33, the inter prediction parameter decoding unit 303 derives motion vectors of the control points V0 and V2, and uses the motion vectors for four parameter affine. Further, for example, in the example illustrated in (c) of FIG. 33, the inter prediction parameter decoding unit 303 derives motion vectors of control points V0 and V1, and uses the motion vectors for four-parameter affine.

本実施形態のインター予測パラメータ復号部303は、対象PUの形状によって制御点の位置を決定する。したがって、インター予測パラメータ復号部303が4パラメータアフィンに用いる動きベクトルの精度が向上する。   The inter prediction parameter decoding unit 303 of the present embodiment determines the position of the control point according to the shape of the target PU. Therefore, the accuracy of the motion vector used by the inter prediction parameter decoding unit 303 for the four parameter affine is improved.

なお、上記の例では、インター予測パラメータ復号部303は、対象PUの形状が、正方形、横長の長方形、縦長の長方形の場合の3つのパターンで、参照する制御点を切り替えていたが、より簡易な構成として、2つのパターンで制御点を切り替えてもよい。例えば、インター予測パラメータ復号部303は、対象PUの形状が、puWidth >= puHeightの場合、制御点V0およびV1を制御点として決定し、それ以外(puWidth < puHeight)の場合、制御点V0およびV2を制御点として決定する。また、以下のような構成でもよい。インター予測パラメータ復号部303は、対象PUの形状が、puWidth > puHeightの場合、制御点V0およびV1を制御点として決定し、それ以外(puWidth <= puHeight)の場合、制御点V0およびV2を制御点として決定する。   In the above example, the inter prediction parameter decoding unit 303 switches the control point to be referred to in the three patterns in the case where the shape of the target PU is a square, a horizontally long rectangle, or a vertically long rectangle. Alternatively, the control points may be switched in two patterns. For example, the inter prediction parameter decoding unit 303 determines the control points V0 and V1 as control points when the shape of the target PU is puWidth> = puHeight, and controls points V0 and V2 otherwise (puWidth <puHeight). As the control point. Also, the following configuration may be used. The inter prediction parameter decoding unit 303 determines the control points V0 and V1 as control points when the shape of the target PU is puWidth> puHeight, and otherwise controls the control points V0 and V2 (puWidth <= puHeight). Determined as a point.

(第4の実施形態)
以下、本発明の第4の実施形態について説明する。第2の実施形態ではインター予測パラメータ復号部303は、隣接ブロックの形状またはサイズ等に基づいて、4パラメータアフィンおよび6パラメータアフィンのいずれの処理を行うか決定した。本実施形態は、4パラメータアフィンにおける制御点の選択に関するものである。本実施形態において、インター予測パラメータ復号部303は、4パラメータアフィンおよび6パラメータアフィンのいずれの処理を切り替えてもよいし、常に4パラメータアフィンの処理を行ってもよい。このときインター予測パラメータ復号部303は、隣接ブロックの形状に応じて、4パラメータアフィンの処理に用いる制御点を変更する。具体的には、インター予測パラメータ復号部303は、隣接ブロックの形状に基づいて、4パラメータアフィンに用いる動きベクトルを導出する、隣接ブロック内の制御点の位置を決定する。
Fourth Embodiment
Hereinafter, a fourth embodiment of the present invention will be described. In the second embodiment, the inter prediction parameter decoding unit 303 determines which of the four-parameter affine and the six-parameter affine to perform based on the shape or the size of the adjacent block. This embodiment relates to the selection of control points in a four parameter affine. In the present embodiment, the inter prediction parameter decoding unit 303 may switch any of the four parameter affine and six parameter affine processes, or may always perform the four parameter affine process. At this time, the inter prediction parameter decoding unit 303 changes the control point used for the four parameter affine processing according to the shape of the adjacent block. Specifically, the inter prediction parameter decoding unit 303 determines, based on the shape of the adjacent block, the position of the control point in the adjacent block that derives the motion vector used for the four parameter affine.

図34は、インター予測パラメータ復号部303が隣接ブロックの形状に基づいて制御点の動きベクトルの導出に用いる隣接ブロックの点の位置を決定する処理のフローチャートである。図34に示す例では、インター予測パラメータ復号部303において、まずインター予測パラメータ復号制御部3031は、隣接ブロックが正方形であるかを判定する(SK1)。隣接ブロックが正方形である場合(SK1でY)、インター予測パラメータ復号制御部3031は、制御点の動きベクトルの導出に用いる点を、隣接ブロックの対角線上の2点に決定する(SK2)。隣接ブロックが正方形でない場合(SK1でN)、インター予測パラメータ復号制御部3031は、制御点の動きベクトルの導出に用いる点を、隣接ブロックの長辺を挟む2点に決定する(SK3)。その後、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は選択された隣接ブロックの点を用いて制御点の動きベクトルを導出し、4パラメータアフィンの処理を行う(SK4)。   FIG. 34 is a flowchart of processing in which the inter prediction parameter decoding unit 303 determines the position of the point of the adjacent block used to derive the motion vector of the control point based on the shape of the adjacent block. In the example shown in FIG. 34, in the inter prediction parameter decoding unit 303, the inter prediction parameter decoding control unit 3031 first determines whether the adjacent block is a square (SK1). If the adjacent block is a square (Y in SK1), the inter prediction parameter decoding control unit 3031 determines two points on the diagonal of the adjacent block to be used for deriving the motion vector of the control point (SK2). If the adjacent block is not a square (N in SK1), the inter prediction parameter decoding control unit 3031 determines the points used for deriving the motion vector of the control point to be two points across the long side of the adjacent block (SK3). Thereafter, the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) derives the motion vector of the control point using the point of the selected adjacent block, and performs 4-parameter affine processing (SK4).

図35は、本実施形態のインター予測パラメータ復号部303が決定する制御点の位置の例を示す図である。図35の(a)および(b)に示すように隣接ブロックの形状が正方形である場合には、インター予測パラメータ復号部303は隣接ブロックの対角線上の2つの頂点(例えば隣接ブロックの左上に位置する点v0および右下に位置する点v3)の動きベクトルを参照して対象ブロック上の制御点2点(例えばV1およびV2)の動きベクトルを導出し、4パラメータアフィンの処理を実行する。   FIG. 35 is a diagram illustrating an example of the positions of control points determined by the inter prediction parameter decoding unit 303 according to the present embodiment. As shown in (a) and (b) of FIG. 35, when the shape of the adjacent block is a square, the inter prediction parameter decoding unit 303 sets two vertices on the diagonal of the adjacent block (for example, positions at the upper left of the adjacent block) The motion vector of two control points (for example, V1 and V2) on the target block is derived with reference to the motion vector of the point v0 and the point v3 located at the lower right, and the processing of four parameter affine is executed.

図35の(c)〜(f)に示すように隣接ブロックの形状が長方形である場合には、インター予測パラメータ復号部303は、隣接ブロックの長辺を挟む2つの頂点の動きベクトルを参照して対象ブロック上の制御点2点(例えばV1およびV2)の動きベクトルを導出し、4パラメータアフィンの処理を実行する。例えば図35の(c)および(d)に示すように、隣接ブロックの形状が幅方向より高さ方向に長い長方形である場合には、インター予測パラメータ復号部303は隣接ブロックの高さ方向の辺の両端に位置する2つの点(例えば隣接ブロックの右上に位置する点v1および右下に位置する点v3)の動きベクトルを用いる。例えば図35の(e)および(f)に示すように、隣接ブロックの形状が高さ方向より幅方向に長い長方形である場合には、インター予測パラメータ復号部303は隣接ブロックの幅方向の辺の両端に位置する2つの点(例えば隣接ブロックの左下に位置する点v2および右下に位置する点v3)の動きベクトルを用いる。   As shown in (c) to (f) of FIG. 35, when the shape of the adjacent block is rectangular, the inter prediction parameter decoding unit 303 refers to the motion vector of the two vertices sandwiching the long side of the adjacent block. Then, motion vectors of two control points (for example, V1 and V2) on the target block are derived, and a four-parameter affine process is performed. For example, as shown in (c) and (d) of FIG. 35, when the shape of the adjacent block is a rectangle longer in the height direction than in the width direction, the inter prediction parameter decoding unit 303 determines whether the adjacent block has a height in the height direction. The motion vectors of two points located at both ends of the side (for example, point v1 located at the upper right of the adjacent block and point v3 located at the lower right) are used. For example, as shown in (e) and (f) of FIG. 35, when the shape of the adjacent block is a rectangle longer in the width direction than in the height direction, the inter prediction parameter decoding unit 303 determines the side in the width direction of the adjacent block. The motion vectors of two points located at both ends of (for example, point v2 located at the lower left of the adjacent block and point v3 located at the lower right) are used.

本実施形態のインター予測パラメータ復号部303は、隣接ブロックの形状によって、対象ブロック上の制御点2点の動きベクトルの導出に用いる隣接ブロック内の頂点の位置を決定する。このようなインター予測パラメータ復号部303によっても、当該インター予測パラメータ復号部303が4パラメータアフィンに用いる動きベクトルの精度が向上する。   The inter prediction parameter decoding unit 303 of the present embodiment determines the position of the vertex in the adjacent block used to derive the motion vectors of the two control points on the target block according to the shape of the adjacent block. Such an inter prediction parameter decoding unit 303 also improves the accuracy of the motion vector used by the inter prediction parameter decoding unit 303 for the four parameter affine.

(第5の実施形態)
以下、本発明の第5の実施形態について説明する。第4の実施形態ではインター予測パラメータ復号部303は、隣接ブロックの形状に基づいて、対象ブロック上の制御点2点の動きベクトルの導出に用いる隣接ブロック内の頂点の位置を決定した。本実施形態ではインター予測パラメータ復号部303は、隣接ブロックの形状に基づいて、対象PU内の制御点の位置を決定する。
Fifth Embodiment
Hereinafter, a fifth embodiment of the present invention will be described. In the fourth embodiment, the inter prediction parameter decoding unit 303 determines the position of the vertex in the adjacent block used to derive the motion vectors of the two control points on the target block based on the shape of the adjacent block. In the present embodiment, the inter prediction parameter decoding unit 303 determines the position of the control point in the target PU based on the shape of the adjacent block.

図36は、インター予測パラメータ復号部303が隣接ブロックの形状に基づいて動きベクトルを導出する制御点の位置を決定する処理のフローチャートである。図36に示す例では、インター予測パラメータ復号部303において、まずインター予測パラメータ復号制御部3031は、隣接ブロックが正方形であるかを判定する(SL1)。隣接ブロックが正方形である場合(SL1でY)、インター予測パラメータ復号制御部3031は、対象PUの対角線上の2頂点を制御点とする(SL2)。隣接ブロックが正方形でない場合(SL1でN)、インター予測パラメータ復号制御部3031は、隣接ブロックに隣接する対象PUの辺を挟む2頂点を制御点とする(SL3)。その後、アフィン予測部30372(またはAMVP予測パラメータ復号部3032)は選択された制御点により4パラメータアフィンの処理を行う(SL4)。   FIG. 36 is a flowchart of processing in which the inter prediction parameter decoding unit 303 determines the position of the control point from which the motion vector is derived based on the shape of the adjacent block. In the example shown in FIG. 36, in the inter prediction parameter decoding unit 303, the inter prediction parameter decoding control unit 3031 first determines whether the adjacent block is a square (SL1). If the adjacent block is a square (Y in SL1), the inter prediction parameter decoding control unit 3031 sets two vertices on the diagonal of the target PU as control points (SL2). If the adjacent block is not a square (N in SL1), the inter prediction parameter decoding control unit 3031 sets two vertices sandwiching the side of the target PU adjacent to the adjacent block as control points (SL3). Thereafter, the affine prediction unit 30372 (or the AMVP prediction parameter decoding unit 3032) performs 4-parameter affine processing with the selected control point (SL4).

図37は、本実施形態のインター予測パラメータ復号部303が決定する制御点の位置の例を示す図である。図37の(a)および(b)に示すように隣接ブロックの形状が正方形である場合には、インター予測パラメータ復号部303は対象PUの対角線上の2つの頂点(例えばV0およびV3)を、4パラメータアフィンに用いる制御点として決定する。   FIG. 37 is a diagram illustrating an example of the positions of control points determined by the inter prediction parameter decoding unit 303 according to the present embodiment. As shown in (a) and (b) of FIG. 37, when the shape of the adjacent block is a square, the inter prediction parameter decoding unit 303 sets two vertices (for example, V0 and V3) on the diagonal of the target PU, Determined as the control point used for 4-parameter affine.

図37の(c)〜(f)に示すように隣接ブロックの形状が長方形である場合には、インター予測パラメータ復号部303は、隣接ブロックに接している対象PUの辺を挟む2つの頂点を、4パラメータアフィンに用いる制御点として決定する。例えば図37の(c)および(e)に示すように、隣接ブロックが対象PUの左側の辺に接している場合には、インター予測パラメータ復号部303は隣接ブロックと接している対象PUの辺の両端に位置する2つの点(対象PUの左上に位置する点V1および左下に位置する点V3)を制御点とする。例えば図37の(d)または(f)に示すように、隣接ブロックが対象PUの上側の辺に接している場合には、インター予測パラメータ復号部303は隣接ブロックと接している対象PUの辺の両端に位置する2つの点(対象PUの左上に位置する点V0および右上に位置する点V1)を制御点とする。   If the shape of the adjacent block is rectangular as shown in (c) to (f) of FIG. 37, the inter prediction parameter decoding unit 303 sets two vertices that sandwich the side of the target PU in contact with the adjacent block. , And determined as control points to be used for 4-parameter affine. For example, as shown in (c) and (e) of FIG. 37, when the adjacent block is in contact with the left side of the target PU, the inter prediction parameter decoding unit 303 determines the side of the target PU in contact with the adjacent block. Two points located at both ends of (the point V1 located at the upper left of the object PU and the point V3 located at the lower left) are taken as control points. For example, as shown in (d) or (f) of FIG. 37, when the adjacent block is in contact with the upper side of the target PU, the inter prediction parameter decoding unit 303 determines the side of the target PU in contact with the adjacent block. Let two points (point V0 located at the upper left of the object PU and point V1 located at the upper right) located at both ends of the control point be control points.

本実施形態のインター予測パラメータ復号部303は、隣接ブロックの形状によって隣接ブロック内の制御点の位置を決定する。このようなインター予測パラメータ復号部303によっても、当該インター予測パラメータ復号部303が4パラメータアフィンに用いる動きベクトルの精度が向上する。   The inter prediction parameter decoding unit 303 of the present embodiment determines the position of the control point in the adjacent block according to the shape of the adjacent block. Such an inter prediction parameter decoding unit 303 also improves the accuracy of the motion vector used by the inter prediction parameter decoding unit 303 for the four parameter affine.

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

予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象PUを起点として動きベクトルが示す参照画像上の位置にあるブロックを読み出す。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。イントラ予測モードで使用する隣接PUの画素値を参照ピクチャメモリ109から読み出し、PUの予測画像Pを生成する。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてPUの予測画像Pを生成する。予測画像生成部101は、生成したPUの予測画像Pを減算部102に出力する。   The prediction image generation unit 101 generates, for each picture of the image T, the prediction image P of the prediction unit PU for each coding unit CU, which is an area obtained by dividing the picture. Here, the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter coding unit 111. The prediction parameter input from the prediction parameter coding unit 111 is, for example, a motion vector in the case of inter prediction. The predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector starting from the target PU. In the case of intra prediction, the prediction parameter is, for example, an intra prediction mode. The pixel value of the adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a PU predicted image P is generated. The prediction image generation unit 101 generates a PU prediction image P using one of a plurality of prediction methods for the read reference picture block. The prediction image generation unit 101 outputs the generated prediction image P of PU to the subtraction unit 102.

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

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

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

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

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

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

加算部106は、予測画像生成部101から入力されたPUの予測画像Pの信号値と逆量子化・逆DCT部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像を参照ピクチャメモリ109に記憶する。   The addition unit 106 adds, for each pixel, the signal value of the predicted image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse DCT unit 105 for decoding. Generate an image. The addition 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 in a predetermined position for each picture and CU to be coded.

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

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

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

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

インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。インター予測パラメータ符号化部112の構成については、後述する。   The inter prediction parameter coding unit 112 derives inter prediction parameters such as a difference vector based on the prediction parameters input from the coding parameter determination unit 110. The inter prediction parameter coding unit 112 derives the inter prediction parameter by the inter prediction parameter decoding unit 303 (refer to FIG. 5 and the like) as a configuration for deriving the parameters necessary for generating the prediction image to be output to the prediction image generation unit 101. Partially include the same configuration as the configuration. 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 format (for example, MPM_idx, rem_intra_luma_pred_mode, etc.) for coding from the intra prediction mode IntraPredMode input from the coding parameter determination unit 110.

(インター予測パラメータ符号化部の構成)
次に、インター予測パラメータ符号化部112の構成について説明する。インター予測パラメータ符号化部112は、図12のインター予測パラメータ復号部303に対応する手段であり、図10に構成を示す。
(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 means corresponding to the inter prediction parameter decoding unit 303 in FIG. 12, and the configuration is shown in FIG.

インター予測パラメータ符号化部112は、インター予測パラメータ符号化制御部1121、AMVP予測パラメータ導出部1122(アフィン動きベクトル導出部、アフィン動きベクトル導出装置)、減算部1123、サブブロック予測パラメータ導出部1125、及び図示しない、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部などを含んで構成され、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部は各々、PU分割モードpart_mode、マージフラグmerge_flag、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、差分ベクトルmvdLXを導出する。インター予測パラメータ符号化部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 (affine motion vector derivation unit, affine motion vector derivation device), a subtraction unit 1123, a sub block prediction parameter derivation unit 1125, And a division mode derivation unit, a merge flag derivation unit, an inter prediction identifier derivation unit, a reference picture index derivation unit, a vector difference derivation unit, etc. not shown, and a division mode derivation unit, a merge flag derivation unit, an inter prediction identifier The derivation unit, the reference picture index derivation unit, and the vector difference derivation unit respectively derive a PU division mode part_mode, a merge flag merge_flag, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, and a difference vector mvdLX. The inter prediction parameter coding unit 112 outputs the motion vector (mvLX, subMvLX), the reference picture index refIdxLX, the PU division mode part_mode, the inter prediction identifier inter_pred_idc, or information indicating these to the predicted image generation unit 101. In addition, the inter prediction parameter encoding unit 112 includes: 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, difference vector mvdLX, sub block prediction mode flag subPbMotionFlag 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 derivation unit 11211 and a vector candidate index derivation unit 11212. The merge index derivation unit 11211 compares the motion vector and reference picture index input from the coding parameter determination unit 110 with the motion vector and reference picture index of the PU of the merge candidate read from the prediction parameter memory 108, and merges The index merge_idx is derived and output to the entropy coding unit 104. The merge candidate is a reference PU in a predetermined range from the encoding target CU to be encoded (for example, a reference PU in contact with the lower left end, upper left end, upper right end of the encoding target block) It is PU which processing completed. The vector candidate index deriving unit 11212 derives a predicted vector index mvp_LX_idx.

サブブロック予測パラメータ導出部1125には、符号化パラメータ決定部110がサブブロック予測モードの使用を決定した場合、subPbMotionFlagの値に従って、空間サブブロック予測、時間サブブロック予測、アフィン予測、マッチング予測のいずれかのサブブロック予測の動きベクトルと参照ピクチャインデックスを導出する。動きベクトルと参照ピクチャインデックスは、画像復号装置の説明で述べたように、隣接PU、参照ピクチャブロック等の動きベクトルや参照ピクチャインデックスを予測パラメータメモリ108から読み出し、導出する。サブブロック予測パラメータ導出部1125は具体的には、上述のサブブロック予測パラメータ導出部3037(図12参照)と同様の構成を有する。   In the sub-block prediction parameter derivation unit 1125, when the coding parameter determination unit 110 determines to use the sub-block prediction mode, any of spatial sub-block prediction, temporal sub-block prediction, affine prediction and matching prediction according to the value of subPbMotionFlag The motion vector and reference picture index of some subblock prediction are derived. The motion vector and the reference picture index are derived from the prediction parameter memory 108 by reading out motion vectors and reference picture indexes such as adjacent PUs and reference picture blocks as described in the description of the image decoding apparatus. Specifically, the sub-block prediction parameter derivation unit 1125 has a configuration similar to that of the above-described sub-block prediction parameter derivation unit 3037 (see FIG. 12).

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

すなわち、予測モード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 derivation 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. 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 subtracting unit 1123 subtracts the prediction vector mvpLX input from the AMVP prediction parameter derivation unit 1122 from the motion vector mvLX input from the coding parameter determination unit 110 to generate a difference vector mvdLX. The difference vector mvdLX is output to the entropy coding unit 104.

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

また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。   In addition, 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 a large scale integration (LSI). Each functional block of the image encoding device 11 and the image decoding device 31 may be individually processorized, or part or all may be integrated and processorized. Further, the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible. In the case where an integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology, integrated circuits based on such technology may also be used.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。   As mentioned above, although one embodiment of this invention was described in detail with reference to drawings, a specific structure is not restricted to the above-mentioned thing, Various design changes etc. in the range which does not deviate from the summary of this invention It is possible to

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

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

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

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

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

図38の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図38の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。   (B) of FIG. 38 is a block diagram showing a configuration of a reception device PROD_B equipped with the image decoding device 31. As shown in FIG. As shown in (b) of FIG. 38, the receiver PROD_B receives the modulated signal, receives the modulated signal, demodulates the modulated signal received by the receiver PROD_B1, obtains the encoded data by the demodulated unit PROD_B2, and demodulates the received signal. And a decoding unit PROD_B3 for obtaining a moving image by decoding encoded data obtained by the unit PROD_B2. The image decoding device 31 described above is used as the decoding unit PROD_B3.

受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図38の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。   The receiving device PROD_B is 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. It may further comprise PROD_B6. Although (b) of FIG. 38 exemplifies a configuration in which the reception device PROD_B includes all of these, a part may be omitted.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このような再生装置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の一例である。   As such a playback device PROD_D, for example, a DVD player, a BD player, an HDD player, etc. may be mentioned (in this case, the output terminal PROD_D4 to which a television receiver etc. is connected is the main supply destination of moving images) . In addition, television receivers (in this case, the display PROD_D3 is the main supply destination of moving images), digital signage (also referred to as an electronic signboard or electronic bulletin board, etc.), the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images. First, desktop type PC (in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main supply destination of moving images), laptop type or tablet type PC (in this case, display PROD_D3 or transmission unit PROD_D5 is moving image) The main supply destination of the image), the smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main supply destination of the moving image), and the like are also examples of such a reproduction device PROD_D.

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

後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(RandomAccess Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   In the latter case, each of the devices described above includes a CPU that executes instructions of a program that implements each function, a read only memory (ROM) that stores the program, a random access memory (RAM) that develops the program, the program, and various data. And a storage device (recording medium) such as a memory for storing the The object of the embodiment of the present invention is to record computer program readable program codes (execution format program, intermediate code program, source program) of control programs of the above-mentioned respective devices which are software for realizing the functions described above. The present invention can also be achieved by supplying a medium to each of the above-described devices, and a computer (or a CPU or an MPU) reading and executing 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 magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CDs (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical disc). ) Disks including optical disks such as MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (registered trademark), IC cards (including memory cards) Cards such as optical cards, mask ROMs / erasable programmable read-only memories (EPROMs) / electrically erasable and programmable read-only memories (EEPROMs) / semiconductor memories such as flash ROMs, or programmable logic devices (PLDs) And logic circuits such as FPGA (Field Programmable Gate Array) can be used.

また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、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 device 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 the program code can be transmitted. 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), telephone network, mobile communication network, satellite communication network, etc. can be used. Also, the transmission medium that constitutes this communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, even if wired 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, infrared rays such as IrDA (Infrared Data Association) or 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 link, terrestrial digital broadcast network, etc. It can also be used wirelessly. The embodiment of the present invention may 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.

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

(関連出願の相互参照)
本出願は、2016年9月27日に出願された日本国特許出願:特願2016−188791に対して優先権の利益を主張するものであり、当該出願を参照することにより、その内容の全てが本書に含まれる。
(Cross-reference to related applications)
This application claims the benefit of priority to Japanese Patent Application filed on Sep. 27, 2016: Japanese Patent Application No. 2016-188791, the contents of which are incorporated by reference in their entirety. Is included in this book.

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

11 画像符号化装置
31 画像復号装置
112 インター予測パラメータ符号化部(予測画像生成装置)
303 インター予測パラメータ復号部(予測画像生成装置)
1122、3032 AMVP予測パラメータ導出部(アフィン動きベクトル導出部、アフィン動きベクトル導出装置)
30372 アフィン予測部(アフィン動きベクトル導出部、アフィン動きベクトル導出装置)
309 インター予測画像生成部(予測画像生成部)
11 image coding device 31 image decoding device 112 inter prediction parameter coding unit (predicted image generation device)
303 Inter prediction parameter decoding unit (predicted image generation device)
1122, 3032 AMVP prediction parameter deriving unit (affine motion vector deriving unit, affine motion vector deriving device)
30372 Affine prediction unit (Affine motion vector deriving unit, Affine motion vector deriving device)
309 Inter prediction image generation unit (prediction image generation unit)

Claims (17)

対象PUを構成するサブブロックの各々の動きベクトルを導出するアフィン動きベクトル導出装置において、
前記アフィン動きベクトル導出装置は、
対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、
前記対象ブロックの形状および大きさの少なくとも何れかに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替えることを特徴とするアフィン動きベクトル導出装置。
In an affine motion vector deriving device for deriving a motion vector of each of subblocks constituting a target PU,
The affine motion vector deriving device
The motion vector of each of the plurality of sub-blocks included in the target block is calculated with reference to the motion vector at the control point set in the reference block sharing the vertex with the target block,
According to at least one of the shape and the size of the target block, motion vectors of two control points are calculated to perform four parameter affine processing, or motion vectors of three control points are calculated and six parameter affine An affine motion vector deriving device characterized by switching whether to perform processing of
動画像の符号化または復号に用いる予測画像を生成するための予測画像生成装置において、
アフィン動きベクトル導出部と、
予測画像生成部とを備え、
前記アフィン動きベクトル導出部は、
対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、
前記対象ブロックの形状および大きさの少なくとも何れかに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替え、
前記予測画像生成部は、
前記制御点の動きベクトルを参照することによって予測画像を生成することを特徴とする予測画像生成装置。
In a predicted image generation device for generating a predicted image used for encoding or decoding of a moving image,
An affine motion vector deriving unit,
And a predicted image generation unit,
The affine motion vector deriving unit
The motion vector of each of the plurality of sub-blocks included in the target block is calculated with reference to the motion vector at the control point set in the reference block sharing the vertex with the target block,
According to at least one of the shape and the size of the target block, motion vectors of two control points are calculated to perform four parameter affine processing, or motion vectors of three control points are calculated and six parameter affine Switch the processing of the
The predicted image generation unit
A predicted image generation device characterized by generating a predicted image by referring to the motion vector of the control point.
前記アフィン動きベクトル導出部は、
前記対象ブロックが正方形である場合に6パラメータアフィンの処理を行い、前記対象ブロックが正方形でない場合に4パラメータアフィンの処理を行うことを特徴とする請求項2に記載の予測画像生成装置。
The affine motion vector deriving unit
The predicted image generation device according to claim 2, wherein the processing of six parameter affine is performed when the target block is a square, and the processing of four parameter affine is performed when the target block is not a square.
前記アフィン動きベクトル導出部は、
マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックが正方形ではない場合には4パラメータアフィンの処理を行い、
マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックが正方形である場合にはPUアフィンモードフラグpu_affine_mode_flagを復号し、当該PUアフィンモードフラグpu_affine_mode_flagが6パラメータアフィンの処理を行うことを示している場合には6パラメータアフィンの処理を行い、当該PUアフィンモードフラグpu_affine_mode_flagが4パラメータアフィンの処理を行うことを示している場合には4パラメータアフィンの処理を行うことを特徴とする請求項2または3に記載の予測画像生成装置。
The affine motion vector deriving unit
If the merge flag merge_flag indicates that the merge process is not to be performed, and the target block is not a square, a four-parameter affine process is performed;
When the merge flag merge_flag indicates that the merge process is not performed and the target block is a square, the PU affine mode flag pu_affine_mode_flag is decoded, and the PU affine mode flag pu_affine_mode_flag is a process of six parameter affine Is characterized in that processing of six parameters affine is performed, and when the PU affine mode flag pu_affine_mode_flag indicates that processing of four parameters affine is performed, processing of four parameters affine is performed. The predicted image generation device according to claim 2 or 3, wherein
前記アフィン動きベクトル導出部は、
前記対象ブロックのサイズが所定の閾値以上である場合に6パラメータアフィンの処理を行い、前記対象ブロックのサイズが所定の閾値以上でない場合、4パラメータアフィンの処理を行うことを特徴とする請求項2に記載の予測画像生成装置。
The affine motion vector deriving unit
The processing of six parameter affine is performed when the size of the target block is equal to or more than a predetermined threshold, and the processing of four parameter affine is performed when the size of the target block is not equal to or larger than the predetermined threshold. The prediction image generation device according to claim 1.
前記アフィン動きベクトル導出部は、
マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックのサイズが所定の閾値以上でない場合には4パラメータアフィンの処理を行い、
マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックのサイズが所定の閾値以上である場合にはPUアフィンモードフラグpu_affine_mode_flagを復号し、当該PUアフィンモードフラグpu_affine_mode_flagが6パラメータアフィンの処理を行うことを示している場合には6パラメータアフィンの処理を行い、当該PUアフィンモードフラグpu_affine_mode_flagが4パラメータアフィンの処理を行うことを示している場合には4パラメータアフィンの処理を行うことを特徴とする請求項5に記載の予測画像生成装置。
The affine motion vector deriving unit
If the merge flag merge_flag indicates that merge processing is not to be performed, and the size of the target block is not equal to or larger than a predetermined threshold value, processing of four parameter affine is performed,
If the merge flag merge_flag indicates that merge processing is not performed and the size of the target block is equal to or larger than a predetermined threshold value, the PU affine mode flag pu_affine_mode_flag is decoded, and the PU affine mode flag pu_affine_mode_flag is 6-parameter affine processing is performed when processing of a 6-parameter affine is performed, and processing of 4-parameter affine processing is performed when the PU affine mode flag pu_affine_mode_flag indicates processing of a 4-parameter affine. The predicted image generation apparatus according to claim 5, wherein:
前記アフィン動きベクトル導出部は、
前記対象ブロックのサイズが所定の閾値以上である場合であり、かつ当該対象ブロックが正方形である場合に6パラメータアフィンの処理を行うことを特徴とする請求項2に記載の予測画像生成装置。
The affine motion vector deriving unit
3. The predicted image generation device according to claim 2, wherein when the size of the target block is equal to or larger than a predetermined threshold and the target block is a square, processing of six parameters affine is performed.
前記アフィン動きベクトル導出部は、
マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックのサイズが所定の閾値以上ではなく、かつ当該対象ブロックが正方形ではない場合には4パラメータアフィンの処理を行い、
(1)マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックのサイズが所定の閾値以上であるか、あるいは(2)マージフラグmerge_flagがマージ処理を行わないことを示している場合であって、前記対象ブロックのサイズが所定の閾値以上ではなく、かつ当該対象ブロックが正方形である場合にはPUアフィンモードフラグpu_affine_mode_flagを復号し、当該PUアフィンモードフラグpu_affine_mode_flagが6パラメータアフィンの処理を行うことを示している場合には6パラメータアフィンの処理を行い、当該PUアフィンモードフラグpu_affine_mode_flagが4パラメータアフィンの処理を行うことを示している場合には4パラメータアフィンの処理を行うことを特徴とする請求項7に記載の予測画像生成装置。
The affine motion vector deriving unit
If the merge flag merge_flag indicates that merge processing is not to be performed, and the size of the target block is not equal to or larger than a predetermined threshold, and the target block is not a square, four-parameter affine processing is performed. ,
(1) Merge flag merge_flag indicates that merge processing is not performed, and the size of the target block is equal to or larger than a predetermined threshold, or (2) merge flag merge_flag does not perform merge processing If the size of the target block is not equal to or greater than a predetermined threshold and the target block is a square, the PU affine mode flag pu_affine_mode_flag is decoded, and the PU affine mode flag pu_affine_mode_flag is 6 If the parameter affine processing is to be performed, the 6 parameter affine processing is performed. If the PU affine mode flag pu_affine_mode_flag indicates that the 4 parameter affine processing is to be performed, the 4 parameter affine processing is performed. The predicted image generation device according to claim 7, characterized in that:
動画像の符号化または復号に用いる予測画像を生成するための予測画像生成装置において、
アフィン動きベクトル導出部と、
予測画像生成部とを備え、
前記アフィン動きベクトル導出部は、
対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、
前記参照ブロックの形状および大きさの少なくとも何れかに応じて、2つの制御点の動きベクトルを算出して4パラメータアフィンの処理を行うか、3つの制御点の動きベクトルを算出して6パラメータアフィンの処理を行うかを切り替え、
前記予測画像生成部は、
前記制御点の動きベクトルを参照することによって予測画像を生成することを特徴とする予測画像生成装置。
In a predicted image generation device for generating a predicted image used for encoding or decoding of a moving image,
An affine motion vector deriving unit,
And a predicted image generation unit,
The affine motion vector deriving unit
The motion vector of each of the plurality of sub-blocks included in the target block is calculated with reference to the motion vector at the control point set in the reference block sharing the vertex with the target block,
Depending on the shape and / or size of the reference block, motion vectors of two control points are calculated to perform 4-parameter affine processing, or motion vectors of three control points are calculated and 6-parameter affine. Switch the processing of the
The predicted image generation unit
A predicted image generation device characterized by generating a predicted image by referring to the motion vector of the control point.
前記アフィン動きベクトル導出部は、
前記参照ブロックが正方形である場合に6パラメータアフィンの処理を行い、前記参照ブロックが正方形でない場合に4パラメータアフィンの処理を行うことを特徴とする請求項9に記載の予測画像生成装置。
The affine motion vector deriving unit
10. The predicted image generation device according to claim 9, wherein processing of six parameter affines is performed when the reference block is a square, and processing of four parameter affine is performed when the reference block is not a square.
前記アフィン動きベクトル導出部は、
前記参照ブロックのサイズが所定の閾値以上である場合に6パラメータアフィンの処理を行い、前記対象ブロックのサイズが所定の閾値以上でない場合、4パラメータアフィンの処理を行うことを特徴とする請求項9に記載の予測画像生成装置。
The affine motion vector deriving unit
When the size of the reference block is equal to or greater than a predetermined threshold, six parameter affine processing is performed, and when the size of the target block is not equal to or larger than a predetermined threshold, four parameter affine processing is performed. The prediction image generation device according to claim 1.
動画像の符号化または復号に用いる予測画像を生成するための予測画像生成装置において、
アフィン動きベクトル導出部と、
予測画像生成部とを備え、
前記アフィン動きベクトル導出部は、
対象ブロックに含まれる複数のサブブロックの各々の動きベクトルを、当該対象ブロックと頂点を共有する参照ブロック内に設定された制御点における動きベクトルを参照して算出するものであり、
前記対象ブロックの形状、または前記参照ブロックの形状に応じて、4パラメータアフィンの処理に用いる前記制御点を変更し、
前記予測画像生成部は、
前記制御点の動きベクトルを参照することによって予測画像を生成することを特徴とする予測画像生成装置。
In a predicted image generation device for generating a predicted image used for encoding or decoding of a moving image,
An affine motion vector deriving unit,
And a predicted image generation unit,
The affine motion vector deriving unit
The motion vector of each of the plurality of sub-blocks included in the target block is calculated with reference to the motion vector at the control point set in the reference block sharing the vertex with the target block,
According to the shape of the target block or the shape of the reference block, the control points used for processing of the four parameter affine are changed;
The predicted image generation unit
A predicted image generation device characterized by generating a predicted image by referring to the motion vector of the control point.
前記アフィン動きベクトル導出部は、
前記対象ブロックが正方形である場合に、前記対象ブロックの対角線上の2つの頂点のそれぞれを共有する参照ブロック内に設定された制御点を前記制御点として決定し、
前記対象ブロックが正方形ではない場合に、前記対象ブロックの長辺を挟む2つの頂点のそれぞれを共有する参照ブロック内に設定された制御点を前記制御点として決定することを特徴とする請求項12に記載の予測画像生成装置。
The affine motion vector deriving unit
When the target block is a square, a control point set in a reference block sharing each of two vertices on the diagonal of the target block is determined as the control point.
When the target block is not a square, a control point set in a reference block sharing each of two vertices sandwiching the long side of the target block is determined as the control point. The prediction image generation device according to claim 1.
前記アフィン動きベクトル導出部は、
前記参照ブロックが正方形である場合に、前記対象ブロックの対角線上の2つの頂点を共有する参照ブロック内に設定された制御点を前記制御点として決定し、
前記参照ブロックが正方形ではない場合に、前記対象ブロックの長辺を挟む2つの頂点を共有する参照ブロック内に設定された制御点を前記制御点として決定することを特徴とする請求項12に記載の予測画像生成装置。
The affine motion vector deriving unit
If the reference block is a square, a control point set in a reference block sharing two diagonal vertices of the target block is determined as the control point.
The control point according to claim 12, wherein a control point set in a reference block sharing two vertices sandwiching a long side of the target block is determined as the control point when the reference block is not a square. Predictive image generation device.
前記アフィン動きベクトル導出部は、
前記参照ブロックの形状が正方形である場合に、当該参照ブロックの対角線上の2つの頂点を前記制御点として決定し、
前記参照ブロックが正方形ではない場合に、当該参照ブロックの長辺を挟む2つの頂点を前記制御点として決定することを特徴とする請求項12に記載の予測画像生成装置。
The affine motion vector deriving unit
If the shape of the reference block is a square, two vertices on the diagonal of the reference block are determined as the control points,
13. The predicted image generation device according to claim 12, wherein, when the reference block is not a square, two vertices sandwiching a long side of the reference block are determined as the control points.
請求項2〜15の何れか1項に記載の予測画像生成装置を備え、
前記予測画像に対して、残差信号を加算または減算することによって復号画像を生成することを特徴とする動画像復号装置。
An apparatus for generating a predicted image according to any one of claims 2 to 15, comprising:
A moving picture decoding apparatus characterized by generating a decoded picture by adding or subtracting a residual signal to or from the predicted picture.
請求項2〜15の何れか1項に記載の予測画像生成装置を備え、
前記予測画像と符号化対象画像との残差信号を符号化することを特徴とする動画像符号化装置。
An apparatus for generating a predicted image according to any one of claims 2 to 15, comprising:
A moving picture coding apparatus characterized in that a residual signal between the predicted picture and a picture to be coded is coded.
JP2018542005A 2016-09-27 2017-08-25 Affine motion vector derivation device, predictive image generator, motion image decoding device, and motion image coding device Active JP7026049B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2016188791 2016-09-27
JP2016188791 2016-09-27
PCT/JP2017/030623 WO2018061563A1 (en) 2016-09-27 2017-08-25 Affine motion vector derivation device, prediction image generation device, moving image decoding device, and moving image coding device

Publications (2)

Publication Number Publication Date
JPWO2018061563A1 true JPWO2018061563A1 (en) 2019-07-11
JP7026049B2 JP7026049B2 (en) 2022-02-25

Family

ID=61762743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018542005A Active JP7026049B2 (en) 2016-09-27 2017-08-25 Affine motion vector derivation device, predictive image generator, motion image decoding device, and motion image coding device

Country Status (2)

Country Link
JP (1) JP7026049B2 (en)
WO (1) WO2018061563A1 (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190134521A (en) * 2018-05-24 2019-12-04 주식회사 케이티 Method and apparatus for processing a video
EP3794822A4 (en) 2018-05-25 2022-09-28 HFI Innovation Inc. Method and apparatus of affine mode motion-vector prediction derivation for video coding system
CN118138763A (en) * 2018-06-18 2024-06-04 Lg电子株式会社 Image decoding apparatus, encoding apparatus, and bit stream transmitting apparatus
US20210297691A1 (en) * 2018-06-20 2021-09-23 Mediatek Inc. Method and Apparatus of Motion Vector Buffer Management for Video Coding System
WO2019244809A1 (en) * 2018-06-21 2019-12-26 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Coding device, decoding device, coding method, and decoding method
JP7278719B2 (en) 2018-06-27 2023-05-22 キヤノン株式会社 Image encoding device, image encoding method and program, image decoding device, image decoding method and program
KR20210038846A (en) * 2018-06-29 2021-04-08 브이아이디 스케일, 인크. Adaptive control point selection for video coding based on AFFINE MOTION model
CN110677645B (en) * 2018-07-02 2022-06-10 华为技术有限公司 Image prediction method and device
WO2020008769A1 (en) * 2018-07-06 2020-01-09 ソニー株式会社 Image processing device, image processing method and image processing program
WO2020008724A1 (en) * 2018-07-06 2020-01-09 ソニー株式会社 Image processing device, image processing method and program
CN117544769A (en) * 2018-07-13 2024-02-09 Lg电子株式会社 Video decoding method, video encoding method, storage medium, and transmission method
KR20240005126A (en) 2018-07-17 2024-01-11 후아웨이 테크놀러지 컴퍼니 리미티드 Motion model signaling
CN110891176B (en) * 2018-09-10 2023-01-13 华为技术有限公司 Motion vector prediction method and device based on affine motion model
US11057636B2 (en) * 2018-09-17 2021-07-06 Qualcomm Incorporated Affine motion prediction
JP7449279B2 (en) * 2018-09-21 2024-03-13 オッポ広東移動通信有限公司 Video signal encoding/decoding method and equipment therefor
WO2020058954A1 (en) 2018-09-23 2020-03-26 Beijing Bytedance Network Technology Co., Ltd. Representation of affine model
KR20210052566A (en) * 2018-09-25 2021-05-10 디지털인사이트 주식회사 Inter mode based video encoding/decoding method and apparatus
BR112021006580B1 (en) 2018-10-08 2022-11-16 Lg Electronics Inc METHOD OF IMAGE DECODING CARRIED OUT BY A DECODING APPARATUS, IMAGE CODING METHOD PERFORMED BY A CODING APPARATUS, AND NON-TRAINER COMPUTER READABLE STORAGE MEDIA
WO2020084470A1 (en) * 2018-10-22 2020-04-30 Beijing Bytedance Network Technology Co., Ltd. Storage of motion parameters with clipping for affine mode
WO2020084510A1 (en) * 2018-10-23 2020-04-30 Beijing Bytedance Network Technology Co., Ltd. Adaptive control point selection for affine coding
CN113170192B (en) * 2018-11-15 2023-12-01 北京字节跳动网络技术有限公司 Affine MERGE and MVD
CN111355961B (en) * 2018-12-24 2023-11-03 华为技术有限公司 Inter-frame prediction method and device
WO2020138967A1 (en) * 2018-12-26 2020-07-02 주식회사 엑스리스 Method for encoding/decoding image signal and device therefor
WO2020137850A1 (en) * 2018-12-28 2020-07-02 株式会社Jvcケンウッド Dynamic-image encoding device, dynamic-image encoding method, dynamic-image encoding program, dynamic-image decoding device, dynamic-image decoding method, and dynamic-image decoding program
CN113661708B (en) 2019-04-02 2023-12-15 北京字节跳动网络技术有限公司 Video coding and decoding based on bidirectional optical flow
CN113728630B (en) 2019-04-19 2023-11-17 北京字节跳动网络技术有限公司 Region-based gradient computation in different motion vector refinements
WO2020211867A1 (en) * 2019-04-19 2020-10-22 Beijing Bytedance Network Technology Co., Ltd. Delta motion vector in prediction refinement with optical flow process
JP2021052225A (en) * 2019-09-20 2021-04-01 Kddi株式会社 Image decoding device, image decoding method and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0998424A (en) * 1995-09-29 1997-04-08 Matsushita Electric Ind Co Ltd Method and device for extracting affine transformation parameter
JPH09261651A (en) * 1996-03-27 1997-10-03 Nippon Telegr & Teleph Corp <Ntt> Method and device for motion compensation prediction coding for moving picture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0998424A (en) * 1995-09-29 1997-04-08 Matsushita Electric Ind Co Ltd Method and device for extracting affine transformation parameter
JPH09261651A (en) * 1996-03-27 1997-10-03 Nippon Telegr & Teleph Corp <Ntt> Method and device for motion compensation prediction coding for moving picture

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CHEN, JIANLE ET AL.: "Algorithm Description of Joint Exploration Test Model 3", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 3RD MEETING: G, vol. JVET-C1001 (version 3), JPN6021027537, 6 July 2016 (2016-07-06), pages 1001 - 3, ISSN: 0004556440 *
HUANG, HAN ET AL.: "Control-Point Representation and Differential Coding Affine-Motion Compensation", IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, vol. Volume:23, Issue:10, Oct.2013, JPN6017045602, 27 March 2013 (2013-03-27), US, pages 1651 - 1660, ISSN: 0004556438 *
ZOU, FENG ET AL.: "Improved affine motion prediction", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 3RD MEETING: G, vol. JVET-C0062 (version 3), JPN6021027539, 28 May 2016 (2016-05-28), pages 0062 - 2, ISSN: 0004556439 *

Also Published As

Publication number Publication date
WO2018061563A1 (en) 2018-04-05
JP7026049B2 (en) 2022-02-25

Similar Documents

Publication Publication Date Title
JP7026049B2 (en) Affine motion vector derivation device, predictive image generator, motion image decoding device, and motion image coding device
US11695949B2 (en) Prediction image generation device
JP7421586B2 (en) Decoding device and encoding device
CN110574374B (en) Image decoding device
US10873746B2 (en) Intra prediction image generation device using cross-component liner model, image decoding apparatus, and image coding apparatus using same
US11722690B2 (en) Motion vector generation device, a prediction image generation device, a video decoding device and a video coding device
US20200021837A1 (en) Video decoding apparatus and video coding apparatus
WO2019054300A1 (en) Image encoding device and image decoding device
WO2018230493A1 (en) Video decoding device, video encoding device, prediction image generation device and motion vector derivation device
US11770555B2 (en) Prediction image generation device, moving image decoding device, and moving image coding device
WO2020116456A1 (en) Moving image decoding device
WO2020137920A1 (en) Prediction image generating device, moving image decoding device, moving image encoding device, and prediction image generating method
WO2018173895A1 (en) Predicted-image generation device, video decoding device, and video coding device
JP2020088660A (en) Moving picture coding apparatus and moving picture decoding apparatus
JP2020108012A (en) Image decoding device and image encoding device
JP2020096279A (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2020036101A (en) Image decoder, and image encoder
US11044490B2 (en) Motion compensation filter apparatus, image decoding apparatus, and video coding apparatus
JP2020170901A (en) Predictive image generation device, video decoding device, and video coding device
JP2020096329A (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2021057621A (en) Moving image encoding device, moving image decoding device, and prediction image generation device
US12034962B2 (en) Image decoding device, image encoding device, and method for decoding coded image
JP2023181459A (en) Moving-image decoding device, moving-image encoding device, moving-image decoding method, and moving-image encoding method
JP2021197558A (en) Dynamic image encoding device and dynamic image decoding device
JP2020005200A (en) Image decoding device and image encoding device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190322

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20191017

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20191017

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200818

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210727

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210924

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220118

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220214

R150 Certificate of patent or registration of utility model

Ref document number: 7026049

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S802 Written request for registration of partial abandonment of right

Free format text: JAPANESE INTERMEDIATE CODE: R311802

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350