JP7783715B2 - Video decoding device and video encoding device - Google Patents
Video decoding device and video encoding deviceInfo
- Publication number
- JP7783715B2 JP7783715B2 JP2021150710A JP2021150710A JP7783715B2 JP 7783715 B2 JP7783715 B2 JP 7783715B2 JP 2021150710 A JP2021150710 A JP 2021150710A JP 2021150710 A JP2021150710 A JP 2021150710A JP 7783715 B2 JP7783715 B2 JP 7783715B2
- Authority
- JP
- Japan
- Prior art keywords
- gpm
- prediction
- unit
- parameter
- merge
- 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.)
- Active
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明の実施形態は、動画像復号装置および動画像符号化装置に関する。 Embodiments of the present invention relate to a video decoding device and a video encoding device.
動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。 To efficiently transmit or record video, video encoding devices are used that encode video to generate coded data, and video decoding devices that decode the coded data to generate decoded images.
具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)方式などが挙げられる。 Specific video encoding methods include H.264/AVC and HEVC (High-Efficiency Video Coding).
このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化ツリーユニット(CTU:Coding Tree Unit)、符号化ツリーユニットを分割することで得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られる変換ユニット(TU:Transform Unit)からなる階層構造により管理され、CU毎に符号化/復号される。 In such video coding methods, the images (pictures) that make up a video are managed in a hierarchical structure consisting of slices obtained by dividing the images, coding tree units (CTUs) obtained by dividing the slices, coding units (sometimes called coding units: CUs) obtained by dividing the coding tree units, and transform units (TUs) obtained by dividing the coding units, and are coded/decoded for each CU.
また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測誤差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。 In addition, in such video coding methods, a predicted image is typically generated based on a locally decoded image obtained by encoding/decoding an input image, and the prediction error (sometimes called a "difference image" or "residual image") obtained by subtracting this predicted image from the input image (original image) is coded. Methods for generating predicted images include inter-frame prediction (inter-prediction) and intra-frame prediction (intra-prediction).
また、非特許文献1には、対象ブロックを矩形以外の形状に分割し、領域ごとに異なるインター予測を実施するGPM(Geometric partition mode)モードが開示されている。このように対象ブロックを矩形以外の形状に分割することにより、複雑なテクスチャに対してもより正確に予測することができ、符号化効率が向上する。 Non-Patent Document 1 also discloses a GPM (Geometric Partition Mode) mode in which the target block is divided into shapes other than rectangular and different inter-predictions are performed for each region. By dividing the target block into shapes other than rectangular in this way, more accurate predictions can be made even for complex textures, improving coding efficiency.
特許文献1では、「前記分割方法復号化ステップでは、前記ブロックの分割方法が前記任意の線分での分割であり、前記分割線分情報として、前記ブロックと周辺ブロックとの接する線上の分割点を基準とする前記線分が通る1点と前記線分の傾きとが記述されている場合、前記線分が通る1点と前記線分の傾きとから線分情報を特定し、前記線分の情報を前記分割ステップに通知する」として、線分が通る1点と傾きを用いて線分を特定する方法が知られている。 Patent Document 1 describes a method of identifying a line segment using a point through which the line segment passes and its slope, stating that "in the division method decoding step, if the division method for the block is division along the arbitrary line segment, and the division line segment information describes a point through which the line segment passes and the slope of the line segment, based on a division point on the line where the block meets a peripheral block, the line segment information is identified from the point through which the line segment passes and the slope of the line segment, and the line segment information is notified to the division step."
非特許文献1の記載の方法では、ブロック毎にGPM情報を符号化しており、周囲のブロックの情報を利用できていない課題がある。 The method described in Non-Patent Document 1 encodes GPM information for each block, which has the problem of not being able to use information from surrounding blocks.
また、特許文献1の記載の方法では、非特許文献1の記載されているGPMモードにおける、線分が通る1点を記述できていない課題がある。 Furthermore, the method described in Patent Document 1 has the problem of not being able to describe the single point through which the line segment passes in the GPM mode described in Non-Patent Document 1.
上記の課題を解決するために、本発明の一態様に係る動画像復号装置は、
符号化データから対象ブロックのGPMパラメータを復号するパラメータ復号部と、2つの予測画像と重みから予測画像を導出する予測部と、を備える画像復号装置であって、
前記パラメータ復号部は、隣接ブロックの前記予測分割線と対象ブロックが交点を持つか否かによって復号するパラメータが異なり、交点の導出には、隣接ブロックのブロックサイズおよび隣接ブロックの前記予測モード番号と交点の座標位置を対応付けているテーブルを用いることを特徴とし、
前記予測部は、隣接ブロックの前記予測分割線と対象ブロックが交点を持つ場合に、交点と復号した分割角度を示すインデックスから導出された分割角度と、隣接ブロックのブロックサイズおよび隣接ブロックの前記予測モード番号と交点の座標位置を対応付けているテーブルと、対象ブロックのブロックサイズおよび対象ブロックの前記予測モード番号と交点の座標位置を対応付けているテーブルを用いて、対象ブロックの前記予測モードのパーティションインデックスを導出し、
前記予測部は、導出されたパーティションインデックスの値と、パーティションインデックスと角度インデックスおよび距離インデックスのペアとを対応付けているテーブルと、に少なくとも基づいて、前記予測を行うための重みの導出を行い、
前記重みを用いて、前記予測画像を導出することを特徴とする。
In order to solve the above problem, a video decoding device according to one aspect of the present invention includes:
An image decoding device comprising: a parameter decoding unit that decodes GPM parameters of a current block from encoded data; and a prediction unit that derives a predicted image from two predicted images and weights,
The parameter decoding unit decodes different parameters depending on whether or not the prediction division line of the adjacent block and the current block have an intersection point, and derives the intersection point using a table that associates the block size of the adjacent block, the prediction mode number of the adjacent block, and a coordinate position of the intersection point;
When the prediction division line of the adjacent block and the target block have an intersection point, the prediction unit derives a partition index of the prediction mode of the target block using a table that associates the division angle derived from the index indicating the intersection point and the decoded division angle, the block size of the adjacent block, the prediction mode number of the adjacent block, and the coordinate position of the intersection point, and a table that associates the block size of the target block, the prediction mode number of the target block, and the coordinate position of the intersection point;
the prediction unit derives weights for making the prediction based at least on the derived partition index values and a table that associates the partition index with pairs of angle indexes and distance indexes;
The weights are used to derive the predicted image.
本発明の態様によれば、動画像符号化・復号処理において符号化効率を向上させることができる。 According to this aspect of the present invention, it is possible to improve the coding efficiency in video coding and decoding processes.
(第1の実施形態)
以下、図面を参照しながら本発明の実施形態について説明する。
(First embodiment)
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
図1は、本実施形態に係る画像伝送システム1の構成を示す概略図である。 Figure 1 is a schematic diagram showing the configuration of an image transmission system 1 according to this embodiment.
画像伝送システム1は、対象画像を符号化した符号化ストリームを伝送し、伝送された符号化ストリームを復号し画像を表示するシステムである。画像伝送システム1は、動画像符号化装置(画像符号化装置)11、ネットワーク21、動画像復号装置(画像復号装置)31、及び動画像表示装置(画像表示装置)41を含んで構成される。 Image transmission system 1 is a system that transmits an encoded stream obtained by encoding a target image, decodes the transmitted encoded stream, and displays the image. Image transmission system 1 is composed of a video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, and a video display device (image display device) 41.
動画像符号化装置11には画像Tが入力される。 Image T is input to video 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 video encoding device 11 to the video decoding device 31. The network 21 may be the Internet, a wide area network (WAN), a local area network (LAN), or a combination of these. The network 21 is not necessarily limited to a two-way communication network, but may also be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. The network 21 may also be replaced by a storage medium on which the encoded stream Te is recorded, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blu-ray Disc: registered trademark).
動画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、復号した1または複数の復号画像Tdを生成する。 The video decoding device 31 decodes each of the coded streams Te transmitted over the network 21 and generates one or more decoded images Td.
動画像表示装置41は、動画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。動画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。ディスプレイの形態としては、据え置き、モバイル、HMD等が挙げられる。また、動画像復号装置31が高い処理能力を有する場合には、画質の高い画像を表示し、より低い処理能力しか有しない場合には、高い処理能力、表示能力を必要としない画像を表示する。 The video display device 41 displays all or part of one or more decoded images Td generated by the video decoding device 31. The video display device 41 is equipped with a display device such as a liquid crystal display or an organic EL (Electro-Luminescence) display. Display types include stationary, mobile, and HMD. Furthermore, if the video decoding device 31 has high processing power, it displays high-quality images, and if it has lower processing power, it displays images that do not require high processing or display power.
<演算子>
本明細書で用いる演算子を以下に記載する。
<Operator>
The operators used in this specification are listed below.
>>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=はOR代入演算子を示す。 >> indicates a right bit shift, << indicates a left bit shift, & indicates a bitwise AND, | indicates a bitwise OR, and |= indicates the OR assignment operator.
x?y:zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。 x?y:z is a ternary operator that takes y if x is true (non-zero) and z if x is false (0).
Clip3(a,b,c)は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。 Clip3(a,b,c) is a function that clips c to a value greater than or equal to a and less than or equal to b. If c<a, it returns a; if c>b, it returns b; otherwise, it 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 the division of a by d (rounded down to the nearest integer).
a % dは、dによるaの除算の余りを表す。 a % d represents the remainder when a is divided by d.
x||yは、xとyのOR演算を示す。||はx+yとしてもよい。 x||y indicates the OR operation of x and y. || can also be x+y.
x&&yは、xとyのAND演算を示す。&&はx*yとしてもよい。 x&&y indicates the AND operation of x and y. && can also be written as x*y.
x++は、xを1だけインクリメントする。Tbl[x++]と記載する場合には、Tbl[x]の値を使った後に、xを1だけインクリメントすることを示す。 x++ increments x by 1. When you write Tbl[x++], it indicates that after using the value of Tbl[x], x is incremented by 1.
<符号化ストリームTeの構造>
本実施形態に係る動画像符号化装置11および動画像復号装置31の詳細な説明に先立って、動画像符号化装置11によって生成され、動画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of the coded stream Te>
Before proceeding to a detailed description of the video encoding device 11 and video decoding device 31 according to this embodiment, the data structure of the encoded stream Te generated by the video encoding device 11 and decoded by the video decoding device 31 will be described.
図2は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図2の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニットを示す図である。 Figure 2 shows the hierarchical structure of data in the coded stream Te. The coded stream Te illustratively includes a sequence and multiple pictures that make up the sequence. (a) to (f) of Figure 2 show, respectively, a coded video sequence that defines the sequence SEQ, a coded picture that defines the picture PICT, a coded slice that defines the slice S, coded slice data that defines the slice data, a coded tree unit included in the coded slice data, and a coded unit included in the coded tree unit.
(符号化ビデオシーケンス)
符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために動画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図2に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、Adaptation Parameter Set(APS)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。
(encoded video sequence)
The coded video sequence defines a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed. As shown in Fig. 2, the sequence SEQ includes a video parameter set, a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), an adaptation parameter set (APS), a picture PICT, and supplemental enhancement information SEI (Supplemental Enhancement Information).
ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。 A video parameter set (VPS) specifies a set of coding parameters common to multiple videos composed of multiple layers, as well as a set of coding parameters related to the multiple layers and individual layers contained in the video.
シーケンスパラメータセットSPSでは、対象シーケンスを復号するために動画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れか
を選択する。
The sequence parameter set SPS defines a set of coding parameters that the video decoding device 31 references to decode the target sequence. For example, the width and height of a picture are defined. Note that there may be multiple SPSs. In this case, one of the multiple 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 video decoding device 31 references to decode each picture in the target sequence. For example, it includes the reference value of the quantization width used in decoding the picture (pic_init_qp_minus26) and a flag indicating the application of weighted prediction (weighted_pred_flag). Note that there may be multiple PPSs. In that case, one of the multiple PPSs is selected for each picture in the target sequence.
(符号化ピクチャ)
符号化ピクチャでは、処理対象のピクチャPICTを復号するために動画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図2に示すように、スライス0~スライスNS-1を含む(NSはピクチャPICTに含まれるスライスの総数)。
(encoded picture)
A coded picture defines a set of data that the video decoding device 31 references in order to decode a picture PICT to be processed. As shown in Figure 2, the picture PICT includes slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).
なお、以下、スライス0~スライスNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 Note that, hereinafter, when there is no need to distinguish between slices 0 to NS-1, the subscripts of the symbols may be omitted. The same applies to other data with subscripts included in the coded stream Te described below.
(符号化スライス)
符号化スライスでは、処理対象のスライスSを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスは、図2に示すように、スライスヘッダ、および、スライスデータを含んでいる。
(Coding Slice)
A coded slice defines a set of data that the video decoding device 31 refers to in order to decode a target slice S. As shown in Fig. 2, a slice includes a slice header and slice data.
スライスヘッダには、対象スライスの復号方法を決定するために動画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダに含まれる符号化パラメータの一例である。 The slice header includes a set of coding parameters that the video decoding device 31 references to determine the decoding method for the current slice. The slice type specification information (slice_type), which specifies the slice type, is an example of a coding parameter included in the slice header.
スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P、Bスライスと呼ぶ場合には、インター予測を用いることができるブロックを含むスライスを指す。 Slice types that can be specified by the slice type specification information include (1) an I slice that uses only intra prediction during encoding, (2) a P slice that uses unidirectional or intra prediction during encoding, and (3) a B slice that uses unidirectional, bidirectional, or intra prediction during encoding. Note that inter prediction is not limited to unidirectional or bidirectional prediction, and a predicted image may be generated using more reference pictures. Hereinafter, P and B slices refer to slices that include blocks that can use inter prediction.
なお、スライスヘッダは、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。 Note that the slice header may also include a reference to the picture parameter set PPS (pic_parameter_set_id).
(符号化スライスデータ)
符号化スライスデータでは、処理対象のスライスデータを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスデータは、図2(d)に示すように、CTUを含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
(encoded slice data)
The coded slice data defines a set of data that the video decoding device 31 references in order to decode the slice data to be processed. As shown in Fig. 2(d), the slice data includes a CTU. A CTU is a block of a fixed size (e.g., 64x64) that constitutes a slice, and is also called a Largest Coding Unit (LCU).
(符号化ツリーユニット)
図2には、処理対象の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自身も最上位の符号化ノードとして規定される。また、最下位の符号化ノードは符号化ユニットとして規定される。
(coding tree unit)
2 specifies a set of data that the video decoding device 31 refers to in order to decode the CTU to be processed. The CTU is divided into coding units (CU), which are the basic units of the encoding process, by recursive quad tree division (QT (Quad Tree) division), binary tree division (BT (Binary Tree) division), or ternary tree division (TT (Ternary Tree) division). BT division and TT division are collectively called multi tree division (MT (Multi Tree) division). A node of the tree structure obtained by recursive quad tree division is called a coding node. Quad tree, binary tree, and ternary tree division are
The intermediate nodes of the bintree are coding nodes, with the CTU itself being defined as the top coding node, and the bottom coding node being defined as the coding unit.
(符号化ユニット)
図2は、処理対象の符号化ユニットを復号するために動画像復号装置31が参照するデータの集合が規定されている。具体的には、CUは、CUヘッダCUH、予測パラメータ、変換パラメータ、量子化変換係数等から構成される。CUヘッダでは予測モード等が規定される。
(Encoding Unit)
2 defines a set of data that the video decoding device 31 references in order to decode a coding unit to be processed. Specifically, a CU is composed of a CU header CUH, prediction parameters, transformation parameters, quantization transformation coefficients, etc. The CU header defines a prediction mode, etc.
予測処理は、CU単位で行われる場合と、CUをさらに分割したサブCU単位で行われる場合がある。CUとサブCUのサイズが等しい場合には、CU中のサブCUは1つである。CUがサブCUのサイズよりも大きい場合、CUはサブCUに分割される。たとえばCUが8x8、サブCUが4x4の場合、CUは水平2分割、垂直2分割からなる、4つのサブCUに分割される。 Prediction processing can be performed on a CU basis, or on sub-CU basis, which is a further division of a CU. If the size of the CU and sub-CU are equal, there will be one sub-CU in the CU. If the size of the CU is larger than the size of the sub-CU, the CU will be divided into sub-CUs. For example, if the CU is 8x8 and the sub-CU is 4x4, the CU will be divided into four sub-CUs, divided horizontally in half and vertically in half.
予測の種類(予測モード)は、イントラ予測(MODE_INTRA)と、インター予測(MODE_INTER)、イントラブロックコピー(MODE_IBC)がある。イントラ予測は、同一ピクチャ内の予測であり、インター予測は、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。 Prediction types (prediction modes) include intra prediction (MODE_INTRA), inter prediction (MODE_INTER), and intra block copy (MODE_IBC). Intra prediction is prediction within the same picture, while inter prediction refers to prediction processing performed between different pictures (for example, between display times or between layer images).
変換・量子化処理はCU単位で行われるが、量子化変換係数は4x4等のサブブロック単位でエントロピー符号化してもよい。 Transformation and quantization processing is performed in units of CU, but quantized transform coefficients may be entropy coded in units of subblocks such as 4x4.
(予測パラメータ)
予測画像は、ブロックに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測とインター予測の予測パラメータがある。
(Prediction parameters)
The predicted image is derived from prediction parameters associated with the block, which 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を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
(Prediction parameters for inter prediction)
The prediction parameters of inter prediction will be described. The inter prediction parameters are composed of prediction list usage flags predFlagL0 and predFlagL1, reference picture indices refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1. predFlagL0 and predFlagL1 are flags indicating whether a reference picture list (L0 list, L1 list) is used, and when the value is 1, the corresponding reference picture list is used. Note that in this specification, when the term "flag indicating whether XX is true" is used, a flag other than 0 (e.g., 1) is considered to be XX, and 0 is considered to be not XX, and in logical negation, logical product, etc., 1 is treated as true and 0 is treated as false (the same applies below). However, in actual devices and methods, other values may be used as true and false values.
インター予測パラメータを導出するためのシンタックス要素には、例えば、マージフラグmerge_flag (general_merge_flag)、マージインデックスmerge_idx、サブブロック単位のインター予測を用いるかを示すmerge_subblock_flag、regulare_merge_flag、イントラインターフラグciip_flag、GPMモード(Geometric partitioning merge mode)を用いるかを示すGPM_flag、GPMモードの分割形状を示すmerge_gpm_partition_idx、GPMのマージインデックスを示すmerge_gpm_idx0、merge_gpm_idx1、AMVPモードで用いる参照ピクチャを選択するためのインター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルを導出するための予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、動きベクトル精度モードamvr_modeがある。対象ブロックの分割形状は、シンタックス要素merge_gpm_partition_idxに限定されず、周囲のブロックから予測して得られるmergeGpmPartitionIdxを用いてもよい。 Syntax elements for deriving inter prediction parameters include, for example, the merge flag merge_flag (general_merge_flag), the merge index merge_idx, merge_subblock_flag indicating whether to use subblock-based inter prediction, regulare_merge_flag, the intra-inter flag ciip_flag, GPM_flag indicating whether to use GPM mode (Geometric partitioning merge mode), merge_gpm_partition_idx indicating the partition shape for GPM mode, merge_gpm_idx0 and merge_gpm_idx1 indicating GPM merge indices, the inter prediction identifier inter_pred_idc for selecting the reference picture to be used in AMVP mode, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx for deriving a motion vector, the difference vector mvdLX, and the motion vector precision mode amvr_mode. The partition shape of the target block is not limited to the syntax element merge_gpm_partition_idx, and may also use mergeGpmPartitionIdx obtained by prediction from surrounding blocks.
(参照ピクチャリスト)
参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。個々のCUでは、参照ピクチャリストRefPicListX(X=0または1)中のどのピ
クチャを実際に参照するかをrefIdxLXで指定する。なお、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. In each CU, refIdxLX specifies which picture in the reference picture list RefPicListX (X=0 or 1) to actually reference. Note that LX is a notation method used when there is no distinction between L0 prediction and L1 prediction; hereinafter, parameters for the L0 list and parameters for the L1 list will be distinguished by replacing LX with L0 or L1.
(マージ予測とAMVP予測)
予測パラメータの復号(符号化)方法には、マージ予測(merge)モード(マージモード)とAMVP(Advanced Motion Vector Prediction、適応動きベクトル予測)モードがあり、merge_flagは、これらを識別するためのフラグである。マージモードは、動きベクトル差分の一部もしくは全てを省略する予測モードであり、予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍ブロックの予測パラメータ等から導出するモードである。AMVPモードは、inter_pred_idc、refIdxLX、mvLXを符号化データに含めるモードである。なお、mvLXは、予測ベクトルmvpLXを識別するmvp_LX_idxと差分ベクトルmvdLXとして符号化される。また動きベクトル差分を省略・簡素化する予測モードの総称をgeneral merge modeと呼び、general_merge_flagによりgeneral merge modeとAMVP予測を選択してもよい。
さらにregular_merge_flagを伝送し、regular_merge_flagが1である場合に、通常マージモードもしくはMMVDを選択し、それ以外の場合にCIIPモードもしくはGPMモードを選択してもよい。
(Merge prediction and AMVP prediction)
Prediction parameter decoding (encoding) methods include merge prediction mode (merge mode) and AMVP (Advanced Motion Vector Prediction, adaptive motion vector prediction) mode, and merge_flag is a flag for distinguishing between them. Merge mode is a prediction mode that omits some or all of the motion vector difference, and derives it from prediction parameters of already processed neighboring blocks without including the prediction list usage flag predFlagLX, reference picture index refIdxLX, and motion vector mvLX in the encoded data. AMVP mode is a mode that includes inter_pred_idc, refIdxLX, and mvLX in the encoded data. Note that mvLX is encoded as mvp_LX_idx, which identifies the prediction vector mvpLX, and the difference vector mvdLX. The general term for prediction modes that omit or simplify the motion vector difference is called general merge mode, and general merge mode and AMVP prediction may be selected using general_merge_flag.
Furthermore, the regular_merge_flag may be transmitted, and if the regular_merge_flag is 1, the normal merge mode or MMVD may be selected, and otherwise the CIIP mode or GPM mode may be selected.
inter_pred_idcは、参照ピクチャの種類および数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストで管理された1枚の参照ピクチャを用いる単予測を示す。PRED_BIはL0リストとL1リストで管理された2枚の参照ピクチャを用いる双予測を示す。 inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of the values PRED_L0, PRED_L1, or PRED_BI. PRED_L0 and PRED_L1 indicate uni-prediction using one reference picture managed in the L0 list and L1 list, respectively. PRED_BI indicates bi-prediction using two reference pictures managed in the L0 list and L1 list.
merge_idxは、処理が完了したブロックから導出される予測パラメータ候補(マージ候補)のうち、いずれの予測パラメータを対象ブロックの予測パラメータとして用いるかを示すインデックスである。 merge_idx is an index that indicates which prediction parameter from the prediction parameter candidates (merge candidates) derived from the processed block will be used as the prediction parameter for the target block.
(動きベクトル)
mvLXは、異なる2つのピクチャ上のブロック間のシフト量を示す。mvLXに関する予測ベクトル、差分ベクトルを、それぞれmvpLX、mvdLXと呼ぶ。
(motion vector)
mvLX indicates the amount of shift between blocks on two different pictures. The predicted vector and differential vector related to mvLX are called mvpLX and mvdLX, respectively.
(インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
inter_pred_idcと、predFlagL0、predFlagL1の関係は以下のとおりであり、相互に変換可能である。
(Inter prediction identifier inter_pred_idc and prediction list usage flag predFlagLX)
The relationship between inter_pred_idc, predFlagL0, and predFlagL1 is as follows, and they can be converted to each other.
inter_pred_idc = (predFlagL1<<1)+predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
なお、インター予測パラメータは、予測リスト利用フラグを用いても良いし、インター予測識別子を用いてもよい。また、予測リスト利用フラグを用いた判定は、インター予測識別子を用いた判定に置き替えてもよい。逆に、インター予測識別子を用いた判定は、予測リスト利用フラグを用いた判定に置き替えてもよい。
inter_pred_idc = (predFlagL1<<1)+predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
Note that the inter prediction parameters may use a prediction list usage flag or an inter prediction identifier. Furthermore, the determination using the prediction list usage flag may be replaced with a determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with a determination using the prediction list usage flag.
(双予測biPredの判定)
双予測であるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。
(Bi-prediction biPred determination)
The flag biPred indicating whether or not the prediction is bi-predictive can be derived based on whether or not two prediction list usage flags are both 1.
あるいは、biPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。 Alternatively, biPred can be derived based on whether the inter-prediction identifier is a value indicating the use of two prediction lists (reference pictures).
(動画像復号装置の構成)
本実施形態に係る動画像復号装置31(図3)の構成について説明する。
(Configuration of video decoding device)
The configuration of a video decoding device 31 (FIG. 3) according to this embodiment will be described.
動画像復号装置31は、エントロピー復号部301、パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312、予測パラメータ導出部320を含んで構成される。なお、後述の動画像符号化装置11に合わせ、動画像復号装置31にループフィルタ305が含まれない構成もある。 The video decoding device 31 includes an entropy decoding unit 301, a parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, an inverse quantization and inverse transform unit 311, an addition unit 312, and a prediction parameter derivation unit 320. Note that the video decoding device 31 may also be configured without the loop filter 305, in line with the video encoding device 11 described below.
パラメータ復号部302は、さらに、ヘッダ復号部3020、CT情報復号部3021、及びCU復号部3022(予測モード復号部)を備えており、CU復号部3022はさらにTU復号部3024を備えている。これらを総称して復号モジュールと呼んでもよい。ヘッダ復号部3020は、符号化データからVPS、SPS、PPS、APSなどのパラメータセット情報、スライスヘッダ(スライス情報)を復号する。CT情報復号部3021は、符号化データからCTを復号する。CU復号部3022は符号化データからCUを復号する。TU復号部3024は、TUに予測誤差が含まれている場合に、符号化データからQP更新情報(量子化補正値)と量子化予測誤差(residual_coding)を復号する。 The parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, 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 APS, and slice headers (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. If a prediction error is included in the TU, the TU decoding unit 3024 decodes QP update information (quantization correction value) and quantized prediction error (residual_coding) from the encoded data.
sps_gpm_enabled_flagは、SPSで符号化、復号され、対象シーケンスにおいて、GPM予測モードが用いられるか否かを示す。SPSでは、sps_max_num_merge_cand_minus_max_num_gpm_candが符号化、復号される。sps_max_num_merge_cand_minus_max_num_gpm_candは、GPM予測のマージ候補数の最大値MaxNumGpmMergeCandの導出に使用されるパラメータである。MaxNumGpmMergeCandが0のとき、GPM予測は禁止される。 sps_gpm_enabled_flag is coded and decoded using SPS and indicates whether GPM prediction mode is used for the target sequence. sps_max_num_merge_cand_minus_max_num_gpm_cand is coded and decoded in SPS. sps_max_num_merge_cand_minus_max_num_gpm_cand is a parameter used to derive MaxNumGpmMergeCand, the maximum number of merge candidates for GPM prediction. When MaxNumGpmMergeCand is 0, GPM prediction is disabled.
予測画像生成部308は、インター予測画像生成部309(図4)及びイントラ予測画像生成部310を含んで構成される。 The predicted image generation unit 308 is composed of an inter predicted image generation unit 309 (Figure 4) and an intra predicted image generation unit 310.
予測パラメータ導出部320は、インター予測パラメータ導出部303(図5)及びイントラ予測パラメータ導出部を含んで構成される。 The prediction parameter derivation unit 320 is composed of an inter prediction parameter derivation unit 303 (Figure 5) and an intra prediction parameter derivation unit.
また、以降では処理の単位としてCTU、CUを使用した例を記載するが、この例に限らず、サブCU単位で処理をしてもよい。あるいはCTU、CUをブロック、サブCUをサブブロックと読み替え、ブロックあるいはサブブロック単位の処理としてもよい。 Furthermore, although the following describes an example in which CTUs and CUs are used as processing units, this is not limiting and processing may be performed in sub-CU units. Alternatively, CTUs and CUs may be read as blocks, and sub-CUs as sub-blocks, and processing may be performed in block or sub-block units.
エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を復号する。エントロピー符号化には、シンタックス要素の種類や周囲の状況に応じて適応的に選択したコンテキスト(確率モデル)を用いてシンタックス要素を可変長符号化する方式と、あらかじめ定められた表、あるいは計算式を用いてシンタックス要素を可変長符号化する方式がある。 The entropy decoding unit 301 performs entropy decoding on the externally input coded stream Te to decode individual codes (syntax elements). Entropy coding can be performed in two ways: one is to perform variable-length coding of syntax elements using a context (probability model) adaptively selected according to the type of syntax element and the surrounding circumstances, and the other is to perform variable-length coding of syntax elements using a predetermined table or formula.
エントロピー復号部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 may be, for example, the prediction mode predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX, amvr_mode, etc. The code to be decoded is controlled based on instructions from the parameter decoding unit 302.
(基本フロー)
図6は、動画像復号装置31の概略的動作を説明するフローチャートである。
(Basic flow)
FIG. 6 is a flowchart illustrating the general operation of the video decoding device 31.
(S1100:パラメータセット情報復号)ヘッダ復号部3020は、符号化データからVPS、SP
S、PPSなどのパラメータセット情報を復号する。
(S1100: Decode parameter set information) The header decoder 3020 decodes the VPS and SP from the coded data.
Decode parameter set information such as S and PPS.
(S1200:スライス情報復号)ヘッダ復号部3020は、符号化データからスライスヘッダ(スライス情報)を復号する。 (S1200: Slice information decoding) The header decoding unit 3020 decodes the slice header (slice information) from the encoded data.
以下、動画像復号装置31は、対象ピクチャに含まれる各CTUについて、S1300からS5000の処理を繰り返すことにより各CTUの復号画像を導出する。 The video decoding device 31 then repeats the processes from S1300 to S5000 for each CTU included in the target picture to derive a decoded image for each CTU.
(S1300:CTU情報復号)CT情報復号部3021は、符号化データからCTUを復号する。 (S1300: Decode CTU information) The CT information decoding unit 3021 decodes the CTU from the encoded data.
(S1400:CT情報復号)CT情報復号部3021は、符号化データからCTを復号する。 (S1400: CT information decoding) The CT information decoding unit 3021 decodes the CT from the encoded data.
(S1500:CU復号)CU復号部3022はS1510、S1520を実施して、符号化データからCUを復号する。 (S1500: CU decoding) The CU decoding unit 3022 performs S1510 and S1520 to decode the CU from the encoded data.
(S1510:CU情報復号)CU復号部3022は、符号化データからCU情報、予測情報、TU分割フラグ、CU残差フラグ等を復号する。 (S1510: CU information decoding) The CU decoding unit 3022 decodes CU information, prediction information, TU division flags, CU residual flags, etc. from the encoded data.
(S1520:TU情報復号)TU復号部3024は、TUに予測誤差が含まれている場合に、符号化データから量子化予測誤差、変換インデックスlfnst_idx等を復号する。 (S1520: TU information decoding) If a TU contains a prediction error, the TU decoding unit 3024 decodes the quantized prediction error, transform index lfnst_idx, etc. from the encoded data.
(S2000:予測画像生成)予測画像生成部308は、対象CUに含まれる各ブロックについて、予測情報に基づいて予測画像を生成する。 (S2000: Predicted image generation) The predicted image generation unit 308 generates a predicted image for each block included in the target CU based on the prediction information.
(S3000:逆量子化・逆変換)逆量子化・逆変換部311は、対象CUに含まれる各TUについて、逆量子化・逆変換処理を実行する。 (S3000: Inverse quantization and inverse transform) The inverse quantization and inverse transform unit 311 performs inverse quantization and inverse transform processing on each TU included in the target CU.
(S4000:復号画像生成)加算部312は、予測画像生成部308より供給される予測画像と、逆量子化・逆変換部311より供給される予測誤差とを加算することによって、対象CUの復号画像を生成する。 (S4000: Decoded image generation) The adder 312 generates a decoded image of the target CU by adding the predicted image supplied from the predicted image generation unit 308 and the prediction error supplied from the inverse quantization and inverse transform unit 311.
(S5000:ループフィルタ)ループフィルタ305は、復号画像にデブロッキングフィルタ、SAO、ALFなどのループフィルタをかけ、復号画像を生成する。 (S5000: Loop filter) The loop filter 305 applies a loop filter such as a deblocking filter, SAO, or ALF to the decoded image to generate a decoded image.
ループフィルタ305は、符号化ループ内に設けたフィルタで、ブロック歪やリンギング歪を除去し、画質を改善するフィルタである。ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。 The loop filter 305 is a filter installed within the encoding loop that removes block distortion and ringing distortion and improves image quality. The loop filter 305 applies filters such as deblocking, sample adaptive offset (SAO), and adaptive loop filter (ALF) to the decoded image of the CU generated by the adder 312.
参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、対象ピクチャ及び対象CU毎に予め定めた位置に記憶する。 The reference picture memory 306 stores the decoded image of the CU generated by the adder 312 in a predetermined location for each target picture and target CU.
予測パラメータメモリ307は、復号対象のCTUあるいはCU毎に予め定めた位置に予測パラメータを記憶する。具体的には、予測パラメータメモリ307は、パラメータ復号部302が復号したパラメータ及びエントロピー復号部301が分離した予測モードpredMode等を記憶する。 The prediction parameter memory 307 stores prediction parameters at a predetermined location for each CTU or CU to be decoded. Specifically, the prediction parameter memory 307 stores the parameters decoded by the parameter decoding unit 302 and the prediction mode predMode separated by the entropy decoding unit 301.
予測画像生成部308には、予測モードpredMode、予測パラメータ等が入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてブロックもしくはサブブロックの予測画像を生成する。ここで、参照ピクチャブロックとは、参照ピクチャ上の画素の集合(通常矩形であるのでブロックと呼ぶ)であり、予測画像を生成するために参照する領域である。 The prediction image generation unit 308 receives input of the prediction mode predMode, prediction parameters, etc. The prediction image generation unit 308 also reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image for a block or sub-block using the prediction parameters and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode. Here, a reference picture block is a set of pixels on the reference picture (usually rectangular, so called a block), and is the area referenced to generate a prediction image.
(インター予測パラメータ導出部の構成)
図5に示すように、インター予測パラメータ導出部303は、パラメータ復号部302から入力されたシンタックス要素に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを導出する。また、インター予測パラメータをインター予測画像生成部309、予測パラメータメモリ307に出力する。インター予測パラメータ導出部303及びその内部の要素であるAMVP予測パラメータ導出部3032、マージ予測パラメータ導出部3036、GPM予測部30377、MV加算部3038は、動画像符号化装置、動画像復号装置で共通する手段であるので、これらを総称して動きベクトル導出部(動きベクトル導出装置)と称してもよい。
(Configuration of inter-prediction parameter derivation unit)
As shown in Fig. 5, the inter prediction parameter derivation unit 303 derives inter prediction parameters by referring to prediction parameters stored in the prediction parameter memory 307, based on the syntax elements input from the parameter decoding unit 302. The inter prediction parameter derivation unit 303 also outputs the inter prediction parameters to the inter prediction image generation unit 309 and the prediction parameter memory 307. The inter prediction parameter derivation unit 303 and its internal elements, the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, the GPM prediction unit 3037, and the MV addition unit 3038, are means common to the video encoding device and the video decoding device, and therefore may be collectively referred to as a motion vector derivation unit (motion vector derivation device).
merge_flagが1、すなわち、マージ予測モードを示す場合、merge_idxを導出し、マージ予測パラメータ導出部3036に出力する。 If merge_flag is 1, i.e., indicates merge prediction mode, merge_idx is derived and output to the merge prediction parameter derivation unit 3036.
merge_flagが0、すなわち、AMVP予測モードを示す場合、AMVP予測パラメータ導出部3032はinter_pred_idc、refIdxLXかmvp_LX_idxからmvpLXを導出する。 When merge_flag is 0, i.e., indicates AMVP prediction mode, the AMVP prediction parameter derivation unit 3032 derives mvpLX from inter_pred_idc, refIdxLX, or mvp_LX_idx.
GPM_flagが1、すなわち、対象ブロックがGPM予測モードで符号化されることを示す場合、GPM予測部30377はGPM予測のパラメータを導出する。GPM_flagの導出は後述する。 If GPM_flag is 1, i.e., indicates that the current block is coded in GPM prediction mode, the GPM prediction unit 30377 derives GPM prediction parameters. The derivation of GPM_flag will be described later.
(MV加算部)
MV加算部3038では導出されたmvpLXとmvdLXを加算し、mvLXを導出する。
(MV addition section)
The MV adder 3038 adds the derived mvpLX and mvdLX to derive mvLX.
(マージ予測)
マージ予測パラメータ導出部3036は、マージ候補導出部30361、マージ候補選択部30362を備える。なお、マージ候補は、予測パラメータ(predFlagLX、mvLX、refIdxLX)を含んで構成され、マージ候補リストに格納される。マージ候補リストに格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。
(Merge Prediction)
The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 and a merge candidate selection unit 30362. Note that merge candidates are configured to include prediction parameters (predFlagLX, mvLX, refIdxLX) and are stored in a merge candidate list. Merge candidates stored in the merge candidate list are assigned indices according to predetermined rules.
マージ候補導出部30361は、復号済の隣接ブロックの動きベクトルとrefIdxLXをそのまま用いてマージ候補を導出する。それ以外に、マージ候補導出部30361は、後述する空間マージ候補導出処理、時間マージ候補導出処理等を適用してもよい。 The merge candidate derivation unit 30361 derives merge candidates directly using the motion vectors and refIdxLX of decoded adjacent blocks. Alternatively, the merge candidate derivation unit 30361 may apply spatial merge candidate derivation processing, temporal merge candidate derivation processing, etc., as described below.
空間マージ候補導出処理として、マージ候補導出部30361は、所定の規則に従って、予測パラメータメモリ307が記憶している予測パラメータを読み出し、マージ候補に設定する。例えば、下記、A1,B1,B0,A0,B2の位置の予測パラメータを読み出す。 As part of the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads prediction parameters stored in the prediction parameter memory 307 according to predetermined rules and sets them as merge candidates. For example, it reads prediction parameters for the following positions: A1, B1, B0, A0, B2.
A1: (xCb-1, yCb+cbHeight-1)
B1: (xCb+cbWidth-1, yCb-1)
B0: (xCb+cbWidth, yCb-1)
A0: (xCb-1, yCb+cbHeight)
B2: (xCb-1, yCb-1)
対象ブロックの左上座標を(xCb, yCb)、幅cbWidth、高さcbHeightとする。
A1: (xCb-1, yCb+cbHeight-1)
B1: (xCb+cbWidth-1, yCb-1)
B0: (xCb+cbWidth, yCb-1)
A0: (xCb-1, yCb+cbHeight)
B2: (xCb-1, yCb-1)
The upper left coordinates of the target block are (xCb, yCb), the width is cbWidth, and the height is cbHeight.
時間マージ導出処理として、マージ候補導出部30361は、対象ブロックの右下CBR、あるいは、中央の座標を含む参照画像中のブロックCの予測パラメータを、予測パラメータメモリ307から読み出してマージ候補Colとし、マージ候補リストmergeCandList[]に格納す
る。
As a temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameters of the lower right CBR of the target block or the block C in the reference image including the center coordinates from the prediction parameter memory 307, sets it as a merge candidate Col, and stores it in the merge candidate list mergeCandList[ ].
mergeCandList[]に格納する順番は、例えば、空間マージ候補(B1,A1,B0,A0,B2)、時間マージ候補Colである。なお、利用可能でない(ブロックがイントラ予測等)参照ブロックはマージ候補リストに格納しない。
i = 0
if(availableFlagB1)
mergeCandList[i++] = B1
if(availableFlagA1)
mergeCandList[i++] = A1
if(availableFlagB0)
mergeCandList[i++] = B0
if(availableFlagA0)
mergeCandList[i++] = A0
if(availableFlagB2)
mergeCandList[i++] = B2
if(availableFlagCol)
mergeCandList[i++] = Col
さらに、ヒストリマージ候補HmvpCand、平均候補avgCand、ゼロマージ候補zeroCandmをmergeCandList[]に追加して利用してもよい。
The order in which the merge candidates are stored in mergeCandList[] is, for example, spatial merge candidates (B1, A1, B0, A0, B2) and then temporal merge candidates Col. Note that reference blocks that are unavailable (for example, blocks that are intra-predicted) are not stored in the merge candidate list.
i = 0
if(availableFlagB1)
mergeCandList[i++] = B1
if(availableFlagA1)
mergeCandList[i++] = A1
if(availableFlagB0)
mergeCandList[i++] = B0
if(availableFlagA0)
mergeCandList[i++] = A0
if(availableFlagB2)
mergeCandList[i++] = B2
if(availableFlagCol)
mergeCandList[i++] = Col
Furthermore, the history merge candidate HmvpCand, the average candidate avgCand, and the zero merge candidate zeroCandm may be added to mergeCandList[] and used.
マージ候補選択部30362は、マージ候補リストに含まれるマージ候補のうち、merge_idxが示すマージ候補Nを以下の式で選択する。 The merge candidate selection unit 30362 selects merge candidate N indicated by 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などをとる。ラベルNで示されるマージ候補の動き情報は(mvLXN[0], mvLXN[1])、predFlagLXN、refIdxLXNで示される。
N = mergeCandList[merge_idx]
Here, N is a label indicating a merge candidate, and can be A1, B1, B0, A0, B2, Col, etc. The motion information of the merge candidate indicated by label N is indicated by (mvLXN[0], mvLXN[1]), predFlagLXN, and refIdxLXN.
選択された(mvLXN[0], mvLXN[0])、predFlagLXN、refIdxLXNを対象ブロックのインター予測パラメータとして選択する。マージ候補選択部30362は選択したマージ候補のインター予測パラメータを予測パラメータメモリ307に記憶するとともに、インター予測画像生成部309に出力する。 The selected (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN are selected as the inter prediction parameters for the current block. The merge candidate selection unit 30362 stores the inter prediction parameters of the selected merge candidate in the prediction parameter memory 307 and outputs them to the inter prediction image generation unit 309.
(GPM予測)
GPM予測はGPMモードで利用される予測であり、対象CUを線分で分割する2つの非矩形の予測単位を用いて、予測画像を生成する。図8(a)に示す直線分の例を示す。対象CUをまたがる直線分は、図8(b)に示す角度インデックスangleIdx(角度変数)と、距離インデックスdistanceIdx(距離変数)とによって規定される。angleIdxは、垂直方向の直線と当該直線分とがなす角度φを示す。distanceIdxは、対象CUの中心から当該直線分までの距離ρを示す。angleIdxは、直線分の角度を整数値に割り当てたものであり、例えば、360度を大まかに32等分した場合には、図8(c)に示す値が割り当てられる。なお、この例では、大まかにと記載したように、完全な等分ではなく、正方形の目盛り(座標)を用いて360度を32分割したものを用いる。なお、360度を64分割し、さらに細かい角度インデックスを送る構成であってもよい。
(GPM forecast)
GPM prediction is used in GPM mode, and generates a predicted image using two non-rectangular prediction units that divide the target CU by a line segment. An example of a line segment is shown in FIG. 8(a). The line segment spanning the target CU is defined by the angle index angleIdx (angle variable) and distance index distanceIdx (distance variable) shown in FIG. 8(b). angleIdx indicates the angle φ between a vertical line and the line segment. distanceIdx indicates the distance ρ from the center of the target CU to the line segment. angleIdx is an integer value assigned to the angle of the line segment. For example, if 360 degrees are roughly divided into 32 equal parts, the value shown in FIG. 8(c) is assigned. Note that in this example, as mentioned "roughly," 360 degrees are not divided into perfect equal parts, but are divided into 32 using a square scale (coordinates). Note that a configuration in which 360 degrees are divided into 64 parts and even finer angle indexes are sent may also be used.
GPM予測の予測画像生成では、非矩形予測単位を含む「矩形の」予測画像(一時的予測画像)を2つ導出し、上記2つの矩形領域を、予測単位の形状に応じた重み付けを行うことで導出してもよい。動き補償部3091が対象CUの一時的予測画像を2つ導出し、GPM合成部30952が、上記2つの一時的予測画像の各画素に、画素の位置に応じた重み付け処理を
施すことで予測画像を導出する。この処理をGPM合成処理と呼ぶ。予測以外の処理(例えば変換(逆変換)及び量子化(逆量子化))は対象CU全体に適用される。
In generating a predicted image for GPM prediction, two "rectangular" predicted images (temporary predicted images) including a non-rectangular prediction unit may be derived, and the two rectangular regions may be derived by weighting according to the shape of the prediction unit. The motion compensation unit 3091 derives two temporary predicted images for the target CU, and the GPM synthesis unit 30952 derives a predicted image by applying weighting processing to each pixel of the two temporary predicted images according to the pixel's position. This processing is called GPM synthesis processing. Processing other than prediction (e.g., transformation (inverse transformation) and quantization (inverse quantization)) is applied to the entire target CU.
GPM予測部30377は、2つの非矩形領域の予測パラメータを導出し、インター予測画像生成部309に供給する。GPM予測では処理の簡略化のために、双予測を用いない構成でもよい。この場合、非矩形領域に対し単方向予測のインター予測パラメータを導出する。 The GPM prediction unit 30377 derives prediction parameters for two non-rectangular regions and supplies them to the inter-prediction image generation unit 309. To simplify the processing, GPM prediction may be configured not to use bi-prediction. In this case, unidirectional inter-prediction parameters are derived for the non-rectangular regions.
(GPM予測におけるシンタックス要素の復号)
図7はmerge_data()で通知されるシンタックス構成を示す図である。パラメータ復号部302は、符号化データ中のシンタックス要素を復号し、GPM予測部30377(インター予測パラメータ導出部303)は、GPM予測のパラメータを導出する。
(Decoding syntax elements in GPM prediction)
7 is a diagram showing the syntax configuration notified by merge_data(). The parameter decoding unit 302 decodes syntax elements in the encoded data, and the GPM prediction unit 30377 (inter-prediction parameter derivation unit 303) derives parameters for GPM prediction.
general_merge_flagは、対象ブロックがスキップモードでない場合に通知される、マージモードを利用するか否かを示すフラグである。スキップモードの場合、インター予測パラメータ導出部303は、general_merge_flag=1に設定する。 general_merge_flag is a flag that indicates whether merge mode is used and is notified when the current block is not in skip mode. If it is in skip mode, the inter prediction parameter derivation unit 303 sets general_merge_flag=1.
ciip_flagが0である場合に、パラメータ復号部302(CU復号部3022)は、GPM予測のシンタックス要素merge_gpm_partition_idx、merge_gpm_idx0、およびmerge_gpm_idx1を復号する。あるいは、merge_gpm_partition_idxとmerge_gpm_idx0を復号し、さらにMaxNumGpmMergeCand>2の場合にmerge_gpm_idx1を復号してもよい。merge_gpm_partition_idx(mergeGpmPartitionIdx)は、GPM予測モードの分割パターン(モード番号)を示すインデックス(パーティションインデックス)である。パーティションインデックスは、対象ブロックを2つの領域に分割にするための、対象ブロックをまたがる直線分を特定するangleIdxおよびdistanceIdxの組み合わせを示す。GPM予測の予測画像生成に用いる動き情報は、マージ候補を用いる。merge_gpm_idx0およびmerge_gpm_idx1はそれぞれ、2つの領域の動き情報を示すマージ候補のインデックスである。パーティションインデックスの選択肢の数(分割パターン数、GPMモード数)はNumGPMFullであり、merge_gpm_partition_idxは0~NumGPMFull-1(=63)のうちのいずれかの整数値をとる。以下、GPM予測の予測画像を導出するための形状を示すパラメータをGPMパラメータと呼ぶ。GPMパラメータは、merge_gpm_partition_idx(mergeGpmPartitionIdx)であってもよいし、angleIdxとdistanceIdxの組であってもよい。 When ciip_flag is 0, the parameter decoding unit 302 (CU decoding unit 3022) decodes the GPM prediction syntax elements merge_gpm_partition_idx, merge_gpm_idx0, and merge_gpm_idx1. Alternatively, merge_gpm_partition_idx and merge_gpm_idx0 may be decoded, and merge_gpm_idx1 may also be decoded if MaxNumGpmMergeCand>2. merge_gpm_partition_idx (mergeGpmPartitionIdx) is an index (partition index) that indicates the division pattern (mode number) of the GPM prediction mode. The partition index indicates the combination of angleIdx and distanceIdx that identify the line segment spanning the target block to divide the target block into two regions. The motion information used to generate a predicted image for GPM prediction uses merge candidates. merge_gpm_idx0 and merge_gpm_idx1 are indices of merge candidates that indicate the motion information of two regions. The number of partition index options (number of partition patterns, number of GPM modes) is NumGPMFull, and merge_gpm_partition_idx takes an integer value between 0 and NumGPMFull-1 (=63). Hereinafter, parameters that indicate the shape used to derive a predicted image for GPM prediction will be referred to as GPM parameters. GPM parameters may be merge_gpm_partition_idx (mergeGpmPartitionIdx) or a pair of angleIdx and distanceIdx.
MergeGpmFlagは、対象ブロックでGPM予測を実施するか否かを示すフラグである。少なくとも、以下の条件(GPM判定条件)が満たされる場合、GPM予測部30377は、MergeGpmFlag=1(GPM予測オン)に設定し、そうでない場合には、GPM予測部30377は、MergeGpmFlag=0に設定する。
(GPM判定条件)
・sps_gpm_enabled_flag=1
・sps_gpm_lfnst_enabled_flag=1
・slice_typeはBスライス
・general_merge_flag=1
・cbWidth>=8かつcbHeight>=8
・cbWidth<8*cbHeightかつcbHeight<8*cbWidth
・regular_merge_flag=0
・merge_subblock_flag=0
・ciip_flag=0
GPM予測部30377は導出したパラメータをGPM合成部30952に出力する。
MergeGpmFlag is a flag that indicates whether or not to perform GPM prediction on the target block. If at least the following conditions (GPM determination conditions) are met, the GPM prediction unit 30377 sets MergeGpmFlag=1 (GPM prediction on); otherwise, the GPM prediction unit 30377 sets MergeGpmFlag=0.
(GPM judgment conditions)
・sps_gpm_enabled_flag=1
・sps_gpm_lfnst_enabled_flag=1
・slice_type is B slice ・general_merge_flag=1
・cbWidth>=8 and cbHeight>=8
・cbWidth<8*cbHeight and cbHeight<8*cbWidth
・regular_merge_flag=0
・merge_subblock_flag=0
・ciip_flag=0
The GPM prediction unit 30377 outputs the derived parameters to the GPM synthesis unit 30952.
(GPM予測における動き情報導出処理)
GPM予測部30377は、以下のように、2つの非矩形領域の動き情報を示すシンタックス要
素merge_gpm_idx0およびmerge_gpm_idx1からマージインデックスmおよびnを導出する。
(Movement information derivation process in GPM prediction)
The GPM prediction unit 30377 derives merge indexes m and n from the syntax elements merge_gpm_idx0 and merge_gpm_idx1 that indicate the motion information of two non-rectangular regions, as follows:
m = merge_gpm_idx0
n = merge_gpm_idx1 + (merge_gpm_idx1 >= m) ? 1 : 0
以下では、マージインデックスmが指すマージ候補がMとして示され、マージインデックスnが指すマージ候補がNとして示される。
m = merge_gpm_idx0
n = merge_gpm_idx1 + (merge_gpm_idx1 >= m) ? 1 : 0
In the following, the merge candidate pointed to by merge index m is denoted as M, and the merge candidate pointed to by merge index n is denoted as N.
マージ予測パラメータ導出部3036は、(マージ予測)に記載された方法でマージ候補MおよびNの動き情報(mvLXM、mvLXN、refIdxLXM、refIdxLXN、predFlagLXM、predFlagLXN、bcwIdx、mergeCandList等)を導出する。GPM予測部30377は、これらの動き情報を用いて、以下のように、merge_gpm_idx0およびmerge_gpm_idx1の動きベクトルmvAおよびmvB、参照インデックスrefIdxAおよびrefIdxB、ならびに、予測リストフラグpredListFlagAおよびpredListFlagBを設定する。 The merge prediction parameter derivation unit 3036 derives motion information (mvLXM, mvLXN, refIdxLXM, refIdxLXN, predFlagLXM, predFlagLXN, bcwIdx, mergeCandList, etc.) for merge candidates M and N using the method described in (Merge Prediction). The GPM prediction unit 30377 uses this motion information to set the motion vectors mvA and mvB, reference indices refIdxA and refIdxB, and prediction list flags predListFlagA and predListFlagB for merge_gpm_idx0 and merge_gpm_idx1 as follows:
mvA[0] = mvLXM[0]
mvA[1] = mvLXM[1]
refIdxA = refIdxLXM
predListFlagA = X
ここで、GPM予測部30377はXにmの下位1bitを設定する(m & 0x01)。なお、predFlagLXMが0である場合、GPM予測部30377はXを(1-X)に設定する。
mvA[0] = mvLXM[0]
mvA[1] = mvLXM[1]
refIdxA = refIdxLXM
predListFlagA = X
Here, the GPM prediction unit 30377 sets the lowest 1 bit of m to X (m & 0x01). Note that if predFlagLXM is 0, the GPM prediction unit 30377 sets X to (1-X).
mvB[0] = mvLXN[0]
mvB[1] = mvLXN[1]
refIdxB = refIdxLXN
predListFlagB = X
ここで、GPM予測部30377はXにnの下位1bitを設定する(n & 0x01)。なお、predFlagLXNが0である場合、GPM予測部30377はXを(1-X)に設定する。
mvB[0] = mvLXN[0]
mvB[1] = mvLXN[1]
refIdxB = refIdxLXN
predListFlagB = X
Here, the GPM prediction unit 30377 sets the lowest 1 bit of n to X (n & 0x01). Note that if predFlagLXN is 0, the GPM prediction unit 30377 sets X to (1-X).
これらの動き情報は、2つの非矩形領域の一時的予測画像を生成するために参照される。 This motion information is referenced to generate temporary prediction images for two non-rectangular regions.
GPM予測部30377は図9に示すテーブルに従って、merge_gpm_partition_idx(mergeGpmPartitionIdx)に対応するangleIdxおよびdistanceIdxを導出する。 The GPM prediction unit 30377 derives angleIdx and distanceIdx corresponding to merge_gpm_partition_idx (mergeGpmPartitionIdx) according to the table shown in Figure 9.
(GPM予測における動きベクトル格納処理)
GPM予測部30377は、後続の処理で参照できるように、以下の手順で、非矩形領域AおよびBの動きベクトル(mvA、mvB)と参照ピクチャの情報(predFlagA, prefFlagB, refIdxLA,
refIdxLB)を4x4サブブロック単位でメモリに格納する。
(Motion vector storage process in GPM prediction)
The GPM prediction unit 30377 calculates the motion vectors (mvA, mvB) of the non-rectangular areas A and B and the reference picture information (predFlagA, prefFlagB, refIdxLA,
refIdxLB) are stored in memory in 4x4 sub-block units.
以下では、第1の例および第2の例に共通する処理を説明する。 Below, we will explain the processing common to the first and second examples.
numSbXおよびnumSbYはそれぞれ、対象ブロックの水平および垂直方向の4x4サブブロックの個数である。GPM予測部30377は、numSbX=cbWidth>>2、numSbY=cbHeight>>2を設定する。GPM予測部30377は、以下のように、変数displacementX、displacementY、isFlipおよびshiftHorを導出する。 numSbX and numSbY are the number of 4x4 sub-blocks in the horizontal and vertical directions of the current block, respectively. The GPM prediction unit 30377 sets numSbX = cbWidth >> 2 and numSbY = cbHeight >> 2. The GPM prediction unit 30377 derives the variables displacementX, displacementY, isFlip, and shiftHor as follows:
displacementX = angleIdx
displacementY = (angleIdx + 8) % 32
isFlip = (angleIdx>=13 && angleIdx<=27) ? 1 : 0
shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 && cbHeight>=cbWidth)) ? 0 : 1
shiftHorが0である場合、GPM予測部30377は、以下のように、offsetXおよびoffsetYを導出する。
displacementX = angleIdx
displacementY = (angleIdx + 8) % 32
isFlip = (angleIdx>=13 &&angleIdx<=27) ? 1 : 0
shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 &&cbHeight>=cbWidth)) ? 0 : 1
If shiftHor is 0, the GPM prediction unit 30377 derives offsetX and offsetY as follows:
offsetX = (-cbWidth) >> 1
offsetY = ((-cbHeight) >> 1) + ((angleIdx<16) ? (distanceIdx * cbHeight) >> 3 : -((distanceIdx * cbHeight) >> 3))
shiftHorが1である場合、GPM予測部30377は、以下のように、offsetXおよびoffsetYを導出する。
offsetX = (-cbWidth) >> 1
offsetY = ((-cbHeight) >> 1) + ((angleIdx<16) ? (distanceIdx * cbHeight) >> 3 : -((distanceIdx * cbHeight) >> 3))
When shiftHor is 1, the GPM prediction unit 30377 derives offsetX and offsetY as follows:
offsetX = ((-cbWidth) >> 1) + ((angleIdx<16) ? (distanceIdx * cbWidth) >> 3 : -((distanceIdx * cbWidth) >> 3))
offsetY = (-cbHeight) >> 1
GPM予測部30377は、xSbIdx = 0..numSbX-1、ySbIdx = 0..numSbY-1である4x4サブブロックの位置(xSbIdx,ySbIdx)毎に、以下の処理を実行する。
offsetX = ((-cbWidth) >> 1) + ((angleIdx<16) ? (distanceIdx * cbWidth) >> 3 : -((distanceIdx * cbWidth) >> 3))
offsetY = (-cbHeight) >> 1
The GPM prediction unit 30377 executes the following process for each position (xSbIdx, ySbIdx) of a 4x4 sub-block where xSbIdx = 0 .. numSbX-1 and ySbIdx = 0 .. numSbY-1.
GPM予測部30377は、図9に示すdisLutを用いて、以下のようにmotionIdxを算出する。 The GPM prediction unit 30377 uses the disLut shown in Figure 9 to calculate motionIdx as follows:
motionIdx = (((4 * xSbIdx + offsetX) << 1) + 5) * disLut[displacementX] + (((4 * ySbIdx + offsetY) << 1) + 5) * disLut[displacementY]
GPM予測部30377は、以下のようにsTypeを導出する。
motionIdx = (((4 * xSbIdx + offsetX) << 1) + 5) * disLut[displacementX] + (((4 * ySbIdx + offsetY) << 1) + 5) * disLut[displacementY]
The GPM prediction unit 30377 derives sType as follows.
sType = (abs(motionIdx)<32) ? 2 : ((motionIdx<=0) ? (1-isFlip) : isFlip)
sTypeが0である場合、GPM予測部30377は、以下を実施する。
sType = (abs(motionIdx)<32) ? 2 : ((motionIdx<=0) ? (1-isFlip) : isFlip)
If sType is 0, the GPM prediction unit 30377 performs the following:
Aの予測リストフラグが0である(predListFlagA==0)場合、GPM予測部30377は単方向予測としてL0にAの動きベクトルを格納する。Aの予測リストフラグが0でない(predListFlagA!=0)場合、GPM予測部30377は単方向予測としてL1にAの動きベクトルを格納する。 If A's prediction list flag is 0 (predListFlagA == 0), the GPM predictor 30377 stores A's motion vector in L0 as unidirectional prediction. If A's prediction list flag is not 0 (predListFlagA != 0), the GPM predictor 30377 stores A's motion vector in L1 as unidirectional prediction.
predFlagL0 = (predListFlagA==0) ? 1 : 0
predFlagL1 = (predListFlagA==0) ? 0 : 1
refIdxL0 = (predListFlagA==0) ? refIdxA : -1
refIdxL1 = (predListFlagA==0) ? -1 : refIdxA
mvL0[0] = (predListFlagA==0) ? mvA[0] : 0
mvL0[1] = (predListFlagA==0) ? mvA[1] : 0
mvL1[0] = (predListFlagA==0) ? 0 : mvA[0]
mvL1[1] = (predListFlagA==0) ? 0 : mvA[1]
そうではなく、sTypeが1である、または、sTypeが2でありかつpredListFlagA+predListFlagBが1でない場合、GPM予測部30377は以下を実施する。ここで、predListFlagA+predListFlagBが1でないことは、AおよびBの参照ピクチャリストが同じであることを表す。
predFlagL0 = (predListFlagA==0) ? 1 : 0
predFlagL1 = (predListFlagA==0) ? 0 : 1
refIdxL0 = (predListFlagA==0) ? refIdxA : -1
refIdxL1 = (predListFlagA==0) ? -1 : refIdxA
mvL0[0] = (predListFlagA==0) ? mvA[0] : 0
mvL0[1] = (predListFlagA==0) ? mvA[1] : 0
mvL1[0] = (predListFlagA==0) ? 0 : mvA[0]
mvL1[1] = (predListFlagA==0) ? 0 : mvA[1]
Otherwise, if sType is 1, or if sType is 2 and predListFlagA+predListFlagB is not 1, then the GPM predictor 30377 performs the following: where predListFlagA+predListFlagB is not 1 indicates that the reference picture lists of A and B are the same.
Bの予測リストフラグが0である(predListFlagB==0)場合、GPM予測部30377は単方向予測としてL0にBの動きベクトルを格納する。Bの予測リストフラグが0でない(predListFlagB!=0)場合、GPM予測部30377は単方向予測としてL1にBの動きベクトルを格納する。 If the prediction list flag for B is 0 (predListFlagB == 0), the GPM predictor 30377 stores the motion vector for B in L0 as unidirectional prediction. If the prediction list flag for B is not 0 (predListFlagB != 0), the GPM predictor 30377 stores the motion vector for B in L1 as unidirectional prediction.
predFlagL0 = (predListFlagB==0) ? 1 : 0
predFlagL1 = (predListFlagB==0) ? 0 : 1
refIdxL0 = (predListFlagB==0) ? refIdxB : -1
refIdxL1 = (predListFlagB==0) ? -1 : refIdxB
mvL0[0] = (predListFlagB==0) ? mvB[0] : 0
mvL0[1] = (predListFlagB==0) ? mvB[1] : 0
mvL1[0] = (predListFlagB==0) ? 0 : mvB[0]
mvL1[1] = (predListFlagB==0) ? 0 : mvB[1]
そうでない場合(sTypeが2でありかつpredListFlagA+predListFlagBが1である場合)、GPM予測部30377は以下を実施する。ここで、predListFlagA+predListFlagBが1であることは、AおよびBの参照ピクチャリストが異なることを表す。
predFlagL0 = (predListFlagB==0) ? 1 : 0
predFlagL1 = (predListFlagB==0) ? 0 : 1
refIdxL0 = (predListFlagB==0) ? refIdxB : -1
refIdxL1 = (predListFlagB==0) ? -1 : refIdxB
mvL0[0] = (predListFlagB==0) ? mvB[0] : 0
mvL0[1] = (predListFlagB==0) ? mvB[1] : 0
mvL1[0] = (predListFlagB==0) ? 0 : mvB[0]
mvL1[1] = (predListFlagB==0) ? 0 : mvB[1]
Otherwise (if sType is 2 and predListFlagA+predListFlagB is 1), the GPM predictor 30377 performs the following: where predListFlagA+predListFlagB being 1 indicates that the reference picture lists of A and B are different.
Aの予測リストフラグが0である(predListFlagA==0)場合、GPM予測部30377は、L0にAの動きベクトルを格納し、L1にBの動きベクトルを格納した双方向予測に設定する。Aの予測リストフラグが0でない(predListFlagA!=0)場合、GPM予測部30377は、L0にBの動きベクトルを格納し、L1にAの動きベクトルを格納した双方向予測に設定する。 If A's prediction list flag is 0 (predListFlagA == 0), the GPM prediction unit 30377 stores A's motion vector in L0 and sets up bidirectional prediction with B's motion vector in L1. If A's prediction list flag is not 0 (predListFlagA != 0), the GPM prediction unit 30377 stores B's motion vector in L0 and sets up bidirectional prediction with A's motion vector in L1.
predFlagL0 = 1
predFlagL1 = 1
refIdxL0 = (predListFlagA==0) ? refIdxA : refIdxB
refIdxL1 = (predListFlagA==0) ? refIdxB : refIdxA
mvL0[0] = (predListFlagA==0) ? mvA[0] : mvB[0]
mvL0[1] = (predListFlagA==0) ? mvA[1] : mvB[1]
mvL1[0] = (predListFlagA==0) ? mvB[0] : mvA[0]
mvL1[1] = (predListFlagA==0) ? mvB[1] : mvA[1]
(GPM予測の処理、GPM合成の流れ)
図10は、GPM予測、GPM合成の処理の流れを示すフローチャートである。以下では、上記のようにMergeGpmFlag=1(GPM予測オン)として設定される条件がすべて満たされるという前提で、処理の流れを説明する。
predFlagL0 = 1
predFlagL1 = 1
refIdxL0 = (predListFlagA==0) ? refIdxA : refIdxB
refIdxL1 = (predListFlagA==0) ? refIdxB : refIdxA
mvL0[0] = (predListFlagA==0) ? mvA[0] : mvB[0]
mvL0[1] = (predListFlagA==0) ? mvA[1] : mvB[1]
mvL1[0] = (predListFlagA==0) ? mvB[0] : mvA[0]
mvL1[1] = (predListFlagA==0) ? mvB[1] : mvA[1]
(GPM prediction processing, GPM synthesis flow)
10 is a flowchart showing the flow of GPM prediction and GPM merging processes. The following describes the flow of the processes on the assumption that all the conditions for setting MergeGpmFlag=1 (GPM prediction on) as described above are met.
S3501において、パラメータ復号部302は、merge_data()等で通知されたGPMに関するシンタックス要素を復号する。 In S3501, the parameter decoding unit 302 decodes syntax elements related to the GPM notified by merge_data(), etc.
S3502において、GPM予測部30377はMergeGpmFlagを導出し、MergeGpmFlagが1であるか否かを判定する。 In S3502, the GPM prediction unit 30377 derives MergeGpmFlag and determines whether MergeGpmFlag is 1.
S3502においてMergeGpmFlagが1でない場合、S3506において、GPM予測部30377はGPM予測をオフにして、処理を終了する。 If MergeGpmFlag is not 1 in S3502, the GPM prediction unit 30377 turns off GPM prediction in S3506 and terminates processing.
S3502において、MergeGpmFlagが1である場合、GPM予測部30377はGPM予測処理を実施し、後述のGPM合成部30952はGPM合成処理を実施する。 In S3502, if MergeGpmFlag is 1, the GPM prediction unit 30377 performs GPM prediction processing, and the GPM synthesis unit 30952 (described below) performs GPM synthesis processing.
S3503において、GPM予測部30377は動き情報等の予測パラメータを導出する。後述の動き補償部3091は動き情報を用いて、2つの一時的予測画像predSamplesLA、predSamplesLBを生成する。 In S3503, the GPM prediction unit 30377 derives prediction parameters such as motion information. The motion compensation unit 3091, described below, uses the motion information to generate two temporary predicted images, predSamplesLA and predSamplesLB.
S3504において、GPM合成部30952は重み係数wValueを導出し、予測画像を生成する。 In S3504, the GPM synthesis unit 30952 derives the weighting coefficient wValue and generates a predicted image.
S3505において、GPM予測部30377は動きベクトルをメモリに格納する。 In S3505, the GPM prediction unit 30377 stores the motion vector in memory.
上記GPM予測では、動きパラメータが異なる2つの予測画像に対して、予測単位の形状を示す重みを用いることで予測画像を生成する。 In the above GPM prediction, a predicted image is generated for two predicted images with different motion parameters by using weights that indicate the shape of the prediction unit.
(GPMモード番号予測の実施例)
以下、対象ブロックに隣接するブロック(例えば、上または左のブロック)のGPMパラメータを用いて、対象ブロックのGPM予測を行う方法を説明する。図19は隣接ブロックのG
PM分割線と、対象ブロックにおけるGPM分割線の候補を示した図である。物体の境界(エッジ)は連続的であるため、隣接ブロックのGPM分割線が対象ブロックと交わる場合、対象ブロックはその交点を通るエッジを持つ可能性が高い。つまり、図19(a)のように対象ブロック上で交わってエッジが連続的になる場合である。その他に、図19(b)のように、ブロックを跨いでエッジが連続的になる場合もある。本実施形態では、周囲のGPM予測の分割線と対象ブロックの交点から、対象ブロックのGPMの分割パターン(GPMモード番号)を予測する構成を説明する。
(Example of GPM mode number prediction)
Hereinafter, a method for GPM prediction of a target block using GPM parameters of a block adjacent to the target block (e.g., a block above or to the left) will be described.
19A and 19B are diagrams showing PM division lines and candidate GPM division lines for a target block. Because object boundaries (edges) are continuous, when a GPM division line of an adjacent block intersects with a target block, the target block is likely to have an edge passing through that intersection. In other words, this is the case when the edges intersect on the target block, making the edges continuous, as shown in FIG. 19A. Alternatively, edges may be continuous across blocks, as shown in FIG. 19B. In this embodiment, a configuration is described in which the GPM division pattern (GPM mode number) of a target block is predicted from the intersection of the division lines of surrounding GPM predictions and the target block.
以下では、隣接ブロックのGPMパラメータから、対象ブロックのGPMモード番号を予測する方法を説明する。これにより、GPMパラメータにかかる符号量を削減しつつGPM予測を行うことができ、符号化効率が向上する効果を奏する。 Below, we explain a method for predicting the GPM mode number of a target block from the GPM parameters of neighboring blocks. This allows GPM prediction to be performed while reducing the amount of coding required for the GPM parameters, thereby improving coding efficiency.
(GPMモード番号予測の実施例におけるシンタックス要素の復号)
(基本シンタックス構成)
図11(a)~11(c)は、隣接ブロックのGPMパラメータを利用して対象ブロックのGPMパラメータを伝送するシンタックス構成を示す例である。この例のようにマージモードかつciip_flagが0のときにGPM予測が用いられるとし、GPMのパラメータを伝送してもよい。図11(a)は、隣接ブロックのGPMパラメータの状態に応じて、merge_gpm_angle_idx(以下小レンジシンタックス)か、merge_gpm_partition_idx(以下フルレンジシンタックス)を伝送するかを切り替えるシンタックス構成の例である。merge_gpm_angle_idxはフルレンジよりも値域が小さい短縮シンタックスである。merge_gpm_partition_idxはフルレンジのシンタックスである。
Decoding Syntax Elements in an Example of GPM Mode Number Prediction
(Basic syntax structure)
Figures 11(a) to 11(c) show examples of syntax configurations that transmit GPM parameters of a target block using GPM parameters of adjacent blocks. As in this example, when merge mode is selected and ciip_flag is 0, GPM prediction is used, and GPM parameters may be transmitted. Figure 11(a) shows an example of a syntax configuration that switches between transmitting merge_gpm_angle_idx (hereinafter referred to as small range syntax) or merge_gpm_partition_idx (hereinafter referred to as full range syntax) depending on the state of the GPM parameters of the adjacent block. merge_gpm_angle_idx is a shortened syntax with a smaller value range than the full range. merge_gpm_partition_idx is a full range syntax.
図に示すように、パラメータ復号部302は、隣接ブロックのGPM情報が利用可能か否かを示す変数mergeGpmAvailableNeighborを導出し、mergeGpmAvailableNeighborが有効(たとえば1)の場合、merge_gpm_angle_idxを復号する。それ以外の場合(mergeGpmAvailableNeighborが無効(たとえば0)の場合)、パラメータ復号部302は、merge_gpm_partition_idxを復号する。ここで、merge_gpm_angle_idxは分割線の角度を示すシンタックス要素である。merge_gpm_angle_idxは、0~9のうちのいずれかの整数値をとるがこれに限定されない。別の例として、0~7の値をとってもよい。merge_gpm_partition_idxは、GPMパラメータ(角度と距離)を示すインデックスである。以降のパラメータ復号部302が復号するシンタックス要素はすでに説明した通りであるため省略する。merge_gpm_angle_idxがとりうる最大値cMax(たとえば9)は、merge_gpm_partition_idxのcMax(例えば63)よりも小さい。merge_gpm_angle_idxのバイナリゼーションは、cMaxを用いたTBバイナリを利用してもよい(後述)。merge_gpm_partition_idxはFBバイナリでもよい(後述)。 As shown in the figure, the parameter decoding unit 302 derives the variable mergeGpmAvailableNeighbor, which indicates whether GPM information of a neighboring block is available, and decodes merge_gpm_angle_idx if mergeGpmAvailableNeighbor is enabled (e.g., 1). Otherwise (if mergeGpmAvailableNeighbor is disabled (e.g., 0)), the parameter decoding unit 302 decodes merge_gpm_partition_idx. Here, merge_gpm_angle_idx is a syntax element that indicates the angle of the partition line. merge_gpm_angle_idx takes an integer value between 0 and 9, but is not limited to this. As another example, it may take a value between 0 and 7. merge_gpm_partition_idx is an index that indicates the GPM parameters (angle and distance). The subsequent syntax elements decoded by the parameter decoding unit 302 have already been explained and will be omitted. The maximum value cMax (e.g., 9) that merge_gpm_angle_idx can take is smaller than the cMax (e.g., 63) of merge_gpm_partition_idx. The binarization of merge_gpm_angle_idx may use TB binary using cMax (see below). The binarization of merge_gpm_partition_idx may also use FB binary (see below).
符号化データから対象ブロックのGPMパラメータを復号するパラメータ復号部と、2つの予測画像と重みから予測画像を導出する予測部と、を備えている画像復号装置であって、パラメータ復号部は、隣接ブロックのGPMパラメータによって復号するパラメータが異なり、予測部は、隣接ブロックのGPMパラメータから、対象ブロックのGPMパラメータを導出する処理を含み、予測部は、上記GPMパラメータに基づいて重みの導出を行い、その重みを用いて、予測画像を導出する。 An image decoding device comprising a parameter decoding unit that decodes GPM parameters of a current block from encoded data, and a prediction unit that derives a predicted image from two predicted images and weights. The parameter decoding unit decodes different parameters depending on the GPM parameters of adjacent blocks, and the prediction unit includes a process for deriving GPM parameters of the current block from the GPM parameters of the adjacent blocks. The prediction unit derives weights based on the GPM parameters and uses the weights to derive a predicted image.
上記のように、周囲のGPMモードのパラメータの状態に応じて、符号化もしくは復号されるGPMパラメータのシンタックス要素を切り替えることにより、符号量削減の効果を奏する。上記基本構成に加えて、以下のような変形例を利用することもできる。 As described above, the amount of code can be reduced by switching the syntax elements of the GPM parameters to be coded or decoded depending on the parameter status of the surrounding GPM modes. In addition to the basic configuration described above, the following variations can also be used.
(変形例1:merge_gpm_mpm_flagを用いる構成)
図11(b)は、追加フラグmerge_gpm_mpm_flagをさらに符号化、復号し、隣接ブロックのGPMパラメータの状態に応じて小レンジシンタックスmerge_gpm_angle_idxか、フルレンジ
シンタックスmerge_gpm_partition_idxを伝送するかを切り替えるシンタックス構成の例である。
(Modification 1: Configuration using merge_gpm_mpm_flag)
FIG. 11(b) shows an example of a syntax configuration in which the additional flag merge_gpm_mpm_flag is further coded and decoded, and whether to transmit the small-range syntax merge_gpm_angle_idx or the full-range syntax merge_gpm_partition_idx is switched depending on the state of the GPM parameters of the adjacent block.
図に示すように、パラメータ復号部302は、変数mergeGpmAvailableNeighborが1の場合には、merge_gpm_mpm_flagを復号する。merge_gpm_mpm_flagは、対象ブロックにGPMモード番号予測を行うか否かを示すシンタックス要素である。merge_gpm_mpm_flagが1の場合、GPMモード番号予測を行うことを示し、0の場合、GPMモード番号予測を行わない。mergeGpmAvailableNeighborが0の場合には、merge_gpm_mpm_flagは復号されず、0に設定される。パラメータ復号部302は、merge_gpm_mpm_flagが1の場合、分割線の角度を示すシンタックス要素であるmerge_gpm_angle_idxを復号する。一方、merge_gpm_mpm_flagが0の場合には、パラメータ復号部302は、mergeGpmAvailableNeighbor==0の場合と同様に、merge_gpm_partition_idxを復号する。 As shown in the figure, the parameter decoding unit 302 decodes merge_gpm_mpm_flag when the variable mergeGpmAvailableNeighbor is 1. merge_gpm_mpm_flag is a syntax element that indicates whether or not GPM mode number prediction is to be performed on the current block. When merge_gpm_mpm_flag is 1, it indicates that GPM mode number prediction is to be performed, and when it is 0, it indicates that GPM mode number prediction is not to be performed. When mergeGpmAvailableNeighbor is 0, merge_gpm_mpm_flag is not decoded and is set to 0. When merge_gpm_mpm_flag is 1, the parameter decoding unit 302 decodes merge_gpm_angle_idx, which is a syntax element that indicates the angle of the partition line. On the other hand, when merge_gpm_mpm_flag is 0, the parameter decoding unit 302 decodes merge_gpm_partition_idx, as in the case when mergeGpmAvailableNeighbor==0.
本構成では、周囲のGPMモードのパラメータの状態に応じて符号化、復号するシンタックス要素を切り替えながら、さらに追加フラグmerge_gpm_mpm_flagを用いて、取りうるパターンを制限されたGPMモードと、多様なパターンを取りうるGPMモードを切り替えることができる。符号量削減と多様な予測の両方の効果を奏する。 This configuration switches the syntax elements to be coded and decoded depending on the parameter state of the surrounding GPM modes, and also uses the additional flag merge_gpm_mpm_flag to switch between a GPM mode with limited possible patterns and a GPM mode with a wide range of possible patterns. This achieves both code size reduction and diverse prediction.
(変形例2:merge_gpm_mpm_flagを用いる構成2)
変形例2では、GPMモード番号の予測値のリスト(candGPMList)を導出して利用する例を説明する。図11(c)は、隣接ブロックのGPMパラメータの状態に応じて小レンジシンタックスmerge_gpm_mpm_flagか、フルレンジシンタックスmerge_gpm_partition_idxを伝送するかを切り替えるシンタックス構成の例である。
(Modification 2: Configuration 2 using merge_gpm_mpm_flag)
In Modification 2, an example will be described in which a list of predicted values of GPM mode numbers (candGPMList) is derived and used. Fig. 11(c) shows an example of a syntax configuration that switches between transmitting the small-range syntax merge_gpm_mpm_flag or the full-range syntax merge_gpm_partition_idx depending on the state of the GPM parameters of adjacent blocks.
図に示すように、パラメータ復号部302は、変数mergeGpmAvailableNeighborが1の場合には、merge_gpm_mpm_flagを復号する。パラメータ復号部302は、merge_gpm_mpm_flagが1の場合、mpm_merge_gpm_partition_idxを復号する。mpm_merge_gpm_partition_idxは、使用される可能性が高いGPMモード番号が複数保持されているリスト(candGPMList)の内、どの候補を用いるかを示すシンタックス要素である。一方、merge_gpm_mpm_flagが0の場合、パラメータ復号部302は、remainder_merge_gpm_partition_idxを復号する。remainder_merge_gpm_partition_idxは、candGPMListに入っているモード番号以外のモード番号の中からどのモード番号を用いるかを示すシンタックス要素である。mpm_merge_gpm_partition_idxとremainder_merge_gpm_partition_idxを用いた分割モードの導出方法については(candGPMListを用いたGPMモード番号予測)で述べる。 As shown in the figure, the parameter decoding unit 302 decodes merge_gpm_mpm_flag when the variable mergeGpmAvailableNeighbor is 1. When merge_gpm_mpm_flag is 1, the parameter decoding unit 302 decodes mpm_merge_gpm_partition_idx. mpm_merge_gpm_partition_idx is a syntax element that indicates which candidate to use from a list (candGPMList) that holds multiple GPM mode numbers that are likely to be used. On the other hand, when merge_gpm_mpm_flag is 0, the parameter decoding unit 302 decodes remainder_merge_gpm_partition_idx. remainder_merge_gpm_partition_idx is a syntax element that indicates which mode number to use from among the mode numbers other than those included in candGPMList. The method for deriving the partition mode using mpm_merge_gpm_partition_idx and remainder_merge_gpm_partition_idx is described in (GPM mode number prediction using candGPMList).
パラメータ復号部302は、mergeGpmAvailableNeighborが0の場合には、直接merge_gpm_partition_idxを復号する。 If mergeGpmAvailableNeighbor is 0, the parameter decoding unit 302 directly decodes merge_gpm_partition_idx.
以下の実施例では、対象ブロックのGPMモード番号を変数mergeGpmPartitionIdxとして導出し、mergeGpmPartitionIdxを用いてangleIdxおよびdistanceIdxを導出する。パラメータ復号部302はmerge_gpm_partition_idxを復号する場合、mergeGpmPartitionIdxに設定してもよい。 In the following embodiment, the GPM mode number of the target block is derived as the variable mergeGpmPartitionIdx, and angleIdx and distanceIdx are derived using mergeGpmPartitionIdx. When decoding merge_gpm_partition_idx, the parameter decoding unit 302 may set it to mergeGpmPartitionIdx.
mergeGpmPartitionIdx = merge_gpm_partition_idx
逆にパラメータ復号部302は、merge_gpm_partition_idxを復号しない場合、mergeGpmPartitionIdxを導出する(後述)。
mergeGpmPartitionIdx = merge_gpm_partition_idx
Conversely, when the parameter decoding unit 302 does not decode merge_gpm_partition_idx, it derives mergeGpmPartitionIdx (described later).
パラメータ復号部302(CU復号部3022)は、merge_gpm_angle_idx、remainder_merge_gpm_partition_idxなどのシンタックス要素を、例えば、トランケートバイナリ(TB)を用いて、シンタックス要素のバイナリゼーション(2進数表現)を行ってもよい(TBバイナリ
)。TBはシンタックス要素の取りうる値の上限cMaxが決まっているバイナリゼーションの方法である。
The parameter decoding unit 302 (CU decoding unit 3022) may binarize (represent in binary) syntax elements such as merge_gpm_angle_idx and remainder_merge_gpm_partition_idx using, for example, truncate binary (TB) (TB binary). TB is a binarization method in which the upper limit cMax of the value that a syntax element can take is determined.
(TBバイナリの例)
TBバイナリは以下のように導出してもよい。
(TB binary example)
The TB binary may be derived as follows:
n = cMax + 1
k = Floor(Log2(n))
u = (1 << (k + 1)) - n
パラメータ復号部302は、シンタックス要素の値synVal(ここではmerge_gpm_partition_idx)がu未満の場合、cMax = (1<<k)-1を用いたFixedLengthバイナリ(以下FLバイナリ)でTBバイナリを導出する。それ以外(synValがu以上)の場合、cMax = (1<<(k+1))-1と設定する。
n = cMax + 1
k = Floor(Log2(n))
u = (1 << (k + 1)) - n
If the value of the syntax element synVal (here, merge_gpm_partition_idx) is less than u, the parameter decoding unit 302 derives the TB binary using a Fixed Length Binary (hereinafter referred to as FL Binary) using cMax = (1<<k)-1. Otherwise (if synVal is greater than or equal to u), cMax = (1<<(k+1))-1 is set.
なお、パラメータ復号部302はFLバイナリの導出にあたり、シンタックス要素のBIN長fixedLengthを導出し、fixedLengthビットでsynValを2進数表現することにより導出してもよい。 When deriving the FL binary, the parameter decoding unit 302 may derive the BIN length fixedLength of the syntax element and represent synVal in binary using fixedLength bits.
fixedLength = Ceil(Log2(cMax + 1))
また、パラメータ復号部302は、cMaxが決まっており、ライスパラメータを0と設定するトランケートライス(TR)を用いて、mpm_merge_gpm_partition_idxのバイナリゼーションを行ってもよい(TRバイナリ)。例えば、mpm_merge_gpm_partition_idxが0~5の値をとり、6個の候補から1つを選択する場合、mpm_merge_gpm_partition_idxの値は、最大5bit(バイナリ値:0, 10, 110, 1110, 11110, 11111)の符号化ビット列として符号化される。
fixedLength = Ceil(Log2(cMax + 1))
Furthermore, the parameter decoding unit 302 may perform binarization of mpm_merge_gpm_partition_idx (TR binary) using Truncated Rice (TR), in which cMax is determined and the Rice parameter is set to 0. For example, if mpm_merge_gpm_partition_idx takes a value from 0 to 5 and one is selected from six candidates, the value of mpm_merge_gpm_partition_idx is coded as a coded bit string of up to 5 bits (binary values: 0, 10, 110, 1110, 11110, 11111).
(mergeGpmAvailableNeighborの導出例)
上記のmergeGpmAvailableNeighborは、隣接ブロックのGPMパラメータから導出される変数であり、隣接ブロックのGPM情報を用いることが可能か否かを示す。
(Example of derivation of mergeGpmAvailableNeighbor)
The above mergeGpmAvailableNeighbor is a variable derived from the GPM parameters of the neighboring block, and indicates whether or not it is possible to use the GPM information of the neighboring block.
パラメータ復号部302は、上側隣接ブロックのGPMモード番号GpmModeAと、左側隣接ブロックのGPMモード番号GpmModeLと所定のテーブルを用いて、mergeGpmAvailableNeighborを導出してもよい。mergeGpmAvailableNeighborは、隣接ブロックにおけるGPMの分割線が対象ブロックと交点を持つかどうかであってもよい。 The parameter decoding unit 302 may derive mergeGpmAvailableNeighbor using the GPM mode number GpmModeA of the upper adjacent block, the GPM mode number GpmModeL of the left adjacent block, and a predetermined table. mergeGpmAvailableNeighbor may also be determined by whether the GPM dividing line in the adjacent block intersects with the target block.
例えば、パラメータ復号部302は、図12のcrstblNeighborForAbove及び図13のcrstblNeighborForLeftのテーブルを用いてmergeGpmAvailableNeighborを導出する。crstblNeighborForAboveは、上側隣接ブロックにおいて、ブロックサイズとGPMモード番号から、分割線と対象ブロックとの交点のx座標を導出するテーブルである。またcrstblNeighborForLeftは左側隣接ブロックにおいて、ブロックサイズとGPMモード番号から交点のy座標を導出するテーブルである。 For example, the parameter decoding unit 302 derives mergeGpmAvailableNeighbor using the crstblNeighborForAbove table in Figure 12 and the crstblNeighborForLeft table in Figure 13. crstblNeighborForAbove is a table that derives the x-coordinate of the intersection between the dividing line and the target block for the upper adjacent block from the block size and GPM mode number. Also, crstblNeighborForLeft is a table that derives the y-coordinate of the intersection for the left adjacent block from the block size and GPM mode number.
以下の処理によって、上側隣接ブロックNAを利用することが可能か否かを判定してもよい。NAの左上座標を(xNA, yNA)、NAの幅をwidthA、高さをheightA、GPMモード番号をGpmModeAと表す。このとき、パラメータ復号部302は、幅のインデックスwIdxAと高さのインデックスhIdxAを以下のように導出する。 The following process may be used to determine whether the upper adjacent block NA can be used. The top left coordinates of NA are represented as (xNA, yNA), the width of NA as widthA, the height as heightA, and the GPM mode number as GpmModeA. In this case, the parameter decoding unit 302 derives the width index wIdxA and the height index hIdxA as follows:
wIdxA = log2(widthA) - 2
hIdxA = log2(heightA) - 2
なお、wIdxAとhIdxAは、対象ブロックのcbWidth、cbHeightとの差分であってもよい。
wIdxA = log2(widthA) - 2
hIdxA = log2(heightA) - 2
Note that wIdxA and hIdxA may be the difference between the cbWidth and cbHeight of the target block.
wIdxA = log2(widthA) - log2(cbWidth)
hIdxA = log2(heightA) - log2(cbHeight)
相対サイズが0未満となることを防ぐため、以下のようにしてもよい。
wIdxA = log2(widthA) - log2(cbWidth)
hIdxA = log2(heightA) - log2(cbHeight)
To prevent the relative size from being less than 0, you can do the following:
wIdxA = log2(widthA) - log2(cbWidth) + Log2GPMBlkSize
hIdxA = log2(heightA) - log2(cbHeight) + Log2GPMBlkSize
さらに0以上所定の最大値以下にクリップしてもよい。
wIdxA = log2(widthA) - log2(cbWidth) + Log2GPMBlkSize
hIdxA = log2(heightA) - log2(cbHeight) + Log2GPMBlkSize
Furthermore, it may be clipped to a value between 0 and a predetermined maximum value.
ここで、Log2GPMBlkSizeは所定の定数(4,5,6,7,8など)である。例えばGPMに用いるブロックの最大サイズが128の場合には、Log2BlkSize =log2(128)=7でもよい。また、差分の方向は逆でもよい。 Here, Log2GPMBlkSize is a predetermined constant (4, 5, 6, 7, 8, etc.). For example, if the maximum block size used in GPM is 128, then Log2BlkSize = log2(128) = 7. The direction of the difference may also be reversed.
wIdxA = log2(cbWidth) - log2(widthA) + Log2GPMBlkSize
hIdxA = log2(cbHeight) - log2(heightA) + Log2GPMBlkSize
パラメータ復号部302は、crstblNeighborForAbove[hIdxA][wIdxA][GpmModeA]によって、交点のx座標(xTmp)を導出する。このとき、NAの左上座標を(xNA, yNA)とすると、交点の座標は(xNA+xTmp, yNA+heightA)である。xTmpはNAの左端からの距離である。NAの左上座標(xNA, yNA)を基準(0,0)とすると、交点の座標は(xTmp, heightA)と書いてもよい。また、対象ブロックの左上座標を(xCb, yCb)とすると、交点の座標は(xNA-xCb+xTmp, yCb)と導出することができる。左上座標(xCb, yCb)を基準(0,0)とすると、交点の座標は(xNA+xTmp, 0)と書いてもよい。以上の説明から、左上座標を(xCb, yCb)を基準(0,0)として、この交点のx座標をx0と表したとき、上側隣接ブロックのGPM情報を用いることが可能か否かを以下の(条件1)を用いて導出してもよい。
wIdxA = log2(cbWidth) - log2(widthA) + Log2GPMBlkSize
hIdxA = log2(cbHeight) - log2(heightA) + Log2GPMBlkSize
The parameter decoding unit 302 derives the x-coordinate (xTmp) of the intersection point using crstblNeighborForAbove[hIdxA][wIdxA][GpmModeA]. In this case, if the top-left coordinate of NA is (xNA, yNA), the coordinate of the intersection point is (xNA+xTmp, yNA+heightA). xTmp is the distance from the left end of NA. If the top-left coordinate of NA (xNA, yNA) is taken as the reference (0,0), the coordinate of the intersection point may be written as (xTmp, heightA). Furthermore, if the top-left coordinate of the target block is (xCb, yCb), the coordinate of the intersection point can be derived as (xNA-xCb+xTmp, yCb). If the top-left coordinate (xCb, yCb) is taken as the reference (0,0), the coordinate of the intersection point may be written as (xNA+xTmp, 0). From the above explanation, when the upper left coordinate (xCb, yCb) is taken as the reference (0,0) and the x coordinate of this intersection is expressed as x0, whether or not it is possible to use the GPM information of the upper adjacent block may be derived using the following (Condition 1).
(条件1)上側隣接ブロックが利用可能、かつ、x0が0以上、かつ、x0が対象ブロックの幅以下である。
つまり、
mergeGpmAvailableAbove = availableAbove && x0 >= 0 && x0 <= cbWidth
availableAboveは上側ブロックが利用可能か否かを示すフラグで、利用可能な場合は1(真)、利用可能でない場合は0(偽)である。
(Condition 1) The upper adjacent block is available, and x0 is equal to or greater than 0 and equal to or less than the width of the target block.
In other words,
mergeGpmAvailableAbove = availableAbove && x0 >= 0 && x0 <= cbWidth
availableAbove is a flag indicating whether the upper block is available or not; if it is available, it is 1 (true); if it is not available, it is 0 (false).
なお、パラメータ復号部302は、対象ブロックと上側隣接ブロックの相対サイズ、あるいは上側隣接ブロックのサイズhIdxA, wIdxAとGpmModeAとテーブルgpmNeighborForAboveから直接mergeGpmAvailableAboveを導出してもよい。
mergeGpmAvailableAbove = gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA]
以下のようにテーブルを導出してもよい。
The parameter decoding unit 302 may derive mergeGpmAvailableAbove directly from the relative sizes of the current block and the upper adjacent block, or the sizes hIdxA and wIdxA of the upper adjacent block, GpmModeA, and the table gpmNeighborForAbove.
mergeGpmAvailableAbove = gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA]
The table may be derived as follows:
gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA] = crstblNeighborForAbove[hIdx][wIdx][GpmModeA] >= 0 && crstblNeighborForAbove[hIdxA][wIdxA][GpmModeA] <= TH
ここで、THは所定の値である。あるいは、以下のようにテーブルを導出してもよい。
gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA] = crstblNeighborForAbove[hIdx][wIdx][GpmModeA] >= 0 && crstblNeighborForAbove[hIdxA][wIdxA][GpmModeA] <= TH
where TH is a predetermined value. Alternatively, a table may be derived as follows:
gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA] = crstblNeighborForAbove[hIdxA][wIdxA][GpmModeA] + 1
左側隣接ブロックNLも同様に、利用することが可能か否かを判定してもよい。NLの左上座標を(xNL, yNL)、NLの幅をwidthL、高さをheightL、GPMモード番号をGpmModeLと表す。このとき、パラメータ復号部302は、幅のインデックスwIdxと高さのインデックスhIdxLを以下のように導出する。
gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA] = crstblNeighborForAbove[hIdxA][wIdxA][GpmModeA] + 1
Similarly, it may be determined whether the left adjacent block NL can be used. The upper left coordinates of NL are represented as (xNL, yNL), the width of NL is represented as widthL, the height is represented as heightL, and the GPM mode number is represented as GpmModeL. In this case, the parameter decoding unit 302 derives the width index wIdx and the height index hIdxL as follows:
wIdxL = log2(widthL) - 2
hIdxL = log2(heightL) - 2
なお、wIdxとhIdxは、対象ブロックのcbWidth、cbHeightとの差分であってもよい。
wIdxL = log2(widthL) - 2
hIdxL = log2(heightL) - 2
Note that wIdx and hIdx may be the difference between the cbWidth and cbHeight of the target block.
wIdxL = log2(widthL) - log2(cbWidth)
hIdxL = log2(heightL) - log2(cbHeight)
相対サイズが0未満となることを防ぐため、以下のようにしてもよい。上述のクリップをしてもよい。
wIdxL = log2(widthL) - log2(cbWidth)
hIdxL = log2(heightL) - log2(cbHeight)
To prevent the relative size from becoming less than 0, you can do the following: You can also clip as described above.
wIdxL = log2(widthL) - log2(cbWidth) + Log2GPMBlkSize
hIdxL = log2(heightL) - log2(cbHeight) + Log2GPMBlkSize
パラメータ復号部302は、crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL]によって、交点のy座標(yTmp)を導出する。このとき、NLの左上座標を(xNL, yNL)とすると、交点の座標は(xNL+widthL, yNL+yTmp)である。yTmpはNLの上端からの距離である。NLの左上座標(xNA, yNA)を基準(0,0)とすると、交点の座標は(widthL,yTmp)と書いてもよい。また、対象ブロックの左上座標を(xCb, yCb)とすると、交点の座標は(xCb, yNL-yCb+yTmp)で導出することができる。左上座標(xCb, yCb)を基準(0,0)とすると、交点の座標は(0, yNL+yTmp)と書いてもよい。以上の説明から、左上座標を(xCb, yCb)を基準(0,0)として、この交点のy座標をy0と表したとき、左側隣接ブロックのGPM情報を用いることが可能か否かを以下の(条件2)で導出してもよい。
wIdxL = log2(widthL) - log2(cbWidth) + Log2GPMBlkSize
hIdxL = log2(heightL) - log2(cbHeight) + Log2GPMBlkSize
The parameter decoding unit 302 derives the y-coordinate (yTmp) of the intersection point using crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL]. In this case, if the top left coordinate of NL is (xNL, yNL), the coordinate of the intersection point is (xNL+widthL, yNL+yTmp). yTmp is the distance from the top end of NL. If the top left coordinate of NL (xNA, yNA) is taken as the reference (0,0), the coordinate of the intersection point may be written as (widthL, yTmp). Furthermore, if the top left coordinate of the target block is (xCb, yCb), the coordinate of the intersection point can be derived as (xCb, yNL-yCb+yTmp). If the top left coordinate (xCb, yCb) is taken as the reference (0,0), the coordinate of the intersection point may be written as (0, yNL+yTmp). From the above explanation, when the upper left coordinate (xCb, yCb) is taken as the reference (0,0) and the y coordinate of this intersection is expressed as y0, whether or not it is possible to use the GPM information of the left adjacent block may be derived from the following (Condition 2).
(条件2)左側隣接ブロックが利用可能、かつ、y0が0以上、かつ、y0が対象ブロックの高さ以下である。 (Condition 2) The adjacent block on the left is available, y0 is greater than or equal to 0, and y0 is less than or equal to the height of the target block.
mergeGpmAvailableLeft = availableLeft && y0 >= 0 && y0 <= cbHeight
availableLeftは左側ブロックが利用可能か否かを示すフラグで、利用可能な場合は1(真)、利用可能でない場合は0(偽)である。
mergeGpmAvailableLeft = availableLeft && y0 >= 0 && y0 <= cbHeight
availableLeft is a flag indicating whether the left block is available or not; if it is available, it is 1 (true); if it is not available, it is 0 (false).
なお、パラメータ復号部302は、対象ブロックと左側隣接ブロックの相対サイズ、あるいは左側隣接ブロックのサイズhIdxL, wIdxLとGpmModeLとテーブルgpmNeighborForLeftから直接mergeGpmAvailableLeftを導出してもよい。
mergeGpmAvailableLeft = gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL]
ここで以下のようにテーブルを導出してもよい。
The parameter decoding unit 302 may derive mergeGpmAvailableLeft directly from the relative sizes of the current block and the left adjacent block, or the sizes hIdxL, wIdxL and GpmModeL of the left adjacent block, and the table gpmNeighborForLeft.
mergeGpmAvailableLeft = gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL]
Here, the table may be derived as follows:
gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL] = crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL] >= 0 && crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL] <= TH
ここで、THは所定の値である。あるいは、以下のようにテーブルを導出してもよい。
gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL] = crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL] >= 0 && crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL] <= TH
where TH is a predetermined value. Alternatively, a table may be derived as follows:
gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL] = crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL] + 1
パラメータ復号部302は、(条件1)または(条件2)が成立する場合に、mergeGpmAvailableNeighborを1にセットしてもよい。式で表すと以下のようになる。
gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL] = crstblNeighborForLeft[hIdxL][wIdxL][GpmModeL] + 1
If (Condition 1) or (Condition 2) is met, the parameter decoding unit 302 may set mergeGpmAvailableNeighbor to 1. This can be expressed as the following equation.
mergeGpmAvailableNeighbor = mergeGpmAvailableAbove || mergeGpmAvailableLeft
なお、上記||は+でもよい。
mergeGpmAvailableNeighbor = mergeGpmAvailableAbove || mergeGpmAvailableLeft
Note that the above || can also be +.
以上のように、交点の導出には、隣接ブロックのサイズ、隣接ブロックのGPM予測モード番号、交点の座標位置を対応付けているテーブルを用いてもよい。また、追記したように、交点の座標位置の判定まで含またテーブルを用いてもよい。 As described above, the intersection point may be derived using a table that associates the size of the adjacent block, the GPM prediction mode number of the adjacent block, and the coordinate position of the intersection point. Furthermore, as added, a table that also includes the determination of the coordinate position of the intersection point may be used.
(mergeGpmAvailableNeighborの導出例まとめ)
すでに説明したことをまとめると、パラメータ復号部302は、以下のようにmergeGpmAvailableNeighborを導出してもよい。
(Summary of derivation examples of mergeGpmAvailableNeighbor)
To summarize what has already been described, the parameter decoding unit 302 may derive mergeGpmAvailableNeighbor as follows.
mergeGpmAvailableNeighbor = gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA] || gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL]
(対象ブロックのGPMモード番号予測の処理の流れ)
図17、図18は対象ブロックのGPMモード番号を予測する処理の流れを示すフローチャートである。
mergeGpmAvailableNeighbor = gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA] || gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL]
(Process flow for predicting GPM mode numbers for target blocks)
17 and 18 are flowcharts showing the flow of processing for predicting the GPM mode number of the target block.
S3501において、パラメータ復号部302は、マージデータ等で通知されたGPMに関するシンタックス要素を復号する。 In S3501, the parameter decoding unit 302 decodes syntax elements related to the GPM notified in merge data, etc.
S3502において、GPM予測部30377はMergeGpmFlagを導出し、MergeGpmFlagが1であるか否かを判定する。 In S3502, the GPM prediction unit 30377 derives MergeGpmFlag and determines whether MergeGpmFlag is 1.
S3502においてMergeGpmFlagが1でない場合、S3506において、GPM予測部30377はGPM予測をオフにして、処理を終了する。 If MergeGpmFlag is not 1 in S3502, the GPM prediction unit 30377 turns off GPM prediction in S3506 and terminates processing.
S3502において、MergeGpmFlagが1である場合、S3507において対象ブロックのGPMモード番号予測を行うか否かを判定する。判定する条件として、図11(a)に示すシンタックス要素の場合、図17に示すようにmergeGpmAvailableNeighborを導出し、mergeGpmAvailableNeighborが1であるか否かを判定する。また、図11(b)に示すシンタックス要素の場合、図18に示すようにmerge_gpm_mpm_flagが1であるか否かを判定する。 If MergeGpmFlag is 1 in S3502, it is determined in S3507 whether to perform GPM mode number prediction for the target block. As a condition for this determination, for the syntax element shown in Figure 11(a), mergeGpmAvailableNeighbor is derived as shown in Figure 17, and it is determined whether mergeGpmAvailableNeighbor is 1. For the syntax element shown in Figure 11(b), it is determined whether merge_gpm_mpm_flag is 1 as shown in Figure 18.
S3507において対象ブロックのGPMモード番号予測を行わない場合、S3503へ遷移する。 If GPM mode number prediction for the target block is not performed in S3507, the process transitions to S3503.
S3507において対象ブロックのGPMモード番号予測を行う場合、S3508において対象ブロックのGPMモード予測の処理を行う。 If GPM mode number prediction is performed for the target block in S3507, GPM mode prediction processing for the target block is performed in S3508.
以降の処理は図10と同様であるため説明を省略する。 The subsequent processing is the same as in Figure 10, so explanation will be omitted.
本実施例では、GPM予測部30377は、符号化データから復号したgpm_partition_idxの代わりに、予測したGPMモード番号mergeGpmPartitionIdxを用いて、angleIdxおよびdistanceIdxを導出し、予測形状に対応するウェイト処理から予測画像を生成してもよい。この場合、GPM予測部30377は、図9(c)に示す、mergeGpmPartitionIdxとangleIdx及びdistanceIdxを対応付けるテーブルを用いて、angleIdxおよびdistanceIdxを導出してもよい。 In this embodiment, the GPM prediction unit 30377 may derive angleIdx and distanceIdx using the predicted GPM mode number mergeGpmPartitionIdx instead of gpm_partition_idx decoded from the encoded data, and generate a predicted image from weighting corresponding to the predicted shape. In this case, the GPM prediction unit 30377 may derive angleIdx and distanceIdx using the table shown in Figure 9(c) that associates mergeGpmPartitionIdx with angleIdx and distanceIdx.
以下では、図11(a)や図11(b)のシンタックス構造において復号されるmerge_gpm_angle_idxから、対象ブロックのGPMモード番号を導出する方法を説明する。また、図11(c)のシンタックス構成において復号されるmpm_merge_gpm_partition_idxから対象ブロックのGPMモード番号を導出する方法を説明する。 Below, we explain how to derive the GPM mode number of the target block from merge_gpm_angle_idx decoded in the syntax structure of Figure 11(a) or Figure 11(b). We also explain how to derive the GPM mode number of the target block from mpm_merge_gpm_partition_idx decoded in the syntax structure of Figure 11(c).
(merge_gpm_angle_idxを用いたGPMモード番号予測)
本実施例のGPM予測部30377は、以下の処理によって対象ブロックのGPMモード番号を導出する。
(GPM mode number prediction using merge_gpm_angle_idx)
The GPM prediction unit 30377 of this embodiment derives the GPM mode number of the target block by the following process.
まず、GPM予測部30377は、上記に記載した方法と同様の方法により、交点のmergeGpmAvailableAbove及びmergeGpmAvailableLeftを導出する。 First, the GPM prediction unit 30377 derives mergeGpmAvailableAbove and mergeGpmAvailableLeft for the intersection using a method similar to that described above.
mergeGpmAvailableAboveが1である場合、GPM予測部30377は交点x0を用いて、対象ブロ
ックのGPMモード番号を予測する。mergeGpmAvailableAboveが0で、かつ、mergeGpmAvailableLeftが1である場合、GPM予測部30377は交点y0を用いて、対象ブロックのGPMモード番号を予測する。なお、上記例ではmergeGpmAvailableAboveとmergeGpmAvailableLeftが共に1の場合、上側隣接ブロックを優先しているが、左側隣接ブロックを優先する構成であってもよい。
When mergeGpmAvailableAbove is 1, the GPM prediction unit 30377 predicts the GPM mode number of the target block using intersection x0. When mergeGpmAvailableAbove is 0 and mergeGpmAvailableLeft is 1, the GPM prediction unit 30377 predicts the GPM mode number of the target block using intersection y0. Note that in the above example, when mergeGpmAvailableAbove and mergeGpmAvailableLeft are both 1, priority is given to the upper adjacent block, but priority may also be given to the left adjacent block.
(上側隣接ブロック(交点x0)を利用する場合)
GPM予測部30377はangleIdxを、merge_gpm_angle_idxと図16に示すテーブルを用いて導出する。図16(a)は、merge_gpm_angle_idxが0~9の値をとる場合にangleIdxを導出するためのテーブルである。図16(b)は、merge_gpm_angle_idxが0~7の値をとる場合にangleIdxを導出するためのテーブルである。
(When using the upper adjacent block (intersection x0))
The GPM prediction unit 30377 derives angleIdx using merge_gpm_angle_idx and the table shown in Fig. 16. Fig. 16(a) is a table for deriving angleIdx when merge_gpm_angle_idx takes a value from 0 to 9. Fig. 16(b) is a table for deriving angleIdx when merge_gpm_angle_idx takes a value from 0 to 7.
GPM予測部30377はGPMモード番号として取り得る値(0~NumGPMFull-1(=63))を順番に探索する。まず、GPMモードの内、角度がangleIdxまたはangleIdx+16と一致するモード番号iを抽出する。iが複数ある場合、iで示される、対象ブロックの分割線によって得られる上側隣接ブロックとの交点x1とx0との距離が最小になるiを、対象ブロックのGPMモードとする。ここで、図14のcrstblCurrForAboveは、対象ブロックにおいて、ブロックサイズとGPMモード番号から、分割線と上側隣接ブロックとの交点のx座標を導出するテーブルである。上記の処理の擬似コードを以下に示す。cbWidth、cbHeightは対象ブロックの幅と高さである。また、g_GeoParamsは図9に示すようなテーブルであり、GPMモード番号からangleIdx、distanceIdxを導出するために用いる。MAX_INTは整数の最大値(例えば32bitの符号付き整数であれば1<<31-1)である。
(start)
angleIdxをmerge_gpm_angle_idxと図16のテーブルから導出する
wIdxA = log2(cbWidth) - 2
hIdxA = log2(cbHeight) - 2
minDis = MAX_INT
finalCurrGpmMode = -1
for (i = 0; i < NumGPMFull; i++)
tmpAngleIdx = g_GeoParams[i][0]
if (tmpAngleIdx == angleIdx || tmpAngleIdx == angleIdx + 16)
x1 = crstblCurrForAbove[hIdxA][wIdxA][i]
if (Abs(x0-x1) < minDis)
minDis = Abs(x0-x1)
finalCurrGpmMode = i
mergeGpmPartitionIdx = finalCurrGpmMode
(end)
最終的に、finalCurrGpmModeに格納されている値を対象ブロックのGPMモード番号(mergeGpmPartitionIdx)として設定する。
The GPM prediction unit 30377 sequentially searches through the possible values for the GPM mode number (0 to NumGPMFull-1 (=63)). First, it extracts the mode number i from the GPM modes whose angle matches angleIdx or angleIdx+16. If there are multiple i's, it selects the i's that minimizes the distance between the intersection points x1 and x0 of the target block's partition line with the upper adjacent block. Here, crstblCurrForAbove in Figure 14 is a table that derives the x-coordinate of the intersection point between the partition line and the upper adjacent block for the target block from the block size and GPM mode number. Pseudocode for the above process is shown below. cbWidth and cbHeight are the width and height of the target block. Furthermore, g_GeoParams is a table like the one shown in Figure 9, and is used to derive angleIdx and distanceIdx from the GPM mode number. MAX_INT is the maximum value of an integer (for example, 1<<31-1 for a 32-bit signed integer).
(start)
Derive angleIdx from merge_gpm_angle_idx and the table in Figure 16
wIdxA = log2(cbWidth) - 2
hIdxA = log2(cbHeight) - 2
minDis = MAX_INT
finalCurrGpmMode = -1
for (i = 0; i <NumGPMFull; i++)
tmpAngleIdx = g_GeoParams[i][0]
if (tmpAngleIdx == angleIdx || tmpAngleIdx == angleIdx + 16)
x1 = crstblCurrForAbove[hIdxA][wIdxA][i]
if (Abs(x0-x1) < minDis)
minDis = Abs(x0-x1)
finalCurrGpmMode = i
mergeGpmPartitionIdx = finalCurrGpmMode
(end)
Finally, the value stored in finalCurrGpmMode is set as the GPM mode number (mergeGpmPartitionIdx) of the target block.
(左側隣接ブロック(交点y0)を利用する場合)
上側隣接ブロックと同様の手順で、対象ブロックのGPMモード番号を予測する。
(When using the left adjacent block (intersection y0))
The GPM mode number of the target block is predicted using the same procedure as for the upper adjacent block.
GPM予測部30377はangleIdxをmerge_gpm_angle_idxと図16に示すテーブルを用いて導出する。 The GPM prediction unit 30377 derives angleIdx using merge_gpm_angle_idx and the table shown in Figure 16.
GPM予測部30377はGPMモード番号として取り得る値(0~NumGPMFull-1(=63))を順番に探索する。まず、GPMモードの内、角度がangleIdxまたはangleIdx+16と一致するモード番号iを抽出する。iが複数ある場合、iで示される、対象ブロックの分割線によって得られる左側隣接ブロックとの交点y1とy0との距離が最小になるiを、対象ブロックのGPMモー
ドとする。ここで、図15のcrstblCurrForLeftは、対象ブロックにおいて、ブロックサイズとGPMモード番号から、分割線と左側隣接ブロックとの交点のy座標を導出するテーブルである。上記の処理の擬似コードを以下に示す。
(start)
angleIdxをmerge_gpm_angle_idxと図18のテーブルから導出する
wIdxL = log2(cbWidth) - 2
hIdxL = log2(cbHeight) - 2
minDis = MAX_INT
finalCurrGpmMode = -1
for (i = 0; i < NumGPMFull; i++)
tmpAngleIdx = g_GeoParams[i][0]
if (tmpAngleIdx == angleIdx || tmpAngleIdx == angleIdx + 16)
y1 = crstblCurrForLeft[hIdxL][wIdxL][i]
if (Abs(y0-y1) < minDis)
minDis = Abs(y0-y1)
finalCurrGpmMode = i
mergeGpmPartitionIdx = finalCurrGpmMode
(end)
最終的に、finalCurrGpmModeに格納されている値を対象ブロックのGPMモード番号(mergeGpmPartitionIdx)として設定する。
The GPM prediction unit 30377 sequentially searches through the possible values for the GPM mode number (0 to NumGPMFull-1 (=63)). First, it extracts the mode number i from the GPM modes whose angle matches angleIdx or angleIdx+16. If there are multiple i's, it determines the i that minimizes the distance between the intersection points y1 and y0 of the target block's left-side adjacent block obtained by the target block's division line as the GPM mode of the target block. Here, crstblCurrForLeft in Figure 15 is a table that derives the y-coordinate of the intersection point between the division line and the left-side adjacent block for the target block from the block size and GPM mode number. Pseudocode for the above process is shown below.
(start)
Derive angleIdx from merge_gpm_angle_idx and the table in Figure 18
wIdxL = log2(cbWidth) - 2
hIdxL = log2(cbHeight) - 2
minDis = MAX_INT
finalCurrGpmMode = -1
for (i = 0; i <NumGPMFull; i++)
tmpAngleIdx = g_GeoParams[i][0]
if (tmpAngleIdx == angleIdx || tmpAngleIdx == angleIdx + 16)
y1 = crstblCurrForLeft[hIdxL][wIdxL][i]
if (Abs(y0-y1) < minDis)
minDis = Abs(y0-y1)
finalCurrGpmMode = i
mergeGpmPartitionIdx = finalCurrGpmMode
(end)
Finally, the value stored in finalCurrGpmMode is set as the GPM mode number (mergeGpmPartitionIdx) of the target block.
以上のように、隣接ブロックのGPM分割線と対象ブロックが交点を持つ場合に、交点、復号した分割角度を示すインデックスから導出された分割角度、隣接ブロックのサイズおよびGPM予測モード番号と交点の座標位置を対応付けているテーブル、対象ブロックのサイズおよびGPM予測モード番号と交点の座標位置を対応付けているテーブル、を用いて、対象ブロックのGPM予測モードのパーティションインデックス(モード番号)を導出してもよい。 As described above, when the GPM partition line of an adjacent block and the target block intersect at a point, the partition index (mode number) of the GPM prediction mode of the target block may be derived using the intersection point, the partition angle derived from the index indicating the decoded partition angle, a table correlating the size and GPM prediction mode number of the adjacent block with the coordinate position of the intersection point, and a table correlating the size and GPM prediction mode number of the target block with the coordinate position of the intersection point.
(candGPMListを用いたGPMモード番号予測)
本実施例では、GPM予測部30377は、mpm_merge_gpm_partition_idx、remainder_merge_gpm_partition_idx及びcandGPMListによって対象ブロックのGPMモード番号を導出する。
(GPM mode number prediction using candGPMList)
In this embodiment, the GPM prediction unit 30377 derives the GPM mode number of the target block using mpm_merge_gpm_partition_idx, remainder_merge_gpm_partition_idx, and candGPMList.
まず、GPM予測部30377は、上記に記載した方法と同様の方法により、交点のmergeGpmAvailableAbove及びmergeGpmAvailableLeftを導出する。 First, the GPM prediction unit 30377 derives mergeGpmAvailableAbove and mergeGpmAvailableLeft for the intersection using a method similar to that described above.
mergeGpmAvailableAboveが1である場合、GPM予測部30377は上側隣接ブロックのGPM情報を用いて、candGPMListを構成する。mergeGpmAvailableAboveが0で、かつ、mergeGpmAvailableLeftが1である場合、GPM予測部30377は左側隣接ブロックのGPM情報を用いて、candGPMListを構成する。なお、上記例ではmergeGpmAvailableAboveとmergeGpmAvailableLeftが共に1の場合、上側隣接ブロックを優先しているが、左側隣接ブロックを優先する構成であってもよい。 When mergeGpmAvailableAbove is 1, the GPM prediction unit 30377 constructs candGPMList using the GPM information of the upper adjacent block. When mergeGpmAvailableAbove is 0 and mergeGpmAvailableLeft is 1, the GPM prediction unit 30377 constructs candGPMList using the GPM information of the left adjacent block. Note that in the above example, when mergeGpmAvailableAbove and mergeGpmAvailableLeft are both 1, the upper adjacent block is prioritized, but it may also be configured to prioritize the left adjacent block.
GPM予測部30377は、merge_gpm_mpm_flagが1の場合、candGPMList及び復号したmpm_merge_gpm_partition_idxによって、対象ブロックのGPMモード番号を導出する。 When merge_gpm_mpm_flag is 1, the GPM prediction unit 30377 derives the GPM mode number of the target block using candGPMList and the decoded mpm_merge_gpm_partition_idx.
mergeGpmPartitionIdx = candGPMlist[mpm_merge_gpm_partition_idx]
一方、GPM予測部30377は、merge_gpm_mpm_flagが0の場合、candGPMList及び復号したremainder_merge_gpm_partition_idxによって、対象ブロックのGPMモード番号を導出する。ここで、MaxGPMListは、candGPMListのインデックスの最大値である。つまりGPMのMPM数がNumGPMCandの場合、MaxGPMList=NumGPMCand-1である。このとき、パラメータ復号部302は、以下のステップでmergeGpmPartitionIdxを導出する。
1) リストをソートする。すなわち、j = (i + 1)..MaxGPMList(i = 0..MaxGPMList-1)において、candGPMList[i] > candGPMList[j]の場合、リストのi番目とj番目の値を入れ替える。
mergeGpmPartitionIdx = candGPMlist[mpm_merge_gpm_partition_idx]
On the other hand, when merge_gpm_mpm_flag is 0, the GPM prediction unit 30377 derives the GPM mode number of the current block from candGPMList and the decoded remainder_merge_gpm_partition_idx. Here, MaxGPMList is the maximum index value of candGPMList. In other words, when the number of MPMs in the GPM is NumGPMCand, MaxGPMList=NumGPMCand-1. In this case, the parameter decoding unit 302 derives mergeGpmPartitionIdx in the following steps.
1) Sort the list, i.e., if candGPMList[i] > candGPMList[j] for j = (i + 1)..MaxGPMList(i = 0..MaxGPMList-1), swap the i-th and j-th values in the list.
(candGPMList[i], candGPMList[j]) = Swap(candGPMList[i], candGPMList[j])
2)次のステップでmergeGpmPartitionIdxを導出する。
i. mergeGpmPartitionIdx = remainder_merge_gpm_partition_idx
ii. mergeGpmPartitionIdxの値を1だけインクリメントする。
iii. i = 0..MaxGPMListについて、mergeGpmPartitionIdx >= candGPMList[i]の場合、mergeGpmPartitionIdxの値を1だけインクリメントする。
(candGPMList[i], candGPMList[j]) = Swap(candGPMList[i], candGPMList[j])
2) Derive mergeGpmPartitionIdx in the following steps:
i. mergeGpmPartitionIdx = remainder_merge_gpm_partition_idx
ii. Increment the value of mergeGpmPartitionIdx by 1.
iii. For i = 0..MaxGPMList, if mergeGpmPartitionIdx >= candGPMList[i], increment the value of mergeGpmPartitionIdx by 1.
以上のステップで、対象ブロックのGPMモード番号を導出する。以下ではcandGPMListの構成について説明する。 The above steps derive the GPM mode number for the target block. The structure of candGPMList is explained below.
(candGPMListの構成)
candGPMListを構成するモード番号として、交点を通るGPMモード番号を優先的に選択してもよい。特に交点を通るものの内、隣接ブロックの分割線の角度に近い角度を持つGPMモード番号から優先的に選択してもよい。例えば、以下のステップでcandGPMListを導出してもよい。
(candGPMList configuration)
As the mode numbers that make up candGPMList, GPM mode numbers that pass through the intersection may be preferentially selected. In particular, among those that pass through the intersection, GPM mode numbers that have an angle close to the angle of the dividing line of the adjacent block may be preferentially selected. For example, candGPMList may be derived using the following steps.
1)GPM予測部30377は、交点の座標x0またはy0と、crstblNeighborForAbove、crstblNeighborForLeftを用いて導出した交点の座標x1またはy1の差が特定の値(例えば1)以内のモードを探索し、条件を満たすGPM分割モードを配列tmpCandList[]に格納する。 1) The GPM prediction unit 30377 searches for modes where the difference between the intersection coordinate x0 or y0 and the intersection coordinate x1 or y1 derived using crstblNeighborForAbove and crstblNeighborForLeft is within a specific value (e.g., 1), and stores the GPM division modes that satisfy the conditions in the array tmpCandList[].
2)tmpCandList[]に格納されているGPM分割モードの内、隣接ブロックの分割線の角度angleIdxNと一致するangleIdxを持つモードを探索し、何番目かを記憶する。(j番目とする)
3)以下のように、candGPMListを導出する。
2) Among the GPM division modes stored in tmpCandList[], search for the mode whose angleIdx matches the angle angleIdxN of the division line of the adjacent block, and memorize its number (let's say it's the jth mode).
3) Derive candGPMList as follows:
candGPMList[i++] = tmpCandList[j]
candGPMList[i++] = tmpCandList[j-1]
candGPMList[i++] = tmpCandList[j+1]
candGPMList[i++] = tmpCandList[j-2]
candGPMList[i++] = tmpCandList[j+2]
または、candGPMListを構成するモード番号として、交点を通るか否かに関わらず、隣接ブロックの分割線の角度に近い角度を持つGPMモード番号から優先的に選択してもよい。つまり、以下のように導出してもよい。
candGPMList[i++] = tmpCandList[j]
candGPMList[i++] = tmpCandList[j-1]
candGPMList[i++] = tmpCandList[j+1]
candGPMList[i++] = tmpCandList[j-2]
candGPMList[i++] = tmpCandList[j+2]
Alternatively, the mode numbers constituting candGPMList may be preferentially selected from GPM mode numbers having angles close to the angle of the dividing line of the adjacent block, regardless of whether they pass through an intersection. In other words, they may be derived as follows:
candGPMList[i++] = GpmModeA + 1
candGPMList[i++] = GpmModeA - 1
candGPMList[i++] = GpmModeL + 1
candGPMList[i++] = GpmModeL - 1
また、さらに以下のように所定の範囲に入るように、剰余演算(mod、ここでの記号は%)を利用してもよい。
candGPMList[i++] = GpmModeA + 1
candGPMList[i++] = GpmModeA - 1
candGPMList[i++] = GpmModeL + 1
candGPMList[i++] = GpmModeL - 1
Furthermore, a modulus operation (mod, where the symbol is %) may be used so that the value falls within a predetermined range as follows:
candGPMList[i++] = (GpmModeA + 1) % NumGPMFull
candGPMList[i++] = (GpmModeA - 1) % NumGPMFull
candGPMList[i++] = (GpmModeL + 1) % NumGPMFull
candGPMList[i++] = (GpmModeL - 1) % NumGPMFull
例えば、パーティションインデックスの選択肢の数NumGPMFullが64の場合、以下のように書くことができる。
candGPMList[i++] = (GpmModeA + 1) % NumGPMFull
candGPMList[i++] = (GpmModeA - 1) % NumGPMFull
candGPMList[i++] = (GpmModeL + 1) % NumGPMFull
candGPMList[i++] = (GpmModeL - 1) % NumGPMFull
For example, if the number of partition index choices, NumGPMFull, is 64, it can be written as follows:
candGPMList[i++] = (GpmModeA + 1) % 64
candGPMList[i++] = (GpmModeA - 1) % 64
candGPMList[i++] = (GpmModeL + 1) % 64
candGPMList[i++] = (GpmModeL - 1) % 64
隣接ブロックのGPMが利用可能か否かに応じて処理を変更してもよい。
candGPMList[i++] = (GpmModeA + 1) % 64
candGPMList[i++] = (GpmModeA - 1) % 64
candGPMList[i++] = (GpmModeL + 1) % 64
candGPMList[i++] = (GpmModeL - 1) % 64
The processing may vary depending on whether the GPM of the neighboring block is available.
if (mergeGpmAvailableAbove) {
candGPMList[i++] = (GpmModeA + 1) % NumGPMFull
candGPMList[i++] = (GpmModeA - 1) % NumGPMFull
}
if (mergeGpmAvailableLeft) {
candGPMList[i++] = (GpmModeL + 1) % NumGPMFull
candGPMList[i++] = (GpmModeL - 1) % NumGPMFull
}
(対象ブロックのGPMモード番号予測の別の処理の流れ)
上記では、対象ブロックのGPMモード番号予測の処理はGPM予測部30377で行われる。ここで、対象ブロックのGPMモード番号予測の処理の流れはパラメータ復号部302において行われてもよい。
if (mergeGpmAvailableAbove) {
candGPMList[i++] = (GpmModeA + 1) % NumGPMFull
candGPMList[i++] = (GpmModeA - 1) % NumGPMFull
}
if (mergeGpmAvailableLeft) {
candGPMList[i++] = (GpmModeL + 1) % NumGPMFull
candGPMList[i++] = (GpmModeL - 1) % NumGPMFull
}
(Another process flow for predicting the GPM mode number of the target block)
In the above, the process of predicting the GPM mode number of the current block is performed by the GPM prediction unit 30377. Here, the process flow of predicting the GPM mode number of the current block may be performed by the parameter decoding unit 302.
(交点が対象ブロック上にない場合における実施例)
(mergeGpmAvailableNeighborを導出例)
図19(b)に示すように交点が対象ブロック上にない場合においては、以下のようにmergeGpmAvailableNeighborを導出してもよい。
(Example in which the intersection point is not on the target block)
(Example of deriving mergeGpmAvailableNeighbor)
When the intersection point is not on the target block as shown in FIG. 19(b), mergeGpmAvailableNeighbor may be derived as follows.
パラメータ復号部302は、既に記載済みの方法によって交点を導出してもよい。すなわち、上側隣接ブロックに対しては、crstblNeighborForAboveを用いて交点のx座標x0を導出し、左側隣接ブロックに対してはcrstblNeighborForLeftを用いて交点のy座標y0を導出してもよい。 The parameter decoding unit 302 may derive the intersection point using the method already described. That is, for the upper adjacent block, it may derive the x-coordinate x0 of the intersection point using crstblNeighborForAbove, and for the left adjacent block, it may derive the y-coordinate y0 of the intersection point using crstblNeighborForLeft.
ここで、上側隣接ブロック及び左側隣接ブロックのGPM情報を用いることが可能か否かを以下の(条件3)及び(条件4)で導出してもよい。
(条件3)上側隣接ブロックが利用可能、かつ、x0が0以上、かつ、x0が上側隣接ブロックの幅以下である。
(条件4)左側隣接ブロックが利用可能、かつ、y0が0以上、かつ、y0が左側隣接ブロックの高さ以下である。
つまり、
mergeGpmAvailableAbove = availableAbove && x0 >= 0 && x0 <= widthA
mergeGpmAvailableLeft = availableLeft && y0 >= 0 && y0 <= height
なお、パラメータ復号部302は、対象ブロックと上側隣接ブロックの相対サイズ、あるいは上側隣接ブロックのサイズhIdxA, wIdxAとGpmModeAとテーブルgpmNeighborForAboveから直接mergeGpmAvailableAboveを導出してもよいし、対象ブロックと左側隣接ブロックの相対サイズ、あるいは左側隣接ブロックのサイズhIdxL, wIdxLとGpmModeLとテーブルgpmNeighborForLeftから直接mergeGpmAvailableLeftを導出してもよい。
Here, whether or not it is possible to use the GPM information of the upper adjacent block and the left adjacent block may be derived from the following (Condition 3) and (Condition 4).
(Condition 3) The upper adjacent block is available, and x0 is equal to or greater than 0 and equal to or less than the width of the upper adjacent block.
(Condition 4) The left adjacent block is available, and y0 is equal to or greater than 0, and equal to or less than the height of the left adjacent block.
In other words,
mergeGpmAvailableAbove = availableAbove && x0 >= 0 && x0 <= widthA
mergeGpmAvailableLeft = availableLeft && y0 >= 0 && y0 <= height
Note that the parameter decoding unit 302 may derive mergeGpmAvailableAbove directly from the relative size between the target block and the upper adjacent block, or the size of the upper adjacent block, hIdxA, wIdxA and GpmModeA, and the table gpmNeighborForAbove, or may derive mergeGpmAvailableLeft directly from the relative size between the target block and the left adjacent block, or the size of the left adjacent block, hIdxL, wIdxL and GpmModeL, and the table gpmNeighborForLeft.
mergeGpmAvailableAbove = gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA]
mergeGpmAvailableLeft = gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL]
そして、パラメータ復号部302は、(条件3)または(条件4)が成立する場合に、mer
geGpmAvailableNeighborを1にセットしてもよい。
mergeGpmAvailableAbove = gpmNeighborForAbove[hIdxA][wIdxA][GpmModeA]
mergeGpmAvailableLeft = gpmNeighborForLeft[hIdxL][wIdxL][GpmModeL]
Then, when (Condition 3) or (Condition 4) is satisfied, the parameter decoding unit 302 decodes mer
geGpmAvailableNeighbor may be set to 1.
mergeGpmAvailableNeighbor = mergeGpmAvailableAbove || mergeGpmAvailableLeft
(merge_gpm_angle_idxを用いたGPMモード番号予測)
さらに、図19(b)に示すように交点が対象ブロック上にない場合における、対象ブロックのGPMモード番号を導出について述べる。このとき、GPM予測部30377は、上記に記載したcrstblCurrForAbove、またはcrstblCurrForLeftとは異なるテーブルを用いる。
mergeGpmAvailableNeighbor = mergeGpmAvailableAbove || mergeGpmAvailableLeft
(GPM mode number prediction using merge_gpm_angle_idx)
Next, we will explain how to derive the GPM mode number of the target block when the intersection point is not on the target block, as shown in Figure 19(b). In this case, the GPM prediction unit 30377 uses a table different from the crstblCurrForAbove or crstblCurrForLeft described above.
具体的には、GPM予測部30377は、上側隣接ブロックのGPM情報を用いる場合には、対象ブロックのサイズおよびGPM予測モード番号と、対象ブロック右側における交点のy座標位置を対応付けているテーブルを用いてもよい。また、GPM予測部30377は、左側隣接ブロックのGPM情報を用いる場合には、対象ブロックのサイズおよびGPM予測モード番号と、ブロック下側における交点のx座標位置を対応付けているテーブルを用いてもよい。 Specifically, when using GPM information for the adjacent block above, the GPM prediction unit 30377 may use a table that associates the size and GPM prediction mode number of the target block with the y-coordinate position of the intersection point on the right side of the target block. Furthermore, when using GPM information for the adjacent block to the left, the GPM prediction unit 30377 may use a table that associates the size and GPM prediction mode number of the target block with the x-coordinate position of the intersection point on the bottom side of the block.
(インター予測画像生成部309)
predModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ導出部303から入力されたインター予測パラメータと参照ピクチャを用いてインター予測によりブロックもしくはサブブロックの予測画像を生成する。
(Inter-prediction image generation unit 309)
When predMode indicates inter prediction mode, the inter prediction image generation unit 309 generates a prediction image of a block or sub-block by inter prediction using the inter prediction parameters input from the inter prediction parameter derivation unit 303 and the reference picture.
図4は、本実施形態に係る予測画像生成部308に含まれるインター予測画像生成部309の構成を示す概略図である。インター予測画像生成部309は、動き補償部(予測画像生成装置)3091、合成部3095を含んで構成される。合成部3095は、IntraInter合成部30951、GPM合成部30952、BIO部30954、重み予測部3094を含んで構成される。 Figure 4 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. The synthesis unit 3095 includes an intra-inter synthesis unit 30951, a GPM synthesis unit 30952, a BIO unit 30954, and a weight prediction unit 3094.
(動き補償)
動き補償部3091(補間画像生成部3091)は、インター予測パラメータ導出部303から入力された、インター予測パラメータ(predFlagLX、refIdxLX、mvLX)に基づいて、参照ピクチャメモリ306から参照ブロックを読み出すことによって補間画像(動き補償画像)を生成する。参照ブロックは、refIdxLXで指定された参照ピクチャRefPicLX上で、対象ブロックの位置からmvLXシフトした位置のブロックである。ここで、mvLXが整数精度でない場合には、動き補償フィルタと呼ばれる小数位置の画素を生成するためのフィルタを施して、補間画像を生成する。
(Motion Compensation)
The motion compensation unit 3091 (interpolated image generation unit 3091) generates an interpolated image (motion-compensated image) by reading a reference block from the reference picture memory 306 based on the inter-prediction parameters (predFlagLX, refIdxLX, mvLX) input from the inter-prediction parameter derivation unit 303. The reference block is a block located at a position shifted by mvLX from the position of the current block on the reference picture RefPicLX specified by refIdxLX. Here, if mvLX does not have integer precision, an interpolated image is generated by applying a filter called a motion compensation filter, which is used to generate pixels at decimal positions.
動き補償部3091は、まず、予測ブロック内座標(x,y)に対応する整数位置(xInt,yInt)および位相(xFrac,yFrac)を以下の式で導出する。 The motion compensation unit 3091 first derives the integer position (xInt, yInt) and phase (xFrac, yFrac) corresponding to the coordinates (x, y) in the prediction block using 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) are the upper left coordinates of a bW*bH size block, where x = 0...bW-1 and y = 0...bH-1, and MVPREC indicates the precision of mvLX (1/MVPREC pixel precision), e.g., MVPREC = 16.
動き補償部3091は、参照ピクチャrefImgに補間フィルタを用いて水平補間処理を行うことで、一時的画像temp[][]を導出する。以下のΣはk=0..NTAP-1のkに関する和、shift1は値のレンジを調整する正規化パラメータ、offset1=1<<(shift1-1)である。 The motion compensation unit 3091 derives the temporary image temp[][] by performing horizontal interpolation on the reference picture refImg using an interpolation filter. In the following, Σ is the sum over k, where k=0..NTAP-1, shift1 is a normalization parameter that adjusts the value range, 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
Next, the motion compensation unit 3091 performs vertical interpolation on the temporary image temp[][] to generate an interpolated image Pred
Derive [][]. Below, Σ is the sum over k=0..NTAP-1, shift2 is a normalization parameter that adjusts the range of values, and offset2=1<<(shift2-1).
Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2)>>shift2
なお、双予測の場合、上記のPred[][]をL0リスト、L1リスト毎に補間画像PredL0[][]とPredL1[][]を導出し、PredL0[][]とPredL1[][]から補間画像Pred[][]を生成する。
Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2)>>shift2
In the case of bi-prediction, the above Pred[][] is used for the L0 list, and interpolated images PredL0[][] and PredL1[][] are derived for each L1 list, and an interpolated image Pred[][] is generated from PredL0[][] and PredL1[][].
合成部3095は、IntraInter合成部30951、GPM合成部30952、重み予測部3094、BIO部30954を備えている。 The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a GPM synthesis unit 30952, a weighted prediction unit 3094, and a BIO unit 30954.
(GPM合成部30952)
GPM合成部30952は、一時的予測画像predSamplesLA、predSamplesLBと、角度変数により導出される重みパラメータを用いて予測画像を導出する。一時的予測画像predSamplesLA、predSamplesLBは、動き補償部3091が上記動き情報(mvX, refIdxX, predListFlagX, X=A or B)を用いて生成した予測画像である。角度変数は、GPM予測部30377が導出したangleIdx、distanceIdxである。
(GPM synthesis section 30952)
The GPM synthesis unit 30952 derives a predicted image using temporary predicted images predSamplesLA and predSamplesLB and weighting parameters derived from angle variables. The temporary predicted images predSamplesLA and predSamplesLB are predicted images generated by the motion compensation unit 3091 using the motion information (mvX, refIdxX, predListFlagX, X=A or B). The angle variables are angleIdx and distanceIdx derived by the GPM prediction unit 30377.
GPM合成部30952は、予測画素値pbSampleを以下の手順で導出する。ここで、nCbW=cbWidth、nCbH=cbHeightである。まず、GPM合成部30952は、GPM予測における重み係数導出処理および後述する動きベクトル格納処理のために、以下のように、bitDepthを導出する。 The GPM synthesis unit 30952 derives the predicted pixel value pbSample using the following procedure, where nCbW = cbWidth and nCbH = cbHeight. First, the GPM synthesis unit 30952 derives bitDepth as follows for the weighting coefficient derivation process in GPM prediction and the motion vector storage process described below.
cIdxが0である場合、GPM合成部30952は、bitDepthを、輝度画素ビット数BitDepthYに設定する。 If cIdx is 0, the GPM synthesis unit 30952 sets bitDepth to the luminance pixel bit count BitDepthY.
cIdxが0である場合、GPM合成部30952は、nWおよびnHをそれぞれ、nCbWおよびnCbHに設定する。cIdxが0でない場合、GPM合成部30952は、nWおよびnHをそれぞれ、nCbW*SubWidthCおよびnCbH*SubHeightCに設定する。ここで、SubWidthCおよびSubHeightCは、色差フォーマットに応じて予め定められた値である。 If cIdx is 0, the GPM synthesis unit 30952 sets nW and nH to nCbW and nCbH, respectively. If cIdx is not 0, the GPM synthesis unit 30952 sets nW and nH to nCbW*SubWidthC and nCbH*SubHeightC, respectively. Here, SubWidthC and SubHeightC are values predetermined according to the chrominance format.
cIdxが0である場合、GPM合成部30952は、subWおよびsubHを両方とも1に設定する。cIdxが0でない場合、GPM合成部30952は、subWおよびsubHにそれぞれ、SubWidthCおよびSubHeightCを設定する。 If cIdx is 0, the GPM synthesis unit 30952 sets both subW and subH to 1. If cIdx is not 0, the GPM synthesis unit 30952 sets subW and subH to SubWidthC and SubHeightC, respectively.
cIdxが0でない場合、GPM合成部30952は、bitDepthを、色差画素ビット数BitDepthCに設定する。 If cIdx is not 0, the GPM synthesis unit 30952 sets bitDepth to the chrominance pixel bit count, BitDepthC.
次に、GPM合成部30952は、以下のように、変数nW、nH、shift1、offset1、displacementX、displacementY、partFlipおよびshiftHorを導出する。 Next, the GPM synthesis unit 30952 derives the variables nW, nH, shift1, offset1, displacementX, displacementY, partFlip, and shiftHor as follows:
nW = (cIdx==0) ? nCbW : nCbW * SubWidthC
nH = (cIdx==0) ? nCbH : nCbH * SubHeightC
shift1 = Max(5, 17 - BitDepth)
offset1 = 1 << (shift1 - 1)
displacementX = angleIdx
displacementY = (angleIdx + 8) % 32
partFlip = (angleIdx>=13 && angleIdx<=27) ? 0 : 1
shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 && nH>=nW)) ? 0 : 1
shiftHorが0である場合、GPM合成部30952は、以下のように、offsetXおよびoffsetYを導出する。
nW = (cIdx==0) ? nCbW : nCbW * SubWidthC
nH = (cIdx==0) ? nCbH : nCbH * SubHeightC
shift1 = Max(5, 17 - BitDepth)
offset1 = 1 << (shift1 - 1)
displacementX = angleIdx
displacementY = (angleIdx + 8) % 32
partFlip = (angleIdx>=13 &&angleIdx<=27) ? 0 : 1
shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 &&nH>=nW)) ? 0 : 1
When shiftHor is 0, the GPM synthesis unit 30952 derives offsetX and offsetY as follows:
offsetX = (-nW) >> 1
offsetY = ((-nH) >> 1) + (angleIdx<16? (distanceIdx * nH) >> 3 : -((distanceIdx * nH) >> 3))
shiftHorが1である場合、GPM合成部30952は、以下のように、offsetXおよびoffsetYを導出する。
offsetX = (-nW) >> 1
offsetY = ((-nH) >> 1) + (angleIdx<16? (distanceIdx * nH) >> 3 : -((distanceIdx * nH) >> 3))
When shiftHor is 1, the GPM synthesis unit 30952 derives offsetX and offsetY as follows:
offsetX = ((-nW) >> 1) + (angleIdx<16? (distanceIdx * nW) >> 3 : -((distanceIdx * nW) >> 3))
offsetY = (-nH) >> 1
GPM合成部30952は、以下のステップに従って、予測画素pbSamplesを導出する。
offsetX = ((-nW) >> 1) + (angleIdx<16? (distanceIdx * nW) >> 3 : -((distanceIdx * nW) >> 3))
offsetY = (-nH) >> 1
The GPM synthesis unit 30952 derives the predicted pixels pbSamples according to the following steps.
1)GPM合成部30952は、CU内の座標(x, y)から一般化座標(xL, yL)を導出する。 1) The GPM synthesis unit 30952 derives generalized coordinates (xL, yL) from coordinates (x, y) within the CU.
xL = (cIdx==0) ? x : x * SubWidthC
yL = (cIdx==0) ? y : y * SubHeightC
2)GPM合成部30952は、図9(b)に示すdisLutを用いて、以下のように、CU内の座標に応じた重み係数wValueを算出する。
xL = (cIdx==0) ? x : x * SubWidthC
yL = (cIdx==0) ? y : y * SubHeightC
2) The GPM synthesis unit 30952 uses disLut shown in FIG. 9(b) to calculate the weighting coefficient wValue according to the coordinates within the CU as follows:
weightIdx = (((xL + offsetX) << 1) + 1) * disLut[displacementX] + (((yL + offsetY) << 1) + 1) * disLut[displacementY]
weightIdxL = partFlip ? 32 + weightIdx : 32 - weightIdx
wValue = Clip3(0, 8, (weightIdxL + 4) >> 3)
3)GPM合成部30952は、以下のように、pbSampleの値を導出する。
weightIdx = (((xL + offsetX) << 1) + 1) * disLut[displacementX] + (((yL + offsetY) << 1) + 1) * disLut[displacementY]
weightIdxL = partFlip ? 32 + weightIdx : 32 - weightIdx
wValue = Clip3(0, 8, (weightIdxL + 4) >> 3)
3) The GPM synthesis unit 30952 derives the value of pbSample as follows:
pbSamples[x][y] = Clip3(0, (1 << BitDepth) - 1, (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + offset1) >> shift1)
(IntraInter合成処理)
IntraInter合成部30951は、ciip_modeが1の場合に、CIIP(Combined intra inter prediction)モードの予測画像を、インター予測画像とイントラ予測画像の重み付け和により予測画像を生成する。
pbSamples[x][y] = Clip3(0, (1 << BitDepth) - 1, (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + offset1) >> shift1)
(IntraInter compositing processing)
When ciip_mode is 1, the IntraInter synthesis unit 30951 generates a predicted image in CIIP (Combined intra prediction) mode by weighting the inter predicted image and the intra predicted image.
(BIO予測)
BIO部30954は、双予測モードにおいて、2つの予測画像(第1の予測画像及び第2の予測画像)及び勾配補正項を参照して予測画像を生成する。
(BIO forecast)
In bi-prediction mode, the BIO unit 30954 generates a predicted image by referring to two predicted images (a first predicted image and a second predicted image) and a gradient correction term.
(重み予測)
重み予測部3094は、補間画像PredLXに重み係数を乗算することによりブロックの予測画像を生成する。
(Weighted Prediction)
The weighted prediction unit 3094 generates a predicted image of the block by multiplying the interpolated image PredLX by a weighting factor.
インター予測画像生成部309は生成したブロックの予測画像を加算部312に出力する。 The inter-prediction image generation unit 309 outputs the generated prediction image of the block to the addition unit 312.
(イントラ予測画像生成部)
predModeがイントラ予測モードを示す場合、イントラ予測画像生成部は、イントラ予測パラメータ導出部から入力されたイントラ予測パラメータと参照ピクチャメモリ306から読み出した参照画素を用いてイントラ予測を行う。
(Intra-prediction image generation unit)
When predMode indicates an intra prediction mode, the intra prediction image generation unit performs intra prediction using the intra prediction parameters input from the intra prediction parameter derivation unit and reference pixels read from the reference picture memory 306 .
逆量子化・逆変換部311は、パラメータ復号部302から入力された量子化変換係数を逆量子化して変換係数を求める。 The inverse quantization and inverse transform unit 311 inverse quantizes the quantized transform coefficients input from the parameter decoding unit 302 to obtain transform coefficients.
加算部312は、予測画像生成部308から入力されたブロックの予測画像と逆量子化・逆変
換部311から入力された予測誤差を画素毎に加算して、ブロックの復号画像を生成する。加算部312はブロックの復号画像を参照ピクチャメモリ306に記憶し、また、ループフィルタ305に出力する。
The adder 312 generates a decoded image for the block by adding, for each pixel, the predicted image for the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization and inverse transform unit 311. The adder 312 stores the decoded image for the block in the reference picture memory 306 and also outputs it to the loop filter 305.
(動画像符号化装置の構成)
次に、本実施形態に係る動画像符号化装置11の構成について説明する。図20は、本実施形態に係る動画像符号化装置11の構成を示すブロック図である。動画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、パラメータ符号化部111、予測パラメータ導出部120、エントロピー符号化部104を含んで構成される。
(Configuration of video encoding device)
Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 20 is a block diagram showing the configuration of the video encoding device 11 according to this embodiment. The video encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a transformation/quantization unit 103, an inverse quantization/inverse transformation unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, a coding parameter determination unit 110, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.
予測画像生成部101はCU毎に予測画像を生成する。予測画像生成部101は既に説明したインター予測画像生成部309とイントラ予測画像生成部を含んでおり、説明を省略する。 The predicted image generation unit 101 generates a predicted image for each CU. The predicted image generation unit 101 includes the inter predicted image generation unit 309 and intra predicted image generation unit already explained, so further explanation will be omitted.
減算部102は、予測画像生成部101から入力されたブロックの予測画像の画素値を、画像Tの画素値から減算して予測誤差を生成する。減算部102は予測誤差を変換・量子化部103に出力する。 The subtraction unit 102 subtracts the pixel values of the predicted image of the block input from the predicted image generation unit 101 from the pixel values of image T to generate a prediction error. The subtraction unit 102 outputs the prediction error to the transformation and quantization unit 103.
変換・量子化部103は、減算部102から入力された予測誤差に対し、周波数変換によって変換係数を算出し、量子化によって量子化変換係数を導出する。変換・量子化部103は、量子化変換係数をパラメータ符号化部111及び逆量子化・逆変換部105に出力する。 The transform/quantization unit 103 calculates transform coefficients by frequency transforming the prediction errors input from the subtraction unit 102, and derives quantized transform coefficients by quantizing them. The transform/quantization unit 103 outputs the quantized transform coefficients to the parameter coding unit 111 and the inverse quantization/inverse transform unit 105.
逆量子化・逆変換部105は、動画像復号装置31における逆量子化・逆変換部311と同じであり、説明を省略する。算出した予測誤差は加算部106に出力される。 The inverse quantization and inverse transform unit 105 is the same as the inverse quantization and inverse transform unit 311 in the video decoding device 31, and so a detailed description will be omitted. The calculated prediction error is output to the adder 106.
パラメータ符号化部111は、ヘッダ符号化部1110、CT情報符号化部1111、CU符号化部1112(予測モード符号化部)を備えている。CU符号化部1112はさらにTU符号化部1114を備えている。以下、各モジュールの概略動作を説明する。 The parameter coding unit 111 includes a header coding unit 1110, a CT information coding unit 1111, and a CU coding unit 1112 (prediction mode coding unit). The CU coding unit 1112 further includes a TU coding unit 1114. The following describes the general operation of each module.
ヘッダ符号化部1110はヘッダ情報、分割情報、予測情報、量子化変換係数等のパラメータの符号化処理を行う。 The header encoding unit 1110 performs encoding processing on 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, etc.
CU符号化部1112はCU情報、予測情報、分割情報等を符号化する。 The CU encoding unit 1112 encodes CU information, prediction information, segmentation information, etc.
TU符号化部1114は、TUに予測誤差が含まれている場合に、QP更新情報と量子化予測誤差を符号化する。 When a TU contains a prediction error, the TU encoding unit 1114 encodes the QP update information and the quantized prediction error.
CT情報符号化部1111、CU符号化部1112は、インター予測パラメータ(predMode、merge_flag、merge_idx、inter_pred_idc、refIdxLX、mvp_LX_idx、mvdLX)、イントラ予測パラメータ、量子化変換係数等のシンタックス要素をパラメータ符号化部111に供給する。 The CT information encoding unit 1111 and the CU encoding unit 1112 supply syntax elements such as inter-prediction parameters (predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX), intra-prediction parameters, and quantized transform coefficients to the parameter encoding unit 111.
エントロピー符号化部104には、パラメータ符号化部111から量子化変換係数と符号化パラメータ(分割情報、予測パラメータ)が入力される。エントロピー符号化部104はこれらをエントロピー符号化して符号化ストリームTeを生成し、出力する。 The entropy coding unit 104 receives quantized transform coefficients and coding parameters (split information, prediction parameters) from the parameter coding unit 111. The entropy coding unit 104 entropy codes these to generate and output the coded stream Te.
予測パラメータ導出部120は、インター予測パラメータ符号化部112、イントラ予測パラ
メータ符号化部を含む手段であり、符号化パラメータ決定部110から入力されたパラメータからイントラ予測パラメータ及びイントラ予測パラメータを導出する。導出されたイントラ予測パラメータ及びイントラ予測パラメータは、パラメータ符号化部111に出力される。
The prediction parameter derivation unit 120 is a means including the inter-prediction parameter coding unit 112 and an intra-prediction parameter coding unit, and derives intra-prediction parameters and intra-prediction parameters from the parameters input from the coding parameter determination unit 110. The derived intra-prediction parameters and intra-prediction parameters are output to the parameter coding unit 111.
(インター予測パラメータ符号化部の構成)
インター予測パラメータ符号化部112は図21に示すように、パラメータ符号化制御部1121、インター予測パラメータ導出部303を含んで構成される。インター予測パラメータ導出部303は動画像復号装置と共通の構成である。パラメータ符号化制御部1121は、マージインデックス導出部11211とベクトル候補インデックス導出部11212を含む。
(Configuration of inter-prediction parameter encoding unit)
21 , the inter prediction parameter coding unit 112 includes a parameter coding control unit 1121 and an inter prediction parameter derivation unit 303. The inter prediction parameter derivation unit 303 has the same configuration as the video decoding device. The parameter coding control unit 1121 includes a merge index derivation unit 11211 and a vector candidate index derivation unit 11212.
マージインデックス導出部11211は、マージ候補等を導出し、インター予測パラメータ導出部303に出力する。ベクトル候補インデックス導出部11212は予測ベクトル候補等を導出し、インター予測パラメータ導出部303とパラメータ符号化部111に出力する。 The merge index derivation unit 11211 derives merge candidates, etc., and outputs them to the inter prediction parameter derivation unit 303. The vector candidate index derivation unit 11212 derives prediction vector candidates, etc., and outputs them to the inter prediction parameter derivation unit 303 and the parameter coding unit 111.
(イントラ予測パラメータ符号化部の構成)
イントラ予測パラメータ符号化部は、パラメータ符号化制御部とイントラ予測パラメータ導出部を備える。イントラ予測パラメータ導出部は動画像復号装置と共通の構成である。
(Configuration of intra prediction parameter encoding unit)
The intra-prediction parameter coding unit includes a parameter coding control unit and an intra-prediction parameter derivation unit, which has the same configuration as the video decoding device.
ただし、動画像復号装置と異なり、インター予測パラメータ導出部303、イントラ予測パラメータ導出部への入力は符号化パラメータ決定部110、予測パラメータメモリ108であり、パラメータ符号化部111に出力する。 However, unlike a video decoding device, the inputs to the inter prediction parameter derivation unit 303 and intra prediction parameter derivation unit are the coding parameter determination unit 110 and prediction parameter memory 108, and they are output to the parameter coding unit 111.
加算部106は、予測画像生成部101から入力された予測ブロックの画素値と逆量子化・逆変換部105から入力された予測誤差を画素毎に加算して復号画像を生成する。加算部106は生成した復号画像を参照ピクチャメモリ109に記憶する。 The adder 106 generates a decoded image by adding, pixel by pixel, the pixel values of the predicted block input from the predicted image generator 101 and the prediction error input from the inverse quantization and inverse transformer 105. The adder 106 stores the generated decoded image in the reference picture memory 109.
ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、SAO、ALFを施す。なお、ループフィルタ107は、必ずしも上記3種類のフィルタを含まなくてもよく、例えばデブロッキングフィルタのみの構成であってもよい。 The loop filter 107 applies deblocking filtering, SAO, and ALF to the decoded image generated by the adder 106. Note that the loop filter 107 does not necessarily have to include the above three types of filters; for example, it may be configured with only a deblocking filter.
予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、対象ピクチャ及びCU毎に予め定めた位置に記憶する。 The prediction parameter memory 108 stores the prediction parameters generated by the encoding parameter determination unit 110 in a predetermined location for each target picture and CU.
参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を対象ピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 109 stores the decoded image generated by the loop filter 107 in a predetermined location for each target picture and CU.
符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述したQT、BTあるいはTT分割情報、予測パラメータ、あるいはこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータを用いて予測画像を生成する。 The coding parameter determination unit 110 selects one set of coding parameters from multiple sets. The coding parameters are the above-mentioned QT, BT, or TT division information, prediction parameters, or parameters generated in relation to these to be coded. The predicted image generation unit 101 generates a predicted image using these coding parameters.
符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すRDコスト値を算出する。RDコスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された予測誤差の二乗和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。符号化パラメータ決定部110は決定した符号化パラメータをパラメータ符号化部111と予測パラメータ導出部120に出力する。 The coding parameter determination unit 110 calculates an RD cost value indicating the magnitude of the information amount and the coding error for each of the multiple sets. The RD cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by the coefficient λ. The code amount is the information amount of the coded stream Te obtained by entropy coding the quantization error and coding parameters. The squared error is the sum of the squares of the prediction errors calculated by the subtraction unit 102. The coefficient λ is a preset real number greater than zero. The coding parameter determination unit 110 selects the set of coding parameters that minimizes the calculated cost value. The coding parameter determination unit 110 outputs the determined coding parameters to the parameter coding unit 111 and the prediction parameter derivation unit 120.
なお、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、例えば、エントロピー復号部301、パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆変換部311、加算部312、予測パラメータ導出部320、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、ループフィルタ107、符号化パラメータ決定部110、パラメータ符号化部111、予測パラメータ導出部120をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、動画像符号化装置11、動画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。 Note that portions of the video encoding device 11 and video decoding device 31 in the above-described embodiments, such as the entropy decoding unit 301, parameter decoding unit 302, loop filter 305, predicted image generation unit 308, inverse quantization and inverse transform unit 311, adder unit 312, prediction parameter derivation unit 320, predicted image generation unit 101, subtractor unit 102, transform and quantization unit 103, entropy encoding unit 104, inverse quantization and inverse transform unit 105, loop filter 107, encoding parameter determination unit 110, parameter encoding unit 111, and prediction parameter derivation unit 120, may be implemented by a computer. In this case, a program for implementing these control functions may be recorded on a computer-readable recording medium, and the program may be read into and executed by a computer system. Note that the term "computer system" as used herein refers to a computer system built into either the video encoding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. Additionally, "computer-readable recording media" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, as well as storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording media" may also include devices that dynamically store programs for a short period of time, such as communication lines used when transmitting programs over networks like the Internet or communication lines like telephone lines, or devices that store programs for a fixed period of time, such as volatile memory within computer systems that serve as servers or clients in such cases. Furthermore, the above-mentioned programs may be programs that implement some of the functions described above, or may be programs that can implement the functions described above in combination with programs already stored in the computer system.
また、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。動画像符号化装置11、動画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。 Furthermore, part or all of the video encoding device 11 and video 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 video encoding device 11 and video decoding device 31 may be individually implemented as a processor, or part or all of them may be integrated into a processor. Furthermore, the integrated circuit implementation method is not limited to LSI, and may also be implemented using a dedicated circuit or a general-purpose processor. Furthermore, if an integrated circuit implementation technology that can replace LSI emerges due to advances in semiconductor technology, an integrated circuit based on that technology may also be used.
以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 One embodiment of the present invention has been described in detail above with reference to the drawings, but the specific configuration is not limited to that described above, and various design modifications can be made without departing from the spirit of the present invention.
本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. In other words, embodiments obtained by combining technical means that are appropriately modified within the scope of the claims are also included in the technical scope of the present invention.
本発明の実施形態は、画像データが符号化された符号化データを復号する動画像復号装置、および、画像データが符号化された符号化データを生成する動画像符号化装置に好適に適用することができる。また、動画像符号化装置によって生成され、動画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。 Embodiments of the present invention can be suitably applied to video decoding devices that decode coded data in which image data has been coded, and video coding devices that generate coded data in which image data has been coded. They can also be suitably applied to the data structure of coded data generated by a video coding device and referenced by the video decoding device.
31 画像復号装置
301 エントロピー復号部
302 パラメータ復号部
303 インター予測パラメータ導出部
30377 GPM予測部
305、107 ループフィルタ
306、109 参照ピクチャメモリ
307、108 予測パラメータメモリ
308、101 予測画像生成部
309 インター予測画像生成部
30952 GPM合成部
311、105 逆量子化・逆変換部
312、106 加算部
320 予測パラメータ導出部
11 画像符号化装置
102 減算部
103 変換・量子化部
104 エントロピー符号化部
110 符号化パラメータ決定部
111 パラメータ符号化部
112 インター予測パラメータ符号化部
120 予測パラメータ導出部
31 Image decoding device
301 Entropy Decoding Unit
302 Parameter Decoding Unit
303 Inter-prediction parameter derivation unit
30377 GPM Forecasting Department
305, 107 Loop filter
306, 109 Reference Picture Memory
307, 108 Prediction parameter memory
308, 101 Prediction image generation unit
309 Inter-prediction image generation unit
30952 GPM synthesis section
311, 105 Inverse quantization and inverse transform unit
312, 106 Addition section
320 Prediction parameter derivation part
11 Image encoding device
102 Subtraction section
103 Transformation and Quantization Unit
104 Entropy coding unit
110 Encoding parameter determination unit
111 Parameter Encoding Unit
112 Inter-prediction parameter coding unit
120 Prediction parameter derivation part
Claims (6)
前記パラメータ復号部は、隣接ブロックのGPMパラメータに応じて、前記対象ブロックの前記GPMパラメータを復号するかを決定し、前記隣接ブロックの前記GPMパラメータに応じて第1のパラメータを復号するか、第2のパラメータを復号するかを決定し、
前記予測部は、前記隣接ブロックの前記GPMパラメータから、前記対象ブロックのGPMモード番号を導出する処理を含み、前記GPMモード番号に基づいて、前記重みの導出を行い、前記重みを用いて、前記予測画像を導出し、
前記第1のパラメータは分割パターンを示すパラメータであり、前記第2のパラメータは分割線の角度を示すパラメータであることを特徴とする動画像復号装置。 A video decoding device comprising: a parameter decoding unit that decodes a GPM parameter indicating a partition shape for deriving a predicted image of a current block from encoded data; and a prediction unit that derives the predicted image from two predicted images and weights,
the parameter decoding unit determines whether to decode the GPM parameters of the target block according to the GPM parameters of the neighboring blocks, and determines whether to decode a first parameter or a second parameter according to the GPM parameters of the neighboring blocks;
the prediction unit includes a process of deriving a GPM mode number of the target block from the GPM parameters of the neighboring blocks, deriving the weights based on the GPM mode numbers, and deriving the predicted image using the weights ;
10. A video decoding device , comprising: a first parameter indicating a division pattern; and a second parameter indicating an angle of a division line .
前記パラメータ符号化部は、隣接ブロックのGPMパラメータに応じて、前記対象ブロックの前記GPMパラメータを符号化するかを決定し、前記隣接ブロックの前記GPMパラメータに応じて第1のパラメータを復号するか、第2のパラメータを復号するかを決定し、
前記予測部は、前記隣接ブロックの前記GPMパラメータから、前記対象ブロックのGPMモード番号を導出する処理を含み、前記GPMモード番号に基づいて、前記重みの導出を行い、前記重みを用いて、前記予測画像を導出し、
前記第1のパラメータは分割パターンを示すパラメータであり、前記第2のパラメータは分割線の角度を示すパラメータであることを特徴とする動画像符号化装置。 A video encoding device comprising: a parameter encoding unit that encodes a GPM parameter indicating a partition shape for deriving a predicted image of a current block from encoded data; and a prediction unit that derives the predicted image from two predicted images and weights,
the parameter encoding unit determines whether to encode the GPM parameters of the current block according to the GPM parameters of the neighboring blocks, and determines whether to decode a first parameter or a second parameter according to the GPM parameters of the neighboring blocks;
the prediction unit includes a process of deriving a GPM mode number of the target block from the GPM parameters of the neighboring blocks, deriving the weights based on the GPM mode numbers, and deriving the predicted image using the weights ;
10. A video encoding device , comprising: a first parameter indicating a division pattern; and a second parameter indicating an angle of a division line .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021150710A JP7783715B2 (en) | 2021-09-16 | 2021-09-16 | Video decoding device and video encoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021150710A JP7783715B2 (en) | 2021-09-16 | 2021-09-16 | Video decoding device and video encoding device |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2023043219A JP2023043219A (en) | 2023-03-29 |
| JP2023043219A5 JP2023043219A5 (en) | 2024-09-20 |
| JP7783715B2 true JP7783715B2 (en) | 2025-12-10 |
Family
ID=85725278
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021150710A Active JP7783715B2 (en) | 2021-09-16 | 2021-09-16 | Video decoding device and video encoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7783715B2 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021131058A1 (en) | 2019-12-27 | 2021-07-01 | 富士通株式会社 | Decoding device, encoding device, decoding method, and decoding program |
-
2021
- 2021-09-16 JP JP2021150710A patent/JP7783715B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021131058A1 (en) | 2019-12-27 | 2021-07-01 | 富士通株式会社 | Decoding device, encoding device, decoding method, and decoding program |
Non-Patent Citations (2)
| Title |
|---|
| Jianle Chen, Yan Ye, Seung Hwan Kim,Algorithm description for Versatile Video Coding and Test Model 13 (VTM 13) [online],JVET-V JVET-V2002-v1,検索日 2025.08.13,ITU-T ,2021年07月04日,pp.1-2, pp.53-55,インターネット<URL:https://jvet-experts.org/doc_end_user/documents/22_Teleconference/wg11/JVET-V2002-v1.zip> |
| Max Blaser Johannes Sauer Mathias Wien,Description of SDR and 360° video coding technology proposal by RWTH Aachen University [online],JVET-J JVET-J0023-r1,検索日 2025.08.13,ITU-T ,pp.35-41,図25,インターネット<URL:http://phenix.it-sudparis.eu/jvet/doc_end_user/documents/10_San%20Diego/wg11/JVET-J0023-v3.zip> |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023043219A (en) | 2023-03-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7752799B2 (en) | Video encoding device and recording medium | |
| JP7714079B2 (en) | Video decoding device | |
| CN112534810B (en) | Moving picture decoding device and moving picture encoding device | |
| JP7809108B2 (en) | Video decoding device and video encoding device | |
| JP2026001147A (en) | Video decoding device and video encoding device | |
| JP2024047921A (en) | Image Decoding Device | |
| KR20240037137A (en) | Moving image decoding device and moving image coding device | |
| WO2023112648A1 (en) | Video decoding device and video coding device | |
| JP7735065B2 (en) | Image decoding device and image encoding device | |
| JP7783715B2 (en) | Video decoding device and video encoding device | |
| WO2023100970A1 (en) | Video decoding apparatus and video coding apparatus | |
| JP7741795B2 (en) | Video decoding device, video decoding method, and video encoding device | |
| JP2024047922A (en) | Image decoding device and image encoding device | |
| JP7817802B2 (en) | Video decoding device and video encoding device | |
| JP2025038266A (en) | Video decoding device and video encoding device | |
| WO2021235448A1 (en) | Video coding device and video decoding device | |
| JP7773314B2 (en) | Image decoding device and image encoding device | |
| WO2025182198A1 (en) | Video decoding device and video coding device | |
| JP2021106309A (en) | Video decoding device and video coding device | |
| JP7465128B2 (en) | Video encoding device and video decoding device | |
| JP7506470B2 (en) | Video decoding device, video encoding device, video decoding method, and video encoding method | |
| WO2025187142A1 (en) | Video decoding device and video encoding device | |
| JP2024129196A (en) | Video decoding device and video encoding device | |
| WO2025069840A1 (en) | Video decoding device and video encoding device | |
| JP2024151450A (en) | Video encoding device, video decoding device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20221207 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240911 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240911 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250815 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250826 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20251008 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20251104 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20251128 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7783715 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |