JP2020061701A - Dynamic image coding device and dynamic image decoding device - Google Patents

Dynamic image coding device and dynamic image decoding device Download PDF

Info

Publication number
JP2020061701A
JP2020061701A JP2018193307A JP2018193307A JP2020061701A JP 2020061701 A JP2020061701 A JP 2020061701A JP 2018193307 A JP2018193307 A JP 2018193307A JP 2018193307 A JP2018193307 A JP 2018193307A JP 2020061701 A JP2020061701 A JP 2020061701A
Authority
JP
Japan
Prior art keywords
tile
unit
ctu
tileid
flag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018193307A
Other languages
Japanese (ja)
Inventor
将伸 八杉
Masanobu Yasugi
将伸 八杉
知宏 猪飼
Tomohiro Igai
知宏 猪飼
友子 青野
Tomoko Aono
友子 青野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2018193307A priority Critical patent/JP2020061701A/en
Publication of JP2020061701A publication Critical patent/JP2020061701A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

To flexibly set the unit of the size of a tile when tiles are decoded in a size other than an integral multiple of a CTU unit, and to provide loop filter processing that is efficient when an effective region of a CTU is small.SOLUTION: A dynamic image decoding device divides an image into tiles and decodes a dynamic image in a tile unit, and comprises: a header information decoding unit that decodes header information from a coded stream and calculates tile information; a tile decoding unit that decodes coded data for each tile and creates decoded images of the tiles; and a compositing unit that composites the decoded images of the tiles with reference to the tile information to create a display image. The tiles each include an area overlapping an adjacent tile, and the compositing unit performs filter processing on a plurality of pixel values of pixels in the overlapping areas of the tiles, and creates the display image by using the pixel values of the decoded images of the tiles and the pixel values on which the filter processing is performed.SELECTED DRAWING: Figure 23

Description

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

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

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

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

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

また、画面を複数の単位に分割し並列処理を行う方法としては、スライス、CTUライン(ウェーブフロントセグメント)、タイルに分割する方法が知られている。タイルに分割する方法では従来CTU単位での分割に限定されていた。   As a method of dividing a screen into a plurality of units and performing parallel processing, a method of dividing into a slice, a CTU line (wavefront segment), and a tile is known. The method of dividing into tiles has conventionally been limited to division in CTU units.

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

"Algorithm Description of Joint Exploration Test Model 7", JVET-G1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2017-08-19"Algorithm Description of Joint Exploration Test Model 7", JVET-G1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2017-08-19

上記で説明したように、タイルサイズがCTUの整数倍という制限があり、ロードバランスのために同じサイズに分割することや、360度動画のフェース(face)サイズに合わせたタイルを構成することが難しいという課題がある。   As explained above, there is a limitation that the tile size is an integral multiple of CTU, and it is possible to divide it into the same size for load balancing and configure tiles that match the face size of 360-degree video. There is a problem of difficulty.

また、画面端やタイル端などに置いて、CTUの有効領域が小さい場合にループフィルタ処理をする場合、ループフィルタのための情報のオーバーヘッドが大きく、性能が向上しない、という課題がある。   In addition, when the loop filter processing is performed when the effective area of the CTU is small at the screen edge or tile edge, there is a problem that the information overhead for the loop filter is large and the performance is not improved.

そこで、本発明は、上記の課題に鑑みてなされたものであり、その目的は、CTUの整数倍の制限がないタイル分割と効率的なループフィルタ処理を提供することである。   Therefore, the present invention has been made in view of the above problems, and an object of the present invention is to provide tile division and an efficient loop filter process that are not limited to an integral multiple of CTU.

本発明の一態様に係る動画像復号装置は、画像をタイルに分割し、タイルをCTUに分割し、CTU単位に動画像を復号する動画像復号装置において、符号化ストリームのヘッダ情報からタイルの大きさの単位を示すタイルユニット情報を復号するヘッダ復号部と、タイルをCTUにするCT復号部を備え、上記ヘッダ復号部は、タイルユニット情報を用いてタイル左上位置とタイルサイズを導出することを特徴とする。   A moving image decoding apparatus according to an aspect of the present invention is a moving image decoding apparatus that divides an image into tiles, divides tiles into CTUs, and decodes moving images in units of CTUs. The header decoding unit includes a header decoding unit that decodes tile unit information indicating a unit of size, and a CT decoding unit that makes the tile a CTU, and the header decoding unit uses the tile unit information to derive the tile upper left position and the tile size. Is characterized by.

符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of an encoding stream. CTUの分割例を示す図である。It is a figure which shows the example of division of CTU. タイルを説明する図である。It is a figure explaining a tile. タイル情報等に関するシンタックス表である。It is a syntax table regarding tile information and the like. 動画像復号装置の構成を示す概略図である。It is a schematic diagram showing the composition of a moving picture decoding device. 動画像復号装置の概略的動作を説明するフローチャートである。It is a flowchart explaining a schematic operation of the moving image decoding apparatus. CT情報復号部の動作を説明するフローチャートである。It is a flow chart explaining operation of a CT information decoding part. CTUおよびQT情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of CTU and QT information. MT(Multi Tree)情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of MT (Multi Tree) information. MT(Multi Tree)情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of MT (Multi Tree) information. 非CTUサイズでのタイル分割を説明する図である。It is a figure explaining the tile division in a non-CTU size. 非CTUサイズでのタイル分割を説明する図である。It is a figure explaining the tile division in a non-CTU size. 符号化スライスデータのシンタックス構成である。It is a syntax configuration of encoded slice data. 本実施形態のループフィルタ部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the loop filter part of this embodiment. ALFのシンタックスの一例である。This is an example of ALF syntax. SAOを説明する図である。It is a figure explaining SAO. SAOのシンタックスの一例である。This is an example of SAO syntax. SAO及びALFのブロック図である。It is a block diagram of SAO and ALF. 動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of a moving image encoding device. 本実施形態に係る動画像符号化装置を搭載した送信装置、および、動画像復号装置を搭載した受信装置の構成について示した図である。(a)は動画像符号化装置を搭載した送信装置を示しており、(b)は動画像復号装置を搭載した受信装置を示している。It is the figure which showed the structure of the transmission apparatus which mounts the moving image encoding apparatus which concerns on this embodiment, and the receiving apparatus which mounts the moving image decoding apparatus. (a) shows a transmitter equipped with a moving picture coding device, and (b) shows a receiver equipped with a moving picture decoding device. 本実施形態に係る動画像符号化装置を搭載した記録装置、および、動画像復号装置を搭載した再生装置の構成について示した図である。(a)は動画像符号化装置を搭載した記録装置を示しており、(b)は動画像復号装置を搭載した再生装置を示している。It is the figure which showed the structure of the recording device which mounts the moving image encoding apparatus which concerns on this embodiment, and the reproducing | regenerating apparatus which mounts a moving image decoding device. (a) shows a recording device equipped with a moving image encoding device, and (b) shows a reproducing device equipped with a moving image decoding device. 本実施形態に係る画像伝送システムの構成を示す概略図である。It is a schematic diagram showing composition of an image transmission system concerning this embodiment. タイル情報等に関するシンタックス表の別の例である。It is another example of a syntax table regarding tile information and the like. タイル情報等に関するシンタックス表の別の例である。It is another example of a syntax table regarding tile information and the like. タイル情報等に関するシンタックス表の別の例である。It is another example of a syntax table regarding tile information and the like. タイル情報等に関するシンタックス表の別の例である。It is another example of a syntax table regarding tile information and the like. 符号化スライスデータ、CTU情報のシンタックス構成例を示す図である。It is a figure which shows the syntax structural example of coded slice data and CTU information. QT情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of QT information. MT情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of MT information. CTU情報のシンタックス構成例を示す図である。It is a figure which shows the syntax structural example of CTU information. 符号化タイルデータのシンタックス構成である。It is a syntax structure of encoded tile data. CTUおよびQT情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of CTU and QT information. MT(Multi Tree)情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of MT (Multi Tree) information. CTUおよびQT情報のシンタックス表の構成例を示す図である。It is a figure which shows the structural example of the syntax table of CTU and QT information. タイル内座標系から画面内座標系に変換して、ALFのオンオフフラグを導出する式を説明する図である。It is a figure explaining the formula which transform | converts from a coordinate system in a tile to a coordinate system in a screen, and derives an on-off flag of ALF. CTU情報のシンタックス構成例を示す図である。It is a figure which shows the syntax structural example of CTU information. タイル情報等に関するシンタックス表の別の例である。It is another example of a syntax table regarding tile information and the like. マージ予測パラメータ導出部の構成を示す概略図である。It is a schematic diagram showing composition of a merge prediction parameter derivation part. 参照ピクチャ内の動きベクトルを時間動きベクトルとして参照する処理の例を示す図である。It is a figure which shows the example of the process which refers to the motion vector in a reference picture as a temporal motion vector. 参照ピクチャと対象ピクチャが同じタイル分割である場合の対象CTUと動きベクトルを参照範囲の関係を示す図である。It is a figure which shows the relationship of the object CTU and the motion vector reference range in case a reference picture and an object picture are the same tile division.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(タイル)
図3(a)はピクチャをN個のタイル(実線の矩形、図はN=9の例)に分割した例を示す図である。タイルはさらに複数のCTU(破線の矩形)に分割される。図3(a)の中央に示すように、タイルの左上座標を(xTile,yTile)、幅をwTile、高さをhTileと記す。またピクチャの幅をwPict、高さをhPictと記す。なお、タイルの分割数やサイズに関する情報をタイル情報と呼び、詳細は後述する。xTile、yTile、wTile、hTile、wPict、hPictの単位は画素である。ピクチャの幅、高さは図4(a)に示すsequence_parameter_set_rbsp()(SPSと称す)で通知される、pic_width_in_luma_samples、pic_height_in_luma_samplesをセットする。
(tile)
FIG. 3A is a diagram showing an example in which the picture is divided into N tiles (rectangular lines with solid lines, N = 9 in the figure). The tile is further divided into multiple CTUs (dotted rectangles). As shown in the center of FIG. 3A, the upper left coordinate of the tile is (xTile, yTile), the width is wTile, and the height is hTile. The width of the picture is written as wPict and the height is written as hPict. Information regarding the number of divisions and the size of tiles is called tile information, and details will be described later. The unit of xTile, yTile, wTile, hTile, wPict, hPict is a pixel. The width and height of the picture are set by pic_width_in_luma_samples and pic_height_in_luma_samples, which are notified by sequence_parameter_set_rbsp () (referred to as SPS) shown in FIG. 4A.

wPict = pic_width_in_luma_samples
hPict = pic_height_in_luma_samples
図3(b)はピクチャをタイルに分割した時の、CTUの符号化、復号順序を示す図である。各タイルに記載されている番号はTileId(ピクチャ内のタイルの識別子)であり、ピクチャ内のタイルに対し左上から右下にラスタスキャン順で番号TileIdを割り当ててもよい。また、CTUは各タイル内を左上から右下へラスタスキャン順に処理され、1つのタイル内での処理が終わると、次のタイル内のCTUが処理される。
wPict = pic_width_in_luma_samples
hPict = pic_height_in_luma_samples
FIG. 3B is a diagram showing the coding and decoding order of the CTU when the picture is divided into tiles. The number described in each tile is TileId (the identifier of the tile in the picture), and the number TileId may be assigned to the tile in the picture from the upper left to the lower right in raster scan order. In addition, the CTU is processed in the raster scan order from the upper left to the lower right in each tile, and when the processing in one tile is completed, the CTU in the next tile is processed.

図3(c)は時間方向に連続するタイルを示す図である。図3(c)に示されるように、ビデ
オシーケンスは、時間方向に連続する複数のピクチャから構成されている。タイルシーケンスは、時間方向に連続する1つ以上の時刻のタイルから構成されている。図中wのTile(n,tk)は、時刻tkにおけるTileId=nのタイルを表す。なお、図中のCVS(Coded Video Sequence)は、あるイントラピクチャから復号順で別のイントラピクチャの直前のピクチャまでのピクチャ群である。
FIG. 3C is a diagram showing tiles continuous in the time direction. As shown in FIG. 3 (c), the video sequence is composed of a plurality of pictures continuous in the time direction. The tile sequence is composed of tiles at one or more times that are continuous in the time direction. Tile (n, tk) of w in the figure represents the tile of TileId = n at time tk. A CVS (Coded Video Sequence) in the figure is a picture group from a certain intra picture to a picture immediately before another intra picture in decoding order.

図4は、タイル情報等に関するシンタックスの例である。   FIG. 4 is an example of syntax related to tile information and the like.

図4(b)に示すPPS(pic_parameter_set_rbsp())で、タイルに関するパラメータtile_parameters()を通知する。以下、パラメータを通知するとは、パラメータを符号化データ(ビットストリーム)に含めることを意味し、動画像符号化装置では当該パラメータを符号化し、動画像復号装置では当該パラメータを復号する。tile_parameters()には、図4(c)に示すように、tileが存在するか否かを示すtile_enabled_flagが1の場合、タイル情報tile_info()を通知する。また、tile_enabled_flagが1の場合、タイルが時間的に連続する複数のピクチャにわたって独立に復号できるか否かを示すindependent_tiles_flag(independent_decoding_tile_flag)を通知する。independent_tiles_flagが0の場合、タイルは、参照ピクチャ中の隣接タイルを参照して復号する(独立に復号できない)。independent_tiles_flagが1の場合、参照ピクチャ中の隣接タイルを参照せずに復号する。タイルを用いる場合、independent_tiles_flagの値によらず、対象ピクチャ中の隣接タイルを参照せずに復号するため、複数のタイルを並列に復号することができる。このindependent_tiles_flagフラグは、タイルグループ単位やタイル単位など領域単位のフラグindependent_decoding_picture_region_flagであってもよい。なおindependent_tiles_flagは1の場合に独立(ピクチャ間参照なし)、0の場合に従属(ピクチャ間参照あり)であったが、0と1が逆のフラグでもよい。例えば、タイル時ピクチャ間参照可能フラグtile_inpicture_ref_enabled_flagという名前で0の時に独立、1の時に従属となるフラグでもよい。
図4(c)に示すように、independent_tiles_flagが0の場合に参照ピクチャにかけるタイル境界でのループフィルタのオンオフを示す、loop_filter_across_tiles_enable_flagを伝送(present)する。independent_tiles_flagが1の場合において、loop_filter_across_tiles_enable_flagを伝送(present)せずに常に0としてもよい。
The parameter tile_parameters () regarding the tile is notified by the PPS (pic_parameter_set_rbsp ()) shown in FIG. 4 (b). Hereinafter, to notify the parameter means to include the parameter in the encoded data (bit stream), the moving image encoding device encodes the parameter, and the moving image decoding device decodes the parameter. As shown in FIG. 4C, tile_parameters () is notified of tile information tile_info () when tile_enabled_flag indicating whether or not a tile exists is 1. When tile_enabled_flag is 1, the independent_tiles_flag (independent_decoding_tile_flag) indicating whether the tile can be independently decoded over a plurality of temporally consecutive pictures is notified. When independent_tiles_flag is 0, the tile is decoded by referring to the adjacent tile in the reference picture (cannot be independently decoded). When independent_tiles_flag is 1, decoding is performed without referring to the adjacent tiles in the reference picture. When tiles are used, decoding is performed without referring to adjacent tiles in the current picture regardless of the value of independent_tiles_flag, and thus multiple tiles can be decoded in parallel. This independent_tiles_flag flag may be a flag independent_decoding_picture_region_flag for each region such as tile group or tile. The independent_tiles_flag is independent (no inter-picture reference) when 1 and dependent (inter-picture reference) when 0, but 0 and 1 may be reversed flags. For example, a tile-time inter-picture reference enable flag tile_inpicture_ref_enabled_flag may be a flag that is independent when 0 and is a subordinate when 1 is set.
As shown in FIG. 4C, when independent_tiles_flag is 0, loop_filter_across_tiles_enable_flag indicating ON / OFF of the loop filter at the tile boundary applied to the reference picture is transmitted (present). When independent_tiles_flag is 1, loop_filter_across_tiles_enable_flag may be always 0 without being transmitted (present).

なお、シーケンスを通してタイルを独立に処理する場合、独立タイルフラグindependent_tiles_flagは図4(a)に示すようにSPSで通知してもよい。   When the tiles are processed independently through the sequence, the independent tile flag independent_tiles_flag may be notified by SPS as shown in FIG. 4 (a).

タイル情報tile_info()は、例えば図4(d)に示すように、num_tile_columns_minus1、num_tile_rows_minus1、tile_unit_width_idc、tile_unit_height_idc、uniform_spacing_flag、column_width_in_unit_minus1[i]、row_height_in_unit_minus1[i]である。ここで、num_tile_columns_minus1、num_tile_rows_minus1は各々ピクチャ内の水平、垂直方向のタイル数M、Nから各々1を引いた値である。uniform_spacing_flagはピクチャが可能な限り均等にタイル分割されるか否かを示すフラグである。uniform_spacing_flagの値が1の場合、ピクチャの各タイルの幅、高さは所定のサイズを単位として可能な限り等しくなるよう、ピクチャ内の水平、垂直方向のタイル数と、タイルの最小単位を示す識別子(タイルユニット識別子)(tile_unit_width_idc、tile_unit_height_idc)から動画像符号化装置、動画像復号装置(ヘッダ復号部3020)において、タイルの幅、高さを導出する。   The tile information tile_info () is num_tile_columns_minus1, num_tile_rows_minus1, tile_unit_width_idc, tile_unit_height_idc, uniform_spacing_flag, column_width_in_unit_minus1 [i], row_height_in_unit_minus1 as shown in FIG. 4D, for example. Here, num_tile_columns_minus1 and num_tile_rows_minus1 are values obtained by subtracting 1 from the number of tiles M and N in the horizontal and vertical directions in the picture, respectively. uniform_spacing_flag is a flag indicating whether or not the picture is tiled as evenly as possible. If the value of uniform_spacing_flag is 1, the width and height of each tile of the picture are as equal as possible in the given size, and the number of horizontal and vertical tiles in the picture and the minimum unit of tiles. The tile width and height are derived from the (tile unit identifier) (tile_unit_width_idc, tile_unit_height_idc) in the moving image coding device and moving image decoding device (header decoding unit 3020).

ヘッダ復号部3020は、タイルユニット識別子tile_unit_width_idc、tile_unit_height_idcからタイルの最小単位wUnitTile、hUnitTileを導出する(詳細は後述)。   The header decoding unit 3020 derives tile minimum units wUnitTile and hUnitTile from the tile unit identifiers tile_unit_width_idc and tile_unit_height_idc (details will be described later).

wUnitTile = 1<<(log2CbSize+tile_unit_width_idc)
hUnitTile = 1<<(log2CbSize+tile_unit_height_idc)
ヘッダ復号部3020は、ピクチャ内の水平、垂直方向のタイル数M、Nを以下で導出する。
MはnumTileColumns、NはnumTileRowsである。
wUnitTile = 1 << (log2CbSize + tile_unit_width_idc)
hUnitTile = 1 << (log2CbSize + tile_unit_height_idc)
The header decoding unit 3020 derives the number of tiles M and N in the horizontal and vertical directions in the picture as follows.
M is numTileColumns and N is numTileRows.

M = num_tile_columns_minus1+1
N = num_tile_rows_minus1+1
numTileColumns = M = num_tile_columns_minus1+1
numTileRows = N = num_tile_columns_minus1+1
ヘッダ復号部3020は、タイルの最小サイズ(最小単位)wUnitTile、hUnitTileの倍数となるように、タイルサイズを以下で導出する。ここで、wPictInUnitTileとhPictInUnitTileは、それぞれ、wPictおよびhPictをwUnitTileおよびhUnitTileを単位として表した値である。
M = num_tile_columns_minus1 + 1
N = num_tile_rows_minus1 + 1
numTileColumns = M = num_tile_columns_minus1 + 1
numTileRows = N = num_tile_columns_minus1 + 1
The header decoding unit 3020 derives the tile size as follows so that it is a multiple of the minimum tile size (minimum unit) wUnitTile and hUnitTile. Here, wPictInUnitTile and hPictInUnitTile are values representing wPict and hPict in units of wUnitTile and hUnitTile, respectively.

wPictInUnitTile = ceil(wPict/wUnitTile)
hPictInUnitTile = ceil(hPict/hUnitTile)
wTile[m] = ceil(wPictInUnitTile/M)*wUnitTile (0<=m<M)
hTile[n] = ceil(hPictInUnitTile/N)*hUnitTile (0<=n<N)
あるいはヘッダ復号部3020は、下式で導出してもよい。
wPictInUnitTile = ceil (wPict / wUnitTile)
hPictInUnitTile = ceil (hPict / hUnitTile)
wTile [m] = ceil (wPictInUnitTile / M) * wUnitTile (0 <= m <M)
hTile [n] = ceil (hPictInUnitTile / N) * hUnitTile (0 <= n <N)
Alternatively, the header decoding unit 3020 may derive the following formula.

wTile[m] = floor(wPict/M/wUnitTile)*wUnitTile (0<=m<M)
hTile[n] = floor(hPict/N/hUnitTile)*hUnitTile (0<=n<N)
あるいはヘッダ復号部3020は、下式で導出してもよい。
wTile [m] = floor (wPict / M / wUnitTile) * wUnitTile (0 <= m <M)
hTile [n] = floor (hPict / N / hUnitTile) * hUnitTile (0 <= n <N)
Alternatively, the header decoding unit 3020 may derive the following formula.

for(m=0;m<M;m++)
wTile[m] = ((m+1)*wPictInUnitTile/M-m*wPictInUnitTile/M)*wUnitTile
for(n=0;n<N;n++)
hTile[n] = ((n+1)*hPictInUnitTile/N-n*hPictInUnitTile/N)*hUnitTile
uniform_spacing_flagの値が0の場合、ピクチャの各タイルの幅、高さは個別に設定される。動画像符号化装置では、各タイルの幅column_width_in_unit_minus1[i](図3のwTileを、wUnitTileを単位として表現した値)、高さrow_height_in_unit_minus1[i](図3のhTileを、hUnitTileを単位として表現した値)をタイル毎に符号化する。動画像復号装置のヘッダ復号部3020では、符号化された(column_width_in_unit_minus1[],row_width_in_unit_minus1[])に基づいてタイル毎に、タイルサイズwTile[m]、hTile[n]を下記のように復号する。
for (m = 0; m <M; m ++)
wTile [m] = ((m + 1) * wPictInUnitTile / Mm * wPictInUnitTile / M) * wUnitTile
for (n = 0; n <N; n ++)
hTile [n] = ((n + 1) * hPictInUnitTile / Nn * hPictInUnitTile / N) * hUnitTile
When the value of uniform_spacing_flag is 0, the width and height of each tile of the picture are set individually. In the moving picture coding device, the width of each tile column_width_in_unit_minus1 [i] (wTile in FIG. 3 is expressed in units of wUnitTile) and height row_height_in_unit_minus1 [i] (hTile in FIG. 3 is expressed in units of hUnitTile). Value) is encoded for each tile. The header decoding unit 3020 of the video decoding device decodes the tile sizes wTile [m] and hTile [n] for each tile based on the encoded (column_width_in_unit_minus1 [], row_width_in_unit_minus1 []) as follows.

wTile[m] = (column_width_in_unit_minus1[m]+1)*wUnitTile (0<=m<M-1)
hTile[n] = (row_height_in_unit_minus1[m]+1)*hUnitTile (0<=n<N-1)
wTile[M-1] = ceil((wPict-sum_m(wTile[m]))/wUnitTile)*wUnitTile
hTile[N-1] = ceil((hPict-sum_n(hTile[n]))/hUnitTile)*hUnitTile
ここで、sum_m(wTile[m])は、wTile(0<=m<M-1)の総和、sum_n(hTile[n])はhTile(0<=n<N-1)の総和を表す。
wTile [m] = (column_width_in_unit_minus1 [m] +1) * wUnitTile (0 <= m <M-1)
hTile [n] = (row_height_in_unit_minus1 [m] +1) * hUnitTile (0 <= n <N-1)
wTile [M-1] = ceil ((wPict-sum_m (wTile [m])) / wUnitTile) * wUnitTile
hTile [N-1] = ceil ((hPict-sum_n (hTile [n])) / hUnitTile) * hUnitTile
Here, sum_m (wTile [m]) represents the sum of wTile (0 <= m <M-1), and sum_n (hTile [n]) represents the sum of hTile (0 <= n <N-1).

あるいは、画面端にあたるwTile[M-1]およびhTile[N-1]は、ピクチャサイズがタイルの最小単位の整数倍でない場合には、単に下記のようにしてもよい。   Alternatively, wTile [M-1] and hTile [N-1] at the screen edge may be simply set as follows when the picture size is not an integral multiple of the minimum unit of tiles.

wTile[M-1] = wPict-sum_m(wTile[m])
hTile[N-1] = hPict-sum_n(hTile[n])
ただしこの場合は、処理単位がタイルの最小単位あるいは最小CUサイズに合致するように、パディングやクロッピングなどにより画面端が適切に処理されることが望ましい。
wTile [M-1] = wPict-sum_m (wTile [m])
hTile [N-1] = hPict-sum_n (hTile [n])
However, in this case, it is desirable that the screen edge is appropriately processed by padding, cropping, or the like so that the processing unit matches the minimum unit of tile or the minimum CU size.

なお、位置(m,n)のタイルは識別子TileIdでも表され、TileIdは下記で算出してもよい。   The tile at the position (m, n) is also represented by the identifier TileId, and TileId may be calculated as follows.

TileId = n*M+m
あるいは、TileIdが既知の場合、TileIdからタイルの位置を示す(m,n)を算出してもよい。
TileId = n * M + m
Alternatively, when TileId is known, (m, n) indicating the tile position may be calculated from TileId.

m = TileId%M
n = TileId/M
ヘッダ復号部3020は、タイルの大きさの単位を示すタイルユニット情報を復号する。タイルの幅と高さの最小単位をwUnitTile、hUnitTileとする場合、タイルの幅と高さは、各々wUnitTile、hUnitTileの整数倍に設定される。
m = TileId% M
n = TileId / M
The header decoding unit 3020 decodes tile unit information indicating a unit of tile size. When the minimum unit of the width and height of the tile is wUnitTile and hUnitTile, the width and height of the tile are set to integer multiples of wUnitTile and hUnitTile, respectively.

例えば、ヘッダ復号部3020は、符号化データからタイルユニット識別子としてtile_unit_width_idcとtile_unit_height_idcを復号する。タイルの大きさの単位は符号化ユニットCUの最小サイズの定数倍(1を含む)としてもよい。CTUの幅と高さが等しい正方形であれば、tile_unit_width_idcのみ復号して、tile_unit_height_idc=tile_unit_width_idcとし、タイルの大きさの単位を導出してもよい。このときtile_unit_height_idcをtile_unit_size_idcと呼んでも良い。   For example, the header decoding unit 3020 decodes tile_unit_width_idc and tile_unit_height_idc from the encoded data as tile unit identifiers. The unit of the tile size may be a constant multiple (including 1) of the minimum size of the coding unit CU. If the width and height of the CTU are the same square, only tile_unit_width_idc may be decoded to set tile_unit_height_idc = tile_unit_width_idc to derive the unit of tile size. At this time, tile_unit_height_idc may be called tile_unit_size_idc.

(設定方法1)
ヘッダ復号部3020は、タイルユニット識別子が0である場合には、タイルの大きさの単位をCTU単位として設定する。具体的には、tile_unit_width_idc=0の場合にwUnitTile=ctuWidth、tile_unit_width_idc=0の場合にhUnitTile=ctuHeightに設定する。ここで、ctuWidthはCTUの幅、ctuHeightはCTUの高さである。
(Setting method 1)
When the tile unit identifier is 0, the header decoding unit 3020 sets the tile size unit as the CTU unit. Specifically, when tile_unit_width_idc = 0, wUnitTile = ctuWidth, and when tile_unit_width_idc = 0, hUnitTile = ctuHeight. Here, ctuWidth is the width of the CTU and ctuHeight is the height of the CTU.

さらにヘッダ復号部3020は、以下のように、タイルユニット識別子が0以外である場合には、タイルの大きさの単位を符号化ユニットCUの最小サイズの定数倍になるように設定しても良い。   Further, the header decoding unit 3020 may set the unit of the tile size to be a constant multiple of the minimum size of the coding unit CU when the tile unit identifier is other than 0 as follows. .

wUnitTile = (tile_unit_width_idc==0) ? ctuWidth : 1<<(log2CbSize+tile_unit_width_idc-1)
hUnitTile = (tile_unit_height_idc==0) ? ctuHeight : 1<<(log2CbSize+tile_unit_height_idc-1)
ここで、log2CbSize=log2(minCU)、minCUは符号化ユニットCUの最小サイズである。
wUnitTile = (tile_unit_width_idc == 0)? ctuWidth: 1 << (log2CbSize + tile_unit_width_idc-1)
hUnitTile = (tile_unit_height_idc == 0)? ctuHeight: 1 << (log2CbSize + tile_unit_height_idc-1)
Here, log2CbSize = log2 (minCU), minCU is the minimum size of the coding unit CU.

なおCTUサイズctuSize=ctuWidth=ctuHeightは、以下のように、最小CUサイズを定めるシンタックス要素log2_min_luma_coding_block_size_minus3と、CUサイズを最小CUサイズとの差分との対数で示すシンタックス要素log2_diff_max_min_luma_coding_block_sizeを復号して導出しても良い。   The CTU size ctuSize = ctuWidth = ctuHeight is derived by decoding the syntax element log2_min_luma_coding_block_size_minus3, which defines the minimum CU size, and the syntax element log2_diff_max_min_luma_coding_block_size, which is the logarithm of the difference between the CU size and the minimum CU size, as follows. May be.

log2CbSize = log2_min_luma_coding_block_size_minus3+3
log2CtuSize = log2CbSize+log2_diff_max_min_luma_coding_block_size
minCU = 1 << log2CbSize
ctuSize = 1 << log2CtuSize
なお、タイルユニット識別子!=0の場合には、タイル単位を符号化ユニットCUの最小サイズの定数倍(2の指数乗)に設定しても良い。
log2CbSize = log2_min_luma_coding_block_size_minus3 + 3
log2CtuSize = log2CbSize + log2_diff_max_min_luma_coding_block_size
minCU = 1 << log2CbSize
ctuSize = 1 << log2CtuSize
When the tile unit identifier! = 0, the tile unit may be set to a constant multiple of the minimum size of the coding unit CU (exponentiation of 2).

wUnitTile = (tile_unit_width_idc==0) ? ctuWidth : 1<<(log2CbSize+ Log2DiffTileUnitSize)
hUnitTile = (tile_unit_height_idc==0) ? ctuHeight : 1<<(log2CbSize+ Log2DiffTileUnitSize)
ここでLog2DiffTileUnitSizeは、タイル単位を定める定数である。例えば1、2、3に設定することで、タイル単位が最小CUサイズの4、8、16倍に設定される。例えば、CUサイズが4の場合には、8、16、32に設定される。さらに最大値をCTUサイズとなるようにクリップしても良い。
wUnitTile = (tile_unit_width_idc == 0)? ctuWidth: 1 << (log2CbSize + Log2DiffTileUnitSize)
hUnitTile = (tile_unit_height_idc == 0)? ctuHeight: 1 << (log2CbSize + Log2DiffTileUnitSize)
Here, Log2DiffTileUnitSize is a constant that determines the tile unit. For example, by setting it to 1, 2, or 3, the tile unit is set to 4, 8, or 16 times the minimum CU size. For example, when the CU size is 4, it is set to 8, 16, 32. Further, the maximum value may be clipped so as to be the CTU size.

(設定方法2)
タイル情報は0から所定の範囲の数のタイルユニット識別子tile_unit_width_idcであり、タイルの大きさの単位を1<<(log2(minCU)+タイルユニット識別子)で設定してもよい。すなわち、ヘッダ復号部3020は、tile_unit_width_idc、tile_unit_height_idc(もしくはtile_unit_size_idc)を復号し、タイル単位を以下のように設定してもよい。
(Setting method 2)
The tile information is tile unit identifiers tile_unit_width_idc in the range of 0 to a predetermined number, and the unit of the tile size may be set as 1 << (log2 (minCU) + tile unit identifier). That is, the header decoding unit 3020 may decode tile_unit_width_idc and tile_unit_height_idc (or tile_unit_size_idc) and set the tile unit as follows.

wUnitTile = 1<<(log2CbSize+tile_unit_width_idc)
hUnitTile = 1<<(log2CbSize+tile_unit_height_idc)
CTUの幅と高さが等しい正方形であれば、以上はtile_unit_size_idcを復号し以下のように設定することと同値である。以下、自明であるので、正方形のみの場合の説明は省略する。
wUnitTile = 1 << (log2CbSize + tile_unit_width_idc)
hUnitTile = 1 << (log2CbSize + tile_unit_height_idc)
If the width and height of the CTU are equal squares, the above is equivalent to decoding tile_unit_size_idc and setting as follows. Hereinafter, since it is self-evident, the description of the case of only the square is omitted.

wUnitTile = hUnitTile = ctuSize>>tile_unit_size_idc
なお、タイルユニット識別子を明示的に符号化せず、タイル単位を符号化ユニットCUの最小サイズの定数倍(2の指数乗)に設定しても良い。
wUnitTile = hUnitTile = ctuSize >> tile_unit_size_idc
The tile unit identifier may not be explicitly encoded, and the tile unit may be set to be a constant multiple of the minimum size of the encoding unit CU (power of 2).

wUnitTile = 1<<(log2CbSize+Log2DiffTileUnitSize)
hUnitTile = 1<<(log2CbSize+Log2DiffTileUnitSize)
ここでLog2DiffTileUnitSizeは、タイル単位を定める定数である。さらに最大値がCTUサイズにクリップしても良い。
wUnitTile = 1 << (log2CbSize + Log2DiffTileUnitSize)
hUnitTile = 1 << (log2CbSize + Log2DiffTileUnitSize)
Here, Log2DiffTileUnitSize is a constant that determines the tile unit. The maximum value may be clipped to the CTU size.

wUnitTile = min(ctuWidth,1<<(log2CbSize+Log2DiffTileUnitSize))
hUnitTile = min(ctuHeight1<<(log2CbSize+Log2DiffTileUnitSize))
(設定方法3)
タイル情報は、0から所定の範囲の数のタイルユニット識別子であり、タイルの大きさの単位をCTUサイズの2の指数乗分の1となるように、1<<(log2(CTUサイズ)−タイルユニット識別子)で設定することを特徴とする。すなわち、ヘッダ復号部3020は、tile_unit_width_idc、tile_unit_height_idc(もしくはtile_unit_size_idc)を復号し、タイル単位を以下のように設定してもよい。
wUnitTile = min (ctuWidth, 1 << (log2CbSize + Log2DiffTileUnitSize))
hUnitTile = min (ctuHeight1 << (log2CbSize + Log2DiffTileUnitSize))
(Setting method 3)
The tile information is a number of tile unit identifiers ranging from 0 to a predetermined range, and the unit of tile size is 1 << (log2 (CTU size)- Tile unit identifier) is set. That is, the header decoding unit 3020 may decode tile_unit_width_idc and tile_unit_height_idc (or tile_unit_size_idc) and set the tile unit as follows.

wUnitTile = 1<<(log2CtuWidthY-tile_unit_width_idc)
hUnitTile = 1<<(log2CtuHeightY-tile_unit_height_idc)
ここで、log2CtuWidthY=log2(ctuWidth)、log2CtuHeightY=log2(ctuHeight)である。
wUnitTile = 1 << (log2CtuWidthY-tile_unit_width_idc)
hUnitTile = 1 << (log2CtuHeightY-tile_unit_height_idc)
Here, log2CtuWidthY = log2 (ctuWidth) and log2CtuHeightY = log2 (ctuHeight).

なお、CTUサイズの幅と高さを同じ値に設定しても良い。   The width and height of the CTU size may be set to the same value.

wUnitTile = 1<<(log2CtuSize-tile_unit_width_idc)
hUnitTile = 1<<(log2CtuSize-tile_unit_height_idc)
ここで、log2CtuSize=log2(ctuWidth)=log2(ctuHeight)である。
この場合、差分の対数での表現になるのでtile_unit_width_idcをlog2_diff_luma_tile_unit_sizeと呼ぶのも適当である。
wUnitTile = 1 << (log2CtuSize-tile_unit_width_idc)
hUnitTile = 1 << (log2CtuSize-tile_unit_height_idc)
Here, log2CtuSize = log2 (ctuWidth) = log2 (ctuHeight).
In this case, it is appropriate to call tile_unit_width_idc log2_diff_luma_tile_unit_size because the difference is expressed in logarithm.

なお、以下のようにタイル単位が8の倍数の最小サイズとなるようにクリップしても良い。   Note that the tile unit may be clipped to have a minimum size that is a multiple of 8 as follows.

wUnitTile = max(8, ctuWidth>>tile_unit_width_idc)
hUnitTile = max(8, ctuHeight>>tile_unit_height_idc)
これによって、常にタイル幅が8の倍数となるため(設定方法5)に示す効果も奏する。
wUnitTile = max (8, ctuWidth >> tile_unit_width_idc)
hUnitTile = max (8, ctuHeight >> tile_unit_height_idc)
As a result, the tile width is always a multiple of 8, and the effect shown in (Setting method 5) is also obtained.

