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

Image decoding device and image encoding device Download PDF

Info

Publication number
JP2020108012A
JP2020108012A JP2018245248A JP2018245248A JP2020108012A JP 2020108012 A JP2020108012 A JP 2020108012A JP 2018245248 A JP2018245248 A JP 2018245248A JP 2018245248 A JP2018245248 A JP 2018245248A JP 2020108012 A JP2020108012 A JP 2020108012A
Authority
JP
Japan
Prior art keywords
prediction
unit
mmvd
parameter
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018245248A
Other languages
Japanese (ja)
Inventor
瑛一 佐々木
Eiichi Sasaki
瑛一 佐々木
知典 橋本
Tomonori Hashimoto
知典 橋本
知宏 猪飼
Tomohiro Igai
知宏 猪飼
中條 健
Takeshi Nakajo
健 中條
友子 青野
Tomoko Aono
友子 青野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FG Innovation Co Ltd
Sharp Corp
Original Assignee
FG Innovation Co Ltd
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FG Innovation Co Ltd, Sharp Corp filed Critical FG Innovation Co Ltd
Priority to JP2018245248A priority Critical patent/JP2020108012A/en
Publication of JP2020108012A publication Critical patent/JP2020108012A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide an image decoding device capable of suppressing degradation of encoding efficiency in the case of realizing high compressibility.SOLUTION: The image decoding device comprises a parameter decoding unit which decodes a skip flag indicative of a skip mode or not. When the skip flag is not indicative of the skip mode, the parameter decoding unit decodes a merge flag indicative of a merge mode or not, and when the merge flag is not indicative of the merge flag, the parameter decoding unit decodes an MMVD flag indicative of an MMVD mode or not.SELECTED DRAWING: Figure 18

Description

本発明の実施形態は、画像復号装置および画像符号化装置に関する。 Embodiments of the present invention relate to an image decoding device and an image encoding device.

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

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

このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化ツリーユニット(CTU:Coding Tree Unit)、符号化ツリーユニットを分割することで得
られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び
、符号化単位を分割することより得られる変換ユニット(TU:Transform Unit)からなる階層構造により管理され、CU毎に符号化/復号される。
In such a moving image coding method, an image (picture) that constitutes a moving image is a slice obtained by dividing the image, and a coding tree unit (CTU: Coding Tree Unit) obtained by dividing the slice. ), a coding unit obtained by dividing the coding tree unit (also called a coding unit (Coding Unit: CU)), and a transform unit (TU: obtained by dividing the coding unit). CU is encoded/decoded for each CU.

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

また、近年の動画像符号化及び復号の技術として非特許文献1〜4が挙げられる。 Further, Non-Patent Documents 1 to 4 can be cited as the techniques of recent video encoding and decoding.

"Algorithm Description of Joint Exploration Test Model 7", JVET-L1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10-19"Algorithm Description of Joint Exploration Test Model 7", JVET-L1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10-19 "CE4 Ultimate motion vector expression (Test 4.5.4)", JVET-L0054-v4, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10-11"CE4 Ultimate motion vector expression (Test 4.5.4)", JVET-L0054-v4, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018- 10-11 "Simplified DMVR for inclusion in VVC", JVET-L0670-v1, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10-6"Simplified DMVR for inclusion in VVC", JVET-L0670-v1, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10-6 “CE4-related: Improvement on ultimate motion vector expression”, JVET-L0408-v3, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10-3“CE4-related: Improvement on ultimate motion vector expression”, JVET-L0408-v3, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2018-10 -3

高い圧縮率を実現する場合、非特許文献2のMMVD技術で追加された予測パラメータ情報のフラグ情報がオーバヘッドとなり、符号化効率が低下する問題があった。 When a high compression rate is realized, there is a problem that the flag information of the prediction parameter information added by the MMVD technique of Non-Patent Document 2 becomes an overhead and the coding efficiency is reduced.

また、MMVDの適当な距離はピクチャにより変化すると考えられる考えられるが、非特許
文献4で開示されている前ピクチャで利用された距離の分析により距離テーブルを更新する方法は、連続するピクチャを並列処理することができないという課題がある
また非特許文献1のMMVDでは、スケーリングとフリップが2回行われ、複雑であるという課題がある。またL0参照ピクチャとL1参照ピクチャとの距離が等しい場合の処理が2通りあり複雑であるという課題がある。
Although it is considered that the appropriate distance of MMVD changes depending on the picture, the method of updating the distance table by analyzing the distance used in the previous picture, which is disclosed in Non-Patent Document 4, is a method of updating consecutive pictures in parallel. There is a problem that processing cannot be performed. Further, in the MMVD of Non-Patent Document 1, there is a problem that scaling and flipping are performed twice, which is complicated. Further, there is a problem that there are two kinds of processing when the distance between the L0 reference picture and the L1 reference picture is equal, and the processing is complicated.

本発明の実施形態は、高い圧縮率を実現する場合における、符号化効率の低下を抑制可能な画像復号装置および画像符号化装置を実現することを目的とする。 An object of the embodiments of the present invention is to realize an image decoding device and an image encoding device that can suppress a decrease in encoding efficiency when a high compression rate is realized.

上記課題を解決するために、
本発明の一態様に係る画像復号装置は、
予測画像を生成するためのパラメータを復号するパラメータ復号部を有し、
上記パラメータ復号部は、距離テーブルの要素を選択する距離インデックスインデクスを復号し、マージ候補から導出される動きベクトルに、所定の距離及び所定の方向の差分ベクトルを加算することで動きベクトルを得るMMVD予測部を有し、
上記MMVD予測部は、距離インデックスインデクスと方向インデックスから、第1の差分ベクトルを導出し、
上記MMVD予測部は、対象ピクチャとL0参照ピクチャのPOC差分と、対象ピクチャとL1参
照ピクチャのPOC差分が等しい場合に、L0差分ベクトルとL1差分ベクトルに、第1の差分
ベクトルを設定し、
それ以外で、対象ピクチャとL0参照ピクチャのPOC差分の絶対値が、対象ピクチャとL1
参照ピクチャのPOC差分の絶対値よりも大きい場合に、L0差分ベクトルに、上記第1の差
分ベクトルを設定し、L1差分ベクトルに、上記第1の差分ベクトルを、対象ピクチャとL0参照ピクチャのPOC差分と、対象ピクチャとL1参照ピクチャのPOC差分でスケーリングしたベクトルを設定し、
それ以外の場合に(対象ピクチャとL0参照ピクチャのPOC差分の絶対値が、対象ピクチ
ャとL1参照ピクチャのPOC差分の絶対値より以下の場合)、L1差分ベクトルに、上記第1
の差分ベクトルを設定し、L0差分ベクトルに、上記第1の差分ベクトルを、対象ピクチャとL1参照ピクチャのPOC差分と、対象ピクチャとL0参照ピクチャのPOC差分でスケーリングしたベクトルを設定することを特徴とする。
In order to solve the above problems,
An image decoding device according to an aspect of the present invention is
A parameter decoding unit that decodes a parameter for generating a predicted image,
The parameter decoding unit decodes the distance index index for selecting an element of the distance table, and the motion vector derived from the merge candidate is added to the difference vector in a predetermined distance and in a predetermined direction to obtain a motion vector MMVD. Has a predictor,
The MMVD prediction unit derives a first difference vector from the distance index index and the direction index,
The MMVD prediction unit sets the first difference vector to the L0 difference vector and the L1 difference vector when the POC difference between the target picture and the L0 reference picture is equal to the POC difference between the target picture and the L1 reference picture,
Otherwise, the absolute value of the POC difference between the target picture and the L0 reference picture is
When it is larger than the absolute value of the POC difference of the reference picture, the first difference vector is set in the L0 difference vector, and the first difference vector is set in the L1 difference vector as the POC of the target picture and the L0 reference picture. Set the difference and the vector scaled by the POC difference between the target picture and the L1 reference picture,
In other cases (when the absolute value of the POC difference between the target picture and the L0 reference picture is less than or equal to the absolute value of the POC difference between the target picture and the L1 reference picture), the first value is added to the L1 difference vector.
Is set, and a vector obtained by scaling the first difference vector by the POC difference between the target picture and the L1 reference picture and the POC difference between the target picture and the L0 reference picture is set in the L0 difference vector. And

予測画像を生成するためのパラメータを復号するパラメータ復号部を有し、
上記パラメータ復号部は、距離テーブルの要素を選択する距離インデックスインデクスを復号し、マージ候補から導出される動きベクトルに、所定の距離及び所定の方向の差分ベクトルを加算することで動きベクトルを得るMMVD予測部を有し、
さらに、上記パラメータ復号部は、セグメントヘッダもしくはパラメータセットで、距離テーブルの情報を復号し、上記パラメータ復号部は、距離テーブルインデックステーブルインデクスに基づいて、距離テーブルを導出し、
上記MMVD予測部は、上記導出された距離テーブルと、上記距離インデックスと上記方向インデックスから差分ベクトルを導出することを特徴とする。
A parameter decoding unit that decodes a parameter for generating a predicted image,
The parameter decoding unit decodes the distance index index for selecting an element of the distance table, and the motion vector derived from the merge candidate is added to the difference vector in a predetermined distance and in a predetermined direction to obtain a motion vector MMVD. Has a predictor,
Further, the parameter decoding unit, in the segment header or parameter set, decodes the information of the distance table, the parameter decoding unit, based on the distance table index table index, derives the distance table,
The MMVD prediction unit is characterized by deriving a difference vector from the derived distance table and the distance index and the direction index.

上記距離テーブルの情報は、距離テーブルを選択するためのインデックスであることを特徴とする請求項2に記載のMMVD予測部情報は、距離テーブルの各要素を示すインデックスである請求項2に記載のMMVD予測部上記距離テーブルの情報は、距離テーブルの先頭要素を示す値であることを特徴とする。 The information of the distance table is an index for selecting the distance table, and the MMVD prediction unit information of claim 2 is an index indicating each element of the distance table. MMVD Prediction Unit The information of the distance table is characterized in that it is a value indicating the first element of the distance table.

以上の構成によれば、距離テーブルを更新する方法は、連続するピクチャを並列処理することができないという課題を解決できる。また、スケーリングとフリップが2回行われ
複雑であるという課題を解決できる。またL0参照ピクチャとL1参照ピクチャとの距離が等しい場合の処理が2通りあり複雑であるという課題がある、また高い圧縮率を実現する場合における、符号化効率の低下を抑制可能な画像復号装置および画像符号化装置を実現できる。
With the above configuration, the method of updating the distance table can solve the problem that consecutive pictures cannot be processed in parallel. Further, it is possible to solve the problem that the scaling and the flip are performed twice, which is complicated. Further, there is a problem that there are two kinds of processing when the distance between the L0 reference picture and the L1 reference picture is the same, which is complicated, and an image decoding apparatus capable of suppressing a decrease in coding efficiency when realizing a high compression rate. Also, the image encoding device can be realized.

本実施形態に係る画像伝送システムの構成を示す概略図である。It is a schematic diagram showing the composition of the image transmission system concerning this embodiment. 本実施形態に係る動画像符号化装置を搭載した送信装置、および、動画像復号装置を搭載した受信装置の構成について示した図である。(a)は動画像符号化装置を搭載した送信装置を示しており、(b)は動画像復号装置を搭載した受信装置を示している。It is the figure which showed the structure of the transmission apparatus which mounts the moving image encoding apparatus which concerns on this embodiment, and the receiving apparatus which mounts the moving image decoding apparatus. (a) shows a transmitter equipped with a moving picture coding device, and (b) shows a receiver equipped with a moving picture decoding device. 本実施形態に係る動画像符号化装置を搭載した記録装置、および、動画像復号装置を搭載した再生装置の構成について示した図である。(a)は動画像符号化装置を搭載した記録装置を示しており、(b)は動画像復号装置を搭載した再生装置を示している。It is the figure which showed the structure of the recording device which mounts the moving image encoding apparatus which concerns on this embodiment, and the reproducing|regenerating apparatus which mounts a moving image decoding device. (a) shows a recording device equipped with a moving image encoding device, and (b) shows a reproducing device equipped with a moving image decoding device. 符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of an encoding stream. CTUの分割例を示す図である。It is a figure which shows the example of division of CTU. 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。It is a conceptual diagram which shows an example of a reference picture and a reference picture list. 動画像復号装置の構成を示す概略図である。It is a schematic diagram showing the composition of a moving picture decoding device. インター予測パラメータ復号部の構成を示す概略図である。It is a schematic diagram showing the composition of the inter prediction parameter decoding part. マージ予測パラメータ導出部、および、AMVP予測パラメータ導出部の構成を示す概略図である。It is a schematic diagram showing composition of a merge prediction parameter derivation part and an AMVP prediction parameter derivation part. アフィン予測の動きベクトルspMvLX[xi][yi]を示す図である。It is a figure which shows the motion vector spMvLX[xi][yi] of affine prediction. インター予測画像生成部の構成を示す概略図である。It is a schematic diagram showing the composition of the inter prediction picture generation part. 動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of a moving image encoding device. パラメータ符号化部の構成を示す概略図である。It is a schematic diagram showing the composition of a parameter coding part. MMVDモードにおいて用いられるインデックスの一例を示す図であって、(a)は、マージ候補リストmergeCandList[]のマージ候補を示すインデックスbase_candidate_idxの一例を示す図であり、(b)は、対象ブロックに隣接するブロックの一例を示す図であり、(c)は、distance_idxの一例を示す図であり、(d)は、direction_idxの一例を示す図である。[Fig. 13] Fig. 13 is a diagram showing an example of an index used in the MMVD mode, (a) is a diagram showing an example of an index base_candidate_idx showing a merge candidate of the merge candidate list mergeCandList[], and (b) is a diagram showing an adjacent to the target block FIG. 4C is a diagram showing an example of a block, FIG. 7C is a diagram showing an example of distance_idx, and FIG. 7D is a diagram showing an example of direction_idx. 動画像符号化装置における探索距離の候補数および導出方向の候補数の一例を示す図である。It is a figure which shows an example of the number of candidates of a search distance and the number of candidates of a derivation direction in a moving image encoding device. 動画像復号装置における予測モードの選択処理の流れを示すフローチャートである。It is a flow chart which shows a flow of prediction mode selection processing in a moving picture decoding device. 本実施形態に係る予測モードの選択処理を示すシンタックスを示す図である。It is a figure which shows the syntax which shows the selection process of the prediction mode which concerns on this embodiment. 動画像復号装置における予測モードの選択処理の流れを示すフローチャートである。It is a flow chart which shows a flow of prediction mode selection processing in a moving picture decoding device. 本実施形態に係る予測モードの選択処理を示すシンタックスを示す図である。It is a figure which shows the syntax which shows the selection process of the prediction mode which concerns on this embodiment. 動画像復号装置における予測モードの選択処理の流れを示すフローチャートである。It is a flow chart which shows a flow of prediction mode selection processing in a moving picture decoding device. 本実施形態に係る予測モードの選択処理を示すシンタックスを示す図である。It is a figure which shows the syntax which shows the selection process of the prediction mode which concerns on this embodiment. 距離テーブルを伝送する場合の動画像復号装置の動作を示すフローチャートである。It is a flowchart which shows operation|movement of the moving image decoding apparatus in the case of transmitting a distance table.

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

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

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

動画像符号化装置11には画像Tが入力される。 The image T is input to the moving image encoding device 11.

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

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

動画像表示装置41は、動画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。動画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。ディスプレイの形態としては、据え置き、モバイル、HMD等が挙げられる。また、動画像復号装置31が高い処理能力を有する場合には、画質の高い画像を表示し、より低い処理能力しか有しない場合には、高い処理能力、表示能力を必要としない画像を表示する。 The moving image display device 41 displays all or part of one or a plurality of decoded images Td generated by the moving image decoding device 31. The moving image display device 41 includes a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. The form of the display includes stationary, mobile, HMD and the like. Further, when the video decoding device 31 has high processing capability, it displays an image with high image quality, and when it has only lower processing capability, it displays an image that does not require high processing capability or display capability. ..

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

>>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR
、|=はOR代入演算子であり、||は論理和を示す。
>> is right bit shift, << is left bit shift, & is bitwise AND, | is bitwise OR
, |= is an OR assignment operator, and || is a logical sum.

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

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

abs(a)はaの絶対値を返す関数である。 abs(a) is a function that returns the absolute value of a.

Int(a)はaの整数値を返す関数である。 Int(a) is a function that returns the integer value of a.

floor(a)はa以下の最大の整数を返す関数である。 floor(a) is a function that returns the largest integer less than or equal to a.

ceil(a)はa以上の最小の整数を返す関数である。 ceil(a) is a function that returns the smallest integer greater than or equal to a.

a/dはdによるaの除算(小数点以下切り捨て)を表す。 a/d represents division of a by d (rounding down after the decimal point).

sign(a)はaの符号(sign)を返す関数である。 sign(a) is a function that returns the sign of a.

a^bは、aのb乗を表す。 a^b represents the b-th power of a.

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

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

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

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

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

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

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

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

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

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

スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P
、Bスライスと呼ぶ場合には、インター予測を用いることができるブロックを含むスライ
スを指す。
The slice types that can be designated by the slice type designation information include (1) an I slice that uses only intra prediction during encoding, (2) unidirectional prediction when encoding, or a P slice that uses intra prediction. (3) B slices using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding are included. Note that inter prediction is not limited to uni-prediction and bi-prediction, and a larger number of reference pictures may be used to generate a prediction image. Below, P
, B slice, it means a slice including a block for which inter prediction can be used.

なお、スライスヘッダは、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。 The slice header may include a reference (pic_parameter_set_id) to the picture parameter set PPS.

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

(符号化ツリーユニット)
図4(e)には、処理対象のCTUを復号するために動画像復号装置31が参照するデータの集
合が規定されている。CTUは、再帰的な4分木分割(QT(Quad Tree)分割)、2分木分割(BT(Binary Tree)分割)あるいは3分木分割(TT(Ternary Tree)分割)により符号
化処理の基本的な単位である符号化ユニットCUに分割される。BT分割とTT分割を合わせてマルチツリー分割(MT(Multi Tree)分割)と呼ぶ。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(Coding Node)と称する。4分木、2分木、及び
3分木の中間ノードは、符号化ノードであり、CTU自身も最上位の符号化ノードとして規
定される。
(Encoding tree unit)
In FIG. 4(e), a set of data referred to by the video decoding device 31 for decoding the CTU to be processed is defined. CTU is the basic coding process by recursive quadtree partitioning (QT (Quad Tree) partitioning), binary tree partitioning (BT (Binary Tree) partitioning) or ternary tree partitioning (TT (Ternary Tree) partitioning) It is divided into coding units CU, which are the basic units. The BT partition and the TT partition are collectively called a multi-tree partition (MT (Multi Tree) partition). A tree-structured node obtained by recursive quadtree partitioning is called a coding node. Intermediate nodes of the quadtree, the binary tree, and the ternary tree are coding nodes, and the CTU itself is also defined as the uppermost coding node.

CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(qt_split_cu_flag)、MT分割の有無を示すMT分割フラグ(mtt_split_cu_flag)、MT分割の分割方向を示すMT分
割方向(mtt_split_cu_vertical_flag)、MT分割の分割タイプを示すMT分割タイプ(mtt_split_cu_binary_flage)を含む。qt_split_cu_flag、mtt_split_cu_flag、mtt_split_cu_vertical_flag、mtt_split_cu_binary_flagは符号化ノード毎に伝送される。
CT, as CT information, a QT split flag (qt_split_cu_flag) indicating whether to perform QT split, an MT split flag (mtt_split_cu_flag) indicating the presence or absence of MT split, an MT split direction (mtt_split_cu_vertical_flag) indicating the split direction of MT split, The MT split type (mtt_split_cu_binary_flage) indicating the split type of MT split is included. qt_split_cu_flag, mtt_split_cu_flag, mtt_split_cu_vertical_flag, mtt_split_cu_binary_flag are transmitted for each coding node.

図5は、CTUの分割例を示す図である。qt_split_cu_flagが1の場合、符号化ノードは4つの符号化ノードに分割される(図5(b))。 FIG. 5 is a diagram showing an example of CTU division. When qt_split_cu_flag is 1, the coding node is divided into four coding nodes (FIG. 5(b)).

qt_split_cu_flagが0の時、mtt_split_cu_flagが0の場合に符号化ノードは分割され
ず1つのCUをノードとして持つ(図5(a))。CUは符号化ノードの末端ノードであり、これ以上分割されない。CUは、符号化処理の基本的な単位となる。
When qt_split_cu_flag is 0 and mtt_split_cu_flag is 0, the coding node is not split and has one CU as a node (FIG. 5(a)). The CU is the end node of the coding node and is not further divided. The CU is a basic unit of encoding processing.

mtt_split_cu_flagが1の場合に符号化ノードは以下のようにMT分割される。mtt_split_cu_vertical_flagが0、かつmtt_split_cu_binary_flagが1の場合に符号化ノードは2つの符号化ノードに水平分割され(図5(d))、mtt_split_cu_vertical_flagが1、かつmtt_split_cu_binary_flagが1の場合に符号化ノードは2つの符号化ノードに垂直分割される(図5(c))。また、mtt_split_cu_vertical_flagが0、かつmtt_split_cu_binary_flagが0の場合に符号化ノードは3つの符号化ノードに水平分割され(図5(f))、mtt_split_cu_vertical_flagが1、かつmtt_split_cu_binary_flagが0の場合に符号化ノードは3つの符号化ノードに垂直分割される(図5(e))。これらを図5(g)に示す。 When mtt_split_cu_flag is 1, the coding node is MT-split as follows. When mtt_split_cu_vertical_flag is 0 and mtt_split_cu_binary_flag is 1, the coding node is horizontally divided into two coding nodes (Fig. 5(d)), and when mtt_split_cu_vertical_flag is 1 and mtt_split_cu_binary_flag is 1, two coding nodes are coded. It is vertically divided into the digitized nodes (Fig. 5(c)). Also, when mtt_split_cu_vertical_flag is 0 and mtt_split_cu_binary_flag is 0, the coding node is horizontally divided into three coding nodes (Fig. 5(f)), and when mtt_split_cu_vertical_flag is 1 and mtt_split_cu_binary_flag is 0, the coding node is 3. It is vertically divided into two coding nodes (Fig. 5(e)). These are shown in FIG. 5(g).

また、CTUのサイズが64x64画素の場合には、CUのサイズは、64x64画素、64x32画素、32x64画素、32x32画素、64x16画素、16x64画素、32x16画素、16x32画素、16x16画素、64x8画素、8x64画素、32x8画素、8x32画素、16x8画素、8x16画素、8x8画素、64x4画素、4x64画素、32x4画素、4x32画素、16x4画素、4x16画素、8x4画素、4x8画素、及び、4x4画素の何れかをとり得る。 When the CTU size is 64x64 pixels, the CU size is 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16 pixels, 16x32 pixels, 16x16 pixels, 64x8 pixels, 8x64 pixels. , 32x8 pixels, 8x32 pixels, 16x8 pixels, 8x16 pixels, 8x8 pixels, 64x4 pixels, 4x64 pixels, 32x4 pixels, 4x32 pixels, 16x4 pixels, 4x16 pixels, 8x4 pixels, 4x8 pixels, and 4x4 pixels ..

(符号化ユニット)
図4(f)に示すように、処理対象の符号化ユニットを復号するために動画像復号装置31が参照するデータの集合が規定されている。具体的には、CUは、CUヘッダCUH、予測パラメ
ータ、変換パラメータ、量子化変換係数等から構成される。CUヘッダでは予測モード等が規定される。
(Encoding unit)
As shown in FIG. 4(f), a set of data referred to by the video decoding device 31 for decoding the encoding unit to be processed is defined. Specifically, the CU includes a CU header CUH, a prediction parameter, a transformation parameter, a quantized transformation coefficient, and the like. The prediction mode etc. are specified in the CU header.

予測処理は、CU単位で行われる場合と、CUをさらに分割したサブCU単位で行われる場合がある。CUとサブCUのサイズが等しい場合には、CU中のサブCUは1つである。CUがサブCUのサイズよりも大きい場合、CUは、サブCUに分割される。たとえばCUが8x8、サブCUが4x4の場合、CUは水平2分割、垂直2分割からなる、4つのサブCUに分割される。 The prediction process may be performed in CU units or may be performed in sub CU units obtained by further dividing the CU. When the sizes of the CU and the sub CU are equal, there is one sub CU in the CU. If the CU is larger than the size of the sub CU, the CU is divided into sub CUs. For example, if the CU is 8x8 and the sub-CU is 4x4, the CU is divided into four sub-CUs, which are divided into two horizontally and vertically.

予測の種類(予測モード)は、イントラ予測と、インター予測の2つがある。イントラ予測は、同一ピクチャ内の予測であり、インター予測は、互いに異なるピクチャ間(例えば、表示時刻間)で行われる予測処理を指す。 There are two types of prediction (prediction mode): intra prediction and inter prediction. Intra-prediction is prediction within the same picture, and inter-prediction refers to prediction processing performed between different pictures (for example, between display times).

変換・量子化処理はCU単位で行われるが、量子化変換係数は4x4等のサブブロック単位
でエントロピー符号化してもよい。
The transform/quantization process is performed in CU units, but the quantized transform coefficients may be entropy coded in 4×4 sub-block units.

(予測パラメータ)
予測画像は、ブロックに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測とインター予測の予測パラメータがある。
(Prediction parameter)
The predicted image is derived from the prediction parameters associated with the block. The prediction parameters include intra prediction and inter prediction parameters.

以下、インター予測の予測パラメータについて説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0、predFlagL1と、参照ピクチャインデックスrefIdxL0、refIdxL1と、動きベクトルmvL0、mvL1から構成される。予測リスト利用フラグpredFlagL0、predFlagL1は、各々L0リスト、L1リストと呼ばれる参照ピクチャリストが用いられるか否かを示すフラグであり、値が1の場合に対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。 The prediction parameters of inter prediction will be described below. The inter prediction parameter is composed of 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 that indicate whether or not reference picture lists called L0 list and L1 list are used, and the reference picture list corresponding to a value of 1 is used. In the present specification, when it is referred to as “a flag indicating whether it is XX”, a flag other than 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. Treat 1 as true and 0 as false (same below). However, in an actual device or method, other values can be used as the true value and the false value.

インター予測パラメータを導出するためのシンタックス要素には、例えば、アフィンフラグaffine_flag、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、動きベクトル精度モードamvr_modeがある。 Syntax elements for deriving inter prediction parameters include, for example, affine flag affine_flag, 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, motion vector accuracy. There is a mode amvr_mode.

(参照ピクチャリスト)
参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリ
ストである。図6は、参照ピクチャおよび参照ピクチャリストの一例を示す概念図である
。図6(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復
号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図6(b)に、ピクチャB3(対象ピクチャ)の参照ピクチャリストの例を示す。参照ピクチャリストは、参照ピクチャの候補を表すリストであり、1つのピクチャ(スライス)が1つ以上の参照ピクチャリストを有してもよい。図の例では、対象ピクチャB3は、L0リストRefPicList0およびL1リストRefPicList1の2つの参照ピクチャリストを持つ。個々のCUでは、参照ピクチャリストRefPicListX(X=0または1)中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図は、refIdxL0=2、refIdxL1=0の例である。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、以降では、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。
(Reference picture list)
The reference picture list is a list of reference pictures stored in the reference picture memory 306. FIG. 6 is a conceptual diagram showing an example of a reference picture and a reference picture list. In FIG. 6(a), a rectangle is a picture, an arrow is a picture reference relationship, a horizontal axis is time, I, P, and B in the rectangle are intra pictures, uni-predictive pictures, bi-predictive pictures, and numbers in the rectangle are decoded. Show the order. As shown in the figure, the decoding order of the pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, P1. FIG. 6B shows an example of the reference picture list of the picture B3 (target picture). The reference picture list is a list showing candidates of reference pictures, 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. In each CU, the reference picture index refIdxLX specifies which picture in the reference picture list RefPicListX (X=0 or 1) is actually referred to. The figure shows an example of refIdxL0=2 and refIdxL1=0. Note that LX is a description method used when the L0 prediction and the L1 prediction are not distinguished, and hereinafter, the parameter for the L0 list and the parameter for the L1 list are distinguished by replacing LX with L0 and L1.

(マージ予測とAMVP予測)
予測パラメータの復号(符号化)方法には、マージ予測(merge)モードとAMVP(Advanced Motion Vector Prediction、適応動きベクトル予測)モードがあり、マージフラグmerge_flagは、これらを識別するためのフラグである。マージ予測モードは、予測リスト利用フラグpredFlagLX(またはインター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍ブロックの予測パラメータから導出する用いるモードである。AMVPモードは、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めるモードである。なお、動きベクトルmvLXは、予測ベクトルmvpLXを識別する予測ベクトルインデックスmvp_LX_idxと差分ベクトルmvdLX、動きベクトル精度モードamvr_modeとして符号化される。マージ予測モードは、隣接ブロックの動き情報等から導出されるマージ候補を選択して動きベクトルmvLX(動きベクトル情報)を得るモードである。また、マージ予測モードの他に、アフィンフラグaffine_flagにより識別されるアフィン予測モードがあってもよい。マージ予測モードの一形態として、スキップフラグskip_flagにより識別されるスキップモードがあってもよい。なお、スキップモードとは、マージモードと同様の方法で予測パラメータを導出する用いるモードであり、かつ、予測誤差(残差画像、残差情報)を符号化データに含めないモードである。換言すれば、スキップフラグskip_flagが1の場合、対象CUに関して、当該スキップフラグskip_flagとマージインデックスmerge_idxなどのマージモードに関連するシンタックス要素のみを含み、動きベクトルや残差情報などは符号化データに含まれない。
(Merge prediction and AMVP prediction)
The prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Advanced Motion Vector Prediction) mode, and the merge flag merge_flag is a flag for identifying these. The merge prediction mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data but are derived from the prediction parameters of the already processed neighboring blocks. .. 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, a difference vector mvdLX, and a motion vector precision mode amvr_mode. The merge prediction mode is a mode in which a merge candidate derived from motion information of adjacent blocks is selected to obtain a motion vector mvLX (motion vector information). In addition to the merge prediction mode, there may be an affine prediction mode identified by the affine flag affine_flag. As one form of the merge prediction mode, there may be a skip mode identified by a skip flag skip_flag. The skip mode is a mode in which a prediction parameter is derived by the same method as the merge mode, and a prediction error (residual image, residual information) is not included in encoded data. In other words, when the skip flag skip_flag is 1, the target CU includes only the skip flag skip_flag and syntax elements related to the merge mode such as the merge index merge_idx, and the motion vector and the residual information are included in the encoded data. Not included.

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

(インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
インター予測識別子inter_pred_idcは、参照ピクチャの種類および数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストで管理された1枚の参照ピクチャを用いる単予測を示す。PRED_BIはL0リストとL1リストで管理された2枚の参照ピクチャを用いる双予測BiPredを示す。
(Inter prediction identifier inter_pred_idc and prediction list usage flag predFlagLX)
The inter-prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes any value of PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate uni-prediction using one reference picture managed in the L0 list and the L1 list, respectively. PRED_BI indicates a bi-prediction BiPred that uses two reference pictures managed by the L0 list and the L1 list.

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

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

inter_pred_idc = (predFlagL1<<1)+predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
(双予測biPredの判定)
双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。例えば以下の式で導出できる。
inter_pred_idc = (predFlagL1<<1)+predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
(Judgment of bi-predictive biPred)
The flag biPred indicating whether it is bi-prediction BiPred can be derived depending on whether the two prediction list use flags are both 1. For example, it can be derived by the following formula.

biPred = (predFlagL0==1 && predFlagL1==1)
あるいは、フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。例えば以下の式で導出できる。
biPred = (predFlagL0==1 && predFlagL1==1)
Alternatively, the flag biPred can also be derived depending on whether 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 formula.

biPred = (inter_pred_idc==PRED_BI) ? 1 : 0
(動画像復号装置の構成)
本実施形態に係る動画像復号装置31(図7)の構成について説明する。
biPred = (inter_pred_idc==PRED_BI) ?1: 0
(Structure of video decoding device)
The configuration of the moving picture decoding device 31 (FIG. 7) according to the present embodiment will be described.

動画像復号装置31は、エントロピー復号部301、パラメータ復号部302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生
成装置)308、逆量子化・逆変換部311、及び加算部312を含んで構成される。なお、後述
の動画像符号化装置11に合わせ、動画像復号装置31にループフィルタ305が含まれない構
成もある。
The moving image decoding device 31 includes an entropy decoding unit 301, a parameter decoding unit 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, an inverse quantization/inverse conversion unit. 311 and an addition unit 312 are included. It should be noted that there is a configuration in which the loop filter 305 is not included in the moving image decoding device 31 in accordance with the moving image encoding device 11 described later.

パラメータ復号部302は、さらに、図示しない、ヘッダ復号部3020、CT情報復号部3021
、及びCU復号部3022(予測モード復号部)を備えており、CU復号部3022はさらにTU復号部3024を備えている。これらを総称して復号モジュールと呼んでもよい。ヘッダ復号部3020は、符号化データからVPS、SPS、PPSなどのパラメータセット情報、スライスヘッダ(ス
ライス情報)を復号する。CT情報復号部3021は、符号化データからCTを復号する。CU復号部3022は符号化データからCUを復号する。TU復号部3024は、TUに予測誤差が含まれている場合に、符号化データからQP更新情報(量子化補正値)と量子化予測誤差(residual_coding)を復号する。
The parameter decoding unit 302 further includes a header decoding unit 3020 and a CT information decoding unit 3021 (not shown).
, And a CU decoding unit 3022 (prediction mode decoding unit), and the CU decoding unit 3022 further includes a TU decoding unit 3024. These may be collectively referred to as a decoding module. The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS and slice header (slice information) from the encoded data. The CT information decoding unit 3021 decodes the CT from the encoded data. The CU decoding unit 3022 decodes the CU from the encoded data. The TU decoding unit 3024 decodes the QP update information (quantization correction value) and the quantization prediction error (residual_coding) from the encoded data when the TU includes a prediction error.

TU復号部3024は、スキップモード以外(skip_mode==0)の場合に、符号化データからQP更新情報(量子化補正値)と量子化予測誤差(residual_coding)を復号する。より具体的
には、TU復号部3024は、skip_mode==0の場合に、対象ブロックに量子化予測誤差が含まれているか否かを示すフラグcu_cbpを符号化データから復号し、cu_cbpが1の場合に量子化
予測誤差を復号するす。cu_cbpが符号化データに存在しない場合は0を設定する。また、cu_cbpが符号化データに存在しない場合において、スキップモードではcu_cbp=0、スキッ
プモード以外の場合にはcu_cbp=1と設定してもよい。
The TU decoding unit 3024 decodes the QP update information (quantization correction value) and the quantization prediction error (residual_coding) from the encoded data when the mode is other than the skip mode (skip_mode==0). More specifically, the TU decoding unit 3024, when skip_mode==0, decodes a flag cu_cbp indicating whether the target block includes a quantized prediction error from the encoded data, and cu_cbp is 1 In this case, the quantized prediction error is decoded. Set 0 if cu_cbp does not exist in the encoded data. If cu_cbp does not exist in the encoded data, cu_cbp=0 may be set in the skip mode, and cu_cbp=1 may be set in the modes other than the skip mode.

また、パラメータ復号部302は、図示しないインター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。 Moreover, the parameter decoding unit 302 is configured to include an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304 (not shown). The predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.

また、以降では処理の単位としてCTU、CUを使用した例を記載するが、この例に限らず
、サブCU単位で処理をしてもよい。あるいはCTU、CUをブロック、サブCUをサブブロック
と読み替え、ブロックあるいはサブブロック単位の処理としてもよい。
Further, although an example in which CTU and CU are used as a processing unit is described below, the processing is not limited to this example, and processing may be performed in sub CU units. Alternatively, the CTU and CU may be read as a block and the sub CU as a sub block, and the processing may be performed in block or sub block units.

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

エントロピー復号部301は、復号した符号をパラメータ復号部302に出力する。復号した符号とは、例えば、predMode、merge_flag、merge_idx、inter_pred_idc、refIdxLX、mvp_LX_idx、mvdLX、amvr_mode等である。どの符号を復号するかの制御は、パラメータ復号
部302の指示に基づいて行われる。
The entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302. The decoded code is, for example, predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX, amvr_mode. Control of which code is decoded is performed based on an instruction from the parameter decoding unit 302.

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

図8は、本実施形態に係るインター予測パラメータ復号部303の構成を示す概略図である。インター予測パラメータ復号部303は、マージ予測部30374、DMVR部30375、サブブロック予測部(アフィン予測部)30372、MMVD予測部30376、Triangle予測部30377、AMVP予測パラメータ導出部3032、加算部3038を含んで構成される。マージ予測部30374は、マージ予測パラメータ導出部3036を含んで構成される。AMVP予測パラメータ導出部3032、マージ予測パラメータ導出部3036、アフィン予測部30372は、動画像符号化装置、動画像復号装置で共通する手段であるので、これらを総称して動きベクトル導出部(動きベクトル導出装置)と称してもよい。 FIG. 8 is a schematic diagram showing the configuration of the inter prediction parameter decoding unit 303 according to the present embodiment. The inter prediction parameter decoding unit 303 includes a merge prediction unit 30374, a DMVR unit 30375, a sub-block prediction unit (affine prediction unit) 30372, an MMVD prediction unit 30376, a Triangle prediction unit 30377, an AMVP prediction parameter derivation unit 3032, and an addition unit 3038. Composed of. The merge prediction unit 30374 includes a merge prediction parameter derivation unit 3036. Since the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, and the affine prediction unit 30372 are means common to the moving image coding device and the moving image decoding device, they are collectively referred to as the motion vector derivation unit (motion vector May be referred to as a derivation device).

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

図10は、対象ブロック(bW×bH)を構成する各サブブロックの動きベクトルspMvLXを、制御点V0の動きベクトル(mv0_x,mv0_y)およびV1の動きベクトル(mv1_x,mv1_y)から導出する例を示す図である。各サブブロックの動きベクトルspMvLXは、図に示すように、各サブブロックの中心に位置する点毎の動きベクトルとして導出される。 FIG. 10 shows an example of deriving the motion vector spMvLX of each sub-block forming the target block (bW×bH) 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. 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 the figure.

アフィン予測部30372は対象ブロックのアフィン予測パラメータに基づいて、対象ブロ
ック中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi=xPb+sbW*i, yj=yPb+sbH*j, i=0,1,2,…,bW/sbW-1、j=0,1,2,…,bH/sbH-1)を下記の式を用いて、導出する。
The affine prediction unit 30372 calculates a motion vector spMvLX[xi][yi] (xi=xPb+sbW*i, yj=yPb+sbH*j, i of each sub-block in the target block based on the affine prediction parameter of the target block. =0,1,2,...,bW/sbW-1, j=0,1,2,...,bH/sbH-1) is derived using the following formula.

spMvLX[xi][yi][0] = mv0_x+(mv1_x-mv0_x)/bW*(xi+sbW/2)-(mv1_y-mv0_y)/bH*(yi+sbH/2)
spMvLX[xi][yi][1] = mv0_y+(mv1_y-mv0_y)/bW*(xi+sbW/2)+(mv1_x-mv0_x)/bH*(yi+sbH/2)
(マージ予測)
図9(a)は、マージ予測部30374に含まれるマージ予測パラメータ導出部3036の構成を示
す概略図である。マージ予測パラメータ導出部3036は、マージ候補導出部30361、マージ
候補選択部30362を備える。なお、マージ候補は、予測リスト利用フラグpredFlagLX、動
きベクトルmvLX、参照ピクチャインデックスrefIdxLXを含んで構成され、マージ候補リストに格納される。マージ候補リストに格納されたマージ候補には、所定の規則に従ってイ
ンデックスが割り当てられる。
spMvLX[xi][yi][0] = mv0_x+(mv1_x-mv0_x)/bW*(xi+sbW/2)-(mv1_y-mv0_y)/bH*(yi+sbH/2)
spMvLX[xi][yi][1] = mv0_y+(mv1_y-mv0_y)/bW*(xi+sbW/2)+(mv1_x-mv0_x)/bH*(yi+sbH/2)
(Merge prediction)
FIG. 9A is a schematic diagram showing the configuration of the merge prediction parameter derivation unit 3036 included in the merge prediction unit 30374. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 and a merge candidate selection unit 30362. The merge candidate is configured to include the prediction list use flag predFlagLX, the motion vector mvLX, and the reference picture index refIdxLX, and is stored in the merge candidate list. Indexes are assigned to the merge candidates stored in the merge candidate list according to a predetermined rule.

マージ候補導出部30361は、復号済の隣接ブロックの動きベクトルと参照ピクチャイン
デックスrefIdxLXをそのまま用いてマージ候補を導出する。
The merge candidate derivation unit 30361 derives a merge candidate by using the motion vector of the decoded adjacent block and the reference picture index refIdxLX as they are.

マージ候補リストmergeCandList[]に格納する順番は、例えば、空間マージ候補A1,B1,B0,A0,B2、時間マージ候補Col、ペアワイズマージ候補avgK、ゼロマージ候補ZK、である。なお、利用可能でない(ブロックがイントラ予測等)参照ブロックはマージ候補リストに格納しない。 The order of storing in the merge candidate list mergeCandList[] is, for example, the spatial merge candidates A1, B1, B0, A0, B2, the temporal merge candidate Col, the pairwise merge candidate avgK, and the zero merge candidate ZK. Reference blocks that are not available (blocks are intra-predicted, etc.) are not stored in the merge candidate list.

マージ候補選択部30362は、マージ候補リストに含まれるマージ候補のうち、マージイ
ンデックスmerge_idxが示すマージ候補Nを以下の式で選択する。
The merge candidate selection unit 30362 selects the merge candidate N indicated by the merge index merge_idx from the merge candidates included in the merge candidate list using the following formula.

N = mergeCandList[merge_idx]
ここでNは、マージ候補を示すラベルであり、A1,B1,B0,A0,B2,Col,avgK,ZKなどをとり
る。ラベルNで示されるマージ候補の動き情報は(mvLXN[0], mvLXN[1])、predFlagLXN, refIdxLXNで示される。
N = mergeCandList[merge_idx]
Here, N is a label indicating a merge candidate, and takes A1, B1, B0, A0, B2, Col, avgK, ZK and the like. The motion information of the merge candidate indicated by the label N is (mvLXN[0], mvLXN[1]) and is indicated by predFlagLXN, refIdxLXN.

選択されたマージ候補の動き情報(mvLXN[0], mvLXN[1])、predFlagLXN, refIdxLXNを、対象ブロックのインター予測パラメータとして選択する。
マージ候補選択部30362は選択したマージ候補のインター予測パラメータを予測パラメー
タメモリ307に記憶するとともに、予測画像生成部308に出力する。
The motion information (mvLXN[0], mvLXN[1]), predFlagLXN, refIdxLXN of the selected merge candidate are selected as the inter prediction parameters of the target block.
The merge candidate selection unit 30362 stores the inter prediction parameter of the selected merge candidate in the prediction parameter memory 307 and outputs it to the predicted image generation unit 308.

(AMVP予測)
図9(b)は、本実施形態に係るAMVP予測パラメータ導出部3032の構成を示す概略図である。AMVP予測パラメータ導出部3032は、ベクトル候補導出部3033とベクトル候補選択部3034を備える。ベクトル候補導出部3033は、参照ピクチャインデックスrefIdxLXに基づいて予測パラメータメモリ307が記憶する復号済みの隣接ブロックの動きベクトルmvLXから予測ベクトル候補を導出し、予測ベクトル候補リストmvpListLX[]に格納する。
(AMVP forecast)
FIG. 9(b) is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to this embodiment. The AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033 and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 derives a prediction vector candidate from the motion vector mvLX of the decoded adjacent block stored in the prediction parameter memory 307 based on the reference picture index refIdxLX, and stores it in the prediction vector candidate list mvpListLX[].

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

なお、予測ベクトル候補は、対象ブロックから予め定めた範囲の復号済隣接ブロックの動きベクトルをスケーリングすることで導出される。なお、隣接ブロックは、対象ブロックに空間的に隣接するブロック、例えば、左ブロック、上ブロックの他、対象ブロックに時間的に隣接する領域、例えば、対象ブロックと同じ位置を含み、表示時刻が異なるブロックの予測パラメータから得られた領域を含む。 The predictive vector candidate is derived by scaling the motion vector of the decoded adjacent block within a predetermined range from the target block. The adjacent block includes blocks spatially adjacent to the target block, for example, the left block and the upper block, and regions temporally adjacent to the target block, for example, the same position as the target block, and the display time is different. It includes the region obtained from the prediction parameters of the block.

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

mvLX[0] = mvpLX[0]+mvdLX[0]
mvLX[1] = mvpLX[1]+mvdLX[1]
動きベクトル精度モードamvr_modeは、AMVPモードで導出される動きベクトルの精度を
切り替えるシンタックス要素である、例えば、amvr_mode=0, 1, 2において、1/4画素、1
画素、4画素精度を切り替える。
mvLX[0] = mvpLX[0]+mvdLX[0]
mvLX[1] = mvpLX[1]+mvdLX[1]
The motion vector accuracy mode amvr_mode is a syntax element that switches the accuracy of the motion vector derived in the AMVP mode, for example, in amvr_mode=0, 1, 2, 1/4 pixel, 1
Switches between pixel and 4-pixel precision.

動きベクトルの精度を1/16精度(MVPREC=16)とする場合、1/4, 1, 4画素精度の動きベクトル差分を1/16画素精度の動きベクトル差分に変更するために下記のように、amvr_mode
から導出されるMvShift (=1<<amvr_mode)を用いて逆量子化してもよい。
If the motion vector precision is 1/16 precision (MVPREC=16), change the motion vector difference with 1/4, 1, 4 pixel precision to the motion vector difference with 1/16 pixel precision as follows. , Amvr_mode
Dequantization may be performed using MvShift (=1<<amvr_mode) derived from

