JP2021057620A - Image filter device, image decoding device, image encoding device, and data structure - Google Patents

Image filter device, image decoding device, image encoding device, and data structure Download PDF

Info

Publication number
JP2021057620A
JP2021057620A JP2018001187A JP2018001187A JP2021057620A JP 2021057620 A JP2021057620 A JP 2021057620A JP 2018001187 A JP2018001187 A JP 2018001187A JP 2018001187 A JP2018001187 A JP 2018001187A JP 2021057620 A JP2021057620 A JP 2021057620A
Authority
JP
Japan
Prior art keywords
band
offset
unit
sao
image
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
JP2018001187A
Other languages
Japanese (ja)
Inventor
知宏 猪飼
Tomohiro Igai
知宏 猪飼
将伸 八杉
Masanobu Yasugi
将伸 八杉
友子 青野
Tomoko Aono
友子 青野
中條 健
Takeshi Nakajo
健 中條
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 JP2018001187A priority Critical patent/JP2021057620A/en
Priority to PCT/JP2019/000256 priority patent/WO2019139012A1/en
Publication of JP2021057620A publication Critical patent/JP2021057620A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Abstract

To provide an image filter device capable of achieving a high filter effect according to the characteristics of the sequence and region.SOLUTION: An adaptive offset filter 60 of a moving image decoding device 1 includes: band classification derivation means that classifies pixel values into one or more bands according to the pixel values in a unit area based on band setting information and derives of the band index indicating the band; offset selection means that selects one of the offsets according to the band index; and filter means that adds the selected offset to the pixel value.SELECTED DRAWING: Figure 12

Description

本発明は、画像のフィルタリングを行う画像フィルタ装置に関する。また、そのような画像フィルタを備えている符号化装置、および、復号装置に関する。また、そのような復号装置によって復号される符号化データのデータ構造に関する。 The present invention relates to an image filter device that filters images. The present invention also relates to a coding device including such an image filter and a decoding device. It also relates to the data structure of the coded data decoded by such a decoding device.

動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置(符号化装置)、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置(復号装置)が用いられている。具体的な動画像符号化方式としては、例えば、HEVCに採用されている方式などが挙げられる。 In order to efficiently transmit or record a moving image, a moving image coding device (encoding device) that generates coded data by encoding the moving image and decoding by decoding the coded data. A moving image decoding device (decoding device) that generates an image is used. Specific examples of the moving image coding method include the method adopted in HEVC.

このような符号化方式において、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる最大符号化単位(LCU:Largest Coding Unit、ツリーブロックとも呼ばれる)、最大符号化単位を分割す
ることにより得られる符号化単位(CU:Coding Unit、符号化ノードとも呼ばれる)、および、符号化単位を分割することにより得られるブロックおよびパーティションからなる階層構造により管理され、多くの場合、ブロックを最小単位として符号化される。
In such a coding method, the image (picture) constituting the moving image is a slice obtained by dividing the image, a maximum coding unit (LCU: Largest Coding Unit, a tree block) obtained by dividing the slice. A hierarchical structure consisting of a coding unit (CU: Coding Unit, also called a coding node) obtained by dividing the maximum coding unit, and blocks and partitions obtained by dividing the coding unit. It is managed by, and is often encoded with a block as the smallest unit.

また、このような符号化方式においては、通常、入力画像を符号化し、復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像と入力画像との差分データが符号化される。また、予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)と呼ばれる方法が知られている。 Further, in such a coding method, a predicted image is usually generated based on a locally decoded image obtained by encoding and decoding the input image, and the difference data between the predicted image and the input image is encoded. Will be done. Further, as a method of generating a prediction image, methods called inter-screen prediction (inter-screen prediction) and in-screen prediction (intra-prediction) are known.

さらに、非特許文献1には、画素分類に応じたオフセットを画素毎に加算する適応的オフセットフィルタ(「適応オフセットフィルタ」「SAO (Sample Adaptive Offset)」とも呼ぶ)が開示されている。 Further, Non-Patent Document 1 discloses an adaptive offset filter (also referred to as "adaptive offset filter" or "SAO (Sample Adaptive Offset)") that adds an offset according to pixel classification for each pixel.

また、特許文献1には、SAOのバンドオフセット(Band Offset:BO)において、値域の
中央付近で細かくクラス分類を行う技術が記載されている。
Further, Patent Document 1 describes a technique for finely classifying the band offset (BO) of SAO near the center of the range.

H.265H.265 特開2013-236358JP 2013-236358

上述した非特許文献1、特許文献1に記載された方法では、シーケンスや色コンポーネントごとに異なる画像の特性が活かされていないという課題がある。 The methods described in Non-Patent Document 1 and Patent Document 1 described above have a problem that different image characteristics are not utilized for each sequence or color component.

特に、非特許文献1では、BOのオフセットの値域の幅の調整ができないこと、また、特許文献1ではBOのオフセットの値域の調整が値域の中央付近に限定されている、という課題がある。また、バンドオフセットの位置を示す情報の符号量が大きくなるという課題がある。 In particular, Non-Patent Document 1 has a problem that the width of the BO offset range cannot be adjusted, and Patent Document 1 has a problem that the adjustment of the BO offset range is limited to the vicinity of the center of the range. Further, there is a problem that the code amount of the information indicating the position of the band offset becomes large.

上記課題を解決するために、本発明に係る画像フィルタ装置は、複数の単位領域から構
成される入力画像の各画素値に、オフセットを加算する画像フィルタ装置であって、上記単位領域内の画素値に応じて当該画素値を、バンド設定情報に基づいて、1つ以上のバンドに分類し、バンドを示すバンドインデックスを導出するバンド分類導出手段とバンドインデックスに応じて前記オフセットの1つを選択するオフセット選択手段と、当該画素値に選択されたオフセットを加算するフィルタ手段を備え、上記バンド分類導出手段は、単位領域の情報に応じてバンド設定情報を設定することを特徴とする。
In order to solve the above problems, the image filter device according to the present invention is an image filter device that adds an offset to each pixel value of an input image composed of a plurality of unit areas, and is a pixel in the unit area. The pixel value is classified into one or more bands based on the band setting information according to the value, and one of the offsets is selected according to the band classification derivation means for deriving the band index indicating the band and the band index. The band classification derivation means is provided with an offset selection means for performing an image and a filter means for adding the selected offset to the pixel value, and the band classification / derivation means sets band setting information according to information in a unit area.

上記バンド分類導出手段は、色コンポーネントに応じてバンド設定情報を設定することを特徴とする
上記画像フィルタ装置手段は、色コンポーネントごとのバンド設定情報をバンド分類導出手段で設定することを特徴とする。
The band classification derivation means is characterized in that band setting information is set according to a color component. The image filter device means is characterized in that band setting information for each color component is set by the band classification derivation means. ..

上記バンド分類導出手段は、単位領域の画素値の少なくとも最大値と最小値、平均値のいずれか一つに応じてバンド設定情報を設定することを特徴とする。 The band classification derivation means is characterized in that band setting information is set according to at least one of at least one of a maximum value, a minimum value, and an average value of pixel values in a unit area.

上記バンド分類導出手段は、単位領域の画素値の最大値、最小値、平均値を、単位領域の下側所定幅の画素と右側所定の幅の画素(すなわち、単位領域の下側所定の画素と右側所定の画素を除く画素)を用いて上記バンド設定情報を導出することを特徴とする。 The band classification derivation means sets the maximum value, the minimum value, and the average value of the pixel values of the unit area to the pixels having the lower predetermined width of the unit area and the pixels having the right side predetermined width (that is, the lower predetermined pixels of the unit area). The band setting information is derived by using (pixels other than the predetermined pixel on the right side).

上記画像フィルタ装置は、既に復号したオフセット情報をコピーする適応オフセット情報コピー手段を備え、さらに、適応オフセット情報コピー手段は、オフセット情報に加え、バンド設定情報を備えることを特徴とする。 The image filter device is provided with adaptive offset information copying means for copying already decoded offset information, and the adaptive offset information copying means is characterized in that it includes band setting information in addition to offset information.

上記バンド設定情報は、バンドの幅、バンドの先頭位置であることを特徴とする。 The band setting information is characterized by being the width of the band and the head position of the band.

上記バンド分類導出手段は、第1のバンドの先頭位置と、第2のバンドの先頭位置に基づいて導出し、上記オフセット選択手段は、上記第1のバンドと第2のバンドの両方もしくはいずれか一方に基づいてオフセットを選択することを特徴とする。 The band classification derivation means derives based on the head position of the first band and the head position of the second band, and the offset selection means is either or both of the first band and the second band. It is characterized in that the offset is selected based on one of them.

上記第1のバンドの先頭位置と、上記のバンドの先頭位置は、バンド幅の半分だけシフトした位置にあることを特徴とする。 The head position of the first band and the head position of the band are shifted by half the bandwidth.

上記バンド分類導出手段は、単位領域の範囲に応じて、第1のバンドを用いるか、第1のバンドと第2のバンドを用いるかを選択することを特徴とする。 The band classification derivation means is characterized in that it selects whether to use the first band or the first band and the second band according to the range of the unit region.

上記適応オフセット情報コピー手段は、オフセット情報に加え、第1のバンドを用いるか、第1のバンドと第2のバンドを用いるかのバンド数選択情報をコピーすることを特徴とする。 The adaptive offset information copying means is characterized in that, in addition to the offset information, band number selection information of whether to use the first band or to use the first band and the second band is copied.

上記画像フィルタ装置は、バンド数をさらに復号することを特徴とする。 The image filter device is characterized in that the number of bands is further decoded.

上記画像フィルタ装置は、オフセット数をさらに復号することを特徴とする。 The image filter device is characterized in that the number of offsets is further decoded.

上記画像フィルタ装置を備える画像復号装置。 An image decoding device including the above image filter device.

上記請画像フィルタ装置を備える画像符号化装置。 An image coding device including the above-mentioned image filter device.

画像復号装置において復号される、予測画像と原画像との差分である予測残差が符号化された符号化データのデータ構造であって、上記予測残差を復号して得られる画素値をバンドに分類するために用いるパラメータであるバンド設定情報を含むことを特徴とする符
号化データのデータ構造。
A data structure of encoded data in which the predicted residual, which is the difference between the predicted image and the original image, is decoded by the image decoding device, and the pixel value obtained by decoding the predicted residual is banded. A data structure of encoded data, characterized in that it contains band setting information, which is a parameter used for classifying into.

以上のように、単位領域の情報に応じてバンド設定情報を設定することによって、シーケンスや領域により適応したフィルタ処理が可能になる効果がある。 As described above, by setting the band setting information according to the information of the unit area, there is an effect that the filter processing more adapted to the sequence or the area becomes possible.

本発明の実施の形態に係る適応オフセットフィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive offset filter which concerns on embodiment of this invention. 本実施形態に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the coded stream which concerns on this embodiment. 実施形態に係る動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus which concerns on embodiment. 実施形態に係る符号化データのシーケンスパラメータセットSPSに含まれるシンタックスを示す図である。It is a figure which shows the syntax included in the sequence parameter set SPS of the coded data which concerns on embodiment. 実施形態における、シンタックスslice_header()を示す図である。It is a figure which shows the syntax slice_header () in an embodiment. 実施形態における、シンタックスcoding_tree_unit()を示す図である。It is a figure which shows the syntax coding_tree_unit () in an embodiment. 実施形態における、シンタックスsao_unit()を示す図である。It is a figure which shows the syntax sao_unit () in an embodiment. 実施形態における、シンタックスsao_offset()を示す図である。It is a figure which shows the syntax sao_offset () in an embodiment. バンドのカバー範囲と画素値分布を示す図である。It is a figure which shows the covering range of a band, and the pixel value distribution. 実オフセットSaoOffsetValを導出するための方法を説明する図である。It is a figure explaining the method for deriving the real offset SaoOffsetVal. 実施形態に係るバンド設定情報とバンドの例を示す図である。It is a figure which shows the band setting information and the example of a band which concerns on embodiment. 実施形態に係るバンド設定情報とバンドの例を示す図である。It is a figure which shows the band setting information and the example of a band which concerns on embodiment. 実施形態に係るバンド設定情報とバンドの例を示す図である。It is a figure which shows the band setting information and the example of a band which concerns on embodiment. 色コンポーネントごとにbandShift値を変化させる場合の例であるThis is an example of changing the bandShift value for each color component. バンド設定情報であるバンド幅情報sao_add_shiftをスライスデータに含める場合のシンタックステーブルを示す。The syntax table when the bandwidth information sao_add_shift, which is the band setting information, is included in the slice data is shown. バンド設定情報であるバンド幅情報sao_add_shiftをCTUデータに含める場合のシンタックステーブルを示す。The syntax table when the bandwidth information sao_add_shift which is the band setting information is included in the CTU data is shown. 実施形態における、NUM_SAO_BO_CLASSESを設定する例を示す図である。It is a figure which shows the example of setting NUM_SAO_BO_CLASSES in the embodiment. 実施形態における、num_sao_bo_classesを含むシンタックスslice_header()を示す図である。It is a figure which shows the syntax slice_header () including num_sao_bo_classes in the embodiment. 実施形態における、sao_offset_numを設定する例を示す図である。It is a figure which shows the example of setting sao_offset_num in the embodiment. 実施形態における、sao_offset_numを含むシンタックスslice_header()を示す図である。It is a figure which shows the syntax slice_header () including sao_offset_num in embodiment. 複数バンドを用いる場合のバンドの先頭位置と、その先頭位置を利用したバンドを説明する図である。It is a figure explaining the head position of a band when a plurality of bands are used, and the band using the head position. 実施形態に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus which concerns on embodiment. 実施形態に係る動画像符号化装置の備える適応オフセットフィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the adaptive offset filter provided in the moving image coding apparatus which concerns on embodiment. 動画像復号装置および動画像符号化装置が、動画像の送受信に利用できることを説明するための図であり、(a)は、動画像符号化装置を搭載した送信装置の構成を示したブロック図であり、(b)は、動画像復号装置を搭載した受信装置の構成を示したブロック図である。It is a figure for demonstrating that a moving image decoding apparatus and a moving image coding apparatus can be used for transmission / reception of a moving image, and (a) is a block diagram which showed the structure of the transmitting apparatus equipped with the moving image coding apparatus. (B) is a block diagram showing a configuration of a receiving device equipped with a moving image decoding device. 動画像復号装置および動画像符号化装置が、動画像の記録および再生に利用できることを説明するための図であり、(a)は、動画像符号化装置2を搭載した記録装置の構成を示したブロック図であり、(b)は、動画像復号装置を搭載した再生装置の構成を示したブロックである。It is a figure for demonstrating that a moving image decoding apparatus and a moving image coding apparatus can be used for recording and reproducing a moving image, and (a) shows the structure of the recording apparatus equipped with the moving image coding apparatus 2. FIG. 3B is a block diagram showing a configuration of a playback device equipped with a moving image decoding device.

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

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