また、以下のように単位サイズをminCTUサイズとなるようにクリップしても良い。   Also, the unit size may be clipped to be the minCTU size as follows.

wUnitTile = max(minCTU, ctuWidth>>tile_unit_width_idc)
hUnitTile = max(minCTU, ctuHeight>>tile_unit_height_idc)
これによって、常にタイル幅がCTUの最小サイズの倍数となるため(設定方法5)に示す効果も奏する。
wUnitTile = max (minCTU, ctuWidth >> tile_unit_width_idc)
hUnitTile = max (minCTU, ctuHeight >> tile_unit_height_idc)
As a result, the tile width is always a multiple of the minimum size of the CTU, and the effect shown in (Setting method 5) is also obtained.

さらに、tile_unit_width_idcの取り得る範囲を制限しても良い。例えば、ctuWidth>>tile_unit_width_idcの最小値をminCTUとする場合、
ctuWidth>>tile_unit_width_idc >= minCTU
ctuWidth >= minCTU<< tile_unit_width_idc
ctuWidth >= minCTU * (1<<tile_unit_width_idc)
(1<<tile_unit_width_idc) <= ctuWidth/minCTU
tile_unit_width_idc <= log2(ctuWidth)-log2(minCTU)
であるから、tile_unit_width_idcを0以上log2(ctuWidth)-log2(minCTU)以下に制限する。すなわち、動画像復号装置は、0以上log2(ctuWidth)-log2(minCTU)以下に制限された符号化データを復号することにより、minCTUの倍数であるタイル単位を用いることができる。
Furthermore, the range that tile_unit_width_idc can take may be limited. For example, if the minimum value of ctuWidth >> tile_unit_width_idc is minCTU,
ctuWidth >>tile_unit_width_idc> = minCTU
ctuWidth> = minCTU << tile_unit_width_idc
ctuWidth> = minCTU * (1 << tile_unit_width_idc)
(1 << tile_unit_width_idc) <= ctuWidth / minCTU
tile_unit_width_idc <= log2 (ctuWidth) -log2 (minCTU)
Therefore, tile_unit_width_idc is limited to 0 or more and log2 (ctuWidth) -log2 (minCTU) or less. That is, the moving image decoding apparatus can use the tile unit that is a multiple of minCTU by decoding the encoded data limited to 0 or more and log2 (ctuWidth) -log2 (minCTU) or less.

同様に、0以上log2(ctuWidth)-log2(8)=log2(ctuWidth)-3以下に制限された符号化データを復号することにより8の倍数であるタイル単位を用いることができる。8の倍数でなく16、32の倍数の場合には、上記の3(log2(8))を4、5とすればよい。   Similarly, a tile unit that is a multiple of 8 can be used by decoding encoded data that is limited to 0 or more and log2 (ctuWidth) -log2 (8) = log2 (ctuWidth) -3 or less. In the case of a multiple of 16 or 32 instead of a multiple of 8, the above 3 (log2 (8)) may be set to 4, 5.

(設定方法4)
タイル情報は、0から所定の範囲の数のタイルユニット識別子であり、タイルの大きさの単位をCTUサイズの2の指数乗分の1となるように、CTUサイズ>>タイルユニット識別子で設定することを特徴とする。すなわち、ヘッダ復号部3020は、tile_unit_width_idc、tile_unit_height_idc(もしくはtile_unit_size_idc)を復号し、タイル単位を以下のように設定してもよい。
(Setting method 4)
The tile information is a number of tile unit identifiers ranging from 0 to a predetermined range, and the unit of the tile size is set by CTU size >> tile unit identifier so that the unit of the tile size is 1/2 of the CTU size. It is characterized by That is, the header decoding unit 3020 may decode tile_unit_width_idc and tile_unit_height_idc (or tile_unit_size_idc) and set the tile unit as follows.

wUnitTile = ctuWidth>>tile_unit_width_idc
hUnitTile = ctuHeight>>tile_unit_height_idc
設定方法3と設定方法4は同値であるから、tile_unit_width_idc、tile_unit_height_idc(もしくはtile_unit_size_idc)の制限は(設定方法3)で説明した方法が利用できる。
wUnitTile = ctuWidth >> tile_unit_width_idc
hUnitTile = ctuHeight >> tile_unit_height_idc
Since the setting method 3 and the setting method 4 have the same value, the method described in (Setting method 3) can be used to limit tile_unit_width_idc and tile_unit_height_idc (or tile_unit_size_idc).

(設定方法5)
ヘッダ復号部3020は、タイルユニット識別子(tile_unit_width_idc、tile_unit_height_idc)を復号せず、所定の値TileUnitをwUnitTile、hUnitTileに設定する。所定の値TileUnitは8の倍数、特に8、16、32の何れかであることが好ましい。タイル情報tile_info()は図4(d)に替えて図23(d)のように通知され、ヘッダ復号部3020はこのタイル情報を復号する。
(Setting method 5)
The header decoding unit 3020 does not decode the tile unit identifiers (tile_unit_width_idc, tile_unit_height_idc) and sets a predetermined value TileUnit to wUnitTile and hUnitTile. The predetermined value TileUnit is preferably a multiple of 8, particularly any of 8, 16, and 32. The tile information tile_info () is notified as shown in FIG. 23 (d) instead of FIG. 4 (d), and the header decoding unit 3020 decodes this tile information.

wUnitTile = TileUnit
hUnitTile = TileUnit
ここで、TileUnitは8あるいは16、32のように8の倍数とする。タイル単位を8の倍数と
すれば、画素のbitDepthが10bitなど8の倍数でない場合にも、タイル幅の画素データは8の倍数とすることができる。これによりメモリ配置する場合にもタイル境界が常にバイト(8bit)境界となり、タイルをメモリに配置する場合において、タイル間にメモリのギャップが不要である。ギャップがなければ、ギャップ分のメモリは不要で、連続的に転送可能であることから、メモリサイズを低減できるとともに高速転送が可能という効果を奏する。さらに16の倍数であれば、タイル幅のデータを常に128bitの倍数とすることができ(bitDepth=8bitの場合)、多くのメモリ(例えばDDR)のバーストアクセスで高速アクセスが可能となる。
wUnitTile = TileUnit
hUnitTile = TileUnit
Here, TileUnit is a multiple of 8 such as 8 or 16, 32. If the tile unit is a multiple of 8, even if the bitDepth of the pixel is not a multiple of 8, such as 10 bits, the pixel data of the tile width can be a multiple of 8. As a result, even when the tiles are arranged in the memory, the tile boundaries are always byte (8 bit) boundaries, and when the tiles are arranged in the memory, no memory gap is required between the tiles. If there is no gap, the memory for the gap is unnecessary and continuous transfer is possible, so that the memory size can be reduced and high-speed transfer can be achieved. Furthermore, if it is a multiple of 16, tile width data can always be a multiple of 128 bits (when bitDepth = 8 bits), and high-speed access is possible with burst access of many memories (for example, DDR).

さらに、16、32の場合には後述の最小CTUサイズと一致するという効果を奏する。   Further, in the case of 16 and 32, there is an effect that it matches the minimum CTU size described later.

(設定方法6)
ヘッダ復号部3020は、タイルユニット識別子(tile_unit_width_idc、tile_unit_height_idc)を復号せず、所定の値TileUnitをwUnitTile、hUnitTileに設定する。所定の値TileUnitはCTUの最小サイズ(最小CTUサイズ)であることが好ましい。この場合、タイル情報tile_info()は図4(d)に替えて図23(d)のように通知され、ヘッダ復号部3020はこのタイル情報を復号する。
(Setting method 6)
The header decoding unit 3020 does not decode the tile unit identifiers (tile_unit_width_idc, tile_unit_height_idc) and sets a predetermined value TileUnit to wUnitTile and hUnitTile. The predetermined value TileUnit is preferably the minimum CTU size (minimum CTU size). In this case, the tile information tile_info () is notified as shown in FIG. 23 (d) instead of FIG. 4 (d), and the header decoding unit 3020 decodes this tile information.

wUnitTile = TileUnit
hUnitTile = TileUnit
TileUnit = 1<<(log2_min_luma_coding_tree_block_size_minus4+4)
ここで、log2_min_luma_coding_block_size_minus4は、CTUの最小サイズの2のべき乗表現から4を引いた値である。例えば、0、1、2、3であれば各々最小CTUサイズは、16、32、64、128である。なお最小CTUサイズを定めるlog2_min_luma_coding_block_size_minus4はシンタックス要素として符号化データで符号化しても良いし定数でもよい。例えば定数の場合には、通例最小CTUサイズは、16、32であるため(設定方法5)と一致する。
wUnitTile = TileUnit
hUnitTile = TileUnit
TileUnit = 1 << (log2_min_luma_coding_tree_block_size_minus4 + 4)
Here, log2_min_luma_coding_block_size_minus4 is a value obtained by subtracting 4 from the power of 2 representation of the minimum size of the CTU. For example, if 0, 1, 2, and 3, the minimum CTU sizes are 16, 32, 64, and 128, respectively. Note that log2_min_luma_coding_block_size_minus4, which determines the minimum CTU size, may be encoded with encoded data as a syntax element or may be a constant. For example, in the case of a constant, the minimum CTU size is usually 16 or 32, which is consistent with (setting method 5).

最小CTUサイズは、動画像復号装置の機能や能力を規定するプロファイルやレベルで設定しても良い。プロファイルやレベルは、機器間のネゴーシエ―ションに用いられるため比較的上位のパラメータセットやヘッダ、例えば、SPSのシンタックス要素profile_idc、level_idcで伝送される。   The minimum CTU size may be set by a profile or level that defines the function or ability of the moving picture decoding apparatus. Since the profile and level are used for negotiation between devices, they are transmitted in relatively higher parameter sets and headers, for example, SPS syntax elements profile_idc and level_idc.

タイル単位を最小CTUサイズの倍数とする場合、タイル幅は常に最小CTUサイズの倍数となる。通例、ピクチャをメモリに格納する場合にはCTUサイズの取り得る範囲が限定的である(例えば、16、32、64)であることに基づいてメモリ配置を最適化する。タイル幅がCTUサイズの整数倍(2の指数乗)であれば、ピクチャと同様の方法でタイルの場合もメモリ配置ができるので、画像を省メモリかつ高速アクセス可能となる効果を奏する。   When the tile unit is a multiple of the minimum CTU size, the tile width is always a multiple of the minimum CTU size. Typically, when storing pictures in memory, memory allocation is optimized based on the limited range of CTU sizes (eg, 16, 32, 64). If the tile width is an integral multiple of the CTU size (exponential power of 2), the memory can be arranged even in the case of tiles by the same method as the picture, so that the image can be saved in memory and can be accessed at high speed.

(設定方法7)
タイル情報は、0から所定の範囲の数のタイルユニット識別子であり、タイルの大きさの単位を最小CTUサイズの整数倍(2の指数乗)となるように、1<<(log2(最小CTUサイズ)+タイルユニット識別子)で設定する。(設定方法7)では、タイルユニット識別子は最小CTUサイズの倍数を対数表現したものである。すなわち、ヘッダ復号部3020は、tile_unit_width_idcを復号し、タイル単位を以下のように設定してもよい。
(Setting method 7)
The tile information is a number of tile unit identifiers ranging from 0 to a predetermined range, and 1 << (log2 (minimum CTU Size) + tile unit identifier). In (Setting method 7), the tile unit identifier is a logarithmic representation of a multiple of the minimum CTU size. That is, the header decoding unit 3020 may decode tile_unit_width_idc and set the tile unit as follows.

wUnitTile = 1<<(log2CtuUnitSize+tile_unit_width_idc)
hUnitTile = 1<<(log2CtuUnitSize+tile_unit_height_idc)
ここで、CTUの最小サイズminCTU=ctuUnitSize=1<<(log2_min_luma_coding_tree_block_size_minus4+4)、log2CtuUnitSize=log2_min_luma_coding_tree_block_size_minus4+4であってもよい。
wUnitTile = 1 << (log2CtuUnitSize + tile_unit_width_idc)
hUnitTile = 1 << (log2CtuUnitSize + tile_unit_height_idc)
Here, the minimum size of CTU may be minCTU = ctuUnitSize = 1 << (log2_min_luma_coding_tree_block_size_minus4 + 4), log2CtuUnitSize = log2_min_luma_coding_tree_block_size_minus4 + 4.

(設定方法8)
タイル情報は、0から所定の範囲の数のタイルユニット識別子であり、タイルの大きさの単位を最大CTUサイズ>>タイルユニット識別子で設定する。(設定方法8)では、タイルユニット識別子は最大CTUサイズの倍数(2のべき乗分の1倍)を対数表現したものである。すなわち、ヘッダ復号部3020は、tile_unit_width_idcを復号し、タイル単位を以下のように設定してもよい。
(Setting method 8)
The tile information is a number of tile unit identifiers ranging from 0 to a predetermined range, and the unit of the tile size is set as the maximum CTU size >> tile unit identifier. In (Setting Method 8), the tile unit identifier is a logarithmic representation of a multiple (one power of 2) of the maximum CTU size. That is, the header decoding unit 3020 may decode tile_unit_width_idc and set the tile unit as follows.

wUnitTile = ctuUnitSize>>tile_unit_width_idc
hUnitTile = ctuUnitSize>>tile_unit_height_idc
(設定方法9)
(設定方法9)では、図24(a)に示すように、tile_parameters()およびタイル情報tile_info()をPPSではなく、SPSで通知する。図24(c)に示すように、タイルの最小単位はlog2_min_unit_tile_size_minus3で通知される。ヘッダ復号部3020はこのタイル情報を復号し、タイルの最小単位(wUnitTile、hUnitTile)を導出する。
wUnitTile = ctuUnitSize >> tile_unit_width_idc
hUnitTile = ctuUnitSize >> tile_unit_height_idc
(Setting method 9)
In (Setting method 9), as shown in FIG. 24 (a), tile_parameters () and tile information tile_info () are notified by SPS instead of PPS. As shown in FIG. 24 (c), the minimum unit of tile is notified by log2_min_unit_tile_size_minus3. The header decoding unit 3020 decodes this tile information and derives the minimum tile unit (wUnitTile, hUnitTile).

wUnitTile = 1<<(log2_min_unit_tile_size_minus3+3)
hUnitTile = 1<<(log2_min_unit_tile_size_minus3+3)
ここでlog2_min_unit_tile_size_minus3は、タイルの最小単位の最小値の2のべき乗表現から3を引いた値であり、0以上の整数である。従ってタイルの最小単位は8以上である。
wUnitTile = 1 << (log2_min_unit_tile_size_minus3 + 3)
hUnitTile = 1 << (log2_min_unit_tile_size_minus3 + 3)
Here, log2_min_unit_tile_size_minus3 is a value obtained by subtracting 3 from the power of 2 of the minimum value of the minimum unit of tile, and is an integer of 0 or more. Therefore, the minimum unit of tile is 8 or more.

また別の例として、図25(a)に示すように、タイル情報としてlog2_diff_curr_min_unit_tile_sizeのみを通知してもよい。log2_diff_curr_min_unit_tile_sizeは、当該SPSでのタイルサイズの最小単位と、CTUの最小サイズとの差分である。ヘッダ復号部3020はこのタイル情報を復号し、タイルの最小単位(wUnitTile、hUnitTile)を導出する。   As another example, as shown in FIG. 25 (a), only log2_diff_curr_min_unit_tile_size may be notified as tile information. log2_diff_curr_min_unit_tile_size is the difference between the minimum unit of tile size in the SPS and the minimum size of CTU. The header decoding unit 3020 decodes this tile information and derives the minimum tile unit (wUnitTile, hUnitTile).

wUnitTile = 1<<( log2CtuSize + log2_diff_curr_min_unit_tile_size )
hUnitTile = 1<<( log2CtuSize + log2_diff_curr_min_unit_tile_size )
(設定方法10)
(設定方法10)では、(設定方法9)に対し、当該SPSでのタイルサイズの最小単位は当該SPSでのCTUサイズを超えない制約を設ける。従って、log2_diff_curr_min_unit_tile_sizeは下式を満たす値でなければならない。
wUnitTile = 1 << (log2CtuSize + log2_diff_curr_min_unit_tile_size).
hUnitTile = 1 << (log2CtuSize + log2_diff_curr_min_unit_tile_size).
(Setting method 10)
In (Setting method 10), a restriction is imposed on (Setting method 9) so that the minimum unit of tile size in the SPS does not exceed the CTU size in the SPS. Therefore, log2_diff_curr_min_unit_tile_size must be a value that satisfies the following formula.

0<=log2_diff_curr_min_unit_tile_size<=log2_diff_max_min_luma_coding_block_sizeここで、log2_diff_max_min_luma_coding_block_sizeは、CTUの最大および最小サイズの2のべき乗表現の差分である。   0 <= log2_diff_curr_min_unit_tile_size <= log2_diff_max_min_luma_coding_block_size where log2_diff_max_min_luma_coding_block_size is the difference between the power of 2 of the maximum and minimum CTU sizes.

(設定方法11)
(設定方法11)では、図26に示すように、tile_parameters()およびタイル情報tile_info()をPPSで通知する。図26(a)および(d)に示すように、タイルの最小単位はSPSで通知されるCTUの最小サイズおよびPPSで通知されるタイル情報(log2_diff_curr_min_unit_tile_size)を用いて導出される。log2_diff_curr_min_unit_tile_sizeは、タイルサイズの最小単位とCTUの最小サイズとの差分である。ヘッダ復号部3020はこのタイル情報を復号し、wUnitTile、hUnitTileを導出する。
(Setting method 11)
In (Setting method 11), as shown in FIG. 26, tile_parameters () and tile information tile_info () are notified by PPS. As shown in FIGS. 26A and 26D, the minimum unit of tile is derived using the minimum size of CTU notified by SPS and the tile information (log2_diff_curr_min_unit_tile_size) notified by PPS. log2_diff_curr_min_unit_tile_size is the difference between the minimum unit of tile size and the minimum size of CTU. The header decoding unit 3020 decodes this tile information and derives wUnitTile and hUnitTile.

wUnitTile = 1<<(log2CtuSize+log2_diff_curr_min_unit_tile_size)
hUnitTile = 1<<(log2CtuSize+log2_diff_curr_min_unit_tile_size)
(設定方法12)
(設定方法12)では、independent_tiles_flagを参照してTileUnitをwUnitTile、hUnitTileを導出する。independent_tiles_flag=1、すなわち各タイルを独立(他のタイルを
参照せず)に処理できる場合は、そうでない場合よりもタイルのタイル単位(最小単位)を小さく設定する。例えば、(設定方法5)において、independent_tiles_flag=1の場合は所定の値TileUnitを8に設定し、independent_tiles_flag=0の場合は所定の値TileUnitを16に設定する。
wUnitTile = 1 << (log2CtuSize + log2_diff_curr_min_unit_tile_size)
hUnitTile = 1 << (log2CtuSize + log2_diff_curr_min_unit_tile_size)
(Setting method 12)
In (Setting method 12), wUnitTile and hUnitTile are derived from TileUnit by referring to independent_tiles_flag. independent_tiles_flag = 1, that is, when each tile can be processed independently (without referring to other tiles), the tile unit (minimum unit) of the tile is set to be smaller than that otherwise. For example, in (setting method 5), the predetermined value TileUnit is set to 8 when independent_tiles_flag = 1, and the predetermined value TileUnit is set to 16 when independent_tiles_flag = 0.

また別の例として、(設定方法6)において、independent_tiles_flag=1の場合は所定の値TileUnitをCTUの最小サイズ(最小CTUサイズ)以下の値に設定し、independent_tiles_flag=0の場合は所定の値TileUnitをCTUの最小サイズ(最小CTUサイズ)に設定する。   As another example, in (setting method 6), when the independent_tiles_flag = 1, the predetermined value TileUnit is set to a value equal to or smaller than the minimum CTU size (minimum CTU size), and when the independent_tiles_flag = 0, the predetermined value TileUnit is set. To the minimum CTU size (minimum CTU size).

また別の例として、(設定方法6)において、independent_tiles_flag=1の場合は所定の値TileUnitをCTUサイズ以下の値に設定し、independent_tiles_flag=0の場合は所定の値TileUnitをCTUサイズに設定する。例えば、independent_tiles_flag=1の場合は所定の値TileUnitを8、16、32の何れか、0の場合にはCTUサイズを用いる。   As another example, in (setting method 6), when the independent_tiles_flag = 1, the predetermined value TileUnit is set to a value equal to or smaller than the CTU size, and when the independent_tiles_flag = 0, the predetermined value TileUnit is set to the CTU size. For example, when independent_tiles_flag = 1, the predetermined value TileUnit is any of 8, 16, and 32, and when 0, the CTU size is used.

あるいは、別の例として、(設定方法6)において、independent_tiles_flag=1の場合は所定の値TileUnitをCTUの最小サイズ(最小CTUサイズ)に設定し、independent_tiles_flag=0の場合は所定の値TileUnitをCTUサイズに設定する。   Alternatively, as another example, in (Setting method 6), when the independent_tiles_flag = 1, the predetermined value TileUnit is set to the minimum size of the CTU (minimum CTU size), and when the independent_tiles_flag = 0, the predetermined value TileUnit is set to the CTU. Set to size.

independent_tiles_flagが1、すなわち、互いに参照することなく、独立に復号されるタイルでは、タイル同士を独立にメモリ配置できる(すなわち、タイル間にメモリ上のギャップが発生しても問題ない)ため、小さな値であってもメモリ配置に問題が生じない。これにより独立復号可能な領域の場合には、フレキシブルにタイルサイズを決定できるという効果を奏する。   Independent_tiles_flag is 1, that is, in tiles that are independently decoded without referring to each other, tiles can be placed in memory independently (that is, there is no problem if a memory gap occurs between tiles), so a small value However, there is no problem in memory allocation. As a result, in the case of an independently decodable area, the tile size can be flexibly determined.

(設定方法13)
(設定方法13)では、所定の値TileUnitを他の処理の単位に合わせて設定する。例えば予測の単位(サブCU)を所定の値TileUnitとして設定する。あるいはTMVP用に動きベクトルを格納する単位を所定の値TileUnitとして設定する。例えば、TMVP用の動きベクトル格納単位が8x8の場合、TileUnit=8に設定する。あるいは量子化パラメータを更新する単位を所定の値TileUnitとして設定する。例えば、差分量子化パラメータを通知する単位が16x16の場合、TileUnit=16に設定する。
(Setting method 13)
In (Setting method 13), the predetermined value TileUnit is set according to the unit of other processing. For example, a prediction unit (sub CU) is set as a predetermined value TileUnit. Alternatively, the unit for storing the motion vector for TMVP is set as a predetermined value TileUnit. For example, if the motion vector storage unit for TMVP is 8x8, set TileUnit = 8. Alternatively, the unit for updating the quantization parameter is set as a predetermined value TileUnit. For example, when the unit of notifying the difference quantization parameter is 16x16, TileUnit = 16 is set.

(設定方法14)
(設定方法14)では、所定の値TileUnitを、タイルの水平方向については最小CTUサイズの整数倍ctuSize、垂直方向については8もしくは16に設定する。ヘッダ復号部3020はこのタイル情報を復号する。例えば下式でタイルの最小単位を設定する。
(Setting method 14)
In (Setting method 14), the predetermined value TileUnit is set to an integer multiple ctuSize of the minimum CTU size in the horizontal direction of the tile and 8 or 16 in the vertical direction. The header decoding unit 3020 decodes this tile information. For example, the minimum unit of tile is set by the following formula.

wUnitTile = ctuSize
hUnitTile = 8
(タイル情報設定部)
タイル情報設定部は、タイルの最小単位wUnitTile、hUnitTileに基づいて、タイルの左上座標(xTile, yTile)を設定する。さらに、タイル情報設定部は、タイルのCTU単位の幅tileWidthInCtus(=TileWidthInCtbsY)と高さtileHeightInCtus(=TileHeightInCtbsY)を設定する。
wUnitTile = ctuSize
hUnitTile = 8
(Tile information setting section)
The tile information setting unit sets the upper left coordinates (xTile, yTile) of the tile based on the minimum unit wUnitTile and hUnitTile of the tile. Furthermore, the tile information setting unit sets the tile width CTW unit width tileWidthInCtus (= TileWidthInCtbsY) and height tileHeightInCtus (= TileHeightInCtbsY).

(ステップ1)
タイルの最小単位wUnitTile、hUnitTileと画面幅wPict、hPictから、タイル単位(wUnitTile, hUnitTile)での画面幅wPictInUnitTile, hPictInUnitTileを導出する。
(Step 1)
The screen width wPictInUnitTile, hPictInUnitTile in tile units (wUnitTile, hUnitTile) is derived from the minimum unit wUnitTile, hUnitTile of tiles and the screen width wPict, hPict.

wPictInUnitTile = divRoundUp(wPict,wUnitTile)
hPictInUnitTile = divRoundUp(hPict,hUnitTile)
ここでdivRoundUp(x,y) = (x+y-1)/y
つまり、xをyで除算した値以上の最小の整数を返す。すなわち、ceil(x/y)としてもよい。
wPictInUnitTile = divRoundUp (wPict, wUnitTile)
hPictInUnitTile = divRoundUp (hPict, hUnitTile)
Where divRoundUp (x, y) = (x + y-1) / y
That is, it returns the smallest integer greater than or equal to x divided by y. That is, it may be ceil (x / y).

(ステップ2)
タイル情報設定部は、タイル単位の位置(col, row)で示されるタイルのピクチャ内の左上座標(xTile, yTile)を導出する。以下、ピクチャ内の座標とは、ピクチャ左上を(0, 0)とするピクチャ座標系の座標であり、タイル内の座標とは、各タイルの左上を(0, 0)とするタイル座標系の座標を意味する。タイルのコラム位置colを0からタイルのコラム数numTileColumns-1までループし、最小単位wUnitTileを用いて、各colの各タイルのX座標tx[col]と幅tw[col]を導出する。同様に、タイルのrow位置rowを0からタイルのrow数numTileRows-1までループし、最小単位hUnitTileを用いて、各rowの各タイルのY座標ty[row]と高さth[row]を導出する。
(Step 2)
The tile information setting unit derives the upper left coordinates (xTile, yTile) in the picture of the tile indicated by the position (col, row) in tile units. Hereinafter, the coordinates in the picture are the coordinates in the picture coordinate system where the upper left of the picture is (0, 0), and the coordinates in the tile are the coordinates of the tile coordinate system in which the upper left of each tile is (0, 0). Means coordinates. The tile column position col is looped from 0 to the number of tile columns numTileColumns-1, and the minimum unit wUnitTile is used to derive the X coordinate tx [col] and width tw [col] of each tile of each col. Similarly, the row position row of the tile is looped from 0 to the number of tile rows numTileRows-1 and the minimum unit hUnitTile is used to derive the Y coordinate ty [row] and height th [row] of each tile of each row. To do.

タイル情報設定部は、uniform_spacing_flagが1の場合には、画面をnumTileColumns x
numTileRows (= M x N)にタイル分割し、タイルサイズtw[col]、th[row]とタイルのX座標tx[col]、Y座標ty[row]を導出する。具体的には、以下の擬似コードのように、ピクチャの幅wPict、タイルのコラム数numTileColumnsを用いて、tx[col]、tw[col]を導出し、ピクチャの幅hPict、タイルのコラム数numTileRowsを用いて、ty[row]、th[row]を導出する。tyおよびtwは、前出のhTileおよびwTileとして先に求めておいた値を用いてもよい。なお、wPict-tx[col]とtw[col]についてmin()を適用しているのは、タイルが画面端を超える大きさにならないようにするためである。
When the uniform_spacing_flag is 1, the tile information setting unit displays the screen with numTileColumns x
Divide tiles into numTileRows (= M x N) and derive tile sizes tw [col], th [row] and tile X coordinates tx [col], Y coordinates ty [row]. Specifically, as in the pseudo code below, tx [col] and tw [col] are derived using the picture width wPict and the number of tile columns numTileColumns, and the picture width hPict and the number of tile columns numTileRows Is used to derive ty [row] and th [row]. The values previously obtained as hTile and wTile described above may be used for ty and tw. It should be noted that the reason why min () is applied to wPict-tx [col] and tw [col] is to prevent the tile from becoming larger than the screen edge.

for(col=0; col < numTileColumns; col++)
{
tx[col] = wUnitTile*(col*wPictInUnitTile/numTileColumns)
tw[col] = wUnitTile*((col+1)*wPictInUnitTile/numTileColumns)-tx[col]
tw[col] = min(wPict-tx[col],tw[col])
}
for(row=0; row < numTileRows; row++)
{
ty[row] = hUnitTile*(row*hPictInUnitTile/numTileRows)
th[row] = hUnitTile*((row+1)*hPictInUnitTile/numTileRows)-ty[row]
th[row] = min(hPict-ty[row],th[row])
}
タイル情報設定部は、uniform_spacing_flagが0の場合には、タイルサイズwTile(col), hTile(row)を用いて画面を分割しタイルのX座標tx[col]、Y座標ty[row]を導出する。
具体的には、以下の擬似コードのように、ピクチャの幅wPictとタイルのコラム幅wTile[col]を用いて、tx[col]を導出し、ピクチャの高さhPict、タイルのロウ高さhTile[row]を用いて、ty[row]を導出する。
for (col = 0; col <numTileColumns; col ++)
{
tx [col] = wUnitTile * (col * wPictInUnitTile / numTileColumns)
tw [col] = wUnitTile * ((col + 1) * wPictInUnitTile / numTileColumns) -tx [col]
tw [col] = min (wPict-tx [col], tw [col])
}
for (row = 0; row <numTileRows; row ++)
{
ty [row] = hUnitTile * (row * hPictInUnitTile / numTileRows)
th [row] = hUnitTile * ((row + 1) * hPictInUnitTile / numTileRows) -ty [row]
th [row] = min (hPict-ty [row], th [row])
}
When the uniform_spacing_flag is 0, the tile information setting unit divides the screen using the tile sizes wTile (col) and hTile (row) and derives the X coordinate tx [col] and Y coordinate ty [row] of the tile. .
Specifically, as in the pseudo code below, tx [col] is derived using the picture width wPict and the tile column width wTile [col], and the picture height hPict and tile row height hTile are derived. Derive ty [row] using [row].

for(col=0;col<numTileColumns-1;col++)
{
tw[col] = wTile[col] = (column_width_in_unit_minus1[col]+1)*wUnitTile
tx[col+1] = tx[col]+tw[col]
}
tw[numTileColumns-1] = wPict-tx[numTileColumns-1]
for(row=0;row<numTileRows-1;row++)
{
th[row] = hTile[row] = (column_height_in_unit_minus1[row]+1)*hUnitTile
ty[row+1] = ty[row]+th[row]
}
th[numTileRows-1] = hPict-ty[numTileRows-1]
タイル情報設定部は、導出されたタイルのX座標tx[col]、Y座標ty[row]とタイルサイズtw[col]、th[row]を、タイルIDで示されるタイルのピクチャ内左上座標xTile[TileId]、yTile[TileId]、タイルサイズwTile[TileId]、hTile[TileId]に格納する。
for (col = 0; col <numTileColumns-1; col ++)
{
tw [col] = wTile [col] = (column_width_in_unit_minus1 [col] +1) * wUnitTile
tx [col + 1] = tx [col] + tw [col]
}
tw [numTileColumns-1] = wPict-tx [numTileColumns-1]
for (row = 0; row <numTileRows-1; row ++)
{
th [row] = hTile [row] = (column_height_in_unit_minus1 [row] +1) * hUnitTile
ty [row + 1] = ty [row] + th [row]
}
th [numTileRows-1] = hPict-ty [numTileRows-1]
The tile information setting unit sets the X coordinate tx [col], Y coordinate ty [row] and tile size tw [col], th [row] of the derived tile to the upper left coordinate xTile in the picture of the tile indicated by the tile ID. Store in [TileId], yTile [TileId], tile size wTile [TileId], hTile [TileId].

for(row=0;row<numTileRows;row++)
{
for(col=0;col<numTileColumns;col++)
{
TileId = row*numTileColumns+col
xTile[TileId] = tx[col]
yTile[TileId] = ty[row]
wTile[TileId] = tw[col]
hTile[TileId] = th[row]
tileWidthInCtus[TileId] = divRoundUp(tw[col],ctuWidth)
tileHeightInCtus[TileId] = divRoundUp(th[row],ctuHeight)
}
}
for(PicWidthInCtbsY=0,i=0;i<=num_tile_columns_minus1;i++)
PicWidthInCtbsY += tileWidthInCtus[i]
for(PicHeightInCtbsY=0,j=0;j<=num_tile_rows_minus1;j++)
PicHeightInCtbsY += tileHeightInCtus[j)]
なお、以下の表現でも一時変数は異なるが同じ動作であるのでタイル情報設定部は、以下の動作を行ってもよい。
for (row = 0; row <numTileRows; row ++)
{
for (col = 0; col <numTileColumns; col ++)
{
TileId = row * numTileColumns + col
xTile [TileId] = tx [col]
yTile [TileId] = ty [row]
wTile [TileId] = tw [col]
hTile [TileId] = th [row]
tileWidthInCtus [TileId] = divRoundUp (tw [col], ctuWidth)
tileHeightInCtus [TileId] = divRoundUp (th [row], ctuHeight)
}
}
for (PicWidthInCtbsY = 0, i = 0; i <= num_tile_columns_minus1; i ++)
PicWidthInCtbsY + = tileWidthInCtus [i]
for (PicHeightInCtbsY = 0, j = 0; j <= num_tile_rows_minus1; j ++)
PicHeightInCtbsY + = tileHeightInCtus [j)]
In the following expressions, the temporary information is different, but the same operation is performed. Therefore, the tile information setting unit may perform the following operation.

if (uniform_spacing_flag) {
for (i=0; i<= num_tile_columns_minus1;i++)
colWidth[i] = ((i+1)*wPictInUnitTile)/(num_tile_columns_minus1+1)-(i*hPictInUnitTile)/(num_tile_columns_minus1+1))
for (j=0; j<= num_tile_rows_minus1;j++)
rowHeight[j] = ((j+1)*hPictInUnitTile)/(num_tile_rows_minus1+1)-(j*hPictInUnitTile)/(num_tile_rows_minus1+1))
else {
colWidth[num_tile_columns_minus1] = wPictInUnitTile
for (i=0; i<= num_tile_columns_minus1;i++) {
colWidth[i] = column_width_minus1[i]+1
colWidth[num_tile_columns_minus1]-=colWidth[i]
}
rowHeight [num_tile_rows_minus1] = hPictInUnitTile
for (j=0; j<= num_tile_rows_minus1;j++) {
rowHeight[j] = row_height_minus1[j]+1
rowHeight[num_tile_rows_minus1]-=rowHeight[j]
}
}
}
for (colX[0]=0,i=0; i <= num_tile_columns_minus1; i++)
colX[i+1] = colX[i]+colWidth[i]*wUnitTile
for (colY[0]=0,j=0; j <= num_tile_rows_minus1; j++)
colY[j+1] = colY[j]+colRow[j]*hUnitTile
for (colBd[0]=0,i=0; i <= num_tile_columns_minus1; i++)
colBd[i+1] = colBd[i]+Ceil(colWidth[i]*wUnitTile÷ctuWidth)
for (rowBd[0]=0,j=0; j <= num_tile_rows_minus1;j++)
rowBd[j+1] = rowBd[j]+Ceil(rowHeight[j]*hUnitTile÷ctuHeight)
for(PicWidthInCtbsY=0,i=0;i<=num_tile_columns_minus1; i++)
PicWidthInCtbsY += Ceil(colWidth[i]*TileUnitSizeY÷CtbSizeY)
for(PicHeightInCtbsY=0,j=0;j<=num_tile_rows_minus1; j++)
PicHeightInCtbsY += Ceil(rowHeight[j]*TileUnitSizeY÷CtbSizeY)
なお、画面全体において以下のように導出しても良い。
if (uniform_spacing_flag) {
for (i = 0; i <= num_tile_columns_minus1; i ++)
colWidth [i] = ((i + 1) * wPictInUnitTile) / (num_tile_columns_minus1 + 1)-(i * hPictInUnitTile) / (num_tile_columns_minus1 + 1))
for (j = 0; j <= num_tile_rows_minus1; j ++)
rowHeight [j] = ((j + 1) * hPictInUnitTile) / (num_tile_rows_minus1 + 1)-(j * hPictInUnitTile) / (num_tile_rows_minus1 + 1))
else {
colWidth [num_tile_columns_minus1] = wPictInUnitTile
for (i = 0; i <= num_tile_columns_minus1; i ++) {
colWidth [i] = column_width_minus1 [i] +1
colWidth [num_tile_columns_minus1]-= colWidth [i]
}
rowHeight [num_tile_rows_minus1] = hPictInUnitTile
for (j = 0; j <= num_tile_rows_minus1; j ++) {
rowHeight [j] = row_height_minus1 [j] +1
rowHeight [num_tile_rows_minus1]-= rowHeight [j]
}
}
}
for (colX [0] = 0, i = 0; i <= num_tile_columns_minus1; i ++)
colX [i + 1] = colX [i] + colWidth [i] * wUnitTile
for (colY [0] = 0, j = 0; j <= num_tile_rows_minus1; j ++)
colY [j + 1] = colY [j] + colRow [j] * hUnitTile
for (colBd [0] = 0, i = 0; i <= num_tile_columns_minus1; i ++)
colBd [i + 1] = colBd [i] + Ceil (colWidth [i] * wUnitTile ÷ ctuWidth)
for (rowBd [0] = 0, j = 0; j <= num_tile_rows_minus1; j ++)
rowBd [j + 1] = rowBd [j] + Ceil (rowHeight [j] * hUnitTile ÷ ctuHeight)
for (PicWidthInCtbsY = 0, i = 0; i <= num_tile_columns_minus1; i ++)
PicWidthInCtbsY + = Ceil (colWidth [i] * TileUnitSizeY ÷ CtbSizeY)
for (PicHeightInCtbsY = 0, j = 0; j <= num_tile_rows_minus1; j ++)
PicHeightInCtbsY + = Ceil (rowHeight [j] * TileUnitSizeY ÷ CtbSizeY)
The entire screen may be derived as follows.

for(i = 0; i < NumTilesInPic; i++ ) {
col = i % ( num_tile_columns_minus1 + 1 )
row = i / ( num_tile_columns_minus1 + 1 )
TileWidth [ i ] = colWidth[ col ] * TileUnitSizeY
TileHeight [ i ] = rowHeight[ row ] * TileUnitSizeY
TileWidthInCtbsY[ i ] = Ceil( TileWidth[ i ] ÷ CtbSizeY )
TileHeightInCtbsY[ i ] = Ceil( TileHeight[ i ] ÷ CtbSizeY )
TileX[ i ] = TileColX[ col ]
TileY[ i ] = TileRowY[ row ]
TileXInCtbsY[ i ] = colBd[ col ]
TileYInCtbsY[ i ] = rowBd[ row ]
}
上記により、スライスデータ(slice_segment_data())では、図4(b)で示すPPSで通知したタイル情報を用いて、ピクチャ上の(xTile,yTile)の位置から始まるタイルの情報をCTU単位で通知する。具体的には、ピクチャ上の(xTile,yTile)から始まる各タイルの左上座標(0,0)として、タイルを、CTU(幅ctuWidth、高さctuHeight)に分割し、各CTUの符号化データcoding_quadtree()を通知してもよい。
for (i = 0; i <NumTilesInPic; i ++) {
col = i% (num_tile_columns_minus1 + 1)
row = i / (num_tile_columns_minus1 + 1)
TileWidth [i] = colWidth [col] * TileUnitSizeY
TileHeight [i] = rowHeight [row] * TileUnitSizeY
TileWidthInCtbsY [i] = Ceil (TileWidth [i] ÷ CtbSizeY).
TileHeightInCtbsY [i] = Ceil (TileHeight [i] ÷ CtbSizeY).
TileX [i] = TileColX [col]
TileY [i] = TileRowY [row]
TileXInCtbsY [i] = colBd [col]
TileYInCtbsY [i] = rowBd [row]
}
As described above, in the slice data (slice_segment_data ()), the tile information starting from the position (xTile, yTile) on the picture is notified in CTU units by using the tile information notified by the PPS shown in FIG. 4B. . Specifically, the tile is divided into CTUs (width ctuWidth, height ctuHeight) as the upper left coordinates (0,0) of each tile starting from (xTile, yTile) on the picture, and the encoded data of each CTU coding_quadtree () May be notified.

ヘッダ復号部3020は、外部から入力され、NAL(network abstraction layer)ユニット単位で符号化された符号化ストリームTeからヘッダ情報を復号する。また、ヘッダ復号部3020は、外部から入力された、ディスプレイ等に表示すべき画像領域を示す制御情報から、表示に必要なタイル(TileId)を導出する。また、ヘッダ復号部3020は、符号化ストリームTeから表示に必要な符号化タイルを抽出する。符号化タイルは、符号化データ中のシンタックスに従って、CT情報復号部3021によってCTUに分割され処理される。タイル情報は、具体的には、num_tile_columns_minus1、num_tile_rows_minus1、uniform_spacing_flag、column_width_in_unit_minus1[i]、row_height_in_unit_minus1[i]等のシンタックスから算出した、タイルの水平方向の個数M、垂直方向の個数N、タイルの幅wTile[m]と高さhTile[n]等である。   The header decoding unit 3020 decodes header information from an encoded stream Te that is input from the outside and that is encoded in NAL (network abstraction layer) unit units. Further, the header decoding unit 3020 derives a tile (TileId) required for display from control information that is input from the outside and that indicates an image region to be displayed on a display or the like. Also, the header decoding unit 3020 extracts a coded tile required for display from the coded stream Te. The coded tile is divided into CTUs by the CT information decoding unit 3021 according to the syntax in the coded data and processed. The tile information is specifically calculated from the syntax of num_tile_columns_minus1, num_tile_rows_minus1, uniform_spacing_flag, column_width_in_unit_minus1 [i], row_height_in_unit_minus1 [i], etc., the number M of tiles in the horizontal direction, the number N of tiles in the vertical direction, and the width w of tiles. [m] and height hTile [n] etc.

図11はCTUサイズの整数倍以外でタイルを分割する例である。図11(a)は、本実施形態の技術であって、1920x1080のHD画像を4x3のタイルに分割する図である。本実施形態では4x3のタイルに分割する時に、全タイルを等サイズに分割できる(480x360に分割される)ため、複数のプロセッサやハードウェアに等しくロードバランスできる効果を有する。タイルサイズはピクチャ境界にかかわらずCTUの整数倍以外のサイズをとることが可能である。図11(b)は各タイルのCTU分割を表す図である。CTUに分割する際、タイルサイズがCTUサイズの整数倍でない場合は、タイルの外側にクロップオフセット領域を設ける。特にTILE Bに示すように、CTUは各タイルの左上を基準として分割される。したがって、CTUの左上座標は、CTUサイズの整数倍に限定されない。   FIG. 11 shows an example in which tiles are divided by a value other than an integral multiple of the CTU size. FIG. 11A shows the technique of the present embodiment, which is a diagram in which a 1920x1080 HD image is divided into 4x3 tiles. In the present embodiment, when dividing into 4 × 3 tiles, all tiles can be divided into equal sizes (divided into 480 × 360), so that there is an effect that the load can be equally balanced among a plurality of processors and hardware. The tile size can be a size other than an integral multiple of CTU regardless of the picture boundary. FIG. 11 (b) is a diagram showing the CTU division of each tile. When dividing into CTUs, if the tile size is not an integral multiple of the CTU size, provide a crop offset area outside the tiles. In particular, as shown in TILE B, the CTU is divided based on the upper left of each tile. Therefore, the upper left coordinate of the CTU is not limited to an integral multiple of the CTU size.

図12は、さらに各タイルをCTU分割する場合を示す図である。図ではピクチャを2x2のタイルに分割するが、各タイルはさらにCTUに分割される。本実施形態では図に示す通り、各タイルをCTUに分割するにあたって、タイルの左上からCTUを開始するように分割を行う。したがってタイルは右側及び下側において、CTUサイズの整数倍以外の位置で終端することがあるが、タイルの左側および上側においてはCTU境界とタイル境界は一致する。   FIG. 12 is a diagram showing a case where each tile is further divided into CTUs. The picture is divided into 2x2 tiles, but each tile is further divided into CTUs. In this embodiment, as shown in the figure, when dividing each tile into CTUs, the division is performed so that the CTU starts from the upper left of the tile. Therefore, a tile may end at a position other than an integral multiple of the CTU size on the right side and the lower side, but the CTU boundary and the tile boundary coincide on the left side and the upper side of the tile.

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

CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(cu_split_flag)、MT分割の分割方法を示すMT分割モード(split_mt_mode)、MT分割の分割方向を示すMT分割方向(split_mt_dir)、MT分割の分割タイプを示すMT分割タイプ(split_mt_type)を含む。cu_split_flag、split_mt_flag、split_mt_dir、split_mt_type は符号化ノード毎に伝送される。   The CT has, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, an MT split mode (split_mt_mode) indicating a split method of MT split, and an MT split direction (split_mt_dir) indicating a split direction of MT split. , MT split type (split_mt_type) indicating the split type of MT split. cu_split_flag, split_mt_flag, split_mt_dir, split_mt_type are transmitted for each coding node.

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

split_mt_flagが1の場合に符号化ノードは以下のようにMT分割される。split_mt_typeが0の時、split_mt_dirが1の場合に符号化ノードは2つの符号化ノードに水平分割され(図2(d))、split_mt_dirが0の場合に符号化ノードは2つの符号化ノードに垂直分割される(図2(c))。また、split_mt_typeが1の時、split_mt_dirが1の場合に符号化ノードは3つの符号化ノードに水平分割され(図2(f))、split_mt_dirが0の場合に符号化ノードは3つの符号化ノードに垂直分割される(図2(e))。   When split_mt_flag is 1, the coding node is MT-divided as follows. When split_mt_type is 0 and split_mt_dir is 1, the coding node is horizontally split into two coding nodes (Fig. 2 (d)), and when split_mt_dir is 0, the coding node is perpendicular to the two coding nodes. It is divided (Fig. 2 (c)). Also, when split_mt_type is 1, when split_mt_dir is 1, the coding node is horizontally divided into three coding nodes (Fig. 2 (f)), and when split_mt_dir is 0, the coding node is three coding nodes. Is vertically divided into two parts (Fig. 2 (e)).

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

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

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

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

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

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

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

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

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

エントロピー復号部301は、バイナリデータからシンタックス要素を復号する。エントロピー復号部301は、より具体的には、供給元から供給されるシンタックス要素に基づいて、CABAC等のエントロピー符号化方式による符号化データから、シンタックス要素を復号して供給元に返す。以下に示す例では、シンタックス要素の供給元は、CT情報復号部3021、CU復号部3022である。   The entropy decoding unit 301 decodes syntax elements from binary data. More specifically, the entropy decoding unit 301 decodes the syntax element from the encoded data by the entropy encoding method such as CABAC based on the syntax element supplied from the supplier, and returns the decoded syntax element to the supplier. In the example shown below, the sources of the syntax elements are the CT information decoding unit 3021 and the CU decoding unit 3022.

(基本フロー)
図6は、動画像復号装置31の概略的動作を説明するフローチャートである。
(Basic flow)
FIG. 6 is a flowchart illustrating a schematic operation of the moving picture decoding apparatus 31.

(S1100:パラメータセット情報復号)ヘッダ復号部3020は、符号化データからVPS、SPS、PPSなどのパラメータセット情報を復号する。   (S1100: Decoding of parameter set information) The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS from the encoded data.

(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の復号画像を導出する。   Hereinafter, the moving image decoding apparatus 31 derives a decoded image of each CTU by repeating the processes of S1300 to S5000 for each CTU included in the target picture.

(S1300:CTU情報復号)CT情報復号部3021は、符号化データからCTUを復号する。   (S1300: CTU information decoding) The CT information decoding unit 3021 decodes the CTU from the encoded data.

(S1400:CT情報復号)CT情報復号部3021は、符号化データからCTを復号する。   (S1400: Decoding CT information) 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 executes S1510 and S1520 to decode the CU from the encoded data.

(S1510:CU情報復号)CU復号部3022は、符号化データからCU情報、予測情報、TU分割フラグsplit_transform_flag、CU残差フラグcbf_cb、cbf_cr、cbf_luma等を復号する。   (S1510: CU information decoding) The CU decoding unit 3022 decodes CU information, prediction information, TU division flag split_transform_flag, CU residual flags cbf_cb, cbf_cr, cbf_luma, etc. from encoded data.

(S1520:TU情報復号)TU復号部3024は、TUに予測誤差が含まれている場合に、符号化データからQP更新情報(量子化補正値)と量子化予測誤差(residual_coding)を復号する。なお、QP更新情報は、量子化パラメータQPの予測値である量子化パラメータ予測値qPpredからの差分値である。   (S1520: TU information decoding) The TU decoding unit 3024 decodes the QP update information (quantization correction value) and the quantization prediction error (residual_coding) from the encoded data when the TU includes a prediction error. The QP update information is a difference value from the quantization parameter prediction value qPpred which is the prediction value of the quantization parameter QP.

(S2000:予測画像生成)予測画像生成部308は、対象CUに含まれる各ブロックについて、予測情報に基づいて予測画像を生成する。   (S2000: Prediction Image Generation) The prediction image generation unit 308 generates a prediction image for each block included in the target CU based on the prediction information.

(S3000:逆量子化・逆変換)逆量子化・逆変換部311は、対象CUに含まれる各TUについて、逆量子化・逆変換処理を実行する。   (S3000: Inverse Quantization / Inverse Transform) The inverse quantization / inverse transform unit 311 executes an inverse quantization / inverse transform process for each TU included in the target CU.

(S4000:復号画像生成)加算器312は、予測画像生成部308より供給される予測画像と、逆量子化・逆変換部311より供給される予測誤差とを加算することによって、対象CUの復号画像を生成する。   (S4000: Decoded image generation) The adder 312 adds the prediction image supplied from the prediction image generation unit 308 and the prediction error supplied from the inverse quantization / inverse conversion unit 311 to decode the target CU. Generate an image.

(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.

(タイルの場合のCTUの復号)
図13は、符号化スライスデータを示す図である。パラメータ復号部302のCT情報復号部3021は、スライス(タイル)を構成するCTUを順に処理する。さらに、CT情報復号部3021は、図示しない対象CTU座標導出部を用いて、対象CTUのCTUラスタスキャンアドレスCtbAddrInRsから、CTUアドレステーブルCtbAddrToCtbX[]、CtbAddrToCtbY[]を参照して対象CTUの左上座標(xCtb, yCtb)を導出する。
(CTU decoding for tiles)
FIG. 13 is a diagram showing encoded slice data. The CT information decoding unit 3021 of the parameter decoding unit 302 sequentially processes the CTUs forming the slice (tile). Further, the CT information decoding unit 3021 refers to the CTU address tables CtbAddrToCtbX [] and CtbAddrToCtbY [] from the CTU raster scan address CtbAddrInRs of the target CTU by using the target CTU coordinate derivation unit (not shown), and the upper left coordinate ( xCtb, yCtb) is derived.

xCtb = CtbAddrToCtbX[CtbAddrInRs]
yCtb = CtbAddrToCtbY[CtbAddrInRs]
CT情報復号部3021は対象CTUをルートとする符号化ツリーcoding_quadtree(xCtb,yCtb,log2CbSize,cqtDepth)を符号化データから再帰処理により復号する。
xCtb = CtbAddrToCtbX [CtbAddrInRs]
yCtb = CtbAddrToCtbY [CtbAddrInRs]
The CT information decoding unit 3021 decodes the coding tree coding_quadtree (xCtb, yCtb, log2CbSize, cqtDepth) whose root is the target CTU from the coded data by recursive processing.

ここでCtbAddrToCtbX、CtbAddrToCtbYは、CTUアドレステーブル導出部で導出されるテーブルである。
パラメータ復号部302は、スライスセグメントの終端か否かを示すフラグend_of_slice_segment_flagを復号し、次のCTUの処理の準備のためにCTUアドレスCtbAddrInTsを1だけインクリメントし(CtbAddrInTs++)、後続CTUのアドレスを導出する。さらに後続CTUに対応するCTUラスタスキャンアドレスを導出する(CtbAddrInRs = CtbAddrTsToRs[CtbAddrInTs])。ここでCtbAddrInTsは対象CTUのタイルスキャンアドレスである。
Here, CtbAddrToCtbX and CtbAddrToCtbY are tables derived by the CTU address table deriving unit.
The parameter decoding unit 302 decodes the flag end_of_slice_segment_flag indicating whether it is the end of the slice segment, increments the CTU address CtbAddrInTs by 1 (CtbAddrInTs ++) in preparation for the processing of the next CTU, and derives the address of the subsequent CTU. . Further, the CTU raster scan address corresponding to the subsequent CTU is derived (CtbAddrInRs = CtbAddrTsToRs [CtbAddrInTs]). Here, CtbAddrInTs is the tile scan address of the target CTU.

パラメータ復号部302は、スライスセグメントの終端ではなく(!end_of_slice_segment_flag)、タイルが有効であり(tiles_enabled_flag)、後続CTUのタイルID(TileId[CtbAddrInTs]もしくはTildIdTbl[CtbAddrInTs])と対象CTUのCTUのタイルID([CtbAddrInTs-1])が異なる場合、end_of_subset_one_bitを復号し、さらにバイトアライメント用のビット(byte_alignment())を復号する。   The parameter decoding unit 302 is not the end of the slice segment (! End_of_slice_segment_flag), the tile is valid (tiles_enabled_flag), the tile ID of the subsequent CTU (TileId [CtbAddrInTs] or TildIdTbl [CtbAddrInTs]) and the tile ID of the CTU of the target CTU. When ([CtbAddrInTs-1]) is different, the end_of_subset_one_bit is decoded, and further the byte alignment bit (byte_alignment ()) is decoded.

さらに、パラメータ復号部302は、タイルに加え、CTUライン単位に並列処理を行うウェーブフロントに対応し、ウェーブフロントフラグentropy_coding_sync_enabled_flagが1であり、後続CTUがCTUライン先頭の場合(CtbAddrInRs%PicWidthInCtbsY==0)、end_of_subset_one_bitを復号し、さらにバイトアライメント用のビット(byte_alignment())を復号してもよい。   Furthermore, the parameter decoding unit 302 corresponds to a wavefront that performs parallel processing in units of CTU lines in addition to tiles, the wavefront flag entropy_coding_sync_enabled_flag is 1, and the subsequent CTU is the beginning of the CTU line (CtbAddrInRs% PicWidthInCtbsY == 0). ) And end_of_subset_one_bit may be decoded, and the bit for byte alignment (byte_alignment ()) may be decoded.

なお、end_of_subset_one_bitとbyte_alignment()を復号する条件は、図27(a)に示す条件であってもよい。つまり、パラメータ復号部302は、スライスセグメントの終端ではなく(!end_of_slice_segment_flag)、タイルが有効である(tiles_enabled_flag)場合、end_of_subset_one_bitとbyte_alignment()を復号する。   The condition for decoding end_of_subset_one_bit and byte_alignment () may be the condition shown in FIG. 27 (a). That is, the parameter decoding unit 302 decodes end_of_subset_one_bit and byte_alignment () when the tile is valid (tiles_enabled_flag) instead of the end of the slice segment (! End_of_slice_segment_flag).

ここで、本実施形態では、CTUサイズの整数倍に限定されないサイズのタイルの場合のPicWidthInCtbsYの導出方法に特徴がある。PicWidthInCtbsYはピクチャの幅にCTUが何個含まれるかを意味するが、本実施形態のようにタイルの有効領域の大きさがCTUサイズの整数倍に限られない場合は、有効領域がCTUサイズに満たないサイズのCTUが複数個存在しうるため、PicWidthInCtbsYの値はceil(wPict/ctuWidth)に等しいとは限らない。上述のように、本実施形態のパラメータ復号部302は、PicWidthInCtbsYを、以下の方法で導出する。   Here, the present embodiment is characterized by the method of deriving PicWidthInCtbsY in the case of tiles of sizes not limited to integer multiples of the CTU size. PicWidthInCtbsY means how many CTUs are included in the picture width. However, when the size of the effective area of the tile is not limited to an integral multiple of the CTU size as in the present embodiment, the effective area has the CTU size. The value of PicWidthInCtbsY is not necessarily equal to ceil (wPict / ctuWidth) because there can be multiple CTUs of less than size. As described above, the parameter decoding unit 302 of this embodiment derives PicWidthInCtbsY by the following method.

for(PicWidthInCtbsY=0,i=0;i<=num_tile_columns_minus1;i++)
PicWidthInCtbsY += tileWidthInCtus[i]
PicHeightInCtbsYについても同様であり、以下の方法で導出する。
for (PicWidthInCtbsY = 0, i = 0; i <= num_tile_columns_minus1; i ++)
PicWidthInCtbsY + = tileWidthInCtus [i]
The same applies to PicHeightInCtbsY, which is derived by the following method.

for(PicHeightInCtbsY=0,j=0;j<=num_tile_rows_minus1;j++)
PicHeightInCtbsY += tileHeightInCtus[j]
タイルがCTUサイズの整数倍に限定される場合には、以下の方法で導出しても良い。
for (PicHeightInCtbsY = 0, j = 0; j <= num_tile_rows_minus1; j ++)
PicHeightInCtbsY + = tileHeightInCtus [j]
When the tile is limited to an integral multiple of the CTU size, it may be derived by the following method.

PicWidthInCtbsY = Ceil(wPict/ctuWidth)
PicHeightInCtbsY = Ceil(hPict/ctuHeight)
ここでの除算(/)は小数精度とする。
PicWidthInCtbsY = Ceil (wPict / ctuWidth)
PicHeightInCtbsY = Ceil (hPict / ctuHeight)
The division (/) here is decimal precision.

(CTUアドレステーブル導出部)
CTUアドレステーブル導出部は、以下のステップにより、CTUラスタスキャンアドレス(CtbAddrInRs)からCTUの座標(xCtb, yCtb)を導出するCTUアドレステーブルCtbAddrToCtbX[]、CtbAddrToCtbY[]を導出する。
(CTU address table derivation unit)
The CTU address table deriving unit derives CTU address tables CtbAddrToCtbX [] and CtbAddrToCtbY [] that derive the CTU coordinates (xCtb, yCtb) from the CTU raster scan address (CtbAddrInRs) by the following steps.

(ステップ1)
対象CTUのCTUラスタスキャンアドレスCtbAddrInRsからタイルID(TileId)を導出する。
(Step 1)
The tile ID (TileId) is derived from the CTU raster scan address CtbAddrInRs of the target CTU.

TileId = CtbAddrRsToTileID[CtbAddrInRs]
ここでCtbAddrRsToTileIDは、タイルIDテーブル導出部で導出されるテーブルである。
TileId = CtbAddrRsToTileID [CtbAddrInRs]
Here, CtbAddrRsToTileID is a table derived by the tile ID table deriving unit.

(ステップ2)
CTUアドレステーブル導出部は、対象CTUを含むタイルの先頭CTUラスタスキャンアドレスfirstCtbAddrInRs[TileId]を導出し、ピクチャの幅に含まれるCTUの個数PicWidthInCtbsYを用いて、CTUを単位としたタイル内座標(xCtbInCtus, yCtbInCtus)を以下の式で導出する
xCtbInCtus = (CtbAddrInRs-firstCtbAddrInRs[TileId])%PicWidthInCtbsY
yCtbInCtus = (CtbAddrInRs-firstCtbAddrInRs[TileId])/PicWidthInCtbsY
ここでfirstCtbAddrInRsは、タイルIDで示されるタイルの先頭CTUラスタスキャンア
ドレスを導出するテーブルであり、先頭タイルアドレス導出部で導出される。
(Step 2)
The CTU address table deriving unit derives the first CTU raster scan address firstCtbAddrInRs [TileId] of the tile including the target CTU, and uses the number of CTUs included in the picture width PicWidthInCtbsY to determine the coordinates within the tile in units of CTU (xCtbInCtus , yCtbInCtus) is derived by the following formula
xCtbInCtus = (CtbAddrInRs-firstCtbAddrInRs [TileId])% PicWidthInCtbsY
yCtbInCtus = (CtbAddrInRs-firstCtbAddrInRs [TileId]) / PicWidthInCtbsY
Here, firstCtbAddrInRs is a table for deriving the leading CTU raster scan address of the tile indicated by the tile ID, and is derived by the leading tile address deriving unit.

CTUアドレステーブル導出部は、CTUサイズ(ctuWidth, ctuHeight)をかけて、画素単位のタイル内座標(xCtbInTile, yCtbInTile)を以下の式で導出する。   The CTU address table derivation unit multiplies the CTU size (ctuWidth, ctuHeight) and derives the in-tile coordinates (xCtbInTile, yCtbInTile) in pixel units by the following formula.

xCtbInTile = xCtbInCtus*ctuWidth
yCtbInTile = yCtbInCtus*ctuHeight
なお、CTUサイズの対数表示を用いて以下のように導出しても良い。
xCtbInTile = xCtbInCtus * ctuWidth
yCtbInTile = yCtbInCtus * ctuHeight
The logarithmic display of the CTU size may be used to derive the following.

xCtbInTile = xCtbInCtus<<CtbLog2SizeY
yCtbInTile = yCtbInCtus<<CtbLog2SizeY
(ステップ3)
CTUアドレステーブル導出部は、タイル内座標(xCtbInTile, yCtbInTile)とタイル左上のピクチャ内座標(xTile[TileId],yTile[TileId])の和から、ピクチャ内におけるCTUの左上座標(xCtb, yCtb)を導出する。
xCtbInTile = xCtbInCtus << CtbLog2SizeY
yCtbInTile = yCtbInCtus << CtbLog2SizeY
(Step 3)
The CTU address table derivation unit calculates the upper-left coordinates (xCtb, yCtb) of the CTU in the picture from the sum of the in-tile coordinates (xCtbInTile, yCtbInTile) and the upper-left picture coordinates (xTile [TileId], yTile [TileId]) of the tile. Derive.

xCtb = xTile[TileId]+xCtbInTile
yCtb = yTile[TileId]+yCtbInTile
(ステップ4)
CTUアドレステーブル導出部は、最後に導出されたCtbAddrInRsに関するCTUの左上座標(xCtb, yCtb)をテーブルに格納する
CtbAddrToCtbX[CtbAddrInRs] = xCtb
CtbAddrToCtbY[CtbAddrInRs] = yCtb
上記の処理は、タイル左上CTUの位置(xTileInCtus, yTileInCtu)を用いて、以下のようにも表現できる。
xCtb = xTile [TileId] + xCtbInTile
yCtb = yTile [TileId] + yCtbInTile
(Step 4)
The CTU address table derivation unit stores in the table the upper left coordinates (xCtb, yCtb) of the CTU for the last derived CtbAddrInRs.
CtbAddrToCtbX [CtbAddrInRs] = xCtb
CtbAddrToCtbY [CtbAddrInRs] = yCtb
The above processing can also be expressed as follows using the position (xTileInCtus, yTileInCtu) of the tile upper left CTU.

xTileInCtus = firstCtbAddrInRs[TileId] % PicWidthInCtbsY
yTileInCtus = firstCtbAddrInRs[TileId] / PicWidthInCtbsY
xCtb = (((CtbAddrInRs-xTileInCtus)%tileWidthInCtus[TileId])<<log2CtuWidthY)+xTile[TileId]
yCtb = (((CtbAddrInRs-yTileInCtus)/tileWidthInCtus[TileId])<<log2CtuHeightY)+yTile[TileId]
ここでlog2CtuWidthY=log2(ctuWidth)、log2CtuHeightY=log2(ctuHeight)である。タイル左上CTUの位置(xTileInCtus, yTileInCtu)やCTUの左上座標(xCtb,yCtb)はしばしば参照されるため、導出済みの値をテーブルに格納して用いてもよい。また、上記の導出を参照の都度行ってもよい。
xTileInCtus = firstCtbAddrInRs [TileId]% PicWidthInCtbsY
yTileInCtus = firstCtbAddrInRs [TileId] / PicWidthInCtbsY
xCtb = (((CtbAddrInRs-xTileInCtus)% tileWidthInCtus [TileId]) << log2CtuWidthY) + xTile [TileId]
yCtb = (((CtbAddrInRs-yTileInCtus) / tileWidthInCtus [TileId]) << log2CtuHeightY) + yTile [TileId]
Here, log2CtuWidthY = log2 (ctuWidth) and log2CtuHeightY = log2 (ctuHeight). Since the position of the tile upper left CTU (xTileInCtus, yTileInCtu) and the upper left coordinate of the CTU (xCtb, yCtb) are often referred to, the derived value may be stored in a table and used. Further, the above derivation may be performed each time the reference is made.

上記処理の全体を擬似コードで示すと以下になる。   The whole of the above process is shown below in pseudo code.

for (CtbAddrInRs=0;CtbAddrInRs<numCtusInFrame;CtbAddrInRs++)
{
TileId = CtbAddrRsToTileID[CtbAddrInRs]
xCtb = xTile[TileId]+((CtbAddrInRs-firstCtbAddrInRs[TileId])%PicWidthInCtbsY)* ctuUWidth
yCtb = yTile[TileId]+((CtbAddrInRs-firstCtbAddrInRs[TileId])/PicWidthInCtbsY) * ctuHeight
CtbAddrToCtbX[CtbAddrInRs] = xCtb
CtbAddrToCtbY[CtbAddrInRs] = yCtb
}
ここで、numCtusInFrameは1ピクチャ内のCTUの個数であり、numCtusInFrame=numTileCol
umns*numTileRowsである。
for (CtbAddrInRs = 0; CtbAddrInRs <numCtusInFrame; CtbAddrInRs ++)
{
TileId = CtbAddrRsToTileID [CtbAddrInRs]
xCtb = xTile [TileId] + ((CtbAddrInRs-firstCtbAddrInRs [TileId])% PicWidthInCtbsY) * ctuUWidth
yCtb = yTile [TileId] + ((CtbAddrInRs-firstCtbAddrInRs [TileId]) / PicWidthInCtbsY) * ctuHeight
CtbAddrToCtbX [CtbAddrInRs] = xCtb
CtbAddrToCtbY [CtbAddrInRs] = yCtb
}
Here, numCtusInFrame is the number of CTUs in one picture, and numCtusInFrame = numTileCol
umns * numTileRows.

(タイルの場合のCTUの復号・変形例)
上記で説明したタイルのCTUの復号の方法について、xCtbとyCtbの導出にCTUアドレステーブルCtbAddrToCtbX[]およびCtbAddrToCtbY[]を用いず、別の方法を用いてもよい。次にその例を示す。
(Decoding and modification of CTU for tile)
Regarding the method of decoding the CTU of the tile described above, another method may be used without using the CTU address tables CtbAddrToCtbX [] and CtbAddrToCtbY [] for deriving xCtb and yCtb. An example is shown below.

CT情報復号部3021は、図示しない対象CTU座標導出部を用いて、対象CTUのCTUラスタスキャンアドレスCtbAddrInRsから、対象CTUのCTU単位のX座標(CTUのcol位置)およびCTU単位のY座標(CTUのrow位置)であるrxおよびryを導出し、CTU座標変換テーブルCtbColToCtbX[]、CtbRowToCtbY[]を参照して対象CTUの左上座標(xCtb, yCtb)を導出する。   The CT information decoding unit 3021 uses a target CTU coordinate deriving unit (not shown) to extract the CTU raster scan address CtbAddrInRs of the target CTU from the CTU unit X-coordinate (CTU col position) and the CTU unit Y-coordinate (CTU unit). Rx and ry which are the row position) of the target CTU and the CTU coordinate conversion tables CtbColToCtbX [] and CtbRowToCtbY [] are derived to derive the upper left coordinates (xCtb, yCtb) of the target CTU.

rx = CtbAddrInRs % PicWidthInCtbsY
ry = CtbAddrInRs / PicWidthInCtbsY
xCtb = CtbColToCtbX[rx]
yCtb = CtbRowToCtbY[ry]
図30(a)のcoding_tree_unit()は、この変形例の導出方法を用いたシンタックスの例である。対象CTの左上座標(xCtb,yCtb)を、CTU座標変換テーブルを用いて導出し、coding_quadtree()に左上座標(xCtb,yCtb)を渡す。図30(b)に示すように、タイルが利用可能な場合(tile_enabled_flagが真)と、そうでない場合とで、導出方法を変更してもよい。
rx = CtbAddrInRs% PicWidthInCtbsY
ry = CtbAddrInRs / PicWidthInCtbsY
xCtb = CtbColToCtbX [rx]
yCtb = CtbRowToCtbY [ry]
The coding_tree_unit () in FIG. 30 (a) is an example of syntax using the derivation method of this modification. The upper left coordinate (xCtb, yCtb) of the target CT is derived using the CTU coordinate conversion table, and the upper left coordinate (xCtb, yCtb) is passed to coding_quadtree (). As shown in FIG. 30 (b), the derivation method may be changed depending on whether the tile is available (tile_enabled_flag is true) or not.

(CTU座標変換テーブル導出部)
CTU座標変換テーブル導出部は、以下のステップにより、CTU単位のX座標およびCTU単位のY座標(rx, ry)からCTUの画素単位の座標(xCtb, yCtb)を導出するCTU座標変換テーブルCtbColToCtbX[]、CtbRowToCtbY[]を導出する。
(CTU coordinate conversion table derivation unit)
The CTU coordinate conversion table deriving unit derives the CTU pixel unit coordinates (xCtb, yCtb) from the CTU unit X coordinate and the CTU unit Y coordinate (rx, ry) in the following steps by the following steps: CtbColToCtbX [ ], CtbRowToCtbY [] is derived.

CTU座標変換テーブル導出部は、CTU単位のX座標rxを0からnum_tile_columns_minus1までループし、以下のステップを実行する。   The CTU coordinate conversion table derivation unit loops the X coordinate rx in CTU units from 0 to num_tile_columns_minus1 and executes the following steps.

(ステップ1x)
CTU座標変換テーブル導出部は、CTU単位のX座標rxから、タイルIDを導出する。このとき、すべてのY座標についてこのテーブルは同じであるため、CTU単位のY座標(CTUのrow位置)は0とする。したがって、
TileId = CtbAddrRsToTileID[rx]
ここでCtbAddrRsToTileIDは、タイルIDテーブル導出部で導出されるテーブルである。
(Step 1x)
The CTU coordinate conversion table deriving unit derives the tile ID from the X coordinate rx in CTU units. At this time, this table is the same for all Y coordinates, so the Y coordinate in CTU units (row position of CTU) is set to 0. Therefore,
TileId = CtbAddrRsToTileID [rx]
Here, CtbAddrRsToTileID is a table derived by the tile ID table deriving unit.

(ステップ2x)
CTU座標変換テーブル導出部は、対象CTUを含むタイルの先頭CTUラスタスキャンアドレスfirstCtbAddrInRs[TileId]を導出し、CTUを単位としたタイル内座標xCtbInCtusを以下の式で導出する。
(Step 2x)
The CTU coordinate conversion table deriving unit derives the first CTU raster scan address firstCtbAddrInRs [TileId] of the tile including the target CTU, and derives the in-tile coordinate xCtbInCtus in units of CTU by the following formula.

xCtbInCtus = rx - firstCtbAddrInRs[TileId] % PicWidthInCtbsY
ここでfirstCtbAddrInRsは、タイルIDで示されるタイルの先頭CTUラスタスキャンアドレスを導出するテーブルであり、先頭タイルアドレス導出部で導出される。
xCtbInCtus = rx-firstCtbAddrInRs [TileId]% PicWidthInCtbsY
Here, firstCtbAddrInRs is a table for deriving the leading CTU raster scan address of the tile indicated by the tile ID, and is derived by the leading tile address deriving unit.

あるいは、タイルIDで示されるタイルの先頭CTBのCTU単位X座標(col位置)を導出するテーブルfirstCtbCol[]を用いて、次のように導出してもよい。   Alternatively, it may be derived as follows using the table firstCtbCol [] that derives the CTU unit X coordinate (col position) of the head CTB of the tile indicated by the tile ID.

xCtbInCtus = rx - firstCtbCol[TileId]
テーブルfirstCtbCol[]は、先頭タイルアドレス導出部で、次のように導出する。
xCtbInCtus = rx-firstCtbCol [TileId]
The table firstCtbCol [] is derived by the first tile address derivation unit as follows.

firstCtbCol[TileId] = firstCtbAddrInRs[TileId] % PicWidthInCtbsY
次に、CTU座標変換テーブル導出部は、xCtbInCtusにCTUサイズctuWidthをかけて、画素単位のタイル内座標xCtbInTileを以下の式で導出する。
firstCtbCol [TileId] = firstCtbAddrInRs [TileId]% PicWidthInCtbsY
Next, the CTU coordinate conversion table derivation unit multiplies xCtbInCtus by the CTU size ctuWidth to derive the in-tile coordinate xCtbInTile in pixel units by the following formula.

xCtbInTile = xCtbInCtus*ctuWidth
(ステップ3x)
CTU座標変換テーブル導出部は、タイル内X座標xCtbInTileとタイル左上X座標のピクチャ内座標xTile[TileId]の和から、ピクチャ内におけるCTUの左上X座標xCtbを導出する。
xCtbInTile = xCtbInCtus * ctuWidth
(Step 3x)
The CTU coordinate conversion table deriving unit derives the upper left X coordinate xCtb of the CTU in the picture from the sum of the in-tile X coordinate xCtbInTile and the in-picture coordinate xTile [TileId] of the tile upper left X coordinate.

xCtb = xTile[TileId]+xCtbInTile
(ステップ4x)
最後に、CTU座標変換テーブル導出部は、導出されたrxに関するCTUの左上X座標xCtbをテーブルに格納する。
xCtb = xTile [TileId] + xCtbInTile
(Step 4x)
Finally, the CTU coordinate conversion table deriving unit stores the upper left X coordinate xCtb of the CTU regarding the derived rx in the table.

CtbColToCtbX[rx] = xCtb
上記の処理は、タイル左上CTUのX座標xTileInCtusを用いて、以下のようにも表現できる。
CtbColToCtbX [rx] = xCtb
The above processing can also be expressed as follows using the X coordinate xTileInCtus of the tile upper left CTU.