mvdLX[0] = mvdLX[0] << (MvShift + 2)
mvdLX[1] = mvdLX[1] << (MvShift + 2)
なお、さらにパラメータ復号部302は、上記MvShiftでシフトする前のmvdLX[]を以下の
シンタックス要素を復号して導出してもよい。
・abs_mvd_greater0_flag
・abs_mvd_minus2
・mvd_sign_flag
そして、パラメータ復号部302は、以下の式を用いることによって、シンタックス要素か
ら差分ベクトルlMvd[]を復号する。
mvdLX[0] = mvdLX[0] << (MvShift + 2)
mvdLX[1] = mvdLX[1] << (MvShift + 2)
Note that the parameter decoding unit 302 may further derive mvdLX[] before shifting with MvShift by decoding the following syntax elements.
・Abs_mvd_greater0_flag
・Abs_mvd_minus2
・Mvd_sign_flag
Then, the parameter decoding unit 302 decodes the difference vector lMvd[] from the syntax element by using the following formula.

lMvd[compIdx] = abs_mvd_greater0_flag[compIdx] * (abs_mvd_minus2[compIdx]+2) *
(1-2*mvd_sign_flag[compIdx])
さらに復号した差分ベクトルlMvd[]は、並進MVDの場合(MotionModelIdc[x][y] == 0)にはMvdLXに設定し、制御点MVDの場合(MotionModelIdc[x][y] != 0)には、MvdCpLXに設定する。
lMvd[compIdx] = abs_mvd_greater0_flag[compIdx] * (abs_mvd_minus2[compIdx]+2) *
(1-2*mvd_sign_flag[compIdx])
Further, the decoded difference vector lMvd[] is set to MvdLX in the case of translation MVD (MotionModelIdc[x][y] == 0), and is set in the case of control point MVD (MotionModelIdc[x][y] != 0). Set to MvdCpLX.

if (MotionModelIdc[x][y] == 0)
mvdLX[x0][y0][compIdx] = lMvd[compIdx]
else
mvdCpLX[x0][y0][compIdx] = lMvd[compIdx]<<2
(動きベクトルスケーリング)
動きベクトルのスケーリングの導出方法を説明する。動きベクトルMv(参照動きベクトル)、Mvをもつブロックを含むピクチャPicMv、Mvの参照ピクチャPicMvRef、スケーリン
グ後の動きベクトルsMv、sMvをもつブロックを含むピクチャCurPic、sMvが参照する参照
ピクチャCurPicRefとすると、sMvの導出関数MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef)は下式で表される。
if (MotionModelIdc[x][y] == 0)
mvdLX[x0][y0][compIdx] = lMvd[compIdx]
else
mvdCpLX[x0][y0][compIdx] = lMvd[compIdx]<<2
(Motion vector scaling)
A method of deriving the motion vector scaling will be described. Motion vector Mv (reference motion vector), picture PicMv including a block with Mv, reference picture PicMvRef of Mv, motion vector sMv after scaling, picture CurPic including a block with sMv, and reference picture CurPicRef referenced by sMv, The derivation function MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) of sMv is expressed by the following equation.

sMv = MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef)
= Clip3(-R1,R1-1,sign(distScaleFactor*Mv)*((abs(distScaleFactor*Mv)+round1-1)>>shift1))
distScaleFactor = Clip3(-R2,R2-1,(tb*tx+round2)>>shift2)
tx = (16384+abs(td)>>1)/td
td = DiffPicOrderCnt(PicMv,PicMvRef)
tb = DiffPicOrderCnt(CurPic,CurPicRef)
ここで、round1、round2、shift1、shift2は、逆数を用いて除算を行うためのラウンド値及びシフト値で、例えば、round1=1<<(shift1-1)、round2=1<<(shift2-1)、shift1=8、shift2=6などである。DiffPicOrderCnt(Pic1,Pic2)はPic1とPic2の時間情報(例えばPOC)の差を返す関数である。R1、R2は処理を限られた精度で行うために値域を制限するもので例えば、R1=32768、R2=4096などである。
sMv = MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef)
= Clip3(-R1,R1-1,sign(distScaleFactor*Mv)*((abs(distScaleFactor*Mv)+round1-1)>>shift1))
distScaleFactor = Clip3(-R2,R2-1,(tb*tx+round2)>>shift2)
tx = (16384+abs(td)>>1)/td
td = DiffPicOrderCnt(PicMv,PicMvRef)
tb = DiffPicOrderCnt(CurPic,CurPicRef)
Here, round1, round2, shift1, shift2 are round values and shift values for performing division using reciprocal numbers, for example, round1=1<<(shift1-1), round2=1<<(shift2-1 ), shift1=8, shift2=6, etc. DiffPicOrderCnt(Pic1,Pic2) is a function that returns the difference between the time information (for example, POC) between Pic1 and Pic2. R1 and R2 limit the value range in order to perform processing with limited accuracy, and for example, R1=32768 and R2=4096.

また、スケーリング関数MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef)は以下の式で
もよい。
Further, the scaling function MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) may be the following formula.

MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) =
Mv*DiffPicOrderCnt(CurPic,CurPicRef)/DiffPicOrderCnt(PicMv,PicMvRef)
すなわち、CurPicとCurPicRefの時間情報の差と、PicMvとPicMvRefの時間情報の差との比に応じてMvをスケーリングしてもよい。
MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) =
Mv*DiffPicOrderCnt(CurPic,CurPicRef)/DiffPicOrderCnt(PicMv,PicMvRef)
That is, Mv may be scaled according to the ratio of the difference in time information between CurPic and CurPicRef and the difference in time information between PicMv and PicMvRef.

(DMVR)
続いて、DMVR部30375が行うDMVR(Decoder side Motion Vector Refinement)処理について説明する。DMVR部30375は、対象CUについて以下の条件が満たされている場合に、マ
ージ予測部30374が導出する当該対象CUの動きベクトルmvLXを、参照画像を用いて修正す
る。
- 対象CUに対して、merge_flagがマージモード又は、skip_flagがスキップモードを適用
することを示している。
- 対象CUに対して、affine_flagがアフィンモードを使っていないことを示している。
- 対象CUが双予測である。
- 参照ピクチャについて以下の等式が満たされる(対象ピクチャに対し2枚の参照ピクチャが反対方向、かつ対象ピクチャから同じPOC距離(POCの差分)にある)。
(DMVR)
Next, the DMVR (Decoder side Motion Vector Refinement) processing performed by the DMVR unit 30375 will be described. The DMVR unit 30375 corrects the motion vector mvLX of the target CU derived by the merge prediction unit 30374 using the reference image when the following conditions are satisfied for the target CU.
-Merge_flag indicates that the merge mode or skip_flag applies the skip mode to the target CU.
-Indicates that affine_flag does not use the affine mode for the target CU.
-The target CU is bi-predictive.
-The following equation is satisfied for the reference picture (two reference pictures in opposite directions to the target picture and at the same POC distance (POC difference) from the target picture).

POC_current - POC0 = POC1 - POC_current
- 対象CUのサイズが所定の値より大きい。例えば、CUの幅と高さの和が12よりも大きい場合である。
POC_current-POC0 = POC1-POC_current
-The size of the target CU is larger than the specified value. For example, the sum of the width and height of the CU is greater than 12.

DMVR処理は、以下のステップからなる。
ステップ0:マージインデックスが指し示す初期(initial)ベクトルを取得する。この
時、動きベクトルの値を四捨五入で、整数化して初期整数ベクトルとする。
ステップ1:探索点のブロックの画素値の平均値を求める。
ステップ2:マージ候補の動きベクトル(初期ベクトル)が指す点、および、その4近傍
の点のMRSAD costを算出し、コストが最小となる点を求める。
ステップ3:ステップ2のコストが最小となる点とその8近傍の点MRSAD costを算出し、
コストが最小となる点を求め、初期(initial)ベクトル(整数化されていないもの)を
最小となる点の整数画素分だけ修正し、リファイン動きベクトルとする。
ステップ4:ステップ2及びステップ3において動きベクトルが初期整数ベクトルから変更されなかった場合、error surface equationを用いて小数精度のリファインメント(refinement)動きベクトルを取得する。
ステップ5:リファインメント動きベクトルに基づいて、8-tapの補間フィルタを用いて
、最終的な予測画像を取得する。
The DMVR process consists of the following steps.
Step 0: Get the initial vector pointed to by the merge index. At this time, the value of the motion vector is rounded off to be an integer and used as an initial integer vector.
Step 1: Find the average value of the pixel values of the block at the search point.
Step 2: Calculate the MRSAD cost of the point indicated by the motion vector (initial vector) of the merge candidate and the points near the four points to find the point with the lowest cost.
Step 3: Calculate the MRSAD cost, which is the point where the cost in Step 2 is the minimum and the points in the 8 neighborhoods,
The point at which the cost is minimized is obtained, and the initial vector (which is not an integer) is corrected by the integer pixel of the point at which the cost is minimized to obtain a refined motion vector.
Step 4: If the motion vector is not changed from the initial integer vector in steps 2 and 3, an error surface equation is used to obtain a refinement refinement motion vector.
Step 5: Based on the refinement motion vector, an 8-tap interpolation filter is used to obtain the final predicted image.

ステップ2および3において、MRSADコストは、以下の式により算出される。
MRSAD=ΣΣabs(Temp_L0[xi][yi]-Temp_L1[xi][yi]-AVE(Temp_L0)+AVE(Temp_L1))
ここで、AVEはブロック内の画素値の平均値である。すなわち、
AVE(Temp_L0)=ΣΣTemp_L0[xi][yi]/(BH*BW)
AVE(Temp_L1)=ΣΣTemp_L1[xi][yi]/(BH*BW)
である。BHはブロックの垂直方向の画素数であり、BWはブロックの水平方向の画素数である。
In steps 2 and 3, the MRSAD cost is calculated by the following formula.
MRSAD=ΣΣabs(Temp_L0[xi][yi]-Temp_L1[xi][yi]-AVE(Temp_L0)+AVE(Temp_L1))
Here, AVE is the average value of the pixel values in the block. That is,
AVE(Temp_L0)=ΣΣTemp_L0[xi][yi]/(BH*BW)
AVE(Temp_L1)=ΣΣTemp_L1[xi][yi]/(BH*BW)
Is. BH is the number of pixels in the vertical direction of the block, and BW is the number of pixels in the horizontal direction of the block.

ステップ4において、error surface equationは以下のとおりである。
E(x,y)=A(x-x0)^2+ B(y-y0)^2+C
ここで、初期ベクトルの指す点を中心(0,0)とした4近傍位置(-1,0)、(0,-1)、(1,0)、(0,1)のコストをE(-1,0)、E(0,-1)、E(1,0)、E(0,1)として、(x0,y0)を導出する。
x0=(E(-1,0)-E(1,0))/(2(E(-1,0)+E(1,0)-2E(0,0)))
y0=(E(0,-1)-E(0,1))/(2(E(0,-1)+E(0,1)-2E(0,0)))
なお、リファインメント動きベクトルmvL0',mvL1'およびリファインメント前の動きベ
クトルmvL0,mvL1は、以下の等式を満たす。
mvL0'-mvL0= mvL1-mvL1'
リファインメント動きベクトルmvLXは、インター予測画像生成部309に供給される。
In step 4, the error surface equation is as follows.
E(x,y)=A(x-x0)^2+ B(y-y0)^2+C
Here, the cost of four neighboring positions (-1,0), (0,-1), (1,0), (0,1) with the point indicated by the initial vector as the center (0,0) is E( (X0,y0) is derived as (-1,0), E(0,-1), E(1,0), and E(0,1).
x0=(E(-1,0)-E(1,0))/(2(E(-1,0)+E(1,0)-2E(0,0)))
y0=(E(0,-1)-E(0,1))/(2(E(0,-1)+E(0,1)-2E(0,0)))
The refinement motion vectors mvL0′, mvL1′ and the pre-refinement motion vectors mvL0, mvL1 satisfy the following equations.
mvL0'-mvL0= mvL1-mvL1'
The refinement motion vector mvLX is supplied to the inter prediction image generation unit 309.

リファインメント動きベクトルmvLXは、デブロッキング動作、および時間的な動きベクトル(temporal motion vector)予測に用いられてもよい。 The refinement motion vector mvLX may be used for deblocking motion and temporal motion vector prediction.

また、空間的動きベクトル(spatial motion vector)予測には、上および左上のCTUからのリファインメント動きベクトルmvLXが用いられる。但し、マージ候補の動きベクトルが上および左上のCTUのものでない場合には、リファインメントされていない動きベクト
ルが用いられる。
In addition, the refinement motion vector mvLX from the upper and upper left CTUs is used for spatial motion vector prediction. However, if the motion vector of the merge candidate is not the upper or upper left CTU, the unrefined motion vector is used.

ここでは、誤差評価値としてMRSADを用いる手法を示したが、絶対値差分和であるSAD値SAD=ΣΣabs(Temp_L0[xi][yi]-Temp_L1[xi][yi])を用いてもよい。この場合、ステップ1のブロックの平均値を求める処理は、必要ではない。 Although the method using MRSAD as the error evaluation value is shown here, the SAD value SAD=ΣΣabs(Temp_L0[xi][yi]-Temp_L1[xi][yi]), which is the sum of absolute difference, may be used. In this case, the process of obtaining the average value of the blocks in step 1 is not necessary.

(Triangle予測)
続いてTriangle予測について説明する。Triangle予測では、対角線又は反対角線を境界として、対象CUが2つの三角形の予測単位に分割される。それぞれの三角形予測単位における予測画像は、対象CU(三角形予測単位を含む矩形ブロック)の予測画像の各画素に画素の位置に応じた重みつけマスク処理を施すことで導出する。例えば、矩形領域内の三角形領域の画素を1、三角形以外の領域を0とするマスクを乗ずることにより、矩形画像から三角形画像を導出できる。予測画像の適応的な重み付け処理は対角線を挟んだ双方の領域に対して適用され、2つの予測画像を用いた適応的重みつけ処理により対象CU(矩形ブロック)の1つの予測画像が導出される。この処理を、Triangle合成処理と呼ぶ。変換(逆変換)及び量子化(逆量子化)処理が対象CUの全体に対して適用される。なお、Triangle予測は、マージ予測モード又はスキップモードの場合にのみ適用される。
(Triangle prediction)
Next, the Triangle prediction will be described. In Triangle prediction, the target CU is divided into two triangular prediction units with a diagonal line or an opposite diagonal line as a boundary. The prediction image in each triangle prediction unit is derived by performing weighting mask processing on each pixel of the prediction image of the target CU (rectangular block including the triangle prediction unit) according to the position of the pixel. For example, a triangular image can be derived from a rectangular image by multiplying by a mask in which the pixels in the triangular area in the rectangular area are 1 and the areas other than the triangle are 0. The adaptive weighting process of the prediction image is applied to both regions sandwiching the diagonal line, and one prediction image of the target CU (rectangular block) is derived by the adaptive weighting process using the two prediction images. .. This process is called a Triangle compositing process. Transformation (inverse transformation) and quantization (inverse quantization) processing is applied to the entire target CU. The Triangle prediction is applied only in the merge prediction mode or the skip mode.

Triangle予測部30377は、Triangle予測に用いられる2つの三角形領域に対応する予測
パラメータを導出し、インター予測画像生成部309に供給する。Triangle予測では処理の
簡略化のために、双予測を用いない構成でもよい。この場合、1つの三角形領域において単方向予測のインター予測パラメータを導出する。なお、2つの予測画像の導出及び予測画像を用いた合成は、動き補償部3091、Triangle合成部30952で行う。
The Triangle prediction unit 30377 derives prediction parameters corresponding to the two triangular regions used for Triangle prediction, and supplies the prediction parameters to the inter prediction image generation unit 309. In the Triangle prediction, a configuration that does not use bi-prediction may be used to simplify the processing. In this case, an inter prediction parameter for unidirectional prediction is derived in one triangular area. Note that the derivation of the two predicted images and the synthesis using the predicted images are performed by the motion compensation unit 3091 and the Triangle synthesis unit 30952.

(MMVD予測部30376)
MMVD予測部30376は、MMVD(Merge with Motion Vector Differece)モードにおける処
理を行う。MMVDモードは、マージ候補から導出される動きベクトル(隣接ブロックの動きベクトルなどから導出される動きベクトル)に、所定の距離及び所定の方向の差分ベクトルを加算することで動きベクトルを得るモードである。MMVDモードにおいては、MMVD予測部30376は、マージ候補を用いるとともに、差分ベクトルの値域を所定の距離(例えば8通り)及び所定の方向(例えば4方向, 8方向など)に制限することで、効率的に動きベクトルを導出する。
(MMVD prediction unit 30376)
The MMVD prediction unit 30376 performs processing in the MMVD (Merge with Motion Vector Differece) mode. The MMVD mode is a mode in which a motion vector is obtained by adding a difference vector in a predetermined distance and in a predetermined direction to a motion vector derived from a merge candidate (motion vector derived from a motion vector of an adjacent block). .. In the MMVD mode, the MMVD prediction unit 30376 uses the merge candidate and limits the range of the difference vector to a predetermined distance (for example, 8 ways) and a predetermined direction (for example, 4 directions, 8 directions) to improve the efficiency. Motion vector is derived.

MMVD予測部30376は、マージ候補mergeCandList[]と符号化データから復号もしくは符号化データに符号化するシンタックス要素base_candidate_idx、direction_idx、distance_idxを用いて動きベクトルmvLX[]を導出する。さらに、MMVD予測部30376は、距離テーブルを選択するシンタックス要素distance_list_idxを符号化もしくは復号して利用してもよ
い。
The MMVD prediction unit 30376 derives a motion vector mvLX[] using merge candidates mergeCandList[] and syntax elements base_candidate_idx, direction_idx, distance_idx for decoding or encoding encoded data into encoded data. Furthermore, the MMVD prediction unit 30376 may encode or decode the syntax element distance_list_idx that selects the distance table and use it.

MMVD予測部30376は、対象CUに対して、merge_flagがマージモードを適用することを示
している場合、又は、skip_flagがスキップモードを適用することを示している場合に、M
MVDフラグを復号する。さらに、MMVD予測部30376は、MMVDフラグがMMVDモードを適用することを示している場合(mmvd_flag=1)には、MMVDモードを適用する。
MMVD prediction unit 30376, for the target CU, if merge_flag indicates to apply the merge mode, or, if skip_flag indicates to apply the skip mode, M
Decode the MVD flag. Further, the MMVD prediction unit 30376 applies the MMVD mode when the MMVD flag indicates that the MMVD mode is applied (mmvd_flag=1).

MMVD予測部30376は、マージ候補リストの先頭から2個の候補のいずれかの予測ベクト
ルと、方向および距離で表した差分ベクトル(MVD:motion vector difference)とで、
動きベクトルを導出する。さらに、MMVD予測部30376は、予測ベクトルと差分ベクトルか
ら動きベクトルを導出する。
The MMVD prediction unit 30376 uses one of the prediction vectors of the two candidates from the beginning of the merge candidate list and a difference vector (MVD: motion vector difference) represented by a direction and a distance,
Derive the motion vector. Furthermore, the MMVD prediction unit 30376 derives a motion vector from the prediction vector and the difference vector.

図15は、MMVD予測部30376において導出される差分ベクトルmvdLXの候補を示す。図に示す例では、中央の黒丸が予測ベクトルmvLXN(中心ベクトル)の指す位置である。 FIG. 15 shows candidates for the difference vector mvdLX derived by the MMVD prediction unit 30376. In the example shown in the figure, the central black circle is the position indicated by the prediction vector mvLXN (center vector).

図14の(a)はmergeCandList[]のインデックスbase_candidate_idxとmvLXNの関係を示し
、mvLXNにはmergeCandList[base_candidate_idx]の動きベクトルがセットされる。この中心ベクトルが指す位置(図15の黒丸)と実際の動きベクトルの差が差分ベクトルmvdLXで
ある。
FIG. 14A shows the relationship between the index base_candidate_idx of mergeCandList[] and mvLXN, and the motion vector of mergeCandList[base_candidate_idx] is set in mvLXN. The difference between the position pointed by this center vector (black circle in FIG. 15) and the actual motion vector is the difference vector mvdLX.

図14の(b)は、対象ブロックに隣接するブロックの一例を示す図である。例えば、mergeCandList[]={A1,B1,B0,A0,B2}の場合、復号したbase_candidate_idxが0を示すと、MMVD予測部30376は図14の(b)に示すブロックA1の動きベクトルを予測ベクトルmvLXNとして選択する。また、復号したbase_candidate_idxが1を示すと、MMVD予測部30376は図14の(b)に示すブロックB1の動きベクトルを予測ベクトルmvLXNとして選択する。なお、base_candidate_idxが符号化データで通知されない場合には、base_candidate_idx=0と推定してもよい。 FIG. 14B is a diagram showing an example of blocks adjacent to the target block. For example, in the case of mergeCandList[]={A1,B1,B0,A0,B2}, if the decoded base_candidate_idx indicates 0, the MMVD prediction unit 30376 causes the motion vector of the block A1 shown in (b) of FIG. 14 to be the prediction vector. Select as mvLXN. When the decoded base_candidate_idx indicates 1, the MMVD prediction unit 30376 selects the motion vector of the block B1 shown in (b) of FIG. 14 as the prediction vector mvLXN. If base_candidate_idx is not notified as encoded data, it may be estimated that base_candidate_idx=0.

また、MMVD予測部30376は、差分ベクトルmvdLXの長さを示すインデックスdistance_idxおよびmvdLXの方向を示すインデックスdirection_idxを用いてmvdLXを導出する。 Also, the MMVD prediction unit 30376 derives mvdLX using the index distance_idx indicating the length of the difference vector mvdLX and the index direction_idx indicating the direction of mvdLX.

図14の(c)は、distance_idxの一例を示す図である。図14の(c)に示すように、distance_idxにおいて、0、1、2、3、4、5、6および7の値は、1/4pel、1/2pel、1pel、2pel、4pel、8pel、16pelおよび32pelの8つの距離(長さ)のそれぞれに対応付けられている。 FIG. 14C is a diagram showing an example of distance_idx. As shown in (c) of FIG. 14, in distance_idx, the values of 0, 1, 2, 3, 4, 5, 6 and 7 are 1/4pel, 1/2pel, 1pel, 2pel, 4pel, 8pel, 16pel. And 32 pels are associated with each of the eight distances (lengths).

図14の(d)は、direction_idxの一例を示す図である。図14の(d)に示すように、direction_idxにおいて、0,1,2および3の値は、x軸が正の方向、x軸が負の方向、y軸が正の方向、y軸が負の方向に各々対応付けられている。MMVD予測部30376は、direction_idxから方向テーブルDirectionTableを参照して基本動きベクトル(mvdUnit[0], mvdUnit[1])を導出する。(mvdUnit[0], mvdUnit[1])は、(sign[0],sign[1])と記述されてもよい。 FIG. 14(d) is a diagram showing an example of direction_idx. As shown in (d) of FIG. 14, in direction_idx, the values of 0, 1, 2 and 3 are positive in the x-axis, negative in the x-axis, positive in the y-axis and negative in the y-axis. Are respectively associated with the directions. The MMVD prediction unit 30376 derives the basic motion vector (mvdUnit[0], mvdUnit[1]) from direction_idx by referring to the direction table DirectionTable. (mvdUnit[0], mvdUnit[1]) may be described as (sign[0], sign[1]).

dir_table_x[] = { 1, -1, 0, 0 }
dir_table_y[] = { 0, 0, 1, -1 }
また、MMVD予測部30376は、距離テーブルDistanceTableにおいてdistance_idxの示す距離DistanceTable[distance_idx]から、ベースとなる差分ベクトルの大きさDistFromBaseMV
を下式で導出する。
dir_table_x[] = {1, -1, 0, 0}
dir_table_y[] = {0, 0, 1, -1}
Also, the MMVD prediction unit 30376 determines the magnitude of the difference vector serving as the base DistFromBaseMV from the distance DistanceTable[distance_idx] indicated by the distance_idx in the distance table DistanceTable.
Is derived by the following formula.

DistFromBaseMV = DistanceTable[distance_idx]
(4方向以外の場合)
上記では、基本動きベクトル(mvdUnit[0], mvdUnit[1])が上下左右の4方向の場合を説明したが、4方向に限定されず8方向でもよい。基本動きベクトルを8方向とする場合の方向テーブルDirectionTableのx成分dir_table_x[]およびy成分dir_table_y[]の例を以下に示す。
DistFromBaseMV = DistanceTable[distance_idx]
(In cases other than 4 directions)
The case where the basic motion vector (mvdUnit[0], mvdUnit[1]) has four directions of up, down, left, and right has been described above, but the number is not limited to four and may be eight. An example of the x component dir_table_x[] and the y component dir_table_y[] of the direction table DirectionTable when the basic motion vector is eight directions is shown below.

dir_table_x[] = { 2, -2, 0, 0, 1, -1, -1, 1 }
dir_table_y[] = { 0, 0, 2, -2, 1, -1, 1, -1 }
なお、方向テーブルの大きさや順序は上記以外でもよい。
dir_table_x[] = {2, -2, 0, 0, 1, -1, -1, 1}
dir_table_y[] = {0, 0, 2, -2, 1, -1, 1, -1}
The size and order of the direction table may be other than the above.

MMVD予測部30376は、direction_idxからDirectionTableを参照して基本動きベクトル(mvdUnit[0], mvdUnit[1])を導出する。 The MMVD prediction unit 30376 derives the basic motion vector (mvdUnit[0], mvdUnit[1]) from direction_idx with reference to DirectionTable.

mvdUnit[0] = dir_table_x[direction_idx]
mvdUnit[1] = dir_table_y[direction_idx]
また、例えば以下のような方向テーブルを用いることで、4、6、12、16方向としてもよい。
・6方向の場合
dir_table_x[] = { 8, -8, 2, -2, -2, 2 }
dir_table_y[] = { 0, 0, 4, -4, 4, -4 }
もしくは
dir_table_x[] = { 8, -8, 3, -3, -3, 3 }
dir_table_y[] = { 0, 0, 6, -6, 6, -6 }
・12方向の場合
dir_table_x[] = { 8, -8, 0, 0, 4, 2, -4, -2, -2, -4, 2, 4 }
dir_table_y[] = { 0, 0, 8, -8, 2, 4, -2, -4, 4, 2, -4, -2 }
もしくは
dir_table_x[] = { 8, -8, 0, 0, 6, 3, -6, -3, -3, -6, 3, 6 }
dir_table_y[] = { 0, 0, 8, -8, 3, 6, -3, -6, 6, 3, -6, -3 }
・16方向の場合
dir_table_x[] = {8, -8, 0, 0, 4, -4, -4, 4, 6, 2, -6, -2, -2, -6, 2, 6 }
dir_table_y[] = {0, 0, 8, -8, 4, -4, 4, -4, 2, 6, -2, -6, 6, 2, -6, -2 }
勿論、4方向の場合も以下のようになる。
mvdUnit[0] = dir_table_x[direction_idx]
mvdUnit[1] = dir_table_y[direction_idx]
Further, for example, by using the following direction table, the directions may be 4, 6, 12, 16 directions.
・For 6 directions
dir_table_x[] = {8, -8, 2, -2, -2, 2}
dir_table_y[] = {0, 0, 4, -4, 4, -4}
Or
dir_table_x[] = {8, -8, 3, -3, -3, 3}
dir_table_y[] = {0, 0, 6, -6, 6, -6}
・In the case of 12 directions
dir_table_x[] = {8, -8, 0, 0, 4, 2, -4, -2, -2, -4, 2, 4}
dir_table_y[] = {0, 0, 8, -8, 2, 4, -2, -4, 4, 2, -4, -2}
Or
dir_table_x[] = {8, -8, 0, 0, 6, 3, -6, -3, -3, -6, 3, 6}
dir_table_y[] = {0, 0, 8, -8, 3, 6, -3, -6, 6, 3, -6, -3}
・For 16 directions
dir_table_x[] = {8, -8, 0, 0, 4, -4, -4, 4, 6, 2, -6, -2, -2, -6, 2, 6}
dir_table_y[] = {0, 0, 8, -8, 4, -4, 4, -4, 2, 6, -2, -6, 6, 2, -6, -2}
Of course, the case of four directions is as follows.

dir_table_x[] = { 1, -1, 0, 0 }
dir_table_y[] = { 0, 0, 1, -1 }
なお、方向テーブルの大きさや順序は上記以外でもよい。
dir_table_x[] = {1, -1, 0, 0}
dir_table_y[] = {0, 0, 1, -1}
The size and order of the direction table may be other than the above.

(複数の距離テーブル)
また、距離テーブルは1つに限定されず複数でもよい。例えば、MMVD予測部30376は、
第1の距離テーブルDistanceTable1[]と第2の距離テーブルDistanceTable2[]から以下のようにDistFromBaseMVを導出しても良い。
(Multiple distance tables)
Further, the distance table is not limited to one, and may be plural. For example, the MMVD prediction unit 30376
DistFromBaseMV may be derived as follows from the first distance table DistanceTable1[] and the second distance table DistanceTable2[].

MMVD予測部30376は、さらに符号化データから復号もしくは導出したdistance_list_idxが示すDistanceTable[]を用いて、差分ベクトルmvdLXの長さを導出する。 The MMVD prediction unit 30376 further derives the length of the difference vector mvdLX using DistanceTable[] indicated by distance_list_idx decoded or derived from the encoded data.

DistanceTable1 [] = {1, 2, 3, 5}
DistanceTable2 [] = {4, 8, 16, 32}
DistanceTable = DistanceTable1 (distance_list_idx == 0)
DistanceTable = DistanceTable2 (distance_list_idx == 1)
DistFromBaseMV = DistanceTable[distance_idx]
また、MMVD予測部30376は、2次元テーブルDistanceTable2dを用いて2つの距離テーブルを切り替えてもよい。
DistanceTable1 [] = {1, 2, 3, 5}
DistanceTable2 [] = {4, 8, 16, 32}
DistanceTable = DistanceTable1 (distance_list_idx == 0)
DistanceTable = DistanceTable2 (distance_list_idx == 1)
DistFromBaseMV = DistanceTable[distance_idx]
Also, the MMVD prediction unit 30376 may switch between the two distance tables using the two-dimensional table DistanceTable2d.

DistanceTable2d [] = {{1, 2, 3, 5},{4, 8, 16, 32}}
DistFromBaseMV = DistanceTable2d[distance_list_idx][distance_idx]
(距離テーブル伝送の実施例1)
パラメータ復号部302が、タイルグループヘッダやスライスヘッダなどのセグメントの
ヘッダ、もしくは、パラメータセットにおいて、MMVDの距離テーブルに関する情報を伝送してもよい。上記複数の距離テーブルの例との違いは、上記では、距離テーブルインデックスdistance_list_idxを、符号化ユニット単位で伝送する構成に対し、以下の構成の特
徴の一つは、符号化ユニットのセットであるセグメントヘッダもしくはパラメータセットで伝送する点であるしてもよい。
DistanceTable2d [] = {{1, 2, 3, 5},{4, 8, 16, 32}}
DistFromBaseMV = DistanceTable2d[distance_list_idx][distance_idx]
(Example 1 of distance table transmission)
The parameter decoding unit 302 may transmit the information about the MMVD distance table in the segment header such as the tile group header or the slice header, or in the parameter set. The difference from the example of the above multiple distance tables is that in the above, the distance table index distance_list_idx is transmitted in units of coding units, whereas one of the features of the following configuration is a segment that is a set of coding units. It may be a point to be transmitted by a header or a parameter set.

図22は、距離テーブルの情報を伝送する場合の動画像復号装置の動作を示すフローチャートである。 FIG. 22 is a flowchart showing the operation of the moving picture decoding apparatus when transmitting the information of the distance table.

S101:パラメータ復号部302は、セグメントヘッダもしくはパラメータヘッダの符号化
データから距離テーブルの情報のシンタックス要素を復号する。
S101: The parameter decoding unit 302 decodes the syntax element of the information of the distance table from the encoded data of the segment header or the parameter header.

パラメータ復号部302は、i = 0…N-1のインデックス情報distance_tbl_idx[i]を復号し、インデックス情報の示すDistanceTableBase[]の値をDistanceTableの値とする。ここでDistanceTableBase[]は動画像符号化装置および動画像復号装置のMMVD予測で使用する距離の候補を格納するテーブルである。また、Nは、テーブルの要素数である。 The parameter decoding unit 302 decodes the index information distance_tbl_idx[i] of i=0... N-1, and sets the value of DistanceTableBase[] indicated by the index information as the value of DistanceTable. Here, DistanceTableBase[] is a table that stores distance candidates used in the MMVD prediction of the moving image encoding device and the moving image decoding device. N is the number of elements in the table.

なお、距離のインデックスを伝送する場合には、i=0..N-1のN個のインデックスではな
く、i=0..N-2のN-1個のインデックスを復号してもよい。最後(i=N-1)のインデックスは、復号したインデックス(i=0からN-2までのインデックス)で出現しなかったインデックス値を導出する。具体的には、N個のインデックスの和は、N*(N-1)/2であることから、
distance_tbl_idx[N-1] = N*(N-1)/2 - (distance_tbl_idx[0] + distance_tbl_idx[1]
+ …distance_tbl_idx[N-2])
により導出できる。例えばN=8の場合で、復号されたN-1個のインデックスが6, 7, 5, 4, 3, 2, 1である場合には、最後のインデックスdistance_tbl_idx[N-1]は以下のように導出できる。
When transmitting the distance index, N-1 indexes of i=0..N-2 may be decoded instead of N indexes of i=0..N-1. The last (i=N-1) index derives an index value that does not appear in the decoded index (i=0 to N-2). Specifically, since the sum of N indexes is N*(N-1)/2,
distance_tbl_idx[N-1] = N*(N-1)/2-(distance_tbl_idx[0] + distance_tbl_idx[1]
+ …Distance_tbl_idx[N-2])
Can be derived by For example, if N=8 and the decoded N-1 indices are 6, 7, 5, 4, 3, 2, 1 then the last index distance_tbl_idx[N-1] is Can be derived to.

distance_tbl_idx[7] = 28 - (6 + 7 + 5 + 4 + 3 + 2 + 1) = 28 - 28 = 0
S102:パラメータ復号部302は、距離テーブルのシンタックス要素から距離テーブルを
導出する。
distance_tbl_idx[7] = 28-(6 + 7 + 5 + 4 + 3 + 2 + 1) = 28-28 = 0
S102: The parameter decoding unit 302 derives the distance table from the syntax elements of the distance table.

DistanceTable[0] = DistanceTableBase[distance_tbl_idx[0]]
DistanceTable[1] = DistanceTableBase[distance_tbl_idx[1]]
DistanceTable[2] = DistanceTableBase[distance_tbl_idx[2]]

DistanceTable[N-1] = DistanceTableBase[distance_tbl_idx[N-1]]
例えば、DistanceTableBase[] = {1, 2, 4, 8, 16, 32, 64, 128}の場合、で、distance_tbl_idx[] = {6, 7, 5, 4, 3, 2, 1, 0}が復号された場合、DistanceTableは以下のよ
うに導出する。
DistanceTable[0] = DistanceTableBase[distance_tbl_idx[0]]
DistanceTable[1] = DistanceTableBase[distance_tbl_idx[1]]
DistanceTable[2] = DistanceTableBase[distance_tbl_idx[2]]

DistanceTable[N-1] = DistanceTableBase[distance_tbl_idx[N-1]]
For example, if DistanceTableBase[] = {1, 2, 4, 8, 16, 32, 64, 128}, then distance_tbl_idx[] = {6, 7, 5, 4, 3, 2, 1, 0} is When decrypted, DistanceTable is derived as follows.

DistanceTable[0] = DistanceTableBase[6] = 64
DistanceTable[1] = DistanceTableBase[7] = 128
DistanceTable[2] = DistanceTableBase[5] = 32

DistanceTable[N-1] = DistanceTableBase[0] = 1
すなわち、DistanceTable[] = {64, 128, 32, 16, 8, 4, 2, 1}
また距離テーブルのシンタックスはピクチャパラメータセットなどのパラメータセットで伝送してもよい。
DistanceTable[0] = DistanceTableBase[6] = 64
DistanceTable[1] = DistanceTableBase[7] = 128
DistanceTable[2] = DistanceTableBase[5] = 32

DistanceTable[N-1] = DistanceTableBase[0] = 1
That is, DistanceTable[] = {64, 128, 32, 16, 8, 4, 2, 1}
Also, the syntax of the distance table may be transmitted in a parameter set such as a picture parameter set.

上記構成によれば、ピクチャの性質に合わせた距離テーブルを符号化データで効率的に伝送するすることができるので符号化効率を向上することができる。また前ピクチャの状態に依存しないため、連続するピクチャを並列処理することができる。また、復号側の処理が簡単でありエラー耐性に強い。 According to the above configuration, it is possible to efficiently transmit the distance table according to the nature of the picture as encoded data, and thus it is possible to improve the encoding efficiency. Further, since it does not depend on the state of the previous picture, consecutive pictures can be processed in parallel. In addition, the processing on the decoding side is simple, and it is highly resistant to errors.

(距離テーブル伝送の実施例2)
動画像符号化装置および動画像復号装置において予め複数の距離テーブルを用意しておいて、符号化データとしてテーブルを選択するインデックスを伝送しても良い。
(Example 2 of distance table transmission)
It is also possible to prepare a plurality of distance tables in advance in the moving image encoding device and the moving image decoding device and transmit the index for selecting the table as encoded data.

S101:パラメータ復号部302は、セグメントヘッダもしくはパラメータヘッダの符号化
データから距離テーブルの情報のシンタックス要素として、テーブルを選択するためのインデックスmmvd_tbl_idxを復号する。
S101: The parameter decoding unit 302 decodes the index mmvd_tbl_idx for selecting a table from the encoded data of the segment header or the parameter header as a syntax element of the information of the distance table.

DistanceTableSet[][] =
{
{1, 2, 4, 8, 16, 32, 64, 128} // DistanceTable0[]
{2, 4, 1, 8, 16, 32, 64, 128} // DistanceTable1[]
{4, 8, 2, 16, 1, 32, 64, 128} // DistanceTable2[]
{8, 16, 4, 32, 2, 64, 1, 128} // DistanceTable3[]
{64, 128, 32, 16, 8, 4, 2, 1} // DistanceTable4[]
{128, 64, 32, 16, 8, 4, 2, 1} // DistanceTable5[]
}
S102:パラメータ復号部302は、インデックスmmvd_tbl_idxを用いて距離テーブルを選
択する。
DistanceTableSet[][] =
{
{1, 2, 4, 8, 16, 32, 64, 128} // DistanceTable0[]
{2, 4, 1, 8, 16, 32, 64, 128} // DistanceTable1[]
{4, 8, 2, 16, 1, 32, 64, 128} // DistanceTable2[]
{8, 16, 4, 32, 2, 64, 1, 128} // DistanceTable3[]
{64, 128, 32, 16, 8, 4, 2, 1} // DistanceTable4[]
{128, 64, 32, 16, 8, 4, 2, 1} // DistanceTable5[]
}
S102: The parameter decoding unit 302 selects a distance table using the index mmvd_tbl_idx.

DistanceTable[] = DistanceTableSet[mmvd_tbl_idx]
なお、テーブルは上記に限定されず以下のようなテーブルでもよい。
DistanceTable[] = DistanceTableSet[mmvd_tbl_idx]
The table is not limited to the above, and the following table may be used.

DistanceTableSet[][] =
{
{1, 2, 4, 8, 16, 32, 64, 128} // DistanceTable0[]
{2, 4, 1, 8, 16, 32, 64, 128} // DistanceTable1[]
{2, 1, 4, 8, 16, 32, 64, 128} // DistanceTable2[]
{4, 8, 2, 16, 1, 32, 64, 128} // DistanceTable3[]
{4, 2, 8, 16, 1, 32, 64, 128} // DistanceTable4[]
{8, 16, 4, 32, 2, 64, 1, 128} // DistanceTable5[]
{8, 4, 16, 32, 2, 64, 1, 128} // DistanceTable6[]
{64, 128, 32, 16, 8, 4, 2, 1} // DistanceTable7[]
{64, 32, 128, 16, 8, 4, 2, 1} // DistanceTable8[]
{128, 64, 32, 16, 8, 4, 2, 1} // DistanceTable9[]
}
上記のテーブルでは、もっとも優先度の高い距離値において複数のテーブルを用いることによって、異なるピクチャの性質により合わせたテーブルの選択ができる。例えば、先頭の値が4である場合に対して、2番目の要素が先頭要素の4より大きい8であるテーブルと、2番目の要素が先頭要素の4より小さい2であるテーブルを用意する。
DistanceTableSet[][] =
{
{1, 2, 4, 8, 16, 32, 64, 128} // DistanceTable0[]
{2, 4, 1, 8, 16, 32, 64, 128} // DistanceTable1[]
{2, 1, 4, 8, 16, 32, 64, 128} // DistanceTable2[]
{4, 8, 2, 16, 1, 32, 64, 128} // DistanceTable3[]
{4, 2, 8, 16, 1, 32, 64, 128} // DistanceTable4[]
{8, 16, 4, 32, 2, 64, 1, 128} // DistanceTable5[]
{8, 4, 16, 32, 2, 64, 1, 128} // DistanceTable6[]
{64, 128, 32, 16, 8, 4, 2, 1} // DistanceTable7[]
{64, 32, 128, 16, 8, 4, 2, 1} // DistanceTable8[]
{128, 64, 32, 16, 8, 4, 2, 1} // DistanceTable9[]
}
In the above table, by using a plurality of tables in the distance value having the highest priority, it is possible to select a table that is more suitable for the characteristics of different pictures. For example, for a case where the value at the beginning is 4, prepare a table in which the second element is 8 which is larger than the first element, 4 and a table in which the second element is 2 which is smaller than the first element, 4

{4, 8, 2, 16, 1, 32, 64, 128} // DistanceTable3[]
{4, 2, 8, 16, 1, 32, 64, 128} // DistanceTable4[]
上記構成によれば、ピクチャの性質に合わせた距離テーブルを選択することによって、
符号化効率を向上することができる。また既符号化(既復号)ピクチャの状態に依存しないため、連続するピクチャを並列処理することができる。また、復号側の処理が簡単でありエラーに強い。
{4, 8, 2, 16, 1, 32, 64, 128} // DistanceTable3[]
{4, 2, 8, 16, 1, 32, 64, 128} // DistanceTable4[]
According to the above configuration, by selecting the distance table according to the nature of the picture,
The coding efficiency can be improved. Further, since it does not depend on the state of the already-encoded (decoded) picture, consecutive pictures can be processed in parallel. Also, the processing on the decoding side is simple and resistant to errors.

(距離テーブル伝送の実施例3)
動画像符号化装置および動画像復号装置において、符号化データとして最も頻度が高い距離のインデックスを伝送しても良い。
(Example 3 of distance table transmission)
In the moving picture coding apparatus and the moving picture decoding apparatus, the index of the distance having the highest frequency may be transmitted as coded data.

S101:パラメータ復号部302は、セグメントヘッダもしくはパラメータヘッダの符号化
データから距離テーブルの情報のシンタックス要素として、距離テーブルの先頭シンタックス要素として、テーブルを導出するためのインデックスmmvd_tbl_idxを復号する。
S101: The parameter decoding unit 302 decodes the index mmvd_tbl_idx for deriving the table from the encoded data of the segment header or the parameter header as the syntax element of the information of the distance table and as the first syntax element of the distance table.

DistanceTable[0] = DistanceTable[mmvd_tbl_idx]
S102:パラメータ復号部302は、mmvd_tbl_idxのシンタックス値に応じて距離テーブル
の先頭要素DistanceTable[0]を導出する。さらに、パラメータ復号部302は、距離テーブ
ルの先頭要素の値DistanceTable[0]に基づいて、他の距離テーブルの値を導出する。
DistanceTable[0] = DistanceTable[mmvd_tbl_idx]
S102: The parameter decoding unit 302 derives the first element DistanceTable[0] of the distance table according to the syntax value of mmvd_tbl_idx. Further, the parameter decoding unit 302 derives the value of another distance table based on the value DistanceTable[0] of the first element of the distance table.

例えば、先頭要素の値の2倍と1/2倍、4倍と1/4倍の重みを順に計算し、ある特定の範囲の重みを距離テーブルの値として追加する。 For example, weights of 2 times and 1/2 times, 4 times and 1/4 times the value of the head element are calculated in order, and the weight of a certain specific range is added as the value of the distance table.

例えば、以下のような疑似コードで導出可能である。 For example, it can be derived with the following pseudo code.

i = 0
tmp = DistanceTable[0]
for (K = 2; K < 16; K=K*2) {
if (i < NumDistanceTable && tmp * K > MinDistanceVal && tmp * K < MaxDistanceVal) {
DistanceTable[i++] = tmp * K
if (i < NumDistanceTable && tmp / K > MinDistanceVal && tmp / K < MaxDistanceVal)
DistanceTable[i++] = tmp / K
}
ここで、NumDistanceTableは距離テーブルのサイズ、MinDistanceValは距離テーブルの最小値(例えば0)、MaxDistanceValは距離テーブルの最大値(例えば128)である。
i = 0
tmp = DistanceTable[0]
for (K = 2; K <16; K=K*2) {
if (i <NumDistanceTable && tmp * K >MinDistanceVal && tmp * K <MaxDistanceVal) {
DistanceTable[i++] = tmp * K
if (i <NumDistanceTable && tmp / K> MinDistanceVal && tmp / K <MaxDistanceVal)
DistanceTable[i++] = tmp / K
}
Here, NumDistanceTable is the size of the distance table, MinDistanceVal is the minimum value of the distance table (for example, 0), and MaxDistanceVal is the maximum value of the distance table (for example, 128).

また以下のように先頭要素のインデックスmmvd_tbl_idxに対して、+1, -1, +2, -2のインデックスの重みを順に計算し、ある特定の範囲の重みを距離テーブルの値として追加する。 Further, as follows, with respect to the index mmvd_tbl_idx of the head element, the index weights of +1, -1, +2, and -2 are calculated in order, and the weight of a certain specific range is added as the value of the distance table.

例えば、以下のような疑似コードで導出可能である。 For example, it can be derived with the following pseudo code.

i = 0
DistanceTable[0] = DistanceTableBase[mmvd_tbl_idx]
for (K = 1; K < 16; K=K+1) {
if (i < NumDistanceTable && mmvd_tbl_idx+K < NumDistanceTable)
DistanceTable[i++] = DistanceTableBase[mmvd_tbl_idx+K]
if (i < NumDistanceTable && mmvd_tbl_idx-K > 0)
DistanceTable[i++] = DistanceTableBase[mmvd_tbl_idx-K]
}
上記構成によれば、距離テーブルの先頭要素に関するインデックスを1つ伝送するだけ
で、動画像復号装置でピクチャの性質に合わせた距離テーブルを導出することができ、符号化効率を向上することができる。
i = 0
DistanceTable[0] = DistanceTableBase[mmvd_tbl_idx]
for (K = 1; K <16; K=K+1) {
if (i <NumDistanceTable && mmvd_tbl_idx+K <NumDistanceTable)
DistanceTable[i++] = DistanceTableBase[mmvd_tbl_idx+K]
if (i <NumDistanceTable &&mmvd_tbl_idx-K> 0)
DistanceTable[i++] = DistanceTableBase[mmvd_tbl_idx-K]
}
According to the above configuration, the moving image decoding apparatus can derive the distance table according to the property of the picture by only transmitting one index related to the first element of the distance table, and the coding efficiency can be improved. ..

(距離テーブル生成の実施例1)
動画像符号化装置および動画像復号装置において、MMVD距離テーブルを画面内で更新する構成としてもよい。特に、隣接ブロック(左隣接ブロックと上隣接ブロック)で利用したMMVD距離値を優先してもよい。
(Example 1 of distance table generation)
In the moving image encoding device and the moving image decoding device, the MMVD distance table may be updated within the screen. In particular, the MMVD distance value used in adjacent blocks (left adjacent block and upper adjacent block) may be prioritized.

i = 0
if (左ブロックがMMVD予測を利用したブロック)
左ブロックの重みをDistanceTable[i]に代入し、iをインクリメント(i++)
if (上ブロックがMMVD予測を利用したブロック)
上ブロックの重みをDistanceTable[i]に代入し、iをインクリメント(i++)
j = i..NumDistanceTable -1においてNumDistanceTable[j]の値を導出する。例えば、DistanceTableBase[]に格納されている重みのうち、DistanceTable[]にまだ格納されてお
らず、また、先頭要素DistanceTable[0]に近い大きさの(先頭要素との差分値の絶対値が小さい)重みをDistanceTable[i]に順に代入する。
i = 0
if (left block is a block using MMVD prediction)
Substitute the weight of the left block into DistanceTable[i] and increment i (i++)
if (upper block is a block using MMVD prediction)
Substitute the weight of the upper block into DistanceTable[i] and increment i (i++)
Derive the value of NumDistanceTable[j] at j = i..NumDistanceTable -1. For example, of the weights stored in DistanceTableBase[], the weights are not yet stored in DistanceTable[] and have a size close to the first element DistanceTable[0] (the absolute value of the difference value with the first element is small. ) Substitute weights into DistanceTable[i] in order.

上記構成によれば、画面内の処理によって、距離テーブルを並び替えることによって、ピクチャの性質に合わせた距離テーブルを導出することができ、符号化効率を向上することができる。また前ピクチャの状態に依存しないため、連続するピクチャを並列処理することができる。 According to the above configuration, the distance table is rearranged by the processing on the screen, so that the distance table can be derived according to the property of the picture, and the coding efficiency can be improved. Further, since it does not depend on the state of the previous picture, consecutive pictures can be processed in parallel.

(差分ベクトルの導出)
MMVD予測部30376は、基本動きベクトルと差分ベクトルの大きさDistFromBaseMVからrefineMvLXを導出する。中心ベクトルに関するマージ候補NがL0参照ピクチャからの単予測(predFlagL0N = 1, predFlagL1N = 0)の場合、MMVD予測部30376は、L0の差分ベクトルrefineMvL0を、基本動きベクトルと差分ベクトルの大きさDistFromBaseMVから導出する。
(Derivation of difference vector)
The MMVD prediction unit 30376 derives refineMvLX from the magnitude DistFromBaseMV of the basic motion vector and the difference vector. When the merge candidate N regarding the center vector is uni-prediction from the L0 reference picture (predFlagL0N = 1, predFlagL1N = 0), the MMVD prediction unit 30376 calculates the difference vector refineMvL0 of the L0 from the basic motion vector and the size of the difference vector DistFromBaseMV. Derive.

refineMvL0[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
refineMvL0[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
refineMvL1[0] = 0
refineMvL1[1] = 0
ここでshiftMMVDは、動き補償部3091(補間部)での動きベクトルの精度MVPRECにあう
ように差分ベクトルの大きさを調整する値である。例えばMVPRECが16、つまり1/16画素の動きベクトル精度で、4方向、つまりmvdUnit[0], mvdUnit[1]が0もしくは1の場合には
、2を用いることが適当である。また、shiftMMVDのシフト方向は左シフトの限定されない。例えば、6、8、12、16方向など、mvdUnit[0], mvdUnit[1]が0もしくは1以外の値(例えば8)などを用いる場合には、MMVD予測部30376は、シフト方向を右シフトとしてもよい。例えば、MMVD予測部30376は、以下のように基本動きベクトル(mvdUnit[0], mvdUnit[1])を乗算した後で右シフトをしてもよい。
refineMvL0[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
refineMvL0[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
refineMvL1[0] = 0
refineMvL1[1] = 0
Here, shiftMMVD is a value for adjusting the size of the difference vector so as to match the motion vector accuracy MVPREC in the motion compensation unit 3091 (interpolation unit). For example, when MVPREC is 16, that is, with motion vector accuracy of 1/16 pixel, in four directions, that is, when mvdUnit[0] and mvdUnit[1] are 0 or 1, it is appropriate to use 2. The shift direction of shiftMMVD is not limited to left shift. For example, when mvdUnit[0], mvdUnit[1] uses a value other than 0 or 1 (e.g., 8) in 6, 8, 12, 16 directions, the MMVD prediction unit 30376 shifts the shift direction to the right. May be For example, the MMVD prediction unit 30376 may perform right shift after multiplying the basic motion vector (mvdUnit[0], mvdUnit[1]) as follows.

refineMvL0[0] = (DistFromBaseMV * mvdUnit[0]) >> shiftMMVD
refineMvL0[1] = (DistFromBaseMV * mvdUnit[1]) >> shiftMMVD
また、MMVD予測部30376は、動きベクトルの大きさと符号に分けて計算してもよい。以
後、差分ベクトルの他の導出方法においても同様である。
refineMvL0[0] = (DistFromBaseMV * mvdUnit[0]) >> shiftMMVD
refineMvL0[1] = (DistFromBaseMV * mvdUnit[1]) >> shiftMMVD
In addition, the MMVD prediction unit 30376 may perform calculation by dividing the size and code of the motion vector. Hereinafter, the same applies to other derivation methods of the difference vector.

refineMvL0[0] = ((DistFromBaseMV * abs(mvdUnit[0])) >> shiftMMVD) * sign(mvdUnit[0])
refineMvL0[1] = ((DistFromBaseMV * abs(mvdUnit[1])) >> shiftMMVD) * sign(mvdUn
it[1])
上記以外、中心ベクトルに関するマージ候補NがL1参照ピクチャからの単予測(predFlagL0N = 0, predFlagL1N = 1)の場合、MMVD予測部30376は、L1の差分ベクトルrefineMvL1を、基本動きベクトルと差分ベクトルの大きさDistFromBaseMVから導出する。
refineMvL0[0] = ((DistFromBaseMV * abs(mvdUnit[0])) >> shiftMMVD) * sign(mvdUnit[0])
refineMvL0[1] = ((DistFromBaseMV * abs(mvdUnit[1])) >> shiftMMVD) * sign(mvdUn
it[1])
Other than the above, when the merge candidate N regarding the center vector is uni-prediction from the L1 reference picture (predFlagL0N = 0, predFlagL1N = 1), the MMVD prediction unit 30376 sets the difference vector refineMvL1 of the L1 to the size of the basic motion vector and the difference vector. Derived from DistFromBaseMV.

refineMvL0[0] = 0
refineMvL0[1] = 0
refineMvL1[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
refineMvL1[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
もしくは
refineMvL1[0] = (DistFromBaseMV * mvdUnit[0]) >> shiftMMVD
refineMvL1[1] = (DistFromBaseMV * mvdUnit[1]) >> shiftMMVD
上記以外、中心ベクトルに関するマージ候補Nが双予測(predFlagL0N = 1, predFlagL1N = 1)の場合、MMVD予測部30376は、第1差分ベクトルfirstMvを、基本動きベクトルと差分ベクトルの大きさDistFromBaseMVから導出する。firstMvをMmvdOffsetと呼んでも良い。
refineMvL0[0] = 0
refineMvL0[1] = 0
refineMvL1[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
refineMvL1[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
Or
refineMvL1[0] = (DistFromBaseMV * mvdUnit[0]) >> shiftMMVD
refineMvL1[1] = (DistFromBaseMV * mvdUnit[1]) >> shiftMMVD
Other than the above, when the merge candidate N regarding the center vector is bi-prediction (predFlagL0N = 1, predFlagL1N = 1), the MMVD prediction unit 30376 derives the first difference vector firstMv from the basic motion vector and the difference vector size DistFromBaseMV. .. You may call firstMv MmvdOffset.

firstMv[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
firstMv[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
もしくは
firstMv[0] = (DistFromBaseMV * mvdUnit[0]) >> shiftMMVD
firstMv[1] = (DistFromBaseMV * mvdUnit[1]) >> shiftMMVD
ここでshiftMMVDは、所定の長さに正規化するシフト値である。右シフトの場合には、シ
フト前にラウンド用のオフセットaddを加算してもよい。add = 1<<(shiftMMVD-1)を用い
ても、add = (1<<(shiftMMVD-1))-1を用いても良い。
firstMv[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
firstMv[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
Or
firstMv[0] = (DistFromBaseMV * mvdUnit[0]) >> shiftMMVD
firstMv[1] = (DistFromBaseMV * mvdUnit[1]) >> shiftMMVD
Here, shiftMMVD is a shift value that is normalized to a predetermined length. In the case of right shift, a round offset add may be added before the shift. Either add = 1<<(shiftMMVD-1) or add = (1<<(shiftMMVD-1))-1 may be used.

ここで、第1差分ベクトルrefineMvは、対象ピクチャと参照ピクチャのPOC距離(POCの差)が大きい方の差分ベクトルに対応する。つまり、参照ピクチャリストL0と参照ピクチャリストL1の参照ピクチャの内、対象ピクチャと参照ピクチャのPOC距離(POCの差)が大きい方の参照ピクチャを参照ピクチャリストLXの参照ピクチャとすると、POC距離(POCの差)が大きい方(LX)の参照ピクチャの参照画像と対象ピクチャ上の対象ブロックの差分ベクトルである。 Here, the first difference vector refineMv corresponds to the difference vector having the larger POC distance (POC difference) between the current picture and the reference picture. That is, if the reference picture in the reference picture list L0 and the reference picture list L1 that has the larger POC distance (difference in POC) between the target picture and the reference picture is the reference picture in the reference picture list LX, the POC distance ( It is the difference vector between the reference image of the reference picture of the larger (the difference of POC) (LX) and the target block on the target picture.

続いて、MMVD予測部30376は、第1動きベクトルfirstMvをスケーリングすることで、もう一方の参照ピクチャ(参照リストLY(Y=1-X))の第2動きベクトル(POC距離の小さい方の参照ピクチャの動きベクトルsecondMv)を導出してもよい。 Then, the MMVD prediction unit 30376 scales the first motion vector firstMv to obtain the second motion vector (reference of the smaller POC distance) of the other reference picture (reference list LY (Y=1-X)). The motion vector secondMv) of the picture may be derived.

例えば、対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の距離が、対象
ピクチャとL1ピクチャRefPicList1[ refIdxLN1 ]との距離よりも大きい場合には、第1ベクトルfirstMvはL0差分ベクトルrefineMvL0に対応する。さらに、MMVD予測部30376は、第1ベクトルfirstMvをスケーリングしてL1差分ベクトルrefineMvL1を導出してもよい。
For example, when the distance between the target picture currPic and the L0 picture RefPicList0[refIdxLN0] is larger than the distance between the target picture and the L1 picture RefPicList1[refIdxLN1], the first vector firstMv corresponds to the L0 difference vector refineMvL0. Further, the MMVD prediction unit 30376 may derive the L1 difference vector refineMvL1 by scaling the first vector firstMv.

refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
( ( Abs( distScaleFactor * refineMvL0[0]) + 127 ) >> 8 ) )
refineMvL1[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
( ( Abs( distScaleFactor * refineMvL0[1]) + 127 ) >> 8 ) )
ここでMMVD予測部30376は、distScaleFactor を、currPicとL0参照ピクチャのPOC差DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]とcurrPicとL1参照ピクチャのPOC差D
iffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]から以下のように導出する。
distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 )
tx = ( 16384 + ( Abs( td ) >> 1 ) ) / td
td = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]) )
tb = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]) )
上記以外、対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の距離が、対
象ピクチャとL1ピクチャRefPicList1[ refIdxLN1 ]との距離以下の場合には、第1ベクトルfirstMvはL1差分ベクトルrefineMvL1に対応する。この場合、MMVD予測部30376は、第1ベクトルfirstMvをスケーリングしてL0差分ベクトルrefineMvL0を導出してもよい。
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
(( Abs( distScaleFactor * refineMvL0[0]) + 127) >> 8 ))
refineMvL1[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
(( Abs( distScaleFactor * refineMvL0[1]) + 127) >> 8 ))
Here, the MMVD prediction unit 30376 sets the distScaleFactor to the POC difference DcurPicOrderCnt( currPic, RefPicList0[ refIdxLN0] between the currPic and the L0 reference picture and the POC difference D between the currPic and the L1 reference picture.
It is derived from iffPicOrderCnt( currPic, RefPicList1[ refIdxLN1] as follows.
distScaleFactor = Clip3( -4096, 4095, (tb * tx + 32) >> 6)
tx = (16384 + (Abs( td) >> 1 )) / td
td = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]) ))
tb = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]) ))
In addition to the above, when the distance between the target picture currPic and the L0 picture RefPicList0[refIdxLN0] is less than the distance between the target picture and the L1 picture RefPicList1[refIdxLN1], the first vector firstMv corresponds to the L1 difference vector refineMvL1. In this case, the MMVD prediction unit 30376 may derive the L0 difference vector refineMvL0 by scaling the first vector firstMv.