(符号化ビデオシーケンス)
符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために動画像復号
装置31が参照するデータの集合が規定されている。シーケンスSEQは、図2の(a)に示す
ように、ビデオパラメータセットVPS(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。
(Coded video sequence)
The coded video sequence defines a set of data that the moving image decoding device 31 refers to in order to decode the sequence SEQ to be processed. As shown in FIG. 2A, the sequence SEQ includes a video parameter set VPS (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and Includes Supplemental Enhancement Information (SEI). Here, the value shown after # indicates the layer ID.

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

シーケンスパラメータセットSPSでは、対象シーケンスを復号するために動画像復号装
置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れ
かを選択する。
The sequence parameter set SPS defines a set of coding parameters that the moving image decoding device 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, select one of multiple SPSs from 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 image decoding device 31 refers to in order to decode each picture in the target sequence. For example, a reference value of the quantization width used for decoding a picture (pic_init_qp_minus26) and a flag indicating the application of weighted prediction (weighted_pred_flag) are included. There may be a plurality of PPSs.
In that case, one of a plurality of PPSs is selected from each slice header in the target sequence.

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

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

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

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

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

また、スライスヘッダSHには、動画像復号装置31の備える適応オフセットフィルタによって参照されるSAOパラメータSAOPが含まれている。SAOパラメータSAOPの詳細については後述する。 Further, the slice header SH includes a SAO parameter SAOP referred to by an adaptive offset filter included in the moving image decoding device 31. The details of the SAO parameter SAOP will be described later.

なお、スライスヘッダSHには、上記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。 The slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the coded video sequence.

スライスデータでは、処理対象のスライスデータSDATAを復号するために動画像復号装
置31が参照するデータの集合が規定されている。スライスデータSDATAは、符号化ツリ
ーユニット(CTU:Coding Tree Unit、CTUブロック)を含んでいる。
The slice data defines a set of data referred to by the moving image decoding device 31 in order to decode the slice data SDATA to be processed. The slice data SDATA includes a coding tree unit (CTU: Coding Tree Unit, CTU block).

(符号化ツリーユニット)
図2の(d)には、符号化ツリーユニットCTUを復号するために動画像復号装置31が参照するデータの集合が規定されている。CTUは、図2の(d)が示すように、CTUヘッダ、およ
び、符号化ユニット(CU:Coding Unit、CUブロック)CUを含んでいる。
(Coded tree unit)
FIG. 2D defines a set of data referred to by the moving image decoding device 31 in order to decode the coded tree unit CTU. As shown in (d) of FIG. 2, the CTU includes a CTU header and a coding unit (CU: Coding Unit, CU block) CU.

CTUヘッダには、対象CTUの復号方法を決定するために動画像復号装置31が参照する符号化パラメータが含まれる。具体的には、図2の(d)に示すように、対象CTUの各CUへ
の分割パターンを指定する分割情報SP_CU、量子化ステップの大きさを指定する量子化パ
ラメータ差分Δqp(qp_delta)、および、適応オフセットフィルタによって参照されるSAOパラメータSAOPが含まれる。
The CTU header contains coding parameters referenced by the moving image decoding device 31 to determine the decoding method of the target CTU. Specifically, as shown in FIG. 2D, the division information SP_CU that specifies the division pattern of the target CTU to each CU, the quantization parameter difference Δqp (qp_delta) that specifies the size of the quantization step, And the SAO parameter SAOP referenced by the adaptive offset filter is included.

ツリーブロック分割情報SP_CUは、CTUを分割するための符号化ツリーを表す情報であり、具体的には、対象CTUに含まれる各CUの形状、サイズ、および、対象CTU内での位置を指定する情報である。 Tree block division information SP_CU is information representing a coded tree for dividing a CTU. Specifically, the shape and size of each CU included in the target CTU and its position within the target CTU are specified. Information.

また、量子化パラメータ差分Δqpは、対象ツリーブロックにおける量子化パラメータqpと、当該対象CTUの直前に符号化されたCTUにおける量子化パラメータqp’との差分qp-qp
’である。
The quantization parameter difference Δqp is the difference qp-qp between the quantization parameter qp in the target tree block and the quantization parameter qp'in the CTU encoded immediately before the target CTU.
'.

また、SAOパラメータSAOPは、動画像復号装置31の備える適応オフセットフィルタによって参照されるパラメータである。SAOパラメータSAOPの詳細については後述する。 Further, the SAO parameter SAOP is a parameter referred to by the adaptive offset filter included in the moving image decoding device 31. The details of the SAO parameter SAOP will be described later.

図2の(e)には、処理対象の符号化ツリーユニットを復号するために動画像復号装置3
1が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割(QT分割)または2分木分割(BT分割)により符号化処理の基本的な単位である符号化ユニット(CU:Coding Unit)に分割される。再帰的な4分木分割または2分木分割により得られる木構造を符号化ツリー(CT:Coding Tree)、木構造のノードのことを符号化ノ
ード(CN:Coding Node)と称する。4分木及び2分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。
In FIG. 2 (e), the moving image decoding device 3 is used to decode the coded tree unit to be processed.
A set of data referenced by 1 is specified. The coding tree unit is divided into a coding unit (CU: Coding Unit), which is a basic unit of coding processing, by recursive quadtree division (QT division) or binary tree division (BT division). .. The tree structure obtained by recursive quadtree division or binary tree division is called a coding tree (CT: Coding Tree), and the node of the tree structure is called a coding node (CN: Coding Node). The intermediate node of the quadtree and the binary tree is a coding node, and the coding tree unit itself is also defined as the highest-level coding node.

CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(cu_split_flag)、及
びBT分割の分割方法を示すBT分割モード(split_bt_mode)を含む。cu_split_flag及び/又はsplit_bt_modeは符号化ノードCNごとに伝送される。cu_split_flagが1の場合には、符号化ノードCNは4つの符号化ノードCNに分割される。cu_split_flagが0の時、split_bt_modeが1の場合には、符号化ノードCNは2つの符号化ノードCNに水平分割され、split_bt_modeが2の場合には、符号化ノードCNは2つの符号化ノードCNに垂直分割され、split_bt_modeが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニットCUをノードとして持つ。符号化ユニットCUは符号化ノードの末端ノード(リーフノード)であり、これ以上分割されない。
The CT includes, as CT information, a QT division flag (cu_split_flag) indicating whether or not to perform QT division, and a BT division mode (split_bt_mode) indicating a division method of BT division. cu_split_flag and / or split_bt_mode is transmitted for each coding node CN. When cu_split_flag is 1, the coding node CN is divided into four coding node CNs. When cu_split_flag is 0 and split_bt_mode is 1, the coding node CN is horizontally divided into two coding nodes CN, and when split_bt_mode is 2, the coding node CN becomes two coding nodes CN. When it is vertically divided and split_bt_mode is 0, the coding node CN is not divided and has one coding unit CU as a node. The coding unit CU is a terminal node (leaf node) of the coding node and is not further divided.

また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、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 size of the coding tree unit CTU is 64x64 pixels, the size of the coding unit 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, It can take either 4x8 pixels or 4x4 pixels.

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

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

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

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

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

また、インター予測の場合、分割方法は、符号化データのPU分割モード(part_mode)
により符号化され、2Nx2N(符号化ユニットと同一サイズ)、2NxN、2NxnU、2NxnD、Nx2N
、nLx2N、nRx2N、および、NxNなどがある。なお、2NxN、Nx2Nは1:1の対称分割を示し、
2NxnU、2NxnDおよびnLx2N、nRx2Nは、1:3、3:1の非対称分割を示す。CUに含まれるPUを順
にPU0、PU1、PU2、PU3と表現する。
In the case of inter-prediction, the division method is the PU division mode (part_mode) of the coded data.
2Nx2N (same size as the coding unit), 2NxN, 2NxnU, 2NxnD, Nx2N
, NLx2N, nRx2N, and NxN. Note that 2NxN and Nx2N show a 1: 1 symmetric division.
2NxnU, 2NxnD and nLx2N, nRx2N show 1: 3, 3: 1 asymmetric division. The PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in that order.

また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットTUに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。 Further, in the conversion tree, the coding unit is divided into one or a plurality of conversion units TU, and the position and size of each conversion unit are defined. In other words, the conversion unit is one or more non-overlapping regions that make up the coding unit. The conversion tree also includes one or more conversion units obtained from the above divisions.

変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。 There are two types of division in the conversion tree: one that allocates an area of the same size as the coding unit as the conversion unit, and one that recursively divides into quadtrees as in the above-mentioned division of CU.

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

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

符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスref_idx_lX(refIdxLX)、予測ベクトルインデックスmvp_lX_idx、差分ベクトルmvdLXがある。 The syntax elements for deriving the inter-prediction parameters contained in the coded data include, for example, PU split mode part_mode, merge flag merge_flag, merge index merge_idx, inter-prediction identifier inter_pred_idc, reference picture index ref_idx_lX (refIdxLX), prediction vector. It has an index mvp_lX_idx and a difference vector mvdLX.

(シーケンスパラメータセットSPS)
図4は、本実施形態に係る符号化データのシーケンスパラメータセットSPS(図4においてseq_parameter_set_rbsp()と表記)に含まれるシンタックス要素の一部を示す。
(Sequence parameter set SPS)
FIG. 4 shows a part of the syntax elements included in the sequence parameter set SPS (denoted as seq_parameter_set_rbsp () in FIG. 4) of the coded data according to the present embodiment.

profile_idc、level_idcはそれぞれビットストリームが適合するプロファイルとレベルを示す。seq_parameter_set_idは、パラメータセットの識別子を示す。chroma_format_idcは、対象シーケンスのカラーフォーマットを示す。pic_width_in_luma_samplesとpic_height_in_luma_samplesはそれぞれ対象シーケンスに含まれるピクチャサイズの輝度画素単位での縦または横の長さを示す。sample_adaptive_offset_enabled_flagは、対象シーケ
ンスの復号時に適応オフセットフィルタを適用するか否かを示す。adaptive_loop_filter_enabled_flagは、対象シーケンスの復号時に適応フィルタ(ALF:Adaptive Loop Filter)を適用するか否かを示す。
profile_idc and level_idc indicate the profile and level to which the bitstream fits, respectively. seq_parameter_set_id indicates the identifier of the parameter set. chroma_format_idc indicates the color format of the target sequence. pic_width_in_luma_samples and pic_height_in_luma_samples indicate the vertical or horizontal length of the picture size included in the target sequence in units of luminance pixels, respectively. sample_adaptive_offset_enabled_flag indicates whether to apply the adaptive offset filter when decoding the target sequence. Adaptive_loop_filter_enabled_flag indicates whether to apply an adaptive filter (ALF) when decoding the target sequence.

(SHSAOパラメータSAOP_S)
図5は、本実施形態に係る符号化データのスライスヘッダSH(図5においてslice_header()と表記)の一部として含まれる、SHSAOパラメータSAOP_Sのシンタックス要素を示す図である。SHSAOパラメータSAOP_Sは、概略的には、適応オフセットフィルタ処理のパラメータのオンオフ等を示す情報であり、slice_sao_luma_flagが
1の場合には輝度(Y: 色コンポーネントcIdx==0)に対し、適応オフセットフィルタをオ
ン、0ならオフとし、slice_sao_chroma_flagが1の場合には色差(Cb: 色コンポーネン
トcIdx==1、及びCr: 色コンポーネントcIdx == 2)に対し、適応オフセットフィルタをオン、0ならオフとする。なお、各CTUに対して適用する適応オフセットフィルタのパラメ
ータCTUSAOパラメータSAOP_Cと呼ぶ。
(SHSAO parameter SAOP_S)
FIG. 5 is a diagram showing a syntax element of the SHSAO parameter SAOP_S included as a part of the slice header SH (denoted as slice_header () in FIG. 5) of the coded data according to the present embodiment. The SHSAO parameter SAOP_S is information indicating on / off of the parameters of the adaptive offset filter processing, and when slice_sao_luma_flag is 1, the adaptive offset filter is applied to the luminance (Y: color component cIdx == 0). If it is on or 0, it is turned off. If slice_sao_chroma_flag is 1, the adaptive offset filter is turned on for the color difference (Cb: color component cIdx == 1 and Cr: color component cIdx == 2), and if it is 0, it is turned off. It is called the parameter CTUSAO parameter SAOP_C of the adaptive offset filter applied to each CTU.

(CTUSAOパラメータSAOP_C)
図6は、本実施形態に係る符号化データのCTUデータ(図6においてcoding_tree_unit()と表記)の一部として含まれる、CTUSAOパラメータSAOP_Cの各シンタックス要素を示す図である。CTUSAOパラメータSAOP_Cは、概略的には、CTUSAOユニット情報(sao_unit())およびCTUSAOオフセット情報(sao_offset())をシンタックス要素として含む。
(CTUSAO parameter SAOP_C)
FIG. 6 is a diagram showing each syntax element of the CTUSAO parameter SAOP_C included as a part of CTU data (denoted as coding_tree_unit () in FIG. 6) of the coded data according to the present embodiment. The CTUSAO parameter SAOP_C generally includes CTUSAO unit information (sao_unit ()) and CTUSAO offset information (sao_offset ()) as syntax elements.

(CTUSAOユニット)
図7は、本実施形態に係る符号化データのCTUSAOユニット(図7においてsao_unit()と表記)のシンタックスを示す図である。CTUSAOユニットはSAOの処理単位を表し、1つ以上の符号化ユニットCUに関連付けられるシンタックスであり、対応するツリーユニットの符号化データの付近に配置される。CTUSAOユニットが処理対象とする画像上の領域は、対応するCTUが示す領域となる。CTUSAOユニットは、概略的には、CTUSAOオフセット情報
(sao_offset())、および、CTUSAOオフセット情報のマージ制御情報(sao_merge_left_flag, sao_merge_up_flag)をシンタックス要素として含む。sao_merge_left_flagは、対
象CTUのCTUSAOオフセット情報を、対象CTUの左方隣接CTUから複製するか否かを示すフラ
グである。sao_merge_up_flagは、対象CTUのCTUSAOオフセット情報を、対象CTUの上方隣
接CTUから複製するか否かを示すフラグである。
(CTUSAO unit)
FIG. 7 is a diagram showing the syntax of the CTUSAO unit (denoted as sao_unit () in FIG. 7) of the coded data according to the present embodiment. The CTUSAO unit represents a processing unit of SAO, is a syntax associated with one or more coding units CU, and is located near the coding data of the corresponding tree unit. The area on the image that the CTUSAO unit processes is the area indicated by the corresponding CTU. The CTUSAO unit generally includes CTUSAO offset information (sao_offset ()) and CTUSAO offset information merge control information (sao_merge_left_flag, sao_merge_up_flag) as syntax elements. sao_merge_left_flag is a flag indicating whether to duplicate the CTUSAO offset information of the target CTU from the left adjacent CTU of the target CTU. sao_merge_up_flag is a flag indicating whether to duplicate the CTUSAO offset information of the target CTU from the CTU above the target CTU.

(CTUSAOオフセット情報)
図8は、従来技術における符号化データのCTUSAOオフセット情報(図8においてsao_offset()と表記)のシンタックスを示す図である。CTUSAOオフセット情報は、シンタックス要素として、オフセットタイプを示すインデックス(オフセットタイプ、sao_type_idx)、画素値域内でオフセットを適用するバンドの位置を示すインデックス(バンドオフセット位置、sao_band_position)、オフセットの値(sao_offset)を含む。sao_offsetは、
オフセットの絶対値sao_offset_absとオフセットの符号sao_offset_signからなる。sao_band_positionは、SAOのタイプがバンドオフセット(BO)である場合に用いられる。なお、符号化データ中のオフセットの値は、量子化された値や、線形予測等の予測値を用いてオフセット値を導出する予測残差として符号化されていても良い。sao_type_idxとsao_offsetについては後述する。
(CTUSAO offset information)
FIG. 8 is a diagram showing the syntax of CTUSAO offset information (denoted as sao_offset () in FIG. 8) of coded data in the prior art. CTUSAO offset information includes an index indicating the offset type (offset type, sao_type_idx), an index indicating the position of the band to which the offset is applied within the pixel value range (band offset position, sao_band_position), and an offset value (sao_offset) as syntax elements. including. sao_offset is
It consists of the absolute value of the offset, sao_offset_abs, and the sign of the offset, sao_offset_sign. sao_band_position is used when the type of SAO is band offset (BO). The offset value in the coded data may be encoded as a predicted residual for deriving an offset value using a quantized value or a predicted value such as linear prediction. sao_type_idx and sao_offset will be described later.

なお、図4〜図8に示したDescriptor(記述子)ue(v)は、この記述子に関連付けられ
たシンタックスは符号なしの数値であり、値が可変長符号化されることを示している。se(v)は、この記述子に関連付けられたシンタックスは符号付きの数値であり、符号と絶対
値に分けて可変長符号化されることを示している。ae(v)は、この記述子に関連づけられ
たシンタックスが算術符号を用いて可変長符号化されることを示している。u(n)は、この記述子に関連付けられたシンタックスは符号なしの数値であり、nビットの固定長符号化
が用いられることを示している。f(n)は、固定値のビットパターンが用いられることを示している。
The Descriptor ue (v) shown in FIGS. 4 to 8 indicates that the syntax associated with this descriptor is an unsigned numerical value, and the value is variable-length coded. There is. se (v) indicates that the syntax associated with this descriptor is a signed number, which is variable-length coded separately for the sign and the absolute value. ae (v) shows that the syntax associated with this descriptor is variable-length coded using arithmetic coding. u (n) indicates that the syntax associated with this descriptor is an unsigned number and that n-bit fixed-length coding is used. f (n) indicates that a fixed value bit pattern is used.

次に、オフセットタイプsao_type_idxとオフセットsao_offsetについて、さらに詳細に説明する。 Next, the offset type sao_type_idx and the offset sao_offset will be described in more detail.

(sao_type_idx)
sao_type_idxは、適応オフセットフィルタのタイプを表す識別子である。sao_type_idx
は、カラー成分毎に、所定の単位(例えばCTU)に対して割り当てられる。したがって、
所定の単位の各々におけるタイプの値は、sao_type_idx[component][rx][ry]と添字を用
いて表される。添字component(cIdx)は輝度、色差Cr、色差Cbのいずれかを示すイン
デックスであり、rxおよびryはそれぞれ、対象となる所定の単位(例えばSAOユニットあるいはCTU)のxおよびy座標を示す。本実施形態では、sao_type_idx[component][rx][ry]を、単にsao_type_idxやオフセットタイプと呼称することもある。単にsao_type_idxと呼称する場合においても、必要な個々の値はsao_type_idx[component][rx][ry]として参
照することが可能である。
(Sao_type_idx)
sao_type_idx is an identifier that represents the type of adaptive offset filter. sao_type_idx
Is assigned to a predetermined unit (for example, CTU) for each color component. Therefore,
The type value in each of the given units is represented using sao_type_idx [component] [rx] [ry] and the subscript. The subscript component (cIdx) is an index indicating any of luminance, color difference Cr, and color difference Cb, and rx and ry indicate the x and y coordinates of a predetermined unit (for example, SAO unit or CTU) of interest, respectively. In this embodiment, sao_type_idx [component] [rx] [ry] may be simply referred to as sao_type_idx or offset type. Even if it is simply called sao_type_idx, the required individual values can be referred to as sao_type_idx [component] [rx] [ry].

オフセットタイプには大きく分けてエッジオフセット処理(EO)とバンドオフセット処理(BO)と呼ばれる2種類がある。エッジオフセット処理とは、処理対象画素の画素値とその周辺画素の画素値との差分に応じて、当該処理対象画素の画素値に複数のオフセットの何れかを加算する処理のことをいう。また、バンドオフセット処理とは、処理対象の各画素の値に応じて、当該処理対象画素の画素値に複数のオフセットの何れかを加算する処理のことをいう。 The offset type is roughly divided into two types called edge offset processing (EO) and band offset processing (BO). The edge offset process is a process of adding any of a plurality of offsets to the pixel value of the pixel to be processed according to the difference between the pixel value of the pixel to be processed and the pixel value of the peripheral pixels thereof. Further, the band offset process refers to a process of adding any of a plurality of offsets to the pixel value of the pixel to be processed according to the value of each pixel to be processed.

本実施形態において、sao_type_idxは、0から5までの整数値をとり、オフセットフィルタ前画像(デブロック済復号画像P_DBもしくは局所復号画像P)に対して、どのようなフィルタ処理を行うか、あるいはフィルタ処理を行わないかを示す。具体的には以下の通りである。
・sao_type_idx=0は、対象CTUにおけるオフセットフィルタ前画像に対して、オフセッ
トフィルタ処理を行わないことを示す。
・sao_type_idx=1〜4は、対象CTUにおけるオフセットフィルタ前画像に対して、エッ
ジオフセット処理(EO)を行うことを示す。
・sao_type_idx=5は、対象CTUにおけるオフセットフィルタ前画像に対して、バンドオ
フセット処理(BO)を行うことを示す。
In the present embodiment, sao_type_idx takes an integer value from 0 to 5, and what kind of filter processing is performed on the image before the offset filter (deblocked decoded image P_DB or locally decoded image P), or a filter. Indicates whether to perform processing. Specifically, it is as follows.
-Sao_type_idx = 0 indicates that the offset filter processing is not performed on the image before the offset filter in the target CTU.
-Sao_type_idx = 1 to 4 indicates that edge offset processing (EO) is performed on the image before the offset filter in the target CTU.
-Sao_type_idx = 5 indicates that band offset processing (BO) is performed on the image before the offset filter in the target CTU.

なお、エッジオフセットおよびバンドオフセットに対し、上記で説明した以外の数のオフセットタイプが用いられる場合がある。オフセットタイプの個数が本実施形態と異なる場合には、sao_type_idxの値の範囲は、オフセットタイプの総数に応じて変化する。たとえば、オフセットタイプの総数がオフセット処理をしない場合を含めて4個である場合には、sao_type_idxは0から3までの整数値をとる。 Note that a number of offset types other than those described above may be used for edge offset and band offset. When the number of offset types is different from that of the present embodiment, the range of values of sao_type_idx changes according to the total number of offset types. For example, if the total number of offset types is 4, including the case where offset processing is not performed, sao_type_idx takes an integer value from 0 to 3.

また、バンドオフセット処理を行う場合は、オフセット処理を行う画素値帯の左端位置を指定するsao_band_positionが符号化される。 When band offset processing is performed, sao_band_position that specifies the left end position of the pixel value band to be offset processing is encoded.

(SaoOffsetVal)
sao_offset_abs[component][rx][ry][i]とsao_offset_sign[component][rx][ry][i]は
、本実施形態に係る適応オフセットフィルタ処理において、対象ツリーブロックに含まれる各画素に加算されるオフセットの値SaoOffsetVal[component][rx][ry][i]を導出するために用いられるパラメータである。本実施形態では、sao_offset_abs [component][rx][ry][i]、sao_offset_sign[component][rx][ry][i]のことを単にsao_offset_abs、sao_offset_signあるいはオフセット値と呼称することもある。単にsao_offset_abs、sao_offset_signと呼称する場合においても、必要な個々の値はsao_offset[component][rx][ry][i]とsao_offset_sign[component][rx][ry][i]として参照することが可能である。
(SaoOffsetVal)
sao_offset_abs [component] [rx] [ry] [i] and sao_offset_sign [component] [rx] [ry] [i] are added to each pixel included in the target tree block in the adaptive offset filter processing according to the present embodiment. Offset value to be SaoOffsetVal [component] [rx] [ry] [i] is a parameter used to derive. In this embodiment, sao_offset_abs [component] [rx] [ry] [i], sao_offset_sign [component] [rx] [ry] [i] may be simply referred to as sao_offset_abs, sao_offset_sign or offset value. Even when simply called sao_offset_abs and sao_offset_sign, the required individual values can be referred to as sao_offset [component] [rx] [ry] [i] and sao_offset_sign [component] [rx] [ry] [i]. Is.

sao_offset_abs[component][rx][ry][i]とsao_offset_sign[component][rx][ry][i]は
、上述の引数component、rx、ryに加えて、インデックスiによって指定される。ここで
、インデックスiは、オフセットに対応するクラス(参照する画素配列の候補)を指定するためのインデックスである。インデックスiは、適用するオフセットタイプに属するク
ラスがN個であれば、0〜N-1の値をとる。
sao_offset_abs [component] [rx] [ry] [i] and sao_offset_sign [component] [rx] [ry] [i] are specified by the index i in addition to the above arguments component, rx, ry. Here, the index i is an index for designating a class (candidate for a pixel array to be referred to) corresponding to the offset. The index i takes a value of 0 to N-1 if there are N classes belonging to the offset type to be applied.

なお、本実施形態における適応オフセットフィルタの処理では、オフセットの絶対値sao_offset_absと符号sao_offset_signを符号化データに含め、動画像復号装置31は、sao_offset_absとsao_offset_signの値から実際に用いられるオフセット値SaoOffsetVal(実オフセットとも呼ぶ)を導出して用いる。 In the processing of the adaptive offset filter in the present embodiment, the absolute value of the offset sao_offset_abs and the sign sao_offset_sign are included in the coded data, and the moving image decoding device 31 includes the offset value SaoOffsetVal (actually) actually used from the values of sao_offset_abs and sao_offset_sign. (Also called offset) is derived and used.

SaoOffsetVal[cIdx][rx][ry][i+1] = (1-2*sao_offset_sign[cIdx][rx][ry][i]) * sao_offset_abs[cIdx][rx][ry][i] << log2OffsetScale
ここでlog2OffsetScaleは、オフセットを量子化する場合に用いる量子化パラメータで
通常0, 1, 2等の値を用いる。
SaoOffsetVal [cIdx] [rx] [ry] [i + 1] = (1-2 * sao_offset_sign [cIdx] [rx] [ry] [i]) * sao_offset_abs [cIdx] [rx] [ry] [i] <<log2OffsetScale
Here, log2OffsetScale is a quantization parameter used when quantizationing an offset, and a value such as 0, 1, 2 is usually used.

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

次に、sao_offsetの値の範囲について説明する。 Next, the range of values of sao_offset will be described.

オフセットタイプsao_type_idxが5でない場合、すなわちEOのオフセットsao_offsetにおいては、値域は、
0 から (1<<(Min(bitDepth,bitDepthTh)-bitDepthD))-1
である。ここで、bitDepthはオフセット適用対象となる画素値のビット深度を表す値、bitDepthThはオフセット値を量子化する下限のビット深度、bitDepthDはオフセット値の値
域のビット数を調整する値である。また、<<は左シフト、Min()は引数のうち最小のもの
を選択する関数を表す。
If the offset type sao_type_idx is not 5, that is, in the EO offset sao_offset, the range is
From 0 to (1 << (Min (bitDepth, bitDepthTh)-bitDepthD))-1
Is. Here, bitDepth is a value representing the bit depth of the pixel value to which the offset is applied, bitDepthTh is the lower limit bit depth for quantizing the offset value, and bitDepthD is a value for adjusting the number of bits in the offset value range. Also, << represents a left shift, and Min () represents a function that selects the smallest argument.

一方、オフセットタイプsao_type_idxが5である場合、すなわちバンドオフセットのオフセットsao_offsetにおいては、値域は、
-(1<<(Min(bitDepth,bitDepthTh)-bitDepthD)) から (1<<(Min(bitDepth,bitDepthTh)-bitDepthD)-1
である。以上から、例えば、bitDepth=8、bitDepthTh=10、bitDepthD=5 である場合、オ
フセットsao_offsetの値域は、エッジオフセットの場合は0から7となり、バンドオフセットの場合は-7から7となる。
On the other hand, when the offset type sao_type_idx is 5, that is, in the band offset offset sao_offset, the range is.
-(1 << (Min (bitDepth, bitDepthTh) -bitDepthD)) to (1 << (Min (bitDepth, bitDepthTh) -bitDepthD) -1
Is. From the above, for example, when bitDepth = 8, bitDepthTh = 10, and bitDepthD = 5, the range of the offset sao_offset is 0 to 7 in the case of edge offset and -7 to 7 in the case of band offset.

(動画像復号装置31)
図4に本発明の動画像復号装置(画像復号装置)31を示す。
動画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装
置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312を含んで
構成される。
(Video decoding device 31)
FIG. 4 shows the moving image decoding device (image decoding device) 31 of the present invention.
The moving image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, and a prediction image generation unit (prediction image generation device) 308. It is composed of an inverse quantization / inverse conversion unit 311 and an addition unit 312.

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

また、ループフィルタ305は、デブロッキングフィルタ3051、適応オフセット(SAO)3052、適応ループフィルタ(ALF)3053の少なくともいずれかを含む。 The loop filter 305 also includes at least one of a deblocking filter 3051, an adaptive offset (SAO) 3052, and an adaptive loop filter (ALF) 3053.

また、以降では処理の単位としてCTU、CU、PU、TUを使用した例を記載するが、この例
に限らず、TUあるいはPU単位の代わりにCU単位で処理をしてもよい。あるいはCTU、CU、P
U、TUをブロックと読み替え、ブロック単位の処理としてもよい。
In the following, an example in which CTU, CU, PU, and TU are used as the processing unit will be described, but the present invention is not limited to this example, and processing may be performed in CU units instead of TU or PU units. Or CTU, CU, P
U and TU may be read as blocks and processed in block units.

エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロ
ピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測パラメータおよび、差分画像を生成するための残差情報などがある。
The entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, separates and decodes each code (syntax element). The separated codes include prediction parameters for generating a prediction image, residual information for generating a difference image, and the like.

エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。エントロピー復号部301は、量子化変換係数を逆量子化・逆変換部311に出力する。この量子化変換係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)、KLT(Karyhnen Loeve Transform、カルーネンレーベ変換)等の周波数変換を行い量子化して得
られる係数である。また、エントロピー復号部301は、符号化ストリームからSAOパラ
メータSAOPを復号し、それらを適応オフセット3052に供給する。SAOパラメータSAOPは、少なくとも、オフセット情報を含む。
The entropy decoding unit 301 outputs a part of the separated codes to the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantization conversion coefficient to the inverse quantization / inverse conversion unit 311. This quantization transform coefficient is used for the residual signal in the coding process, such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), and KLT (Karyhnen Loeve Transform). ) Etc. is a coefficient obtained by performing frequency conversion and quantization. In addition, the entropy decoding unit 301 decodes the SAO parameter SAOP from the coded stream and supplies them to the adaptive offset 3052. The SAO parameter SAOP contains at least offset information.

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

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

ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。ループフィルタ305の詳細は後述する。 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. Details of the loop filter 305 will be described later.

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

予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニッ
ト(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。
The prediction parameter memory 307 stores the prediction parameters at predetermined positions for each picture and prediction unit (or subblock, fixed size block, pixel) to be decoded.

予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測
画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、入力された予測パラメータと読み出し
た参照ピクチャ(参照ピクチャブロック)を用いてPU(ブロック)もしくはサブブロックの予測画像を生成し、加算部312に出力する。
The prediction mode predMode input from the entropy decoding unit 301 is input to the prediction image generation unit 308, and the prediction parameters are input from the prediction parameter decoding unit 302. Further, the prediction image generation unit 308 reads the reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of a PU (block) or a subblock using the input prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode, and the addition unit. Output to 312.

予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は
、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出し
た参照ピクチャ(参照ピクチャブロック)を用いてインター予測によりブロックもしくは
サブブロックの予測画像を生成する。
When the prediction mode predMode indicates the inter-prediction mode, the inter-prediction image generation unit 309 blocks or blocks by inter-prediction using the inter-prediction parameter input from the inter-prediction parameter decoding unit 303 and the read reference picture (reference picture block). Generate a predicted image of the subblock.

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

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

加算部312は、インター予測画像生成部309または予測画像生成部308から入力されたブ
ロックの予測画像と逆量子化・逆変換部311から入力された残差信号を画素毎に加算して
、ブロックの復号画像を生成する。加算部312は、生成したブロックの復号画像をループ
フィルタ305に出力する。
The addition unit 312 adds the prediction image of the block input from the inter-prediction image generation unit 309 or the prediction image generation unit 308 and the residual signal input from the inverse quantization / inverse conversion unit 311 for each pixel to block. Generate a decoded image of. The addition unit 312 outputs the decoded image of the generated block to the loop filter 305.

ループフィルタ305において、デブロッキングフィルタ3051は、局所復号画像Pにおけ
るブロック境界、またはCU境界を介して互いに隣接する画素の画素値の差が予め定められた範囲内である場合にはブロック歪みが存在すると判定する。そして、局所復号画像Pにおける当該ブロック境界、または当該CU境界に対してデブロッキング処理を施すことによって、当該ブロック境界、または当該CU境界付近の画像の平滑化を行う。デブロッキングフィルタ3051によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBである。適応オフセットフィルタ3052には、局所復号画像P、もしくは、デブロック済復号画像P_DBが、出力される。適応オフセットフィルタ3052の入力は、デブロッキングフィルタがオンの場合には、デブロック済復号画像P_DB、デブロッキングフィルタがオフの場合には、局所復号画像Pとなる。
In the loop filter 305, the deblocking filter 3051 has block distortion when the difference between the pixel values of the pixels adjacent to each other via the block boundary in the locally decoded image P or the CU boundary is within a predetermined range. Then it is determined. Then, by performing deblocking processing on the block boundary or the CU boundary in the locally decoded image P, the image in the vicinity of the block boundary or the CU boundary is smoothed. The image subjected to the deblocking process by the deblocking filter 3051 is the deblocked decoded image P_DB. The locally decoded image P or the deblocked decoded image P_DB is output to the adaptive offset filter 3052. The input of the adaptive offset filter 3052 is the deblocked decoded image P_DB when the deblocking filter is on, and the locally decoded image P when the deblocking filter is off.

適応オフセットフィルタ3052は、フィルタの入力画像に対して、CTUを処理単位として、符号化データから復号されたオフセットを用いたオフセットフィルタ処理を施すことによってオフセットフィルタ済復号画像P_OFを生成する。生成されたオフセットフィルタ済復号画像P_OFは、適応フィルタ3053に供給される。適応オフセットフィルタ3052の詳細は後述する。 The adaptive offset filter 3052 generates an offset filtered image P_OF by performing an offset filter process using the offset decoded from the coded data with the CTU as a processing unit on the input image of the filter. The generated offset filtered decoded image P_OF is supplied to the adaptive filter 3053. Details of the adaptive offset filter 3052 will be described later.

適応フィルタ3053は、適応オフセットフィルタ3052から供給されるオフセットフィルタ済復号画像P_OFに対して、符号化データから復号されたフィルタパラメータFP(フィルタセット番号、フィルタ係数群、領域指定情報、並びにオンオフ情報)を用いたフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。フィルタ済復号画像P_FLは、復号動画像Tdとして外部に出力されると共に、エントロピー復号部301
によって符号化データから復号されたPOC指定情報と関連付けて予測パラメータメモリ307に格納される。
The adaptive filter 3053 uses the filter parameter FP (filter set number, filter coefficient group, area designation information, and on / off information) decoded from the coded data for the offset filtered decoded image P_OF supplied from the adaptive offset filter 3052. The filtered decoded image P_FL is generated by performing the filtering process using. The filtered decoded image P_FL is output to the outside as a decoded moving image Td, and the entropy decoding unit 301
It is stored in the prediction parameter memory 307 in association with the POC designation information decoded from the coded data by.

(適応オフセットフィルタ3052の詳細)
次に、適応オフセットフィルタ3052の詳細について図1を参照して説明する。図1は、適応オフセットフィルタ3052の構成を示すブロック図である。図1に示すように、適応オフセットフィルタ3052は、SAOパラメータ復号部61、適応フィルタ部62、オフセット設定部63、および、SAOパラメータ格納部64を含む。
(SAOパラメータ復号部61)
SAOパラメータ復号部61(オフセット情報復号手段)は、入力されるSAOパラメータSAOPからオフセットタイプsao_type_idx、バンドオフセット位置sao_band_position、オフセットsao_offset_abs、オフセット符号sao_offset_signを抽出する。バンドオ
フセット位置sao_band_positionは、バンド数NUM_SAO_BO_CLASSESのバンドの位置を示す
ものであり、NUM_SAO_BO_CLASSESにより異なる長さのバイナリ列を復号するとよい。例えば、log2(NUM_SAO_BO_CLASSES)の長さのバイナリ長のバイナリ列を復号してもよい。オフセットタイプsao_type_idx、バンドオフセット位置sao_band_positionは、特性値算出部
621に出力され、オフセットタイプsao_type_idx、オフセットsao_offset_abs、オフセット符号sao_offset_signは、オフセット設定部63、およびSAOパラメータ格納部6
4に出力される。なお、対象CTUに関するSAOパラメータSAOPであるCTUSAOオフセ
ット情報のマージ制御情報(sao_merge_left_flag, sao_merge_up_flag)がマージであることを示すか否かに応じて、オフセットタイプsao_type_idx、バンドオフセット位置sao_band_position、オフセットsao_offset_abs、オフセット符号sao_offset_signの抽出方法が異なる。マージ制御情報がマージであることを示す場合には、既に復号済みのパラメータをSAOパラメータ格納部64から読み出し抽出する。具体的には、sao_merge_left_flagが1の場合には、対象CTUの左に隣接するCTUのパラメータを抽出する。sao_merge_up_flagが1の場合には、対象CTUの上に隣接するCTUのパラメータを抽出する。逆に、マージ制御情報がマージであることを示さない場合には、入力されるSAOパラメータSAOPからパラメータを抽出する。本明細書では、マージ制御情報がマージであることを示す場合には、上記パラメータに加え、バンド設定情報もコピーする。バンド設定情報は、画素値をバンドに分類するために用いるパラメータである。具体的には、バンド設定情報として、バンド開始位置bandStartPosとバンド幅情報(例えばbandWやbandShift)をコピーする。
(Details of Adaptive Offset Filter 3052)
Next, the details of the adaptive offset filter 3052 will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of an adaptive offset filter 3052. As shown in FIG. 1, the adaptive offset filter 3052 includes a SAO parameter decoding unit 61, an adaptive filter unit 62, an offset setting unit 63, and a SAO parameter storage unit 64.
(SAO parameter decoding unit 61)
The SAO parameter decoding unit 61 (offset information decoding means) extracts the offset type sao_type_idx, the band offset position sao_band_position, the offset sao_offset_abs, and the offset code sao_offset_sign from the input SAO parameter SAOP. The band offset position sao_band_position indicates the position of the band of the number of bands NUM_SAO_BO_CLASSES, and it is preferable to decode the binary strings having different lengths depending on the NUM_SAO_BO_CLASSES. For example, a binary string of binary length of log2 (NUM_SAO_BO_CLASSES) length may be decrypted. The offset type sao_type_idx and band offset position sao_band_position are output to the characteristic value calculation unit 621, and the offset type sao_type_idx, offset sao_offset_abs and offset code sao_offset_sign are the offset setting unit 63 and the SAO parameter storage unit 6.
It is output to 4. Depending on whether or not the merge control information (sao_merge_left_flag, sao_merge_up_flag) of CTUSAO offset information, which is the SAO parameter SAOP for the target CTU, indicates that it is a merge, the offset type sao_type_idx, band offset position sao_band_position, offset sao_offset_abs, and offset code The method of extracting sao_offset_sign is different. When the merge control information indicates that the merge is performed, the parameters that have already been decoded are read out from the SAO parameter storage unit 64 and extracted. Specifically, when sao_merge_left_flag is 1, the parameters of the CTU adjacent to the left of the target CTU are extracted. When sao_merge_up_flag is 1, the parameters of the CTU adjacent to the target CTU are extracted. On the contrary, when the merge control information does not indicate that it is a merge, the parameter is extracted from the input SAO parameter SAOP. In the present specification, when the merge control information indicates that it is a merge, the band setting information is also copied in addition to the above parameters. The band setting information is a parameter used to classify the pixel values into bands. Specifically, the band start position bandStartPos and the bandwidth information (for example, bandW and bandShift) are copied as the band setting information.

より具体的にはsao_merge_up_flag=1の場合には、
sao_offset_abs[cIdx][rx][ry][i] = sao_offset_abs[cIdx][rx][ry-1][i]
sao_offset_sign[cIdx][rx][ry][i] = sao_offset_sign[cIdx][rx][ry-1][i]
sao_type_idx[cIdx][rx][ry][i] = sao_type_idx[cIdx][rx][ry-1][i]
bandStartPos[cIdx][rx][ry] = bandStartPos[cIdx][rx][ry-1][i]
bandShift[cIdx][rx][ry] = bandShift[cIdx][rx][ry-1][i]
により導出する。sao_merge_left_flag=1の場合には、
sao_offset_abs[cIdx][rx][ry][i] = sao_offset_abs[cIdx][rx-1][ry][i]
sao_offset_sign[cIdx][rx][ry][i] = sao_offset_sign[cIdx][rx-1][ry][i]
sao_type_idx[cIdx][rx][ry][i] = sao_type_idx[cIdx][rx-1][ry][i]
bandStartPos[cIdx][rx][ry] = bandStartPos[cIdx][rx-1][ry][i]
bandShift[cIdx][rx][ry] = bandShift[cIdx][rx-1][ry][i]
により導出する。ここで、rx, ryは、対象CTUの左上座標である。なお、コピーするバン
ド幅情報はバンド幅シフト数bandShiftに限定されず、バンド幅bandWでもよい。また、バンド幅シフト数bandShift を導出するためのシフト値addShift(例えば、bandShift = BASE_SHIFT + addShift)でもよい。
More specifically, when sao_merge_up_flag = 1,
sao_offset_abs [cIdx] [rx] [ry] [i] = sao_offset_abs [cIdx] [rx] [ry-1] [i]
sao_offset_sign [cIdx] [rx] [ry] [i] = sao_offset_sign [cIdx] [rx] [ry-1] [i]
sao_type_idx [cIdx] [rx] [ry] [i] = sao_type_idx [cIdx] [rx] [ry-1] [i]
bandStartPos [cIdx] [rx] [ry] = bandStartPos [cIdx] [rx] [ry-1] [i]
bandShift [cIdx] [rx] [ry] = bandShift [cIdx] [rx] [ry-1] [i]
Derived by. If sao_merge_left_flag = 1,
sao_offset_abs [cIdx] [rx] [ry] [i] = sao_offset_abs [cIdx] [rx-1] [ry] [i]
sao_offset_sign [cIdx] [rx] [ry] [i] = sao_offset_sign [cIdx] [rx-1] [ry] [i]
sao_type_idx [cIdx] [rx] [ry] [i] = sao_type_idx [cIdx] [rx-1] [ry] [i]
bandStartPos [cIdx] [rx] [ry] = bandStartPos [cIdx] [rx-1] [ry] [i]
bandShift [cIdx] [rx] [ry] = bandShift [cIdx] [rx-1] [ry] [i]
Derived by. Here, rx and ry are the upper left coordinates of the target CTU. The bandwidth information to be copied is not limited to the number of bandwidth shifts, bandShift, and may be bandwidth bandW. Further, the shift value addShift (for example, bandShift = BASE_SHIFT + addShift) for deriving the number of bandwidth shifts bandShift may be used.

bandW[cIdx][rx][ry] = bandW[cIdx][rx][ry-1][i]
bandW[cIdx][rx][ry] = bandW[cIdx][rx-1][ry][i]
addShift [cIdx][rx][ry] = addShift [cIdx][rx][ry-1][i]
addShift [cIdx][rx][ry] = addShift [cIdx][rx-1][ry][i]
また、SAOパラメータ復号部61は、sao_merge_up_flag=1の場合、もしくはsao_merge_left_flag=1の場合に各々以下の疑似コードのようにバンド数選択情報dblBandFlagを
コピーしても良い。
bandW [cIdx] [rx] [ry] = bandW [cIdx] [rx] [ry-1] [i]
bandW [cIdx] [rx] [ry] = bandW [cIdx] [rx-1] [ry] [i]
addShift [cIdx] [rx] [ry] = addShift [cIdx] [rx] [ry-1] [i]
addShift [cIdx] [rx] [ry] = addShift [cIdx] [rx-1] [ry] [i]
Further, the SAO parameter decoding unit 61 may copy the band number selection information dblBandFlag as in the following pseudo code when sao_merge_up_flag = 1 or sao_merge_left_flag = 1.

dblBandFlag [cIdx][rx][ry] = dblBandFlag [cIdx][rx][ry-1][i]
dblBandFlag [cIdx][rx][ry] = dblBandFlag [cIdx][rx-1][ry][i]
なお、バンド開始位置bandStartPosを格納する場合において、パラメータ格納部64での格納に必要なメモリサイズを低減するため、下位ビットの情報を捨てる後述のラウンド
処理を行なっても良い。ラウンド処理は、ラインメモリの削減に効果がある。
dblBandFlag [cIdx] [rx] [ry] = dblBandFlag [cIdx] [rx] [ry-1] [i]
dblBandFlag [cIdx] [rx] [ry] = dblBandFlag [cIdx] [rx-1] [ry] [i]
When storing the band start position bandStartPos, in order to reduce the memory size required for storage in the parameter storage unit 64, the round processing described later may be performed in which the information of the lower bits is discarded. Round processing is effective in reducing line memory.

また、以下のように、バンド開始位置bandStartPosをSAOパラメータ格納部64から読
み出す時にラウンド処理を行ってもよい。
Further, as described below, round processing may be performed when reading the band start position bandStartPos from the SAO parameter storage unit 64.

bandStartPos[cIdx][rx][ry] = ((bandStartPos[cIdx][rx][ry-1][i])>>shift)<<shift
bandShift[cIdx][rx][ry] = (bandShift[cIdx][rx-1][ry][i])>>shift)<<shift
また、以下のようにラウンド時に、オフセットを加算してもよい。
bandStartPos [cIdx] [rx] [ry] = ((bandStartPos [cIdx] [rx] [ry-1] [i]) >> shift) << shift
bandShift [cIdx] [rx] [ry] = (bandShift [cIdx] [rx-1] [ry] [i]) >> shift) << shift
Further, the offset may be added at the time of round as follows.

bandStartPos[cIdx][rx][ry] = ((bandStartPos[cIdx][rx][ry-1][i]+offset)>>shift)<<shift
bandShift[cIdx][rx][ry] = (bandShift[cIdx][rx-1][ry][i]+offset)>>shift)<<shift
例えばoffset = 1<<(shift-1)
バンドオフセットにおいて、バンド設定情報が変化すると、同じ画素値でも分類されるバンドが変化するため、オフセット情報が適用されるバンドの位置も変化する。上記のように、既に復号したオフセット情報をコピーするSAOパラメータ復号部61(適応オフセット情報コピー手段)を備え、さらに、適応オフセット情報コピー手段は、オフセット情報に加え、バンド設定情報をコピーすることにより、バンド設定情報がCTUなどの単位領域ごとに変化する場合においても、オフセット情報が期待したバンドに適用される効果がある。
bandStartPos [cIdx] [rx] [ry] = ((bandStartPos [cIdx] [rx] [ry-1] [i] + offset) >> shift) << shift
bandShift [cIdx] [rx] [ry] = (bandShift [cIdx] [rx-1] [ry] [i] + offset) >> shift) << shift
For example offset = 1 << (shift-1)
In the band offset, when the band setting information changes, the band classified even with the same pixel value changes, so the position of the band to which the offset information is applied also changes. As described above, the SAO parameter decoding unit 61 (adaptive offset information copying means) for copying the already decoded offset information is provided, and the adaptive offset information copying means copies the band setting information in addition to the offset information. Even when the band setting information changes for each unit area such as CTU, there is an effect that the offset information is applied to the expected band.

なお、上記バンド設定情報は、バンドの幅、バンドの先頭位置、バンド数選択情報のいずれかあるいは1つ以上であってもよい。 The band setting information may be any one or more of the band width, the band head position, and the band number selection information.

(オフセット設定部63)
オフセット設定部63は、入力されるオフセットタイプsao_type_idx、オフセットsao_offset、オフセット符号sao_offset_signから実オフセットSaoOffsetValを導出し、オフ
セット割り付け部624に出力する。
(Offset setting unit 63)
The offset setting unit 63 derives the actual offset SaoOffsetVal from the input offset type sao_type_idx, offset sao_offset, and offset code sao_offset_sign, and outputs the actual offset SaoOffsetVal to the offset allocation unit 624.

また、実オフセットSaoOffsetVal導出時に、画素値のビット深度に応じた逆量子化を行う。例えば、ビット深度が12bitである画像に対する適応オフセットフィルタのオフセッ
ト値が、ビット深度10bit相当に量子化されて符号化されている場合、SaoOffsetValは2 bit分左シフトされて実オフセット値が導出される。なお、具体的な実オフセットSaoOffsetValを導出方法は後述する。
(SAOパラメータ格納部64)
SAOパラメータ格納部64は、SAOパラメータ復号部61が抽出したオフセットタイプsao_type_idx、バンドオフセット位置sao_band_position、オフセットsao_offset_abs、オフセット符号sao_offset_signを格納する。絶対値と符号の代わりに実オフセット(SaoOffsetVal)を格納してもよい。
(適応フィルタ部62)
適応フィルタ部62は、図1に示すように、特性値算出部621、オフセット割り付け部624、および、オフセット適用部625を含む。
In addition, when deriving the actual offset SaoOffsetVal, inverse quantization is performed according to the bit depth of the pixel value. For example, if the offset value of the adaptive offset filter for an image with a bit depth of 12 bits is quantized and encoded to the equivalent of a bit depth of 10 bits, SaoOffsetVal is shifted left by 2 bits to derive the actual offset value. .. The method for deriving the specific actual offset SaoOffsetVal will be described later.
(SAO parameter storage unit 64)
The SAO parameter storage unit 64 stores the offset type sao_type_idx, the band offset position sao_band_position, the offset sao_offset_abs, and the offset code sao_offset_sign extracted by the SAO parameter decoding unit 61. The actual offset (SaoOffsetVal) may be stored instead of the absolute value and the sign.
(Adaptive filter unit 62)
As shown in FIG. 1, the adaptive filter unit 62 includes a characteristic value calculation unit 621, an offset allocation unit 624, and an offset application unit 625.

(特性値算出部621)
特性値算出部621は、入力される画像の画素値に基づいて、オフセットタイプsao_type_idxに対応する特性値を算出する。特性値の算出は各画素位置において実行される。sao_type_idxが0の場合、特性値を算出しない。sao_type_idxが1〜4(EO)の場合は、エッジ分類を表す特性値edgeIdx(クラス)を算出する。特性値edgeIdxはsao_type_idxに応じた特定方向に対する、対象画素と隣接画素の間の画素値変化に基づき設定される。sao_type_idxが5(BO)の場合は、画素値の大きさを表す特性値bandIdxを算出する。特性値b
andIdxは、対象画素の画素値を量子化した値として計算される。
(Characteristic value calculation unit 621)
The characteristic value calculation unit 621 calculates the characteristic value corresponding to the offset type sao_type_idx based on the pixel value of the input image. The calculation of the characteristic value is executed at each pixel position. If sao_type_idx is 0, the characteristic value is not calculated. When sao_type_idx is 1 to 4 (EO), the characteristic value edgeIdx (class) representing the edge classification is calculated. The characteristic value edgeIdx is set based on the pixel value change between the target pixel and the adjacent pixel in a specific direction according to sao_type_idx. When sao_type_idx is 5 (BO), the characteristic value bandIdx indicating the size of the pixel value is calculated. Characteristic value b
andIdx is calculated as a quantized value of the pixel value of the target pixel.

バンドオフセットの場合には、特性値算出部621は、画素値recPicture[x][y]とバンド設定情報(バンド分類情報)であるバンド開始位置bandStartPos、バンド幅情報(バンド幅シフト値bandShiftやバンド幅bandW)と符号化データとして伝送されるパラメータであるバンドオフセット位置sao_band_positionを用いて、特性値であるバンドインデック
スbandIdxを算出する。
In the case of band offset, the characteristic value calculation unit 621 includes pixel value recPicture [x] [y], band start position bandStartPos which is band setting information (band classification information), bandwidth information (bandwidth shift value bandShift and band). The band index bandIdx, which is a characteristic value, is calculated using the width bandW) and the band offset position sao_band_position, which is a parameter transmitted as encoded data.

bandIdx = ((recPicture[xSi][ySj]-bandStartPos-sao_band_position)*bandW) >> bandShift
ここでrecPicture[x][y]は適応フィルタの入力画像の画素値である。バンド幅情報bandWは、(1<<bitDepth)>>bandShiftである。ここで、bandStartPos=0、bandShift=5であってよい。さらに、クリップを行っってもよいし、所定値(例えば1)を加算してもよい。
bandIdx = ((recPicture [xSi] [ySj] -bandStartPos-sao_band_position) * bandW) >> bandShift
Here, recPicture [x] [y] is the pixel value of the input image of the adaptive filter. Bandwidth information bandW is (1 << bitDepth) >> bandShift. Here, bandStartPos = 0 and bandShift = 5 may be set. Further, clipping may be performed, or a predetermined value (for example, 1) may be added.

bandIdx = Clip3(0, NUM_SAO_BO_CLASSES-1, bandIdx)+1
また、特性値算出部621は、テーブルbandTableを用いてbandIdxを導出してもよい。具体的には、バンドオフセット位置sao_band_positionから以下の処理により、bandTableを導出してもよい。
bandIdx = Clip3 (0, NUM_SAO_BO_CLASSES-1, bandIdx) +1
Further, the characteristic value calculation unit 621 may derive bandIdx using the table bandTable. Specifically, the bandTable may be derived from the band offset position sao_band_position by the following processing.

bandTable[]の全ての要素を0とする
for( k=0; k<sao_offset_num; k++ ) bandTable[(k+sao_band_position) & (NUM_SAO_BO_CLASSES-1)] = k+1
ここで実オフセット数sao_offset_numは例えば4、バンド数NUM_SAO_BO_CLASSESは例え
ば32としてもよい。例えば、sao_band_positionが1の場合、bandTable[]は以下の値にな
る。すなわちbandTableとは、sao_band_positionからsao_band_position+3までが1,2,3,4、それ以外が0となるテーブルであり、bandIdx=0においてSaoOffsetVal[cIdx][rx][ry][bandIdx]のオフセットを用いることで、1から4で選択されたバンド以外のオフセットを0
とすることができる。
Set all elements of bandTable [] to 0
for (k = 0; k <sao_offset_num; k ++) bandTable [(k + sao_band_position) & (NUM_SAO_BO_CLASSES-1)] = k + 1
Here, the actual offset number sao_offset_num may be, for example, 4, and the band number NUM_SAO_BO_CLASSES may be, for example, 32. For example, if sao_band_position is 1, bandTable [] will have the following values. That is, a bandTable is a table in which sao_band_position to sao_band_position + 3 is 1,2,3,4, and the others are 0, and the offset of SaoOffsetVal [cIdx] [rx] [ry] [bandIdx] is set at bandIdx = 0. By using, the offset other than the band selected from 1 to 4 is 0.
Can be.

bandTable[0] = 0
bandTable[1] = 1 // bandTable[ (0+1) & 31]
bandTable[2] = 2
bandTable[3] = 3
bandTable[4] = 4
bandTable[5] = 0
..
bandTable[31] = 0
続いて、特性値算出部621は、バンド設定情報のバンド開始位置bandStartPosを以下の式で導出しても良い。
bandTable [0] = 0
bandTable [1] = 1 // bandTable [(0 + 1) & 31]
bandTable [2] = 2
bandTable [3] = 3
bandTable [4] = 4
bandTable [5] = 0
..
bandTable [31] = 0
Subsequently, the characteristic value calculation unit 621 may derive the band start position bandStartPos of the band setting information by the following equation.

bandIdx = bandTable[(recPicture[xSi][ySj]-bandStartPos)] >> bandShift
なお、バンド開始位置bandStartPosとバンドオフセット位置sao_band_positionで指定
される位置からsao_offset_num数(ここでは4個)のバンドが符号化される。ここでバンド幅bandWは、(1<<bitDepth)<<bandShiftであり、bitDepth=10、bandShift=5の例では、0〜1023までの1024段階の画素値を、bandW(=32)毎に、1<<bandShift個(=32)のバンドに分
割する。バンドインデックスbandIdxは、前述のように画素値recPicture[x][y]からbandStartPosとsao_band_positionで導出される位置を引きbandShiftで右シフトする(bandWで割る)ことから導出される。また、前述のように画素値recPicture[x][y]からbandStartPosの差分をbandShiftで右シフトしてもよい。
bandIdx = bandTable [(recPicture [xSi] [ySj]-bandStartPos)] >> bandShift
The number of sao_offset_num bands (4 in this case) is encoded from the position specified by the band start position bandStartPos and the band offset position sao_band_position. Here, the bandwidth bandW is (1 << bitDepth) << bandShift, and in the example of bitDepth = 10 and bandShift = 5, 1024 pixel values from 0 to 1023 are set for each bandW (= 32). Divide into 1 << bandShift (= 32) bands. The band index bandIdx is derived from the pixel values recPicture [x] [y] by subtracting the position derived by bandStartPos and sao_band_position and shifting to the right by bandShift (dividing by bandW) as described above. Further, as described above, the difference between the pixel values recPicture [x] [y] and bandStartPos may be shifted to the right by bandShift.

(画素値分布とバンド)
バンドオフセットは、バンド開始位置bandStartPos以上の画素値を、バンド幅bandWでNUM_SAO_BO_CLASSES個のバンドに分割する。このバンドでカバーする範囲をサポートバン
ドレンジrangeBandとも呼ぶ。図9は、バンドのカバー範囲と画素値分布を示す図である
。図に示すように、バンド開始位置bandStartPosが0固定であり、画素値のビットレンジ
の範囲(0..(1<<bitDepth)-1)をNUM_SAO_BO_CLASSES個に分ける場合(bandShift=log2(NUM_SAO_BO_CLASSES))では、特にCb, Crの色差成分において、画素値分布に比べて、サポートバンドレンジrangeBandが大きく、bandWが粗いことが分かる。この場合、バンドオフセット位置をさらにバンドオフセット位置sao_band_positionで選択しても、実際には発生し
ないバンドを指定することが多くなりsao_band_positionのビット数が無駄になる。また
、bandWが粗いため、細かい処理が実現できない。図11は、バンド開始位置bandStartPosが0以外の場合の画素値分布を示す図である。
(Pixel value distribution and band)
The band offset divides the pixel values above the band start position bandStartPos into NUM_SAO_BO_CLASSES bands with a bandwidth bandW. The range covered by this band is also called the support band range rangeBand. FIG. 9 is a diagram showing a band coverage range and a pixel value distribution. As shown in the figure, when the bandstart position bandStartPos is fixed to 0 and the pixel value bit range range (0 .. (1 << bitDepth) -1) is divided into NUM_SAO_BO_CLASSES (bandShift = log2 (NUM_SAO_BO_CLASSES)). Then, it can be seen that the support band range rangeBand is larger and the bandW is coarser than the pixel value distribution, especially in the color difference components of Cb and Cr. In this case, even if the band offset position is further selected by the band offset position sao_band_position, a band that does not actually occur is often specified, and the number of bits of sao_band_position is wasted. Moreover, since bandW is coarse, detailed processing cannot be realized. FIG. 11 is a diagram showing a pixel value distribution when the band start position bandStartPos is other than 0.

(バンド設定情報)
図12は、実施形態に係るバンド設定情報とバンドの例である。
図12(a)は、バンド開始位置bandStartPos=0、バンド幅シフト値bandShift=5の例である。(b)(c)(d)は、バンド開始位置bandStartPos= (1<<(bitDepth-1)) - ((1<<(bitDepth-1)) >> addShift)、バンド幅シフト値bandShift=5+addShiftにおいて、addShift = 1, 2, 3の例である。このときバンド幅は、(1<<bitDepth)>>(5+addShift)になり、addShiftの値により異なるバンド幅が利用できる。バンド幅が小さいほど、画素値の値に応じてより細かく分類することができ、より詳細なオフセットが加算可能であるが、1つのバンド(オフセット)でカバーする画素値の範囲が小さくなる。また、バンド幅が小さくなると、バンドオフセット位置sao_band_positionを適用しても全体としてカバーする範囲が
小さくなるので、バンド開始位置bandStartPosを適用に設定するとよい。最大バンド数NUM_SAO_BO_CLASSESは(a)(b)(c)(d)によらず、32の例である。
(Band setting information)
FIG. 12 shows band setting information and an example of the band according to the embodiment.
FIG. 12A is an example of the band start position bandStartPos = 0 and the bandwidth shift value bandShift = 5. (b) (c) (d) is the band start position bandStartPos = (1 << (bitDepth-1))-((1 << (bitDepth-1)) >> addShift), bandwidth shift value bandShift = 5 In + addShift, this is an example of addShift = 1, 2, 3. At this time, the bandwidth becomes (1 << bitDepth) >> (5 + addShift), and different bandwidths can be used depending on the value of addShift. The smaller the bandwidth, the finer the classification according to the pixel value value, and the more detailed offset can be added, but the range of the pixel value covered by one band (offset) becomes smaller. Further, as the bandwidth becomes smaller, the range covered as a whole becomes smaller even if the band offset position sao_band_position is applied, so it is advisable to set the band start position bandStartPos to apply. The maximum number of bands NUM_SAO_BO_CLASSES is 32 examples regardless of (a), (b), (c), and (d).

このように、バンド設定情報であるバンド開始位置bandStartPosとバンド幅シフト値bandShiftは、適応的に設定することが好適である。 As described above, it is preferable to adaptively set the band start position bandStartPos and the bandwidth shift value bandShift, which are the band setting information.

図13は、実施形態に係るバンド設定情報とバンドの別の例である。図12と異なり、バンド幅は(1<<bitDepth)>>6よりも小さくはならないようにしている。最大バンド数NUM_SAO_BO_CLASSESは(a)(b)(c)(d)で各々、32, 32, 16, 8の例である。 FIG. 13 shows another example of the band setting information and the band according to the embodiment. Unlike FIG. 12, the bandwidth is not smaller than (1 << bitDepth) >> 6. The maximum number of bands NUM_SAO_BO_CLASSES is (a), (b), (c), and (d), which are examples of 32, 32, 16, and 8, respectively.

(色コンポーネント別のバンド設定情報)
図14は、色コンポーネントごとにbandShift値を変化させた例である。この(a)の例では、輝度(Y)においてbandShift = 5、色差(Cb)ではbandShift = 7、色差(Cr)ではbandShift = 7を設定する例を示す。bitDepth=10の場合には、バンド幅が各々32, 8, 8となり
、輝度画像よりも色差画像において小さなバンド幅が用いられる。色差では、輝度に比べ画像のダイナミックが小さいことから、このような設定が適当である。(b)では、Y, Cb, Crで各々、5, 7, 6の例を示す。色コンポーネントごとに設定するbandShift値は、これに限定されない。
(Band setting information for each color component)
FIG. 14 shows an example in which the bandShift value is changed for each color component. In this example (a), bandShift = 5 is set for luminance (Y), bandShift = 7 for color difference (Cb), and bandShift = 7 for color difference (Cr). When bitDepth = 10, the bandwidths are 32, 8 and 8, respectively, and a smaller bandwidth is used in the color difference image than in the luminance image. In terms of color difference, the dynamic of the image is smaller than that of the luminance, so such a setting is appropriate. In (b), examples of 5, 7, and 6 are shown for Y, Cb, and Cr, respectively. The bandShift value set for each color component is not limited to this.

また、バンド開始位置bandStartPos= (1<<(bitDepth-1))-((1<<(bitDepth-1)) >> (bandShift-5))等に従い、色コンポーネントごとにバンド開始位置を定めてもよい。 Also, determine the band start position for each color component according to the band start position bandStartPos = (1 << (bitDepth-1))-((1 << (bitDepth-1)) >> (bandShift-5)). May be good.

(色コンポーネント別のバンド設定情報の符号化)
なお、ダイナミックレンジは、シーケンスやピクチャ毎、また、RGBやYUVの色空間、BT.709, BT.2020、BT.2100などのYUV色空間によっても異なる。したがって、色コンポーネ
ントのバンド設定情報を固定的とせず、スライスヘッダなどで符号化することも適当である。図15は、バンド設定情報であるバンド幅情報sao_add_shiftをスライスデータに含
める場合のシンタックステーブルを示す。シンタックステーブルには、バンド設定情報の一部を含めてもよい。この例では、SAOパラメータ復号部61は、スライス単位で、符号
化データから色コンポーネントcIdx(=0,1,2)毎にバンド設定情報sao_add_shift[cIdx]を
読み出し、所定のバンドシフト値と加算してバンドシフト値を以下のように導出する。
(Encoding of band setting information for each color component)
The dynamic range differs depending on the sequence or picture, the RGB or YUV color space, or the YUV color space such as BT.709, BT.2020, or BT.2100. Therefore, it is also appropriate to encode the band setting information of the color component with a slice header or the like instead of fixing it. FIG. 15 shows a syntax table when the bandwidth information sao_add_shift, which is the band setting information, is included in the slice data. The syntax table may include part of the band setting information. In this example, the SAO parameter decoding unit 61 reads the band setting information sao_add_shift [cIdx] from the coded data for each color component cIdx (= 0,1,2) in slice units and adds them to a predetermined band shift value. The band shift value is derived as follows.

bandShift = BASE_SHIFT + sao_add_shift[cIdx]
ここで、所定のバンドシフト値BASE_SHIFTは5としてもよいが、これに限定されない。以下のようにバンド数NUM_SAO_BO_CLASSES依存で設定してもよい。
bandShift = BASE_SHIFT + sao_add_shift [cIdx]
Here, the predetermined band shift value BASE_SHIFT may be set to 5, but the present invention is not limited to this. It may be set depending on the number of bands NUM_SAO_BO_CLASSES as follows.

BASE_SHIFT = log2(NUM_SAO_BO_CLASSES)
図16は、バンド設定情報であるバンド幅情報sao_add_shiftをCTUデータに含める
場合のシンタックステーブルを示す。この場合も同様に、SAOパラメータ復号部61は、
CTU単位で、符号化データから色コンポーネントcIdx(=0,1,2)毎にバンド設定情報のsao_add_shift[cIdx]を読み出し、所定のバンドシフト値と加算してバンドシフト値を導出
する。
BASE_SHIFT = log2 (NUM_SAO_BO_CLASSES)
FIG. 16 shows a syntax table when the bandwidth information sao_add_shift, which is the band setting information, is included in the CTU data. In this case as well, the SAO parameter decoding unit 61
In CTU units, the band setting information sao_add_shift [cIdx] is read from the coded data for each color component cIdx (= 0,1,2) and added to the predetermined band shift value to derive the band shift value.

なお、バンド数NUM_SAO_BO_CLASSESをbandShiftに応じて変更する構成でもよい。例え
ば、以下のように、bandShiftが大きくなるにつれてバンド数NUM_SAO_BO_CLASSESを小さ
くする構成は好適である。
The number of bands NUM_SAO_BO_CLASSES may be changed according to bandShift. For example, as shown below, a configuration in which the number of bands NUM_SAO_BO_CLASSES decreases as bandShift increases is preferable.

NUM_SAO_BO_CLASSES = 32 >> (bandShift -BASE_SHIFT)
(単位領域の分布情報導出)
特性値算出部621は、入力画像の単位領域(ここではCTU)の分布情報を導出し、バンド設定情報を定めてもよい。分布情報とは、単位領域の画素値の最小値minCTU、再大体maxCTU、平均値aveCTU、中央値medCTU、最頻度modeCTU、1/4分位値hinge1CTU、3/4分位値hinge3CTUの何れかもしくは複数であってもよい。例えば、最大値maxCTU、最小値minCTU、平均値aveCTUは、以下の疑似コードで導出してもよい。
NUM_SAO_BO_CLASSES = 32 >> (bandShift -BASE_SHIFT)
(Derivation of distribution information of unit area)
The characteristic value calculation unit 621 may derive the distribution information of the unit region (CTU in this case) of the input image and determine the band setting information. The distribution information is one of the minimum value minCTU, re-approximate maxCTU, mean value aveCTU, median medCTU, most frequent modeCTU, 1/4 quantile hige1CTU, and 3/4 quantile hige3CTU of the pixel value in the unit area. There may be more than one. For example, the maximum value maxCTU, the minimum value minCTU, and the average value aveCTU may be derived by the following pseudo code.

minCTU = 1<<bitDepth
maxCTU = 0
aveCTU = 0
for (y=yCTU; y < yCTU+ctuHeight; y++)
{
for (x=xCTU; x < xCTU+ctuWidth; x++)
{
if (minCTU > recPicture[x][y]) minCTU = recPicture[x][y]
if (maxCTU < recPicture[x][y]) maxCTU = recPicture[x][y]
aveCTU += recPicture[x][y]
}
}
aveCTU = aveCTU >> log2(ctuHeight*ctuWidth)
ここでxCTU, yCTUは対象単位領域の左上座標、ctuWidth, ctuHeightは対象単位領域の
幅と高さである。
minCTU = 1 << bitDepth
maxCTU = 0
aveCTU = 0
for (y = yCTU; y <yCTU + ctuHeight; y ++)
{
for (x = xCTU; x <xCTU + ctuWidth; x ++)
{
if (minCTU> recPicture [x] [y]) minCTU = recPicture [x] [y]
if (maxCTU <recPicture [x] [y]) maxCTU = recPicture [x] [y]
aveCTU + = recPicture [x] [y]
}
}
aveCTU = aveCTU >> log2 (ctuHeight * ctuWidth)
Here, xCTU and yCTU are the upper left coordinates of the target unit area, and ctuWidth and ctuHeight are the width and height of the target unit area.

なお、上記バンド分類導出手段(特性値算出部621)では、単位領域の分布情報(例えば、画素値の最大値、最小値、平均値)を、単位領域の左側所定幅(例えばctuWidth-guardSize)の範囲の画素と上側所定の高さ(例えば、ctuHeight-guardSize)の範囲の画
素(すなわち、単位領域の右側所定の範囲の画素と下側所定の範囲の画素を除く画素)を用いて導出してもよい。除外する範囲をguardSizeとおくと以下の疑似コードで導出でき
る。
In the band classification derivation means (characteristic value calculation unit 621), the distribution information of the unit area (for example, the maximum value, the minimum value, and the average value of the pixel values) is set to the left predetermined width (for example, ctuWidth-guardSize) of the unit area. Derived using the pixels in the range of and the pixels in the upper predetermined height (for example, ctuHeight-guardSize) range (that is, the pixels excluding the pixels in the right predetermined range on the right side of the unit area and the pixels in the lower predetermined range). You may. If the range to be excluded is set to guardSize, it can be derived with the following pseudo code.

除外範囲は、デブロッキングフィルタを行う場合、CTUの右側と下側は後続のデブロッキングフィルタ処理が行われるまで画素値が確定しないことを考慮するものである。除外範囲を設けることで後続のデブロッキングフィルタ処理を待つことなくminCTU、maxCTUを算出することができる。なお、guardSizeは、デブロッキングフィルタ処理を考慮して
4としてもよい。また、guardSizeは、デブロッキングフィルタ処理を行う場合に4、そ
れ以外の場合に0としてもよい。
The exclusion range considers that when the deblocking filter is performed, the pixel values on the right side and the lower side of the CTU are not fixed until the subsequent deblocking filter processing is performed. By providing an exclusion range, minCTU and maxCTU can be calculated without waiting for the subsequent deblocking filter processing. The guardSize may be set to 4 in consideration of the deblocking filter processing. Further, the guardSize may be 4 when the deblocking filter processing is performed, and 0 in other cases.

minCTU = 1<<bitDepth
maxCTU = 0
aveCTU = 0
for (y=yCTU; y < yCTU+ctuHeight-guardSize; y++)
{
for (x=xCTU; x < xCTU+ctuWidth-guardSize; x++)
{
if (minCTU > recPicture[x][y]) minCTU = recPicture[x][y]
if (maxCTU < recPicture[x][y]) maxCTU = recPicture[x][y]
aveCTU += recPicture[x][y]
}
}
aveCTU = aveCTU >> log2((ctuHeight-guardSize)*(ctuWidth-guardSize))
(分布情報、及び、バンド開始位置bandStartPosのラウンド)
特性値算出部621は、導出された最小値minCTUに対し、ラウンドを行ってもよい。例えば情報量をK bit (例えばK=8)の範囲に抑えるように、以下の式を用いてもよい。
minCTU = 1 << bitDepth
maxCTU = 0
aveCTU = 0
for (y = yCTU; y <yCTU + ctuHeight-guardSize; y ++)
{
for (x = xCTU; x <xCTU + ctuWidth-guardSize; x ++)
{
if (minCTU> recPicture [x] [y]) minCTU = recPicture [x] [y]
if (maxCTU <recPicture [x] [y]) maxCTU = recPicture [x] [y]
aveCTU + = recPicture [x] [y]
}
}
aveCTU = aveCTU >> log2 ((ctuHeight-guardSize) * (ctuWidth-guardSize))
(Distribution information and round of band start position bandStartPos)
The characteristic value calculation unit 621 may perform a round with respect to the derived minimum value minCTU. For example, the following equation may be used so as to limit the amount of information to the range of K bit (for example, K = 8).

minCTU = (minCTU >> (bitDepth-K)) << (bitDepth-K)
ここでminCTUのラウンド時に適当なオフセットoffsetを加算してからシフトしてもよい。offset = 1<<(1-shift)、ここでshift = bitDepth-Kとしてもよい。
minCTU = (minCTU >> (bitDepth-K)) << (bitDepth-K)
Here, you may shift after adding an appropriate offset offset at the round of minCTU. offset = 1 << (1-shift), where shift = bitDepth-K may be used.

別の例として、特性値算出部621は、導出された最小値minCTUに対し、バンド幅bandWの倍数になるようにラウンドを行ってもよい。 As another example, the characteristic value calculation unit 621 may perform a round so as to be a multiple of the bandwidth bandW with respect to the derived minimum value minCTU.

minCTU = (minCTU / bandW) * bandW
これは、bandWが2のべき乗である場合は以下のシフト演算でも導出できる。
minCTU = (minCTU / bandW) * bandW
This can also be derived by the following shift operation when bandW is a power of 2.

minCTU = (minCTU>>bandShift)<< bandShift
もしくは、
minCTU = (minCTU>>(BASE_SHIFT+addShift))<<(BASE_SHIFT+addShift)
ここで、addShiftは、sao_add_shift[cIdx]を符号化データから復号してもよいし、以
下の(入力画像依存のバンド設定情報1)で説明するように、単位領域の画素値から導出してもよい。sao_add_shift[cIdx]は、色差の2コンポーネントcIdx=1、2のsao_add_shiftは同じとしてもよい。つまり、sao_add_shift[1]を復号し、sao_add_shift[2]に設定し
てもよい。
minCTU = (minCTU >> bandShift) << bandShift
Or
minCTU = (minCTU >> (BASE_SHIFT + addShift)) << (BASE_SHIFT + addShift)
Here, addShift may decode sao_add_shift [cIdx] from the encoded data, or may derive it from the pixel value of the unit region as described in the following (input image-dependent band setting information 1). Good. For sao_add_shift [cIdx], the two components cIdx = 1 and 2 of the color difference may have the same sao_add_shift. That is, you may decode sao_add_shift [1] and set it to sao_add_shift [2].

同様に、バンド開始位置bandStartPosをラウンドしてもよい。 Similarly, the band start position bandStartPos may be rounded.

bandStartPos = (bandStartPos >> (bitDepth-8)) << (bitDepth-8)
bandStartPos = (bandStartPos / bandW) * bandW
bandStartPos = (bandStartPos>>bandShift)<< bandShift
この最小値minCTUのラウンド、バンド開始位置bandStartPosのラウンドは、本明細書の
他の実施形態にも適用可能である。
bandStartPos = (bandStartPos >> (bitDepth-8)) << (bitDepth-8)
bandStartPos = (bandStartPos / bandW) * bandW
bandStartPos = (bandStartPos >> bandShift) << bandShift
This round of minimum minCTU, round of band start position bandStartPos, is also applicable to other embodiments herein.

(入力画像依存のバンド設定情報1)
特性値算出部621(バンド分類導出手段)は、単位領域の画素値の少なくとも最大値と最小値、平均値のいずれか一つに応じてバンド設定情報を設定してもよい。
(Band setting information 1 depending on the input image)
The characteristic value calculation unit 621 (band classification derivation means) may set band setting information according to at least one of at least the maximum value, the minimum value, and the average value of the pixel values in the unit region.

例えば、特性値算出部621は、最小値minCTUを用いて以下の式で、バンド開始位置bandStartPosを導出してもよい。上述のようにminCTUはラウンドを行ってもよい。 For example, the characteristic value calculation unit 621 may derive the band start position bandStartPos by the following formula using the minimum value minCTU. As mentioned above, minCTU may make rounds.

bandStartPos = minCTU
また、特性値算出部621(バンド分類導出手段)は、単位領域のダイナミックレンジrangeCTU = maxCTU - minCTUに応じて、バンド幅を設定してもよい。例えば、以下の式で導出してもよい。
bandStartPos = minCTU
Further, the characteristic value calculation unit 621 (band classification derivation means) may set the bandwidth according to the dynamic range rangeCTU = maxCTU --minCTU of the unit region. For example, it may be derived by the following equation.

addShift = 0
if (1<<(bitDepth-1) > rangeCTU) addShift = 1
if (1<<(bitDepth-2) > rangeCTU) addShift = 2
bandShift = BASE_SHIFT + addShift
さらに前述のように以下の式で、バンド開始位置bandStartPosを導出してもよい。
addShift = 0
if (1 <<(bitDepth-1)> rangeCTU) addShift = 1
if (1 <<(bitDepth-2)> rangeCTU) addShift = 2
bandShift = BASE_SHIFT + addShift
Further, as described above, the band start position bandStartPos may be derived by the following equation.

bandStartPos= (1<<(bitDepth-1))-((1<<(bitDepth-1)) >> (bandShift-BASE_SHIFT))
この場合、単位領域のダイナミックレンジに応じて、バンド開始位置bandStartPosが導出される。
bandStartPos = (1 << (bitDepth-1))-((1 << (bitDepth-1)) >> (bandShift-BASE_SHIFT))
In this case, the band start position bandStartPos is derived according to the dynamic range of the unit region.

(入力画像依存のバンド設定情報2)
特性値算出部621(バンド分類導出手段)は、単位領域のダイナミックレンジrangeCTU = maxCTU - minCTUに応じて、バンド開始位置bandStartPosを設定してもよい。例えば、以下の疑似コードを用いてbandStartPosを導出してもよい。
(Band setting information 2 depending on the input image)
The characteristic value calculation unit 621 (band classification derivation means) may set the band start position bandStartPos according to the dynamic range rangeCTU = maxCTU --minCTU of the unit region. For example, bandStartPos may be derived using the following pseudo code.

rangeBand = ( 1<<channelBitDepth ) >> addShift;
if (rangeBand > rangeCTU )
{
bandStartPos = minCTU;
}
else
{
bandStartPos = (minCTU + maxCTU + 1)>>1;
}
ここではあるaddShiftにおいて、バンドのサポート幅rangeBandがダイナミックレンジrangeCTUより大きい場合には、単位領域の最小値minCTUをbandStartPosに設定し、rangeCTU
以下の場合には、最大値と最小値の平均値をbandStartPosに設定する。なお、最大値と最小値の平均値の代わりに、単位領域の平均値aveCTUを用いてもよい
(入力画像依存のバンド設定情報3)
特性値算出部621(バンド分類導出手段)は、単位領域のダイナミックレンジrangeCTU = maxCTU - minCTUに応じて、バンド開始位置bandStartPosを設定してもよい。例えば、以下の疑似コードを用いてbandStartPosを導出してもよい。
rangeBand = (1 << channelBitDepth) >>addShift;
if (rangeBand> rangeCTU)
{
bandStartPos = minCTU;
}
else else
{
bandStartPos = (minCTU + maxCTU + 1) >>1;
}
Here, in a certain addShift, if the band support width rangeBand is larger than the dynamic range rangeCTU, the minimum value minCTU of the unit area is set to bandStartPos, and the rangeCTU.
In the following cases, set the average value of the maximum value and the minimum value in bandStartPos. Instead of the average value of the maximum value and the minimum value, the average value aveCTU of the unit area may be used (input image-dependent band setting information 3).
The characteristic value calculation unit 621 (band classification derivation means) may set the band start position bandStartPos according to the dynamic range rangeCTU = maxCTU --minCTU of the unit region. For example, bandStartPos may be derived using the following pseudo code.

rangeBand = ( 1<<channelBitDepth ) >> addShift;
if (rangeBand > rangeCTU)
{
bandStartPos = minCTU;
}
else
{
bandStartPos = ((minCTU + maxCTU + 1)>>1) - (rangeBand>>1);
}
ここではあるaddShiftにおいて、バンドのサポート幅rangeBandがダイナミックレンジrangeCTUより大きい場合には、単位領域の最小値minCTUをbandStartPosに設定し、rangeCTU
以下の場合には、最大値と最小値の平均値からrangeBandの1/2を引いた値をbandStartPosに設定する。なお、最大値と最小値の平均値の代わりに、単位領域の平均値aveCTUを用いてもよい。
rangeBand = (1 << channelBitDepth) >>addShift;
if (rangeBand> rangeCTU)
{
bandStartPos = minCTU;
}
else else
{
bandStartPos = ((minCTU + maxCTU + 1) >> 1)-(rangeBand >>1);
}
Here, in a certain addShift, if the band support width rangeBand is larger than the dynamic range rangeCTU, the minimum value minCTU of the unit area is set to bandStartPos, and the rangeCTU.
In the following cases, set bandStartPos to the value obtained by subtracting 1/2 of rangeBand from the average value of the maximum and minimum values. Instead of the average value of the maximum value and the minimum value, the average value aveCTU of the unit area may be used.

(入力画像依存のバンド設定情報4)
また、特性値算出部621(バンド分類導出手段)は、単位領域のダイナミックレンジに応じて、バンド開始位置bandStartPosを以下の式で導出してもよい。ここでは、addShiftFirst(例えば2や3)をshiftに代入し、そのshift値でのrangeBandが、ダイナミックレンジ(maxCTU - minCTU)の所定倍(ここではrangeTH/4)以上かを判定する。YES(rangeBandが単位領域のダイナミックレンジに比べ十分大きければ)の場合、そのshiftを選択する。NO(それ以外)ではshiftを1だけ減算して、shiftが0となるか、判定がYESと
なるまで同じ処理を繰り返す。
(Band setting information 4 depending on the input image)
Further, the characteristic value calculation unit 621 (band classification derivation means) may derive the band start position bandStartPos by the following equation according to the dynamic range of the unit region. Here, addShiftFirst (for example, 2 or 3) is assigned to shift, and it is determined whether the rangeBand at the shift value is at least a predetermined time (here, rangeTH / 4) of the dynamic range (maxCTU --minCTU). If YES (if the rangeBand is large enough compared to the dynamic range of the unit area), select that shift. If NO (other than that), shift is subtracted by 1, and the same process is repeated until shift becomes 0 or the determination becomes YES.

for (shift = addShiftFirst; shift >= 0; shift--)
{
rangeBand = ( 1<<channelBitDepth ) >> shift;
if (4*rangeBand >= rangeTH*(maxCTU - minCTU))
{
break;
}
}
addShift = shift
bandShift = BASE_SHIFT + addShift
bandStartPos = minCTU
(入力画像依存のバンド設定情報5)
変形例として、shift値の大きい方から探索を行ってもよい。ここではshift値が0からaddShiftLast-1までの値を探索し、rangBandが十分にダイナミックレンジよりも小さい場
合にそのshift値をaddShift値として選択する。
for (shift = addShiftFirst; shift> = 0; shift--)
{
rangeBand = (1 << channelBitDepth) >>shift;
if (4 * rangeBand> = rangeTH * (maxCTU --minCTU))
{
break;
}
}
addShift = shift
bandShift = BASE_SHIFT + addShift
bandStartPos = minCTU
(Band setting information 5 depending on the input image)
As a modification, the search may be performed from the one with the larger shift value. Here, the shift value is searched from 0 to addShiftLast-1, and if the rangBand is sufficiently smaller than the dynamic range, that shift value is selected as the addShift value.

for (shift = 0; shift < addShiftLast; shift++)
{
rangeBand = ( 1<<channelBitDepth ) >> shift;
if (4*rangeBand < rangeTH*(maxCTU - minCTU))
{
break;
}
}
addShift = shift
bandShift = BASE_SHIFT + addShift
bandStartPos = minCTU
以上のように、単位領域の画素値の少なくとも最大値と最小値、平均値のいずれか一つに応じてバンド設定情報を設定する特性値算出部621(バンド分類導出手段)を備える
適応オフセットフィルタであれば、単位領域ごとに異なる分布情報(範囲や分布)を用いて、適切にオフセットのバンドの幅、バンドオフセット位置を設定することができる。すなわち、シーケンス別、ピクチャ別、領域別に異なる画像の違いに対して好適なフィルタ処理が可能になる。
for (shift = 0; shift <addShiftLast; shift ++)
{
rangeBand = (1 << channelBitDepth) >>shift;
if (4 * rangeBand <rangeTH * (maxCTU --minCTU))
{
break;
}
}
addShift = shift
bandShift = BASE_SHIFT + addShift
bandStartPos = minCTU
As described above, the adaptive offset filter provided with the characteristic value calculation unit 621 (band classification derivation means) that sets the band setting information according to at least one of the maximum value, the minimum value, and the average value of the pixel values in the unit area. If this is the case, the offset band width and band offset position can be appropriately set by using different distribution information (range or distribution) for each unit area. That is, it is possible to perform suitable filtering for differences in images that differ by sequence, by picture, and by region.

(バンドオフセット位置sao_band_positionを用いない構成)
上記に説明したように、特性値算出部621が単位領域の分布情報に基づき、バンド設定情報(ここでは特にバンド開始位置bandStartPos)を導出する構成においては、特性値算出部621は、符号化データのパラメータであるバンドオフセット位置sao_band_positionを用いなくてもよい。この場合SAOパラメータ復号部61は、バンドオフセット位
置sao_band_positionを復号しない。
(Configuration without band offset position sao_band_position)
As described above, in the configuration in which the characteristic value calculation unit 621 derives the band setting information (here, in particular, the band start position bandStartPos) based on the distribution information of the unit region, the characteristic value calculation unit 621 is the encoded data. It is not necessary to use the band offset position sao_band_position which is a parameter of. In this case, the SAO parameter decoding unit 61 does not decode the band offset position sao_band_position.

このとき、特性値算出部621は、以下の式でbandIdxを導出してもよい。 At this time, the characteristic value calculation unit 621 may derive bandIdx by the following formula.

bandIdx = ((recPicture[ x ][ y ] - bandStartPos) >> bandShift
bandIdx = Clip3 (0, NUM_SAO_BO_CLASSES - 1, bandIdx) + 1
(バンド数NUM_SAO_BO_CLASSESが異なる構成)
最大バンド数NUM_SAO_BO_CLASSESを変更する構成が好適である。図17は、輝度(cIdx = 0)のNUM_SAO_BO_CLASSESは32、色差(cIdx != 0)はオフセット数は16の構成を示す。特
に、上記に説明したように、特性値算出部621が単位領域の分布情報に基づき、バンド設定情報(ここでは特にバンド開始位置bandStartPos)を導出する構成においては、符号化データに含めるオフセット数sao_offset_numを変更する構成が好適である。例えば、輝度は32、色差は16とする構成が可能であるが、これに限定されない。
bandIdx = ((recPicture [x] [y] --bandStartPos) >> bandShift
bandIdx = Clip3 (0, NUM_SAO_BO_CLASSES --1, bandIdx) + 1
(The number of bands NUM_SAO_BO_CLASSES is different)
A configuration that changes the maximum number of bands NUM_SAO_BO_CLASSES is preferable. FIG. 17 shows a configuration in which the luminance (cIdx = 0) has a NUM_SAO_BO_CLASSES of 32 and the color difference (cIdx! = 0) has an offset number of 16. In particular, as described above, in the configuration in which the characteristic value calculation unit 621 derives the band setting information (particularly the band start position bandStartPos) based on the distribution information of the unit region, the number of offsets to be included in the coded data sao_offset_num. It is preferable to change the configuration. For example, the brightness can be set to 32 and the color difference can be set to 16, but the present invention is not limited to this.

NUM_SAO_BO_CLASSES = 32 (cIdx == 0)
NUM_SAO_BO_CLASSES = 16 (cIdx != 0, etc. 1, 2)
図18は、実施形態における、num_sao_bo_classesを含むシンタックスslice_header()を示す。復号したcIdxごとのnum_sao_bo_classes[cIdx]は、NUM_SAO_BO_CLASSESを示す。色差の2コンポーネントcIdx=1、2のNUM_SAO_BO_CLASSESは同じとしてもよい。つまり、num_sao_bo_classes[1]を復号し、num_sao_bo_classes[2]に設定してもよい。
NUM_SAO_BO_CLASSES = 32 (cIdx == 0)
NUM_SAO_BO_CLASSES = 16 (cIdx! = 0, etc. 1, 2)
FIG. 18 shows the syntax slice_header () including num_sao_bo_classes in the embodiment. Num_sao_bo_classes [cIdx] for each decrypted cIdx indicates NUM_SAO_BO_CLASSES. The NUM_SAO_BO_CLASSES of the two color difference components cIdx = 1 and 2 may be the same. That is, num_sao_bo_classes [1] may be decrypted and set to num_sao_bo_classes [2].

NUM_SAO_BO_CLASSESを変更することにより、band_posisionのバイナリ長を短くするこ
とができるためオフセットのオーバーヘッドが小さくなり符号化効率が向上する効果を奏する。
By changing NUM_SAO_BO_CLASSES, the binary length of band_posision can be shortened, which reduces the offset overhead and improves the coding efficiency.

(オフセット数sao_offset_numが異なる構成)
符号化データに含めるオフセット数sao_offset_numを変更する構成が好適である。図19は、輝度(cIdx = 0)のオフセット数は4、色差(cIdx != 0)はオフセット数は2の構成
を示す。特に、上記に説明したように、特性値算出部621が単位領域の分布情報に基づき、バンド設定情報(ここでは特にバンド開始位置bandStartPos)を導出する構成においては、符号化データに含めるオフセット数sao_offset_numを変更する構成が好適である。
(Configuration with different offset number sao_offset_num)
It is preferable to change the number of offsets sao_offset_num included in the coded data. FIG. 19 shows a configuration in which the number of offsets of the luminance (cIdx = 0) is 4, and the number of offsets of the color difference (cIdx! = 0) is 2. In particular, as described above, in the configuration in which the characteristic value calculation unit 621 derives the band setting information (particularly the band start position bandStartPos) based on the distribution information of the unit region, the number of offsets to be included in the coded data sao_offset_num. It is preferable to change the configuration.

例えば、輝度は4、色差は2とする構成が可能であるが、これに限定されない。 For example, the luminance can be set to 4 and the color difference can be set to 2, but the present invention is not limited to this.

sao_offset_num = 4 (cIdx == 0)
sao_offset_num = 2 (cIdx != 0, etc. 1, 2)
図20は、実施形態における、sao_offset_numを含むシンタックスslice_header()を示す図である。色差の2コンポーネントcIdx=1、2のsao_offset_numは同じとしてもよい。
つまり、sao_offset_num[1]を復号し、sao_offset_num[2]に設定してもよい。
sao_offset_num = 4 (cIdx == 0)
sao_offset_num = 2 (cIdx! = 0, etc. 1, 2)
FIG. 20 is a diagram showing the syntax slice_header () including sao_offset_num in the embodiment. The two components cIdx = 1 and 2 of the color difference may have the same sao_offset_num.
That is, sao_offset_num [1] may be decoded and set to sao_offset_num [2].

sao_offset_numを変更することにより、オフセットのオーバーヘッドが小さくなり符号化効率が向上する効果を奏する。 By changing sao_offset_num, the offset overhead is reduced and the coding efficiency is improved.

(複数バンドの構成)
一つの実施形態では、特性値算出部621(バンド分類導出手段)は、第1のバンドの先頭位置と、第2のバンドの先頭位置に基づいてbandIdxを導出する。
(Multiple band configuration)
In one embodiment, the characteristic value calculation unit 621 (band classification derivation means) derives bandIdx based on the head position of the first band and the head position of the second band.

図21はバンドの先頭位置と、その先頭位置を利用したバンドを説明する図である。図の(a)に示すように、第1の先頭位置bandStartPos0により第1のバンドインデックスbandIdx0((a)では0〜15)が導出され、第2の先頭位置bandStartPos1により第2の先頭位置
バンドインデックスbandIdx1((a)では16〜31)が導出される。
FIG. 21 is a diagram illustrating a band head position and a band using the head position. As shown in (a) of the figure, the first start position bandStartPos0 derives the first band index bandIdx0 (0 to 15 in (a)), and the second start position bandStartPos1 derives the second start position band index. bandIdx1 (16 to 31 in (a)) is derived.

bandIdx0 = ((recPicture[ x ][ y ] - bandStartPos0) >> bandShift)
bandIdx1 = ((recPicture[ x ][ y ] - bandStartPos1) >> bandShift)) + bandIdxOffset1
さらにクリップを用いても良い。
bandIdx0 = ((recPicture [x] [y] --bandStartPos0) >> bandShift)
bandIdx1 = ((recPicture [x] [y] --bandStartPos1) >> bandShift)) + bandIdxOffset1
Further, a clip may be used.

bandIdx0 = Clip3(0, NUM_SAO_BO_CLASSES - 1, (recPicture[ x ][ y ] - bandStartPos0) >> bandShift)
bandIdx1 = Clip3(0, NUM_SAO_BO_CLASSES - 1, ((recPicture[ x ][ y ] - bandStartPos1) >> bandShift) + bandIdxOffset1)
図21のように、互いにずれた位置にあるバンド分類を用いることで、同じ値域の画素値においても、より符号化された状態の符号化ノイズに適合したバンド分類が可能である。
bandIdx0 = Clip3 (0, NUM_SAO_BO_CLASSES --1, (recPicture [x] [y] --bandStartPos0) >> bandShift)
bandIdx1 = Clip3 (0, NUM_SAO_BO_CLASSES --1, ((recPicture [x] [y] --bandStartPos1) >> bandShift) + bandIdxOffset1)
As shown in FIG. 21, by using band classifications that are displaced from each other, it is possible to perform band classifications that match the coding noise in a more coded state even for pixel values in the same range.

ここでバンドの先頭位置bandStartPos0とbandStartPos1は、バンド幅bandW((1<<bitDepth>>bandShift))の半分だけずれた位置にあることことが好適である。 Here, it is preferable that the band start positions bandStartPos0 and bandStartPos1 are offset by half the bandwidth bandW ((1 << bitDepth >> bandShift)).

すなわち、bandStartPos1 = bandStartPos0 + (bandW>>1)
なお、図21(c)に示すように複数のバンド先頭位置による分類は、2つに限られず4
つなどでもよい。4つの場合には、以下の式から導出することが好ましい。
That is, bandStartPos1 = bandStartPos0 + (bandW >> 1)
As shown in FIG. 21 (c), the classification based on the head positions of a plurality of bands is not limited to two, but 4
It may be one. In the four cases, it is preferable to derive from the following equation.

bandIdx0 = (recPicture[x][y]-bandStartPos0) >> bandShift
bandIdx1 = (((recPicture[x][y]-bandStartPos1) >> bandShift) + bandIdxOffset1
bandIdx2 = (((recPicture[x][y]-bandStartPos2) >> bandShift) + bandIdxOffset2
bandIdx3 = (((recPicture[x][y]-bandStartPos3) >> bandShift) + bandIdxOffset3
図21(c)では、bandIdxOffset1 = 4、bandIdxOffset2 = 8, bandIdxOffset3 = 12とした例である。バンドの先頭位置bandStartPos0、bandStartPos1、bandStartPos2、bandStartPos3は、バンド幅bandW((1<<bitDepth>>bandShift))の1/4だけずれた位置にあることが好適である。
bandIdx0 = (recPicture [x] [y]-bandStartPos0) >> bandShift
bandIdx1 = (((recPicture [x] [y] -bandStartPos1) >> bandShift) + bandIdxOffset1
bandIdx2 = (((recPicture [x] [y] -bandStartPos2) >> bandShift) + bandIdxOffset2
bandIdx3 = (((recPicture [x] [y] -bandStartPos3) >> bandShift) + bandIdxOffset3
In FIG. 21 (c), bandIdxOffset1 = 4, bandIdxOffset2 = 8, bandIdxOffset3 = 12 is an example. BandStartPos0, bandStartPos1, bandStartPos2, and bandStartPos3 are preferably offset by 1/4 of the bandwidth bandW ((1 << bitDepth >> bandShift)).

bandStartPos1 = bandStartPos0 + (bandW>>2)
bandStartPos2 = bandStartPos1 + (bandW>>2)
bandStartPos3 = bandStartPos2 + (bandW>>2)
オフセット割り付け部624(オフセット選択手段)は、第1のバンドと第2のバンドの両方もしくはいずれか一方に基づいてオフセットを選択してもよい。つまり、オフセット割り付け部624は、第1のバンドbandIdx0を用いてSaoBandOffsetVal[cIdx][rx][ry][bandIdx0]からOffset0を導出し、第2のバンドbandIdx1を用いてSaoBandOffsetVal[cIdx][rx][ry][bandIdx1]からOffset1を導出してもよい。オフセット適用部625は、複数のオフセットのうちの1つを選択して加算してもよい。例えば、Offset0、Offset1を選択す
る場合の処理は、各々以下になる。
bandStartPos1 = bandStartPos0 + (bandW >> 2)
bandStartPos2 = bandStartPos1 + (bandW >> 2)
bandStartPos3 = bandStartPos2 + (bandW >> 2)
The offset allocation unit 624 (offset selection means) may select an offset based on both or one of the first band and the second band. That is, the offset allocation unit 624 derives Offset0 from SaoBandOffsetVal [cIdx] [rx] [ry] [bandIdx0] using the first band bandIdx0, and uses the second band bandIdx1 to derive Offset0, and uses the second band bandIdx1 to derive SaoBandOffsetVal [cIdx] [rx]. Offset1 may be derived from [ry] [bandIdx1]. The offset application unit 625 may select and add one of a plurality of offsets. For example, the processing when Offset0 and Offset1 are selected is as follows.

saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset0)
saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset1)
さらに、オフセット適用部625は2つのオフセットを加算してもよい。
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset0)
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset1)
Further, the offset application unit 625 may add two offsets.

例えば、2つのオフセットの加算は下式で表現される。 For example, the addition of two offsets is expressed by the following equation.

saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset0+Offset1)
バンドが複数の場合には、さらに同様に第3のバンドbandIdx2からSaoBandOffsetVal[cIdx][rx][ry][bandIdx2]のOffset2を導出し、第4のバンドbandIdx3を用いてSaoBandOffsetVal[cIdx][rx][ry][bandIdx3]からOffset3を導出してもよい。
オフセット適用部625は、複数のオフセットのうちの1つを選択して加算してもよい。例えば、Offset0、Offset1、Offset2、Offset3を選択する場合の処理は、各々以下になる。
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset0 + Offset1)
When there are multiple bands, SaoBandOffsetVal [cIdx] [rx] [ry] [bandIdx2] Offset2 is derived from the third band bandIdx2, and the fourth band bandIdx3 is used to derive SaoBandOffsetVal [cIdx] [rx. ] [ry] Offset3 may be derived from [bandIdx3].
The offset application unit 625 may select and add one of a plurality of offsets. For example, the processing when selecting Offset0, Offset1, Offset2, and Offset3 is as follows.

saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset0)
saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset1)
saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset2)
saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset3)
また、以下の計算でオフセット適用部625は複数のオフセットを加算してもよい。
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset0)
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset1)
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset2)
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset3)
Further, the offset application unit 625 may add a plurality of offsets in the following calculation.

saoPicture[x][y] = Clip3(0,(1<<bitDepth)-1,recPicture[x][y]+Offset0+Offset1+ Offset2+Offset3)
なお、特性値算出部621は、1つのバンドを用いるか、2つ以上のバンドを用いるかを単位領域の範囲に応じて、設定してもよい。例えば、以下の疑似コードのように、ある開始点bandStartPos0において、単位領域の最大値maxCTUを分類した場合の、bandIdxTmp
が最大バンド数NUM_SAO_BO_CLASSESの1/2よりも小さい場合、2つ以上のバンドを用いる
ことを示すフラグdblBandFlagを1としてもよい。
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + Offset0 + Offset1 + Offset2 + Offset3)
The characteristic value calculation unit 621 may set whether to use one band or two or more bands according to the range of the unit area. For example, bandIdxTmp when the maximum value maxCTU of the unit area is classified at a certain start point bandStartPos0 as shown in the following pseudo code.
If is less than 1/2 of the maximum number of bands NUM_SAO_BO_CLASSES, the flag dblBandFlag indicating that two or more bands are used may be set to 1.

bandIdxTmp = (maxCTU-bandStartPos0) >> (bitDepth-BASE_SHIFT-addShift)
if (bandIdxTmp<NUM_SAO_BO_CLASSES/2)
{
dblBandFlag=1
}
さらに、特性値算出部621は、bandIdxTmpが、最大バンド数NUM_SAO_BO_CLASSESの1/4よりも小さい場合、dblBandFlagを2とし、4つのバンドを用いてもよい。
bandIdxTmp = (maxCTU-bandStartPos0) >> (bitDepth-BASE_SHIFT-addShift)
if (bandIdxTmp <NUM_SAO_BO_CLASSES / 2)
{
dblBandFlag = 1
}
Further, when the bandIdxTmp is smaller than 1/4 of the maximum number of bands NUM_SAO_BO_CLASSES, the characteristic value calculation unit 621 may set dblBandFlag to 2 and use 4 bands.

bandIdxTmp = (maxCTU-bandStartPos0) >> (bitDepth-BASE_SHIFT-addShift)
if (bandIdxTmp<NUM_SAO_BO_CLASSES/4)
{
dblBandFlag=2
}
さらに、オフセット割り付け部624(オフセット選択手段)は、dblBandFlagが0の場合には1つのバンドを用い(例えばband0)、dblBandFlagが0の場合には2つのバンドを
用いてオフセットを導出し、さらに、オフセット適用部625は、1つもしくは2つのバ
ンドで導出されるオフセットに基づいて加算を行っても良い。またdblBandFlagが2の場合には、4つのバンド(band0, band1, band2, band3)を用いて4つのオフセットを導出し、加算してもよい。
bandIdxTmp = (maxCTU-bandStartPos0) >> (bitDepth-BASE_SHIFT-addShift)
if (bandIdxTmp <NUM_SAO_BO_CLASSES / 4)
{
dblBandFlag = 2
}
Further, the offset allocation unit 624 (offset selection means) derives the offset using one band when the dblBandFlag is 0 (for example, band0) and two bands when the dblBandFlag is 0, and further, The offset application unit 625 may perform addition based on the offset derived in one or two bands. When dblBandFlag is 2, four offsets may be derived and added using four bands (band0, band1, band2, band3).

また、適応オフセット情報コピー手段は、オフセット情報に加え、第1のバンドを用いるか、第1のバンドと第2のバンドを用いるかのバンド数選択情報dblBandFlagをSAO
パラメータ格納部64に格納しておきマージ制御情報に応じてコピーしてもよい。
Further, in addition to the offset information, the adaptive offset information copying means SAOs the band number selection information dblBandFlag of whether to use the first band or the first band and the second band.
It may be stored in the parameter storage unit 64 and copied according to the merge control information.

(オフセット割り付け部624)
オフセット割り付け部624は、各画素に対して、オフセット設定部63より入力される実オフセットSaoOffsetValと、特性値算出部621から入力された特性値edgeIdx、bandIdxとから、割り付けるオフセットを設定する。具体的には、sao_type_idxがエッジオフセットを示す場合には、オフセットとしてSaoOffsetVal[cIdx][rx][ry][edgeIdx]を割り
付け、sao_type_idxがバンドオフセットを示す場合には、オフセットとしてSaoOffsetVal[cIdx][rx][ry][bandIdx]を割り付ける。ここで、cIdxは、カラーコンポーネントインデ
ックスを意味し、cIdx=0が輝度成分(Y)、cIdx=1が色差のCb成分(U)、cIdx=2が色差のCr成分(V)を意味する。rx、ryは各々、対象CTUの座標を示す。
(Offset allocation unit 624)
The offset allocation unit 624 sets an offset to be allocated to each pixel from the actual offset SaoOffsetVal input from the offset setting unit 63 and the characteristic values edgeIdx and bandIdx input from the characteristic value calculation unit 621. Specifically, if sao_type_idx indicates an edge offset, SaoOffsetVal [cIdx] [rx] [ry] [edgeIdx] is assigned as the offset, and if sao_type_idx indicates a band offset, SaoOffsetVal [cIdx] [ Allocate rx] [ry] [bandIdx]. Here, cIdx means the color component index, cIdx = 0 means the luminance component (Y), cIdx = 1 means the Cb component (U) of the color difference, and cIdx = 2 means the Cr component (V) of the color difference. rx and ry indicate the coordinates of the target CTU, respectively.

(オフセット適用部625)
オフセット適用部625は、各画素に対してオフセット割り付け部624で設定されたオフセットを、オフセット適用部625の入力画像(デブロック済復号画像P_DBもしくは局所復号画像P)の画素値に加算して、フィルタ済復号画像P_FLの画素値として設定する。
(Offset application unit 625)
The offset application unit 625 adds the offset set by the offset allocation unit 624 to each pixel to the pixel value of the input image (deblocked decoded image P_DB or locally decoded image P) of the offset application unit 625. It is set 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])
ここで、saoPictureはフィルタ済復号画像P_FL、recPictureはオフセット適用部625への入力画像である。
saoPicture [x] [y] = Clip3 (0, (1 << bitDepth) -1, recPicture [x] [y] + SaoOffsetVal [cIdx] [rx] [ry] [edgeIdx or bandIdx])
Here, saoPicture is the filtered decoded image P_FL, and recPicture is the input image to the offset application unit 625.

(オフセット設定部63におけるオフセットの導出方法)
次に、オフセット設定部63におけるオフセットの導出方法の詳細について、図10を参照して説明する。図10に示すように、以下の式により、i=0..3の4つのオフセットsao_offset_absから、対応する実オフセットSaoOffsetValを導出する。
SaoOffsetVal[cIdx][rx][ry][i+1] =
offsetSign[i]*sao_offset_abs[Idx][rx][ry][i] << log2OffsetScale
ここでは、実オフセットSaoOffsetVal[cIdx][rx][ry][0]はフィルタオフを意味し常に
0である。i=0..3のオフセットsao_offset_abs[cIdx][rx][ry][i]が、i=1..4の実オフセ
ットSaoOffsetVal[cIdx][rx][ry][i]に対応する。但し、フィルタオフを別の方法で処理
する場合には、i=0..3のオフセットをそのままi=0..3の実オフセットに対応させても良い。以下、オフセット数が異なる場合も同様である。
(Method of deriving the offset in the offset setting unit 63)
Next, the details of the method of deriving the offset in the offset setting unit 63 will be described with reference to FIG. As shown in FIG. 10, the corresponding real offset SaoOffsetV is derived from the four offset sao_offset_abs of i = 0.3 by the following equation.
SaoOffsetVal [cIdx] [rx] [ry] [i + 1] =
offsetSign [i] * sao_offset_abs [Idx] [rx] [ry] [i] << log2OffsetScale
Here, the actual offset SaoOffsetVal [cIdx] [rx] [ry] [0] means the filter is off and is always 0. The offset sao_offset_abs [cIdx] [rx] [ry] [i] of i = 0.3 corresponds to the real offset SaoOffsetVal [cIdx] [rx] [ry] [i] of i = 1.0.4. However, when the filter off is processed by another method, the offset of i = 0.3 may correspond to the actual offset of i = 0.3 as it is. Hereinafter, the same applies when the number of offsets is different.

なお、図10において、<<は左シフトを表す(他の図でも同様)。bitDepthは画素値のビット深度、log2OffsetScaleは、sao_offset_absのビット精度を意味する。オフセット
サインoffsetSignは、実オフセットの符号を示す。ここでは、以下の式のようにi=0,1の
オフセットは正、i=2,3のオフセットは負であることを意味する。なお、エッジオフセッ
トの場合もバンドオフセット同様符号を明示的に符号化してもよい。
In FIG. 10, << represents a left shift (the same applies to other figures). bitDepth means the bit depth of the pixel value, and log2OffsetScale means the bit precision of sao_offset_abs. OffsetSign indicates the sign of the actual offset. Here, it means that the offset of i = 0,1 is positive and the offset of i = 2,3 is negative as shown in the following equation. In the case of edge offset, the code may be explicitly encoded as in the case of band offset.

offsetSign[i] = {1, 1, -1, -1}
バンドオフセットの場合には、符号offsetSign[i]は、SAOパラメータSAOP中のsao_offset_sign[i]を用いる。すなわちoffsetSign[i]=sao_offset_sign[i]である
(動画像符号化装置2)
次に、動画像符号化装置11の構成について説明する。以下に一例として、動画像符号化装置11の構成を、図22、図24を参照して説明する。動画像符号化装置2は、11は、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化
・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメー
タ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモ
リ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される
。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
offsetSign [i] = {1, 1, -1, -1}
In the case of band offset, the sign offsetSign [i] uses sao_offset_sign [i] in the SAO parameter SAOP. That is, offsetSign [i] = sao_offset_sign [i] (moving image coding device 2).
Next, the configuration of the moving image coding device 11 will be described. As an example, the configuration of the moving image coding device 11 will be described below with reference to FIGS. 22 and 24. In the moving image coding device 2, 11 is a prediction image generation unit 101, a subtraction unit 102, a conversion / quantization unit 103, an entropy coding unit 104, an inverse quantization / inverse conversion unit 105, an addition unit 106, and a loop filter 107. , Prediction parameter memory (prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, coding parameter determination unit 110, and prediction parameter coding unit 111. The prediction parameter coding unit 111 includes an inter prediction parameter coding unit 112 and an intra prediction parameter coding unit 113.

予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域であ
る符号化ユニットCU毎に予測ユニットブロックの予測画像Pを生成する。予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。
For each picture of the image T, the prediction image generation unit 101 generates a prediction image P of the prediction unit block for each coding unit CU which is a region in which the pictures are divided. The prediction image generation unit 101 has the same operation as the prediction image generation unit 308 described above.

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

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

エントロピー符号化部104には、変換・量子化部103から量子化変換係数が入力され、予測パラメータ符号化部111から予測パラメータが入力される。エントロピー符号化部104は、入力された分割情報、予測パラメータ、量子化変換係数等をエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。また、エントロピー符号化部104は、適応オフセットフィルタ1072から供給されるSAOパラメータ
SAOPを可変長符号化し、符号化ストリームに含める。SAOパラメータSAOPは、少なくとも、オフセット情報を含む。
A quantization conversion coefficient is input to the entropy coding unit 104 from the conversion / quantization unit 103, and a prediction parameter is input from the prediction parameter coding unit 111. The entropy coding unit 104 entropy-codes the input division information, prediction parameters, quantization conversion coefficient, etc. to generate a coded stream Te, and outputs the generated coded stream Te to the outside. Further, the entropy coding unit 104 variable-length encodes the SAO parameter SAOP supplied from the adaptive offset filter 1072 and includes it in the coded stream. The SAO parameter SAOP contains at least offset information.

逆量子化・逆変換部105は、動画像復号装置31における、逆量子化・逆変換部311(図4
)と同じであり、変換・量子化部103から入力された量子化変換係数を逆量子化して変換
係数を求める。逆量子化・逆変換部105は、求めた変換係数について逆変換を行い、残差
信号を算出する。逆量子化・逆変換部105は、算出した残差信号を加算部106に出力する。
The inverse quantization / inverse conversion unit 105 is the inverse quantization / inverse conversion unit 311 (FIG. 4) in the moving image decoding device 31.
), And the quantization conversion coefficient input from the conversion / quantization unit 103 is inversely quantized to obtain the conversion coefficient. The inverse quantization / inverse conversion unit 105 performs inverse conversion on the obtained conversion coefficient and calculates a residual signal. The inverse quantization / inverse conversion unit 105 outputs the calculated residual signal to the addition unit 106.

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

ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ1071、適応オフセット(SAO)1072、適応フィルタ(ALF)1073を施す。 The loop filter 107 applies a deblocking filter 1071, an adaptive offset (SAO) 1072, and an adaptive filter (ALF) 1073 to the decoded image generated by the addition unit 106.

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

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

符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化
誤差を示すRDコスト値を算出する。RDコスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化残差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出
された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したRDコスト値
が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、
選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110
は決定した符号化パラメータを予測パラメータメモリ108に記憶する。
The coding parameter determination unit 110 calculates an RD cost value indicating the magnitude of the amount of information 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 amount of information of the coded stream Te obtained by entropy-coding the quantization residuals and the coding parameters. The squared error is the sum of the squared values of the residual values of the residual signal calculated by the subtracting unit 102 between the pixels. The coefficient λ is a real number greater than the preset zero. The coding parameter determination unit 110 selects the set of coding parameters that minimizes the calculated RD cost value. As a result, the entropy coding unit 104 outputs the selected set of coding parameters as a coding stream Te to the outside.
Do not output a set of unselected coding parameters. Coding parameter determination unit 110
Stores the determined coding parameter in the prediction parameter memory 108.

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

インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。 The inter-prediction parameter coding unit 112 derives an inter-prediction parameter such as a difference vector based on the prediction parameter input from the coding parameter determination unit 110.

また、イントラ予測パラメータ符号化部113は、予測画像生成部101に出力する予測画像の生成に必要な予測パラメータを導出する構成として、イントラ予測パラメータ復号部304がイントラ予測パラメータを導出する構成と、一部同一の構成を含む。 Further, the intra prediction parameter coding unit 113 has a configuration in which the intra prediction parameter decoding unit 304 derives the intra prediction parameter as a configuration for deriving the prediction parameter necessary for generating the prediction image to be output to the prediction image generation unit 101. Includes some identical configurations.

デブロッキングフィルタ1071は、局所復号画像Pにおけるブロック境界、またはCU境界を介して互いに隣接する画素の画素値の差が予め定められた閾値よりも小さい場合に、局所復号画像Pにおける当該ブロック境界、または当該CU境界に対してデブロッキング処理を施す。そして、当該ブロック境界、または当該CU境界付近の画像の平滑化を行う。デブロッキングフィルタ1071によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBとして、適応オフセットフィルタ1072に出力される。 The deblocking filter 1071 determines the block boundary in the locally decoded image P, or the block boundary in the locally decoded image P, when the difference between the pixel values of the pixels adjacent to each other via the CU boundary is smaller than a predetermined threshold value. Alternatively, deblocking processing is performed on the CU boundary. Then, the image in the vicinity of the block boundary or the CU boundary is smoothed. The image deblocked by the deblocking filter 1071 is output to the adaptive offset filter 1072 as a deblocked decoded image P_DB.

適応オフセットフィルタ1072は、その入力画像に対して、適応的オフセットフィルタ処理を施すことによってオフセットフィルタ済復号画像P_OFを生成する。生成されたオフセットフィルタ済復号画像P_OFは、適応フィルタ1073に供給される。適応オフセットフィルタ80の具体的な構成については、後述する。 The adaptive offset filter 1072 generates an offset filtered decoded image P_OF by performing an adaptive offset filter process on the input image. The generated offset filtered decoded image P_OF is supplied to the adaptive filter 1073. The specific configuration of the adaptive offset filter 80 will be described later.

適応フィルタ1073は、適応オフセットフィルタ1072から供給されるオフセットフィルタ済復号画像P_OFに対して、適応的なフィルタ処理を施すことによって、フィルタ済復号画像P_FLを生成する。適応フィルタ1073によりフィルタ処理が施されたフィルタ済復号画像P_FLは、参照ピクチャメモリ109に格納される。適応フィルタ1073によって
用いられるフィルタ係数は、フィルタ済復号画像P_FLと符号化対象画像Tとの誤差が
より小さくなるように定められたものであり、このようにして定められたフィルタ係数がフィルタパラメータFPとして符号化され、動画像復号装置11に伝送される。
The adaptive filter 1073 generates a filtered decoded image P_FL by subjecting the offset filtered decoded image P_OF supplied from the adaptive offset filter 1072 to an adaptive filtering process. The filtered decoded image P_FL filtered by the adaptive filter 1073 is stored in the reference picture memory 109. The filter coefficient used by the adaptive filter 1073 is defined so that the error between the filtered decoded image P_FL and the encoded image T becomes smaller, and the filter coefficient determined in this way is the filter parameter FP. Is encoded and transmitted to the moving image decoding device 11.