xTileInCtus = firstCtbAddrInRs[TileId] % PicWidthInCtbsY
xCtb = ((rx-xTileInCtus)<<log2CtuWidthY)+xTile[TileId]
ここでlog2CtuWidthY=log2(ctuWidth)である。タイル左上CTUのX座標xTileInCtusやCTUの左上X座標xCtbはしばしば参照されるため、このように導出済みの値をテーブルに格納して用いてもよいし、上記の導出を参照の都度行ってもよい。
xTileInCtus = firstCtbAddrInRs [TileId]% PicWidthInCtbsY
xCtb = ((rx-xTileInCtus) << log2CtuWidthY) + xTile [TileId]
Here, log2CtuWidthY = log2 (ctuWidth). Since the X coordinate xTileInCtus of the tile upper left CTU and the upper left X coordinate xCtb of the CTU are often referred to, it is possible to store the derived values in this way and use them, or to perform the above derivation each time it is referred. Good.

上記処理の全体を擬似コードで示すと以下になる。   The whole of the above process is shown below in pseudo code.

for ( col=0; col<=num_tile_columns_minus1; col++ )
{
TileId = CtbAddrRsToTileID[col]
xCtb = xTile[TileId]+((rx-firstCtbAddrInRs[TileId])%PicWidthInCtbsY)* ctuWidth
CtbColToCtbX[col] = xCtb
}
X座標に関するテーブルと同様に、CTU座標変換テーブル導出部は、CTU単位のY座標ryを0からnum_tile_rows_minus1までループし、以下のステップを実行する。
for (col = 0; col <= num_tile_columns_minus1; col ++)
{
TileId = CtbAddrRsToTileID [col]
xCtb = xTile [TileId] + ((rx-firstCtbAddrInRs [TileId])% PicWidthInCtbsY) * ctuWidth
CtbColToCtbX [col] = xCtb
}
Similar to the table regarding the X coordinate, the CTU coordinate conversion table deriving unit loops the Y coordinate ry in CTU units from 0 to num_tile_rows_minus1 and executes the following steps.

(ステップ1y)
CTU座標変換テーブル導出部は、CTU単位のY座標ryから、タイルIDを導出する。このとき、すべてのX座標についてこのテーブルは同じであるため、CTU単位のX座標(CTUのcol位置)は0とする。したがって、
TileId = CtbAddrRsToTileID[ry*PicWidthInCtbsY]
ここでCtbAddrRsToTileIDは、タイルIDテーブル導出部で導出されるテーブルである。
(Step 1y)
The CTU coordinate conversion table deriving unit derives a tile ID from the Y coordinate ry in CTU units. At this time, since this table is the same for all X coordinates, the X coordinate in CTU units (col position of CTU) is set to 0. Therefore,
TileId = CtbAddrRsToTileID [ry * PicWidthInCtbsY]
Here, CtbAddrRsToTileID is a table derived by the tile ID table deriving unit.

(ステップ2y)
CTU座標変換テーブル導出部は、対象CTUを含むタイルの先頭CTUラスタスキャンアドレスfirstCtbAddrInRs[TileId]を導出し、CTUを単位としたタイル内座標yCtbInCtusを以下の式で導出する。
(Step 2y)
The CTU coordinate conversion table deriving unit derives the first CTU raster scan address firstCtbAddrInRs [TileId] of the tile including the target CTU, and derives the in-tile coordinate yCtbInCtus in units of CTU by the following formula.

yCtbInCtus = ry - firstCtbAddrInRs[TileId] / PicWidthInCtbsY
ここでfirstCtbAddrInRsは、タイルIDで示されるタイルの先頭CTUラスタスキャンアドレスを導出するテーブルであり、先頭タイルアドレス導出部で導出される。
yCtbInCtus = ry-firstCtbAddrInRs [TileId] / PicWidthInCtbsY
Here, firstCtbAddrInRs is a table for deriving the leading CTU raster scan address of the tile indicated by the tile ID, and is derived by the leading tile address deriving unit.

あるいは、タイルIDで示されるタイルの先頭CTBのCTU単位Y座標(row位置)を導出するテーブルfirstCtbRow[]を用いて、次のように導出してもよい。   Alternatively, it may be derived as follows using the table firstCtbRow [] that derives the CTU unit Y coordinate (row position) of the head CTB of the tile indicated by the tile ID.

yCtbInCtus = ry - firstCtbRow[TileId]
テーブルfirstCtbRow[]は、先頭タイルアドレス導出部で、次のように導出する。
yCtbInCtus = ry-firstCtbRow [TileId]
The table firstCtbRow [] is derived by the first tile address derivation unit as follows.

firstCtbRow[TileId] = firstCtbAddrInRs[TileId] / PicWidthInCtbsY
次に、CTU座標変換テーブル導出部は、yCtbInCtusにCTUサイズctuHeightをかけて、画素単位のタイル内座標yCtbInTileを以下の式で導出する。
firstCtbRow [TileId] = firstCtbAddrInRs [TileId] / PicWidthInCtbsY
Next, the CTU coordinate conversion table derivation unit multiplies yCtbInCtus by the CTU size ctuHeight to derive the tile in-tile coordinate yCtbInTile by the following formula.

yCtbInTile = yCtbInCtus*ctuHeight
(ステップ3y)
CTU座標変換テーブル導出部は、タイル内Y座標yCtbInTileとタイル左上Y座標のピクチャ内座標yTile[TileId]の和から、ピクチャ内におけるCTUの左上Y座標yCtbを導出する。
yCtbInTile = yCtbInCtus * ctuHeight
(Step 3y)
The CTU coordinate conversion table deriving unit derives the upper left Y coordinate yCtb of the CTU in the picture from the sum of the in-tile Y coordinate yCtbInTile and the in-picture coordinate yTile [TileId] of the tile upper left Y coordinate.

yCtb = yTile[TileId]+yCtbInTile
(ステップ4y)
最後に、CTU座標変換テーブル導出部は、導出されたryに関するCTUの左上Y座標yCtbをテーブルに格納する。
yCtb = yTile [TileId] + yCtbInTile
(Step 4y)
Finally, the CTU coordinate conversion table deriving unit stores the upper left Y coordinate yCtb of the CTU regarding the derived ry in the table.

CtbRowToCtbY[ry] = yCtb
上記の処理は、タイル左上CTUのy位置yTileInCtusを用いて、以下のようにも表現できる。
CtbRowToCtbY [ry] = yCtb
The above processing can also be expressed as follows using the y position yTileInCtus of the tile upper left CTU.

yTileInCtus = firstCtbAddrInRs[TileId] / PicWidthInCtbsY
yCtb = ((ry-yTileInCtus)<<log2CtuHeightY)+yTile[TileId]
ここでlog2CtuHeightY=log2(ctuHeight)である。タイル左上CTUのY座標yTileInCtusやCTUの左上Y座標yCtbはしばしば参照されるため、このように導出済みの値をテーブルに格納して用いてもよいし、上記の導出を参照の都度行ってもよい。
yTileInCtus = firstCtbAddrInRs [TileId] / PicWidthInCtbsY
yCtb = ((ry-yTileInCtus) << log2CtuHeightY) + yTile [TileId]
Where log2CtuHeightY = log2 (ctuHeight). Since the Y coordinate yTileInCtus of the tile upper left CTU and the upper left Y coordinate yCtb of the CTU are often referred to, it is possible to store the derived value in this way in the table and use it, or to perform the above derivation each time it is referenced. Good.

上記処理の全体を擬似コードで示すと以下になる。   The whole of the above process is shown below in pseudo code.

for ( row=0; row<=num_tile_rows_minus1; row++ )
{
TileId = CtbAddrRsToTileID[row*PicWidthInCtbsY]
yCtb = yTile[TileId]+((ry-firstCtbAddrInRs[TileId])/PicWidthInCtbsY)* ctuHeight
CtbRowToCtbY[row] = yCtb
}
なお、CtbAddrInTsとCtbAddrInRsは互いに変換可能であるため、上記実施例のうちラスタスキャン順CTU位置CtbAddrInRsを添字とするテーブルは、タイルスキャン順CTU位置CtbAddrInTsを添字として導出し、参照時の添字もタイルスキャン順CTU位置に変換したものを用いて構成することも可能である。同様に、タイルスキャン順CTU位置CtbAddrInTsを添字とするテーブルは、ラスタスキャン順CTU位置CtbAddrInRsを添字として導出し、参照時の添字もラスタスキャン順CTU位置に変換したものを用いて構成することも可能である。
for (row = 0; row <= num_tile_rows_minus1; row ++)
{
TileId = CtbAddrRsToTileID [row * PicWidthInCtbsY]
yCtb = yTile [TileId] + ((ry-firstCtbAddrInRs [TileId]) / PicWidthInCtbsY) * ctuHeight
CtbRowToCtbY [row] = yCtb
}
Since CtbAddrInTs and CtbAddrInRs can be converted to each other, the table with the raster scan order CTU position CtbAddrInRs as a subscript in the above embodiment is derived with the tile scan order CTU position CtbAddrInTs as a subscript, and the subscript at the time of reference is also the tile scan. It is also possible to use the one converted into the forward CTU position. Similarly, the table with the tile scan order CTU position CtbAddrInTs as a subscript can also be configured by deriving the raster scan order CTU position CtbAddrInRs as a subscript and converting the subscript at the time of reference to the raster scan order CTU position as well. Is.

ラスタスキャン順CTUアドレスからタイルスキャン順CTUアドレスを導出するテーブルCt
bAddrRsToTs[]の導出例を以下に擬似コードで示す。CtbAddrRsToTileId[]は、タイルIDテーブル導出部によって導出された、ラスタスキャン順CTUアドレスからタイルIDを導出する、タイルIDテーブルである。
Table Ct that derives the tile scan order CTU address from the raster scan order CTU address
An example of deriving bAddrRsToTs [] is shown below in pseudo code. CtbAddrRsToTileId [] is a tile ID table for deriving a tile ID from the raster scan order CTU address derived by the tile ID table deriving unit.

for( ctbAddrRs = 0; ctbAddrRs < numCtusInFrame; ctbAddrRs++ ) {
tileId = CtbAddrRsToTileId[ ctbAddrRs ]
tbX = ctbAddrRs % PicWidthInCtbsY
tbY = ctbAddrRs / PicWidthInCtbsY
CtbAddrRsToTs[ ctbAddrRs ] = 0
for( t = 0; t < tileId; t++ ) {
CtbAddrRsToTs[ctbAddrRs] += TileWidthInCtbsY[tileId]*TileHeightInCtbsY[tileId]
}
CtbAddrRsToTs[ctbAddrRs] += (tbY-TileYInCtbsY[tileId])*TileWidthInCtbsY[tileId]+
tbX-TileXInCtbsY[tileId]
}
以上の構成により、画像をCTUに分割し、CTU単位に動画像を復号する動画像復号装置において、タイルをCTUに分割して再帰的に分割するCT情報復号部を備え、対象CTUのラスタスキャンアドレスから、1つ以上のタイルのサイズを参照して、対象CTUのピクチャ上の左上座標を導出するヘッダ復号部(対象CTU座標導出部)を備え、上記CT情報復号部は、導出された対象CTUのピクチャ上の左上座標に基づいて、対象CTUを符号化ツリーに分割し、分割されたCTの右下位置のタイル内座標がタイルサイズ以内である場合に、符号化ツリーを処理する手段を備える。
for (ctbAddrRs = 0; ctbAddrRs <numCtusInFrame; ctbAddrRs ++) (
tileId = CtbAddrRsToTileId [ctbAddrRs]
tbX = ctbAddrRs% PicWidthInCtbsY
tbY = ctbAddrRs / PicWidthInCtbsY
CtbAddrRsToTs [ctbAddrRs] = 0
for (t = 0; t <tileId; t ++) {
CtbAddrRsToTs [ctbAddrRs] + = TileWidthInCtbsY [tileId] * TileHeightInCtbsY [tileId]
}
CtbAddrRsToTs [ctbAddrRs] + = (tbY-TileYInCtbsY [tileId]) * TileWidthInCtbsY [tileId] +
tbX-TileXInCtbsY [tileId]
}
With the above configuration, a moving image decoding apparatus that divides an image into CTUs and decodes a moving image in units of CTUs includes a CT information decoding unit that divides tiles into CTUs and recursively divides them into a raster scan of a target CTU. A header decoding unit (target CTU coordinate deriving unit) that derives the upper left coordinates on the picture of the target CTU by referring to the size of one or more tiles from the address, and the CT information decoding unit is provided with the derived target. Based on the upper left coordinates on the picture of the CTU, the target CTU is divided into coding trees, and a means for processing the coding tree when the in-tile coordinates of the lower right position of the divided CT are within the tile size. Prepare

画像をタイルに分割し、タイル単位に動画像を復号する動画像復号装置において、
対象CTUのラスタスキャンアドレスから、対象CTUの左上座標を導出するCTUアドレステーブルを参照するヘッダ復号部(対象CTU座標導出部)を備え、上記CTUアドレステーブルを、1つ以上のタイルのサイズから導出するヘッダ復号部(CTUアドレステーブル導出部)を備える。
In a moving image decoding device that divides an image into tiles and decodes a moving image in tile units,
A header decoding unit (target CTU coordinate derivation unit) that refers to a CTU address table that derives the upper left coordinates of the target CTU from the raster scan address of the target CTU is provided, and the CTU address table is derived from the size of one or more tiles. The header decoding unit (CTU address table derivation unit) is provided.

(タイルIDテーブル導出部)
タイルIDテーブル導出部は以下のステップでタイルIDテーブルCtbAddrRsToTileID[]を導出する。
(Tile ID table derivation unit)
The tile ID table derivation unit derives the tile ID table CtbAddrRsToTileID [] in the following steps.

(ステップ1)
画面内CTUアドレスCtbAddrInRsに対応するCTUのタイル座標(columnIdx,rowIdx)を導出する。
(Step 1)
Derive the tile coordinates (columnIdx, rowIdx) of the CTU corresponding to the in-screen CTU address CtbAddrInRs.

(ステップ2)
タイル座標(columnIdx, rowIdx)から画面内タイルIDを導出する。
(Step 2)
Derive the in-screen tile ID from the tile coordinates (columnIdx, rowIdx).

TileId = rowIdx*numTileColumns+columnIdx
ここでnumTileColumnsはピクチャ内の水平方向のタイルの個数である。
TileId = rowIdx * numTileColumns + columnIdx
Where numTileColumns is the number of horizontal tiles in the picture.

(ステップ3)
導出したタイルIDをタイルIDテーブルCtbAddrRsToTileID[]に格納する。
(Step 3)
The derived tile ID is stored in the tile ID table CtbAddrRsToTileID [].

CtbAddrRsToTileID[CtbAddrInRs] = TileId
上記の処理の擬似コードを以下に示す。
CtbAddrRsToTileID [CtbAddrInRs] = TileId
The pseudo code for the above process is shown below.

for(CtbAddrInRs=0;CtbAddrInRs<numCtusInFrame;CtbAddrInRs++)
{
for(col=0;col<numTileColumns;col++)
{
if(CtbAddrInRs%PicWidthInCtbsY<=rightEdgePosInCtus[col])
{
columnIdx = col
break
}
}
for(row=0;row<numTileRows;row++)
{
if(CtbAddrInRs/PicWidthInCtbsY<=bottomEdgePosInCtus[row*numTileColumns])
{
rowIdx = row
break
}
}
CtbAddrRsToTileID[CtbAddrInRs] = rowIdx*numTileColumns+columnIdx
}
(先頭タイルアドレス導出部)
先頭タイルアドレス導出部は以下のステップで先頭タイルアドレステーブルfirstCtbAddrInRs[]を導出する。
for (CtbAddrInRs = 0; CtbAddrInRs <numCtusInFrame; CtbAddrInRs ++)
{
for (col = 0; col <numTileColumns; col ++)
{
if (CtbAddrInRs% PicWidthInCtbsY <= rightEdgePosInCtus [col])
{
columnIdx = col
break
}
}
for (row = 0; row <numTileRows; row ++)
{
if (CtbAddrInRs / PicWidthInCtbsY <= bottomEdgePosInCtus [row * numTileColumns])
{
rowIdx = row
break
}
}
CtbAddrRsToTileID [CtbAddrInRs] = rowIdx * numTileColumns + columnIdx
}
(Top tile address derivation unit)
The leading tile address derivation unit derives the leading tile address table firstCtbAddrInRs [] in the following steps.

(ステップ1)
タイル単位の座標で(col, row)に対応するTileIdについて、col列までの各タイルi(0<=i<col)のCTU単位の幅tileWidthInCtus[i]を参照して、TileIdの示すタイルのCTU単位の右端位置rightEdgePosInCtus[TileId]を導出する。同様に、row列までの各タイルj(0<=j<row)のCTU単位の高さtileHeightInCtus[j]を参照して、TileIdの示すタイルのCTU単位の下端位置bottomEdgePosInCtus[TileId]を導出する。
(Step 1)
For the TileId corresponding to (col, row) in tile unit coordinates, refer to the width of each tile i (0 <= i <col) up to the col column in CTU units tileWidthInCtus [i], and Derive the right edge position rightEdgePosInCtus [TileId] in CTU units. Similarly, the bottom edge position bottomEdgePosInCtus [TileId] in CTU units of the tile indicated by TileId is derived by referring to the height tileHeightInCtus [j] of each tile j (0 <= j <row) up to the row column. .

(ステップ2)
TileIdで示すタイルのCTU単位の右端位置rightEdgePosInCtus[TileId]、および、TileIdで示すタイルのCTU単位の幅tileWidthInCtus[TileId]から、TileIdで示すタイルのCTU単位の左端位置xCtbInCtusを導出する。
(Step 2)
The left edge position xCtbInCtus of the tile indicated by TileId in the CTU unit is derived from the right edge position rightEdgePosInCtus [TileId] of the tile indicated by TileId and the width of the tile indicated by TileId in the CTU unit tileWidthInCtus [TileId].

TileIdで示すタイルのCTU単位の下端位置bottomEdgePosInCtus[TileId]、および、TileIdで示すタイルのCTU単位の高さtileHeightInCtus[TileId]から、TileIdで示すタイルのCTU単位の上端位置yCtbInCtusを導出する。   The upper end position yCtbInCtus of the tile indicated by TileId in the CTU unit is derived from the lower end position bottomEdgePosInCtus [TileId] of the tile indicated by TileId and the height of the tile indicated by TileId in the CTU unit tileHeightInCtus [TileId].

xCtbInCtus = rightEdgePosInCtus[TileId]-tileWidthInCtus[TileId]+1
yCtbInCtus = bottomEdgePosInCtus[TileId]-tileHeightInCtus[TileId]+1
TileIdで示すCTU単位のタイル左上画素の画面内位置(xCtbInCtus, yCtbInCtus)から、CTUラスタスキャンアドレスCtbAddrInRsを導出する。
xCtbInCtus = rightEdgePosInCtus [TileId] -tileWidthInCtus [TileId] +1
yCtbInCtus = bottomEdgePosInCtus [TileId] -tileHeightInCtus [TileId] +1
The CTU raster scan address CtbAddrInRs is derived from the in-screen position (xCtbInCtus, yCtbInCtus) of the upper left pixel of the tile in CTU units indicated by TileId.

CtbAddrInRs = yCtbInCtus*PicWidthInCtbsY+xCtbInCtus
ここで、tileWidthInCtus[]、tileHeightInCtus[]はタイル情報設定部が導出する。
CtbAddrInRs = yCtbInCtus * PicWidthInCtbsY + xCtbInCtus
Here, tileWidthInCtus [] and tileHeightInCtus [] are derived by the tile information setting unit.

(ステップ3)
導出したCTUアドレスを先頭タイルアドレステーブルfirstCtbAddrInRs[]に格納する
firstCtbAddrInRs[TileId] = CtbAddrInRs
上記の処理の擬似コードを以下に示す。
(Step 3)
Store the derived CTU address in the first tile address table firstCtbAddrInRs []
firstCtbAddrInRs [TileId] = CtbAddrInRs
The pseudo code for the above process is shown below.

for(row=0; row < numTileRows; row++)
{
for(col=0; col < numTileColumns; col++)
{
TileIdx = row*numTileColumns+col;
rightEdgePosInCTU = 0;
for(i=0; i <= col; i++)
{
rightEdgePosInCTU += tileWidthInCtus[row*numTileColumns+i]
}
rightEdgePosInCtus[TileId] = rightEdgePosInCTU-1
bottomEdgePosInCTU = 0;
for(i=0 ;i <= row; i++)
{
bottomEdgePosInCTU += tileHeightInCtus[i*numTileColumns+col]
}
bottomEdgePosInCtus[tileId] = bottomEdgePosInCTU-1
xCtbInCtus = rightEdgePosInCtus[TileId]-tileWidthInCtus[TileId]+1
yCtbInCtus = bottomEdgePosInCtus[TileId]-tileHeightInCtus[TileId]+1
CtbAddrInRs = yCtbInCtus*PicWidthInCtbsY+xCtbInCtus
firstCtbAddrInRs[TileId] = CtbAddrInRs
}
}
(CT情報復号の処理)
以下、CT情報復号の処理を、図7、図8、図9を参照して説明する。図7は、本発明の一実施形態に係るCT情報復号部3021の動作を説明するフローチャートである。また、図8は、本発明の一実施形態に係るCTUおよびQT情報のシンタックス表の構成例を示す図であり、図9は、本発明の一実施形態に係るMT分割情報のシンタックス表の構成例を示す図である。また図7〜図9の別の例を、図27〜図29に示す。
for (row = 0; row <numTileRows; row ++)
{
for (col = 0; col <numTileColumns; col ++)
{
TileIdx = row * numTileColumns + col;
rightEdgePosInCTU = 0;
for (i = 0; i <= col; i ++)
{
rightEdgePosInCTU + = tileWidthInCtus [row * numTileColumns + i]
}
rightEdgePosInCtus [TileId] = rightEdgePosInCTU-1
bottomEdgePosInCTU = 0;
for (i = 0; i <= row; i ++)
{
bottomEdgePosInCTU + = tileHeightInCtus [i * numTileColumns + col]
}
bottomEdgePosInCtus [tileId] = bottomEdgePosInCTU-1
xCtbInCtus = rightEdgePosInCtus [TileId] -tileWidthInCtus [TileId] +1
yCtbInCtus = bottomEdgePosInCtus [TileId] -tileHeightInCtus [TileId] +1
CtbAddrInRs = yCtbInCtus * PicWidthInCtbsY + xCtbInCtus
firstCtbAddrInRs [TileId] = CtbAddrInRs
}
}
(Process of decrypting CT information)
The CT information decoding process will be described below with reference to FIGS. 7, 8 and 9. FIG. 7 is a flowchart explaining the operation of the CT information decoding unit 3021 according to the embodiment of the present invention. Further, FIG. 8 is a diagram showing a configuration example of a syntax table of CTU and QT information according to an embodiment of the present invention, and FIG. 9 is a syntax table of MT division information according to an embodiment of the present invention. It is a figure which shows the structural example. Another example of FIGS. 7 to 9 is shown in FIGS. 27 to 29.

図8(a)のcoding_tree_unit()のシンタックスの復号においてCT情報復号は、対象CTUの左上座標(xCtb,yCtb)を導出し、coding_quadtree()のシンタックスを再帰的に復号する。coding_quadtree()のCTの左上座標(xCb, yCb)の初期値には、CTUの左上座標(xCtb,yCtb)を用いる。(xCtb,yCtb)の別の導出方法として、図27(b)に示すように、タイルを利用する場合(tile_enabled_flagが真)と、そうでない場合とで、導出方法を変更してもよい。すなわち、タイルを利用する場合には、CTU左上座標(xCtb, yCtb)を、画面内のタイル左上座標(xTile[TileId], yTile[TileId])とタイル内のCTU左上座標の和から導出する。つまり、タイル内のCTU左上座標は、CTU単位のCTUの画面内座標(rx, ry)とCTU単位のタイルの画面内座標(TileXInCtbY, TileYInCtbY)の差分から、CTU単位のタイル内座標を導出し、CTUサイズをかける(CtbLog2SizeYで左シフトする)。   In the decoding of the syntax of coding_tree_unit () in FIG. 8 (a), CT information decoding derives the upper left coordinates (xCtb, yCtb) of the target CTU and recursively decodes the syntax of coding_quadtree (). The upper left coordinate (xCtb, yCtb) of the CTU is used as the initial value of the upper left coordinate (xCb, yCb) of the CT of coding_quadtree (). As another derivation method of (xCtb, yCtb), as shown in FIG. 27 (b), the derivation method may be changed depending on whether a tile is used (tile_enabled_flag is true) or not. That is, when using a tile, the CTU upper left coordinate (xCtb, yCtb) is derived from the sum of the tile upper left coordinate (xTile [TileId], yTile [TileId]) in the screen and the CTU upper left coordinate in the tile. In other words, the upper left coordinates of the CTU in the tile are derived from the difference between the in-screen coordinates of the CTU in CTU units (rx, ry) and the in-screen coordinates of the tile in CTU units (TileXInCtbY, TileYInCtbY). , CTU size is applied (CtbLog2SizeY shifts to the left).

CurrTileId = TileIdTbl[ CtbAddrInRs ]
xCtb = xTile[TileId]+(rx-TileXInCtbsY[CurrTileId]) <<CtbLog2SizeY
yCtb = yTile[TileId]+(ry-TileYInCtbsY[CurrTileId]) <<CtbLog2SizeY
逆に、タイルを利用しない場合には、CTU左上座標(xCtb, yCtb)を、CTU単位のCTUの画面内座標から導出する。つまり、タイル内のCTU左上座標は、CTU単位のCTUの画面内座標(rx
, ry)にCTUサイズをかける(CtbLog2SizeYで左シフトする)。
CurrTileId = TileIdTbl [CtbAddrInRs]
xCtb = xTile [TileId] + (rx-TileXInCtbsY [CurrTileId]) << CtbLog2SizeY
yCtb = yTile [TileId] + (ry-TileYInCtbsY [CurrTileId]) << CtbLog2SizeY
Conversely, when tiles are not used, the CTU upper left coordinates (xCtb, yCtb) are derived from the in-screen coordinates of the CTU in CTU units. In other words, the upper left coordinate of the CTU in the tile is the in-screen coordinate (rx
, ry) with CTU size (CtbLog2SizeY shifts to the left).

rx = CtbAddrInRs % PicWidthInCtbsY
ry = CtbAddrInRs / PicWidthInCtbsY
xCtb = rx << CtbLog2SizeY
yCtb = ry << CtbLog2SizeY
また、タイルを利用しない場合も、画面全体が一つのタイルであるとして、タイルの利用する利用しないに限らずに処理をしてもよい。
rx = CtbAddrInRs% PicWidthInCtbsY
ry = CtbAddrInRs / PicWidthInCtbsY
xCtb = rx << CtbLog2SizeY
yCtb = ry << CtbLog2SizeY
Further, even when tiles are not used, it is possible to perform processing without assuming that tiles are used, assuming that the entire screen is one tile.

(CTU以下の復号)
CT情報復号部3021は符号化データからCT情報を復号し、再帰的に符号化ツリーCT(coding_quadtree)を復号する。具体的には、CT情報復号部3021はQT情報を復号し、対象CT coding_quadtree(x0,y0,log2CbSize,cqtDepth)を復号する。なお、(x0,y0)は対象CTの左上座標、log2CbSizeはCTのサイズであるCTサイズの2を底とした対数である対数CTサイズ、cqtDepthはCTの階層を示すCTデプス(QT深度)である。
(Decoding below CTU)
The CT information decoding unit 3021 decodes CT information from coded data and recursively decodes a coding tree CT (coding_quadtree). Specifically, the CT information decoding unit 3021 decodes the QT information and the target CT coding_quadtree (x0, y0, log2CbSize, cqtDepth). Note that (x0, y0) is the upper left coordinate of the target CT, log2CbSize is the logarithmic CT size that is the logarithm of the CT size, which is the CT size, with 2 being the base, and cqtDepth is the CT depth (QT depth) that indicates the CT hierarchy. is there.

(S1411)CT情報復号部3021は復号したCT情報にQT分割フラグがあるか否かを判定する。QT分割フラグがある場合にはS1421に遷移し、それ以外の場合にはS1422に遷移する。   (S1411) The CT information decoding unit 3021 determines whether the decoded CT information has a QT division flag. If there is a QT division flag, the process transitions to S1421, and otherwise, the process transitions to S1422.

(S1421)CT情報復号部3021は、対数CTサイズlog2CbSizeがMinCbLog2SizeYより大きいと判定された場合には、QT分割フラグ(split_cu_flag)を復号する。
ここで、下式のように、タイルを用いる場合にはCTUの左上座標(xCtb,yCtb)とタイルサイズを考慮して、さらなる四分木分割を実施するか否かを示すsplit_cu_flagを通知する。
(S1421) The CT information decoding unit 3021 decodes the QT split flag (split_cu_flag) when it is determined that the logarithmic CT size log2CbSize is larger than MinCbLog2SizeY.
Here, when tiles are used as in the following formula, split_cu_flag indicating whether or not to perform further quadtree partitioning is notified in consideration of the upper left coordinates (xCtb, yCtb) of the CTU and the tile size.

if (x0+(1<<log2CbSize)-xTile<=wT && y0+(1<<log2CbSize)-yTile<=hT && log2CbSize>MinCbLog2SizeY)
split_cu_flag[x0][y0]
ここで、(x0,y0)はブロックの左上座標、(xTile,yTile)はタイルの左上座標、log2CbSizeはブロックサイズの対数値、wTとhTはタイル有効領域(もしくはタイル符号化領域)の幅と高さ、MinCbLog2SizeYはブロックの最小サイズの対数値である。
if (x0 + (1 << log2CbSize) -xTile <= wT && y0 + (1 << log2CbSize) -yTile <= hT &&log2CbSize> MinCbLog2SizeY)
split_cu_flag [x0] [y0]
Where (x0, y0) is the upper left coordinate of the block, (xTile, yTile) is the upper left coordinate of the tile, log2CbSize is the logarithm of the block size, wT and hT are the width of the tile effective area (or tile coding area) and Height, MinCbLog2SizeY, is the logarithm of the minimum block size.

ブロックの右端の座標x0+(1<<log2CbSize)、下端の座標y0+(1<<log2CbSize)が、タイル有効領域の右端の座標xTile+wTileと下端の座標yTile+hTileよりも小さい場合、対象ブロックはタイル有効領域内に存在する。ブロックがタイル内に存在し、ブロックサイズが最小値よりも大きい場合(log2CbSize>MinCbLog2SizeY)、ブロックをさらに分割するか否かを示すフラグsplit_cu_flagを通知する。ブロックをさらに四分木分割する場合、split_cu_flagを1にセットし、ブロックを四分木分割しない場合、split_cu_flagを0にセットする。   If the coordinates x0 + (1 << log2CbSize) at the right edge of the block and y0 + (1 << log2CbSize) at the bottom edge are smaller than the coordinates xTile + wTile at the right edge and yTile + hTile at the bottom edge of the tile effective area, the target block is It exists in the tile effective area. When the block exists in the tile and the block size is larger than the minimum value (log2CbSize> MinCbLog2SizeY), the flag split_cu_flag indicating whether or not the block is further divided is notified. Split_cu_flag is set to 1 when the block is further split into quadtrees, and split_cu_flag is set to 0 when the block is not split into quadtrees.

(S1422)CT情報復号部3021は、それ以外の場合には、符号化データからのQT分割フラグsplit_cu_flagの復号を省略し、QT分割フラグsplit_cu_flagに0をセットする。   (S1422) In other cases, the CT information decoding unit 3021 omits decoding of the QT division flag split_cu_flag from the encoded data, and sets 0 to the QT division flag split_cu_flag.

(S1450)QT分割フラグsplit_cu_flagが0以外である場合にはS1451に遷移し、それ以外の場合にはS1471に遷移する。   (S1450) If the QT split flag split_cu_flag is other than 0, the process transitions to S1451; otherwise, the process transitions to S1471.

(S1451)CT情報復号部3021はQT分割を行う。具体的には、CT情報復号部3021は、CTデプスcqtDepth+1の位置(x0,y0)、(x1,y0)、(x0,y1)、(x1,y1)において、対数CTサイズlog2CbSize-1の4つのCTを復号する。タイル内での各CTの右下座標(xi-xTile[TileId], yi-yTile[TileId])がタイルサイズ(wTile[TileId], hTile[TileId])未満のCTを復号する。逆に、各CTの右下座標(xi-xTile[TileId], yi+yTile[TileId])の何れかがタイルサイズ(wTile
[TileId], hTile[TileId])以上のCTは復号しない。すなわち、CT情報復号部3021は、対象CTUを再帰的に符号化ツリーに分割し、分割されたCTの左上座標(x1, y0), (x0, y1), (x1, y1)が対象タイル内である場合に、符号化ツリーを処理する。
(S1451) The CT information decoding unit 3021 performs QT division. Specifically, the CT information decoding unit 3021 is the logarithmic CT size log2CbSize-1 at the positions (x0, y0), (x1, y0), (x0, y1), and (x1, y1) of the CT depth cqtDepth + 1. Decode 4 CTs. Decode the CT with the lower right coordinates (xi-xTile [TileId], yi-yTile [TileId]) of each CT in the tile smaller than the tile size (wTile [TileId], hTile [TileId]). Conversely, any of the lower right coordinates (xi-xTile [TileId], yi + yTile [TileId]) of each CT is the tile size (wTile
CTs over [TileId], hTile [TileId]) are not decoded. That is, the CT information decoding unit 3021 recursively divides the target CTU into coding trees, and the upper left coordinates (x1, y0), (x0, y1), (x1, y1) of the divided CT are within the target tile. Then process the coding tree.

coding_quadtree(x0,y0,log2CbSize-1,cqtDepth+1)
if (x1-xTile[TileId] < wTile[TileId])
coding_quadtree(x1,y0,log2CbSize-1,cqtDepth+1)
if (y1-yTile[TileId] < hTile[TileId])
coding_quadtree(x0,y1,log2CbSize-1,cqtDepth+1)
if (x1-xTile[TileId] < wTile[TileId] && y1-yTile[TileId] < hTile[TileId])
coding_quadtree(x1,y1,log2CbSize-1,cqtDepth+1)
上記に置いて、例えば、4分木分割で得られた、(x1,y0)に位置するブロックであるcoding_quadtree(x1,y0,log2CbSize-1,cqtDepth+1,wTile,hTile,xTile,yTile)は、以下のようにx1がタイル内に位置する場合に符号化あるいは復号される。
coding_quadtree (x0, y0, log2CbSize-1, cqtDepth + 1)
if (x1-xTile [TileId] <wTile [TileId])
coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1)
if (y1-yTile [TileId] <hTile [TileId])
coding_quadtree (x0, y1, log2CbSize-1, cqtDepth + 1)
if (x1-xTile [TileId] <wTile [TileId] && y1-yTile [TileId] <hTile [TileId])
coding_quadtree (x1, y1, log2CbSize-1, cqtDepth + 1)
In the above, for example, coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1, wTile, hTile, xTile, yTile) which is a block located at (x1, y0) obtained by quadtree partitioning is , Is encoded or decoded when x1 is located in the tile as follows.

if (x1-xTile[TileId]<wTile[TileId])
coding_quadtree(x1,y0,log2CbSize-1,cqtDepth+1)
ここで、(x0,y0)は対象CTの左上座標、(x1,y1)は以下の式のように(x0,y0)にCTサイズ(1<<log2CbSize)の1/2を加えて導出される。
if (x1-xTile [TileId] <wTile [TileId])
coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1)
Where (x0, y0) is the upper left coordinate of the target CT, and (x1, y1) is derived by adding (x0, y0) 1/2 of the CT size (1 << log2CbSize) as shown in the equation below. It

x1 = x0+(1<<(log2CbSize-1))
y1 = y0+(1<<(log2CbSize-1))
1<<Nは2のN乗と同値である(以下同様)。
x1 = x0 + (1 << (log2CbSize-1))
y1 = y0 + (1 << (log2CbSize-1))
1 << N is equivalent to 2 to the Nth power (same below).

そして、CT情報復号部3021は、下式のように、CTの階層を示すCTデプスcqtDepthと対数CTサイズlog2CbSizeを更新する。   Then, the CT information decoding unit 3021 updates the CT depth cqtDepth indicating the CT hierarchy and the logarithmic CT size log2CbSize as in the following equation.

cqtDepth = cqtDepth+1
log2CbSize = log2CbSize-1
CT情報復号部3021は、下位のCTにおいても、更新された左上座標、対数CTサイズ、CTデプスを用いて、S1411から開始されるQT情報復号を継続する。
cqtDepth = cqtDepth + 1
log2CbSize = log2CbSize-1
The CT information decoding unit 3021 continues the QT information decoding starting from S1411 using the updated upper left coordinate, logarithmic CT size, and CT depth even in the lower CT.

QT分割終了後、CT情報復号部3021は符号化データからCT情報を復号し、再帰的に符号化ツリーCT(MT、coding_multitree(図9)あるいはmulti_type_tree(図29))を復号する。具体的には、CT情報復号部3021は、MT分割情報を復号し、対象CT coding_multitree(x0,y0,log2CbWidth,log2CbHeight,cbtDepth)、あるいは、multi_type_tree(x0,y0,cbWidth,cbHeight,mttDepth,depthOffset,partIdx,treeType)を復号する。なお、log2CbWidthはCTの幅の対数値、log2CbHeightはCTの高さの対数値、cbtDepthはマルチツリーの階層を示すCTデプス(MT深度)である。以下では、coding_multitreeについて説明する。   After the QT division is completed, the CT information decoding unit 3021 decodes the CT information from the encoded data, and recursively decodes the encoded tree CT (MT, coding_multitree (FIG. 9) or multi_type_tree (FIG. 29)). Specifically, the CT information decoding unit 3021 decodes the MT partition information, and the target CT coding_multitree (x0, y0, log2CbWidth, log2CbHeight, cbtDepth), or multi_type_tree (x0, y0, cbWidth, cbHeight, mttDepth, depthOffset, decrypt partIdx, treeType). Note that log2CbWidth is the logarithm of CT width, log2CbHeight is the logarithm of CT height, and cbtDepth is the CT depth (MT depth) indicating the hierarchy of the multi-tree. Hereinafter, coding_multitree will be described.

(S1471)CT情報復号部3021は、復号したCT情報にMT分割フラグ(分割情報)があるか否かを判定する。MT分割フラグがある場合にはS1481に遷移する。それ以外の場合にはS1482に遷移する。   (S1471) The CT information decoding unit 3021 determines whether the decoded CT information has an MT division flag (division information). If there is the MT division flag, the process proceeds to S1481. In other cases, the process proceeds to S1482.

(S1481)CT情報復号部3021はMT分割フラグsplit_mt_flagを復号する。   (S1481) The CT information decoding unit 3021 decodes the MT division flag split_mt_flag.

(S1482)CT情報復号部3021は符号化データからMT分割フラグsplit_mt_flagを復号せず、0に設定する。   (S1482) The CT information decoding unit 3021 does not decode the MT division flag split_mt_flag from the encoded data and sets it to 0.

(S1490)CT情報復号部3021は、MT分割フラグsplit_mt_flagが0以外の場合には、S149
1に遷移する。それ以外の場合には、CT情報復号部3021は対象CTを分割せず、処理を終了する(CUの復号に移行する)。
(S1490) If the MT division flag split_mt_flag is other than 0, the CT information decoding unit 3021 advances to S149.
Transition to 1. In other cases, the CT information decoding unit 3021 does not divide the target CT and ends the process (shifts to CU decoding).

(S1491)CT情報復号部3021はMT分割を行う。MT分割の方向を示すフラグsplit_mt_dirと、MT分割が2分木であるか3分木であるかを示すシンタックス要素split_mt_typeを復号する。CT情報復号部3021は、分割されたCTの左上座標が対象タイル内である場合に、符号化ツリーを処理する。CTの左上座標は2分木では、(x0, y1)もしくは(x1, y0)、3分木では(x0, y1), (x0, y2)もしくは(x1, y0), (x2, y0)。である。ここで先頭CTの左上座標(x0, y0)がタイル外になる場合には分割自体されないため、(x0, y0)は常にタイル内であると仮定する。   (S1491) The CT information decoding unit 3021 performs MT division. The flag split_mt_dir indicating the direction of MT division and the syntax element split_mt_type indicating whether the MT division is a binary tree or a ternary tree are decoded. The CT information decoding unit 3021 processes the coding tree when the upper left coordinate of the divided CT is within the target tile. The upper left coordinates of CT are (x0, y1) or (x1, y0) in the binary tree and (x0, y1), (x0, y2) or (x1, y0), (x2, y0) in the binary tree. Is. Here, when the upper left coordinate (x0, y0) of the head CT is outside the tile, the division itself is not performed, so it is assumed that (x0, y0) is always within the tile.

CT情報復号部3021は、MT分割タイプsplit_mt_typeが0(2分割)、かつ、MT分割方向split_dir_flagが1(水平分割)の場合は、以下の2つのCTを復号(BT分割情報復号)する。タイル内でのCT(x0, y1)の下座標y1-yTile[TileId]がタイルサイズhTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの下座標y1-yTile[TileId]がタイルサイズhTile[TileId]以上のCTは復号しない。   When the MT division type split_mt_type is 0 (two divisions) and the MT division direction split_dir_flag is 1 (horizontal division), the CT information decoding unit 3021 decodes the following two CTs (BT division information decoding). Decode a CT in which the lower coordinate y1-yTile [TileId] of CT (x0, y1) in the tile is less than the tile size hTile [TileId]. On the contrary, CTs in which the lower coordinate y1-yTile [TileId] of each CT in the tile is larger than the tile size hTile [TileId] are not decoded.

coding_multitree(x0,y0,log2CbWidth,log2CbHeight-1,cbtDepth+1)
if (y1-yTile[TileId] < hTile[TileId])
coding_multitree(x0,y1,log2CbWidth,log2CbHeight-1,cbtDepth+1)
一方、MT分割方向split_dir_flagが0(垂直分割)の場合は、以下の2つのCTを復号(BT分割情報復号)する。タイル内でのCT(x1, y0)の右座標x1-xTile[TileId]がタイルサイズwTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの右座標x1-xTile[TileId]がタイルサイズwTile[TileId]以上のCTは復号しない。
coding_multitree (x0, y0, log2CbWidth, log2CbHeight-1, cbtDepth + 1)
if (y1-yTile [TileId] <hTile [TileId])
coding_multitree (x0, y1, log2CbWidth, log2CbHeight-1, cbtDepth + 1)
On the other hand, when the MT division direction split_dir_flag is 0 (vertical division), the following two CTs are decoded (BT division information decoding). Decode a CT whose right coordinate x1-xTile [TileId] of CT (x1, y0) in the tile is less than the tile size wTile [TileId]. On the contrary, the CT whose right coordinate x1-xTile [TileId] of each CT in the tile is equal to or larger than the tile size wTile [TileId] is not decoded.

coding_multitree(x0,y0,log2CbWidth-1,log2CbHeight,cbtDepth+1)
if (x1-xTile[TileId] < wTile[TileId])
coding_multitree(x1,y0,log2CbWidth-1,log2CbHeight,cbtDepth+1)
ここで、(x1,y1)は以下の式で導出される。
coding_multitree (x0, y0, log2CbWidth-1, log2CbHeight, cbtDepth + 1)
if (x1-xTile [TileId] <wTile [TileId])
coding_multitree (x1, y0, log2CbWidth-1, log2CbHeight, cbtDepth + 1)
Here, (x1, y1) is derived by the following equation.

x1 = x0+(1<<(log2CbWidth-1))
y1 = y0+(1<<(log2CbHeight-1))
さらに、log2CbWidth、または、log2CbHeightを下式のように更新する。
x1 = x0 + (1 << (log2CbWidth-1))
y1 = y0 + (1 << (log2CbHeight-1))
Furthermore, log2CbWidth or log2CbHeight is updated as the following formula.

log2CbWidth = log2CbWidth-1
log2CbHeight = log2CbHeight-1
CT情報復号部3021は、MT分割タイプsplit_mt_typeが1(3分割)を示す場合には、3つのCTを復号(TT分割情報復号)する。
log2CbWidth = log2CbWidth-1
log2CbHeight = log2CbHeight-1
If the MT division type split_mt_type indicates 1 (3 divisions), the CT information decoding unit 3021 decodes 3 CTs (TT division information decoding).

MT分割方向split_dir_flagが1(水平分割)の場合は、以下の3つのCTを復号する。タイル内でのi=0, 1の各CT(x0, yi)の下座標yi-yTile[TileId]がタイルサイズhTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの下座標yi-yTile[TileId]がタイルサイズhTile[TileId]以上のCTは復号しない。   When the MT division direction split_dir_flag is 1 (horizontal division), the following three CTs are decoded. Decode a CT in which the lower coordinate yi-yTile [TileId] of each CT (x0, yi) of i = 0, 1 in the tile is less than the tile size hTile [TileId]. On the contrary, the CT whose bottom coordinate yi-yTile [TileId] of each CT in the tile is equal to or larger than the tile size hTile [TileId] is not decoded.

coding_multitree(x0,y0,log2CbWidth,log2CbHeight-2,cbtDepth+1)
if (y1-yTile[TileId] < hTile[TileId])
coding_multitree(x0,y1,log2CbWidth,log2CbHeight-1,cbtDepth+1)
if (y2-yTile[TileId] < hTile[TileId])
coding_multitree(x0,y2,log2CbWidth,log2CbHeight-2,cbtDepth+1)
一方、MT分割方向split_dir_flagが1(垂直分割)の場合は、以下の3つのCTを復号(
TT分割情報復号)する。タイル内でのi=0, 1の各CT(xi, y0)の右座標xi-xTile[TileId]がタイルサイズwTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの右座標xi-xTile[TileId]がタイルサイズwTile[TileId]以上のCTは復号しない。
coding_multitree (x0, y0, log2CbWidth, log2CbHeight-2, cbtDepth + 1)
if (y1-yTile [TileId] <hTile [TileId])
coding_multitree (x0, y1, log2CbWidth, log2CbHeight-1, cbtDepth + 1)
if (y2-yTile [TileId] <hTile [TileId])
coding_multitree (x0, y2, log2CbWidth, log2CbHeight-2, cbtDepth + 1)
On the other hand, when the MT split direction split_dir_flag is 1 (vertical split), the following three CTs are decoded (
TT division information decryption). A CT in which the right coordinate xi-xTile [TileId] of each CT (xi, y0) at i = 0, 1 in the tile is less than the tile size wTile [TileId] is decoded. On the contrary, the CT whose right coordinate xi-xTile [TileId] of each CT in the tile is equal to or larger than the tile size wTile [TileId] is not decoded.

coding_multitree(x0,y0,log2CbWidth-2,log2CbHeight,cbtDepth+1)
if (x1-xTile[TileId] < wTile[TileId])
coding_multitree(x1,y0,log2CbWidth-1,log2CbHeight,cbtDepth+1)
if (x2-xTile[TileId] < wTile[TileId])
coding_multitree(x2,y0,log2CbWidth-2,log2CbHeight,cbtDepth+1)
ここで、(x1,y1)、(x2,y2)は、以下の式のように、導出される。
coding_multitree (x0, y0, log2CbWidth-2, log2CbHeight, cbtDepth + 1)
if (x1-xTile [TileId] <wTile [TileId])
coding_multitree (x1, y0, log2CbWidth-1, log2CbHeight, cbtDepth + 1)
if (x2-xTile [TileId] <wTile [TileId])
coding_multitree (x2, y0, log2CbWidth-2, log2CbHeight, cbtDepth + 1)
Here, (x1, y1) and (x2, y2) are derived as in the following equations.

x1 = x0+(1<<(log2CbWidth-2))
y1 = y0+(1<<(log2CbHeight-2))
x2 = x0+(3<<(log2CbWidth-2))
y2 = y0+(3<<(log2CbHeight-2))
CT情報復号部3021は、下位のCTにおいても、更新された左上座標、CTの幅及び高さ、MT深度を用いて、S1471から開始されるBT分割情報復号、あるいは、TT分割情報復号を継続する。
x1 = x0 + (1 << (log2CbWidth-2))
y1 = y0 + (1 << (log2CbHeight-2))
x2 = x0 + (3 << (log2CbWidth-2))
y2 = y0 + (3 << (log2CbHeight-2))
The CT information decoding unit 3021 continues the BT partition information decoding starting from S1471 or the TT partition information decoding using the updated upper left coordinate, the width and height of the CT, and the MT depth even in the lower CT. To do.

また、CT情報復号部3021は、MT分割フラグsplit_mt_flagが0の場合、すなわちQT分割もMT分割も行われない場合には、CU復号部3022でCU(coding_unit(x0,y0,log2CbSize, cqtDepth))を復号する。   When the MT division flag split_mt_flag is 0, that is, when neither QT division nor MT division is performed, the CT information decoding unit 3021 uses CU (coding_unit (x0, y0, log2CbSize, cqtDepth)) in the CU decoding unit 3022. To decrypt.

以上のように、画面内座標系で表現される各CUの左上座標(xi, yi)から、タイル左上座標(xTile, yTile)を引いて、タイル内座標系の左上座標を導出し、それをタイルサイズ(wTile, yTile)と比較することで、分割フラグを復号し、各CTを復号する。これによって、タイルサイズがCTUサイズの整数倍ではない場合においても、無駄な分割フラグ、無駄なCTを復号することなく、効率的にCU分割を行うことが可能であるという効果を奏する。   As described above, the upper left coordinate (xTile, yTile) of the tile is subtracted from the upper left coordinate (xi, yi) of each CU expressed in the in-screen coordinate system to derive the upper left coordinate of the in-tile coordinate system. By comparing with the tile size (wTile, yTile), the division flag is decoded and each CT is decoded. As a result, even when the tile size is not an integral multiple of the CTU size, there is an effect that it is possible to efficiently perform CU division without decoding useless division flags and useless CT.

(タイル分割の別の例)
図31のシンタックステーブルを用いてタイル分割の別の例を説明する。この例では、画面を矩形のタイルに分割し、タイルをグループとした単位を用いて符号化データを構成する。タイルの左上座標はxTile, yTile、タイルの幅、高さはwTile, hTileである。タイルの先頭位置を格納するテーブルFirstCtbAddrTsとタイルグループの位置tile_group_addressから、先頭タイルのCTUアドレスctbAddrInTsを導出する。0からnum_tiles_in_tile_group_minus1までのCTUを復号する。num_tiles_in_tile_group_minus1は、ピクチャ内のタイルの個数から1を引いた値である。タイルの終端でend_of_tile_one_bitとバイトアライン用ビットbyte_alignment()を復号する。
(Another example of tile division)
Another example of tile division will be described using the syntax table of FIG. In this example, the screen is divided into rectangular tiles, and the encoded data is configured using units in which the tiles are grouped. The upper left coordinates of the tile are xTile and yTile, and the width and height of the tile are wTile and hTile. The CTU address ctbAddrInTs of the first tile is derived from the table FirstCtbAddrTs that stores the first position of the tile and the tile_group_address of the tile group position. Decode the CTU from 0 to num_tiles_in_tile_group_minus1. num_tiles_in_tile_group_minus1 is a value obtained by subtracting 1 from the number of tiles in the picture. Decode end_of_tile_one_bit and byte alignment bit byte_alignment () at the end of the tile.

図31(b)は、タイル座標系におけるCTU位置CtbAddrInTileを用いて、各CTUを復号する例を示す。タイル内のCTU単位のラスタスキャン位置CtbAddrInTileと、タイルのCTU単位のサイズTileWidthInCtusから、タイル内のCTU単位の位置(rx,ry)とタイル内の画素単位の位置(xCtb,yCtb)を導出する。導出したタイル内座標系のCTU位置を用いて、以下のようにCTUを復号する。なお、タイル内のCTU単位のラスタ位置CtbAddrInTileは、画面単位のCTU位置CtbAddrInTsからタイルの先頭位置FirstCtbAddrTsを引いて導出してもよい。   FIG. 31B shows an example of decoding each CTU using the CTU position CtbAddrInTile in the tile coordinate system. From the raster scan position CtbAddrInTile in units of CTU in the tile and the size TileWidthInCtus in units of CTU of the tile, the position (rx, ry) in units of CTU in the tile and the position (xCtb, yCtb) in units of pixel in the tile are derived. Using the derived CTU position in the tile coordinate system, the CTU is decoded as follows. The raster position CtbAddrInTile in units of CTU in the tile may be derived by subtracting the tile start position FirstCtbAddrTs from the CTU position CtbAddrInTs in screen units.

CtbAddrInTile = CtbAddrInTs - FirstCtbAddrTs[tile_group_id]
また、タイル内座標系の位置(rx,ry)を用いて輝度のALF処理を行うか否かを示すオンオフフラグalf_ctb_flag[0][rx][ry]、色差(Cb、Cr)のALF処理を行うか否かを示すオンオフフラグalf_ctb_flag[1][rx][ry]、alf_ctb_flag[2][rx][ry]をタイル単位もしくはタイ
ルグループ単位で導出しても良い。上記のように、ALF処理を行うか否かを示すオンオフフラグをタイル単位で符号化、復号し、タイル単位(タイルグループ単位)の座標系(タイル内座標系)を用いて導出することにより、画面内の一部のタイルの符号化データ(ビットストリーム)を抽出して一つの画像のビットストリームを生成する場合においても、ALFに関するシンタックスを書き換えることなくALF処理を行うことができるという効果を奏する。
CtbAddrInTile = CtbAddrInTs-FirstCtbAddrTs [tile_group_id]
In addition, the on / off flag alf_ctb_flag [0] [rx] [ry], which indicates whether to perform the ALF processing of the luminance using the position (rx, ry) in the tile coordinate system, and the ALF processing of the color difference (Cb, Cr) The on / off flags alf_ctb_flag [1] [rx] [ry] and alf_ctb_flag [2] [rx] [ry] indicating whether or not to perform may be derived in tile units or tile group units. As described above, by encoding and decoding the on / off flag indicating whether or not to perform the ALF process in tile units, and deriving using the coordinate system (tile coordinate system) in tile units (tile group units), Even when extracting encoded data (bitstream) of some tiles in the screen to generate a bitstream of one image, it is possible to perform ALF processing without rewriting the syntax related to ALF. Play.

(CTU以下の復号)
図7、図32、図33のシンタックステーブルを復号する場合のCT情報復号部3021の動作を説明する。本構成のタイル左上の座標を原点とするタイル内座標系を用いて、CTU座標(xCtb, yCtb)を導出し、そのCTU座標とタイルサイズ(wTile, yTile)に基づいて再帰的にCT情報及びMT分割情報を復号して、CT情報を復号する。
(Decoding below CTU)
The operation of the CT information decoding unit 3021 when decoding the syntax tables of FIGS. 7, 32, and 33 will be described. Using the in-tile coordinate system whose origin is the coordinates of the upper left corner of the tile in this configuration, derive the CTU coordinates (xCtb, yCtb) and recursively use CT information and tile size (wTile, yTile) based on the CTU coordinates and tile size (wTile, yTile). Decode MT division information and CT information.

まず、CT情報復号部3021は符号化データからCT情報を復号し、再帰的に符号化ツリーCT(coding_quadtree)を復号する。具体的には、CT情報復号部3021はQT情報を復号し、対象CT coding_quadtree(x0,y0,log2CbSize,cqtDepth,treeType)を復号する。   First, the CT information decoding unit 3021 decodes CT information from encoded data and recursively decodes an encoded tree CT (coding_quadtree). Specifically, the CT information decoding unit 3021 decodes the QT information and decodes the target CT coding_quadtree (x0, y0, log2CbSize, cqtDepth, treeType).

(S1411)CT情報復号部3021は復号したCT情報にQT分割フラグがあるか否かを判定する。QT分割フラグがある場合にはS1421に遷移し、それ以外の場合にはS1422に遷移する。   (S1411) The CT information decoding unit 3021 determines whether the decoded CT information has a QT division flag. If there is a QT division flag, the process transitions to S1421, and otherwise, the process transitions to S1422.

(S1421)CT情報復号部3021は、対数CTサイズlog2CbSizeがMinCbLog2SizeYより大きいと判定された場合には、QT分割フラグ(qt_split_cu_flag)を復号する。
ここで、下式のように、タイルを用いる場合にはタイル内座標系におけるCTの左上座標 (x0,y0)とタイルサイズを考慮して、さらなる四分木分割を実施するか否かを示すqt_split_cu_flagが通知される。
(S1421) The CT information decoding unit 3021 decodes the QT split flag (qt_split_cu_flag) when it is determined that the logarithmic CT size log2CbSize is larger than MinCbLog2SizeY.
Here, as shown in the following equation, when using tiles, consider whether the upper left coordinates (x0, y0) of the CT in the tile coordinate system and the tile size are taken into consideration and whether further quadtree partitioning is performed. The qt_split_cu_flag is notified.

if ((((x0+(1<<log2CbSize) <= wTile[TileId])?1:0)+
((y0+(1<<log2CbSize) <= hTile[TileId])?1:0)+
(((1<<log2CbSize) <= MaxBtSizeY)?1:0)) >= 2 &&
log2CbSize > MinQtLog2SizeY)
qt_split_cu_flag[x0][y0]
つまり、ブロックの右端の座標x0+(1<<log2CbSize)、下端の座標y0+(1<<log2CbSize)の両方が、タイル幅wTileとタイル高さhTile以下の場合、
(x0+(1<<log2CbSize) <= wTile[TileId])?1:0)+
((y0+(1<<log2CbSize) <= hTile[TileId])?1:0)>=2
もしくは、ブロックの右端の座標x0+(1<<log2CbSize)がタイル幅wTile以下で、CTサイズが最大BTサイズMaxBtSizeY以上の場合、
(x0+(1<<log2CbSize) <= wTile[TileId])?1:0)+
(((1<<log2CbSize) <= MaxBtSizeY)?1:0)) >= 2
もしくは、ブロックの下端の座標y0+(1<<log2CbSize)がタイル高さhTile以下で、CTサイズが最大BTサイズMaxBtSizeY以上の場合、
(y0+(1<<log2CbSize) <= hTile[TileId])?1:0)+
(((1<<log2CbSize) <= MaxBtSizeY)?1:0)) >= 2
の場合に、QT分割フラグqt_split_cu_flagを符号化データから復号する。
if ((((x0 + (1 << log2CbSize) <= wTile [TileId])? 1: 0) +
((y0 + (1 << log2CbSize) <= hTile [TileId])? 1: 0) +
(((1 << log2CbSize) <= MaxBtSizeY)? 1: 0))> = 2 &&
log2CbSize> MinQtLog2SizeY)
qt_split_cu_flag [x0] [y0]
In other words, if both the coordinates x0 + (1 << log2CbSize) at the right end of the block and y0 + (1 << log2CbSize) at the bottom end are less than or equal to the tile width wTile and tile height hTile,
(x0 + (1 << log2CbSize) <= wTile [TileId])? 1: 0) +
((y0 + (1 << log2CbSize) <= hTile [TileId])? 1: 0)> = 2
Or, if the coordinate x0 + (1 << log2CbSize) at the right end of the block is the tile width wTile or less and the CT size is the maximum BT size MaxBtSizeY or more,
(x0 + (1 << log2CbSize) <= wTile [TileId])? 1: 0) +
(((1 << log2CbSize) <= MaxBtSizeY)? 1: 0))> = 2
Or, if the coordinate y0 + (1 << log2CbSize) at the bottom of the block is the tile height hTile or less and the CT size is the maximum BT size MaxBtSizeY or more,
(y0 + (1 << log2CbSize) <= hTile [TileId])? 1: 0) +
(((1 << log2CbSize) <= MaxBtSizeY)? 1: 0))> = 2
In the case of, the QT split flag qt_split_cu_flag is decoded from the encoded data.

(S1422)CT情報復号部3021は、それ以外の場合には、符号化データからのQT分割フラグqt_split_cu_flagの復号を省略し、QT分割フラグqt_split_cu_flagを、タイルサイズ(wTile, hTile)を用いて以下のように導出する。   (S1422) CT information decoding unit 3021 omits decoding of the QT division flag qt_split_cu_flag from the encoded data in other cases, and the QT division flag qt_split_cu_flag is set to the following using the tile size (wTile, hTile). To derive.

以下の何れかが真の場合、qt_split_cu_flagに1を導出する。   If any of the following is true, 1 is derived for qt_split_cu_flag.

x0+(1<<log2CbSize) > wTile[TileId] && (1<<log2CbSize) > MaxBtSizeY
y0+(1<<log2CbSize) > hTile[TileId] && (1<<log2CbSize) > MaxBtSizeY
以下の全てが真の場合、qt_split_cu_flagに1を導出する。
x0 + (1 <<log2CbSize)> wTile [TileId] && (1 <<log2CbSize)> MaxBtSizeY
y0 + (1 <<log2CbSize)> hTile [TileId] && (1 <<log2CbSize)> MaxBtSizeY
If all of the following are true, derive 1 for qt_split_cu_flag.

x0+(1<<log2CbSize) > wTile[TileId]
y0+(1<<log2CbSize) > hTile[TileId]
(1<<log2CbSize) > MinQtSizeY
上記以外の場合、qt_split_cu_flagに1を導出する。
x0 + (1 <<log2CbSize)> wTile [TileId]
y0 + (1 <<log2CbSize)> hTile [TileId]
(1 <<log2CbSize)> MinQtSizeY
In cases other than the above, 1 is derived for qt_split_cu_flag.

すなわち、CT右座標がタイルサイズ幅を超えており、かつ、CTサイズが最大BT分割サイズMaxBtSizeYを超えている場合には必ず分割する(qt_split_cu_flagに1を導出)。   That is, when the CT right coordinate exceeds the tile size width and the CT size exceeds the maximum BT division size MaxBtSizeY, the CT is always divided (1 is derived for qt_split_cu_flag).

CT下座標がタイルサイズ高さを超えており、かつ、CTサイズが最大BT分割サイズMaxBtSizeYを超えている場合には必ず分割する(qt_split_cu_flagに1を導出)。   If the CT lower coordinate exceeds the tile size height and the CT size exceeds the maximum BT division size MaxBtSizeY, it is always divided (1 is derived for qt_split_cu_flag).

CT右下座標がタイルサイズを超えている場合にも必ず分割する(qt_split_cu_flagに1を導出)。   Even if the lower right coordinate of CT exceeds the tile size, it is always split (1 is derived for qt_split_cu_flag).

(S1450)QT分割フラグsplit_cu_flagが0以外である場合にはS1451に遷移し、それ以外の場合にはS1471に遷移する。   (S1450) If the QT split flag split_cu_flag is other than 0, the process transitions to S1451; otherwise, the process transitions to S1471.

(S1451)CT情報復号部3021はQT分割を行う。具体的には、CT情報復号部3021は、CTデプスcqtDepth+1の位置(x0,y0)、(x1,y0)、(x0,y1)、(x1,y1)において、対数CTサイズlog2CbSize-1の4つのCTを復号する。タイル内での各CTの右下座標(xi-xTile[TileId], yi+yTile[TileId])がタイルサイズ(wTile[TileId], hTile[TileId])以下のCTを復号する。逆に、各CTの右下座標(xi, yi)の何れかがタイルサイズ(wTile[TileId], hTile[TileId])より大きいCTは復号しない。すなわち、CT情報復号部3021は、対象CTUを再帰的に符号化ツリーに分割し、分割されたCTの左上座標(x1, y0)、(x0, y1)、(x1, y1)が対象タイル内である場合に、符号化ツリーを処理する。   (S1451) The CT information decoding unit 3021 performs QT division. Specifically, the CT information decoding unit 3021 is a logarithmic CT size log2CbSize-1 at the positions (x0, y0), (x1, y0), (x0, y1), and (x1, y1) of the CT depth cqtDepth + 1. Decode 4 CTs. The lower right coordinates (xi-xTile [TileId], yi + yTile [TileId]) of each CT in the tile are decoded with the tile size (wTile [TileId], hTile [TileId]) or less. Conversely, a CT in which any of the lower right coordinates (xi, yi) of each CT is larger than the tile size (wTile [TileId], hTile [TileId]) is not decoded. That is, the CT information decoding unit 3021 recursively divides the target CTU into coding trees, and the upper left coordinates (x1, y0), (x0, y1), and (x1, y1) of the divided CT are within the target tile. Then process the coding tree.

coding_quadtree(x0,y0,log2CbSize-1,cqtDepth+1)
if (x1 < wTile[TileId])
coding_quadtree(x1,y0,log2CbSize-1,cqtDepth+1)
if (y1 < hTile[TileId])
coding_quadtree(x0,y1,log2CbSize-1,cqtDepth+1)
if (x1 < wTile[TileId] && y1 < hTile[TileId])
coding_quadtree(x1,y1,log2CbSize-1,cqtDepth+1)
上記において、例えば、4分木分割で得られた、(x1,y0)に位置するブロックであるcoding_quadtree(x1,y0,log2CbSize-1,cqtDepth+1)は、以下のようにx1がタイル内に位置する場合に符号化あるいは復号される。
coding_quadtree (x0, y0, log2CbSize-1, cqtDepth + 1)
if (x1 <wTile [TileId])
coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1)
if (y1 <hTile [TileId])
coding_quadtree (x0, y1, log2CbSize-1, cqtDepth + 1)
if (x1 <wTile [TileId] && y1 <hTile [TileId])
coding_quadtree (x1, y1, log2CbSize-1, cqtDepth + 1)
In the above, for example, obtained by quadtree partitioning, coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1), which is a block located at (x1, y0), is as follows where x1 is in the tile: If it is located, it is encoded or decoded.

if (x1<wTile[TileId])
coding_quadtree(x1,y0,log2CbSize-1,cqtDepth+1)
ここで、(x0,y0)は対象CTの左上座標、(x1,y1)は以下の式のように(x0,y0)にCTサイズ(1<<log2CbSize)の1/2を加えて導出される。
if (x1 <wTile [TileId])
coding_quadtree (x1, y0, log2CbSize-1, cqtDepth + 1)
Where (x0, y0) is the upper left coordinate of the target CT, and (x1, y1) is derived by adding (x0, y0) 1/2 of the CT size (1 << log2CbSize) as shown in the equation below. It

x1 = x0+(1<<(log2CbSize-1))
y1 = y0+(1<<(log2CbSize-1))
1<<Nは2のN乗と同値である(以下同様)。
x1 = x0 + (1 << (log2CbSize-1))
y1 = y0 + (1 << (log2CbSize-1))
1 << N is equivalent to 2 to the Nth power (same below).

そして、CT情報復号部3021は、下式のように、CTの階層を示すCTデプスcqtDepthと対数CTサイズlog2CbSizeを更新する。   Then, the CT information decoding unit 3021 updates the CT depth cqtDepth indicating the CT hierarchy and the logarithmic CT size log2CbSize as in the following equation.

cqtDepth = cqtDepth+1
log2CbSize = log2CbSize-1
CT情報復号部3021は、下位のCTにおいても、更新された左上座標、対数CTサイズ、CTデプスを用いて、S1411から開始されるQT情報復号を継続する。
cqtDepth = cqtDepth + 1
log2CbSize = log2CbSize-1
The CT information decoding unit 3021 continues the QT information decoding starting from S1411 using the updated upper left coordinate, logarithmic CT size, and CT depth even in the lower CT.

QT分割終了後、CT情報復号部3021は符号化データからCT情報を復号し、再帰的に符号化ツリーCT(MT、multi_type_tree)を復号する。具体的には、CT情報復号部3021は、タイル内座標とタイルサイズを用いて、MT分割情報を復号し、対象CT multi_type_tree (x0,y0,CbWidth,CbHeight,mttDepth,depthOffset,partIdx,treeType)を復号する。なお、CbWidthはCTの幅、CbHeightはCTの高さ、mttDepthはマルチツリーの階層を示すCTデプス(MT深度)である。   After the QT division is completed, the CT information decoding unit 3021 decodes the CT information from the encoded data and recursively decodes the encoded tree CT (MT, multi_type_tree). Specifically, the CT information decoding unit 3021 uses the in-tile coordinates and the tile size to decode the MT partition information, and the target CT multi_type_tree (x0, y0, CbWidth, CbHeight, mttDepth, depthOffset, partIdx, treeType). Decrypt. Note that CbWidth is the width of the CT, CbHeight is the height of the CT, and mttDepth is the CT depth (MT depth) indicating the hierarchy of the multi-tree.

(S1471)CT情報復号部3021は、復号したCT情報にMT分割フラグ(分割情報、すなわちmtt_split_cu_flag、mtt_split_cu_vertical_flag、mtt_split_cu_binary_flag)があるか否かを判定する。以下の判定により、MT分割フラグがある場合にはS1481に遷移する。それ以外の場合にはS1482に遷移する。   (S1471) The CT information decoding unit 3021 determines whether the decoded CT information has an MT division flag (division information, that is, mtt_split_cu_flag, mtt_split_cu_vertical_flag, mtt_split_cu_binary_flag). According to the following determination, if there is the MT division flag, the process proceeds to S1481. In other cases, the process proceeds to S1482.

(allowSplitBtVer || allowSplitBtHor || allowSplitTtVer || allowSplitTtHor) &&
(x0+cbWidth<=wTile[TileId]) && (y0+cbHeight<=hTile[TileId])
ここで、allowSplitBtVer、allowSplitBtHorは以下の処理により導出する。
(allowSplitBtVer || allowSplitBtHor || allowSplitTtVer || allowSplitTtHor) &&
(x0 + cbWidth <= wTile [TileId]) && (y0 + cbHeight <= hTile [TileId])
Here, allowSplitBtVer and allowSplitBtHor are derived by the following processing.

以下の何れかが真の場合、allowBtSplitを偽(FALTH)とする。
・cbSize <= MinBtSizeY
・cbWidth > MaxBtSizeY
・cbHeight > MaxBtSizeY
・mttDepth >= MaxMttDepth + depthOffset
上記以外で以下の全てが真の場合、allowBtSplitを偽とする。
・btSplit = SPLIT_BT_VER
・y0 + cbHeight > hTile[TileId]
上記以外で以下の全てが真の場合、allowBtSplitを偽とする。
・btSplit = SPLIT_BT_HOR
・x0 + cbWidth > wTile[TileId]
上記以外で以下の全てが真の場合、allowBtSplitを偽とする。
・mttDepth > 0
・partIdx = 1
・MttSplitMode[ x0 ][ y0 ][ mttDepth ? 1 ] = parallelTtSplit
上記以外の場合、allowBtSplitを真とする。
・allowBtSplit = TRUE
ここでcbSize、parallelTtSplitは、以下のように設定する。
If any of the following is true, allowBtSplit is false (FALTH).
・ CbSize <= MinBtSizeY
・ CbWidth> MaxBtSizeY
・ CbHeight> MaxBtSizeY
・ MttDepth> = MaxMttDepth + depthOffset
In addition to the above, if all of the following are true, allowBtSplit is false.
・ BtSplit = SPLIT_BT_VER
・ Y0 + cbHeight> hTile [TileId]
In addition to the above, if all of the following are true, allowBtSplit is false.
・ BtSplit = SPLIT_BT_HOR
・ X0 + cbWidth> wTile [TileId]
In addition to the above, if all of the following are true, allowBtSplit is false.
・ MttDepth> 0
・ PartIdx = 1
・ MttSplitMode [x0] [y0] [mttDepth? 1] = parallelTtSplit
In cases other than the above, allowBtSplit is true.
・ AllowBtSplit = TRUE
Here, cbSize and parallelTtSplit are set as follows.

SPLIT_BT_VER(allowSplitBtVer)の場合、cbSize=cbWidth、parallelTtSplit=SPLIT_TT_VER
SPLIT_BT_HOR(allowSplitBtHor)の場合、cbSize=cbHeight、parallelTtSplit=SPLIT_TT_HOR
なお、allowSplitTtVer、allowSplitTtHorは以下の処理により導出する。
In case of SPLIT_BT_VER (allowSplitBtVer), cbSize = cbWidth, parallelTtSplit = SPLIT_TT_VER
If SPLIT_BT_HOR (allowSplitBtHor), cbSize = cbHeight, parallelTtSplit = SPLIT_TT_HOR
Note that allowSplitTtVer and allowSplitTtHor are derived by the following processing.

以下の何れかが真の場合、allowTtSplit(allowTtSplirHor, allowTtSplirVer)を偽(FALTH)とする。
・cbSize <= 2 * MinTtSizeY
・cbWidth > MaxTtSizeY
・cbHeight > MaxTtSizeY
・mttDepth >= MaxMttDepth + depthOffset
・x0 + cbWidth > wTile[TileId]
・y0 + cbHeight > hTile[TileId]
上記以外の場合、allowTtSplit(allowTtSplirHor, allowTtSplirVer)を真とする。
・allowTtSplit = TRUE
ここでcbSizeは、以下のように設定する。
If any of the following is true, allowTtSplit (allowTtSplirHor, allowTtSplirVer) is set to false (FALTH).
・ CbSize <= 2 * MinTtSizeY
・ CbWidth> MaxTtSizeY
・ CbHeight> MaxTtSizeY
・ MttDepth> = MaxMttDepth + depthOffset
・ X0 + cbWidth> wTile [TileId]
・ Y0 + cbHeight> hTile [TileId]
In cases other than the above, allowTtSplit (allowTtSplirHor, allowTtSplirVer) is set to true.
・ AllowTtSplit = TRUE
Here, cbSize is set as follows.

SPLIT_TT_VER(allowSplitTtVer)の場合、cbSize=cbWidth
SPLIT_TT_HOR(allowSplitTtHor)の場合、cbSize=cbHeight
すなわち、CT右座標がタイルサイズ幅を超えるか、CT下座標がタイルサイズ高さを超えいるかに応じて、MT分割フラグを符号化するか否かを決定する。
In case of SPLIT_TT_VER (allowSplitTtVer), cbSize = cbWidth
If SPLIT_TT_HOR (allowSplitTtHor), cbSize = cbHeight
That is, whether or not to encode the MT division flag is determined according to whether the CT right coordinate exceeds the tile size width or the CT lower coordinate exceeds the tile size height.

(S1481)CT情報復号部3021はMT分割フラグmtt_split_cu_flagを復号する。   (S1481) The CT information decoding unit 3021 decodes the MT split flag mtt_split_cu_flag.

(S1482)CT情報復号部3021は符号化データからMT分割フラグmtt_split_cu_flagを復号せず、以下のように導出する。   (S1482) The CT information decoding unit 3021 does not decode the MT split flag mtt_split_cu_flag from the encoded data, and derives it as follows.

以下のいずれかが真の場合、mtt_split_cu_flagに1を導出する。
・x0 + cbWidth > wTile[TileId]
・x0 + cbHeight > hTile[TileId]
上記以外の場合、mtt_split_cu_flagに0を導出する。すなわち、タイル内座標におけるCTの右端および下端座標がタイルサイズを超える場合には、MT分割フラグを復号しない。
If any of the following is true, 1 is derived to mtt_split_cu_flag.
・ X0 + cbWidth> wTile [TileId]
・ X0 + cbHeight> hTile [TileId]
In cases other than the above, 0 is derived in mtt_split_cu_flag. That is, when the right edge and lower edge coordinates of the CT in the tile coordinates exceed the tile size, the MT division flag is not decoded.

すなわち、CT右座標がタイルサイズ幅を超えるか、CT下座標がタイルサイズ高さを超えいるかに応じて、TT分割フラグを符号化するか否かを決定する。   That is, whether to encode the TT division flag is determined according to whether the CT right coordinate exceeds the tile size width or the CT lower coordinate exceeds the tile size height.

(S1490)CT情報復号部3021は、MT分割フラグsplit_mt_flagが0以外の場合には、S1491に遷移する。それ以外の場合には、CT情報復号部3021は対象CTを分割せず、処理を終了する(CUの復号に移行する)。   (S1490) When the MT division flag split_mt_flag is other than 0, the CT information decoding unit 3021 transitions to S1491. In other cases, the CT information decoding unit 3021 does not divide the target CT and ends the process (shifts to CU decoding).

(S1491)CT情報復号部3021はMT分割を行う。BT分割もしくはTT分割が可能な場合(allowSplitBtHor || allowSplitTtHor ) || ( allowSplitBtVer || allowSplitTtVer ))、MT分割の方向を示すフラグmtt_split_cu_vertical_flagを復号する。復号した分割方法mtt_split_cu_vertical_flagにおいて、BT分割とTT分割の両者が可能な場合(( allowSplitBtVer && allowSplitTtVer && mtt_split_cu_vertical_flag ) || ( allowSplitBtHor
&& allowSplitTtHor && !mtt_split_cu_vertical_flag)には、MT分割が2分木であるか3分木であるかを示すシンタックス要素mtt_split_cu_binary_flagを復号する。CT情報復号部3021は、分割されたCTの左上座標が対象タイル内である場合に、符号化ツリーを処理する。CTの左上座標は2分木では、(x0, y1)もしくは(x1, y0)、3分木では(x0, y1), (x0, y2)もしくは(x1, y0), (x2, y0)である。ここで先頭CTの左上座標(x0, y0)がタイル外にある場合には分割自体が行われないため、(x0, y0)は常にタイル内であると仮定する。
(S1491) The CT information decoding unit 3021 performs MT division. If BT split or TT split is possible (allowSplitBtHor || allowSplitTtHor) || (allowSplitBtVer || allowSplitTtVer), decode the flag mtt_split_cu_vertical_flag that indicates the MT split direction. If both BT and TT splits are possible in the decrypted split method mtt_split_cu_vertical_flag ((allowSplitBtVer && allowSplitTtVer && mtt_split_cu_vertical_flag) || (allowSplitBtHor
&& allowSplitTtHor &&! mtt_split_cu_vertical_flag) decodes a syntax element mtt_split_cu_binary_flag indicating whether the MT split is a binary tree or a ternary tree. The CT information decoding unit 3021 processes the coding tree when the upper left coordinate of the divided CT is within the target tile. The upper left coordinates of CT are (x0, y1) or (x1, y0) for a binary tree and (x0, y1), (x0, y2) or (x1, y0), (x2, y0) for a binary tree. is there. Here, when the upper left coordinate (x0, y0) of the head CT is outside the tile, the division itself is not performed, so it is assumed that (x0, y0) is always within the tile.

CT情報復号部3021は、MT分割タイプsplit_mt_typeが0(2分割)、かつ、MT分割方向s
plit_dir_flagが1(水平分割)の場合は、以下の2つのCTを復号(BT分割情報復号)する。タイル内でのCT(x0,y1)の下座標y1がタイルサイズhTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの下座標y1がタイルサイズhTile[TileId]以上のCTは復号しない。
The CT information decoding unit 3021 sets the MT division type split_mt_type to 0 (two divisions) and the MT division direction s.
When plit_dir_flag is 1 (horizontal division), the following two CTs are decoded (BT division information decoding). Decode a CT in which the lower coordinate y1 of CT (x0, y1) in the tile is less than the tile size hTile [TileId]. On the contrary, CTs in which the lower coordinate y1 of each CT in the tile is the tile size hTile [TileId] or more are not decoded.

multi_type_tree(x0,y0,cbWidth,cbHeight/2,mttDepth,depthOffset,0,treeType)
if (y1 < hTile[TileId])
multi_type_tree(x0,y1,cbWidth,cbHeight/2,mttDepth+1,depthOffset,1,treeType)
一方、MT分割方向split_dir_flagが0(垂直分割)の場合は、以下の2つのCTを復号(BT分割情報復号)する。タイル内でのCT(x1,y0)の右座標x1がタイルサイズwTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの右座標x1がタイルサイズwTile[TileId]以上のCTは復号しない。
multi_type_tree (x0, y0, cbWidth, cbHeight / 2, mttDepth, depthOffset, 0, treeType)
if (y1 <hTile [TileId])
multi_type_tree (x0, y1, cbWidth, cbHeight / 2, mttDepth + 1, depthOffset, 1, treeType)
On the other hand, when the MT division direction split_dir_flag is 0 (vertical division), the following two CTs are decoded (BT division information decoding). Decode CT in which the right coordinate x1 of CT (x1, y0) in the tile is less than the tile size wTile [TileId]. On the contrary, a CT in which the right coordinate x1 of each CT in the tile is the tile size wTile [TileId] or more is not decoded.

multi_type_tree(x0,y0,cbWidth/2,cbHeight,mttDepth+1,depthOffset,0,treeType)
if (x1 < wTile[TileId])
multi_type_tree(x1,y0,cbWidth/2,cbHeightY,mttDepth+1,depthOffset,1,treeType)ここで、(x1,y1)は以下の式で導出される。
multi_type_tree (x0, y0, cbWidth / 2, cbHeight, mttDepth + 1, depthOffset, 0, treeType)
if (x1 <wTile [TileId])
multi_type_tree (x1, y0, cbWidth / 2, cbHeightY, mttDepth + 1, depthOffset, 1, treeType) where (x1, y1) is derived by the following formula.

x1 = x0+(cbWidth/2)
y1 = y0+(cbHeight/2)
さらに、log2CbWidth、または、log2CbHeightを下式のように更新する。
x1 = x0 + (cbWidth / 2)
y1 = y0 + (cbHeight / 2)
Furthermore, log2CbWidth or log2CbHeight is updated as the following formula.

CbWidth = CbWidth/2
CbHeight = CbHeight/2
CT情報復号部3021は、MT分割タイプsplit_mt_typeが1(3分割)を示す場合には、3つのCTを復号(TT分割情報復号)する。
CbWidth = CbWidth / 2
CbHeight = CbHeight / 2
If the MT division type split_mt_type indicates 1 (3 divisions), the CT information decoding unit 3021 decodes 3 CTs (TT division information decoding).

MT分割方向split_dir_flagが1(水平分割)の場合は、以下の3つのCTを復号する。タイル内でのi=0, 1の各CT(x0, yi)の下座標yiがタイルサイズhTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの下座標yiがタイルサイズhTile[TileId]以上のCTは復号しない。   When the MT division direction split_dir_flag is 1 (horizontal division), the following three CTs are decoded. Decode a CT in which the lower coordinate yi of each CT (x0, yi) of i = 0, 1 in the tile is less than the tile size hTile [TileId]. On the contrary, the CT whose lower coordinate yi of each CT in the tile is equal to or larger than the tile size hTile [TileId] is not decoded.

multi_type_tree(x0,y0,cbWidth,cbHeight/4,mttDepth+1,depthOffset,0,treeType)
if (y1 < hTile[TileId])
multi_type_tree(x0,y1,cbWidth,cbHeight/2,mttDepth+1,depthOffset,1,treeType)
if (y2 < hTile[TileId])
multi_type_tree(x0,y2,cbWidth,cbHeight/4,mttDepth+1,depthOffset,2,treeType)
一方、MT分割方向split_dir_flagが1(垂直分割)の場合は、以下の3つのCTを復号(TT分割情報復号)する。タイル内でのi=0, 1の各CT(xi, y0)の右座標xiがタイルサイズwTile[TileId]未満のCTを復号する。逆に、タイル内での各CTの右座標xiがタイルサイズwTile[TileId]以上のCTは復号しない。
multi_type_tree (x0, y0, cbWidth, cbHeight / 4, mttDepth + 1, depthOffset, 0, treeType)
if (y1 <hTile [TileId])
multi_type_tree (x0, y1, cbWidth, cbHeight / 2, mttDepth + 1, depthOffset, 1, treeType)
if (y2 <hTile [TileId])
multi_type_tree (x0, y2, cbWidth, cbHeight / 4, mttDepth + 1, depthOffset, 2, treeType)
On the other hand, when the MT division direction split_dir_flag is 1 (vertical division), the following three CTs are decoded (TT division information decoding). A CT in which the right coordinate xi of each CT (xi, y0) at i = 0, 1 within a tile is less than the tile size wTile [TileId] is decoded. On the contrary, the CT whose right coordinate xi of each CT in the tile is the tile size wTile [TileId] or more is not decoded.

multi_type_tree(x0,y0,cbWidth/4,cbHeight,mttDepth+1,depthOffset,0,treeType)
if (x1 < wTile[TileId])
multi_type_tree(x1,y0,cbWidth/2,cbHeight,mttDepth+1,depthOffset,1,treeType)
if (x2 < wTile[TileId])
multi_type_tree(x2,y0,cbWidth/4,cbHeight,mttDepth+1,depthOffset,2,treeType)
ここで、(x1,y1)、(x2,y2)は、以下の式のように、導出される。
multi_type_tree (x0, y0, cbWidth / 4, cbHeight, mttDepth + 1, depthOffset, 0, treeType)
if (x1 <wTile [TileId])
multi_type_tree (x1, y0, cbWidth / 2, cbHeight, mttDepth + 1, depthOffset, 1, treeType)
if (x2 <wTile [TileId])
multi_type_tree (x2, y0, cbWidth / 4, cbHeight, mttDepth + 1, depthOffset, 2, treeType)
Here, (x1, y1) and (x2, y2) are derived as in the following equations.

x1 = x0+(cbHeight/4)
y1 = y0+(3*cbHeight/4)
x2 = x0+(cbWidth/4)
y2 = y0+(3*cbWidth/4)
CT情報復号部3021は、下位のCTにおいても、更新された左上座標、CTの幅及び高さ、MT深度を用いて、S1471から開始されるBT分割情報復号、あるいは、TT分割情報復号を継続する。
x1 = x0 + (cbHeight / 4)
y1 = y0 + (3 * cbHeight / 4)
x2 = x0 + (cbWidth / 4)
y2 = y0 + (3 * cbWidth / 4)
The CT information decoding unit 3021 continues the BT partition information decoding starting from S1471 or the TT partition information decoding using the updated upper left coordinate, the width and height of the CT, and the MT depth even in the lower CT. To do.

また、CT情報復号部3021は、MT分割フラグsplit_mt_flagが0の場合、すなわちQT分割もMT分割も行われない場合には、CU復号部3022でCU(coding_unit(x0,y0,cbWidth,cbHeight,treeType))を復号する。   Further, when the MT division flag split_mt_flag is 0, that is, when neither QT division nor MT division is performed, the CT information decoding unit 3021 uses the CU (coding_unit (x0, y0, cbWidth, cbHeight, treeType )) Is decrypted.

以上のように、タイル内で表現される各CUの左上座標(xi, yi)をタイルサイズ(wTile, yTile)と比較することで、分割フラグを復号し、各CTを復号する。これによって、タイルサイズがCTUサイズの整数倍ではない場合においても、無駄な分割フラグ、無駄なCTを復号することなく、効率的にCU分割を行うことが可能であるという効果を奏する。また、タイル内座標系を用いて、CU分割を行うことにより、画面内座標系からタイル内座標系への変換を行うことなく、簡単な処理でCU分割を行うことが可能であるというさらなる効果を奏する。   As described above, the division flag is decoded and each CT is decoded by comparing the upper left coordinates (xi, yi) of each CU represented in the tile with the tile size (wTile, yTile). As a result, even when the tile size is not an integral multiple of the CTU size, there is an effect that it is possible to efficiently perform CU division without decoding useless division flags and useless CT. Further, by performing the CU division using the in-tile coordinate system, it is possible to perform the CU division by a simple process without performing the conversion from the in-screen coordinate system to the in-tile coordinate system. Play.

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

エントロピー復号部301は、インター予測パラメータ(予測モードpredMode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX)をインター予測パラメータ復号部303に出力する。また、イントラ予測パラメータ(輝度予測モードIntraPredModeY、色差予測モードIntraPredModeC)をイントラ予測パラメータ復号部304に出力する。エントロピー復号部301は、量子化変換係数を逆量子化・逆変換部311に出力する。   The entropy decoding unit 301 outputs inter prediction parameters (prediction mode predMode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX) to the inter prediction parameter decoding unit 303. To do. Also, the intra prediction parameters (luminance prediction mode IntraPredModeY, color difference prediction mode IntraPredModeC) are output to the intra prediction parameter decoding unit 304. The entropy decoding unit 301 outputs the quantized transform coefficient to the inverse quantization / inverse transform unit 311.

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

マージ候補導出部30361は、復号済の隣接ブロックの動きベクトルと参照ピクチャインデックスrefIdxLXをそのまま用いてマージ候補を導出する。それ以外に、マージ候補導出部30361は、後述する空間マージ候補導出処理、時間マージ候補導出処理、結合マージ候補導出処理、およびゼロマージ候補導出処理、時空間マージ候補導出処理を適用してもよい。   The merge candidate derivation unit 30361 derives a merge candidate by using the motion vector of the decoded adjacent block and the reference picture index refIdxLX as they are. In addition, the merge candidate derivation unit 30361 may apply a spatial merge candidate derivation process, a temporal merge candidate derivation process, a combined merge candidate derivation process, a zero merge candidate derivation process, and a spatiotemporal merge candidate derivation process, which will be described later.

(空間マージ候補導出処理)
空間マージ候補導出処理として、マージ候補導出部30361は、所定の規則に従って、予測パラメータメモリ307が記憶している予測パラメータ(予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLX)を読み出し、マージ候補に設定する。参照ピクチャの指定方法は、例えば、対象ブロックから予め定めた範囲内にあ
る隣接ブロック(例えば、対象ブロックの左端L、左下端BL、左上端AL、上端A、右上端ARにそれぞれ接するブロックの全部または一部)のそれぞれに係る予測パラメータである。各々のマージ候補をL, BL, AL, A, ARと呼ぶ。
(Spatial merge candidate derivation process)
As the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads the prediction parameters (prediction list use flag predFlagLX, motion vector mvLX, reference picture index refIdxLX) stored in the prediction parameter memory 307 according to a predetermined rule, and merges them. Set as a candidate. The reference picture is specified by, for example, adjacent blocks within a predetermined range from the target block (for example, the left edge L, the left lower edge BL, the upper left edge AL, the upper edge A, and all the blocks that respectively contact the upper right edge AR of the target block). (Or some). Each merge candidate is called L, BL, AL, A, AR.

(時間マージ候補導出処理)
時間マージ導出処理として、マージ候補導出部30361は、対象ブロックの右下CBR、あるいは、中央の座標を含む参照画像中のブロックCの予測パラメータを、予測パラメータメモリ307から読み出してマージ候補とし、マージ候補リストmergeCandList[]に格納する。
(Time merge candidate derivation process)
As the temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameter 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 as a merge candidate, and merges it. Store in candidate list mergeCandList [].

図T1は、参照画像中のブロックC、CBRを示す図である。ブロックCBRを優先してマージ候補リストmergeCandList[]に加え、ブロックCBRが動きベクトルを持たない(例えばイントラ予測ブロック)場合や、ブロックCBRがピクチャ外に位置する場合は、ブロックCの動きベクトルを予測ベクトル候補に加える。動きの異なる可能性が高いコロケートブロックの動きベクトルを予測候補として加えることで、予測ベクトルの選択肢が増え、符号化効率が高まる。参照画像の指定方法は、例えば、スライスヘッダにおいて指定された参照ピクチャインデックスrefIdxLXでも良いし、隣接ブロックの参照ピクチャインデックスrefIdxLXのうち最小のものを用いて指定しても良い。   FIG. T1 is a diagram showing blocks C and CBR in the reference image. In addition to the merge candidate list mergeCandList [] giving priority to the block CBR, if the block CBR does not have a motion vector (for example, an intra prediction block) or if the block CBR is located outside the picture, the motion vector of the block C is predicted. Add to vector candidates. By adding the motion vector of the colocated block, which is likely to have different motion, as a prediction candidate, the choice of the prediction vector is increased and the coding efficiency is improved. The method of specifying the reference image may be, for example, the reference picture index refIdxLX specified in the slice header or the smallest reference picture index refIdxLX of adjacent blocks.

例えばマージ候補導出部30361は、ブロックCの位置(xColCtr,yColCtr)とブロックCBRの位置(xColCBr、yColCBr)を、以下の式で導出してもよい。   For example, the merge candidate derivation unit 30361 may derive the position of the block C (xColCtr, yColCtr) and the position of the block CBR (xColCBr, yColCBr) by the following formula.

xColCtr = xPb+(bW>>1)
yColCtr = yPb+(bH>>1)
xColCBr = xPb+bW
yColCBr = yPb+bH
ここで、(xPb,yPb)は対象ブロックの左上座標、(bW,bH)は対象ブロックの幅と高さである。ブロックCBRが利用可能であればブロックCBRの動きベクトルを利用してマージ候補COLを導出する。ブロックCBRが利用可能でなければブロックCを使用してCOLを導出する。
xColCtr = xPb + (bW >> 1)
yColCtr = yPb + (bH >> 1)
xColCBr = xPb + bW
yColCBr = yPb + bH
Here, (xPb, yPb) is the upper left coordinate of the target block, and (bW, bH) is the width and height of the target block. If the block CBR is available, the merge candidate COL is derived using the motion vector of the block CBR. If block CBR is not available, block C is used to derive COL.

(タイル境界を時間マージ候補導出処理の構成)
マージ候補導出部30361は、参照メモリ中の動きベクトルをCTBライン単位で管理し、対象CTUに必要な範囲のみを内部メモリにフェッチすることが好適である。このときマージ候補導出部30361は、フェッチした領域以外をアクセスしないように、ブロックCBRの位置(xColCBr、yColCBr)が対象CTUラインを超える場合にはCBRを利用せず、以下の処理によりブロックCを利用する。
(Structure of derivation process of tile boundary for time merge)
It is preferable that the merge candidate derivation unit 30361 manages the motion vector in the reference memory in units of CTB lines and fetches only the range necessary for the target CTU into the internal memory. At this time, the merge candidate derivation unit 30361 does not use CBR when the position (xColCBr, yColCBr) of the block CBR exceeds the target CTU line so that the area other than the fetched area is not accessed, and the block C is processed by the following process. To use.

以下、タイル内座標を用いて対象ブロックの左上座標を処理する場合の処理例を示す。以下の処理では、(yCb>>CtbLog2SizeY)==(yColBr>>CtbLog2SizeY)により、同じCTUラインと判定される場合には参照位置(xRef, yRef)に(xColBr, yColBr)を用い、それ以外では(xColCtr, yColCtr)を用いる。さらに、下記の例のように3bit右シフトの後で3bit左シフトすることで8*8単位にアクセスを制限してもよい。なお、参照ピクチャメモリ上の動きベクトルを参照する場合に、タイル左上座標を参照位置に加算し画面内座標の参照位置を導出するが、この動作は、参照位置の量子化(シフト)の前でも後でもよい。   Hereinafter, a processing example of processing the upper left coordinates of the target block using the in-tile coordinates will be described. In the following process, by (yCb >> CtbLog2SizeY) == (yColBr >> CtbLog2SizeY), if it is determined to be the same CTU line, the reference position (xRef, yRef) uses (xColBr, yColBr), otherwise (xColCtr, yColCtr) is used. Furthermore, access may be restricted to 8 * 8 units by shifting left by 3 bits after shifting right by 3 bits as in the example below. When referring to the motion vector on the reference picture memory, the upper left coordinate of the tile is added to the reference position to derive the reference position of the in-screen coordinate. This operation is performed even before the quantization (shift) of the reference position. You can come later.

xColBr = xCbInTile + cbWidth
yColBr = yCbInTile + cbHeight
xColCtr = xCbInTile + (cbWidth>>1)
yColCtr = yCbInTile + (cbHeight>>1)
if (((yCb>>CtbLog2SizeY)==(yColBr>>CtbLog2SizeY)) && (yColBr<hPict) && (xColBr<wPict)) {
// (xColBr, yColBr)を用いて参照ピクチャの動きベクトルを参照する。例えば、下記(xRef, yRef)を参照。
xColBr = xCbInTile + cbWidth
yColBr = yCbInTile + cbHeight
xColCtr = xCbInTile + (cbWidth >> 1)
yColCtr = yCbInTile + (cbHeight >> 1)
if (((yCb >> CtbLog2SizeY) == (yColBr >> CtbLog2SizeY)) && (yColBr <hPict) && (xColBr <wPict)) {
// Use (xColBr, yColBr) to refer to the motion vector of the reference picture. For example, see (xRef, yRef) below.

xRef = ((xColBr>>3)<<3)+xTile[TileId]
yRef = ((yColBr>>3)<<3)+yTile[TileId]
}
else {
// (xColCtr, yColCtr)を用いて参照ピクチャの動きベクトルを参照する。例えば、
xRef = ((xColCtr>>3)<<3)+xTile[TileId]
yRef = ((yColCtr>>3)<<3)+yTile[TileId]
}
図40は、参照ピクチャのタイル分割と対象ピクチャのタイル分割が等しい場合である。この場合には、対象ピクチャ内のCTU座標と、参照ピクチャ内のCTU座標によって、画面内のCTU座標を導出することができる。また、タイル内のCTUラインごとにMVメモリを管理する場合において、画面内にあってもタイル内にないCTUラインのMVメモリは参照することが難しい。したがって、本実施形態では参照範囲をタイル内に限定する。図39(a)に示す。
xRef = ((xColBr >> 3) << 3) + xTile [TileId]
yRef = ((yColBr >> 3) << 3) + yTile [TileId]
}
else {
// Use (xColCtr, yColCtr) to refer to the motion vector of the reference picture. For example,
xRef = ((xColCtr >> 3) << 3) + xTile [TileId]
yRef = ((yColCtr >> 3) << 3) + yTile [TileId]
}
FIG. 40 shows the case where the tile division of the reference picture is equal to the tile division of the target picture. In this case, the CTU coordinate in the screen can be derived from the CTU coordinate in the target picture and the CTU coordinate in the reference picture. Further, when managing the MV memory for each CTU line in the tile, it is difficult to refer to the MV memory of the CTU line that is not in the tile even if it is in the screen. Therefore, in this embodiment, the reference range is limited to within the tile. It is shown in FIG. 39 (a).

xColBr = xCbInTile+cbWidth
yColBr = yCbInTile+cbHeight
xColCtr = xCbInTile+(cbWidth>>1)
yColCtr = yCbInTile+(cbHeight>>1)
if (((yCb>>CtbLog2SizeY)==(yColBr>>CtbLog2SizeY)) && (yColBr<hTile[TileId]) &&
(xColBr<wTile[TileId])) {
// (xColBr, yColBr)を用いて参照ピクチャの動きベクトルを参照する。例えば、下記(xRef, yRef)を参照。
xColBr = xCbInTile + cbWidth
yColBr = yCbInTile + cbHeight
xColCtr = xCbInTile + (cbWidth >> 1)
yColCtr = yCbInTile + (cbHeight >> 1)
if (((yCb >> CtbLog2SizeY) == (yColBr >> CtbLog2SizeY)) && (yColBr <hTile [TileId]) &&
(xColBr <wTile [TileId])) {
// Use (xColBr, yColBr) to refer to the motion vector of the reference picture. For example, see (xRef, yRef) below.

xRef = ((xColBr>>3)<<3)+xTile[TileId]
yRef = ((yColBr>>3)<<3)+yTile[TileId]
}
else {
// (xColCtr, yColCtr)を用いて参照ピクチャの動きベクトルを参照する。例えば、
xRef = ((xColCtr>>3)<<3)+xTile[TileId]
yRef = ((yColCtr>>3)<<3)+yTile[TileId]
}
また、上記の処理は独立タイル(independent_tiles_flag=1)の場合に行っても良い。
xRef = ((xColBr >> 3) << 3) + xTile [TileId]
yRef = ((yColBr >> 3) << 3) + yTile [TileId]
}
else {
// Use (xColCtr, yColCtr) to refer to the motion vector of the reference picture. For example,
xRef = ((xColCtr >> 3) << 3) + xTile [TileId]
yRef = ((yColCtr >> 3) << 3) + yTile [TileId]
}
Further, the above processing may be performed in the case of independent tiles (independent_tiles_flag = 1).

タイル境界を超える範囲を参照しないように、座標系として、予測ブロックの座標にタイル左上を原点とするタイル内座標(xCbInTile、yCbInTile)を用い、各参照位置がタイルサイズ(wTile, yTile)を超える場合には参照しないことが適当である。さらに、参照ピクチャメモリ上の動きベクトルを参照する場合に、タイル左上座標を参照位置に加算し画面内座標の参照位置を導出する。図31〜図34に示すように、タイル内座標でCT分割を行うことにより、予測ブロックの左上座標をタイル内座標で導出し、時間予測で参照する位置を判定することにより、CTU境界にかかるかどうかを簡単に判定することができる効果を奏する。   As the coordinate system, use the in-tile coordinates (xCbInTile, yCbInTile) with the upper left corner of the tile as the origin, so that each reference position exceeds the tile size (wTile, yTile) as the coordinate system so as not to refer to the range beyond the tile boundary. In some cases it is appropriate not to refer. Further, when referring to the motion vector in the reference picture memory, the upper left coordinate of the tile is added to the reference position to derive the reference position of the in-screen coordinate. As shown in FIG. 31 to FIG. 34, by performing the CT division on the in-tile coordinates, the upper left coordinates of the prediction block are derived by the in-tile coordinates, and the position to be referred to in the temporal prediction is determined. This has the effect of easily determining whether or not it is.

画面内座標を用いて対象ブロックの左上座標を処理する場合の処理例を示す。タイル内座標系を用いて処理する場合と異なり、タイル左上座標を減算してタイル内座標に変換した後(yColBr-yTile, xColBr-xTile)で、タイルサイズ(wTile, hTile)との比較を行い、タイルサイズを超えているか否かを判定する。また、タイル境界の判定においても、タイル
内座標の対象ブロックの位置(yCb-yTile[TileId])と参照ブロックの位置(yColBr-yTile[TileId])をCTUサイズの対数CtbLog2SizeYで右シフトすることで判定を行う。
An example of processing when processing the upper left coordinates of the target block using the in-screen coordinates is shown. Unlike the case of processing using the in-tile coordinate system, after subtracting the tile upper left coordinate and converting it to in-tile coordinates (yColBr-yTile, xColBr-xTile), compare with the tile size (wTile, hTile). , It is determined whether the tile size is exceeded. Also in the tile boundary determination, by shifting the target block position (yCb-yTile [TileId]) and the reference block position (yColBr-yTile [TileId]) in the tile coordinates to the right by the logarithm CtbLog2SizeY of the CTU size. Make a decision.

xColBr = xCbInPic+cbWidth
yColBr = yCbInPic+cbHeight
xColCtr = xCbInPic+(cbWidth>>1)
yColCtr = yCbInPic+(cbHeight>>1)
if ((((yCb-yTile[TileId])>>CtbLog2SizeY)==((yColBr-yTile[TileId])>>CtbLog2SizeY)) && (yColBr<hPict) && (xColBr<wPict)) {
xRef = ((xColBr>>3)<<3)
yRef = ((yColBr>>3)<<3)
}
else {
xRef = ((xColCtr>>3)<<3)
yRef = ((yColCtr>>3)<<3)
}
図40は、参照ピクチャのタイル分割と対象ピクチャのタイル分割が等しい場合である。この場合、本実施形態では参照範囲をタイル内に限定する。図39(b)に処理の一例を示す。
xColBr = xCbInPic + cbWidth
yColBr = yCbInPic + cbHeight
xColCtr = xCbInPic + (cbWidth >> 1)
yColCtr = yCbInPic + (cbHeight >> 1)
if ((((yCb-yTile [TileId]) >> CtbLog2SizeY) == ((yColBr-yTile [TileId]) >> CtbLog2SizeY)) && (yColBr <hPict) && (xColBr <wPict)) (
xRef = ((xColBr >> 3) << 3)
yRef = ((yColBr >> 3) << 3)
}
else {
xRef = ((xColCtr >> 3) << 3)
yRef = ((yColCtr >> 3) << 3)
}
FIG. 40 shows the case where the tile division of the reference picture is equal to the tile division of the target picture. In this case, in the present embodiment, the reference range is limited to within the tile. FIG. 39 (b) shows an example of processing.

xColBr = xCbInPic+cbWidth
yColBr = yCbInPic+cbHeight
xColCtr = xCbInPic+(cbWidth>>1)
yColCtr = yCbInPic+(cbHeight>>1)
if ((((yCb-yTile[TileId])>>CtbLog2SizeY)==((yColBr-yTile[TileId])>>CtbLog2SizeY)) && ((yColBr-yTile[TileId])<hTile[TileId]) && ((xColBr-xTile[TileId])<wTile[TileId])) {
xRef = ((xColBr>>3)<<3)
yRef = ((yColBr>>3)<<3)
}
else {
xRef = ((xColCtr>>3)<<3)
yRef = ((yColCtr>>3)<<3)
}
上記の処理は、独立タイルの場合に行っても良い。
xColBr = xCbInPic + cbWidth
yColBr = yCbInPic + cbHeight
xColCtr = xCbInPic + (cbWidth >> 1)
yColCtr = yCbInPic + (cbHeight >> 1)
if ((((yCb-yTile [TileId]) >> CtbLog2SizeY) == ((yColBr-yTile [TileId]) >> CtbLog2SizeY)) && ((yColBr-yTile [TileId]) <hTile [TileId]) && ( (xColBr-xTile [TileId]) <wTile [TileId])) {
xRef = ((xColBr >> 3) << 3)
yRef = ((yColBr >> 3) << 3)
}
else {
xRef = ((xColCtr >> 3) << 3)
yRef = ((yColCtr >> 3) << 3)
}
The above process may be performed for independent tiles.

予測ブロックの座標を画面内座標からタイル内座標に変換することにより、タイル範囲にあるかどうか、及び、CTU境界にかかるかどうかを簡単に判定することができる効果を奏する。   By converting the coordinates of the prediction block from the in-screen coordinates to the in-tile coordinates, it is possible to easily determine whether or not the prediction block is within the tile range and whether or not it falls on the CTU boundary.

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

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

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

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

逆量子化・逆変換部311は、エントロピー復号部301から入力された量子化変換係数を逆量子化して変換係数を求める。この量子化変換係数は、符号化処理において、予測誤差に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)、KLT(Karyhnen Loeve Transform、カルーネンレーベ変換)等の周波数変換を行い量子化して得られる係数である。逆量子化・逆変換部311は、求めた変換係数について逆DCT、逆DST、逆KLT等の逆周波数変換を行い、予測誤差を算出する。逆量子化・逆変換部311は予測誤差を加算部312に出力する。   The inverse quantization / inverse transform unit 311 dequantizes the quantized transform coefficient input from the entropy decoding unit 301 to obtain a transform coefficient. These quantized transform coefficients are DCT (Discrete Cosine Transform, Discrete Cosine Transform), DST (Discrete Sine Transform, Discrete Sine Transform), KLT (Karyhnen Loeve Transform, Karhunen-Loeve Transform) for prediction error in encoding processing. Is a coefficient obtained by performing frequency conversion and quantizing. The inverse quantization / inverse transform unit 311 performs inverse frequency transform such as inverse DCT, inverse DST, and inverse KLT on the obtained transform coefficient to calculate a prediction error. The inverse quantization / inverse transformation unit 311 outputs the prediction error to the addition unit 312.

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

図14は、本実施形態のループフィルタ305(SAO部3052、ALF部3053)で用いられるヘッダ復号部3020の動作を示すフローチャートである。図14(a)に示すように、本実施形態のループフィルタ部は以下の動作を行う。   FIG. 14 is a flowchart showing the operation of the header decoding unit 3020 used in the loop filter 305 (SAO unit 3052, ALF unit 3053) of this embodiment. As shown in FIG. 14 (a), the loop filter unit of this embodiment performs the following operation.

S30500:ヘッダ復号部3020は、ループフィルタの対象となるブロック(対象CTU)の有効領域が所定のサイズより小さいか否かを判定する。有効領域が所定のサイズ以上の場合に、S30501に進む。対象CTUの有効領域が所定のサイズ未満の場合には、以降のの処理を省略しブロック単位のブロックループフィルタ情報を復号せず、終了する。   S30500: The header decoding unit 3020 determines whether or not the effective area of the block (target CTU) targeted by the loop filter is smaller than a predetermined size. When the effective area is equal to or larger than the predetermined size, the process proceeds to S30501. When the effective area of the target CTU is less than the predetermined size, the subsequent processing is omitted, the block loop filter information in block units is not decoded, and the processing ends.

S30501:ヘッダ復号部3020は、ブロック単位で処理を行うループフィルタの情報(ブロックループフィルタ情報)を復号する。なお、ループフィルタの情報はオンオフ情報を含んでいても良い。   S30501: The header decoding unit 3020 decodes information (block loop filter information) on a loop filter that performs processing in block units. The loop filter information may include on / off information.

S30502:ループフィルタ305は、ヘッダ復号部3020で復号されたオンオフフラグがオンか否かを判定する。オンの場合S30503に進み、オフの場合処理を終了する。   S30502: The loop filter 305 determines whether or not the on / off flag decoded by the header decoding unit 3020 is on. If it is on, the process proceeds to S30503, and if it is off, the process ends.

S30503:ループフィルタ305は、オンオフフラグがオンの場合に対象ブロックにブロックループフィルタ情報を用いたフィルタ処理を行う。   S30503: The loop filter 305 performs filter processing using the block loop filter information on the target block when the on / off flag is on.

後述するSAO部3052は、図14(b)に示すように、対象ブロックの有効領域が小さい場合に、エッジオフセットの使用を制限しても良い。   The SAO unit 3052 described below may limit the use of the edge offset when the effective area of the target block is small as shown in FIG. 14 (b).

S30520:ヘッダ復号部3020は、ループフィルタの対象となるブロック(対象CTU)の有効領域が所定のサイズより小さいか否かを判定する。有効領域が所定のサイズ以上の場合に、S30501に進む。対象CTUの有効領域が所定のサイズ未満の場合には、以降の処理を省略し、終了する。   S30520: The header decoding unit 3020 determines whether or not the effective area of the block (target CTU) targeted by the loop filter is smaller than a predetermined size. When the effective area is equal to or larger than the predetermined size, the process proceeds to S30501. When the effective area of the target CTU is less than the predetermined size, the subsequent processing is omitted and the processing ends.

S30521:ヘッダ復号部3020は、SAOタイプがエッジオフセットの場合に、SAOエッジオフセット情報を復号する。   S30521: The header decoding unit 3020 decodes the SAO edge offset information when the SAO type is edge offset.

S30522:ループフィルタ305は、ヘッダ復号部3020で復号されたオンオフフラグがオンか否かを判定する。オンの場合S30523に進み、オフの場合処理を終了する。   S30522: The loop filter 305 determines whether or not the on / off flag decoded by the header decoding unit 3020 is on. If it is on, the process proceeds to S30523, and if it is off, the process ends.

S30523:ループフィルタ305は、オンオフフラグがオンの場合に対象ブロックにブロックループフィルタ情報を用いたフィルタ処理を行う。   S30523: The loop filter 305 performs filter processing using the block loop filter information on the target block when the on / off flag is on.

上記により、フィルタ対象画素の周辺画素を用いるエッジオフセットの場合のみループフィルタの処理を省略することができる。周辺画素を用いないバンドオフセットの場合には、ループフィルタの処理を省略しないでもよい。   As described above, the processing of the loop filter can be omitted only in the case of the edge offset using the peripheral pixels of the filter target pixel. In the case of band offset that does not use peripheral pixels, the loop filter process may not be omitted.

(SAO部3052)
ループフィルタ部305はSAO部(SAO部3052)を備えてもよい。SAOはCTU毎に通知されるSAOパラメータを用いた処理であり、リンギング歪や量子化歪を除去する効果がある。SAO部3052は、入力画像にSAO処理を施すことによって、SAO済復号画像P_SAOを生成する。
(SAO part 3052)
The loop filter unit 305 may include a SAO unit (SAO unit 3052). SAO is a process using SAO parameters notified for each CTU, and has an effect of removing ringing distortion and quantization distortion. The SAO unit 3052 generates the SAO-decoded image P_SAO by performing the SAO process on the input image.

SAO部3052は、対象CTUの有効領域が所定のサイズ以上の場合に、CTU単位で処理を行うループフィルタの情報(SAOユニット)を復号する。対象CTUの有効領域が所定のサイズ未満の場合には、CTU単位のループフィルタ情報(SAOユニット)を復号せず、CTU単位のループフィルタ処理(ここではSAO処理)を行わない。   The SAO unit 3052 decodes information (SAO unit) of the loop filter that performs processing in CTU units when the effective area of the target CTU is equal to or larger than a predetermined size. When the effective area of the target CTU is less than the predetermined size, the loop filter information (SAO unit) in CTU units is not decoded, and the loop filter processing (SAO processing in this case) in CTU units is not performed.

例えば、SAO部3052は、タイルを利用しない場合には画面サイズから対象CTUの有効領域(wActBlk, hActBlk)を導出してもよい。   For example, the SAO unit 3052 may derive the effective area (wActBlk, hActBlk) of the target CTU from the screen size when tiles are not used.

wActBlk = Min(ctuWidth,wPict-xCtb)
hActBlk = Min(ctuHeight,hPict-yCtb)
SAO部3052は、タイルを利用する場合には、タイルのサイズと画面内座標系のタイルの左上座標と、画面内座標系の対象CTUの左上座標から、対象CTUの有効領域(wActBlk, hActBlk)を導出してもよい。また、タイルを利用しない場合にも、画面が1つのタイルとみなして同じ処理を行ってもよい。
wActBlk = Min (ctuWidth, wPict-xCtb)
hActBlk = Min (ctuHeight, hPict-yCtb)
When the tile is used, the SAO unit 3052 determines the effective area (wActBlk, hActBlk) of the target CTU from the tile size, the upper left coordinate of the tile in the in-screen coordinate system, and the upper left coordinate of the target CTU in the in-screen coordinate system. May be derived. Further, even when tiles are not used, the same processing may be performed assuming that the screen is one tile.

wActBlk = Min(ctuWidth,xTile[TileId]+wTile[TileId]-xCtb)
hActBlk = Min(ctuHeight,yTile[TileId]+hTile[TileId]-yCtb)
SAO部3052は、図8に示すように、対象領域の有効領域(wActBlk, hActBlk)が所定のサイズ以上(MinSaoSize)である場合に、SAOユニットを復号する。
wActBlk = Min (ctuWidth, xTile [TileId] + wTile [TileId] -xCtb)
hActBlk = Min (ctuHeight, yTile [TileId] + hTile [TileId] -yCtb)
As shown in FIG. 8, the SAO unit 3052 decodes the SAO unit when the effective area (wActBlk, hActBlk) of the target area is equal to or larger than a predetermined size (MinSaoSize).

wActBlk >= MinSaoSize && hActBlk>=MinSaoSize
なお、有効領域の判定式はwActBlk+hActBlk>=MinSaoSizeや、log2(wActBlk)+log2(hActBlk)>=MinSaoSize、wActBlk*hActBlk>=MinSaoSizeなどでもよい。
wActBlk> = MinSaoSize &&hActBlk> = MinSaoSize
The valid area determination formula may be wActBlk + hActBlk> = MinSaoSize, log2 (wActBlk) + log2 (hActBlk)> = MinSaoSize, wActBlk * hActBlk> = MinSaoSize.

なお、MinSaoSizeの閾値は、量子化パラメータQPが大きくなるにつれてより大きい値を設定しても良い。また、以下のように閾値に上限と下限を設けてもよい。   The threshold value of MinSaoSize may be set to a larger value as the quantization parameter QP increases. Further, the threshold may have an upper limit and a lower limit as follows.

MinSaoSize = Clip3(16,CtuSize/2,(QP+32)/2)
なお図34に示すように、CTU座標(xCtb, yCtb)がタイル左上を原点とした座標、つまりタイル内座標(xCtb, yCtb)とタイルサイズ(wTile, hTile)を用いて以下の式で有効領域を判定してもよい。
MinSaoSize = Clip3 (16, CtuSize / 2, (QP + 32) / 2)
As shown in Fig. 34, the CTU coordinates (xCtb, yCtb) are coordinates with the tile upper left as the origin, that is, the tile area coordinates (xCtb, yCtb) and tile size (wTile, hTile) are used to calculate the effective area using the following formula. May be determined.

wActBlk = Min(ctuWidth,wTile[TileId]-xCtb)
hActBlk = Min(ctuHeight,hTile[TileId]-yCtb)
この場合、SAO部3052(ヘッダ復号部3020)は、対象CTUの有効領域の幅もしくは高さが所定の最小サイズ以上の場合に、CTU単位でフィルタ処理を行うか否かを示すCTUフィルタフラグであるsao_type_idxを復号し、最小サイズ未満の場合には、上記CTUフィルタフラグの復号を省略し、フィルタを行わないことを示す値(0)に設定する。
wActBlk = Min (ctuWidth, wTile [TileId] -xCtb)
hActBlk = Min (ctuHeight, hTile [TileId] -yCtb)
In this case, the SAO unit 3052 (header decoding unit 3020) uses a CTU filter flag that indicates whether or not to perform filter processing in CTU units when the width or height of the effective area of the target CTU is equal to or larger than a predetermined minimum size. When a certain sao_type_idx is decoded and the size is less than the minimum size, the decoding of the CTU filter flag is omitted and a value (0) indicating that filtering is not performed is set.

(SAOユニット)
図17は、本実施形態に係る符号化ストリームのSAOユニット(図17においてsao_unit()と表記)のシンタックスを示す図である。SAOユニットはCTU毎に通知され、SAOオフセット情報sao_offset()、および、SAOオフセット情報のマージ制御情報(sao_merge_left_flag, sao_merge_up_flag)をシンタックス要素として含む。sao_merge_left_flagは、対象CTUのSAOオフセット情報を、対象CTUの左隣接CTUから複製するか否かを示すフラグである。sao_merge_up_flagは、対象CTUのSAOオフセット情報を、対象CTUの上隣接CTUから複製するか否かを示すフラグである。
(SAO unit)
FIG. 17 is a diagram showing the syntax of the SAO unit (denoted as sao_unit () in FIG. 17) of the coded stream according to the present embodiment. The SAO unit is notified for each CTU, and includes SAO offset information sao_offset () and merge control information (sao_merge_left_flag, sao_merge_up_flag) of the SAO offset information as syntax elements. sao_merge_left_flag is a flag indicating whether or not the SAO offset information of the target CTU is copied from the left adjacent CTU of the target CTU. The sao_merge_up_flag is a flag indicating whether or not to copy the SAO offset information of the target CTU from the upper adjacent CTU of the target CTU.

(sao_type_idx)
sao_type_idxは、SAOのオンオフ及びSAOの種別を示すオフセットタイプを表す識別子である。オフセットタイプには、大きく分けてエッジオフセット(EO)とバンドオフセット(BO)の2種類がある。EOは、対象画素の画素値とその周辺画素の画素値との差分に応じて、対象画素の画素値に複数のオフセットの何れかを加算する処理である。また、BOは、対象画素値に応じて、対象画素の画素値に複数のオフセットの何れかを加算する処理である。
・sao_type_idx=0は、対象CTUにおけるSAO前復号画像に対して、SAOを行わないことを示す。
・sao_type_idx=2は、対象CTUにおけるSAO前復号画像に対して、EOを行うことを示す。EOでは、参照画素位置を示すsao_eo_classが符号化される。
・sao_type_idx=1は、対象CTUにおけるSAO前復号画像に対して、BOを行うことを示す。BOでは、処理を行う画素値帯の左端位置を指定するsao_band_positionが符号化される。
(Sao_type_idx)
sao_type_idx is an identifier that represents an offset type that indicates whether SAO is on or off and the type of SAO. There are roughly two types of offset types: edge offset (EO) and band offset (BO). The EO is a process of adding any one of a plurality of offsets to the pixel value of the target pixel according to the difference between the pixel value of the target pixel and the pixel values of the peripheral pixels. BO is a process of adding any one of a plurality of offsets to the pixel value of the target pixel according to the target pixel value.
-Sao_type_idx = 0 indicates that SAO is not performed on the SAO pre-decoded image in the target CTU.
-Sao_type_idx = 2 indicates that EO is performed on the SAO pre-decoded image in the target CTU. In EO, sao_eo_class indicating the reference pixel position is encoded.
-Sao_type_idx = 1 indicates that BO is performed on the SAO pre-decoded image in the target CTU. In the BO, sao_band_position that specifies the left end position of the pixel value band to be processed is encoded.

(SaoOffsetVal)
本実施形態におけるSAOの処理では、オフセットの絶対値sao_offset_absと符号sao_offset_signを符号化ストリームに含め、SAO部3052は、sao_offset_absとsao_offset_signから実際に用いられるオフセット値SaoOffsetValを導出して用いる。
(SaoOffsetVal)
In the process of SAO in the present embodiment, the absolute value of offset sao_offset_abs and code sao_offset_sign are included in the encoded stream, and the SAO unit 3052 derives and uses the offset value SaoOffsetVal actually used from sao_offset_abs and sao_offset_sign.

SaoOffsetVal[cIdx][rx][ry][i+1] = (1-2*sao_offset_sign[cIdx][rx][ry][i])*sao_offset_abs[cIdx][rx][ry][i] << log2OffsetScale (式SAO-1)
ここでlog2OffsetScaleは、オフセットを量子化する場合に用いる量子化パラメータで通常0、1、2等の値を用いる。cIdxは色コンポーネントを示すインデックスであり、例えば、cIdx=0(輝度)、1(色差Cb)、2(色差Cr)である。
SaoOffsetVal [cIdx] [rx] [ry] [i + 1] = (1-2 * sao_offset_sign [cIdx] [rx] [ry] [i]) * sao_offset_abs [cIdx] [rx] [ry] [i] <<log2OffsetScale (Formula SAO-1)
Here, log2OffsetScale is a quantization parameter used when quantizing the offset, and values such as 0, 1, 2 are normally used. cIdx is an index indicating a color component, and for example, cIdx = 0 (luminance), 1 (color difference Cb), and 2 (color difference Cr).

また、導出された各画素に加算されるオフセットの値の符号を導出するためのパラメータとしてsao_offset_signが符号化される。sao_offset_signは、加算されるオフセット値が0以外のときに符号化する。   Also, sao_offset_sign is encoded as a parameter for deriving the sign of the offset value added to each derived pixel. The sao_offset_sign is encoded when the added offset value is other than 0.

図18(a)にSAO部3052のブロック図を示す。SAO部3052は、カテゴリ設定部1001、オフセット情報格納部1002、オフセット加算部1003から構成される。   FIG. 18 (a) shows a block diagram of the SAO unit 3052. The SAO unit 3052 includes a category setting unit 1001, an offset information storage unit 1002, and an offset addition unit 1003.

(カテゴリ設定部1001)
カテゴリ設定部1001は、オフセットタイプsao_type_idxに対応する各画素位置のカテゴ
リを設定する。また、オフセットSaoOffsetValを導出し、カテゴリとオフセットをオフセット加算部1003に出力する。なお、sao_type_idxが0の場合、カテゴリを算出しない。
(Category setting unit 1001)
The category setting unit 1001 sets the category of each pixel position corresponding to the offset type sao_type_idx. Also, the offset SaoOffsetVal is derived, and the category and offset are output to the offset addition unit 1003. When sao_type_idx is 0, the category is not calculated.

sao_type_idxが2(EO)の場合、カテゴリ設定部1001は図16(a)に示す、エッジ分類を表すオフセットクラスclassにsao_eo_classをセットする。classは、対象画素からみた参照画素方向に対応し、参照画素の選択に用いられる。class=0の場合、参照画素a、bに対象画素Xの左右の画素を設定し、class=1の場合、a、bに対象画素Xの上下の画素を設定し、class=2の場合、a、bに対象画素Xの左上、右下の画素を設定し、class=3の場合、a、bに対象画素xの左下、右上の画素を設定する。   When sao_type_idx is 2 (EO), the category setting unit 1001 sets sao_eo_class to the offset class class indicating the edge classification shown in FIG. 16 (a). The class corresponds to the reference pixel direction viewed from the target pixel and is used for selecting the reference pixel. When class = 0, the pixels on the left and right of the target pixel X are set to the reference pixels a and b, when class = 1, the pixels above and below the target pixel X are set to a and b, and when class = 2, The upper left and lower right pixels of the target pixel X are set in a and b, and when class = 3, the lower left and upper right pixels of the target pixel x are set in a and b.

次に対象画素xと、classによって指定された2つの参照画素a、bの画素値の差分sign(rec[x]-rec[a])、sign(rec[x]-rec[b])を用いてedgeIdxを導出する。   Next, the difference sign (rec [x] -rec [a]) and sign (rec [x] -rec [b]) between the target pixel x and the pixel values of the two reference pixels a and b specified by class are calculated. Use to derive edgeIdx.

edgeIdx=sign(rec[x]-rec[a])+sign(rec[x]-rec[b])+2 (式SAO-5)
sign(x) = 1 (x>0)
= 0 (x=0)
=-1 (x<0)
ここで、rec[x]は画素xの復号画素値を表す。このedgeIdxからカテゴリcatを算出する。
edgeIdx = sign (rec [x] -rec [a]) + sign (rec [x] -rec [b]) + 2 (Formula SAO-5)
sign (x) = 1 (x> 0)
= 0 (x = 0)
= -1 (x <0)
Here, rec [x] represents the decoded pixel value of pixel x. The category cat is calculated from this edgeIdx.

cat =(edgeIdx==2)?0:edgeIdx+1 (edgeIdx<=2) (式SAO-6)
=edgeIdx (edgeIdx>2)
class=0の場合のカテゴリcatの示す対象画素値xと参照画素a、bの大小関係を図16(b)に示す。黒丸が対象画素x、xの左側の白丸が参照画素a、xの右側の白丸が参照画素bであり、縦方向は画素値の大小関係を表す。
cat = (edgeIdx == 2)? 0: edgeIdx + 1 (edgeIdx <= 2) (Formula SAO-6)
= edgeIdx (edgeIdx> 2)
FIG. 16 (b) shows the magnitude relationship between the target pixel value x indicated by the category cat and the reference pixels a and b when class = 0. The black circle is the target pixel x, the white circle on the left side of x is the reference pixel a, and the white circle on the right side of x is the reference pixel b, and the vertical direction represents the magnitude relationship of the pixel values.

sao_type_idxが1(BO)の場合、カテゴリ設定部1001は、図16(c)に示すように0〜2^bitDepth-1の画素値をバンドに分割する。カテゴリ設定部1001は、カテゴリcatの1〜4に、エントロピー復号部301で復号したバンドオフセット位置(sao_band_position)が示すバンドから連続する4バンドをセットする。   When sao_type_idx is 1 (BO), the category setting unit 1001 divides the pixel values of 0 to 2 ^ bitDepth-1 into bands as shown in FIG. 16 (c). The category setting unit 1001 sets four consecutive bands from the band indicated by the band offset position (sao_band_position) decoded by the entropy decoding unit 301 to 1 to 4 of the category cat.

cat = (rec[x][y]>>bandShift)-sao_band_position+1 (式SAO-7)
if (cat<=0 || cat>4) cat=0
ここでrec[x][y]はSAO前復号画像の画素値、bandShiftはlog2(bandW)である。
cat = (rec [x] [y] >> bandShift) -sao_band_position + 1 (Formula SAO-7)
if (cat <= 0 || cat> 4) cat = 0
Here, rec [x] [y] is the pixel value of the SAO pre-decoded image, and bandShift is log2 (bandW).

さらに、(式SAO-1)のオフセットSaoOffsetValを導出し、カテゴリcatとオフセットSaoOffsetValをオフセット加算部1003に出力する。   Further, the offset SaoOffsetVal of (Equation SAO-1) is derived, and the category cat and the offset SaoOffsetVal are output to the offset addition unit 1003.

(オフセット加算部1003)
オフセット加算部1003は、入力画像(デブロック済復号画像P_DBもしくは局所復号画像P)の画素値recPicture[][]にオフセットSaoOffsetValを加算して、フィルタ済復号画像P_FLの画素値として設定する。
(Offset adder 1003)
The offset addition unit 1003 adds the offset SaoOffsetVal to the pixel value recPicture [] [] of the input image (deblocked decoded image P_DB or local decoded image P) and sets it as the pixel value of the filtered decoded image P_FL.

saoPicture[x][y] = Clip3(0, (1<<bitDepth)-1,recPicture[x][y]+SaoOffsetVal[cIdx][rx][ry][edgeIdx or bandIdx])
(ALF部3053)
ループフィルタ部305はALF部(ALF部3053)を備えてもよい。ALFはCTU毎に通知されるALFパラメータを用いた処理であり様々な符号化ノイズを除去する効果がある。ALF部3053は、入力画像(例えば復号画像やDF済み復号画像やSAO済復号画像)にALF処理を施すことによって、ALF済復号画像P_ALFを生成する。
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + SaoOffsetVal [cIdx] [rx] [ry] [edgeIdx or bandIdx])
(ALF part 3053)
The loop filter unit 305 may include an ALF unit (ALF unit 3053). ALF is a process that uses ALF parameters notified for each CTU, and is effective in removing various coding noises. The ALF unit 3053 generates an ALF-processed decoded image P_ALF by performing an ALF process on the input image (for example, the decoded image, the DF-processed decoded image, or the SAO-processed decoded image).