refineMvL0[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
( ( Abs( distScaleFactor * firstMv[0]) + 127 ) >> 8 ) )
refineMvL0[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
( ( Abs( distScaleFactor * firstMv[1]) + 127 ) >> 8 ) )
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
ここでMMVD予測部30376は、distScaleFactor を、currPicとL0参照ピクチャのPOC差DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]とcurrPicとL1参照ピクチャのPOC差DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]から以下のように導出する。
distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 )
tx = ( 16384 + ( Abs( td ) >> 1 ) ) / td
td = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]) )
tb = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]) )
なお、対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の距離が、対象ピ
クチャとL1ピクチャRefPicList1[ refIdxLN1 ]との距離と等しい場合には、MMVD予測部30376は、firstMv[]をスケーリングすることなく、以下の処理(処理Aもしくは処理B)からrefineMv[]に設定してもよい。
処理A:
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = -firstMv[0]
refineMvL1[1] = -firstMv[1]
処理B:
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
より具体的には、MMVD予測部30376は、refineMv[]を、L0参照ピクチャと、対象ピクチ
ャcurrPicと、L1対象ピクチャと、が時間順に並ぶ場合には処理Aで導出し、それ以外の
場合には処理Bで導出する。
refineMvL0[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
(( Abs( distScaleFactor * firstMv[0]) + 127) >> 8 ))
refineMvL0[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
(( Abs( distScaleFactor * firstMv[1]) + 127) >> 8 ))
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
Here, the MMVD prediction unit 30376 derives the distScaleFactor from the POC difference DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0] between the currPic and the L0 reference picture and the POC difference DiffPicOrderCnt( currPic, RefPicList1[ refIdxN1 from the currPic and the L1 reference picture). To do.
distScaleFactor = Clip3( -4096, 4095, (tb * tx + 32) >> 6)
tx = (16384 + (Abs( td) >> 1 )) / td
td = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]))
tb = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]) ))
If the distance between the target picture currPic and the L0 picture RefPicList0[refIdxLN0] is equal to the distance between the target picture and the L1 picture RefPicList1[refIdxLN1], the MMVD prediction unit 30376 does not scale the firstMv[] The process (process A or process B) may be set to refineMv[].
Process A:
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = -firstMv[0]
refineMvL1[1] = -firstMv[1]
Process B:
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
More specifically, the MMVD prediction unit 30376 derives refineMv[] in process A when the L0 reference picture, the target picture currPic, and the L1 target picture are arranged in chronological order, and in other cases. Is derived in process B.

なお、時間順に並ぶ場合とは
(POC_L0 - POC_curr) * (POC_L1 - POC_curr) < 0の場合、すなわち、
DiffPicOrderCnt( RefPicList0[ refIdxLN0 ], currPic) * DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ] ) > 0の場合である。
In addition, when it is arranged in time order
If (POC_L0-POC_curr) * (POC_L1-POC_curr) <0, i.e.,
This is the case when DiffPicOrderCnt( RefPicList0[ refIdxLN0 ], currPic) * DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ])> 0.

ここで、POC_L0、POC_L1、POC_currは、各々L0参照ピクチャ、L1参照ピクチャ、対象ピクチャのPicture Order Countを示す。 Here, POC_L0, POC_L1, and POC_curr indicate the Picture Order Count of the L0 reference picture, the L1 reference picture, and the target picture, respectively.

その逆の場合(時間順序の逆)とは、
(POC_L0 - POC_curr) * (POC_L1 - POC_curr) > 0の場合、すなわち、
DiffPicOrderCnt( RefPicList0[ refIdxLN0 ], currPic) * DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ] ) < 0の場合である。
In the opposite case (reverse time order),
If (POC_L0-POC_curr) * (POC_L1-POC_curr)> 0, i.e.
This is the case when DiffPicOrderCnt( RefPicList0[ refIdxLN0 ], currPic) * DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]) <0.

なお、POC間の距離が異なる場合においても、上記POC間の距離が等しい場合で説明したrefineMvLX[]を先に導出した後に、参照ピクチャと対象ピクチャのPOC距離に応じてrefineMvLX[]をスケールし最終的なrefineMvLX[]を導出しても構わない。 Even when the distances between POCs are different, refineMvLX[] is scaled according to the POC distances of the reference picture and the target picture after the refineMvLX[] described above when the distances between POCs are equal is derived first. The final refineMvLX[] may be derived.

(スケーリングの別の例)
上記では、対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の距離が、対
象ピクチャとL1ピクチャRefPicList1[ refIdxLN1 ]との距離と等しい場合には、処理Aと処理Bを用いてフリップする例を示したが、フリップはスケーリング処理で行うことができるため処理Bだけの処理とすることができる。
(Another example of scaling)
In the above, when the distance between the target picture currPic and the L0 picture RefPicList0[refIdxLN0] is equal to the distance between the target picture and the L1 picture RefPicList1[refIdxLN1], the processing A and the processing B are used to perform flipping. , Flip can be performed by the scaling process, and thus only the process B can be performed.

MMVD予測部30376は、第1動きベクトルfirstMvをスケーリングすることで、もう一方の参照ピクチャ(参照リストLY(Y=1-X))の第2動きベクトル(POC距離の小さい方の参照ピクチャの動きベクトルsecondMv)を導出してもよい。 The MMVD prediction unit 30376 scales the first motion vector firstMv to calculate the motion of the second motion vector (the motion of the reference picture with the smaller POC distance) of the other reference picture (reference list LY (Y=1-X)). The vector secondMv) may be derived.

まず、対象ピクチャcurrPicと参照ピクチャの距離をcurrPocDiffL0, currPocDiffL1と
して導出する。
First, the distance between the target picture currPic and the reference picture is derived as currPocDiffL0 and currPocDiffL1.

currPocDiffL0 = DiffPicOrderCnt( currPic, RefPicList0[ refIdxL0 ] )
currPocDiffL1 = DiffPicOrderCnt( currPic, RefPicList1[ refIdxL1 ] )
対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の差分と、対象ピクチャcurrPicとL1ピクチャRefPicList0[ refIdxLN0 ]の差分が等しい場合(currPocDiffL0 == currPocDiffL1)には、以下のように、第1ベクトルfirstMvをL0差分ベクトルrefineMvL0
とL1差分ベクトルrefineMvL1に設定する。この処理は、上記の処理Bに等しい。
currPocDiffL0 = DiffPicOrderCnt( currPic, RefPicList0[ refIdxL0 ])
currPocDiffL1 = DiffPicOrderCnt( currPic, RefPicList1[ refIdxL1 ])
If the difference between the target picture currPic and the L0 picture RefPicList0[ refIdxLN0] is equal to the difference between the target picture currPic and the L1 picture RefPicList0[ refIdxLN0] (currPocDiffL0 == currPocDiffL1), the first vector firstMv is the L0 difference as follows: Vector refineMvL0
And L1 difference vector refineMvL1. This process is equal to the above process B.

refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
上記以外、対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の距離が、対
象ピクチャとL1ピクチャRefPicList1[ refIdxLN1 ]との距離よりも大きい場合には(Abs(currPocDiffL0) > Abs(currPocDiffL1))、第1ベクトルfirstMvはL0差分ベクトルrefineMvL0に対応する。さらに、MMVD予測部30376は、第1ベクトルfirstMvをスケーリングしてL1差分ベクトルrefineMvL1を導出してもよい。
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
Other than the above, if the distance between the target picture currPic and the L0 picture RefPicList0[ refIdxLN0] is larger than the distance between the target picture and the L1 picture RefPicList1[ refIdxLN1] (Abs(currPocDiffL0)> Abs(currPocDiffL1)), the first vector firstMv corresponds to the L0 difference vector refineMvL0. Further, the MMVD prediction unit 30376 may derive the L1 difference vector refineMvL1 by scaling the first vector firstMv.

refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
( ( Abs( distScaleFactor * refineMvL0[0]) + 127 ) >> 8 ) )
refineMvL1[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
( ( Abs( distScaleFactor * refineMvL0[1]) + 127 ) >> 8 ) )
ここでMMVD予測部30376は、distScaleFactor を、currPicとL0参照ピクチャのPOC差DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]とcurrPicとL1参照ピクチャのPOC差DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]から以下のように導出する。
distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 )
tx = ( 16384 + ( Abs( td ) >> 1 ) ) / td
td = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]) )
tb = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]) )
なお上記では、Abs(currPocDiffL0) > Abs(currPocDiffL1)を用いたがAbs(currPocDiffL0) >= Abs(currPocDiffL1)を用いてもよい。
refineMvL0[0] = firstMv[0]
refineMvL0[1] = firstMv[1]
refineMvL1[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
(( Abs( distScaleFactor * refineMvL0[0]) + 127) >> 8 ))
refineMvL1[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
(( Abs( distScaleFactor * refineMvL0[1]) + 127) >> 8 ))
Here, the MMVD prediction unit 30376 derives the distScaleFactor from the POC difference DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0] between the currPic and the L0 reference picture and the POC difference DiffPicOrderCnt( currPic, RefPicList1[ refIdxN1 from the currPic and the L1 reference picture). To do.
distScaleFactor = Clip3( -4096, 4095, (tb * tx + 32) >> 6)
tx = (16384 + (Abs( td) >> 1 )) / td
td = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList0[ refIdxLN0 ]) ))
tb = Clip3( -128, 127, DiffPicOrderCnt( currPic, RefPicList1[ refIdxLN1 ]) ))
Although Abs(currPocDiffL0) >Abs(currPocDiffL1) is used in the above, Abs(currPocDiffL0) >= Abs(currPocDiffL1) may be used.