(適応オフセットフィルタ1072)
次に、適応オフセットフィルタ1072について、図23を参照して説明する。図23は、適応オフセットフィルタ1072の構成を示すブロック図である。図23に示すように、適応オフセットフィルタ1072は、SAOパラメータ設定部81、SAOパラメータ号化部83
、SAOパラメータ格納部84、および適応フィルタ部62を含む構成である。
(Adaptive offset filter 1072)
Next, the adaptive offset filter 1072 will be described with reference to FIG. FIG. 23 is a block diagram showing the configuration of the adaptive offset filter 1072. As shown in FIG. 23, the adaptive offset filter 1072 includes a SAO parameter setting unit 81 and a SAO parameter numbering unit 83.
, SAO parameter storage unit 84, and adaptive filter unit 62.

(SAOパラメータ設定部81)
SAOパラメータ設定部81は、対象となる処理単位(例えばCTU)について、入力さ
れる動画像Tと、適応フィルタ部62の入力画像(デブロック済復号画像P_DBもしく
は局所復号画像P)に基づいて、各処理単位に対して適用するSAOオフセット情報を設定して出力する。SAOオフセット情報は、オフセットタイプsao_type_idxおよびオフセットSaoOffsetValを含む。オフセットタイプsao_type_idxがバンドオフセットの場合には、バンドオフセット位置sao_band_positionも設定して出力する。なお、SAOオフセッ
ト情報の各パラメータの値は、符号化効率がより向上するよう設定するとよい。
(SAO parameter setting unit 81)
The SAO parameter setting unit 81 determines the target processing unit (for example, CTU) based on the input moving image T and the input image (deblocked decoded image P_DB or locally decoded image P) of the adaptive filter unit 62. The SAO offset information to be applied to each processing unit is set and output. SAO offset information includes offset type sao_type_idx and offset SaoOffsetVal. If the offset type sao_type_idx is a band offset, the band offset position sao_band_position is also set and output. The value of each parameter of the SAO offset information may be set so as to further improve the coding efficiency.

SAOパラメータ設定部81は、SAOオフセット情報を含むSAOパラメータSAOPを、SAOパラメータ号化部83に出力する。 The SAO parameter setting unit 81 outputs the SAO parameter SAOP including the SAO offset information to the SAO parameter numbering unit 83.

(SAOパラメータ号化部83)
SAOパラメータ号化部83は、SAOパラメータ設定部81で設定されたSAOパラメータSAOPを符号化する。より詳細には、SAOオフセット情報の符号化データは処理単位(例えばCTU)毎に、算術符号を用いた可変長符号化によって生成され、スライス
データSDATA内の各処理単位毎に格納される。処理単位がCTU単位の場合において、設定されたパラメータが、既に符号化されたCTUのパラメータと等しい場合には、マージを
用いることを示す値を設定したマージ制御情報(sao_merge_left_flag, sao_merge_up_flag)を符号化し、オフセットタイプsao_type_idx及びオフセットsao_offsetは符号化しない。逆に、対象CTUのパラメータが隣接CTUのパラメータと等しくない場合には、マージを用いないことを示す値を設定したマージ制御情報を符号化し、オフセットタイプsao_type_idx及びオフセットsao_offsetを符号化する。より具体的には、対象CTUの左に隣接
するCTUとパラメータが等しい場合には、sao_merge_left_flag=1、対象CTUの上に
隣接するCTUとパラメータが等しい場合には、sao_merge_up_flag=1とし、それ以外の場合には、マージ制御情報を0とする。なお、符号化されたパラメータは、SAOパラメータ格納部84に格納される。
(SAO Parameter No. 83)
The SAO parameter numbering unit 83 encodes the SAO parameter SAOP set by the SAO parameter setting unit 81. More specifically, the coded data of the SAO offset information is generated for each processing unit (for example, CTU) by variable length coding using an arithmetic code, and is stored for each processing unit in the slice data SDATA. When the processing unit is CTU unit, if the set parameter is equal to the already encoded CTU parameter, the merge control information (sao_merge_left_flag, sao_merge_up_flag) with a value indicating that merge is used is encoded. , Offset type sao_type_idx and offset sao_offset are not encoded. On the contrary, when the parameter of the target CTU is not equal to the parameter of the adjacent CTU, the merge control information in which the value indicating that the merge is not used is set is encoded, and the offset type sao_type_idx and the offset sao_offset are encoded. More specifically, sao_merge_left_flag = 1 when the parameter is equal to the CTU adjacent to the left of the target CTU, sao_merge_up_flag = 1 when the parameter is equal to the CTU adjacent above the target CTU, and other cases. In this case, the merge control information is set to 0. The encoded parameters are stored in the SAO parameter storage unit 84.

(SAOパラメータ格納部84)
SAOパラメータ格納部84は、SAOパラメータ符号化部83が符号化したSAOパラメータSAOPを格納している。またSAOパラメータ格納部84は、オフセット情報の他、オフセット設定情報(例えば、オフセット開始位置、バンド幅情報)や、単位領域の分布情報(例えば、最小値minCTU、最大値maxCTU)を格納してもよい。さらに、複数のバンドを用いるかを示すバンド数選択情報dblBandFlagを格納してもよい。
(SAO parameter storage unit 84)
The SAO parameter storage unit 84 stores the SAO parameter SAOP encoded by the SAO parameter coding unit 83. Further, the SAO parameter storage unit 84 may store offset setting information (for example, offset start position, bandwidth information) and unit area distribution information (for example, minimum value minCTU, maximum value maxCTU) in addition to offset information. Good. Further, the band number selection information dblBandFlag indicating whether to use a plurality of bands may be stored.

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

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

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

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

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

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

送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像
するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部PRED_A7を更に備えていてもよい。図24(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示して
いるが、一部を省略しても構わない。
The transmitter PROD_A has a camera PROD_A4 for capturing a moving image, a recording medium PROD_A5 for recording a moving image, an input terminal PROD_A6 for inputting a moving image from the outside, and a moving image as a source of the moving image to be input to the coding unit PROD_A1. , An image processing unit PRED_A7 for generating or processing an image may be further provided. In FIG. 24A, a configuration in which the transmitting device PROD_A includes all of them 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 recording of an unencoded moving image, or a moving image encoded by a recording coding method different from the transmission coding method. It may be a thing. In the latter case, a decoding unit (decoding unit) that decodes the coded data read from the recording medium PROD_A5 between the recording medium PROD_A5 and the coding unit PROD_A1 according to the coding method for recording.
(Not shown) may be used.

図25(b)は、動画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック
図である。図24(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_
B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復
調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した動画像復号装置31は、この復号部PROD_B3として利用される。
FIG. 25B 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. 24 (b), the receiving device PROD_B is a receiving unit PROD_ that receives the modulated signal.
B1, the demodulation unit PROD_B2 that obtains the coded data by demodulating the modulated signal received by the reception unit PROD_B1, and the decoding unit PROD_B3 that obtains the moving image by decoding the coded data obtained by the demodulation unit PROD_B2. I have. The moving image decoding device 31 described above is used as the decoding unit PROD_B3.

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

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

なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。 The transmission medium for transmitting the modulated signal may be wireless or wired. Further, the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the destination is not specified in advance) or communication (here, transmission in which the destination is specified in advance). Refers to an aspect). 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 broadcasting station (broadcasting equipment, etc.) / receiving station (television receiver, etc.) of terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by radio broadcasting. Further, a broadcasting station (broadcasting equipment, etc.) / receiving station (television receiver, etc.) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by wired broadcasting.

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

なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。 The client of the video 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 video sharing service functions as both the transmitting device PROD_A and the receiving device PROD_B.

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

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

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

また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像
を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図25(a)においては、これら全てを記録装置PROD_Cが備えた構成
を例示しているが、一部を省略しても構わない。
Further, the recording device PROD_C has a camera PROD_C3 that captures a moving image, an input terminal PROD_C4 for inputting a moving image from the outside, and a reception for receiving the moving image as a source of the moving image to be input to the coding 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. 25 (a), a configuration in which the recording device PROD_C is provided with all of these is illustrated, but some of them may be omitted.

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

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

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

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

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

なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし
、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。
The transmission unit PROD_D5 may transmit an unencoded moving image, or transmits coded data encoded by a transmission coding method different from the recording coding method. It may be something to do. In the latter case, it is preferable to interpose a coding unit (not shown) that encodes the moving image by a coding method for transmission between the decoding unit PROD_D2 and the transmitting 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, and the like (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected is the main supply destination of moving images). .. In addition, a television receiver (in this case, display PROD_D3 is the main supply destination of moving images) and digital signage (also called electronic signage or electronic bulletin board, etc., and display PROD_D3 or transmitter PROD_D5 is the main supply destination of moving images. (First), desktop PC (in this case, output terminal PROD_D4 or transmitter PROD_D5 is the main supply destination of moving images), laptop or tablet PC (in this case, display PROD_D3 or transmitter PROD_D5 is video) An example of such a playback device PROD_D is a smartphone (in this case, the display PROD_D3 or the transmitter PROD_D5 is the main supply destination of the moving image), which is the main supply destination of the image.

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

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

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

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

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

31 動画像復号装置(画像復号装置)
11 動画像符号化装置(画像符号化装置)
301 エントロピー復号部(復号手段)
308 予測画像生成部
309 インター予測画像生成部
310 イントラ予測画像生成部
104 エントロピー符号化部(符号化手段)
108 予測画像生成部
109 インター予測画像生成部
110 イントラ予測画像生成部
3052 適応オフセットフィルタ(画像フィルタ装置)
61 SAOパラメータ復号部(復号手段、オフセット復号手段、適応オフセット情報コピー手段)
63 オフセット設定部(オフセット選択手段)
1072 適応オフセットフィルタ(画像フィルタ装置)
621 特性値算出部(バンド分類手段)
624 オフセット割り付け部
625 オフセット適用部(フィルタ手段)
31 Moving image decoding device (image decoding device)
11 Video coding device (image coding device)
301 Entropy decoding unit (decoding means)
308 Prediction image generation unit 309 Inter prediction image generation unit 310 Intra prediction image generation unit 104 Entropy coding unit (encoding means)
108 Prediction image generation unit 109 Inter-prediction image generation unit 110 Intra-prediction image generation unit 3052 Adaptive offset filter (image filter device)
61 SAO parameter decoding unit (decoding means, offset decoding means, adaptive offset information copying means)
63 Offset setting unit (offset selection means)
1072 Adaptive offset filter (image filter device)
621 Characteristic value calculation unit (band classification means)
624 Offset allocation unit 625 Offset application unit (filter means)

Claims (16)

複数の単位領域から構成される入力画像の各画素値に、オフセットを加算する画像フィルタ装置であって、
上記単位領域内の画素値に応じて当該画素値を、バンド設定情報に基づいて、1つ以上のバンドに分類し、バンドを示すバンドインデックスを導出するバンド分類導出手段と
バンドインデックスに応じて前記オフセットの1つを選択するオフセット選択手段と、
当該画素値に選択されたオフセットを加算するフィルタ手段を備え、
上記バンド分類導出手段は、単位領域の情報に応じてバンド設定情報を設定することを特徴とする画像フィルタ装置。
An image filter device that adds an offset to each pixel value of an input image composed of a plurality of unit areas.
The pixel value is classified into one or more bands based on the band setting information according to the pixel value in the unit region, and the band classification derivation means for deriving the band index indicating the band and the band index are described. Offset selection means to select one of the offsets,
A filter means for adding the selected offset to the pixel value is provided.
The band classification derivation means is an image filter device characterized in that band setting information is set according to information in a unit area.
上記バンド分類導出手段は、色コンポーネントに応じてバンド設定情報を設定することを特徴とする請求項1に記載の画像フィルタ装置。 The image filter device according to claim 1, wherein the band classification derivation means sets band setting information according to a color component. 画像フィルタ装置手段は、色コンポーネントごとのバンド設定情報をバンド分類導出手段で設定することを特徴とする請求項1に記載の画像フィルタ装置。 The image filter device according to claim 1, wherein the image filter device means sets band setting information for each color component by the band classification derivation means. 上記バンド分類導出手段は、単位領域の画素値の少なくとも最大値と最小値、平均値のいずれか一つに応じてバンド設定情報を設定することを特徴とする請求項1に記載の画像フィルタ装置。 The image filter device according to claim 1, wherein the band classification derivation means sets band setting information according to at least one of a maximum value, a minimum value, and an average value of pixel values in a unit region. .. 上記バンド分類導出手段は、単位領域の画素値の最大値、最小値、平均値を、単位領域の下側所定幅の画素と右側所定の幅の画素を用いて上記バンド設定情報を導出することを特徴とする請求項4に記載の画像フィルタ装置。 The band classification derivation means derives the band setting information from the maximum value, the minimum value, and the average value of the pixel values in the unit area by using the pixels having a predetermined width on the lower side and the pixels having a predetermined width on the right side of the unit area. The image filter device according to claim 4. 上記画像フィルタ装置は、既に復号したオフセット情報をコピーする適応オフセット情報コピー手段を備え、
さらに、適応オフセット情報コピー手段は、オフセット情報に加え、バンド設定情報を備えることを特徴とする請求項1に記載の画像フィルタ装置。
The image filter device includes an adaptive offset information copying means for copying the already decoded offset information.
The image filter device according to claim 1, wherein the adaptive offset information copying means includes band setting information in addition to the offset information.
上記バンド設定情報は、バンドの幅、バンドの先頭位置であることを特徴とする請求項1に記載の画像フィルタ装置。 The image filter device according to claim 1, wherein the band setting information is a band width and a band head position. 上記バンド分類導出手段は、第1のバンドの先頭位置と、第2のバンドの先頭位置に基づいて導出し、上記オフセット選択手段は、上記第1のバンドと第2のバンドの両方もしくはいずれか一方に基づいてオフセットを選択することを特徴とする請求項1に記載の画像フィルタ装置。 The band classification derivation means derives based on the head position of the first band and the head position of the second band, and the offset selection means is either or both of the first band and the second band. The image filter device according to claim 1, wherein the offset is selected based on one of the two. 上記第1のバンドの先頭位置と、上記のバンドの先頭位置は、バンド幅の半分だけシフトした位置にあることを特徴とする請求項8に記載の画像フィルタ装置。 The image filter device according to claim 8, wherein the head position of the first band and the head position of the band are shifted by half the bandwidth. 上記バンド分類導出手段は、単位領域の範囲に応じて、第1のバンドを用いるか、第1のバンドと第2のバンドを用いるかを選択することを特徴とする請求項9に記載の画像フィルタ装置。 The image according to claim 9, wherein the band classification derivation means selects whether to use the first band or the first band and the second band according to the range of the unit region. Filter device. 上記適応オフセット情報コピー手段は、オフセット情報に加え、第1のバンドを用いるか、第1のバンドと第2のバンドを用いるかのバンド数選択情報をコピーすることを特徴とする請求項10に記載の画像フィルタ装置。 10. The adaptive offset information copying means according to claim 10, wherein, in addition to the offset information, the band number selection information of whether to use the first band or to use the first band and the second band is copied. The image filter device described. 上記画像フィルタ装置は、バンド数をさらに復号することを特徴とする請求項1に記載
の画像フィルタ装置。
The image filter device according to claim 1, wherein the image filter device further decodes the number of bands.
上記画像フィルタ装置は、オフセット数をさらに復号することを特徴とする請求項1に記載の画像フィルタ装置。 The image filter device according to claim 1, wherein the image filter device further decodes the number of offsets. 上記請求項1から13に記載の画像フィルタ装置を備える画像復号装置。 An image decoding device including the image filter device according to any one of claims 1 to 13. 上記請求項1から13に記載の画像フィルタ装置を備える画像符号化装置。 An image coding device including the image filter device according to any one of claims 1 to 13. 画像復号装置において復号される、予測画像と原画像との差分である予測残差が符号化された符号化データのデータ構造であって、
上記予測残差を復号して得られる画素値をバンドに分類するために用いるパラメータであるバンド設定情報を含むことを特徴とする符号化データのデータ構造。
It is a data structure of coded data in which the predicted residual, which is the difference between the predicted image and the original image, is encoded by the image decoding device.
A data structure of coded data including band setting information which is a parameter used for classifying pixel values obtained by decoding the predicted residuals into bands.
JP2018001187A 2018-01-09 2018-01-09 Image filter device, image decoding device, image encoding device, and data structure Pending JP2021057620A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018001187A JP2021057620A (en) 2018-01-09 2018-01-09 Image filter device, image decoding device, image encoding device, and data structure
PCT/JP2019/000256 WO2019139012A1 (en) 2018-01-09 2019-01-08 Image filter device, image decoder, image encoder, and data structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018001187A JP2021057620A (en) 2018-01-09 2018-01-09 Image filter device, image decoding device, image encoding device, and data structure

Publications (1)

Publication Number Publication Date
JP2021057620A true JP2021057620A (en) 2021-04-08

Family

ID=67219033

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018001187A Pending JP2021057620A (en) 2018-01-09 2018-01-09 Image filter device, image decoding device, image encoding device, and data structure

Country Status (2)

Country Link
JP (1) JP2021057620A (en)
WO (1) WO2019139012A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9008170B2 (en) * 2011-05-10 2015-04-14 Qualcomm Incorporated Offset type and coefficients signaling method for sample adaptive offset
JP2015216627A (en) * 2014-04-23 2015-12-03 ソニー株式会社 Image processing device and image processing method
JP6269431B2 (en) * 2014-10-10 2018-01-31 ソニー株式会社 Image processing apparatus, image processing method, and image processing system
KR102423880B1 (en) * 2015-10-06 2022-07-21 삼성전자주식회사 Method for operating of encoder, and method for operating system on chip including encoder

Also Published As

Publication number Publication date
WO2019139012A1 (en) 2019-07-18

Similar Documents

Publication Publication Date Title
JP6957715B2 (en) Image filter device, filter method and moving image decoding device
JP7223886B2 (en) Image decoding method
JP2021010046A (en) Image encoding device and image decoding device
WO2018037853A1 (en) Image decoding apparatus and image coding apparatus
WO2017195532A1 (en) Image decoding device and image encoding device
JP7368145B2 (en) Image encoding device and image decoding device
CN111698519B (en) Image decoding device and image encoding device
WO2020116376A1 (en) Moving image decoding device and moving image encoding device
JP7139144B2 (en) image filter device
WO2013046990A1 (en) Offset decoding apparatus, offset encoding apparatus, image filter apparatus, and data structure
JP2022048142A (en) Image decoding device
WO2020184366A1 (en) Image decoding device
JP2020072277A (en) Video encoding device and video decoding device
JP2020141285A (en) Image decoder
WO2021246284A1 (en) Moving image decoding device and moving image encoding device
WO2019139012A1 (en) Image filter device, image decoder, image encoder, and data structure
WO2019142764A1 (en) Moving-image coding device, moving-image decoding device, and moving-image filter device
JP2021010050A (en) Video encoding device, video decoding device, and filter device
JP2021034848A (en) Image decoding device
JP2020195013A (en) Image decoding device and image encoding device
JP2020205483A (en) Image decoding device and image encoding device
JP2021013110A (en) Image decoding device and image encoding device
JP2021153214A (en) Dynamic image encoder and dynamic image decoder
JP2020182177A (en) Image decoding device and image encoding device