図18(b)にALF部3053のブロック図を示す。ALF部3053は、フィルタ情報格納部30531、ALFフィルタ処理部30532から構成される。   FIG. 18 (b) shows a block diagram of the ALF unit 3053. The ALF unit 3053 includes a filter information storage unit 30531 and an ALF filter processing unit 30532.

ALF部3053は、対象CTUの有効領域が所定のサイズ以上の場合に、CTU単位で処理を行うループフィルタの情報(ALFユニット)を復号する。対象CTUの有効領域が所定のサイズ未満の場合には、CTU単位のループフィルタ情報(ALFユニット)を復号せず、CTU単位のループフィルタ処理(ここではALF処理)を行わない。   The ALF unit 3053 decodes information (ALF unit) of a loop filter that performs processing in CTU units when the effective area of the target CTU is equal to or larger than a predetermined size. When the effective area of the target CTU is smaller than the predetermined size, the loop filter information (ALF unit) in units of CTU is not decoded, and the loop filter processing in units of CTU (ALF processing here) is not performed.

例えば、ALF部3053は、タイルを利用しない場合には画面サイズから対象CTUの有効領域(wActBlk, hActBlk)を導出してもよい。   For example, the ALF unit 3053 may derive the effective area (wActBlk, hActBlk) of the target CTU from the screen size when tiles are not used.

wActBlk = Min(ctuWidth,wPict-xCtb)
hActBlk = Min(ctuHeight,hPict-yCtb)
ALF部3053は、タイルを利用する場合には、タイルのサイズと画面内座標系のタイルの左上座標と画面内座標系の対象CTUの左上座標から、対象CTUの有効領域(wActBlk, hActBlk)を導出してもよい。また、タイルを利用しない場合にも、画面が1つのタイルとみなして同じ処理を行ってもよい。
wActBlk = Min (ctuWidth, wPict-xCtb)
hActBlk = Min (ctuHeight, hPict-yCtb)
When the tile is used, the ALF unit 3053 determines the effective area (wActBlk, hActBlk) of the target CTU from the tile size, the upper left coordinate of the tile of the in-screen coordinate system, and the upper left coordinate of the target CTU of the in-screen coordinate system. You may derive it. Further, even when tiles are not used, the same processing may be performed assuming that the screen is one tile.

wActBlk = Min(ctuWidth,xTile[TileId]+wTile[TileId]-xCtb)
hActBlk = Min(ctuHeight,yTile[TileId]+hTile[TileId]-yCtb)
ここで、TileIdは対象CTUを含むタイルのタイルIDである。
wActBlk = Min (ctuWidth, xTile [TileId] + wTile [TileId] -xCtb)
hActBlk = Min (ctuHeight, yTile [TileId] + hTile [TileId] -yCtb)
Here, TileId is the tile ID of the tile including the target CTU.

ALF部3053は、図8に示すように、対象ブロックの有効領域(wActBlk, hActBlk)が所定のサイズ(MinAlfSize)以上である場合に、ALFユニットを復号する。   As shown in FIG. 8, the ALF unit 3053 decodes the ALF unit when the effective area (wActBlk, hActBlk) of the target block is equal to or larger than a predetermined size (MinAlfSize).

wActBlk >= MinAlfSize && hActBlk>=MinAlfSize
なお、有効領域の判定式はwActBlk+hActBlk>=MinAlfSizeや、log2(wActBlk)+log2(hActBlk)>=MinAlfSize、wActBlk*hActBlk>=MinAlfSizeなどでもよい。
wActBlk> = MinAlfSize &&hActBlk> = MinAlfSize
The expression for determining the effective area may be wActBlk + hActBlk> = MinAlfSize, log2 (wActBlk) + log2 (hActBlk)> = MinAlfSize, wActBlk * hActBlk> = MinAlfSize.

なお図34に示すように、CTU座標(xCtb, yCtb)がタイル左上を原点とした座標、つまりタイル内座標(xCtb, yCtb)とタイルサイズ(wTile, hTile)を用いて以下の式で有効領域を判定してもよい。   As shown in Fig. 34, the CTU coordinates (xCtb, yCtb) are coordinates with the tile upper left as the origin, that is, the tile area coordinates (xCtb, yCtb) and tile size (wTile, hTile) are used to calculate the effective area using the following formula. May be determined.

wActBlk = Min(ctuWidth,wTile[TileId]-xCtb)
hActBlk = Min(ctuHeight,hTile[TileId]-yCtb)
この場合、ALF部3053は、対象CTUの有効領域の幅もしくは高さが所定の最小サイズ以上の場合に、CTU単位でフィルタ処理を行うか否かを示すCTUフィルタフラグであるalf_ctu_flagを復号し、最小サイズ未満の場合には、上記CTUフィルタフラグalf_ctu_flagの復号を省略し、フィルタを行わないことを示す値(0)に設定する。
wActBlk = Min (ctuWidth, wTile [TileId] -xCtb)
hActBlk = Min (ctuHeight, hTile [TileId] -yCtb)
In this case, the ALF unit 3053 decodes alf_ctu_flag, which is a CTU filter flag indicating whether to perform filter processing in CTU units when the width or height of the effective area of the target CTU is equal to or larger than a predetermined minimum size, When the size is less than the minimum size, decoding of the CTU filter flag alf_ctu_flag is omitted, and a value (0) indicating that filtering is not performed is set.

図15は、本実施形態に係る符号化ストリームのALFユニット(図15においてalf_unit()と表記)のシンタックスを示す図である。ALFユニットはCTU毎に通知され、ALFユニットalf_param()、および、ALFユニットのマージ制御情報(alf_merge_left_flag, alf_merge_up_flag)をシンタックス要素として含む。alf_merge_left_flagは、対象CTUのALFユニットを、対象CTUの左隣接CTUから複製するか否かを示すフラグである。alf_merge_up_flagは、対象CTUのALFユニットを、対象CTUの上隣接CTUから複製するか否かを示すフラグである。また、ALFユニットは、上隣接CTU及び左隣接CTUによらず他の位置のCTUのALFユニットや、別途設けたALFユニットを保持するALFデータベース(ALFテーブル)の情報をコピーしてもよい。   FIG. 15 is a diagram showing the syntax of the ALF unit (denoted as alf_unit () in FIG. 15) of the encoded stream according to the present embodiment. The ALF unit is notified for each CTU and includes ALF unit alf_param () and ALF unit merge control information (alf_merge_left_flag, alf_merge_up_flag) as syntax elements. alf_merge_left_flag is a flag indicating whether or not to copy the ALF unit of the target CTU from the left adjacent CTU of the target CTU. alf_merge_up_flag is a flag indicating whether or not to copy the ALF unit of the target CTU from the upper adjacent CTU of the target CTU. Further, the ALF unit may copy the information of the ALF unit of the CTU at another position regardless of the upper adjacent CTU and the left adjacent CTU, or the information of the ALF database (ALF table) holding the separately provided ALF unit.

ALF部3053は、フィルタ処理を行う場合(alf_ctu_flag=1の場合)には、フィルタ係数を復号する。復号したフィルタ係数はフィルタ情報格納部30531に格納し、マージ制御情報に応じて再利用可能とする。alf_ctu_flag=1の場合もマージ制御情報がマージを行う場合には、フィルタ情報格納部30531に格納されたフィルタ係数を読みだして用いる。ここでは5x5のフィルタ係数としてi=0..24のフィルタ係数を復号する例を説明するが、フィルタ形状は5x5に限定されず、9x7、7x7ダイヤモンド、5x5ダイヤモンド、9x5クロス、9x7クロス+3x3菱形などでもよい。また、回転対称を利用して25/2+1=13個のフィルタ係数を伝送してもよい。   The ALF unit 3053 decodes the filter coefficient when performing the filtering process (when alf_ctu_flag = 1). The decoded filter coefficient is stored in the filter information storage unit 30531 and can be reused according to the merge control information. Even when alf_ctu_flag = 1, when the merge control information performs the merge, the filter coefficient stored in the filter information storage unit 30531 is read and used. Here, an example of decoding a filter coefficient of i = 0..24 as a 5x5 filter coefficient will be described, but the filter shape is not limited to 5x5, and 9x7, 7x7 diamond, 5x5 diamond, 9x5 cross, 9x7 cross + 3x3 rhombus And so on. Alternatively, 25/2 + 1 = 13 filter coefficients may be transmitted by using rotational symmetry.

具体的には、絶対値を示すシンタックスalf_coeff_abs[cIdx][rx][ry][i]と符号を示すシンタックスalf_coeff_sign[cIdx][rx][ry][i]を復号し、(rx, ry)の位置で示されるフィルタ係数alf_coeff[cIdx][i]を導出する。   Specifically, the syntax alf_coeff_abs [cIdx] [rx] [ry] [i] indicating the absolute value and the syntax alf_coeff_sign [cIdx] [rx] [ry] [i] indicating the sign are decoded, and (rx, The filter coefficient alf_coeff [cIdx] [i] indicated by the position of (ry) is derived.

alf_coeff[cIdx][i] = alf_coeff_abs[cIdx][rx][ry][i]*(1-2*alf_coeff_sign[cIdx][rx][ry][i])
ALFフィルタ処理部30532は、積和演算によりフィルタ処理を行う。また下記のように積和演算の後に加算やシフトやクリップを行ってもよい。ここで、x,yは対象CTUにおけるフィルタ対象画素の座標を表し、x=xCtb..xCtb+wActBlk-1, y=yCtb..yCtb+hActBlk-1の範囲のx,yに対してフィルタ処理が行われる。
alf_coeff [cIdx] [i] = alf_coeff_abs [cIdx] [rx] [ry] [i] * (1-2 * alf_coeff_sign [cIdx] [rx] [ry] [i])
The ALF filter processing unit 30532 performs filter processing by product-sum calculation. Further, addition, shift, and clipping may be performed after the product-sum calculation as described below. Here, x, y represents the coordinates of the pixel to be filtered in the target CTU, and x = xCtb..xCtb + wActBlk-1, y = yCtb..yCtb + hActBlk-1 is filtered for x, y in the range. Is done.

alfPicture[x][y] = Clip3(0,(1<<bitDepth)-1,Σ(recPicture[x+i%5-2][y+i/5-2]*alf_coeff[cIdx][i]+128)>>8)
ここでΣは、i=0..24までの加算である。また、128と8は、オフセットが8bit固定小数で伝送されている場合のオフセット及びシフト処理であり、オフセットの精度によって変更しても良い。また、積和演算に加えオフセット項(バイアス項)をさらにALFパラメータとして伝送してもよい。例えばi=25のパラメータとしてバイアス項を伝送してもよい。
alfPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, Σ (recPicture [x + i% 5-2] [y + i / 5-2] * alf_coeff [cIdx] [i] +128) >> 8)
Here, Σ is addition up to i = 0..24. Further, 128 and 8 are offset and shift processing when the offset is transmitted in a fixed 8-bit decimal number, and may be changed depending on the accuracy of the offset. In addition to the product-sum calculation, the offset term (bias term) may be further transmitted as an ALF parameter. For example, the bias term may be transmitted as a parameter of i = 25.

なお、MinAlfSizeの閾値は、量子化パラメータQPが大きくなるにつれてより大きい値を設定しても良い。また、以下のように閾値に上限と下限を設けてもよい。   The threshold value of MinAlfSize may be set to a larger value as the quantization parameter QP increases. Further, the threshold may have an upper limit and a lower limit as follows.

MinAlfSize = Clip3(16,CtuSize/2,(QP+32)/2)
上記SAO部3052もしくはALF部3053によれば、タイルをCTU単位に分割し、CTU単位に動画像を復号する動画像復号装置において、CTU単位でフィルタ処理を行うCTUフィルタ処理部(SAO部3052 or ALF部3053)を備え、CTUの幅もしくは高さが所定のCTUサイズ未満(ctuWidth, ctuHeight)のサイズで終端し、有効領域(wActBlk, hActBlk)が所定のCTUサイズ(ctuWidth, ctuHeight)と異なることがある場合において、対象CTUの有効領域(実CTUサイズ)の幅wActBlkもしくは高さhActBlkが所定の最小サイズ以上(MinSaoSize, MinAlfSize)の場合に、上記CTUフィルタ処理部はフィルタ処理を行い、上記最小サイズ未満の場合には、上記CTUフィルタ処理部はフィルタ処理を行わない。
MinAlfSize = Clip3 (16, CtuSize / 2, (QP + 32) / 2)
According to the SAO unit 3052 or the ALF unit 3053, a CTU filter processing unit (SAO unit 3052 or CTU unit that performs filter processing in CTU units in a moving image decoding apparatus that divides tiles into CTU units and decodes moving images in CTU units. ALF part 3053) is provided, and the width or height of the CTU ends with a size smaller than the predetermined CTU size (ctuWidth, ctuHeight), and the effective area (wActBlk, hActBlk) is different from the predetermined CTU size (ctuWidth, ctuHeight). If the width wActBlk or the height hActBlk of the effective area (actual CTU size) of the target CTU is equal to or larger than a predetermined minimum size (MinSaoSize, MinAlfSize), the CTU filter processing unit performs the filter processing, and the minimum When the size is less than the size, the CTU filter processing unit does not perform the filter processing.

なお、ヘッダ復号部3020は、CTU単位でフィルタ処理を行うか否かを示すCTUフィルタフラグを復号し、対象CTUの有効領域の幅もしくは高さが所定の最小サイズ以上の場合に、上記CTUフィルタフラグを復号し、上記最小サイズ未満の場合には、上記CTUフィルタフラグの復号を省略し、フィルタを行わないことを示す値(0)に設定する。   The header decoding unit 3020 decodes the CTU filter flag indicating whether or not to perform the filtering process in units of CTU, and when the width or height of the effective area of the target CTU is equal to or larger than a predetermined minimum size, the CTU filter is used. When the flag is decoded and the size is less than the minimum size, the decoding of the CTU filter flag is omitted and a value (0) indicating that filtering is not performed is set.

上記により、小さいCTUでは、SAOユニットやALFユニットを伝送せず、ループフィルタの符号量を減らすことができるので符号化効率が向上する。逆に言えば、ループフィルタは適用する面積に効果が比例するため、小さいCTUでは、SAOユニットやALFユニットを伝送しても、符号量のオーバーヘッド分の効果が見込めず、効果がマイナスとなること
があり、これを防ぐことができる。
As described above, in a small CTU, the SAO unit and the ALF unit are not transmitted, and the code amount of the loop filter can be reduced, so that the coding efficiency is improved. Conversely, since the effect of the loop filter is proportional to the area to be applied, even with a small CTU, even if the SAO unit or ALF unit is transmitted, the effect of the overhead of the code amount cannot be expected and the effect becomes negative. There is, and you can prevent this.

(変形例)
画面が複数のタイルから構成される場合には、画面内にタイル境界が存在する。タイル境界にループフィルタ処理を行う場合には、座標系をタイル内座標系から画面内座標系に変換する必要がある(図35)。
(Modification)
When the screen is composed of multiple tiles, there is a tile boundary within the screen. When performing loop filter processing on a tile boundary, it is necessary to convert the coordinate system from the in-tile coordinate system to the in-screen coordinate system (Fig. 35).

タイル内座標系でのCTU単位のCTB座標(rx, ry)に、画面内でのCTU単位のタイル左上座標(TileXInCtbY[ TileId ], TileXInCtbX[ TileId ])を加算して得られる画面内のCTU単位の座標(tx, ty)を導出し、この単位でALFのオンオフフラグalf_ctb_flag[cIdx][tx][ty]、cIdx = 0..2を復号する(図36)。   CTU unit in the screen, which is obtained by adding the CTB coordinate (rx, ry) in the CTU unit in the tile coordinate system to the tile upper left coordinate (TileXInCtbY [TileId], TileXInCtbX [TileId]) in the CTU unit in the screen. The coordinates (tx, ty) are derived and the ALF on / off flag alf_ctb_flag [cIdx] [tx] [ty] and cIdx = 0..2 are decoded in this unit (Fig. 36).

tx = rx + TileXInCtbY[ TileId ]
ty = ry + TileYInCtbY[ TileId ]
上記のように、CTU単位もしくはCU単位でフィルタパラメータ(例えば、alf_ctb_flag)が符号化データに格納されている場合において、タイル内座標系から画面内座標系に変換して、画面内座標系の座標(tx, ty)でインデックスされるテーブルにフィルタパラメータを格納することによって、画面が複数のタイルから構成されている場合においても、タイル境界のフィルタ処理をする場合に容易にフィルタパラメータにアクセスして処理することが可能となるという効果を奏する。
tx = rx + TileXInCtbY [TileId]
ty = ry + TileYInCtbY [TileId]
As described above, when the filter parameter (for example, alf_ctb_flag) is stored in the encoded data in units of CTU or CU, the coordinates in the in-screen coordinate system are converted from the in-tile coordinate system to the in-screen coordinate system. By storing the filter parameters in the table indexed by (tx, ty), you can easily access the filter parameters when filtering tile boundaries, even if the screen consists of multiple tiles. This has the effect of enabling processing.

さらに、タイル内座標系から画面内座標系に座標を変換して、画面内で処理を行う。例えばタイル内座標(xCtbInTile, yCtbInTile)から以下の式で画面内座標(xCtbInPic, yCtbInPic)に変換する。   Further, the coordinates are converted from the in-tile coordinate system to the in-screen coordinate system, and processing is performed on the screen. For example, the coordinates in the tile (xCtbInTile, yCtbInTile) are converted to the coordinates in the screen (xCtbInPic, yCtbInPic) by the following formula.

xCtbInPic = xCtbInTile + xTile[ TileId ]
yCtbInPic = yCtbInTile + yTile[ TileId ]
また、タイル内座標系におけるCTU単位の座標(rx, ry)から以下の式で画面内のCTU左上座標を導出し、各タイルの各CTBの各画素にフィルタ処理を行ってもよい。
xCtbInPic = xCtbInTile + xTile [TileId]
yCtbInPic = yCtbInTile + yTile [TileId]
Further, the CTU upper left coordinate in the screen may be derived from the coordinates (rx, ry) in the CTU unit in the tile coordinate system by the following formula, and the filtering process may be performed on each pixel of each CTB of each tile.

xCtb = ( rx << CtbLog2SizeY ) + xTile[ TileId ]
yCtb = ( ry << CtbLog2SizeY ) + yTile[ TileId ]
上記のように、タイル内座標系から画面内座標系に変換して、ループフィルタ処理を行うことによって、画面が複数のタイルから構成されている場合においても、タイル単位の処理の繰り返しによって、タイル境界に対するフィルタ処理が可能になるという効果を奏する。これにより一部のタイルを抽出する場合にも、同様にタイル単位の処理の繰り返しによって、タイル境界に対するフィルタ処理が可能になる。
xCtb = (rx << CtbLog2SizeY) + xTile [TileId]
yCtb = (ry << CtbLog2SizeY) + yTile [TileId]
As described above, by converting from the in-tile coordinate system to the in-screen coordinate system, and performing the loop filter process, even when the screen is composed of multiple tiles, the tile unit is repeatedly processed by repeating the process. The effect that filter processing can be performed on the boundary is achieved. By this, even when a part of tiles is extracted, the tile boundary can be filtered by repeating the process for each tile.

タイル境界にループフィルタ処理を行うか否かを、画面単位、タイルグループ単位、もしくは、タイル単位のフラグを用いて切り替えてもよい。ここでは、loop_filter_across_tiles_enabled_flagで切り替える例を説明する。   Whether or not to perform the loop filter process on the tile boundary may be switched using a flag for each screen, each tile group, or each tile. Here, an example of switching with loop_filter_across_tiles_enabled_flag will be described.