上記以外の場合(対象ピクチャcurrPicとL0ピクチャRefPicList0[ refIdxLN0 ]の距離
が、対象ピクチャとL1ピクチャRefPicList1[ refIdxLN1 ]との距離以下の場合(Abs(currPocDiffL0) <= Abs(currPocDiffL1))、第1ベクトルfirstMvはL1差分ベクトルrefineMvL1に対応する。この場合、MMVD予測部30376は、第1ベクトルfirstMvをスケーリングしてL0差分ベクトルrefineMvL0を導出してもよい。
In other cases (when the distance between the target picture currPic and L0 picture RefPicList0[ refIdxLN0] is less than the distance between the target picture and L1 picture RefPicList1[ refIdxLN1] (Abs(currPocDiffL0) <= Abs(currPocDiffL1)), the first vector firstMv corresponds to the L1 difference vector refineMvL1 In this case, the MMVD prediction unit 30376 may derive the L0 difference vector refineMvL0 by scaling the first vector firstMv.

refineMvL0[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
( ( Abs( distScaleFactor * firstMv[0]) + 127 ) >> 8 ) )
refineMvL0[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
( ( Abs( distScaleFactor * firstMv[1]) + 127 ) >> 8 ) )
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
上記構成では、スケーリングが多くても1回行われるだけであるので処理がシンプルである。またL0参照ピクチャとL1参照ピクチャとの距離が等しい場合の処理は、第1ベクトルfirstMvをL0差分ベクトルrefineMvL0とL1差分ベクトルrefineMvL1に設定する(処理B
)ことだけであり、処理が簡単である。
refineMvL0[0] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[0]) *
(( Abs( distScaleFactor * firstMv[0]) + 127) >> 8 ))
refineMvL0[1] = Clip3( -32768, 32767, Sign( distScaleFactor * firstMv[1]) *
(( Abs( distScaleFactor * firstMv[1]) + 127) >> 8 ))
refineMvL1[0] = firstMv[0]
refineMvL1[1] = firstMv[1]
In the above configuration, the scaling is performed only once at most, so the processing is simple. Further, when the distance between the L0 reference picture and the L1 reference picture is equal, the first vector firstMv is set to the L0 difference vector refineMvL0 and the L1 difference vector refineMvL1 (Process B
It's just that, and the process is simple.

(中心ベクトルと差分ベクトルの加算)
最終的に、MMVD予測部30376は、差分ベクトルrefineMv[](mvdLX[])と中心ベクトルmvLXN[](mvpLX[])とから以下のように、MMVDマージ候補の動きベクトルを導出する。
mvL0[ 0 ] = mvL0N[ 0 ] + refineMvL0[0]
mvL0[ 1 ] = mvL0N[ 1 ] + refineMvL0[1]
mvL1[ 0 ] = mvL1N[ 0 ] + refineMvL1[0]
mvL1[ 1 ] = mvL1N[ 1 ] + refineMvL1[1]
(まとめ)
このように、予測ベクトルが双予測であっても、MMVD予測部30376は、1方の動きベク
トルの情報(direction_idx、distance_idx)を1組だけ通知する。そして1組の情報か
ら2つの動きベクトルを導出する。MMVD予測部30376は、2つの参照ピクチャのそれぞれ
のPOCと対象ピクチャのPOCとの差から、必要に応じて動きベクトルのスケーリングを行う。POC距離(POCの差)が大きい方の参照ピクチャLXの参照画像と対象ピクチャ上の対象ブロックの差分ベクトルが通知される動きベクトル(firstMv)に対応する。
(Addition of center vector and difference vector)
Finally, the MMVD prediction unit 30376 derives the motion vector of the MMVD merge candidate from the difference vector refineMv[] (mvdLX[]) and the center vector mvLXN[] (mvpLX[]) as follows.
mvL0[ 0 ]= mvL0N[ 0 ]+ refineMvL0[0]
mvL0[ 1 ]= mvL0N[ 1 ]+ refineMvL0[1]
mvL1[ 0 ]= mvL1N[ 0 ]+ refineMvL1[0]
mvL1[ 1 ]= mvL1N[ 1 ]+ refineMvL1[1]
(Summary)
Thus, even if the prediction vector is bi-prediction, the MMVD prediction unit 30376 notifies only one set of information (direction_idx, distance_idx) of one motion vector. Then, two motion vectors are derived from one set of information. The MMVD prediction unit 30376 performs motion vector scaling as necessary based on the difference between the POC of each of the two reference pictures and the POC of the target picture. This corresponds to the motion vector (firstMv) notified of the difference vector between the reference image of the reference picture LX having the larger POC distance (POC difference) and the target block on the target picture.

firstMv[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
firstMv[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
MMVD予測部30376は、POC距離の小さい方の参照ピクチャLY (Y = 1 - X)の動きベクトルmvdLY(secondMv)を、ピクチャ間のPOC距離の比(POCS/POCL)でスケーリングすることで導
出する。
firstMv[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0]
firstMv[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1]
The MMVD prediction unit 30376 derives by scaling the motion vector mvdLY(secondMv) of the reference picture LY (Y = 1-X) with the smaller POC distance by the ratio of POC distances between pictures (POCS/POCL). ..

secondMv[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0] *POCS/POCL
secondMv[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1] *POCS/POCL
なお、POC距離の小さい方の参照ピクチャとは、対象ピクチャと参照ピクチャのPOC距離(POCの差)が小さい方に対応する。ここで、POCSは対象ピクチャに近い参照ピクチャと
のPOC差の差分値、POCLは対象ピクチャから遠い参照ピクチャとのPOC差の差分値である。あるいは動きベクトルmvdLYを下式で導出してもよい。
secondMv[0] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[0] *POCS/POCL
secondMv[1] = (DistFromBaseMV<<shiftMMVD) * mvdUnit[1] *POCS/POCL
The reference picture with the smaller POC distance corresponds to the one with the smaller POC distance (difference in POC) between the target picture and the reference picture. Here, POCS is the difference value of the POC difference with the reference picture close to the target picture, and POCL is the difference value of the POC difference with the reference picture far from the target picture. Alternatively, the motion vector mvdLY may be derived by the following formula.

mvdLY = MvScale(DistFromBaseMV,CurPic,PicLX,CurPic,PicLY)
ここで、CurPic,PicLX, PicLYは対象ピクチャ、対象ピクチャから遠いほうの参照ピクチ
ャ、対象ピクチャから近いほうの参照ピクチャを表す。
mvdLY = MvScale(DistFromBaseMV,CurPic,PicLX,CurPic,PicLY)
Here, CurPic, PicLX, and PicLY represent a target picture, a reference picture farther from the target picture, and a reference picture closer to the target picture.

以上のように、MMVD予測部30376はmvpLX[](mvLXN[])とmvdLX[](refineMv[])を導出し、これらを用いて対象ブロックの動きベクトルmvLX[]を導出する。 As described above, the MMVD prediction unit 30376 derives mvpLX[](mvLXN[]) and mvdLX[](refineMv[]), and uses them to derive the motion vector mvLX[] of the target block.

mvLX[0] = mvpLX[0]+mvdLX[0]
mvLX[1] = mvpLX[1]+mvdLX[1]
(動きベクトルの整数丸め)
MMVD予測部30376は、中心ベクトルに加算する差分ベクトルmvdLXの大きさが所定の閾値よりも大きい場合に、対象ブロックの動きベクトルmvLXが整数画素位置を示すように修正してもよい。例えば、MMVD予測部30376は、DistFromBaseMVが所定の閾値16以上の場合に
整数化をおこなってもよい。
mvLX[0] = mvpLX[0]+mvdLX[0]
mvLX[1] = mvpLX[1]+mvdLX[1]
(Rounding motion vector integer)
The MMVD prediction unit 30376 may correct the motion vector mvLX of the target block so as to indicate an integer pixel position when the difference vector mvdLX to be added to the center vector is larger than a predetermined threshold. For example, the MMVD prediction unit 30376 may perform integer conversion when DistFromBaseMV is equal to or greater than the predetermined threshold value 16.

また、MMVD予測部30376は、距離テーブルを選択するインデックスdistance_list_idxが特定の距離テーブル(例えばDistanceTable2)かつ距離テーブルの要素を選択する(距離の係数を選択する)インデックスdistance_idxが特定の範囲(例えば、distance_idxが2
や3)の場合に、整数化をおこなってもよい。例えば、MMVD予測部30376は、distance_list_idx == 1 かつ、distance_idx >= 2のとき、以下の式からmvLXを修正してもよい。
Further, the MMVD prediction unit 30376 determines that the index distance_list_idx for selecting the distance table is a specific distance table (for example, DistanceTable2) and the index distance_idx for selecting an element of the distance table (for selecting a coefficient of the distance) is within a specific range (for example, distance_idx). Is 2
In case 3) or 3), integer conversion may be performed. For example, the MMVD prediction unit 30376 may correct mvLX from the following formula when distance_list_idx == 1 and distance_idx >= 2.

mvLX[0] = (mvLX[0] / MVPREC) * MVPREC
mvLX[1] = (mvLX[1] / MVPREC) * MVPREC
またシフトを用いて導出しても良い。
mvLX[0] = (mvLX[0] / MVPREC) * MVPREC
mvLX[1] = (mvLX[1] / MVPREC) * MVPREC
Alternatively, it may be derived using shift.

mvLX[0] = (mvLX[0] >> MVBIT) << MVBIT
mvLX[1] = (mvLX[1] >> MVBIT) << MVBIT
ここでMVBIT = log2(MVPREC)。例えば4。また、正と負を考慮して以下で導出しても良い
mvLX[0] = (mvLX[0] >> MVBIT) << MVBIT
mvLX[1] = (mvLX[1] >> MVBIT) << MVBIT
Where MVBIT = log2(MVPREC). For example 4. Further, it may be derived below in consideration of positive and negative.

mvLX[0] = mvLX[0] >=0 ? (mvLX[0] >> MVBIT) << MVBIT : -((-mvLX[0] >> MVBIT) <<
MVBIT)
mvLX[1] = mvLX[1] >=0 ? (mvLX[1] >> MVBIT) << MVBIT : -((-mvLX[1] >> MVBIT) <<
MVBIT)
このように、動きベクトルを整数に丸めることにより、予測画像生成の演算量を削減することが可能となる。
(シンタックス)
次に、図16及び図17を参照して、MMVD予測部30376における予測モードの選択処理の流
れについて説明する。図16は、MMVD予測部30376における予測モードの選択処理の流れを
示すフローチャートである。図17は、本実施形態に係る予測モードの選択処理を示すシンタックスを示す図であり、図16に示す処理の一部に対応するシンタックステーブルである。
mvLX[0] = mvLX[0] >=0? (mvLX[0] >> MVBIT) << MVBIT :-((-mvLX[0] >> MVBIT) <<
MVBIT)
mvLX[1] = mvLX[1] >=0? (mvLX[1] >> MVBIT) << MVBIT :-((-mvLX[1] >> MVBIT) <<
MVBIT)
By rounding the motion vector to an integer in this way, it is possible to reduce the amount of calculation for predictive image generation.
(Syntax)
Next, with reference to FIGS. 16 and 17, a flow of a prediction mode selection process in the MMVD prediction unit 30376 will be described. FIG. 16 is a flowchart showing the flow of prediction mode selection processing in the MMVD prediction unit 30376. FIG. 17 is a diagram showing the syntax showing the prediction mode selection processing according to the present embodiment, and is a syntax table corresponding to part of the processing shown in FIG.

図16に示すように、本実施形態では、パラメータ復号部302は、まず、スキップフラグ
(図17におけるskip_flag)を復号する(S1301)。スキップフラグがスキップモードであることを示している場合(S1302でYES)、パラメータ復号部302はMMVDフラグ(図17にお
けるmmvd_flag)を復号する(S1303)。MMVDフラグがMMVDモードであることを示していない場合(S1304でNO)、予測モードはスキップモードである(S1305)。スキップモードでは、図17に示すように、パラメータ復号部302は、マージインデックス(図17におけるmerge_idx)を復号する。
As shown in FIG. 16, in the present embodiment, the parameter decoding unit 302 first decodes the skip flag (skip_flag in FIG. 17) (S1301). When the skip flag indicates the skip mode (YES in S1302), the parameter decoding unit 302 decodes the MMVD flag (mmvd_flag in FIG. 17) (S1303). When the MMVD flag does not indicate that it is the MMVD mode (NO in S1304), the prediction mode is the skip mode (S1305). In the skip mode, as shown in FIG. 17, the parameter decoding unit 302 decodes the merge index (merge_idx in FIG. 17).

MMVDフラグがMMVDモードであることを示している場合(S1304でYES)、予測モードはMMVDモードである(S1305)。MMVDモードでは、図17に示すように、パラメータ復号部302はbase_candidate_idx、distance_idx、及びdirection_idxを復号する。 When the MMVD flag indicates the MMVD mode (YES in S1304), the prediction mode is the MMVD mode (S1305). In the MMVD mode, as illustrated in FIG. 17, the parameter decoding unit 302 decodes base_candidate_idx, distance_idx, and direction_idx.

スキップフラグがスキップモードであることを示していない場合(S1302でNO)、パラ
メータ復号部302は、マージフラグ(図17におけるmerge_flag)を復号する(S1307)。マージフラグがマージモードであることを示している場合(S1308でYES)、パラメータ復号部302は、MMVDフラグ(図17におけるmmvd_flag)を復号する(S1309)。MMVDフラグがMMVDモードであることを示していない場合(S1310でNO)、予測モードはマージモードである(S1311)。マージモードでは、図17に示すように、パラメータ復号部302は、マージインデックス(図17におけるmerge_idx)を復号する。
When the skip flag does not indicate that the mode is the skip mode (NO in S1302), the parameter decoding unit 302 decodes the merge flag (merge_flag in FIG. 17) (S1307). When the merge flag indicates the merge mode (YES in S1308), the parameter decoding unit 302 decodes the MMVD flag (mmvd_flag in FIG. 17) (S1309). When the MMVD flag does not indicate that it is the MMVD mode (NO in S1310), the prediction mode is the merge mode (S1311). In the merge mode, as shown in FIG. 17, the parameter decoding unit 302 decodes the merge index (merge_idx in FIG. 17).

MMVDフラグがMMVDモードであることを示している場合(S1310でYES)、予測モードはMMVDモードである(S1312)。MMVDモードでは、図17に示すように、パラメータ復号部302はbase_candidate_idx、distance_idx、及びdirection_idxを復号する。 When the MMVD flag indicates the MMVD mode (YES in S1310), the prediction mode is the MMVD mode (S1312). In the MMVD mode, as illustrated in FIG. 17, the parameter decoding unit 302 decodes base_candidate_idx, distance_idx, and direction_idx.

マージフラグがマージモードであることを示していない場合(S1308でNO)、予測モー
ドはAMVPモードである(S1313)。
When the merge flag does not indicate the merge mode (NO in S1308), the prediction mode is the AMVP mode (S1313).

スキップモード、マージモードにおいては、パラメータ復号部302は、merge_idxを復号する。 In the skip mode and the merge mode, the parameter decoding unit 302 decodes merge_idx.

MMVDモードにおいては、パラメータ復号部302は、base_candidate_idx、distance_idx
およびdirection_idxを復号する。MMVD予測部30376はこれらのパラメータを用いて、mvpLX、mvdLXを導出する。そしてmvLXを導出する。
In the MMVD mode, the parameter decoding unit 302 uses base_candidate_idx, distance_idx
And decrypt direction_idx. The MMVD prediction unit 30376 uses these parameters to derive mvpLX and mvdLX. Then derive mvLX.

次に、図18及び図19を参照して、本発明の別の実施の形態のMMVD予測部30376における
予測モードの選択処理の流れについて説明する。図18は、MMVD予測部30376における予測
モードの選択処理の流れを示すフローチャートである。図19は、本実施形態に係る予測モードの選択処理を示すシンタックスを示す図であり、図18に示す処理の一部に対応するシンタックステーブルである。
Next, with reference to FIG. 18 and FIG. 19, a flow of prediction mode selection processing in the MMVD prediction unit 30376 according to another embodiment of the present invention will be described. FIG. 18 is a flowchart showing the flow of prediction mode selection processing in the MMVD prediction unit 30376. FIG. 19 is a diagram showing the syntax showing the prediction mode selection processing according to the present embodiment, and is a syntax table corresponding to part of the processing shown in FIG.

図16のフローチャート及び図17のシンタックスでは、スキップモードおよびマージモードにおいて、MMVDフラグを復号する処理が存在する。高い圧縮率で、符号化、復号を行いたい場合、相対的にスキップモードやマージモードが多く選択されるが、その場合、MMVDフラグの存在がオーバヘッドとなる。図18のフローチャート及び図19のシンタックスでは、MMVD予測部30376は、スキップモードおよびマージモードのいずれも選択されなかった場合にMMVDモードを選択する。 In the flowchart of FIG. 16 and the syntax of FIG. 17, there is a process of decoding the MMVD flag in the skip mode and the merge mode. When it is desired to perform encoding and decoding at a high compression rate, a relatively large number of skip modes and merge modes are selected, in which case the presence of the MMVD flag becomes an overhead. In the flowchart of FIG. 18 and the syntax of FIG. 19, the MMVD prediction unit 30376 selects the MMVD mode when neither the skip mode nor the merge mode has been selected.

図18に示すように、本実施形態では、パラメータ復号部302は、まず、スキップフラグ
(図19におけるskip_flag)を復号する(S1401)。スキップフラグがスキップモードであることを示している場合(S1402でYES)、予測モードはスキップモードである(S1403)
。スキップモードでは、図19に示すように、パラメータ復号部302は、マージインデック
ス(図19におけるmerge_idx)を復号する。
As shown in FIG. 18, in the present embodiment, the parameter decoding unit 302 first decodes the skip flag (skip_flag in FIG. 19) (S1401). If the skip flag indicates the skip mode (YES in S1402), the prediction mode is the skip mode (S1403).
.. In the skip mode, as shown in FIG. 19, the parameter decoding unit 302 decodes the merge index (merge_idx in FIG. 19).

スキップフラグがスキップモードであることを示していない場合(S1402でNO)、パラ
メータ復号部302は、マージフラグ(図19におけるmerge_flag)を復号する(S1404)。マージフラグがマージモードであることを示している場合(S1405でYES)、予測モードはマージモードである(S1406)。マージモードでは、図19に示すように、パラメータ復号部302は、マージインデックス(図19におけるmerge_idx)を復号する。
When the skip flag does not indicate that the mode is the skip mode (NO in S1402), the parameter decoding unit 302 decodes the merge flag (merge_flag in FIG. 19) (S1404). When the merge flag indicates the merge mode (YES in S1405), the prediction mode is the merge mode (S1406). In the merge mode, as shown in FIG. 19, the parameter decoding unit 302 decodes the merge index (merge_idx in FIG. 19).

マージフラグがマージモードであることを示していない場合(S1405でNO)、パラメー
タ復号部302は、MMVDフラグ(図19におけるmmvd_flag)を復号する(S1407)。MMVDフラ
グがMMVDモードであることを示していない場合(S1408でNO)、予測モードはAMVPモード
である(S1409)。MMVDフラグがMMVDモードであることを示している場合(S1408でYES)
、予測モードはMMVDモードである(S1410)。MMVDモードでは、図19に示すように、パラ
メータ復号部302はbase_candidate_idx、distance_idx、及びdirection_idxを復号する。パラメータ符号化部111は、同様の動作でシンタックス要素を符号化する。
If the merge flag does not indicate the merge mode (NO in S1405), the parameter decoding unit 302 decodes the MMVD flag (mmvd_flag in FIG. 19) (S1407). When the MMVD flag does not indicate that it is the MMVD mode (NO in S1408), the prediction mode is the AMVP mode (S1409). When the MMVD flag indicates the MMVD mode (YES in S1408)
The prediction mode is the MMVD mode (S1410). In the MMVD mode, as shown in FIG. 19, the parameter decoding unit 302 decodes base_candidate_idx, distance_idx, and direction_idx. The parameter encoding unit 111 encodes the syntax element by the same operation.

尚、マージモードとスキップモードとの違いは、復号画像生成において、予測残差を用いるか否かであるため、パラメータ復号部302は、図18及び図19の処理の後に、スキップ
モードおよびマージモードでは、量子化予測誤差が含まれているか否かを示すフラグをシンタックス要素として復号する必要はない。一方、AMVPAMVPモードである場合は、パラメータ復号部302は、量子化予測誤差が含まれているかか否かを示すフラグをシンタックス要素として復号する必要がある。すなわち、TU復号部3024は、skip_mode==0かつmerge_flag==0の場合に、対象ブロックに量子化予測誤差が含まれているか否かを示すフラグcu_cbfcbfを符号化データから復号し、それ以外の場合、つまり、スキップモードskip_mode==1、もしくは、マージモードmerge_flagflag==1の場合にcu_cbfcbfの復号を省略する。cu_cbfcbfが1の場合に量子化予測誤差を復号する。cu_cbfcbfが符号化データに存在しない場合はスキップモードでは0、マージモードでは1と設定する。
Note that the difference between the merge mode and the skip mode is whether or not the prediction residual is used in the decoded image generation. Therefore, the parameter decoding unit 302 performs the skip mode and the merge mode after the processes of FIGS. 18 and 19. Then, it is not necessary to decode the flag indicating whether or not the quantization prediction error is included as a syntax element. On the other hand, in the AMVPAMVP mode, the parameter decoding unit 302 needs to decode a flag indicating whether or not a quantized prediction error is included as a syntax element. That is, the TU decoding unit 3024, when skip_mode==0 and merge_flag==0, decodes the flag cu_cbfcbf indicating whether or not the target block includes a quantized prediction error from the encoded data, and other than that. In the case, that is, when the skip mode skip_mode==1 or the merge mode merge_flagflag==1, the decoding of cu_cbfcbf is omitted. Decodes the quantized prediction error when cu_cbfcbf is 1. If cu_cbfcbf does not exist in the encoded data, set 0 in skip mode and 1 in merge mode.

このような構成をとることで、高い圧縮率で符号化された時に、多数のスキップフラグが予測残差の存在しないスキップモードを示す場合には、MMVDフラグを復号する必要がないために、符号化効率が低下しない。 By adopting such a configuration, when a large number of skip flags indicate a skip mode in which a prediction residual does not exist when encoded at a high compression rate, it is not necessary to decode the MMVD flag. Efficiency does not decrease.

次に、図20及び図21を参照して、本発明の実施の形態のMMVD予測部30376における予測
モードの選択処理の流れについて説明する。図20は、MMVD予測部30376における予測モー
ドの選択処理の流れを示すフローチャートである。図21は、本実施形態に係る予測モードの選択処理を示すシンタックスを示す図であり、図20に示す処理の一部に対応するシンタックステーブルである。
Next, with reference to FIG. 20 and FIG. 21, a flow of prediction mode selection processing in the MMVD prediction unit 30376 according to the embodiment of the present invention will be described. FIG. 20 is a flowchart showing the flow of prediction mode selection processing in the MMVD prediction unit 30376. FIG. 21 is a diagram showing the syntax showing the prediction mode selection processing according to the present embodiment, and is a syntax table corresponding to part of the processing shown in FIG.

図20のフローチャート及び図21のシンタックスでは、スキップモードでは、MMVD予測を行わず、マージモードの時のみにMMVD予測を選択可能とする。 In the flowchart of FIG. 20 and the syntax of FIG. 21, MMVD prediction is not performed in the skip mode, and MMVD prediction can be selected only in the merge mode.

図20に示すように、本実施形態では、パラメータ復号部302(予測パラメータ復号部)
は、まず、スキップフラグ(図21におけるskip_flag)を復号する(S1501)。スキップフラグがスキップモードであることを示している場合(S1502でYES)、予測モードはスキップモードである(S1503)。スキップモードでは、図20に示すように、パラメータ復号部302は、マージインデックス(図21におけるmerge_idx)を復号する。
As shown in FIG. 20, in the present embodiment, the parameter decoding unit 302 (prediction parameter decoding unit)
First decodes the skip flag (skip_flag in FIG. 21) (S1501). When the skip flag indicates the skip mode (YES in S1502), the prediction mode is the skip mode (S1503). In the skip mode, as illustrated in FIG. 20, the parameter decoding unit 302 decodes the merge index (merge_idx in FIG. 21).

スキップフラグがスキップモードであることを示していない場合(S1502でNO)、パラ
メータ復号部302は、マージフラグ(図21におけるmerge_flag)を復号する(S1504)。マージフラグがマージモードであることを示している場合(S1505でYES)、パラメータ復号部302は、MMVDフラグ(図21におけるmmvd_flag)を復号する(S1506)。MMVDフラグがMMVDモードであることを示していない場合(S1507でNO)、予測モードはマージモードである(S1508)。マージモードでは、図21に示すように、パラメータ復号部302は、マージインデックス(図21におけるmerge_idx)を復号する。MMVDフラグがMMVDモードであることを示している場合(S1507でYES)、予測モードはMMVDモードである(S1509)。MMVDモードでは、図21に示すように、パラメータ復号部302はbase_candidate_idx、distance_idx、及びdirection_idxを復号する。
If the skip flag does not indicate the skip mode (NO in S1502), the parameter decoding unit 302 decodes the merge flag (merge_flag in FIG. 21) (S1504). When the merge flag indicates the merge mode (YES in S1505), the parameter decoding unit 302 decodes the MMVD flag (mmvd_flag in FIG. 21) (S1506). When the MMVD flag does not indicate the MMVD mode (NO in S1507), the prediction mode is the merge mode (S1508). In the merge mode, as illustrated in FIG. 21, the parameter decoding unit 302 decodes the merge index (merge_idx in FIG. 21). When the MMVD flag indicates the MMVD mode (YES in S1507), the prediction mode is the MMVD mode (S1509). In the MMVD mode, as shown in FIG. 21, the parameter decoding unit 302 decodes base_candidate_idx, distance_idx, and direction_idx.

マージフラグがマージモードであることを示していない場合(S1505でNO)、予測モー
ドはAMVPモードである(S1510)。パラメータ符号化部111は、同様の動作でシンタックス要素を符号化する。
When the merge flag does not indicate the merge mode (NO in S1505), the prediction mode is the AMVP mode (S1510). The parameter encoding unit 111 encodes the syntax element by the same operation.

尚、マージモードかつMMVDモードでない場合(S1508, merge_flag == 1 && mmvd_flag ==0)は、スキップモード(S1503, skip_flag == 1)との違いは、量子化予測誤差が含まれているか否かであるため、パラメータ復号部302は、図20及び図21の処理の後に、量子化予測誤差が含まれているか否かを示すフラグcu_cbfcbfをシンタックス要素として復号する必要はない。すなわち、TU復号部3024は、skip_mode==0かつ(merge_flag==0、または、mergemerge_flag==1かつMMVDモード(mmvd_flag==11)の場合(AMVPモード、MMVDモード)に、対象ブロックに量子化予測誤差が含まれているか否かを示すフラグcu_cbfcbfを符号化データから復号し、それ以外の場合、つまり、スキップモードskip_mode==1、もしくは、マージモードmerge_flag==1の場合(スキップモード、マージモード)にcu_cbfcbfの復号を省略する。cu_cbfcbfが1の場合に量子化予測誤差を復号する。cu_cbpが符号化データに存在しない場合はスキップモードでは0、マージモードでは1と設定する。 If the merge mode is not the MMVD mode (S1508, merge_flag == 1 && mmvd_flag ==0), the difference from the skip mode (S1503, skip_flag == 1) is whether or not the quantization prediction error is included. Therefore, the parameter decoding unit 302 does not need to decode the flag cu_cbfcbf indicating whether or not the quantized prediction error is included as a syntax element after the processes of FIGS. 20 and 21. That is, the TU decoding unit 3024 quantizes the target block when skip_mode==0 and (merge_flag==0, or mergemerge_flag==1 and MMVD mode (mmvd_flag==11) (AMVP mode, MMVD mode). Decode flag cu_cbfcbf indicating whether or not a prediction error is included from encoded data, and in other cases, that is, skip mode skip_mode==1 or merge mode merge_flag==1 (skip mode, merge Mode) omit decoding of cu_cbfcbf Decode quantized prediction error when cu_cbfcbf is 1. Set 0 in skip mode if cu_cbp does not exist in the encoded data, and 1 in merge mode.

このような構成をとることで、高い圧縮率で符号化された時に、多数のスキップフラグが予測残差の存在しないスキップモードを示す場合にMMVDフラグを復号する必要がないために、符号化効率が低下しない。 By adopting such a configuration, it is not necessary to decode the MMVD flag when a large number of skip flags indicate a skip mode in which the prediction residual does not exist when encoded at a high compression rate, and thus the coding efficiency is improved. Does not decrease.

ループフィルタ305は、符号化ループ内に設けたフィルタで、ブロック歪やリンギング
歪を除去し、画質を改善するフィルタである。ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適
応ループフィルタ(ALF)等のフィルタを施す。
The loop filter 305 is a filter provided in the coding loop and removes block distortion and ringing distortion to improve image quality. The loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the addition unit 312.

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

予測パラメータメモリ307は、復号対象のCTUあるいはCU毎に予め定めた位置に予測パラメータを記憶する。具体的には、予測パラメータメモリ307は、パラメータ復号部302が復号したパラメータ及びエントロピー復号部301が復号した予測モードpredMode等を記憶す
る。
The prediction parameter memory 307 stores the prediction parameter in a predetermined position for each CTU or CU to be decoded. Specifically, the prediction parameter memory 307 stores the parameters decoded by the parameter decoding unit 302, the prediction mode predMode decoded by the entropy decoding unit 301, and the like.

予測画像生成部308には、予測モードpredMode、予測パラメータ等が入力される。また
、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、予測パラメータと読み出した参
照ピクチャ(参照ピクチャブロック)を用いてブロックもしくはサブブロックの予測画像を生成する。ここで、参照ピクチャブロックとは、参照ピクチャ上の画素の集合(通常矩形であるのでブロックと呼ぶ)であり、予測画像を生成するために参照する領域である。
A prediction mode predMode, a prediction parameter, and the like are input to the prediction image generation unit 308. The predicted image generation unit 308 also reads the reference picture from the reference picture memory 306. The predicted image generation unit 308 generates a predicted image of a block or sub-block using the prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode. Here, the reference picture block is a set of pixels on the reference picture (which is usually called a block because it is a rectangle), and is an area referred to in order to generate a prediction image.

(インター予測画像生成部309)
予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は
、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出し
た参照ピクチャを用いてインター予測によりブロックもしくはサブブロックの予測画像を生成する。
(Inter prediction image generation unit 309)
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 perform the prediction image of the block or sub-block by the inter prediction. To generate.

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

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

動き補償部3091は、まず、予測ブロック内座標(x,y)に対応する整数位置(xInt,yInt)および位相(xFrac,yFrac)を以下の式で導出する。 The motion compensation unit 3091 first derives the integer position (xInt, yInt) and the phase (xFrac, yFrac) corresponding to the coordinate (x, y) in the prediction block by the following formula.

xInt = xPb+(mvLX[0]>>(log2(MVPREC)))+x
xFrac = mvLX[0]&(MVPREC-1)
yInt = yPb+(mvLX[1]>>(log2(MVPREC)))+y
yFrac = mvLX[1]&(MVPREC-1)
ここで、(xPb,yPb)は、bW*bHサイズのブロックの左上座標、x=0…bW-1、y=0…bH-1であり、MVPRECは、動きベクトルmvLXの精度(1/MVPREC画素精度)を示す。例えばMVPREC=16。
xInt = xPb+(mvLX[0]>>(log2(MVPREC)))+x
xFrac = mvLX[0]&(MVPREC-1)
yInt = yPb+(mvLX[1]>>(log2(MVPREC)))+y
yFrac = mvLX[1]&(MVPREC-1)
Here, (xPb,yPb) is the upper left coordinate of the block of bW*bH size, x=0...bW-1, y=0...bH-1, and MVPREC is the precision of motion vector mvLX (1/MVPREC Pixel accuracy). For example MVPREC=16.

動き補償部3091は、参照ピクチャrefImgに補間フィルタを用いて水平補間処理を行うことで、一時的画像temp[][]を導出する。以下のΣはk=0..NTAP-1のkに関する和、shift1は値のレンジを調整する正規化パラメータ、offset1=1<<(shift1-1)である。 The motion compensation unit 3091 derives a temporary image temp[][] by performing horizontal interpolation processing on the reference picture refImg using an interpolation filter. Σ below is the sum of k=0..N for k in NTAP-1, shift1 is a normalization parameter for adjusting the range of values, and offset1=1<<(shift1-1).

temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP/2+1][yInt]+offset1)>>shift1
続いて、動き補償部3091は、一時的画像temp[][]を垂直補間処理により、補間画像Pred[][]を導出する。以下のΣはk=0..NTAP-1のkに関する和、shift2は値のレンジを調整する正規化パラメータ、offset2=1<<(shift2-1)である。
temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP/2+1][yInt]+offset1)>>shift1
Subsequently, the motion compensation unit 3091 derives an interpolated image Pred[][] by performing vertical interpolation processing on the temporary image temp[][]. Σ below is the sum of k=0..N for k in NTAP-1, shift2 is a normalization parameter for adjusting the range of values, and offset2=1<<(shift2-1).

Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2)>>shift2
(合成部)
合成部3095は、動き補償部3091から供給される補間画像、インター予測パラメータ復号部303から供給されるインター予測パラメータ、及び、イントラ予測画像生成部310から供給されるイントラ画像を参照して、予測画像を生成し、生成した予測画像を加算部312に
供給する。
Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2)>>shift2
(Synthesis section)
The combining unit 3095 refers to the interpolated image supplied from the motion compensation unit 3091, the inter prediction parameter supplied from the inter prediction parameter decoding unit 303, and the intra image supplied from the intra prediction image generation unit 310 to perform prediction. An image is generated, and the generated predicted image is supplied to the addition unit 312.

合成部3095は、Combined intra/inter合成部30951、Triangle合成部30952、OBMC部30953、BIO部30954を備えている。 The combining unit 3095 includes a combined intra/inter combining unit 30951, a Triangle combining unit 30952, an OBMC unit 30953, and a BIO unit 30954.

(Combined intra/inter合成処理)
Combined intra/inter合成部30951は、AMVPにおける単方向予測、スキップモード、マ
ージモード、及びイントラ予測を複合的に用いることによって予測画像を生成する。
(Combined intra/inter synthesis processing)
The combined intra/inter combining unit 30951 generates a predicted image by using unidirectional prediction in AMVP, skip mode, merge mode, and intra prediction in a composite manner.

(Triangle合成処理)
Triangle合成部30952は、上述したTriangle予測を用いた予測画像を生成する。
(Triangle composition process)
The Triangle combining unit 30952 generates a prediction image using the above-mentioned Triangle prediction.

(OBMC処理)
OBMC部30953は、OBMC(Overlapped block motion compensation)処理を用いて予測画
像を生成する。OBMC処理には以下の処理が含まれる。
・対象サブブロックに付加されたインター予測パラメータを用いて生成される補間画像(PU補間画像)と、対象サブブロックの隣接サブブロックの動きパラメータを用いて生成される補間画像(OBMC補間画像)とを用いて、対象サブブロックの補間画像(動き補償画像)を生成する。
・OBMC補間画像とPU補間画像とを加重平均することにより、予測画像を生成する。
(OBMC processing)
The OBMC unit 30953 generates a predicted image using OBMC (Overlapped block motion compensation) processing. The OBMC processing includes the following processing.
Interpolation image (PU interpolation image) generated using the inter prediction parameter added to the target sub-block, and interpolation image (OBMC interpolation image) generated using the motion parameter of the adjacent sub-block of the target sub-block Is used to generate an interpolation image (motion compensation image) of the target sub-block.
A predicted image is generated by weighted averaging the OBMC interpolation image and the PU interpolation image.

(BIO処理)
BIO部30954は、BIO(Bi-directional optical flow;双予測勾配変化)処理を行うことによって、予測画像を生成する。BIO処理では、動き補償画像PredL0及びPredL1と、勾配
補正項とを参照して予測画像を生成する。BIO部30954は、後述する重み予測を行うことによって予測画像を生成する構成としてもよい。
(BIO processing)
The BIO unit 30954 generates a predicted image by performing BIO (Bi-directional optical flow) change processing. In the BIO process, a prediction image is generated by referring to the motion compensation images PredL0 and PredL1 and the gradient correction term. The BIO unit 30954 may be configured to generate a predicted image by performing weight prediction described below.

(重み予測)
重み予測では、動き補償画像PredLXに重み係数を乗算することによりブロックの予測画像を生成する。予測リスト利用フラグの一方(predFlagL0もしくはpredFlagL1)が1(単予測)、かつ、重み予測を用いない場合、動き補償画像PredLX(LXはL0もしくはL1)を画素ビット数bitDepthに合わせる以下の式の処理を行う。
(Weight prediction)
In the weight prediction, the motion compensation image PredLX is multiplied by a weight coefficient to generate a prediction image of a block. When one of the prediction list use flags (predFlagL0 or predFlagL1) is 1 (single prediction) and weight prediction is not used, the motion compensation image PredLX (LX is L0 or L1) is adjusted to the pixel bit number bitDepth. I do.

Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)>>shift1)
ここで、shift1=14-bitDepth、offset1=1<<(shift1-1)である。
また、参照リスト利用フラグの両者(predFlagL0とpredFlagL1)が1(双予測BiPred)、かつ、重み予測を用いない場合、動き補償画像PredL0、PredL1を平均し画素ビット数に合わせる以下の式の処理を行う。
Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)>>shift1)
Here, shift1=14-bitDepth and offset1=1<<(shift1-1).
When both of the reference list use flags (predFlagL0 and predFlagL1) are 1 (bi-prediction BiPred) and weight prediction is not used, the motion compensation images PredL0 and PredL1 are averaged and the processing of the following formula is performed to match the pixel bit number. To do.

Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]+PredL1[x][y]+offset2)>>shift2)
ここで、shift2=15-bitDepth、offset2=1<<(shift2-1)である。
Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]+PredL1[x][y]+offset2)>>shift2)
Here, shift2=15-bitDepth and offset2=1<<(shift2-1).

さらに、単予測、かつ、重み予測を行う場合、重み予測部3094は重み予測係数w0とオフセットo0を符号化データから導出し、以下の式の処理を行う。 Furthermore, when performing uni-prediction and 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 formula.

Pred[x][y] = Clip3(0,(1<<bitDepth)-1,((PredLX[x][y]*w0+2^(log2WD-1))>>log2WD)+o0)
ここで、log2WDは所定のシフト量を示す変数である。
Pred[x][y] = Clip3(0,(1<<bitDepth)-1,((PredLX[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, when performing bi-prediction BiPred and weight prediction, the weight prediction unit 3094 derives the weight prediction coefficients w0, w1, o0, o1 from the encoded data and performs the processing of the following formula.

Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]*w0+PredL1[x][y]*w1+((o0+o1+1)<<log2WD))>>(log2WD+1))
そして、生成したブロックの予測画像を加算部312に出力する。
Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]*w0+PredL1[x][y]*w1+((o0+o1+1)<<log2WD))>>(log2WD+1))
Then, the predicted image of the generated block is output to the addition unit 312.

逆量子化・逆変換部311は、エントロピー復号部301から入力された量子化変換係数を逆量子化して変換係数を求める。この量子化変換係数は、符号化処理において、予測誤差に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)等の周波数変換を行い量子化して得られる係数である。逆量子化・逆変換部311は、求めた変換係数について逆DCT、逆DST等の逆周波数変換を行い、予測誤差を算出する。逆量子化・逆変換部311は予測誤差を加算部312に出力する。逆量子化・逆変換部311は、skip_flagが1の場合もしくはcu_cbpが0の場合に対象ブロックの予測誤差を全て0と設定する。 The inverse quantization/inverse transform unit 311 dequantizes the quantized transform coefficient input from the entropy decoding unit 301 to obtain a transform coefficient. This quantized transform coefficient is a coefficient that is obtained by performing frequency transformation such as DCT (Discrete Cosine Transform, Discrete Cosine Transform) and DST (Discrete Sine Transform, Discrete Sine Transform) on the prediction error in the coding process and quantized Is. The inverse quantization/inverse transform unit 311 performs inverse frequency transform such as inverse DCT and inverse DST on the obtained transform coefficient to calculate a prediction error. The inverse quantization/inverse transformation unit 311 outputs the prediction error to the addition unit 312. The inverse quantization/inverse transform unit 311 sets all prediction errors of the target block to 0 when skip_flag is 1 or when cu_cbp is 0.

加算部312は、予測画像生成部308から入力されたブロックの予測画像と逆量子化・逆変換部311から入力された予測誤差を画素毎に加算して、ブロックの復号画像を生成する。
加算部312はブロックの復号画像を参照ピクチャメモリ306に記憶し、また、ループフィルタ305に出力する。
The addition unit 312 adds the prediction image of the block input from the prediction image generation unit 308 and the prediction error input from the inverse quantization/inverse conversion unit 311 for each pixel to generate a decoded image of the block.
The addition unit 312 stores the decoded image of the block in the reference picture memory 306 and also outputs it to the loop filter 305.

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

予測画像生成部101は画像Tの各ピクチャを分割した領域であるCU毎に予測画像を生成
する。予測画像生成部101は既に説明した予測画像生成部308と同じ動作であり、説明を省略する。
The predicted image generation unit 101 generates a predicted image for each CU that is an area obtained by dividing each picture of the image T. The predicted image generation unit 101 has the same operation as the predicted image generation unit 308 described above, and thus the description thereof will be omitted.

減算部102は、予測画像生成部101から入力されたブロックの予測画像の画素値を、画像Tの画素値から減算して予測誤差を生成する。減算部102は予測誤差を変換・量子化部103に出力する。 The subtraction unit 102 subtracts the pixel value of the predicted image of the block input from the predicted image generation unit 101 from the pixel value of the image T to generate a prediction error. The subtraction unit 102 outputs the prediction error to the conversion/quantization unit 103.

変換・量子化部103は、減算部102から入力された予測誤差に対し、周波数変換によって変換係数を算出し、量子化によって量子化変換係数を導出する。変換・量子化部103は、
量子化変換係数をエントロピー符号化部104及び逆量子化・逆変換部105に出力する。
The transform/quantization unit 103 calculates a transform coefficient by frequency transform for the prediction error input from the subtraction unit 102, and derives a quantized transform coefficient by quantization. The conversion/quantization unit 103
The quantized transform coefficient is output to the entropy coding unit 104 and the inverse quantization/inverse transform unit 105.

逆量子化・逆変換部105は、動画像復号装置31における逆量子化・逆変換部311(図7)
と同じであり、説明を省略する。算出した予測誤差は加算部106に出力される。
The inverse quantization/inverse transformation unit 105 is the inverse quantization/inverse transformation unit 311 (FIG. 7) in the video decoding device 31.
The description is omitted here. The calculated prediction error is output to the addition unit 106.

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

エントロピー符号化部104は、分割情報、予測パラメータ、量子化変換係数等をエント
ロピー符号化して符号化ストリームTeを生成し、出力する。
The entropy coding unit 104 entropy-codes the division information, the prediction parameter, the quantized transform coefficient, and the like to generate and output a coded stream Te.

パラメータ符号化部111は、図示しないヘッダ符号化部1110、CT情報符号化部1111、CU
符号化部1112(予測モード符号化部)、およびパラメータ符号化部112を備えている。CU
符号化部1112はさらにTU符号化部1114を備えている。
The parameter coding unit 111 includes a header coding unit 1110, a CT information coding unit 1111, and a CU (not shown).
An encoding unit 1112 (prediction mode encoding unit) and a parameter encoding unit 112 are provided. CU
The coding unit 1112 further includes a TU coding unit 1114.

以下、各モジュールの概略動作を説明する。パラメータ符号化部111はヘッダ情報、分
割情報、予測情報、量子化変換係数等のパラメータの符号化処理を行う。
The schematic operation of each module will be described below. The parameter coding unit 111 performs coding processing of parameters such as header information, division information, prediction information, and quantized transform coefficients.

CT情報符号化部1111は、符号化データからQT、MT(BT、TT)分割情報等を符号化する。 The CT information encoding unit 1111 encodes QT, MT (BT, TT) division information and the like from the encoded data.

CU符号化部1112はCU情報、予測情報、TU分割フラグsplit_transform_flag、CU残差フラグcbf_cb、cbf_cr、cbf_luma等を符号化する。 The CU encoding unit 1112 encodes CU information, prediction information, TU division flag split_transform_flag, CU residual flags cbf_cb, cbf_cr, cbf_luma, and the like.

TU符号化部1114は、TUに予測誤差が含まれている場合に、QP更新情報(量子化補正値)と量子化予測誤差(residual_coding)を符号化する。 The TU encoding unit 1114 encodes the QP update information (quantization correction value) and the quantization prediction error (residual_coding) when the TU includes a prediction error.

CT情報符号化部1111、CU符号化部1112は、インター予測パラメータ(予測モードpredMode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx
、差分ベクトルmvdLX)、イントラ予測パラメータ(prev_intra_luma_pred_flag、mpm_idx、rem_selected_mode_flag、rem_selected_mode、rem_non_selected_mode、)、量子化変換係数等のシンタックス要素をエントロピー符号化部104に供給する。
The CT information coding unit 1111, the CU coding unit 1112, inter prediction parameters (prediction mode predMode, 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), intra prediction parameters (prev_intra_luma_pred_flag, mpm_idx, rem_selected_mode_flag, rem_selected_mode, rem_non_selected_mode), and syntax elements such as quantized transform coefficients are supplied to the entropy coding unit 104.