loop_filter_across_tiles_enabled_flagが1(真)であれば、ループフィルタ処理の対象画素(座標(x,y))が参照する画素は、座標(x,y)が属するタイルと異なるタイルに属していても良い。一方、loop_filter_across_tiles_enabled_flagが0(偽)であれば、ループフィルタ処理の対象画素(x,y)が参照する画素は、座標(x,y)が属するタイルと異なるタイルに属していてはならない。   If loop_filter_across_tiles_enabled_flag is 1 (true), the pixel referred to by the target pixel (coordinates (x, y)) of the loop filter process may belong to a tile different from the tile to which the coordinates (x, y) belong. On the other hand, if loop_filter_across_tiles_enabled_flag is 0 (false), the pixel referred to by the target pixel (x, y) of the loop filter process must not belong to the tile different from the tile to which the coordinate (x, y) belongs.

本実施形態のループフィルタ部107(デブロッキングフィルタ部、SAO部3052またはALFフィルタ処理部30532)は、参照画素の位置を示す座標を予めタイルの範囲にクリップし
た上で参照画素を導出し、フィルタ処理を行う。
The loop filter unit 107 (deblocking filter unit, SAO unit 3052 or ALF filter processing unit 30532) of the present embodiment, the coordinates indicating the position of the reference pixel is clipped in the range of the tile in advance, the reference pixel is derived, and the filter Perform processing.

次に示すのは、座標のクリップ処理を含むALFフィルタ処理を擬似コードで表現した例である。参照画素の位置を示す座標(x+i%5-2,y+i/5-2)をクリップした値を用いて参照画素バッファ(recPicture)を参照している。   The following is an example in which the ALF filter processing including the coordinate clipping processing is expressed in pseudo code. The reference pixel buffer (recPicture) is referenced using a value obtained by clipping the coordinates (x + i% 5-2, y + i / 5-2) indicating the position of the reference pixel.

if (tile_enabled_flag && !loop_filter_across_tiles_enabled) {
for (sum=0, i=0; i<=24; i++) {
hx = Clip3(TileX[TileId], TileX[TileId] + TileWidth[TileId]-1, x+i%5-2 )
vy = Clip3(TileY[TileId], TileY[TileId] + TileHeight[TileId]-1, y+i/5-2 )
sum += (recPicture[hx][vy]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits
}
} else {
sum = Clip3(0,(1<<bitDepth)-1,Σ(recPicture[x+i%5-2][y+i/5-2]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits)
}
alfPicture[x][y] = Clip3(0,(1<<bitDepth)-1, sum) なお、tile_enabled_flagが真のときのみloop_filter_across_tilesenabledが真に設定されるならば、条件(tile_enabled_flag && !loop_filter_across_tiles_enabled)の代わりに(!loop_filter_across_tiles_enabled)としてもよい。
if (tile_enabled_flag &&! loop_filter_across_tiles_enabled) {
for (sum = 0, i = 0; i <= 24; i ++) {
hx = Clip3 (TileX [TileId], TileX [TileId] + TileWidth [TileId] -1, x + i% 5-2)
vy = Clip3 (TileY [TileId], TileY [TileId] + TileHeight [TileId] -1, y + i / 5-2)
sum + = (recPicture [hx] [vy] * alf_coeff [cIdx] [i] + (1 << (coeffBits-1))) >> coeffBits
}
} else {
sum = Clip3 (0, (1 << bitDepth) -1, Σ (recPicture [x + i% 5-2] [y + i / 5-2] * alf_coeff [cIdx] [i] + (1 << ( coeffBits-1))) >> coeffBits)
}
alfPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, sum) If loop_filter_across_tilesenabled is set to true only when tile_enabled_flag is true, instead of condition (tile_enabled_flag &&! loop_filter_across_tiles_enabled) It may be (! Loop_filter_across_tiles_enabled).

また、ここではタイル外画素の参照制約方法として、クリップ処理(Clip3()関数)を用いたが、参照画素値を格納しているバッファ(recPicture)においてパディング処理を行ってもよい。その場合は、recPictureのうち、タイル外の座標の画素値として、タイル内の座標の画素と同じ値を予め格納しておくとよい。ただし、recPictureを一時バッファに複製し、元のrecPictureの画像が破壊されないように構成することが望ましい。参照画素の位置(i,j)の画素値として、以下の位置(ti,tj)の画素値refPicture[ti][tj]を用いることで実現する。すなわち、参照位置を、タイルの上下左右の境界画素の位置でクリッピングすることで実現する。   Further, although the clipping process (Clip3 () function) is used as the reference constraint method for the pixels outside the tile here, the padding process may be performed in the buffer (recPicture) storing the reference pixel value. In that case, the same value as the pixel of the coordinate inside the tile may be stored in advance as the pixel value of the coordinate outside the tile in recPicture. However, it is desirable to copy the recPicture to a temporary buffer so that the original recPicture image is not destroyed. It is realized by using the pixel value refPicture [ti] [tj] at the following position (ti, tj) as the pixel value at the reference pixel position (i, j). That is, it is realized by clipping the reference position at the positions of the boundary pixels on the top, bottom, left, and right of the tile.

ti = Clip3(TileX[TileId],TileX[TileId]+TileWidth[TileId]-1,i)
tj = Clip3(TileY[TileId],TileY[TileId]+TileHeight[TileId]-1,j)
また、loop_filter_across_tiles_enabled_flagはすべてのタイル境界について共通のフラグであるが、タイル境界を複数の種類に分けて別々に制御するために、複数のフラグを用いてもよい。図37に例を示す。
ti = Clip3 (TileX [TileId], TileX [TileId] + TileWidth [TileId] -1, i)
tj = Clip3 (TileY [TileId], TileY [TileId] + TileHeight [TileId] -1, j)
Further, loop_filter_across_tiles_enabled_flag is a flag common to all tile boundaries, but a plurality of flags may be used in order to separately control tile boundaries into a plurality of types. An example is shown in FIG.

図37(a)は、loop_filter_across_tiles_enabled_flagに代えて、loop_filter_across_vertical_tile_boundary_enabled_flagおよびloop_filter_across_horizontal_tile_boundary_enabled_flagを用いるシンタックスの例である。loop_filter_across_vertical_tile_boundary_enabled_flagが真である場合、垂直方向のタイル境界を超えて、水平方向に隣接するタイルに含まれる画素を参照できることを示す。loop_filter_across_horizontal_tile_boundary_enabled_flagが真である場合、水平方向のタイル境界を超えて、垂直方向に隣接するタイルに含まれる画素を参照できることを示す。次に示すのは、ALFフィルタ処理を表す擬似コードである。   FIG. 37 (a) is an example of syntax using loop_filter_across_vertical_tile_boundary_enabled_flag and loop_filter_across_horizontal_tile_boundary_enabled_flag instead of loop_filter_across_tiles_enabled_flag. When loop_filter_across_vertical_tile_boundary_enabled_flag is true, it indicates that pixels included in tiles horizontally adjacent to each other can be referred to beyond the tile boundary in the vertical direction. When loop_filter_across_horizontal_tile_boundary_enabled_flag is true, it indicates that pixels included in vertically adjacent tiles can be referenced beyond the horizontal tile boundary. The following is pseudo code that represents ALF filtering.

if (tile_enabled_flag) {
for (sum=0, i=0; i<=24; i++) {
if (loop_filter_across_vertical_tile_boundary_enabled_flag) {
hx = x+i%5-2
} else {
hx = Clip3(TileX[TileId], TileX[TileId]+TileWidth[TileId]-1, x+i%5-2)
}
if (loop_filter_across_horizontal_tile_boundary_enabled_flag) {
vy = y+i/5-2
} else {
vy = Clip3(TileY[TileId], TileY[TileId]+TileHeight[TileId]-1, y+i/5-2)
}
sum += (recPicture[hx][vy]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits
}
} else {
sum = Clip3(0,(1<<bitDepth)-1,Σ(recPicture[x+i%5-2][y+i/5-2]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits)
}
alfPicture[x][y] = Clip3(0,(1<<bitDepth)-1, sum)
上記擬似コードの処理によれば、loop_filter_across_vertical_tile_boundary_enabled_flagが真である場合には水平方向の参照画素位置に制限、すなわちクリップ処理は行われず、偽である場合にのみクリップ処理が行われる。同様に、loop_filter_across_horizontal_tile_boundary_enabled_flagが真である場合には垂直方向の参照画素位置に制限、すなわちクリップ処理な行われず、偽である場合にのみ行われる。
if (tile_enabled_flag) {
for (sum = 0, i = 0; i <= 24; i ++) {
if (loop_filter_across_vertical_tile_boundary_enabled_flag) {
hx = x + i% 5-2
} else {
hx = Clip3 (TileX [TileId], TileX [TileId] + TileWidth [TileId] -1, x + i% 5-2)
}
if (loop_filter_across_horizontal_tile_boundary_enabled_flag) (
vy = y + i / 5-2
} else {
vy = Clip3 (TileY [TileId], TileY [TileId] + TileHeight [TileId] -1, y + i / 5-2)
}
sum + = (recPicture [hx] [vy] * alf_coeff [cIdx] [i] + (1 << (coeffBits-1))) >> coeffBits
}
} else {
sum = Clip3 (0, (1 << bitDepth) -1, Σ (recPicture [x + i% 5-2] [y + i / 5-2] * alf_coeff [cIdx] [i] + (1 << ( coeffBits-1))) >> coeffBits)
}
alfPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, sum)
According to the processing of the pseudo code, when the loop_filter_across_vertical_tile_boundary_enabled_flag is true, the reference pixel position in the horizontal direction is restricted, that is, the clip processing is not performed, and the clip processing is performed only when it is false. Similarly, when loop_filter_across_horizontal_tile_boundary_enabled_flag is true, it is limited to the reference pixel position in the vertical direction, that is, clipping processing is not performed, and is performed only when it is false.

図37(b)は、loop_filter_across_tiles_enabled_flagに代えて、loop_filter_across_top_left_tile_boundary_enabled_flagおよびloop_filter_across_bottom_right_tile_boundary_enabled_flagを用いるシンタックスの例である。loop_filter_across_top_left_tile_boundary_enabled_flagが真である場合、対象タイルの上側境界および左側境界を超えて画素を参照できることを示す。loop_filter_across_bottom_right_tile_boundary_enabled_flagが真である場合、対象タイルの下側境界および右側境界を超えて画素を参照できることを示す。次に示すのは、このときのALFフィルタ処理を表す擬似コードである。   FIG. 37 (b) is an example of syntax that uses loop_filter_across_top_left_tile_boundary_enabled_flag and loop_filter_across_bottom_right_tile_boundary_enabled_flag instead of loop_filter_across_tiles_enabled_flag. When loop_filter_across_top_left_tile_boundary_enabled_flag is true, it indicates that the pixel can be referenced beyond the upper boundary and the left boundary of the target tile. When loop_filter_across_bottom_right_tile_boundary_enabled_flag is true, it indicates that the pixel can be referred to beyond the lower boundary and the right boundary of the target tile. The following is pseudo code that represents the ALF filtering process at this time.

if (tile_enabled_flag) {
for (sum=0, i=0; i<=24; i++) {
if (loop_filter_across_top_left_tile_boundary_enabled_flag) {
min_hx = 0
min_vy = 0
} else {
min_hx = TileX[TileId]
min_vy = TileY[TileId]
}
if (loop_filter_across_bottom_right_tile_boundary_enabled_flag) {
max_hx = pic_width_in_luma_samples-1
max_vy = pic_height_in_luma_samples-1
} else {
max_hx = TileX[TileId]+TileWidth[TileId]-1
max_vy = TileY[TileId]+TileHeight[TileId]-1
}
hx = Clip3(min_hx, max_hx, x+i%5-2)
vy = Clip3(min_vy, max_vy, y+i/5-2)
}
sum += (recPicture[hx][vy]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBi
ts
}
} else {
sum = Clip3(0,(1<<bitDepth)-1,Σ(recPicture[x+i%5-2][y+i/5-2]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits)
}
alfPicture[x][y] = Clip3(0,(1<<bitDepth)-1, sum)
上記の擬似コードによれば、loop_filter_across_top_left_tile_boundary_flagが真の場合には、対象タイルの上側境界および左側境界を超えてALFの参照画素を取得できる。そのため、参照画素の座標(x+i%5-2,y+i/5-2)のとりうる最小値(min_hx, min_vy)は(0,0)に設定される。偽の場合には、参照画素の座標(x+i%5-2,y+i/5-2)のとりうる最小値(min_hx, min_hy)は、対象CTUを含むタイルの左上座標である(TileX[TileId],TileY[TileId])に設定される。このように設定された最小値を用いてXおよびY座標をそれぞれクリップ処理することで、左および上方向の参照画素の位置を、対象CTUを含むタイル内に制限するか否かを制御できる。一方、loop_filter_across_bottom_right_tile_boundary_flagが真の場合には、対象タイルの下側境界および右側境界を超えてALFの参照画素を取得できるため、参照画素の座標(x+i%5-2,y+i/5-2)のとりうる最大値(max_hx, max_vy)は、ピクチャのサイズ(pic_width_in_luma_samples-1, pic_height_in_luma_samples-1)に設定される。偽の場合には、参照画素の座標(x+i%5-2,y+i/5-2)のとりうる最大値(max_hx, max_hy)は、対象CTUを含むタイルの右下座標である(TileX[TileId]+TileWidth[TileId]-1,TileY[TileId]+TileHeight[TileId]-1)に設定される。このように設定された最大値を用いてXおよびY座標をそれぞれクリップ処理することで、下および右方向の参照画素の位置を、対象CTUを含むタイル内に制限するか否かを制御できる。なお、coeffBitsはフィルタ係数のビット精度を表す数である。
if (tile_enabled_flag) {
for (sum = 0, i = 0; i <= 24; i ++) {
if (loop_filter_across_top_left_tile_boundary_enabled_flag) {
min_hx = 0
min_vy = 0
} else {
min_hx = TileX [TileId]
min_vy = TileY [TileId]
}
if (loop_filter_across_bottom_right_tile_boundary_enabled_flag) {
max_hx = pic_width_in_luma_samples-1
max_vy = pic_height_in_luma_samples-1
} else {
max_hx = TileX [TileId] + TileWidth [TileId] -1
max_vy = TileY [TileId] + TileHeight [TileId] -1
}
hx = Clip3 (min_hx, max_hx, x + i% 5-2)
vy = Clip3 (min_vy, max_vy, y + i / 5-2)
}
sum + = (recPicture [hx] [vy] * alf_coeff [cIdx] [i] + (1 << (coeffBits-1))) >> coeffBi
ts
}
} else {
sum = Clip3 (0, (1 << bitDepth) -1, Σ (recPicture [x + i% 5-2] [y + i / 5-2] * alf_coeff [cIdx] [i] + (1 << ( coeffBits-1))) >> coeffBits)
}
alfPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, sum)
According to the above pseudo code, when the loop_filter_across_top_left_tile_boundary_flag is true, the reference pixel of the ALF can be acquired beyond the upper boundary and the left boundary of the target tile. Therefore, the minimum value (min_hx, min_vy) that the coordinates (x + i% 5-2, y + i / 5-2) of the reference pixel can take is set to (0, 0). When false, the minimum value (min_hx, min_hy) that the coordinate (x + i% 5-2, y + i / 5-2) of the reference pixel can take is the upper left coordinate of the tile including the target CTU ( TileX [TileId], TileY [TileId]). By clipping the X and Y coordinates using the minimum value set in this way, it is possible to control whether or not the positions of the reference pixels in the left and upper directions are restricted within the tile including the target CTU. On the other hand, when loop_filter_across_bottom_right_tile_boundary_flag is true, the reference pixel of ALF can be acquired beyond the lower boundary and the right boundary of the target tile, so the coordinates of the reference pixel (x + i% 5-2, y + i / 5- The maximum value (max_hx, max_vy) that can be taken in 2) is set to the size of the picture (pic_width_in_luma_samples-1, pic_height_in_luma_samples-1). If false, the maximum possible value (max_hx, max_hy) of the reference pixel coordinates (x + i% 5-2, y + i / 5-2) is the lower right coordinate of the tile containing the target CTU. It is set to (TileX [TileId] + TileWidth [TileId] -1, TileY [TileId] + TileHeight [TileId] -1). By clipping the X and Y coordinates using the maximum value set in this way, it is possible to control whether or not the positions of the reference pixels in the lower and right directions are restricted within the tile including the target CTU. Note that coeffBits is a number indicating the bit precision of the filter coefficient.

図37(c)は、loop_filter_across_tiles_enabled_flagに代えて、loop_filter_across_top_tile_boundary_enabled_flag、loop_filter_across_bottom_tile_boundary_enabled_flag、loop_filter_across_left_tile_boundary_enabled_flagおよびloop_filter_across_right_tile_boundary_enabled_flagを用いるシンタックスの例である。それぞれ、真である場合には、対象タイル境界のうち上側、下側、左側および右側の境界を超えて画素を参照できることを示す。偽である場合には、座標値が対象タイル内におさまるようクリップ処理が行われる。次に示すのは、このときのALFフィルタ処理を表す擬似コードである:
if (tile_enabled_flag) {
for (sum=0, i=0; i<=24; i++) {
if (loop_filter_across_top_tile_boundary_enabled_flag) {
min_vy = 0
} else {
min_vy = TileY[TileId]
}
if (loop_filter_across_bottom_tile_boundary_enabled_flag) {
max_vy = pic_height_in_luma_samples-1
} else {
max_vy = TileY[TileId]+TileHeight[TileId]-1
}
if (loop_filter_across_left_tile_boundary_enabled_flag) {
min_hx = 0
} else {
min_hx = TileX[TileId]
}
if (loop_filter_across_right_tile_boundary_enabled_flag) {
max_hx = pic_width_in_luma_samples-1
} else {
max_hx = TileX[TileId]+TileWidth[TileId]-1
}
hx = Clip3(min_hx, max_hx, x+i%5-2)
vy = Clip3(min_vy, max_vy, y+i/5-2)
}
sum += (recPicture[hx][vy]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits
}
} else {
sum = Clip3(0,(1<<bitDepth)-1,Σ(recPicture[x+i%5-2][y+i/5-2]*alf_coeff[cIdx][i]+(1<<(coeffBits-1)))>>coeffBits)
}
alfPicture[x][y] = Clip3(0,(1<<bitDepth)-1, sum)
上記の擬似コードによれば、対象タイル境界を超えて参照が可能か否かをより詳細に制御できる。loop_filter_across_top_tile_boundary_enabled_flagが真の場合には、参照画素のY座標のとりうる最小値min_vyは0に設定される。偽の場合には、参照画素のY座標のとりうる最小値min_vyは、対象CTUを含むタイルの左上Y座標であるTileY[TileId]に設定される。loop_filter_across_bottom_tile_boundary_enabled_flagが真の場合には、参照画素のY座標のとりうる最大値max_vyは、pic_height_in_luma_samples-1に設定される。偽の場合には、参照画素のY座標のとりうる最大値max_vyは、対象CTUを含むタイルの右下Y座標であるTileY[TileId]+TileHeight[TileId]-1に設定される。loop_filter_across_left_tile_boundary_enabled_flagが真の場合には、参照画素のX座標のとりうる最小値min_hxは0に設定される。偽の場合には、参照画素のX座標のとりうる最小値min_hxは、対象CTUを含むタイルの左上X座標であるTileX[TileId]に設定される。loop_filter_across_right_tile_boundary_enabled_flagが真の場合には、参照画素のX座標のとりうる最大値max_hxは、pic_width_in_luma_samples-1に設定される。偽の場合には、参照画素のX座標のとりうる最大値max_hxは、対象CTUを含むタイルの右下X座標であるTileX[TileId]+TileWidth[TileId]-1に設定される。このように設定された最小値を用いてXおよびY座標をそれぞれクリップ処理することで、上下左右それぞれの方向の参照画素の位置を、対象CTUを含むタイル内に制限する否かを、独立に制御できる。
Fig. 37 (c) illustrates loop_filter_across_top_tile_boundary_enabled_flag, loop_filter_across_bottom_tile_boundary_enabled_flag, loop_filter_across_left_tile_boundary_enabled_flag, and a loop_filter_across_right_tile_boundary_boundary_enabled_flag, which is an example of syntax_enabled_flag, instead of loop_filter_across_tiles_enabled_flag. If each is true, it indicates that the pixel can be referenced beyond the upper, lower, left, and right boundaries of the target tile boundary. When the value is false, the clipping process is performed so that the coordinate value is within the target tile. The following is pseudo code that represents ALF filtering at this time:
if (tile_enabled_flag) {
for (sum = 0, i = 0; i <= 24; i ++) {
if (loop_filter_across_top_tile_boundary_enabled_flag) {
min_vy = 0
} else {
min_vy = TileY [TileId]
}
if (loop_filter_across_bottom_tile_boundary_enabled_flag) {
max_vy = pic_height_in_luma_samples-1
} else {
max_vy = TileY [TileId] + TileHeight [TileId] -1
}
if (loop_filter_across_left_tile_boundary_enabled_flag) {
min_hx = 0
} else {
min_hx = TileX [TileId]
}
if (loop_filter_across_right_tile_boundary_enabled_flag) {
max_hx = pic_width_in_luma_samples-1
} else {
max_hx = TileX [TileId] + TileWidth [TileId] -1
}
hx = Clip3 (min_hx, max_hx, x + i% 5-2)
vy = Clip3 (min_vy, max_vy, y + i / 5-2)
}
sum + = (recPicture [hx] [vy] * alf_coeff [cIdx] [i] + (1 << (coeffBits-1))) >> coeffBits
}
} else {
sum = Clip3 (0, (1 << bitDepth) -1, Σ (recPicture [x + i% 5-2] [y + i / 5-2] * alf_coeff [cIdx] [i] + (1 << ( coeffBits-1))) >> coeffBits)
}
alfPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, sum)
According to the above pseudo code, it is possible to control in more detail whether reference is possible beyond the target tile boundary. When loop_filter_across_top_tile_boundary_enabled_flag is true, the minimum value min_vy that the Y coordinate of the reference pixel can take is set to 0. When false, the minimum value min_vy that can be taken by the Y coordinate of the reference pixel is set to TileY [TileId] which is the upper left Y coordinate of the tile including the target CTU. When loop_filter_across_bottom_tile_boundary_enabled_flag is true, the maximum value max_vy that can be taken by the Y coordinate of the reference pixel is set to pic_height_in_luma_samples-1. In the case of false, the maximum value max_vy that can be taken by the Y coordinate of the reference pixel is set to TileY [TileId] + TileHeight [TileId] -1 which is the lower right Y coordinate of the tile including the target CTU. When loop_filter_across_left_tile_boundary_enabled_flag is true, the minimum value min_hx that can be taken by the X coordinate of the reference pixel is set to 0. If false, the minimum value min_hx that can be taken by the X coordinate of the reference pixel is set to TileX [TileId] that is the upper left X coordinate of the tile including the target CTU. When loop_filter_across_right_tile_boundary_enabled_flag is true, the maximum value max_hx that the X coordinate of the reference pixel can take is set to pic_width_in_luma_samples-1. If false, the maximum value max_hx that can be taken by the X coordinate of the reference pixel is set to TileX [TileId] + TileWidth [TileId] -1, which is the lower right X coordinate of the tile including the target CTU. By clipping the X and Y coordinates using the minimum value set in this way, whether to limit the position of the reference pixel in each of the up, down, left, and right directions within the tile that includes the target CTU is independently determined. You can control.

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

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

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

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

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

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

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

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

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

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

エントロピー符号化部104は、供給元から供給されるシンタックス要素をバイナリデータに変換し、CABAC等のエントロピー符号化方式により符号化データを生成し、出力する。図19に示す例では、シンタックス要素の供給元は、CT情報符号化部1111、CU符号化部1112である。シンタックス要素は、インター予測パラメータ(予測モードpredMode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX)、イントラ予測パラメータ(prev_intra_luma_pred_flag、mpm_idx、rem_selected_mode_flag、rem_selected_mode、rem_non_selected_mode、)、量子化変換係数等である。   The entropy coding unit 104 converts the syntax element supplied from the supply source into binary data, generates coded data by an entropy coding method such as CABAC, and outputs the coded data. In the example shown in FIG. 19, the sources of syntax elements are the CT information encoding unit 1111 and the CU encoding unit 1112. Syntax elements include inter prediction parameters (prediction mode predMode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX), intra prediction parameters (prev_intra_luma_pred_flag, mpm_idx, flag_rem_selected. , Rem_selected_mode, rem_non_selected_mode,), quantized transform coefficients, and the like.

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

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

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

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

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

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

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

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

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

本発明の一態様に係る動画像復号装置は、画像をタイルに分割し、タイルをCTUに分割し、CTU単位に動画像を復号する動画像復号装置であって、タイルの大きさの最小単位を所定の値に設定するヘッダ復号部と、符号化ストリームからCTUを復号するCT情報復号部を備え、上記ヘッダ復号部は、タイルの大きさの最小単位を用いてタイル左上位置とタイルサイズを導出することを特徴とする。   A moving image decoding device according to an aspect of the present invention is a moving image decoding device that divides an image into tiles, divides tiles into CTUs, and decodes moving images in CTU units, and is a minimum unit of tile size. Is provided with a header decoding unit that sets a predetermined value and a CT information decoding unit that decodes the CTU from the encoded stream, and the header decoding unit uses the minimum unit of the tile size to determine the tile upper left position and the tile size. It is characterized by deriving.

本発明の一態様に係る動画像復号装置において、前記所定の値は、最小CTUサイズであ
ることを特徴とする。
In the video decoding device according to one aspect of the present invention, the predetermined value is a minimum CTU size.

本発明の一態様に係る動画像復号装置において、前記所定の値は、最小CTUサイズの整数倍であることを特徴とする。   In the video decoding device according to the aspect of the present invention, the predetermined value is an integral multiple of the minimum CTU size.

本発明の一態様に係る動画像復号装置において、前記所定の値は、8もしくは16であることを特徴とする。   In the video decoding device according to one aspect of the present invention, the predetermined value is 8 or 16.

本発明の一態様に係る動画像復号装置において、前記所定の値は、水平方向は最小CTUサイズの整数倍、垂直方向は8もしくは16であることを特徴とする。   In the video decoding device according to one aspect of the present invention, the predetermined value is an integral multiple of the minimum CTU size in the horizontal direction and 8 or 16 in the vertical direction.

本発明の一態様に係る動画像復号装置において、前記タイルの大きさの最小単位は、最小CTUサイズと、タイルサイズの最小単位と最小CTUサイズとの差分値を用いて導出することを特徴とする。   In the video decoding device according to the aspect of the present invention, the minimum unit of the tile size is derived by using a minimum CTU size and a difference value between the minimum unit of the tile size and the minimum CTU size. To do.

本発明の一態様に係る動画像復号装置において、前記差分値はSPSの符号化データから復号されることを特徴とする。   In the moving image decoding device according to one aspect of the present invention, the difference value is decoded from SPS encoded data.

本発明の一態様に係る動画像復号装置において、前記差分値はPPSの符号化データから復号されることを特徴とする。   In the moving picture decoding device according to one aspect of the present invention, the difference value is decoded from PPS encoded data.

本発明の一態様に係る動画像復号装置において、前記タイルの大きさの最小単位はタイルサイズの最小単位はCTUサイズを超えないことを特徴とする。   In the moving image decoding apparatus according to the aspect of the present invention, the minimum unit of tile size is the minimum unit of tile size that does not exceed the CTU size.

本発明の一態様に係る動画像復号装置において、前記所定の値は、各タイルを独立に処理できる場合は最小CTUサイズ未満の値に設定し、そうでない場合は最小CTUサイズに設定することを特徴とする。   In the video decoding device according to an aspect of the present invention, the predetermined value, if each tile can be processed independently, set to a value less than the minimum CTU size, otherwise set to the minimum CTU size Characterize.

本発明の一態様に係る動画像復号装置において、前記所定の値は、各タイルを独立に処理できる場合は、そうでない場合よりもタイルの最小単位を小さく設定することを特徴とする。   In the moving image decoding apparatus according to an aspect of the present invention, the predetermined value is set such that when each tile can be processed independently, the minimum unit of tile is set to be smaller than that when the tile is not processed.

本発明の一態様に係る動画像復号装置において、前記所定の値は、サブCU、TMVP用の動きベクトル格納単位、差分量子化パラメータを通知する単位のいづれかに合わせて設定することを特徴とする。   In the video decoding device according to the aspect of the present invention, the predetermined value is set according to any one of a sub CU, a motion vector storage unit for TMVP, and a unit for notifying a difference quantization parameter. .

本発明の一態様に係る動画像符号化装置は、画像をタイルに分割し、タイルをCTUに分割し、CTU単位に動画像を符号化する動画像符号化装置において、タイルの大きさの最小単位を所定の値に設定するヘッダ符号化部と、CTUを符号化して符号化ストリームを生成するCT情報符号化部を備え、上記ヘッダ符号化部は、タイルの大きさの最小単位を用いてタイル左上位置とタイルサイズを導出することを特徴とする。   A moving picture coding apparatus according to an aspect of the present invention is a moving picture coding apparatus that divides an image into tiles, divides the tiles into CTUs, and encodes the moving picture in units of CTUs. A header encoding unit that sets a unit to a predetermined value, and a CT information encoding unit that encodes a CTU to generate an encoded stream, and the header encoding unit uses a minimum unit of tile size. The feature is that the upper left position of the tile and the tile size are derived.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

11 動画像符号化装置
31 動画像復号装置
101、308 予測画像生成部
104 エントロビー符号化部(符号化部)
107、305 ループフィルタ
111 パラメータ符号化部
301 エントロピー復号部
302 パラメータ復号部(分割部)
3036 マージ予測パラメータ導出部
30361 マージ候補導出部30361(時間動き予測部)
30362 マージ候補選択部30362
11 Moving Image Encoding Device 31 Moving Image Decoding Devices 101, 308 Predicted Image Generating Unit 104 Entropy Encoding Unit (Encoding Unit)
107, 305 Loop filter 111 Parameter coding unit 301 Entropy decoding unit 302 Parameter decoding unit (division unit)
3036 merge prediction parameter derivation unit 30361 merge candidate derivation unit 30361 (temporal motion prediction unit)
30362 Merge candidate selection unit 30362

Claims (5)

対象ブロックの座標(xPb, yPb)から、時間予測の動きベクトルを参照するための参照位置として右下位置(xBr, yBr)もしくは中心位置(xCtr, yCtr)を導出する時間動き予測部において、対象ブロックの座標(xPb, yPb)がタイル左上を原点とする座標であり、参照位置の(xBr, yBr)もしくは中心位置(xCtr, yCtr)がタイルサイズを超えるか否かを判定し、タイルサイズを超える場合には、時間予測の動きベクトルを参照しないことを特徴とする動画像復号装置。   In the temporal motion prediction unit that derives the lower right position (xBr, yBr) or the center position (xCtr, yCtr) as the reference position for referencing the motion vector of temporal prediction from the coordinates (xPb, yPb) of the target block The block coordinates (xPb, yPb) are coordinates with the tile upper left as the origin, and it is determined whether the reference position (xBr, yBr) or the center position (xCtr, yCtr) exceeds the tile size, and the tile size is A moving image decoding apparatus characterized by not referring to a motion vector for temporal prediction when the number exceeds. 対象ブロックの座標(xPb, yPb)から、時間予測の動きベクトルを参照するための参照位置として右下位置(xBr, yBr)もしくは中心位置(xCtr, yCtr)を導出する時間動き予測部において、対象ブロックの座標(xPb, yPb)がタイル左上を原点とする座標であり、参照位置の(xBr, yBr)もしくは中心位置(xCtr, yCtr)がタイルサイズを超えるか否かを判定し、タイルサイズを超える場合には、時間予測の動きベクトルを参照しないことを特徴とする動画像復号装置。   In the temporal motion prediction unit that derives the lower right position (xBr, yBr) or the center position (xCtr, yCtr) as the reference position for referencing the motion vector of temporal prediction from the coordinates (xPb, yPb) of the target block The block coordinates (xPb, yPb) are coordinates with the tile upper left as the origin, and it is determined whether the reference position (xBr, yBr) or the center position (xCtr, yCtr) exceeds the tile size, and the tile size is A moving image decoding apparatus characterized by not referring to a motion vector for temporal prediction when the number exceeds. SAO処理部において、CTUにおける有効領域の幅が所定の幅より小さい、もしくは、CTUにおける有効領域の高さが所定の高さより小さい場合において、
SAOのCTUパラメータを復号せず、CTUのSAO処理フラグを0に設定し、フィルタ処理を行わない動画像復号装置。
In the SAO processing unit, if the width of the effective area in the CTU is smaller than the predetermined width, or if the height of the effective area in the CTU is smaller than the predetermined height,
A moving image decoding apparatus that does not decode the CTU parameter of SAO, sets the SAO processing flag of CTU to 0, and does not perform filter processing.
ALF処理部において、CTUにおける有効領域の幅が所定の幅より小さい、もしくは、CTUにおける有効領域の高さが、所定の高さより小さい場合において、
ALFのCTUパラメータを復号せず、CTUのALF処理フラグを0に設定し、フィルタ処理を行わない動画像復号装置。
In the ALF processing unit, the width of the effective area in the CTU is smaller than the predetermined width, or the height of the effective area in the CTU is smaller than the predetermined height,
A video decoding device that does not decode the ALF CTU parameter, sets the CTU ALF processing flag to 0, and does not perform filter processing.
ALF処理において、対象画素を処理するために参照する周辺画素が、対象画素が属するタイルと異なるタイルに属することを許可するフラグが無効であった場合、
参照する周辺画素導出時の座標を対称画素が属するタイル内にクリップして、参照する周辺画素を導出する動画像復号装置。
In the ALF processing, when the peripheral pixel that is referred to for processing the target pixel has a flag that allows it to belong to a tile different from the tile to which the target pixel belongs, is invalid,
A moving image decoding apparatus for deriving a peripheral pixel to be referenced by clipping coordinates when deriving a peripheral pixel to be referenced into a tile to which a symmetrical pixel belongs.
JP2018193307A 2018-10-12 2018-10-12 Dynamic image coding device and dynamic image decoding device Pending JP2020061701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018193307A JP2020061701A (en) 2018-10-12 2018-10-12 Dynamic image coding device and dynamic image decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018193307A JP2020061701A (en) 2018-10-12 2018-10-12 Dynamic image coding device and dynamic image decoding device

Publications (1)

Publication Number Publication Date
JP2020061701A true JP2020061701A (en) 2020-04-16

Family

ID=70220404

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018193307A Pending JP2020061701A (en) 2018-10-12 2018-10-12 Dynamic image coding device and dynamic image decoding device

Country Status (1)

Country Link
JP (1) JP2020061701A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953981A (en) * 2020-08-25 2020-11-17 西安万像电子科技有限公司 Encoding method and device, and decoding method and device
CN112422969A (en) * 2020-10-20 2021-02-26 西安万像电子科技有限公司 Image coding and decoding method and device
WO2022016535A1 (en) * 2020-07-24 2022-01-27 深圳市大疆创新科技有限公司 Video coding and decoding method and device
US20220345702A1 (en) * 2019-09-27 2022-10-27 Sk Telecom Co., Ltd. Method and apparatus for acquiring information about sub-units split from picture

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220345702A1 (en) * 2019-09-27 2022-10-27 Sk Telecom Co., Ltd. Method and apparatus for acquiring information about sub-units split from picture
WO2022016535A1 (en) * 2020-07-24 2022-01-27 深圳市大疆创新科技有限公司 Video coding and decoding method and device
CN111953981A (en) * 2020-08-25 2020-11-17 西安万像电子科技有限公司 Encoding method and device, and decoding method and device
CN111953981B (en) * 2020-08-25 2023-11-28 西安万像电子科技有限公司 Encoding method and device, decoding method and device
CN112422969A (en) * 2020-10-20 2021-02-26 西安万像电子科技有限公司 Image coding and decoding method and device

Similar Documents

Publication Publication Date Title
WO2018037853A1 (en) Image decoding apparatus and image coding apparatus
WO2018221368A1 (en) Moving image decoding device, and moving image encoding device
WO2019221072A1 (en) Image encoding device, encoded stream extraction device, and image decoding device
US10136161B2 (en) DMM prediction section, image decoding device, and image coding device
JP7402016B2 (en) Image decoding device and image encoding device
JPWO2018110462A1 (en) Image decoding apparatus and image encoding apparatus
JP2020061701A (en) Dynamic image coding device and dynamic image decoding device
US11889092B2 (en) Video decoding apparatus and video coding apparatus
WO2020116376A1 (en) Moving image decoding device and moving image encoding device
WO2019230904A1 (en) Image decoding device and image encoding device
WO2019159820A1 (en) Moving image encoding device and moving image decoding device
US11652991B2 (en) Video decoding apparatus with picture tile structure
WO2020184366A1 (en) Image decoding device
WO2020067440A1 (en) Moving image coding device and moving image decoding device
JP2020107961A (en) Moving image encoder and moving image decoder
JP2021153213A (en) Dynamic image encoder and dynamic image decoder
JP2021158546A (en) Image decoding device and image encoding device
JP2021034848A (en) Image decoding device
JP7281890B2 (en) Video encoding device and video decoding device
JP2021153214A (en) Dynamic image encoder and dynamic image decoder
JP2021153215A (en) Dynamic image encoder and dynamic image decoder
JP7425568B2 (en) Video decoding device, video encoding device, video decoding method, and video encoding method
JP7444570B2 (en) Video decoding device, video encoding device, video decoding method, and video encoding method
JP7397586B2 (en) Image decoding device and image encoding device
WO2020045275A1 (en) Image decoding device and image encoding device