(パラメータ符号化部の構成)
パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、インター予測パラメータを導出する。パラメータ符号化部112は、インター
予測パラメータ復号部303がインター予測パラメータを導出する構成と一部同一の構成を
含む。
(Configuration of parameter coding unit)
The parameter coding unit 112 derives an inter prediction parameter based on the prediction parameter input from the coding parameter determination unit 110. The parameter encoding unit 112 includes the same configuration as the configuration in which the inter prediction parameter decoding unit 303 derives the inter prediction parameter.

図13は、パラメータ符号化部112の構成を示す概略図である。パラメータ符号化部112の構成について説明する。図13に示すように、パラメータ符号化部112は、パラメータ符号
化制御部1121、マージ予測部30374、サブブロック予測部(アフィン予測部)30372、DMVR部30375、MMVD予測部30376、Triangle予測部30377、AMVP予測パラメータ導出部3032、減
算部1123を含んで構成される。マージ予測部30374は、マージ予測パラメータ導出部3036
を備えている。パラメータ符号化制御部1121は、マージインデックス導出部11211とベク
トル候補インデックス導出部11212を含む。また、パラメータ符号化制御部1121は、マー
ジインデックス導出部11211でmerge_idx、affine_flag、base_candidate_idx、distance_idx、direction_idx等を導出し、ベクトル候補インデックス導出部11212でmvpLX等を導出する。マージ予測パラメータ導出部3036、AMVP予測パラメータ導出部3032、アフィン予測部30372、MMVD予測部30376、Triangle予測部30377を総称して動きベクトル導出部(動きベクトル導出装置)と称してもよい。パラメータ符号化部112は、動きベクトルmvLX、参照ピクチャインデックスrefIdxLX、インター予測識別子inter_pred_idc、あるいはこれらを示す情報を予測画像生成部101に出力する。またパラメータ符号化部112は、merge_flag、skip_flag、merge_idx、inter_pred_idc、refIdxLX、mvp_lX_idx、mvdLX、amvr_mode、affine_flagをエントロピー符号化部104に出力する。
FIG. 13 is a schematic diagram showing the configuration of the parameter coding unit 112. The configuration of the parameter coding unit 112 will be described. As shown in FIG. 13, the parameter coding unit 112 includes a parameter coding control unit 1121, a merge prediction unit 30374, a sub-block prediction unit (affine prediction unit) 30372, a DMVR unit 30375, an MMVD prediction unit 30376, and a Triangle prediction unit 30377. , AMVP prediction parameter derivation unit 3032, and subtraction unit 1123. The merge prediction unit 30374 includes a merge prediction parameter derivation unit 3036.
Equipped with. The parameter coding control unit 1121 includes a merge index derivation unit 11211 and a vector candidate index derivation unit 11212. Also, in the parameter coding control unit 1121, the merge index derivation unit 11211 derives merge_idx, affine_flag, base_candidate_idx, distance_idx, direction_idx, etc., and the vector candidate index derivation unit 11212 derives mvpLX, etc. The merge prediction parameter derivation unit 3036, AMVP prediction parameter derivation unit 3032, affine prediction unit 30372, MMVD prediction unit 30376, and Triangle prediction unit 30377 may be collectively referred to as a motion vector derivation unit (motion vector derivation device). The parameter coding unit 112 outputs the motion vector mvLX, the reference picture index refIdxLX, the inter prediction identifier inter_pred_idc, or information indicating these to the predicted image generation unit 101. Further, the parameter coding unit 112 outputs merge_flag, skip_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_lX_idx, mvdLX, amvr_mode, and affine_flag to the entropy coding unit 104.

パラメータ符号化制御部1121は差分ベクトルを表すパラメータ(base_candidate_idx、distance_idx、direction_idx等)を導出し、MMVD予測部30376に出力する。図15を参照してパラメータ符号化制御部1121におけるの差分ベクトル導出を説明する。図の中央の黒丸が予測ベクトルmvpLXの指す位置であり、この位置を中心にして、4(上、下、左、右)
方向に各々8つの探索距離を探索する。mvpLXはマージ候補リストの先頭と2番目の候補
の動きベクトルであり、各々に対し探索を実施する。マージ候補リストの予測ベクトルが2つ(リストの1番目と2番目)あり、探索距離が8、探索方向が4であるので、mvdLX
には64通りの候補がある。探索した中で最もコストの小さいmvdLXを、base_candidate_idx、distance_idxおよびdirection_idxで表す。
The parameter coding control unit 1121 derives parameters (base_candidate_idx, distance_idx, direction_idx, etc.) representing the difference vector and outputs them to the MMVD prediction unit 30376. Derivation of the difference vector in the parameter coding control unit 1121 will be described with reference to FIG. The black circle in the center of the figure is the position pointed to by the prediction vector mvpLX, and 4 (up, down, left, right) centered on this position
Search eight search distances in each direction. mvpLX is a motion vector of the first and second candidates in the merge candidate list, and a search is performed for each. Since there are two prediction vectors in the merge candidate list (first and second in the list), the search distance is 8 and the search direction is 4, mvdLX
Has 64 possible candidates. The lowest cost mvdLX searched is represented by base_candidate_idx, distance_idx and direction_idx.

このようにMMVDモードは、予測ベクトルを中心として限られた候補点を探索し、適切な動きベクトルを導出するモードである。 As described above, the MMVD mode is a mode in which a limited number of candidate points are searched centering on the prediction vector and an appropriate motion vector is derived.

マージインデックス導出部11211は、マージインデックスmerge_idxを導出し、マージ予測パラメータ導出部3036(マージ予測部)に出力する。MMVDモードにおいては、マージインデックス導出部11211は、マージインデックスmerge_idxの値をbase_candidate_idxの値
と同じ値に設定する。ベクトル候補インデックス導出部11212は予測ベクトルインデック
スmvp_lX_idxを導出する。
The merge index derivation unit 11211 derives the merge index merge_idx and outputs it to the merge prediction parameter derivation unit 3036 (merge prediction unit). In the MMVD mode, the merge index derivation unit 11211 sets the value of the merge index merge_idx to the same value as the value of base_candidate_idx. The vector candidate index derivation unit 11212 derives the prediction vector index mvp_lX_idx.

マージ予測パラメータ導出部3036は、マージインデックスmerge_idxに基づいて、イン
ター予測パラメータを導出する。
The merge prediction parameter derivation unit 3036 derives an inter prediction parameter based on the merge index merge_idx.

AMVP予測パラメータ導出部3032は動きベクトルmvLXに基づいて予測ベクトルmvpLXを導
出する。AMVP予測パラメータ導出部3032は予測ベクトルmvpLXを減算部1123に出力する。
なお、参照ピクチャインデックスrefIdxLX及び予測ベクトルインデックスmvp_lX_idxは、エントロピー符号化部104に出力される。
The AMVP prediction parameter derivation unit 3032 derives the prediction vector mvpLX based on the motion vector mvLX. The AMVP prediction parameter derivation unit 3032 outputs the prediction vector mvpLX to the subtraction unit 1123.
The reference picture index refIdxLX and the prediction vector index mvp_lX_idx are output to the entropy coding unit 104.

アフィン予測部30372は、サブブロックのインター予測パラメータ(アフィン予測パラ
メータ)を導出する。
The affine prediction unit 30372 derives an inter prediction parameter (affine prediction parameter) of the sub block.

減算部1123は、符号化パラメータ決定部110から入力された動きベクトルmvLXから、AMVP予測パラメータ導出部3032の出力である予測ベクトルmvpLXを減算して差分ベクトルmvdLXを生成する。差分ベクトルmvdLXはエントロピー符号化部104に出力される。 The subtraction unit 1123 subtracts the prediction vector mvpLX output from the AMVP prediction parameter derivation unit 3032 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.

加算部106は、予測画像生成部101から入力されたブロックの予測画像の画素値と逆量子化・逆変換部105から入力された予測誤差を画素毎に加算して復号画像を生成する。加算
部106は生成した復号画像を参照ピクチャメモリ109に記憶する。
The addition unit 106 adds the pixel value of the prediction image of the block input from the prediction image generation unit 101 and the prediction error input from the inverse quantization/inverse conversion unit 105 for each pixel to generate a decoded image. The addition unit 106 stores the generated decoded image in the reference picture memory 109.

ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、SAO、ALFを施す。なお、ループフィルタ107は、必ずしも上記3種類のフィルタを含まな
くてもよく、例えばデブロッキングフィルタのみの構成であってもよい。
The loop filter 107 applies a deblocking filter, SAO, and ALF to the decoded image generated by the addition unit 106. Note that the loop filter 107 does not necessarily have to include the above three types of filters, and may be configured with only a deblocking filter, for example.

予測パラメータメモリ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 target picture and CU.

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

符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセッ
トを選択する。符号化パラメータとは、上述したQT、BTあるいはTT分割情報、予測パラメータ、あるいはこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータを用いて予測画像を生成する。
The coding parameter determination unit 110 selects one set from among a plurality of sets of coding parameters. The coding parameter is the above-mentioned QT, BT or TT partition information, a prediction parameter, or a parameter to be coded generated in association with these. The predicted image generation unit 101 generates a predicted image using these coding parameters.

符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化
誤差を示すRDコスト値を算出する。符号化パラメータ決定部110は、算出したコスト値が
最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして出力する。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。
The coding parameter determination unit 110 calculates the RD cost value indicating the size of the information amount and the coding error for each of the plurality of sets. The coding parameter determination unit 110 selects a set of coding parameters that minimizes the calculated cost value. As a result, the entropy coding unit 104 outputs the selected set of coding parameters as the coded stream Te. The coding parameter determination unit 110 stores the determined coding parameter in the prediction parameter memory 108.

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

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

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

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

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

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

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

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

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

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

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

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

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

また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。 A server (workstation, etc.)/client (TV receiver, personal computer, smartphone, etc.) for VOD (Video On Demand) services and video sharing services using the Internet is a transmission device that transmits and receives modulated signals by communication. This is an example of PROD_A/reception device PROD_B (usually, either wireless or wired is used as a transmission medium in LAN, and wired is used as a transmission medium in WAN). 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の双方として機能する。 Note that the client of the moving image sharing service has a function of decoding the encoded data downloaded from the server and displaying it on the display, as well as a function of encoding the moving image captured by the camera and uploading it to the server. That is, the client of the moving image sharing service functions as both the transmission device PROD_A and the reception device PROD_B.

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

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

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

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

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

図3(b)は、上述した動画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置31は、この復号部PROD_D2として利用される。 FIG. 3B is a block showing the configuration of the playback device PROD_D equipped with the moving image decoding device 31 described above. As shown in the figure, the reproducing apparatus PROD_D includes a reading unit PROD_D1 that reads the encoded data written in the recording medium PROD_M, and a decoding unit PROD_D2 that obtains a moving image by decoding the encoded data read by the reading unit PROD_D1. , Are provided. The moving picture decoding device 31 described above is used as this 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) of a type built into the playback device PROD_D, such as an HDD or SSD, or (2) such as an SD memory card or a USB flash memory. It may be of a type that is connected to the playback device PROD_D, or (3) such as a DVD or BD that is loaded in a drive device (not shown) built in the playback device PROD_D. Good.

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

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

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

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

後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記
プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(Random
Access Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
In the latter case, each device has a CPU that executes instructions of a program that realizes each function, a ROM (Read Only Memory) that stores the program, and a RAM (Random Memory) that expands the program.
Access Memory), a storage device (recording medium) such as a memory for storing the program and various data. The object of the embodiment of the present invention is to record the program code (execution format program, intermediate code program, source program) of the control program of each device, which is software for realizing the above-described functions, in a computer-readable manner. This can also be achieved by supplying a medium to each of the above devices and causing the computer (or CPU or MPU) to read and execute the program code recorded in the 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, and CD-ROMs (Compact Disc Read-Only Memory)/MO disks (Magneto-Optical discs). )/MD (Mini Disc)/DVD (Digital Versatile Disc: registered trademark)/CD-R (CD Recordable)/Blu-ray Disc (registered trademark) and other optical discs, IC cards (memory cards) Card) such as optical card, mask ROM/EPROM (Erasable Programmable Read-Only Memory)/EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark)/semiconductor memory such as flash ROM, or PLD ( Logic circuits such as Programmable logic device) and 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 of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited as long as it can transmit the program code. For example, Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television/Cable Television) communication network, virtual private network (Virtual Private Network) Network), telephone 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 with IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc., infrared rays such as IrDA (Infrared Data Association) and remote control , BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. It is also available wirelessly. It should be noted that the embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave, in which the program code is embodied by electronic transmission.

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

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

31 画像復号装置
301 エントロピー復号部
302 パラメータ復号部
3020 ヘッダ復号部
303 インター予測パラメータ復号部
304 イントラ予測パラメータ復号部
308 予測画像生成部
309 インター予測画像生成部
310 イントラ予測画像生成部
311 逆量子化・逆変換部
312 加算部
11 画像符号化装置
101 予測画像生成部
102 減算部
103 変換・量子化部
104 エントロピー符号化部
105 逆量子化・逆変換部
107 ループフィルタ
110 符号化パラメータ決定部
111 パラメータ符号化部
112 パラメータ符号化部
1110 ヘッダ符号化部
1111 CT情報符号化部
1112 CU符号化部(予測モード符号化部)
1114 TU符号化部
31 Image decoding device
301 Entropy decoding unit
302 Parameter decoding unit
3020 header decoder
303 Inter prediction parameter decoding unit
304 Intra prediction parameter decoding unit
308 Prediction image generator
309 Inter prediction image generator
310 Intra prediction image generator
311 Inverse quantization/inverse transform unit
312 Adder
11 Image coding device
101 Prediction image generator
102 Subtractor
103 Transform/Quantization unit
104 Entropy encoder
105 Inverse quantization/inverse transform section
107 loop filter
110 Coding parameter determination unit
111 Parameter coding unit
112 Parameter coding unit
1110 Header coding unit
1111 CT information coding unit
1112 CU encoder (prediction mode encoder)
1114 TU encoder

Claims (7)

予測画像を生成するためのパラメータを復号するパラメータ復号部を有し、
上記パラメータ復号部は、距離テーブルの要素を選択する距離インデックスインデクスを復号し、マージ候補から導出される動きベクトルに、所定の距離及び所定の方向の差分ベクトルを加算することで動きベクトルを得るMMVD予測部を有し、
上記MMVD予測部は、距離インデックスインデクスと方向インデックスから、第1の差分ベクトルを導出し、
上記MMVD予測部は、対象ピクチャとL0参照ピクチャのPOC差分と、対象ピクチャとL1参
照ピクチャのPOC差分が等しい場合に、L0差分ベクトルとL1差分ベクトルに、第1の差分
ベクトルを設定し、
それ以外で、対象ピクチャとL0参照ピクチャのPOC差分の絶対値が、対象ピクチャとL1
参照ピクチャのPOC差分の絶対値よりも大きい場合に、L0差分ベクトルに、上記第1の差
分ベクトルを設定し、L1差分ベクトルに、上記第1の差分ベクトルを、対象ピクチャとL0参照ピクチャのPOC差分と、対象ピクチャとL1参照ピクチャのPOC差分でスケーリングしたベクトルを設定し、
それ以外の場合に(対象ピクチャとL0参照ピクチャのPOC差分の絶対値が、対象ピクチ
ャとL1参照ピクチャのPOC差分の絶対値より以下の場合)、L1差分ベクトルに、上記第1
の差分ベクトルを設定し、L0差分ベクトルに、上記第1の差分ベクトルを、対象ピクチャとL1参照ピクチャのPOC差分と、対象ピクチャとL0参照ピクチャのPOC差分でスケーリングしたベクトルを設定することを特徴とするMMVD予測部。
A parameter decoding unit that decodes a parameter for generating a predicted image,
The parameter decoding unit decodes the distance index index for selecting an element of the distance table, and the motion vector derived from the merge candidate is added to the difference vector in a predetermined distance and in a predetermined direction to obtain a motion vector MMVD. Has a predictor,
The MMVD prediction unit derives a first difference vector from the distance index index and the direction index,
The MMVD prediction unit sets the first difference vector to the L0 difference vector and the L1 difference vector when the POC difference between the target picture and the L0 reference picture is equal to the POC difference between the target picture and the L1 reference picture,
Otherwise, the absolute value of the POC difference between the target picture and the L0 reference picture is
When it is larger than the absolute value of the POC difference of the reference picture, the first difference vector is set in the L0 difference vector, and the first difference vector is set in the L1 difference vector as the POC of the target picture and the L0 reference picture. Set the difference and the vector scaled by the POC difference between the target picture and the L1 reference picture,
In other cases (when the absolute value of the POC difference between the target picture and the L0 reference picture is less than or equal to the absolute value of the POC difference between the target picture and the L1 reference picture), the first value is added to the L1 difference vector.
Is set, and a vector obtained by scaling the first difference vector by the POC difference between the target picture and the L1 reference picture and the POC difference between the target picture and the L0 reference picture is set in the L0 difference vector. MMVD predictor.
予測画像を生成するためのパラメータを復号するパラメータ復号部を有し、
上記パラメータ復号部は、距離テーブルの要素を選択する距離インデックスインデクスを復号し、マージ候補から導出される動きベクトルに、所定の距離及び所定の方向の差分ベクトルを加算することで動きベクトルを得るMMVD予測部を有し、
さらに、上記パラメータ復号部は、セグメントヘッダもしくはパラメータセットで、距離テーブルの情報を復号し、上記パラメータ復号部は、距離テーブルインデックステーブルインデクスに基づいて、距離テーブルを導出し、
上記MMVD予測部は、上記導出された距離テーブルと、上記距離インデックスと上記方向インデックスから差分ベクトルを導出することを特徴とするMMVD予測部。
上記距離テーブルの情報は、距離テーブルを選択するためのインデックスであることを特徴とする請求項2に記載のMMVD予測部情報は、距離テーブルの各要素を示すインデックスである請求項2に記載のMMVD予測部上記距離テーブルの情報は、距離テーブルの先頭要素を示す値であることを特徴とする請求項2に記載のMMVD予測部。
A parameter decoding unit that decodes a parameter for generating a predicted image,
The parameter decoding unit decodes the distance index index for selecting an element of the distance table, and the motion vector derived from the merge candidate is added to the difference vector in a predetermined distance and in a predetermined direction to obtain a motion vector MMVD. Has a predictor,
Further, the parameter decoding unit, in the segment header or parameter set, decodes the information of the distance table, the parameter decoding unit, based on the distance table index table index, derives the distance table,
The MMVD prediction unit is characterized in that it derives a difference vector from the derived distance table and the distance index and the direction index.
The information of the distance table is an index for selecting the distance table, and the MMVD prediction unit information of claim 2 is an index indicating each element of the distance table. MMVD prediction unit The MMVD prediction unit according to claim 2, wherein the information of the distance table is a value indicating a head element of the distance table.
上記距離テーブルの情報は、距離テーブルを選択するためのインデックスであることを特徴とする請求項2に記載のMMVD予測部。 The MMVD prediction unit according to claim 2, wherein the information of the distance table is an index for selecting the distance table. 上記距離テーブルの情報は、距離テーブルの各要素を示すインデックスであることを特徴とする請求項2に記載のMMVD予測部。 The MMVD prediction unit according to claim 2, wherein the information of the distance table is an index indicating each element of the distance table. 上記距離テーブルの情報は、距離テーブルの先頭要素を示す値であることを特徴とする請求項2に記載のMMVD予測部。 The MMVD prediction unit according to claim 2, wherein the information of the distance table is a value indicating a head element of the distance table. 上記請求項1から5のMMVD予測部を備える動画像復号装置。 A moving picture decoding device comprising the MMVD prediction unit according to any one of claims 1 to 5. 上記請求項1から5のMMVD予測部を備える動画像符号化装置。 A moving picture coding apparatus comprising the MMVD prediction unit according to any one of claims 1 to 5.
JP2018245248A 2018-12-27 2018-12-27 Image decoding device and image encoding device Pending JP2020108012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018245248A JP2020108012A (en) 2018-12-27 2018-12-27 Image decoding device and image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018245248A JP2020108012A (en) 2018-12-27 2018-12-27 Image decoding device and image encoding device

Publications (1)

Publication Number Publication Date
JP2020108012A true JP2020108012A (en) 2020-07-09

Family

ID=71449513

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018245248A Pending JP2020108012A (en) 2018-12-27 2018-12-27 Image decoding device and image encoding device

Country Status (1)

Country Link
JP (1) JP2020108012A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022515875A (en) * 2019-01-02 2022-02-22 テレフオンアクチーボラゲット エルエム エリクソン(パブル) Side motion refinement in video encoding / decoding systems
CN115086678A (en) * 2022-08-22 2022-09-20 北京达佳互联信息技术有限公司 Video encoding method and device, and video decoding method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022515875A (en) * 2019-01-02 2022-02-22 テレフオンアクチーボラゲット エルエム エリクソン(パブル) Side motion refinement in video encoding / decoding systems
JP7257524B2 (en) 2019-01-02 2023-04-13 テレフオンアクチーボラゲット エルエム エリクソン(パブル) Side motion refinement in video encoding/decoding systems
US11930205B2 (en) 2019-01-02 2024-03-12 Telefonaktiebolaget Lm Ericsson (Publ) Side motion refinement in video encoding/decoding systems
CN115086678A (en) * 2022-08-22 2022-09-20 北京达佳互联信息技术有限公司 Video encoding method and device, and video decoding method and device

Similar Documents

Publication Publication Date Title
WO2020116456A1 (en) Moving image decoding device
WO2018110203A1 (en) Moving image decoding apparatus and moving image encoding apparatus
WO2020184487A1 (en) Dynamic image decoding device
WO2020137920A1 (en) Prediction image generating device, moving image decoding device, moving image encoding device, and prediction image generating method
WO2020059877A1 (en) Image decoding device and image encoding device
JP7448349B2 (en) Video decoding device
JP2020053924A (en) Video encoding device and video decoding device
WO2017135151A1 (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2020088451A (en) Moving image decoding apparatus and moving image coding apparatus
JP2020043500A (en) Video encoding device and video decoding device
JP2020108012A (en) Image decoding device and image encoding device
JP2020145650A (en) Image decoding device and image coding device
JP2020096279A (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2020088660A (en) Moving picture coding apparatus and moving picture decoding apparatus
WO2018173432A1 (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2020036101A (en) Image decoder, and image encoder
WO2021200658A1 (en) Dynamic image decoding device and dynamic image decoding method
JP2019201254A (en) Image decoding apparatus and image encoding apparatus
US11044490B2 (en) Motion compensation filter apparatus, image decoding apparatus, and video coding apparatus
JP2020096329A (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2020170901A (en) Predictive image generation device, video decoding device, and video coding device
JP2020088577A (en) Predictive image generation device, moving image decoding device, and moving image encoding device
WO2018037919A1 (en) Image decoding device, image coding device, image decoding method, and image coding method
JP7378968B2 (en) Predicted image generation device, video decoding device, and video encoding device
RU2812275C2 (en) Video signal decoding device