JP2013223051A - Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device - Google Patents

Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device Download PDF

Info

Publication number
JP2013223051A
JP2013223051A JP2012092483A JP2012092483A JP2013223051A JP 2013223051 A JP2013223051 A JP 2013223051A JP 2012092483 A JP2012092483 A JP 2012092483A JP 2012092483 A JP2012092483 A JP 2012092483A JP 2013223051 A JP2013223051 A JP 2013223051A
Authority
JP
Japan
Prior art keywords
coefficient
unit
decoding
sub
block
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
JP2012092483A
Other languages
Japanese (ja)
Inventor
Tomohiro Igai
知宏 猪飼
Kenji Tsukuba
健史 筑波
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 JP2012092483A priority Critical patent/JP2013223051A/en
Publication of JP2013223051A publication Critical patent/JP2013223051A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce a memory amount related to coding and decoding of transform coefficients, and improve throughput.SOLUTION: A coefficient presence flag context derivation unit 124z provided in a coefficient level decoding unit 124 derives a context index to be allocated to each transform coefficient presence flag belonging to a target sub-block by referring to the value of a decoded transform coefficient.

Description

本発明は、算術符号化された符号化データを復号する算術復号装置、および、そのような算術復号装置を備えている画像復号装置に関する。また、算術符号化された符号化データを生成する算術符号化装置、および、そのような算術符号化装置を備えている画像符号化装置に関する。   The present invention relates to an arithmetic decoding device that decodes encoded data that has been arithmetically encoded, and an image decoding device that includes such an arithmetic decoding device. The present invention also relates to an arithmetic encoding device that generates encoded data that has been arithmetically encoded, and an image encoding device that includes such an arithmetic encoding device.

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

具体的な動画像符号化方式としては、例えば、H.264/MPEG−4.AVCや、その後継コーデックであるHEVC(High-Efficiency Video Coding)にて提案されている方式(非特許文献1)などが挙げられる。   As a specific moving picture encoding method, for example, H.264 is used. H.264 / MPEG-4. Examples include AVC and a method proposed by HEVC (High-Efficiency Video Coding) as a successor codec (Non-patent Document 1).

このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化単位(コーディングユニット(Coding Unit)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックおよびパーティションからなる階層構造により管理され、普通、ブロックごとに符号化/復号される。   In such a moving image coding system, an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit (Coding Unit) obtained by dividing the slice. And is managed by a hierarchical structure composed of blocks and partitions obtained by dividing an encoding unit, and is normally encoded / decoded block by block.

また、このような符号化方式においては、通常、入力画像を符号化及び復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像と入力画像との差分画像(「残差画像」または「予測残差」と呼ぶこともある)をブロック毎にDCT(Discrete Cosine Transform)変換等の周波数変換を施すことによって得られる変換係数が符号化される。   In such an encoding method, a predicted image is usually generated based on a locally decoded image obtained by encoding and decoding an input image, and a difference image between the predicted image and the input image (“residual”). A transform coefficient obtained by performing frequency transform such as DCT (Discrete Cosine Transform) transform for each block is encoded.

変換係数の具体的な符号化の方式としては、コンテキスト適応型2値算術符号化(CABAC:Context-based Adaptive Binary Arithmetic Coding)が知られている。   As a specific coding method for transform coefficients, context-adaptive binary arithmetic coding (CABAC) is known.

CABACでは、変換係数を表す各種のシンタックスに対して2値化処理が施され、この2値化処理によって得られた2値データが算術符号化される。ここで、上記各種のシンタックスとしては、変換係数が0であるか否かを示すフラグ、すなわち非0変換係数の有無を示すフラグsignificant_coeff_flag(変換係数有無フラグとも呼ぶ)、並びに、処理順で最後の非0変換係数の位置を示すシンタックスlast_significant_coeff_x及びlast_significant_coeff_yなどが挙げられる。   In CABAC, binarization processing is performed on various syntaxes representing transform coefficients, and binary data obtained by the binarization processing is arithmetically encoded. Here, the various syntaxes include a flag indicating whether or not the transform coefficient is 0, that is, a flag significant_coeff_flag (also referred to as a transform coefficient presence / absence flag) indicating the presence or absence of a non-zero transform coefficient, and the last in the processing order. Syntax last_significant_coeff_x and last_significant_coeff_y indicating the position of the non-zero transform coefficient.

また、CABACでは、シンボル(2値データの1ビット、Binとも呼ぶ)を1つ符号化する際、処理対象の周波数成分に割り付けられたコンテキストインデックスが参照され、当該コンテキストインデックスによって指定されるコンテキスト変数に含まれる確率状態インデックスの指し示す発生確率に応じた算術符号化が行われる。また、確率状態インデックスによって指定される発生確率は、シンボルを1つ符号化する毎に更新される。   In CABAC, when one symbol (1 bit of binary data, also referred to as Bin) is encoded, a context index assigned to a frequency component to be processed is referred to, and a context variable designated by the context index is referred to. Is subjected to arithmetic coding according to the occurrence probability indicated by the probability state index included in. The occurrence probability specified by the probability state index is updated every time one symbol is encoded.

非特許分献1には、変換係数有無フラグを、当該周波数成分の周辺の周波数成分における非ゼロ係数の数に応じて定まるコンテキストインデックスを導出する方法が開示されている。   Non-patent distribution 1 discloses a method of deriving a context index that is determined according to the number of non-zero coefficients in frequency components around the frequency component, using a transform coefficient presence / absence flag.

非特許文献2には、変換係数有無フラグとレベルの復号を統合する方法として、当該周波数成分の周辺の周波数成分におけるレベルの絶対値和を用いて、変換係数有無フラグのコンテキストインデックスとレベルの復号のコンテキストインデックスを求める方法が知られている。   In Non-Patent Document 2, as a method for integrating the transform coefficient presence / absence flag and level decoding, the context index of the transform coefficient presence / absence flag and the level decoding are performed using the sum of absolute levels of the frequencies around the frequency component. A method for obtaining the context index is known.

「High Efficiency Video Coding (HEVC) text specification draft 6 (JCTVC-H1003_dK)」, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 6th Meeting: San Jose, US, 1-10 Feburary, 2012(2012年2月17日公開)`` High Efficiency Video Coding (HEVC) text specification draft 6 (JCTVC-H1003_dK) '', Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 6th Meeting: San Jose , US, 1-10 Feburary, 2012 (released February 17, 2012) 「Non-CE11: Proposed Cleanup for Transform Coefficient Coding(JCTVC-H0228v1)」, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 6th Meeting: San Jose, US, 1-10 Feburary, 2012(2012年1月20日公開)"Non-CE11: Proposed Cleanup for Transform Coefficient Coding (JCTVC-H0228v1)", Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 6th Meeting: San Jose, US, 1-10 Feburary, 2012 (released January 20, 2012)

しかしながら、上述の非特許文献1の技術では、変換係数有無フラグとレベルの復号とが統合されていないため、個別の実装が必要であり、実装規模が大きくなるという課題があった。   However, in the technique of Non-Patent Document 1 described above, since the transform coefficient presence / absence flag and the level decoding are not integrated, there is a problem in that individual mounting is necessary and the mounting scale increases.

また、非特許文献2の技術では、変換係数有無フラグとレベルの復号とが統合されているが、高スループットおよびメモリサイズに課題が生じる。具体的には、非特許文献2の技術では、当該周波数成分の周辺の周波数成分におけるレベルの絶対値和を高スループットで求めるためには、レベルの絶対値を高速なメモリに配置する必要があり、このためレベルの絶対値をそのまま保持するには多くのメモリを要するという課題がある。また、その一方で、高速メモリに配置できない場合にはスループットが低下する。   In the technique of Non-Patent Document 2, the transform coefficient presence / absence flag and the level decoding are integrated, but problems arise in high throughput and memory size. Specifically, in the technique of Non-Patent Document 2, in order to obtain the absolute value sum of the levels in the frequency components around the frequency component with high throughput, it is necessary to arrange the absolute value of the level in a high-speed memory. Therefore, there is a problem that a large amount of memory is required to hold the absolute value of the level as it is. On the other hand, when it cannot be arranged in a high-speed memory, the throughput decreases.

さらには、非特許文献2の技術では、高周波数に位置する変換係数についても、周辺の周波数成分のレベルを参照する必要があるため、非特許文献1の技術のように高周波数に位置する変換係数を位置コンテキストで導出する場合に比べ、スループットが低下するという課題があった。   Furthermore, in the technique of Non-Patent Document 2, it is necessary to refer to the level of the surrounding frequency component for the conversion coefficient located at a high frequency, so that the conversion located at a high frequency as in the technique of Non-Patent Document 1 is required. Compared to the case where the coefficients are derived in the position context, there is a problem that the throughput is reduced.

本発明は、上記の問題に鑑みてなされたものであり、その目的は、従来の構成に比べて変換係数の符号化及び復号に係るメモリ量を削減すること、および、スループットを向上させることのできる算術復号装置及び算術符号化装置等を実現することにある。   The present invention has been made in view of the above problems, and its object is to reduce the amount of memory related to coding and decoding of transform coefficients and to improve throughput as compared with the conventional configuration. It is intended to realize an arithmetic decoding device and an arithmetic encoding device that can be used.

上記の課題を解決するために、本発明に係る算術復号装置は、対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって得られた符号化データを復号する算術復号装置であって、処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割するサブブロック分割手段と、上記サブブロック分割手段により分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ復号手段と、上記各サブブロック内の各変換係数が0であるか否かを表す非0変換係数有無フラグを復号する非0変換係数有無フラグ復号手段と、上記各サブブロック内の各変換係数の大きさを復号する係数値復号手段と、復号済みの変換係数の値を参照することによってコンテキストインデックスを導出するコンテキストインデックス導出手段と、を備えることを特徴とする。   In order to solve the above-described problem, the arithmetic decoding device according to the present invention uses various syntaxes representing transform coefficients for transform coefficients obtained for each frequency component by performing frequency transform on the target image for each unit region. An arithmetic decoding device for decoding encoded data obtained by arithmetic encoding, a sub-block dividing means for dividing a target frequency region corresponding to a unit region to be processed into sub-blocks of a predetermined size, and the sub For each subblock divided by the block dividing means, subblock coefficient presence / absence flag decoding means for decoding a subblock coefficient presence / absence flag indicating whether or not the subblock includes at least one non-zero transform coefficient; Presence / absence of non-zero transform coefficient for decoding a non-zero transform coefficient presence / absence flag indicating whether or not each transform coefficient in the sub-block is zero Lag decoding means, coefficient value decoding means for decoding the size of each transform coefficient in each sub-block, and context index derivation means for deriving a context index by referring to the value of the decoded transform coefficient It is characterized by providing.

上記構成によれば、サブブロックごとに、該サブブロック内の各変換係数の値を参照することによってコンテキストインデックスを導出する。   According to the above configuration, the context index is derived for each sub-block by referring to the value of each transform coefficient in the sub-block.

このように、コンテキストインデックスの導出に、サブブロック内の各変換係数の値を用いることにより、非0の変換係数の数を用いる場合に比べ、高い精度のコンテキスト分類が可能になり、変換係数の符号量が低減する効果を奏する。また、コンテキストインデックスの導出において、サブブロック内の各変換係数の値を用いるため、従来の構成に比べて変換係数の符号化及び復号に係るメモリ量を削減でき、スループットが向上するという効果を奏する。   Thus, by using the value of each transform coefficient in the sub-block for derivation of the context index, it becomes possible to classify the context with higher accuracy than when using the number of non-zero transform coefficients. There is an effect that the amount of codes is reduced. In addition, since the value of each transform coefficient in the sub-block is used in the derivation of the context index, the amount of memory related to encoding and decoding of the transform coefficient can be reduced compared to the conventional configuration, and the throughput can be improved. .

その結果、従来の構成に比べて変換係数の符号化及び復号に係るメモリ量を削減すること、および、スループットを向上させることができるという効果を奏する。   As a result, it is possible to reduce the amount of memory related to encoding and decoding transform coefficients and improve the throughput as compared with the conventional configuration.

また、本発明に係る算術復号装置では、上記コンテキストインデックス導出手段は、復号済みの変換係数の絶対値を所定の値でクリップした値の和を用いることによってコンテキストインデックスを導出することが好ましい。   In the arithmetic decoding device according to the present invention, it is preferable that the context index deriving unit derives a context index by using a sum of values obtained by clipping absolute values of decoded transform coefficients with a predetermined value.

以上の構成では、所定の値でクリップされた復号済みの変換係数の絶対値を用いるため、復号済みの変換係数の絶対値を格納するためのメモリサイズが低減できる効果を奏する。   In the above configuration, since the absolute value of the decoded transform coefficient clipped with a predetermined value is used, the memory size for storing the absolute value of the decoded transform coefficient can be reduced.

また、本発明に係る算術復号装置では、サブブロック内で復号された非0変換係数の数をカウントするカウント手段を備え、上記コンテキストインデックス導出手段は、上記非0変換係数の数が所定の数以下の場合に、復号済みの変換係数の絶対値を用いてコンテキストインデックスを導出することが好ましい。   The arithmetic decoding apparatus according to the present invention further includes a counting unit that counts the number of non-zero transform coefficients decoded in the sub-block, and the context index deriving unit includes a predetermined number of the non-zero transform coefficients. In the following cases, it is preferable to derive the context index using the absolute value of the decoded transform coefficient.

以上の構成では、復号済みの非0変換係数の数が所定の数以下に限り、復号済みの変換係数を用いてコンテキストインデックスを導出するため、コンテキストインデックスの導出に必要な処理量が低減しスループットが向上する効果を奏する。   In the above configuration, since the context index is derived using the decoded transform coefficient only when the number of decoded non-zero transform coefficients is equal to or less than a predetermined number, the amount of processing necessary for derivation of the context index is reduced and the throughput is reduced. Has the effect of improving.

また、本発明に係る算術復号装置では、サブブロック内で復号された非0変換係数の数をカウントするカウント手段を備え、上記コンテキストインデックス導出手段は、対象変換係数よりも所定数前の非0変換係数有無フラグを復号した時点での上記非0変換係数の数が所定の数以下の場合に、復号済みの変換係数の絶対値を用いてコンテキストインデックスを導出することが好ましい。   The arithmetic decoding apparatus according to the present invention further includes a counting unit that counts the number of non-zero transform coefficients decoded in the sub-block, and the context index deriving unit includes a non-zero number before the target transform coefficient. When the number of the non-zero transform coefficients at the time when the transform coefficient presence / absence flag is decoded is equal to or smaller than a predetermined number, it is preferable to derive a context index using the absolute value of the decoded transform coefficient.

以上の構成では、コンテキストインデックスの導出に、対象変換係数の前の非0変換係数有無フラグの復号値に依存しないため、コンテキストインデックスのスループットが向上する効果を奏する。   In the above configuration, since the derivation of the context index does not depend on the decoded value of the non-zero transform coefficient presence / absence flag before the target transform coefficient, there is an effect that the throughput of the context index is improved.

なお、上記構成において、対象変換係数の前の前の非0変換係数有無フラグを復号した時点での上記非0変換係数の数が所定の数以下の場合に、復号済みの変換係数の絶対値を用いてコンテキストインデックスを導出しても構わない。   In the above configuration, the absolute value of the decoded transform coefficient when the number of the non-zero transform coefficients at the time of decoding the previous non-zero transform coefficient presence flag before the target transform coefficient is equal to or less than a predetermined number. The context index may be derived using

また、本発明に係る算術復号装置では、サブブロック内のループにおいて非0変換係数有無フラグを復号し、該ループとは別のサブブロック内のループにおいて変換係数の符号を復号することが好ましい。   In the arithmetic decoding apparatus according to the present invention, it is preferable that the non-zero transform coefficient presence / absence flag is decoded in a loop in the sub-block, and the code of the transform coefficient is decoded in a loop in a sub-block different from the loop.

以上の構成では、1つのサブブロック内において、個々の変換係数有無フラグと、変換係数の大きさを示すシンタックスを連続して配置した符号化データを復号することにより、変換係数有無フラグおよび変換係数の大きさを示すシンタックスのコンテキストインデックスを、既に復号した変換係数の値を用いて定めることができ、シンタックスの符号量が低減する効果を奏する。同時に、1つのサブブロック内の集合としてまとめられた変換係数の符号を連続してバイパスで復号することにより、一度に復号できる符号量が増加しスループットが向上する効果を奏する。   In the above configuration, the transform coefficient presence / absence flag and the transform are obtained by decoding the encoded data in which the individual transform coefficient presence / absence flags and the syntax indicating the size of the transform coefficient are sequentially arranged in one sub-block. A context index of syntax indicating the size of the coefficient can be determined using the value of the transform coefficient that has already been decoded, and the code amount of the syntax is reduced. At the same time, by continuously decoding the codes of the transform coefficients collected as a set in one sub-block by bypass, there is an effect that the amount of codes that can be decoded at a time is increased and the throughput is improved.

また、本発明に係る画像復号装置は、上記算術復号装置と、上記算術復号装置によって復号された変換係数を逆周波数変換することによって残差画像を生成する逆周波数変換手段と、上記逆周波数変換手段によって生成された残差画像と、生成済みの復号画像から予測された予測画像とを加算することによって復号画像を生成する復号画像生成手段と、を備えていることが望ましい。   An image decoding apparatus according to the present invention includes the arithmetic decoding apparatus, an inverse frequency converting unit that generates a residual image by performing inverse frequency conversion on a transform coefficient decoded by the arithmetic decoding apparatus, and the inverse frequency transform. It is desirable to include decoded image generation means for generating a decoded image by adding the residual image generated by the means and the predicted image predicted from the generated decoded image.

このように構成した画像復号装置も本発明の範疇であり、この場合においても、上記算術復号装置と同様の作用・効果を得ることができる。   An image decoding apparatus configured in this way is also within the scope of the present invention, and in this case as well, the same operations and effects as those of the arithmetic decoding apparatus can be obtained.

上記の課題を解決するために、本発明に係る算術符号化装置は、対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって符号化データを生成する算術符号化装置であって、処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割するサブブロック分割手段と、上記サブブロック分割手段により分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ復号手段と、上記各サブブロック内の各変換係数が0であるか否かを表す非0変換係数有無フラグを符号化する非0変換係数有無フラグ符号化手段と、上記各サブブロック内の各変換係数の大きさを符号化する係数値符号化手段と、符号化済みの変換係数の値を参照することによってコンテキストインデックスを導出するコンテキストインデックス導出手段と、を備えることを特徴とする。   In order to solve the above-described problems, the arithmetic coding apparatus according to the present invention includes various syntaxes representing transform coefficients for transform coefficients obtained for each frequency component by subjecting a target image to frequency transform for each unit region. An arithmetic encoding device for generating encoded data by arithmetically encoding a sub-block dividing means for dividing a target frequency region corresponding to a unit region to be processed into sub-blocks of a predetermined size, and the sub-block For each subblock divided by the dividing means, subblock coefficient presence / absence flag decoding means for decoding a subblock coefficient presence / absence flag indicating whether or not the subblock includes at least one non-zero transform coefficient; A non-zero transform coefficient presence / absence flag for encoding a non-zero transform coefficient presence / absence flag indicating whether each transform coefficient in the block is zero or not. Encoding means, coefficient value encoding means for encoding the size of each transform coefficient in each of the sub-blocks, and context index derivation for deriving a context index by referring to the value of the encoded transform coefficient And means.

また、本発明に係る画像符号化装置は、符号化対象画像と予測画像との残差画像を単位領域毎に周波数変換することによって変換係数を生成する変換係数生成手段と、請求項7に記載の算術符号化装置と、備えており、上記算術符号化装置は、上記変換係数生成手段によって生成された変換係数を表す各種のシンタックスを算術符号化することによって符号化データを生成するものである、ことが望ましい。   The image coding apparatus according to the present invention further includes transform coefficient generation means for generating a transform coefficient by frequency-converting a residual image between an encoding target image and a predicted image for each unit region, and The arithmetic encoding device generates encoded data by arithmetically encoding various syntaxes representing the transform coefficients generated by the transform coefficient generating means. It is desirable that there is.

このように構成した算術符号化装置、および画像符号化装置も本発明の範疇であり、この場合においても、上記算術復号装置と同様の作用・効果を得ることができる。   The arithmetic coding apparatus and the image coding apparatus configured as described above are also within the scope of the present invention, and in this case, the same operation and effect as the arithmetic decoding apparatus can be obtained.

本発明に係る算術復号装置は、対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって得られた符号化データを復号する算術復号装置であって、処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割するサブブロック分割手段と、上記サブブロック分割手段により分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ復号手段と、上記各サブブロック内の各変換係数が0であるか否かを表す非0変換係数有無フラグを復号する非0変換係数有無フラグ復号手段と、上記各サブブロック内の各変換係数の大きさを復号する係数値復号手段と、復号済みの変換係数の値を参照することによってコンテキストインデックスを導出するコンテキストインデックス導出手段と、を備える構成である。   The arithmetic decoding device according to the present invention is obtained by arithmetically encoding various syntaxes representing the transform coefficients for each transform coefficient obtained for each frequency component by performing frequency transform on the target image for each unit region. An arithmetic decoding device that decodes encoded data, comprising: a sub-block division unit that divides a target frequency region corresponding to a unit region to be processed into sub-blocks of a predetermined size; and each sub-block divided by the sub-block division unit Subblock coefficient presence / absence flag decoding means for decoding a subblock coefficient presence / absence flag indicating whether or not at least one non-zero transform coefficient is included in the subblock, and each transform coefficient in each subblock is 0 A non-zero transform coefficient presence / absence flag decoding means for decoding a non-zero transform coefficient presence / absence flag indicating whether or not A coefficient value decoding means for decoding the magnitude of each transform coefficient in the lock, and context index deriving means for deriving a context index by referring to the value of decoded transform coefficients, a structure comprising a.

本発明に係る算術符号化装置は、対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって符号化データを生成する算術符号化装置であって、処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割するサブブロック分割手段と、上記サブブロック分割手段により分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ復号手段と、上記各サブブロック内の各変換係数が0であるか否かを表す非0変換係数有無フラグを符号化する非0変換係数有無フラグ符号化手段と、上記各サブブロック内の各変換係数の大きさを符号化する係数値符号化手段と、符号化済みの変換係数の値を参照することによってコンテキストインデックスを導出するコンテキストインデックス導出手段と、を備える構成である。   The arithmetic coding apparatus according to the present invention performs coding by arithmetically coding various syntaxes representing the transform coefficients for each transform coefficient obtained for each frequency component by frequency transforming the target image for each unit region. An arithmetic coding apparatus for generating data, the sub-block dividing means for dividing a target frequency region corresponding to a unit area to be processed into sub-blocks of a predetermined size, and each sub-block divided by the sub-block dividing means A sub-block coefficient presence / absence flag decoding means for decoding a sub-block coefficient presence / absence flag indicating whether or not at least one non-zero transform coefficient is included in the sub-block, and each transform coefficient in each sub-block is 0 A non-zero transform coefficient presence / absence flag encoding means for encoding a non-zero transform coefficient presence / absence flag indicating whether or not each of the sub A coefficient value coding means for coding the size of each transform coefficient in the lock, and context index deriving means for deriving a context index by referring to the value of coded transform coefficients is configured to include.

よって、従来の構成に比べて変換係数の符号化及び復号に係るメモリ量を削減すること、および、スループットを向上させることができるという効果を奏する。   Therefore, it is possible to reduce the amount of memory related to encoding and decoding transform coefficients and improve the throughput as compared with the conventional configuration.

本発明の実施形態に係る動画像復号装置に含まれる係数レベル復号部の第1〜3の構成例を示すブロック図である。It is a block diagram which shows the 1st-3rd structural example of the coefficient level decoding part contained in the moving image decoding apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る動画像符号化装置によって生成され、動画像復号装置によって復号される符号化データのデータ構成を示す図であり、(a)〜(d)は、それぞれ、ピクチャレイヤ、スライスレイヤ、ツリーブロックレイヤ、およびCUレイヤを示す図である。It is a figure which shows the data structure of the encoding data produced | generated by the moving image encoder which concerns on embodiment of this invention, and decoded by a moving image decoder, (a)-(d) is respectively a picture layer, It is a figure which shows a slice layer, a tree block layer, and a CU layer. (a)〜(h)は、PU分割タイプのパターンを示す図であり、それぞれ、PU分割タイプが、2N×N、2N×nU、2N×nD、2N×N、2N×nU、および、2N×nDの場合のパーティション形状について示している。(i)〜(o)は、正方形のノードを正方形または非正方形に4分木分割する分割方式について示す図であり。(i)は、正方形の分割、(j)は、横長の長方形の分割、(k)は、縦長の長方形の分割、(l)は、横長のノードの横長の分割、(m)は、横長のノードの正方形の分割、(n)は、縦長のノードの縦長の分割、および(o)は、縦長のノードの正方形の分割を示している。(A)-(h) is a figure which shows the pattern of PU division | segmentation type, and PU division | segmentation type is 2NxN, 2NxnU, 2NxnD, 2NxN, 2NxnU, and 2N, respectively. The partition shape in the case of xnD is shown. (I)-(o) is a figure shown about the division | segmentation system which divides a square node into a square or a non-square by quadtree division. (I) is a square division, (j) is a horizontal rectangular division, (k) is a vertical rectangular division, (l) is a horizontal division of a horizontal node, and (m) is horizontal (N) shows the vertical division of the vertically long node, and (o) shows the square division of the vertical node. 比較例に係る符号化データの量子化残差情報に含まれるシンタックスを示すシンタックステーブルの前半部分を示す図である。It is a figure which shows the first half part of the syntax table which shows the syntax contained in the quantization residual information of the coding data which concerns on a comparative example. 比較例に係る符号化データの量子化残差情報に含まれるシンタックスを示すシンタックステーブルの後半部分を示す図である。It is a figure which shows the second half part of the syntax table which shows the syntax contained in the quantization residual information of the coding data which concerns on a comparative example. 実施形態に係る符号化データの量子化残差情報に含まれるシンタックスを示すシンタックステーブルの前半部分を示す図である。It is a figure which shows the first half part of the syntax table which shows the syntax contained in the quantization residual information of the coding data which concerns on embodiment. 実施形態に係る符号化データの量子化残差情報に含まれるシンタックスを示すシンタックステーブルの後半部分を示す図である。It is a figure which shows the second half part of the syntax table which shows the syntax contained in the quantization residual information of the coding data which concerns on embodiment. ブロックとサブブロックの関係を示す図である。(a)は、4×4TUが4×4成分からなる1個のサブブロックから構成される例を示す。(b)は、8×8TUが4×4成分からなる4個のサブブロックから構成される例を示す。(c)は、16×16TUが4×4成分からなる16個のサブブロックから構成される例を示す。It is a figure which shows the relationship between a block and a subblock. (A) shows an example in which 4 × 4 TU is composed of one sub-block composed of 4 × 4 components. (B) shows an example in which 8 × 8 TU is composed of four sub-blocks composed of 4 × 4 components. (C) shows an example in which 16 × 16 TU is composed of 16 sub-blocks composed of 4 × 4 components. 実施形態に係る復号処理及び符号化処理のスキャン順を説明するための図であって、(a)は、サブブロックスキャンが順スキャンである場合を示しており、(b)は、サブブロック内スキャンが順スキャンである場合を示しており、(c)は、サブブロックスキャンが逆スキャンである場合を示しており、(d)は、サブブロック内スキャンが逆スキャンである場合を示している。It is a figure for demonstrating the scanning order of the decoding process and encoding process which concern on embodiment, Comprising: (a) has shown the case where a subblock scan is a forward scan, (b) is in a subblock. The case where the scan is a forward scan is shown, (c) shows the case where the sub-block scan is a reverse scan, and (d) shows the case where the intra-sub-block scan is a reverse scan. . 実施形態における非0変換係数の復号処理を説明するための図であって、(a)は、TUサイズが8×8であるブロックが4×4のサイズのサブブロックに分割された場合に、順スキャンにて各周波数成分がスキャンされる場合のスキャン順を示しており、(b)は、TUサイズが8×8の周波数成分よりなる周波数領域における0でない変換係数(非0変化係数)を例示しており、(c)は、復号対象の変換係数が、(b)に示すものである場合の各サブブロックについて復号されたサブブロック係数有無フラグsignificant_coeff_group_flagの各値を示しており、(d)は、復号対象の変換係数が、図10(b)に示すものである場合の非0変換係数の有無を示すシンタックスsignificant_coeff_flagの各値を示しており、(e)は、復号対象の変換係数が、(b)に示すものである場合のシンタックスcoeff_abs_level_greater1_flag、及びcoeff_abs_level_remainingを復号することによって得られた各変換係数の絶対値を示しており、(f)は、復号対象の変換係数が、(b)に示すものである場合のシンタックスcoeff_sign_flagを示している。It is a figure for demonstrating the decoding process of the non-zero conversion coefficient in embodiment, Comprising: (a) is when the block whose TU size is 8x8 is divided | segmented into the subblock of 4x4 size, The scan order when each frequency component is scanned in the forward scan is shown, and (b) shows a non-zero transform coefficient (non-zero change coefficient) in the frequency domain composed of frequency components with a TU size of 8 × 8. (C) shows each value of the subblock coefficient presence / absence flag significant_coeff_group_flag decoded for each subblock when the transform coefficient to be decoded is the one shown in (b), and (d) ) Shows each value of the syntax significant_coeff_flag indicating the presence or absence of non-zero transform coefficients when the transform coefficients to be decoded are those shown in FIG. 10B, and (e) shows the transform to be decoded. Coefficient is (B) indicates the absolute value of each transform coefficient obtained by decoding the syntax coeff_abs_level_greater1_flag and coeff_abs_level_remaining in the case shown in (b), and (f) indicates that the transform coefficient to be decoded is (b) The syntax coeff_sign_flag in the case shown in FIG. 本実施形態の量子化残差情報QDの構成例を示す図である。It is a figure which shows the structural example of the quantization residual information QD of this embodiment. 実施形態に係る動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus which concerns on embodiment. 実施形態に係る動画像復号装置の備える可変長符号復号部の構成を示すブロック図である。It is a block diagram which shows the structure of the variable-length code decoding part with which the moving image decoding apparatus which concerns on embodiment is provided. 実施形態に係る動画像復号装置において利用可能なイントラ予測の方向について示す図である。It is a figure shown about the direction of the intra prediction which can be utilized in the moving image decoding apparatus which concerns on embodiment. イントラ予測モードと、当該イントラ予測モードに対応付けられている名前とを示す図である。It is a figure which shows intra prediction mode and the name matched with the said intra prediction mode. 上記可変長符号復号部の備える量子化残差情報復号部の構成を示すブロック図である。It is a block diagram which shows the structure of the quantization residual information decoding part with which the said variable length code decoding part is provided. イントラ予測モードインデックスIntraPredModeと、log2TrafoSize-2の各値とによって指定されるスキャンインデックスscanIdxの例を示す表である。It is a table | surface which shows the example of the scan index scanIdx designated with each value of intra prediction mode index IntraPredMode and log2TrafoSize-2. スキャンインデックスを説明するための図であって、(a)は、スキャンインデックスscanIdxの各値によって指定されるスキャンタイプScanTypeを示しており、(b)は、TUサイズが4×4であるときの、水平方向優先スキャン(horizontal fast scan)を示し、(c)は、TUサイズが4×4であるときの、垂直方向優先スキャン(vertical fast scan)、及び、(d)は、TUサイズが4×4であるときの、斜め方向スキャン(Up-right diagonal scan)の各スキャンのスキャン順の一例を示している。なお、(b)に示す水平方向優先スキャンは、サブブロックを上下半分に分割した小サブブロック単位に、水平方向へ斜め1列毎に係数をスキャンすることを特徴とし、(c)に示す垂直方向優先スキャンは、サブブロックを左右半分に分割した小サブブロック単位に垂直方向へ斜め1列毎に係数をスキャンすることを特徴としている。FIG. 6 is a diagram for explaining a scan index, where (a) shows a scan type ScanType specified by each value of the scan index scanIdx, and (b) shows a case where the TU size is 4 × 4. , (C) shows a vertical fast scan when the TU size is 4 × 4, and (d) shows a TU size of 4 An example of the scan order of each scan of the up-right diagonal scan when × 4 is shown. The horizontal direction priority scan shown in (b) is characterized in that the coefficient is scanned for each diagonal row in the horizontal direction in small sub-block units obtained by dividing the sub-block into upper and lower halves, and the vertical direction shown in (c). The direction-first scan is characterized in that the coefficient is scanned for each diagonal column in the vertical direction in small sub-block units obtained by dividing the sub-block into left and right halves. ブロックおよびサブブロックのスキャン順について示す図である。(a)〜(c)は、TUサイズが8×8であり、かつ、サブブロックサイズが4×4であるとき、スキャンインデックスscanIdxで指定される各スキャンタイプのスキャン順の一例を示している。また、(a)〜(c)に示す各例における矢印は、順スキャン方向を示している。なお、(a)に示す水平方向優先スキャンは、サブブロックを上下半分に分割した小サブブロック単位に、水平方向へ斜め1列毎に係数をスキャンすることを特徴とし、(b)に示す垂直方向優先スキャンは、サブブロックを左右半分に分割した小サブブロック単位に垂直方向へ斜め1列毎に係数をスキャンすることを特徴としている。It is a figure shown about the scanning order of a block and a subblock. (A)-(c) shows an example of the scan order of each scan type specified by the scan index scanIdx when the TU size is 8 × 8 and the sub-block size is 4 × 4. . Moreover, the arrow in each example shown to (a)-(c) has shown the forward scan direction. The horizontal direction priority scan shown in (a) is characterized in that the coefficient is scanned for each diagonal row in the horizontal direction in small sub-block units obtained by dividing the sub-block into upper and lower halves, and the vertical direction shown in (b). The direction-first scan is characterized in that the coefficient is scanned for each diagonal column in the vertical direction in small sub-block units obtained by dividing the sub-block into left and right halves. 実施形態に係るサブブロック係数有無フラグ復号部の構成を示すブロック図である。It is a block diagram which shows the structure of the subblock coefficient presence / absence flag decoding part which concerns on embodiment. 実施形態に係るサブブロック係数レベル復号部による復号処理を説明するための図であって、(a)は、対象サブブロック(xCG、yCG)と、対象サブブロックの下側に隣接する隣接サブブロック(xCG、yCG+1)とを示しており、(b)は、対象サブブロック(xCG、yCG)と、対象サブブロックの右側に隣接する隣接サブブロック(xCG+1、yCG)とを示しており、(c)は、対象サブブロック(xCG、yCG)と、対象サブブロックの下側に隣接する隣接サブブロック(xCG、yCG+1)と、対象サブブロックの右側に隣接する隣接サブブロック(xCG+1、yCG)とを示している。It is a figure for demonstrating the decoding process by the subblock coefficient level decoding part which concerns on embodiment, Comprising: (a) is an adjacent subblock adjacent to the lower side of an object subblock (xCG, yCG) and an object subblock (XCG, yCG + 1), and (b) shows the target subblock (xCG, yCG) and the adjacent subblock (xCG + 1, yCG) adjacent to the right side of the target subblock, (c ) Includes a target subblock (xCG, yCG), an adjacent subblock (xCG, yCG + 1) adjacent to the lower side of the target subblock, and an adjacent subblock (xCG + 1, yCG) adjacent to the right side of the target subblock. Show. 実施形態に係るサブブロック係数有無フラグ符号化及び復号処理を説明するための図であって、(a)は、16×16TUの周波数領域に存在する変換係数を示しており、(b)は、各サブブロックに割り付けられたサブブロック係数有無フラグを示している。It is a figure for demonstrating the subblock coefficient presence / absence flag encoding and decoding process which concerns on embodiment, Comprising: (a) has shown the transformation coefficient which exists in the frequency domain of 16x16TU, (b), A sub-block coefficient presence / absence flag assigned to each sub-block is shown. 係数レベル復号部におけるコンテキスト導出処理を示す図である。(a)〜(c)は、それぞれ、係数レベル復号部の第1〜3の構成例に対応している。It is a figure which shows the context derivation process in a coefficient level decoding part. (A) to (c) correspond to the first to third configuration examples of the coefficient level decoding unit, respectively. 実施形態に係る係数レベル復号部の備える係数有無フラグコンテキスト導出部によって、復号処理が逆スキャン順に行われる場合に参照される参照周波数成分を説明するための図であって、(a)は、周波数成分上の位置と選択するテンプレートの関係を示しており、(b)は、参照周波数成分c1、c2、c3、c4、c5を対象周波数成分xとの相対位置を示しており、(c)は、参照周波数成分c1、c2、c4、c5と対象周波数成分xとの相対位置を示しており、(d)は、参照周波数成分c1、c2、c4、c5と対象周波数成分xとの相対位置を示しおり、(e)は、4×4サブブロックにおける斜め方向スキャンのスキャン順(逆スキャン順)を表わしている。It is a figure for demonstrating the reference frequency component referred when the decoding process is performed in reverse scanning order by the coefficient presence / absence flag context deriving unit included in the coefficient level decoding unit according to the embodiment, where (a) is a frequency (B) shows the relative position of the reference frequency components c1, c2, c3, c4, and c5 with the target frequency component x, and (c) shows the relationship between the position on the component and the template to be selected. , Reference frequency components c 1, c 2, c 4, c 5 and the target frequency component x, and (d) shows the relative positions of the reference frequency components c 1, c 2, c 4, c 5 and the target frequency component x. (E) represents the scan order (reverse scan order) of the oblique scan in the 4 × 4 sub-block. 実施形態に係る変換係数復号部による変換係数復号処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the transform coefficient decoding process by the transform coefficient decoding part which concerns on embodiment. 実施形態に係る変換係数復号部によるサブブロック係数有無フラグを復号する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which decodes the subblock coefficient presence / absence flag by the transform coefficient decoding part which concerns on embodiment. 実施形態に係る係数レベル復号部の第1の構成例の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the 1st structural example of the coefficient level decoding part which concerns on embodiment. サブブロック内の各非ゼロ変換係数の符号を復号する処理(図25のステップS26)をより具体的に説明するためのフローチャートである。It is a flowchart for demonstrating more specifically the process (step S26 of FIG. 25) which decodes the code | symbol of each nonzero transform coefficient in a subblock. 実施形態に係る係数レベル復号部におけるサブブロック内の各非ゼロ変換係数の符号を復号する処理(図27のステップS2507)をより具体的に説明するためのフローチャートである。It is a flowchart for demonstrating more specifically the process (step S2507 of FIG. 27) which decodes the code | symbol of each non-zero transform coefficient in the subblock in the coefficient level decoding part which concerns on embodiment. 実施形態に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which concerns on embodiment. 実施形態に係る動画像符号化装置の備える可変長符号符号化部の構成を示すブロック図である。It is a block diagram which shows the structure of the variable-length code encoding part with which the moving image encoder which concerns on embodiment is provided. 本発明の実施形態に係る動画像符号化装置の備える量子化残差情報符号化部の構成を示すブロック図である。It is a block diagram which shows the structure of the quantization residual information encoding part with which the moving image encoder which concerns on embodiment of this invention is provided. 実施形態に係る係数レベル符号化部の第1の構成例を示すブロック図である。It is a block diagram which shows the 1st structural example of the coefficient level encoding part which concerns on embodiment. 実施形態に係るサブブロック係数レベル符号化部の構成を示すブロック図である。It is a block diagram which shows the structure of the subblock coefficient level encoding part which concerns on embodiment. 上記動画像符号化装置を搭載した送信装置、および、上記動画像復号装置を搭載した受信装置の構成について示した図である。(a)は、動画像符号化装置を搭載した送信装置を示しており、(b)は、動画像復号装置を搭載した受信装置を示している。It is the figure shown about the structure of the transmitter which mounts the said moving image encoder, and the receiver which mounts the said moving image decoder. (A) shows a transmitting apparatus equipped with a moving picture coding apparatus, and (b) shows a receiving apparatus equipped with a moving picture decoding apparatus. 上記動画像符号化装置を搭載した記録装置、および、上記動画像復号装置を搭載した再生装置の構成について示した図である。(a)は、動画像符号化装置を搭載した記録装置を示しており、(b)は、動画像復号装置を搭載した再生装置を示している。It is the figure shown about the structure of the recording device which mounts the said moving image encoder, and the reproducing | regenerating apparatus which mounts the said moving image decoder. (A) shows a recording apparatus equipped with a moving picture coding apparatus, and (b) shows a reproduction apparatus equipped with a moving picture decoding apparatus.

本発明に係る復号装置および符号化装置の実施形態について図面に基づいて説明すれば以下のとおりである。なお、本実施形態に係る復号装置は、符号化データから動画像を復号するものである。したがって、以下では、これを「動画像復号装置」と呼称する。また、本実施形態に係る符号化装置は、動画像を符号化することによって符号化データを生成するものである。したがって、以下では、これを「動画像符号化装置」と呼称する。   Embodiments of a decoding apparatus and an encoding apparatus according to the present invention will be described below with reference to the drawings. Note that the decoding apparatus according to the present embodiment decodes a moving image from encoded data. Therefore, hereinafter, this is referred to as “moving image decoding apparatus”. In addition, the encoding device according to the present embodiment generates encoded data by encoding a moving image. Therefore, hereinafter, this is referred to as a “moving image encoding device”.

ただし、本発明の適用範囲はこれに限定されるものではない。すなわち、以下の説明からも明らかなように、本発明の特徴は複数のフレームを前提としなくとも成立するものである。すなわち、動画像を対象とするか静止画像を対象とするかを問わず、復号装置一般および符号化装置一般に適用できるものである。
〔符号化データ#1の構成〕
図2を用いて、動画像符号化装置2によって生成され、動画像復号装置1によって復号される符号化データ#1の構成例について説明する。符号化データ#1は、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。
However, the scope of application of the present invention is not limited to this. That is, as will be apparent from the following description, the features of the present invention can be realized without assuming a plurality of frames. That is, the present invention can be applied to a general decoding apparatus and a general encoding apparatus regardless of whether the target is a moving image or a still image.
[Configuration of Encoded Data # 1]
A configuration example of encoded data # 1 generated by the moving image encoding device 2 and decoded by the moving image decoding device 1 will be described with reference to FIG. The encoded data # 1 exemplarily includes a sequence and a plurality of pictures constituting the sequence.

シーケンスレイヤでは、処理対象のシーケンスを復号するために、動画像復号装置1が参照するデータの集合が規定されている。シーケンスレイヤにはシーケンスパラメータセットSPS、ピクチャパラメータセットPPS、ピクチャPICTを含んでいる。   In the sequence layer, a set of data referred to by the video decoding device 1 is defined in order to decode the sequence to be processed. The sequence layer includes a sequence parameter set SPS, a picture parameter set PPS, and a picture PICT.

符号化データ#1におけるピクチャレイヤ以下の階層の構造を図2に示す。図2の(a)〜(d)は、それぞれ、ピクチャPICTを規定するピクチャレイヤ、スライスSを規定するスライスレイヤ、ツリーブロック(Tree block)TBLKを規定するツリーブロックレイヤ、ツリーブロックTBLKに含まれる符号化単位(Coding Unit;CU)を規定するCUレイヤを示す図である。   FIG. 2 shows a hierarchical structure below the picture layer in the encoded data # 1. 2A to 2D are included in the picture layer that defines the picture PICT, the slice layer that defines the slice S, the tree block layer that defines the tree block TBLK, and the tree block TBLK, respectively. It is a figure which shows the CU layer which prescribes | regulates a coding unit (Coding Unit; CU).

(ピクチャレイヤ)
ピクチャレイヤでは、処理対象のピクチャPICT(以下、対象ピクチャとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。ピクチャPICTは、図2の(a)に示すように、ピクチャヘッダPH、及び、スライスS1〜SNSを含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
(Picture layer)
In the picture layer, a set of data referred to by the video decoding device 1 for decoding a picture PICT to be processed (hereinafter also referred to as a target picture) is defined. As shown in FIG. 2A, the picture PICT includes a picture header PH and slices S 1 to S NS (NS is the total number of slices included in the picture PICT).

なお、以下、スライスS1〜SNSのそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化データ#1に含まれるデータであって、添え字を付している他のデータについても同様である。 Note that, hereinafter, when it is not necessary to distinguish each of the slices S 1 to S NS , the reference numerals may be omitted. The same applies to other data with subscripts included in encoded data # 1 described below.

ピクチャヘッダPHには、対象ピクチャの復号方法を決定するために動画像復号装置1が参照する符号化パラメータ群が含まれている。   The picture header PH includes a coding parameter group that is referred to by the video decoding device 1 in order to determine a decoding method of the target picture.

(スライスレイヤ)
スライスレイヤでは、処理対象のスライスS(対象スライスとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。スライスSは、図2の(b)に示すように、スライスヘッダSH、及び、ツリーブロックTBLK1〜TBLKNC(NCはスライスSに含まれるツリーブロックの総数)を含んでいる。
(Slice layer)
In the slice layer, a set of data referred to by the video decoding device 1 for decoding the slice S to be processed (also referred to as a target slice) is defined. As shown in FIG. 2B, the slice S includes a slice header SH and tree blocks TBLK 1 to TBLK NC (where NC is the total number of tree blocks included in the slice S).

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

スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単予測、又は、イントラ予測を用いるPスライス、(3)符号化の際に単予測、双予測、又は、イントラ予測を用いるBスライスなどが挙げられる。   The slice types that can be specified by the slice type specification information include (1) I slice that uses only intra prediction at the time of encoding, (2) P slice that uses single prediction or intra prediction at the time of encoding, ( 3) B-slice using single prediction, bi-prediction, or intra prediction at the time of encoding may be used.

また、スライスヘッダSHには、動画像復号装置1の備えるループフィルタによって参照されるフィルタパラメータFPが含まれている。フィルタパラメータFPは、フィルタ係数群を含んでいる。フィルタ係数群には、(1)フィルタのタップ数を指定するタップ数指定情報、(2)フィルタ係数a0〜aNT-1(NTは、フィルタ係数群に含まれるフィルタ係数の総数)、および、(3)オフセットが含まれる。 In addition, the slice header SH includes a filter parameter FP that is referred to by a loop filter included in the video decoding device 1. The filter parameter FP includes a filter coefficient group. The filter coefficient group includes (1) tap number designation information for designating the number of taps of the filter, (2) filter coefficients a 0 to a NT-1 (NT is the total number of filter coefficients included in the filter coefficient group), and , (3) offset is included.

(ツリーブロックレイヤ)
ツリーブロックレイヤでは、処理対象のツリーブロックTBLK(以下、対象ツリーブロックとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。
(Tree block layer)
In the tree block layer, a set of data referred to by the video decoding device 1 for decoding a processing target tree block TBLK (hereinafter also referred to as a target tree block) is defined.

ツリーブロックTBLKは、ツリーブロックヘッダTBLKHと、符号化単位情報CU〜CUNL(NLはツリーブロックTBLKに含まれる符号化単位情報の総数)とを含む。ここで、まず、ツリーブロックTBLKと、符号化単位情報CUとの関係について説明すると次のとおりである。 The tree block TBLK includes a tree block header TBLKH and coding unit information CU 1 to CU NL (NL is the total number of coding unit information included in the tree block TBLK). Here, first, a relationship between the tree block TBLK and the coding unit information CU will be described as follows.

ツリーブロックTBLKは、イントラ予測またはインター予測、および、変換の各処理ためのブロックサイズを特定するためのユニットに分割される。   Tree block TBLK is divided into units for specifying a block size for each process of intra prediction or inter prediction and transformation.

ツリーブロックTBLKの上記ユニットは、再帰的な4分木分割により分割されている。この再帰的な4分木分割により得られる木構造のことを以下、符号化ツリー(coding tree)と称する。   The unit of the tree block TBLK is divided by recursive quadtree division. The tree structure obtained by this recursive quadtree partitioning is hereinafter referred to as a coding tree.

以下、符号化ツリーの末端のノードであるリーフ(leaf)に対応するユニットを、符号化ノード(coding node)として参照する。また、符号化ノードは、符号化処理の基本的な単位となるため、以下、符号化ノードのことを、符号化単位(CU)とも称する。   Hereinafter, a unit corresponding to a leaf which is a node at the end of the coding tree is referred to as a coding node. In addition, since the encoding node is a basic unit of the encoding process, hereinafter, the encoding node is also referred to as an encoding unit (CU).

つまり、符号化単位情報CU〜CUNLは、ツリーブロックTBLKを再帰的に4分木分割して得られる各符号化ノード(符号化単位)に対応する情報である。 That is, the coding unit information CU 1 to CU NL is information corresponding to each coding node (coding unit) obtained by recursively dividing the tree block TBLK into quadtrees.

また、符号化ツリーのルート(root)は、ツリーブロックTBLKに対応付けられる。換言すれば、ツリーブロックTBLKは、複数の符号化ノードを再帰的に含む4分木分割の木構造の最上位ノードに対応付けられる。   Also, the root of the coding tree is associated with the tree block TBLK. In other words, the tree block TBLK is associated with the highest node of the tree structure of the quadtree partition that recursively includes a plurality of encoding nodes.

なお、各符号化ノードのサイズは、当該符号化ノードが直接に属する符号化ノード(すなわち、当該符号化ノードの1階層上位のノードのユニット)のサイズの縦横とも半分である。   Note that the size of each coding node is half of the size of the coding node to which the coding node directly belongs (that is, the unit of the node one level higher than the coding node).

また、各符号化ノードの取り得るサイズは、符号化データ#1のシーケンスパラメータセットSPSに含まれる、符号化ノードのサイズ指定情報および最大階層深度(maximum hierarchical depth)に依存する。例えば、ツリーブロックTBLKのサイズが64×64画素であって、最大階層深度が3である場合には、当該ツリーブロックTBLK以下の階層における符号化ノードは、4種類のサイズ、すなわち、64×64画素、32×32画素、16×16画素、および8×8画素の何れかを取り得る。   In addition, the size that each coding node can take depends on the size designation information and the maximum hierarchical depth of the coding node included in the sequence parameter set SPS of the coded data # 1. For example, when the size of the tree block TBLK is 64 × 64 pixels and the maximum hierarchical depth is 3, the coding nodes in the hierarchy below the tree block TBLK have four sizes, that is, 64 × 64. It can take any of a pixel, 32 × 32 pixel, 16 × 16 pixel, and 8 × 8 pixel.

(ツリーブロックヘッダ)
ツリーブロックヘッダTBLKHには、対象ツリーブロックの復号方法を決定するために動画像復号装置1が参照する符号化パラメータが含まれる。具体的には、図2の(c)に示すように、対象ツリーブロックの各CUへの分割パターンを指定するツリーブロック分割情報SP_TBLK、および、量子化ステップの大きさを指定する量子化パラメータ差分Δqp(qp_delta)が含まれる。
(Tree block header)
The tree block header TBLKH includes an encoding parameter referred to by the video decoding device 1 in order to determine a decoding method of the target tree block. Specifically, as shown in FIG. 2C, tree block division information SP_TBLK that designates a division pattern of the target tree block into each CU, and a quantization parameter difference that designates the size of the quantization step. Δqp (qp_delta) is included.

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

なお、ツリーブロック分割情報SP_TBLKは、CUの形状やサイズを明示的に含んでいなくてもよい。例えばツリーブロック分割情報SP_TBLKは、対象ツリーブロック全体またはツリーブロックの部分領域を四分割するか否かを示すフラグ(split_coding_unit_flag)の集合であってもよい。その場合、ツリーブロックの形状やサイズを併用することで各CUの形状やサイズを特定できる。   Note that the tree block division information SP_TBLK may not explicitly include the shape or size of the CU. For example, the tree block division information SP_TBLK may be a set of flags (split_coding_unit_flag) indicating whether or not the entire target tree block or a partial area of the tree block is divided into four. In that case, the shape and size of each CU can be specified by using the shape and size of the tree block together.

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

(CUレイヤ)
CUレイヤでは、処理対象のCU(以下、対象CUとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。
(CU layer)
In the CU layer, a set of data referred to by the video decoding device 1 for decoding a CU to be processed (hereinafter also referred to as a target CU) is defined.

ここで、符号化単位情報CUに含まれるデータの具体的な内容の説明をする前に、CUに含まれるデータの木構造について説明する。符号化ノードは、予測ツリー(prediction tree;PT)および変換ツリー(transform tree;TT)のルートのノードとなる。予測ツリーおよび変換ツリーについて説明すると次のとおりである。   Here, before describing specific contents of data included in the coding unit information CU, a tree structure of data included in the CU will be described. The encoding node is a node at the root of a prediction tree (PT) and a transform tree (TT). The prediction tree and the conversion tree are described as follows.

予測ツリーにおいては、符号化ノードが1または複数の予測ブロックに分割され、各予測ブロックの位置とサイズとが規定される。別の表現でいえば、予測ブロックは、符号化ノードを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ブロックを含む。   In the prediction tree, the encoding node is divided into one or a plurality of prediction blocks, and the position and size of each prediction block are defined. In other words, the prediction block is one or a plurality of non-overlapping areas constituting the encoding node. The prediction tree includes one or a plurality of prediction blocks obtained by the above division.

予測処理は、この予測ブロックごとに行われる。以下、予測の単位である予測ブロックのことを、予測単位(prediction unit;PU)とも称する。   Prediction processing is performed for each prediction block. Hereinafter, a prediction block that is a unit of prediction is also referred to as a prediction unit (PU).

予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。   Broadly speaking, there are two types of division in the prediction tree: intra prediction and inter prediction.

イントラ予測の場合、分割方法は、2N×2N(符号化ノードと同一サイズ)と、N×Nとがある。   In the case of intra prediction, there are 2N × 2N (the same size as the encoding node) and N × N division methods.

また、インター予測の場合、分割方法は、2N×2N(符号化ノードと同一サイズ)、2N×N、N×2N、および、N×Nなどがある。   In the case of inter prediction, there are 2N × 2N (the same size as the encoding node), 2N × N, N × 2N, N × N, and the like.

また、変換ツリーにおいては、符号化ノードが1または複数の変換ブロックに分割され、各変換ブロックの位置とサイズとが規定される。別の表現でいえば、変換ブロックは、符号化ノードを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ブロックを含む。   In the transform tree, the encoding node is divided into one or a plurality of transform blocks, and the position and size of each transform block are defined. In other words, the transform block is one or a plurality of non-overlapping areas constituting the encoding node. The conversion tree includes one or a plurality of conversion blocks obtained by the above division.

変換処理は、この変換ブロックごとに行われる。以下、変換の単位である変換ブロックのことを、変換単位(transform unit;TU)とも称する。TUのサイズは、変換ブロックの横幅と対数log2TrafoWidthと縦幅の対数値log2TrafoHeightで表される。TUのサイズはまた、以下の式で得られる値log2TrafoSizeでも表される。   The conversion process is performed for each conversion block. Hereinafter, a transform block that is a unit of transform is also referred to as a transform unit (TU). The size of the TU is represented by the horizontal width and logarithm log2TrafoWidth of the transform block and the logarithmic value log2TrafoHeight of the vertical width. The size of the TU is also represented by a value log2TrafoSize obtained by the following equation.

log2TrafoSize = ( log2TrafoWidth + log2TrafoHeight ) >> 1
以下、横幅W×縦幅Hのサイズを有するTUをW×HTUと呼ぶ(例:4×4TU)。
log2TrafoSize = (log2TrafoWidth + log2TrafoHeight) >> 1
Hereinafter, a TU having a size of horizontal width W × longitudinal width H is referred to as W × HTU (example: 4 × 4 TU).

(符号化単位情報のデータ構造)
続いて、図2の(d)を参照しながら符号化単位情報CUに含まれるデータの具体的な内容について説明する。図2の(d)に示すように、符号化単位情報CUは、具体的には、スキップモードフラグSKIP、CU予測タイプ情報Pred_type、PT情報PTI、および、TT情報TTIを含む。
(Data structure of encoding unit information)
Next, specific contents of data included in the coding unit information CU will be described with reference to FIG. As shown in FIG. 2D, the coding unit information CU specifically includes a skip mode flag SKIP, CU prediction type information Pred_type, PT information PTI, and TT information TTI.

[スキップフラグ]
スキップフラグSKIPは、対象CUについて、スキップモードが適用されているか否かを示すフラグであり、スキップフラグSKIPの値が1の場合、すなわち、対象CUにスキップモードが適用されている場合、その符号化単位情報CUにおけるPT情報PTIは省略される。なお、スキップフラグSKIPは、Iスライスでは省略される。
[Skip flag]
The skip flag SKIP is a flag indicating whether or not the skip mode is applied to the target CU. When the value of the skip flag SKIP is 1, that is, when the skip mode is applied to the target CU, the code The PT information PTI in the unit information CU is omitted. Note that the skip flag SKIP is omitted for the I slice.

[CU予測タイプ情報]
CU予測タイプ情報Pred_typeは、CU予測方式情報PredModeおよびPU分割タイプ情報PartModeを含む。CU予測タイプ情報のことを単に予測タイプ情報と呼ぶこともある。
[CU prediction type information]
The CU prediction type information Pred_type includes CU prediction method information PredMode and PU partition type information PartMode. The CU prediction type information may be simply referred to as prediction type information.

CU予測方式情報PredModeは、対象CUに含まれる各PUについての予測画像生成方法として、イントラ予測(イントラCU)、および、インター予測(インターCU)のいずれを用いるのかを指定するものである。なお、以下では、対象CUにおける、スキップ、イントラ予測、および、インター予測の種別を、CU予測モードと称する。   The CU prediction method information PredMode specifies whether intra prediction (intra CU) or inter prediction (inter CU) is used as a predicted image generation method for each PU included in the target CU. Hereinafter, the types of skip, intra prediction, and inter prediction in the target CU are referred to as a CU prediction mode.

PU分割タイプ情報PartModeは、対象符号化単位(CU)の各PUへの分割のパターンであるPU分割タイプを指定するものである。以下、このように、PU分割タイプに従って、対象符号化単位(CU)を各PUへ分割することをPU分割と称する。   The PU partition type information PartMode designates a PU partition type that is a pattern of partitioning the target coding unit (CU) into each PU. Hereinafter, dividing the target coding unit (CU) into each PU according to the PU division type in this way is referred to as PU division.

PU分割タイプ情報PartModeは、例示的には、PU分割パターンの種類を示すインデックスであってもよいし、対象予測ツリーに含まれる各PUの形状、サイズ、および、対象予測ツリー内での位置が指定されていてもよい。   For example, the PU partition type information PartMode may be an index indicating the type of PU partition pattern, and the shape, size, and position of each PU included in the target prediction tree may be It may be specified.

なお、選択可能なPU分割タイプは、CU予測方式とCUサイズに応じて異なる。また、さらにいえば、選択可能なPU分割タイプは、インター予測およびイントラ予測それぞれの場合において異なる。また、PU分割タイプの詳細については後述する。   The selectable PU partition types differ depending on the CU prediction method and the CU size. Furthermore, the PU partition types that can be selected differ in each case of inter prediction and intra prediction. Details of the PU partition type will be described later.

[PT情報]
PT情報PTIは、対象CUに含まれるPTに関する情報である。言い換えれば、PT情報PTIは、PTに含まれる1または複数のPUそれぞれに関する情報の集合である。上述のとおり予測画像の生成は、PUを単位として行われるので、PT情報PTIは、動画像復号装置1によって予測画像が生成される際に参照される。PT情報PTIは、図2の(d)に示すように、各PUにおける予測情報等を含むPU情報PUI〜PUINP(NPは、対象PTに含まれるPUの総数)を含む。
[PT information]
The PT information PTI is information related to the PT included in the target CU. In other words, the PT information PTI is a set of information on each of one or more PUs included in the PT. As described above, since the generation of the predicted image is performed in units of PUs, the PT information PTI is referred to when the moving image decoding apparatus 1 generates a predicted image. As shown in FIG. 2D, the PT information PTI includes PU information PUI 1 to PUI NP (NP is the total number of PUs included in the target PT) including prediction information in each PU.

予測情報PUIは、予測タイプ情報Pred_modeが何れの予測方法を指定するのかに応じて、イントラ予測パラメータPP_Intra、または、インター予測パラメータPP_Interを含む。以下では、イントラ予測が適用されるPUをイントラPUとも呼称し、インター予測が適用されるPUをインターPUとも呼称する。   The prediction information PUI includes an intra prediction parameter PP_Intra or an inter prediction parameter PP_Inter depending on which prediction method is specified by the prediction type information Pred_mode. Hereinafter, a PU to which intra prediction is applied is also referred to as an intra PU, and a PU to which inter prediction is applied is also referred to as an inter PU.

インター予測パラメータPP_Interは、動画像復号装置1が、インター予測によってインター予測画像を生成する際に参照される符号化パラメータを含む。   The inter prediction parameter PP_Inter includes a coding parameter referred to when the video decoding device 1 generates an inter prediction image by inter prediction.

インター予測パラメータPP_Interとしては、例えば、マージフラグ(merge_flag)、マージインデックス(merge_idx)、推定動きベクトルインデックス(mvp_idx)、参照画像インデックス(ref_idx)、インター予測フラグ(inter_pred_flag)、および動きベクトル残差(mvd)が挙げられる。   Examples of the inter prediction parameter PP_Inter include a merge flag (merge_flag), a merge index (merge_idx), an estimated motion vector index (mvp_idx), a reference image index (ref_idx), an inter prediction flag (inter_pred_flag), and a motion vector residual (mvd). ).

イントラ予測パラメータPP_Intraは、動画像復号装置1が、イントラ予測によってイントラ予測画像を生成する際に参照される符号化パラメータを含む。   The intra prediction parameter PP_Intra includes a coding parameter that is referred to when the video decoding device 1 generates an intra prediction image by intra prediction.

イントラ予測パラメータPP_Intraとしては、例えば、推定予測モードフラグ、推定予測モードインデックス、および、残余予測モードインデックスが挙げられる。   Examples of the intra prediction parameter PP_Intra include an estimated prediction mode flag, an estimated prediction mode index, and a residual prediction mode index.

なお、イントラ予測パラメータには、PCMモードを用いるか否かを示すPCMモードフラグが含まれていてもよい。PCMモードフラグが符号化されている場合であって、PCMモードフラグがPCMモードを用いることを示しているときには、予測処理(イントラ)、変換処理、および、エントロピー符号化の各処理が省略される。   The intra prediction parameter may include a PCM mode flag indicating whether to use the PCM mode. When the PCM mode flag is encoded and the PCM mode flag indicates that the PCM mode is used, the prediction process (intra), the conversion process, and the entropy encoding process are omitted. .

[TT情報]
TT情報TTIは、CUに含まれるTTに関する情報である。言い換えれば、TT情報TTIは、TTに含まれる1または複数のTUそれぞれに関する情報の集合であり、動画像復号装置1により残差データを復号する際に参照される。なお、以下、TUのことをブロックと称することもある。
[TT information]
The TT information TTI is information regarding the TT included in the CU. In other words, the TT information TTI is a set of information regarding each of one or a plurality of TUs included in the TT, and is referred to when the moving image decoding apparatus 1 decodes residual data. Hereinafter, a TU may be referred to as a block.

TT情報TTIは、図2の(d)に示すように、対象CUの各変換ブロックへの分割パターンを指定するTT分割情報SP_TU、および、TU情報TUI1〜TUINT(NTは、対象CUに含まれるブロックの総数)を含んでいる。 As shown in FIG. 2D, the TT information TTI includes TT division information SP_TU for designating a division pattern of the target CU into each transform block, and TU information TUI 1 to TUI NT (NT is assigned to the target CU. The total number of blocks included).

TT分割情報SP_TUは、具体的には、対象CUに含まれる各TUの形状、サイズ、および、対象CU内での位置を決定するための情報である。例えば、TT分割情報SP_TUは、対象となるノードの分割を行うのか否かを示す情報(split_transform_flag)と、その分割の深度を示す情報(trafoDepth)とから実現することができる。   Specifically, the TT division information SP_TU is information for determining the shape and size of each TU included in the target CU and the position within the target CU. For example, the TT division information SP_TU can be realized from information (split_transform_flag) indicating whether or not the target node is to be divided and information (trafoDepth) indicating the depth of the division.

また、例えば、CUのサイズが、64×64の場合、分割により得られる各TUは、32×32画素から4×4画素までのサイズを取り得る。   For example, when the size of the CU is 64 × 64, each TU obtained by the division can take a size from 32 × 32 pixels to 4 × 4 pixels.

TU情報TUI1〜TUINTは、TTに含まれる1または複数のTUそれぞれに関する個別の情報である。例えば、TU情報TUIは、量子化予測残差(量子化残差とも呼ぶ)を含んでいる(以下、この量子化予測残差に関する情報のことを量子化残差情報QDで参照する)。 The TU information TUI 1 to TUI NT are individual information regarding each of one or more TUs included in the TT. For example, the TU information TUI includes a quantized prediction residual (also referred to as a quantized residual) (hereinafter, information related to the quantized predictive residual is referred to by the quantized residual information QD).

各量子化予測残差は、動画像符号化装置2が以下の処理1〜3を、処理対象のブロックである対象ブロックに施すことによって生成した符号化データである。   Each quantization prediction residual is encoded data generated by the moving image encoding device 2 performing the following processes 1 to 3 on a target block that is a processing target block.

処理1:符号化対象画像から予測画像を減算した予測残差を周波数変換(例えばDCT変換(Discrete Cosine Transform))する;
処理2:処理1にて得られた変換係数を量子化する;
処理3:処理2にて量子化された変換係数を可変長符号化する;
なお、上述した量子化パラメータqpは、動画像符号化装置2が変換係数を量子化する際に用いた量子化ステップQPの大きさを表す(QP=2qp/6)。
Process 1: Frequency conversion (for example, DCT transform (Discrete Cosine Transform)) of the prediction residual obtained by subtracting the prediction image from the encoding target image;
Process 2: Quantize the transform coefficient obtained in Process 1;
Process 3: Variable length coding is performed on the transform coefficient quantized in Process 2;
The quantization parameter qp described above represents the magnitude of the quantization step QP used when the moving image coding apparatus 2 quantizes the transform coefficient (QP = 2 qp / 6 ).

(PU分割タイプ)
PU分割タイプには、対象CUのサイズを2N×2N画素とすると、次の合計8種類のパターンがある。すなわち、2N×2N画素、2N×N画素、N×2N画素、およびN×N画素の4つの対称的分割(symmetric splittings)、並びに、2N×nU画素、2N×nD画素、nL×2N画素、およびnR×2N画素の4つの非対称的分割(asymmetric splittings)である。なお、N=2(mは1以上の任意の整数)を意味している。以下、対称CUを分割して得られる領域のことをパーティションとも称する。
(PU split type)
In the PU division type, if the size of the target CU is 2N × 2N pixels, there are the following eight patterns in total. That is, 4 symmetric splittings of 2N × 2N pixels, 2N × N pixels, N × 2N pixels, and N × N pixels, and 2N × nU pixels, 2N × nD pixels, nL × 2N pixels, And four asymmetric splittings of nR × 2N pixels. N = 2 m (m is an arbitrary integer of 1 or more). Hereinafter, an area obtained by dividing a symmetric CU is also referred to as a partition.

図3の(a)〜(h)に、それぞれの分割タイプについて、CUにおけるPU分割の境界の位置を具体的に図示している。   3A to 3H specifically show the positions of the boundaries of PU division in the CU for each division type.

図3の(a)は、CUの分割を行わない2N×2NのPU分割タイプを示している。また、図3の(b)、(c)、および(d)は、それぞれ、PU分割タイプが、2N×N、2N×nU、および、2N×nDである場合のパーティションの形状について示している。また、図3の(e)、(f)、および(g)は、それぞれ、PU分割タイプが、N×2N、nL×2N、および、nR×2Nである場合のパーティションの形状について示している。また、図3の(h)は、PU分割タイプが、N×Nである場合のパーティションの形状を示している。   FIG. 3A illustrates a 2N × 2N PU partition type that does not perform CU partitioning. Moreover, (b), (c), and (d) of FIG. 3 show the shapes of partitions when the PU partition types are 2N × N, 2N × nU, and 2N × nD, respectively. . Also, (e), (f), and (g) of FIG. 3 show the shapes of the partitions when the PU partition types are N × 2N, nL × 2N, and nR × 2N, respectively. . Moreover, (h) of FIG. 3 has shown the shape of the partition in case PU partition type is NxN.

図3の(a)および(h)のPU分割タイプのことを、そのパーティションの形状に基づいて、正方形分割とも称する。また、図3の(b)〜(g)のPU分割タイプのことは、非正方形分割とも称する。   The PU partition types shown in FIGS. 3A and 3H are also referred to as square partitioning based on the shape of the partition. Further, the PU partition types shown in FIGS. 3B to 3G are also referred to as non-square partitions.

また、図3の(a)〜(h)において、各領域に付した番号は、領域の識別番号を示しており、この識別番号順に、領域に対して処理が行われる。すなわち、当該識別番号は、領域のスキャン順を表している。   In FIGS. 3A to 3H, the numbers assigned to the respective regions indicate the region identification numbers, and the regions are processed in the order of the identification numbers. That is, the identification number represents the scan order of the area.

[インター予測の場合の分割タイプ]
インターPUでは、上記8種類の分割タイプのうち、N×N(図3の(h))以外の7種類が定義されている。なお、上記6つの非対称的分割は、AMP(Asymmetric Motion Partition)と呼ばれることもある。
[Partition type for inter prediction]
In the inter PU, seven types other than N × N ((h) in FIG. 3) are defined among the above eight division types. The six asymmetric partitions are sometimes called AMP (Asymmetric Motion Partition).

また、Nの具体的な値は、当該PUが属するCUのサイズによって規定され、nU、nD、nL、および、nRの具体的な値は、Nの値に応じて定められる。例えば、128×128画素のインターCUは、128×128画素、128×64画素、64×128画素、64×64画素、128×32画素、128×96画素、32×128画素、および、96×128画素のインターPUへ分割することが可能である。   A specific value of N is defined by the size of the CU to which the PU belongs, and specific values of nU, nD, nL, and nR are determined according to the value of N. For example, a 128 × 128 pixel inter-CU includes 128 × 128 pixels, 128 × 64 pixels, 64 × 128 pixels, 64 × 64 pixels, 128 × 32 pixels, 128 × 96 pixels, 32 × 128 pixels, and 96 × It is possible to divide into 128-pixel inter PUs.

[イントラ予測の場合の分割タイプ]
イントラPUでは、次の2種類の分割パターンが定義されている。対象CUを分割しない、すなわち対象CU自身が1つのPUとして取り扱われる分割パターン2N×2Nと、対象CUを、4つのPUへと対称的に分割するパターンN×Nと、である。
[Partition type for intra prediction]
In the intra PU, the following two types of division patterns are defined. A division pattern 2N × 2N in which the target CU is not divided, that is, the target CU itself is handled as one PU, and a pattern N × N in which the target CU is divided into four PUs symmetrically.

したがって、イントラPUでは、図3に示した例でいえば、(a)および(h)の分割パターンを取ることができる。   Therefore, in the intra PU, the division patterns (a) and (h) can be taken in the example shown in FIG.

例えば、128×128画素のイントラCUは、128×128画素、および、64×64画素のイントラPUへ分割することが可能である。   For example, an 128 × 128 pixel intra CU can be divided into 128 × 128 pixel and 64 × 64 pixel intra PUs.

(TU分割タイプ)
次に、図3(i)〜(o)を用いて、TU分割タイプについて説明する。TU分割のパターンは、CUのサイズ、分割の深度(trafoDepth)、および対象PUのPU分割タイプにより定まる。
(TU split type)
Next, the TU partition type will be described with reference to FIGS. The TU partition pattern is determined by the CU size, the partition depth (trafoDepth), and the PU partition type of the target PU.

また、TU分割のパターンには、正方形の4分木分割と、非正方形の4分木分割とが含まれる。   The TU partition pattern includes a square quadtree partition and a non-square quadtree partition.

図3の(i)〜(k)は、正方形のノードを正方形または非正方形に4分木分割する分割方式について示している。より具体的には、図3の(i)は、正方形のノードを正方形に4分木分割する分割方式を示している。また、同図の(j)は、正方形のノードを横長の長方形に4分木分割する分割方式を示している。そして、同図の(k)は、正方形のノードを縦長の長方形に4分木分割する分割方式を示している。   (I) to (k) in FIG. 3 show a division method for dividing a square node into a square or a non-square by quadtree division. More specifically, (i) of FIG. 3 shows a division method in which a square node is divided into quadtrees into squares. Further, (j) in the figure shows a division method in which a square node is divided into quadrants into horizontally long rectangles. And (k) of the same figure has shown the division | segmentation system which divides a quadrilateral tree into a vertically long rectangle by quadtree.

また、図3の(l)〜(o)は、非正方形のノードを正方形または非正方形に4分木分割する分割方式について示している。より具体的には、図3の(l)は、横長の長方形のノードを横長の長方形に4分木分割する分割方式を示している。また、同図の(m)は、横長の長方形のノードを正方形に4分木分割する分割方式を示している。また、同図の(n)は、縦長の長方形のノードを縦長の長方形に4分木分割する分割方式を示している。そして、同図の(o)は、縦長の長方形のノードを正方形に4分木分割する分割方式を示している。   Further, (l) to (o) of FIG. 3 show a dividing method for dividing a non-square node into a square or a non-square by quadtree division. More specifically, (l) of FIG. 3 shows a division method for dividing a horizontally long rectangular node into a horizontally long rectangle by quadtree division. Further, (m) in the figure shows a division method in which horizontally long rectangular nodes are divided into quadtrees into squares. In addition, (n) in the figure shows a division method in which a vertically long rectangular node is divided into quadrants into vertically long rectangles. And (o) of the figure has shown the division | segmentation system which divides a vertically long rectangular node into a quadtree in a square.

(量子化残差情報QDの構成の比較例)
図4及び図5は、比較例における量子化残差情報QD(図4および図5ではresidual_coding_cabac()と表記)に含まれる各シンタックスが示されている。
(Comparative example of configuration of quantization residual information QD)
4 and 5 show each syntax included in the quantization residual information QD (indicated as residual_coding_cabac () in FIGS. 4 and 5) in the comparative example.

図4は、量子化残差情報QDに含まれるシンタックスを示すシンタックステーブルの前半部分を示す図である。図5は、量子化残差情報QDに含まれるシンタックスを示すシンタックステーブルの後半部分を示す図である。   FIG. 4 is a diagram illustrating a first half portion of a syntax table indicating syntax included in the quantized residual information QD. FIG. 5 is a diagram illustrating the second half of the syntax table indicating the syntax included in the quantized residual information QD.

比較例においては、非0の変換係数の有無を示すシンタックスsignificant_coeff_flagと、変換係数の大きさを示すシンタックスcoeff_abs_level_greater1_flag、coeff_abs_level_greater2_flag、coeff_abs_level_remaining(coeff_abs_level_minus3)、変換係数の符号を示すシンタックスcoeff_sign_flagを一つのサブブロック内のループで連続して復号することに特徴がある(図4および図5に示す網掛け部分)。また、significant_coeff_flagの復号に用いるコンテキストインデックスを、既に復号した変換係数の絶対値の和を用いて導出することに特徴がある。   In the comparative example, the syntax significant_coeff_flag indicating the presence / absence of a non-zero transform coefficient, the syntax coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_abs_level_remaining (coeff_abs_level_minus3) indicating the magnitude of the transform coefficient, and the sign of the sign of the transform coefficient _ It is characterized by continuous decoding in a loop in the block (shaded portion shown in FIGS. 4 and 5). Another feature is that a context index used for decoding significant_coeff_flag is derived using the sum of absolute values of already decoded transform coefficients.

(量子化残差情報QDの構成)
図6及び図7は、量子化残差情報QD(図6および図7ではresidual_coding()と表記)に含まれる各シンタックスを示す図である。
(Configuration of quantization residual information QD)
6 and 7 are diagrams illustrating syntaxes included in the quantization residual information QD (denoted as residual_coding () in FIGS. 6 and 7).

図6は、量子化残差情報QDに含まれるシンタックスを示すシンタックステーブルの前半部分を示す図である。図7は、量子化残差情報QDに含まれるシンタックスを示すシンタックステーブルの後半部分を示す図である。   FIG. 6 is a diagram illustrating a first half portion of a syntax table indicating syntax included in the quantized residual information QD. FIG. 7 is a diagram illustrating the second half of the syntax table indicating the syntax included in the quantized residual information QD.

図6及び図7に示すように、量子化残差情報QDは、シンタックスlast_significant_coeff_x、last_significant_coeff_y、significant_coeff_group_flag、significant_coeff_flag、coeff_abs_level_greater1_flag、coeff_sign_flag、coeff_abs_level_remainingを含んでいる。   As shown in FIGS. 6 and 7, the quantization residual information QD includes syntax last_significant_coeff_x, last_significant_coeff_y, significant_coeff_group_flag, significant_coeff_flag, coeff_abs_level_greater1_flag, coeff_sign_flag, and coeff_abs_level_remaining.

量子化残差情報QDに含まれる各シンタックスは、コンテキスト適応型2値算術符号化(CABAC)によって符号化されている。   Each syntax included in the quantized residual information QD is encoded by context adaptive binary arithmetic coding (CABAC).

変換係数は、低周波数側から高周波数側に向かって順次スキャンが行われる。このスキャン順を、順スキャンと呼ぶこともある。一方で、順スキャンとは逆に高周波数側から低周波数側のスキャンも用いられる。このスキャン順を、逆スキャンと呼ぶこともある。   The conversion coefficient is sequentially scanned from the low frequency side to the high frequency side. This scan order may be referred to as a forward scan. On the other hand, a scan from the high frequency side to the low frequency side is also used, contrary to the forward scan. This scan order is sometimes called reverse scan.

シンタックスlast_significant_coeff_x及びlast_significant_coeff_yは、順スキャン方向に沿って最後の非0変換係数の位置を示すシンタックスである。   The syntaxes last_significant_coeff_x and last_significant_coeff_y are syntaxes indicating the position of the last non-zero transform coefficient along the forward scan direction.

シンタックスsignificant_coeff_flagは、非0変換係数を起点として逆スキャン方向に沿った各周波数成分について、非0変換係数の有無を示すシンタックスである。シンタックスsignificant_coeff_flagは、各xC、yCについて、変換係数が0であれば0、変換係数が0でなければ1をとるフラグである。なお、シンタックスsignificant_coeff_flagを変換係数有無フラグ、または係数有無フラグとも呼称する。なお、significant_coeff_flagを独立のシンタックスとして扱わず、変換係数の絶対値を表すシンタックス(例えばcoeff_abs_level)に含まれるとしても良い。この場合、シンタックスcoeff_abs_levelの1ビット目がsignificant_coeff_flagに相当し、以下のsignificant_coeff_flagのコンテキストインテックスを導出する処理は、シンタックスcoeff_abs_levelの1ビット目のコンテキストインデックスを導出する処理に相当する。   The syntax significant_coeff_flag is a syntax indicating whether or not there is a non-zero transform coefficient for each frequency component along the reverse scan direction starting from the non-zero transform coefficient. The syntax significant_coeff_flag is a flag that takes 0 for each xC, yC if the conversion coefficient is 0, and 1 if the conversion coefficient is not 0. The syntax significant_coeff_flag is also referred to as a conversion coefficient presence / absence flag or coefficient presence / absence flag. Note that significant_coeff_flag may not be treated as an independent syntax but may be included in a syntax (for example, coeff_abs_level) representing an absolute value of a transform coefficient. In this case, the first bit of the syntax coeff_abs_level corresponds to significant_coeff_flag, and the process of deriving the context index of the following significant_coeff_flag corresponds to the process of deriving the context index of the first bit of the syntax coeff_abs_level.

動画像復号装置1の備える可変長符号復号部11は、変換ブロックを複数のサブブロックに分割し、サブブロックを処理単位として、significant_coeff_group_flagの復号を行う。量子化残差情報QDには、サブブロック単位で、サブブロック内に少なくとも1つの非0変換係数が存在するか否かを示すフラグ(サブブロック係数有無フラグsignificant_coeff_group_flag)が含まれる。   The variable length code decoding unit 11 included in the video decoding device 1 divides the transform block into a plurality of sub blocks, and decodes significant_coeff_group_flag using the sub blocks as processing units. The quantization residual information QD includes a flag (subblock coefficient presence / absence flag significant_coeff_group_flag) indicating whether or not at least one non-zero transform coefficient exists in the subblock in units of subblocks.

以下では、復号処理について、図8〜図10を参照して説明する。   Hereinafter, the decoding process will be described with reference to FIGS.

図8は、ブロックとサブブロックの関係を示す図である。図8(a)は、4×4TUが4×4成分からなる1個のサブブロックから構成される例を示す。図8(b)は、8×8TUが4×4成分からなる4個のサブブロックから構成される例を示す。図8(c)は、16×16TUが4×4成分からなる16個のサブブロックから構成される例を示す。なお、TUサイズとサブブロックサイズの関係および分割方法はこの例に限らない。   FIG. 8 is a diagram illustrating the relationship between blocks and sub-blocks. FIG. 8A shows an example in which 4 × 4 TU is composed of one sub-block composed of 4 × 4 components. FIG. 8B shows an example in which 8 × 8 TU is composed of four sub-blocks composed of 4 × 4 components. FIG. 8C shows an example in which 16 × 16 TU is composed of 16 sub-blocks composed of 4 × 4 components. Note that the relationship between the TU size and the sub-block size and the division method are not limited to this example.

図9(a)は、ブロックを分割して得られる複数の(図9(a)では4×4=16個の)サブブロックに対するスキャン順を示す図である。以下では、サブブロックを単位とするスキャンをサブブロックスキャンとも呼ぶ。サブブロックに対して図9(a)のようにスキャンが行われる場合、サブブロック内の各周波数領域に対して図9(b)に示すスキャン順でスキャンが行われる。図9(a)及び図9(b)に示すスキャン順を「順スキャン」とも呼ぶ。   FIG. 9A is a diagram showing the scan order for a plurality of (4 × 4 = 16 in FIG. 9A) sub-blocks obtained by dividing a block. Hereinafter, scanning in units of sub-blocks is also referred to as sub-block scanning. When scanning is performed on the sub-block as shown in FIG. 9A, scanning is performed on each frequency region in the sub-block in the scanning order shown in FIG. 9B. The scan order shown in FIGS. 9A and 9B is also referred to as “forward scan”.

図9(c)は、ブロックを分割して得られる複数の(図9(b)では4×4=16個の)サブブロックに対するスキャン順を示す図である。サブブロックに対して図9(c)のようにスキャンが行われる場合、サブブロック内の各周波数領域に対して図9(d)に示すスキャン順でスキャンが行われる。図9(c)及び図9(d)に示すスキャン順を「逆スキャン」とも呼ぶ。   FIG. 9C is a diagram showing a scan order for a plurality of sub-blocks (4 × 4 = 16 in FIG. 9B) obtained by dividing a block. When scanning is performed on the sub-block as shown in FIG. 9C, scanning is performed on each frequency region in the sub-block in the scanning order shown in FIG. 9D. The scan order shown in FIGS. 9C and 9D is also referred to as “reverse scan”.

図10(a)〜(f)の横軸は、水平方向周波数xC(0≦xC≦7)を表しており、縦軸は、垂直方向周波数yC(0≦yC≦7)を表している。以下の説明では、周波数領域に含まれる各部分領域のうち、水平方向周波数xC、および、垂直方向周波数yCによって指定される部分領域を、周波数成分(xC、yC)とも呼称する。また、周波数成分(xC、yC)についての変換係数をCoeff(xC、yC)とも表記する。変換係数Coeff(0、0)は、DC成分を示しており、それ以外の変換係数は、DC成分以外の成分を表している。本明細書において、(xC、yC)を(u、v)と表記することもある。   10A to 10F, the horizontal axis represents the horizontal frequency xC (0 ≦ xC ≦ 7), and the vertical axis represents the vertical frequency yC (0 ≦ yC ≦ 7). In the following description, among the partial areas included in the frequency domain, the partial areas specified by the horizontal frequency xC and the vertical frequency yC are also referred to as frequency components (xC, yC). Further, the conversion coefficient for the frequency component (xC, yC) is also expressed as Coeff (xC, yC). The conversion coefficient Coeff (0, 0) indicates a DC component, and the other conversion coefficients indicate components other than the DC component. In this specification, (xC, yC) may be expressed as (u, v).

図10(a)は、TUサイズが8×8であるブロックが4×4のサイズのサブブロックに分割された場合に、順スキャンにて各周波数成分がスキャンされる場合のスキャン順を示す図である。   FIG. 10A is a diagram illustrating a scan order when each frequency component is scanned in a forward scan when a block having a TU size of 8 × 8 is divided into sub-blocks of 4 × 4 size. It is.

図10(b)は、8×8の周波数成分からなる周波数領域における0でない変換係数(非0変換係数)を例示する図である。図10(b)に示す例の場合、last_significant_coeff_x=6、last_significant_coeff_y=0である。   FIG. 10B illustrates a non-zero transform coefficient (non-zero transform coefficient) in the frequency domain composed of 8 × 8 frequency components. In the case of the example shown in FIG. 10B, last_significant_coeff_x = 6 and last_significant_coeff_y = 0.

図10(c)は、復号対象の変換係数が、図10(b)に示すものである場合の各サブブロックについて復号されたサブブロック係数有無フラグsignificant_coeff_group_flagの各値を示す図である。少なくとも1つの非0変換係数を含むサブブロックに関するsignificant_coeff_group_flagは、値として1をとり、非0変換係数を1つも含まないサブブロックに関するsignificant_coeff_group_flagは、値として0をとる。   FIG. 10C is a diagram illustrating each value of the subblock coefficient presence / absence flag significant_coeff_group_flag decoded for each subblock when the transform coefficient to be decoded is the one shown in FIG. Significant_coeff_group_flag related to a sub-block including at least one non-zero transform coefficient takes 1 as a value, and significant_coeff_group_flag related to a sub-block including no non-zero transform coefficient takes 0 as a value.

図10(d)は、復号対象の変換係数が、図10(b)に示すものである場合の非0変換係数の有無を示すシンタックスsignificant_coeff_flagの各値を示す図である。significant_coeff_group_flag=1であるサブブロックに対しては、significant_coeff_flagは逆スキャン順に復号され、significant_coeff_group_flag=0であるサブブロックに対しては、当該サブブロックに対するsignificant_coeff_flagの復号処理を行うことなく、当該サブブロックに含まれる全ての周波数成分に対するsignificant_coeff_flagが0に設定される(図10(d)の左下のサブブロック)。   FIG. 10D is a diagram illustrating each value of syntax significant_coeff_flag indicating the presence or absence of a non-zero transform coefficient when the transform coefficient to be decoded is the one illustrated in FIG. For a subblock with significant_coeff_group_flag = 1, significant_coeff_flag is decoded in reverse scan order, and for a subblock with significant_coeff_group_flag = 0, it is included in the subblock without performing decoding processing of significant_coeff_flag for the subblock Significant_coeff_flag for all frequency components to be transmitted is set to 0 (lower left subblock of FIG. 10D).

図10(e)は、復号対象の変換係数が、図10(b)に示すものである場合のシンタックスcoeff_abs_level_greater1_flag、及びcoeff_abs_level_remainingを復号することによって得られた各変換係数の絶対値を示している。   FIG. 10 (e) shows the absolute value of each transform coefficient obtained by decoding the syntax coeff_abs_level_greater1_flag and coeff_abs_level_remaining when the transform coefficients to be decoded are those shown in FIG. 10 (b). .

図10(f)は、復号対象の変換係数が、図10(b)に示すものである場合のシンタックスcoeff_sign_flagを示す図である。   FIG. 10F is a diagram illustrating the syntax coeff_sign_flag when the transform coefficient to be decoded is the one illustrated in FIG.

各変換係数の値を示すシンタックスcoeff_abs_level_greater1_flag、coeff_abs_level_greater2_flag、及びcoeff_abs_level_remainingの復号は、モード(ハイスループットモード)により変化する。サブブロックの開始時には、ハイスループットモードがオフであり、サブブロック内の非0係数の数numSigCoeffが所定の定数以上となった時点で、ハイスループットモードがオンとなる。ハイスループットモードでは、一部のシンタックスの復号をスキップする。   The decoding of the syntaxes coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, and coeff_abs_level_remaining indicating the value of each transform coefficient varies depending on the mode (high throughput mode). At the start of the sub-block, the high-throughput mode is off, and the high-throughput mode is turned on when the number of non-zero coefficients numSigCoeff in the sub-block becomes equal to or greater than a predetermined constant. In the high throughput mode, decoding of a part of syntax is skipped.

シンタックスcoeff_abs_level_greater1_flagは、変換係数の絶対値が1を越えるものであるのか否かを示すフラグであり、シンタックスsignificant_coeff_flagの値が1である周波数成分について符号化される。変換係数の絶対値が1を越えるものであるとき、coeff_abs_level_greater1_flagの値は1であり、そうでないときにcoeff_abs_level_greater1_flagの値は0である。なお、coeff_abs_level_greater1_flagの復号は、ハイスループットモードの場合にはスキップされる。   The syntax coeff_abs_level_greater1_flag is a flag indicating whether or not the absolute value of the transform coefficient exceeds 1, and is encoded for a frequency component having a syntax significant_coeff_flag value of 1. When the absolute value of the transform coefficient exceeds 1, the value of coeff_abs_level_greater1_flag is 1, otherwise, the value of coeff_abs_level_greater1_flag is 0. Note that the decoding of coeff_abs_level_greater1_flag is skipped in the high throughput mode.

シンタックスcoeff_abs_level_remainingは、変換係数の絶対値が所定のベースレベルbaseLevelである場合に、当該変換係数の絶対値を指定するためのシンタックスであり、coeff_abs_level_greater1_flagの復号がスキップされる場合、及び、coeff_abs_level_greater1_flagが1の場合に符号化される。シンタックスcoeff_abs_level_remainingの値は、変換係数の絶対値からbaseLevelを引いたものである。例えば、coeff_abs_level_remaining=1は、変換係数の絶対値がbaseLevel+1であることを示している。なお、baseLevelは以下のように定まる。   The syntax coeff_abs_level_remaining is a syntax for designating the absolute value of the transform coefficient when the absolute value of the transform coefficient is a predetermined base level baseLevel. When decoding of coeff_abs_level_greater1_flag is skipped, and coeff_abs_level_greater1_flag is In the case of 1, it is encoded. The value of the syntax coeff_abs_level_remaining is obtained by subtracting baseLevel from the absolute value of the transform coefficient. For example, coeff_abs_level_remaining = 1 indicates that the absolute value of the transform coefficient is baseLevel + 1. BaseLevel is determined as follows.

baseLevel = 1 (coeff_abs_level_greater1_flagの復号がスキップされた場合)
baseLevel = 2 (上記以外でcoeff_abs_level_greater1_flagが1の場合)
シンタックスcoeff_sign_flagは、変換係数の符号(正であるのか負であるのか)を示すフラグであり、サインハイディングが行われる場合を除き、シンタックスsignificant_coeff_flagの値が1である周波数成分について符号化される。シンタックスcoeff_sign_flagは、変換係数が正である場合に1をとり、変換係数が負である場合に0をとる。
baseLevel = 1 (when decoding of coeff_abs_level_greater1_flag is skipped)
baseLevel = 2 (other than above, when coeff_abs_level_greater1_flag is 1)
The syntax coeff_sign_flag is a flag indicating the sign of the transform coefficient (whether positive or negative), and is encoded for frequency components whose syntax significant_coeff_flag value is 1, except when sign hiding is performed. The The syntax coeff_sign_flag takes 1 when the transform coefficient is positive, and takes 0 when the transform coefficient is negative.

なお、サインハイディングとは、変換係数の符号を明示的に符号化せず、計算により算出する方法を言う。   Note that sign hiding refers to a method of calculating by calculation without explicitly encoding the sign of the transform coefficient.

動画像復号装置1の備える可変長符号復号部11は、シンタックスlast_significant_coeff_x、last_significant_coeff_y、significant_coeff_flag、coeff_abs_level_greater1_flag、coeff_abs_level_remaining、coeff_sign_flagを復号することにより、各周波数成分についての変換係数Coeff(xC、yC)を生成することができる。ここで、coeff_abs_level_remainingとcoeff_sign_flagは、コンテキストを用いないバイパスと呼ばれる算術符号により符号化されるシンタックスである。   The variable length code decoding unit 11 included in the video decoding device 1 decodes the syntax last_significant_coeff_x, last_significant_coeff_y, significant_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_remaining, and coeff_sign_flag to generate transform coefficients Ceff (Ceff for each frequency component) be able to. Here, coeff_abs_level_remaining and coeff_sign_flag are syntaxes encoded by an arithmetic code called bypass that does not use a context.

図11は、本実施形態の量子化残差情報QDの構成例を示す図である。図11に示すように、本実施形態の量子化残差情報QDは、例示的に、TU単位(transform_unit)単位で生成される、階層構造を有する情報として定義される。   FIG. 11 is a diagram illustrating a configuration example of the quantization residual information QD according to the present embodiment. As illustrated in FIG. 11, the quantization residual information QD of the present embodiment is exemplarily defined as information having a hierarchical structure that is generated in units of TUs (transform_unit).

図11に示すように、本実施形態の量子化残差情報QDの構成は、TUに含まれる変換係数のラスト位置を示すシンタックスlast_coefficient_pos(last_coefficient_pos_x,last_coefficient_pos_y)とサブブロック単位の符号化データのsubblockとから構成される。   As shown in FIG. 11, the configuration of the quantized residual information QD according to the present embodiment includes a syntax last_coefficient_pos (last_coefficient_pos_x, last_coefficient_pos_y) indicating the last position of a transform coefficient included in a TU and a subblock of encoded data in subblock units. It consists of.

サブブロック単位の符号化データsubblockは、変換係数の値を示す符号化データcoeff_levelの集合(coeff_level#M-1…coeff_level#0)と、変換係数の符号を示すシンタックスcoeff_signの集合(coeff_sign#M-1…coeff_sign#0)とから構成される。   The coded data subblock in units of subblocks is a set of coded data coeff_level (coeff_level # M-1 ... coeff_level # 0) indicating the value of the transform coefficient and a set of syntax coeff_sign (coeff_sign # M) indicating the sign of the transform coefficient. -1 ... coeff_sign # 0).

変換係数の値を示す符号化データcoeff_levelは、変換係数有無フラグsignificant_coeff_flagと、変換係数の値を示すシンタックスcoeff_abs_level_greater1_flag、coeff_abs_level_remainingとから構成される。   The encoded data coeff_level indicating the value of the transform coefficient includes a transform coefficient presence / absence flag significant_coeff_flag, and syntaxes coeff_abs_level_greater1_flag and coeff_abs_level_remaining indicating the value of the transform coefficient.

本実施形態の符号化データは、変換係数有無フラグと、変換係数の大きさを示すシンタックスとをサブブロック単位の集合(coeff_level#M-1…coeff_level#0)として配置し、さらに、変換係数の符号をサブブロック単位の集合(coeff_sign#M-1…coeff_sign#0)として、先の集合の後に配置することに特徴がある。本構成は、図4、図5に示す比較例の構成とは異なり、変換係数の符号を、変換係数有無フラグと、変換係数の大きさを示すシンタックスとは別の集合として配置する。本構成の符号化データの復号の流れは図25を用いて後述する。   In the encoded data of the present embodiment, a transform coefficient presence / absence flag and a syntax indicating the size of the transform coefficient are arranged as a set of subblock units (coeff_level # M-1... Coeff_level # 0), and further, transform coefficients Is characterized by being arranged after the previous set as a set of sub-block units (coeff_sign # M-1... Coeff_sign # 0). In this configuration, unlike the configuration of the comparative example shown in FIGS. 4 and 5, the sign of the transform coefficient is arranged as a set different from the transform coefficient presence / absence flag and the syntax indicating the size of the transform coefficient. The flow of decoding the encoded data of this configuration will be described later with reference to FIG.

なお、特定の領域(例えばTU)内の非0変換係数の集合をsignificance mapと呼ぶこともある。   A set of non-zero transform coefficients in a specific area (for example, TU) may be referred to as a significance map.

各種シンタックスの復号処理の詳細については、後述することとし、続いて動画像復号装置1の構成について説明を行う。
〔動画像復号装置1〕
以下では、本実施形態に係る動画像復号装置1について図16、図12〜図29を参照して説明する。動画像復号装置1は、H.264/MPEG−4 AVC規格の後継コーデックであるHEVC(High-Efficiency Video Coding)にて提案されている技術を実装している復号装置である。
Details of the decoding processing of various syntaxes will be described later, and the configuration of the moving image decoding device 1 will be described subsequently.
[Moving picture decoding apparatus 1]
Below, the moving image decoding apparatus 1 which concerns on this embodiment is demonstrated with reference to FIG. 16, FIG. 12-FIG. The moving picture decoding apparatus 1 is an H.264 video camera. This is a decoding device that implements a technique proposed in HEVC (High-Efficiency Video Coding), which is a successor codec of the H.264 / MPEG-4 AVC standard.

図12は、動画像復号装置1の構成を示すブロック図である。図12に示すように、動画像復号装置1は、可変長符号復号部11、予測画像生成部12、逆量子化・逆変換部13、加算器14、フレームメモリ15、および、ループフィルタ16を備えている。また、図12に示すように、予測画像生成部12は、動きベクトル復元部12a、インター予測画像生成部12b、イントラ予測画像生成部12c、および、予測方式決定部12dを備えている。動画像復号装置1は、符号化データ#1を復号することによって動画像#2を生成するための装置である。   FIG. 12 is a block diagram illustrating a configuration of the video decoding device 1. As illustrated in FIG. 12, the video decoding device 1 includes a variable length code decoding unit 11, a predicted image generation unit 12, an inverse quantization / inverse conversion unit 13, an adder 14, a frame memory 15, and a loop filter 16. I have. As illustrated in FIG. 12, the predicted image generation unit 12 includes a motion vector restoration unit 12a, an inter predicted image generation unit 12b, an intra predicted image generation unit 12c, and a prediction method determination unit 12d. The moving picture decoding apparatus 1 is an apparatus for generating moving picture # 2 by decoding encoded data # 1.

(可変長符号復号部11)
図13は、可変長符号復号部11の要部構成を示すブロック図である。図13に示すように、可変長符号復号部11は、量子化残差情報復号部111、予測パラメータ復号部112、予測タイプ情報復号部113、および、フィルタパラメータ復号部114を備えている。
(Variable-length code decoding unit 11)
FIG. 13 is a block diagram illustrating a main configuration of the variable-length code decoding unit 11. As shown in FIG. 13, the variable-length code decoding unit 11 includes a quantization residual information decoding unit 111, a prediction parameter decoding unit 112, a prediction type information decoding unit 113, and a filter parameter decoding unit 114.

可変長符号復号部11は、予測パラメータ復号部112にて、各パーティションに関する予測パラメータPPを、符号化データ#1から復号し、予測画像生成部12に供給する。具体的には、予測パラメータ復号部112は、インター予測パーティションに関しては、参照画像インデックス、推定動きベクトルインデックス、及び、動きベクトル残差を含むインター予測パラメータPP_Interを符号化データ#1から復号し、これらを動きベクトル復元部12aに供給する。一方、イントラ予測パーティションに関しては、推定予測モードフラグ、推定予測モードインデックス、および、残余予測モードインデックスを含むイントラ予測パラメータPP_Intraを符号化データ#1から復号し、これらをイントラ予測画像生成部12cに供給する。   In the variable length code decoding unit 11, the prediction parameter decoding unit 112 decodes the prediction parameter PP related to each partition from the encoded data # 1, and supplies it to the prediction image generation unit 12. Specifically, for the inter prediction partition, the prediction parameter decoding unit 112 decodes the inter prediction parameter PP_Inter including the reference image index, the estimated motion vector index, and the motion vector residual from the encoded data # 1, and these Is supplied to the motion vector restoration unit 12a. On the other hand, for the intra prediction partition, the intra prediction parameter PP_Intra including the estimated prediction mode flag, the estimated prediction mode index, and the residual prediction mode index is decoded from the encoded data # 1, and these are supplied to the intra predicted image generation unit 12c. To do.

また、可変長符号復号部11は、予測タイプ情報復号部113にて、各パーティションについての予測タイプ情報Pred_typeを符号化データ#1から復号し、これを予測方式決定部12dに供給する。更に、可変長符号復号部11は、量子化残差情報復号部111にて、ブロックに関する量子化残差情報QD、及び、そのブロックを含むTUに関する量子化パラメータ差分Δqpを符号化データ#1から復号し、これらを逆量子化・逆変換部13に供給する。また、可変長符号復号部11は、フィルタパラメータ復号部114にて、符号化データ#1からフィルタパラメータFPを復号し、これをループフィルタ16に供給する。なお、量子化残差情報復号部111の具体的な構成については後述するためここでは説明を省略する。   Further, the variable length code decoding unit 11 decodes the prediction type information Pred_type for each partition from the encoded data # 1 in the prediction type information decoding unit 113, and supplies this to the prediction method determination unit 12d. Further, the variable length code decoding unit 11 uses the quantization residual information decoding unit 111 to convert the quantization residual information QD related to the block and the quantization parameter difference Δqp related to the TU including the block from the encoded data # 1. These are decoded and supplied to the inverse quantization / inverse transform unit 13. In the variable length code decoding unit 11, the filter parameter decoding unit 114 decodes the filter parameter FP from the encoded data # 1 and supplies this to the loop filter 16. Note that a specific configuration of the quantized residual information decoding unit 111 will be described later, and a description thereof will be omitted here.

(予測画像生成部12)
予測画像生成部12は、各パーティションについての予測タイプ情報Pred_typeに基づいて、各パーティションがインター予測を行うべきインター予測パーティションであるのか、イントラ予測を行うべきイントラ予測パーティションであるのかを識別する。そして、前者の場合には、インター予測画像Pred_Interを生成すると共に、生成したインター予測画像Pred_Interを予測画像Predとして加算器14に供給し、後者の場合には、イントラ予測画像Pred_Intraを生成すると共に、生成したイントラ予測画像Pred_Intraを加算器14に供給する。なお、予測画像生成部12は、処理対象PUに対してスキップモードが適用されている場合には、当該PUに属する他のパラメータの復号を省略する。
(Predicted image generation unit 12)
The predicted image generation unit 12 identifies whether each partition is an inter prediction partition that should perform inter prediction or an intra prediction partition that should perform intra prediction, based on prediction type information Pred_type for each partition. In the former case, the inter prediction image Pred_Inter is generated, and the generated inter prediction image Pred_Inter is supplied to the adder 14 as the prediction image Pred. In the latter case, the intra prediction image Pred_Intra is generated, The generated intra predicted image Pred_Intra is supplied to the adder 14. Note that, when the skip mode is applied to the processing target PU, the predicted image generation unit 12 omits decoding of other parameters belonging to the PU.

(動きベクトル復元部12a)
動きベクトル復元部12aは、各インター予測パーティションに関する動きベクトルmvを、そのパーティションに関する動きベクトル残差と、他のパーティションに関する復元済みの動きベクトルmv’とから復元する。具体的には、(1)推定動きベクトルインデックスにより指定される推定方法に従って、復元済みの動きベクトルmv’から推定動きベクトルを導出し、(2)導出した推定動きベクトルと動きベクトル残差とを加算することによって動きベクトルmvを得る。なお、他のパーティションに関する復元済みの動きベクトルmv’は、フレームメモリ15から読み出すことができる。動きベクトル復元部12aは、復元した動きベクトルmvを、対応する参照画像インデックスRIと共に、インター予測画像生成部12bに供給する。
(Motion vector restoration unit 12a)
The motion vector restoration unit 12a restores the motion vector mv for each inter prediction partition from the motion vector residual for the partition and the restored motion vector mv ′ for the other partition. Specifically, (1) an estimated motion vector is derived from the restored motion vector mv ′ according to the estimation method specified by the estimated motion vector index, and (2) the derived estimated motion vector and the motion vector residual are A motion vector mv is obtained by addition. It should be noted that the restored motion vector mv ′ relating to other partitions can be read from the frame memory 15. The motion vector restoration unit 12a supplies the restored motion vector mv to the inter predicted image generation unit 12b together with the corresponding reference image index RI.

(インター予測画像生成部12b)
インター予測画像生成部12bは、画面間予測によって、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル復元部12aから供給された動きベクトルmvを用いて、同じく動きベクトル復元部12aから供給された参照画像インデックスRIによって指定される適応フィルタ済復号画像P_ALF’から動き補償画像mcを生成する。ここで、適応フィルタ済復号画像P_ALF’は、既にフレーム全体の復号が完了した復号済みの復号画像に対して、ループフィルタ16によるフィルタ処理を施すことによって得られる画像であり、インター予測画像生成部12bは、適応フィルタ済復号画像P_ALF’を構成する各画素の画素値をフレームメモリ15から読み出すことができる。インター予測画像生成部12bによって生成された動き補償画像mcは、インター予測画像Pred_Interとして予測方式決定部12dに供給される。
(Inter prediction image generation unit 12b)
The inter prediction image generation unit 12b generates a motion compensated image mc related to each inter prediction partition by inter-screen prediction. Specifically, using the motion vector mv supplied from the motion vector restoration unit 12a, the motion compensated image from the adaptive filtered decoded image P_ALF ′ designated by the reference image index RI also supplied from the motion vector restoration unit 12a. Generate mc. Here, the adaptive filtered decoded image P_ALF ′ is an image obtained by performing the filtering process by the loop filter 16 on the decoded image that has already been decoded for the entire frame. 12b can read out the pixel value of each pixel constituting the adaptive filtered decoded image P_ALF ′ from the frame memory 15. The motion compensated image mc generated by the inter predicted image generation unit 12b is supplied to the prediction method determination unit 12d as an inter predicted image Pred_Inter.

(イントラ予測画像生成部12c)
イントラ予測画像生成部12cは、各イントラ予測パーティションに関する予測画像Pred_Intraを生成する。具体的には、まず、可変長符号復号部11から供給されたイントラ予測パラメータPP_Intraに基づいて予測モードを特定し、特定された予測モードを対象パーティションに対して、例えば、ラスタスキャン順に割り付ける。
(Intra predicted image generation unit 12c)
The intra predicted image generation unit 12c generates a predicted image Pred_Intra related to each intra prediction partition. Specifically, first, a prediction mode is specified based on the intra prediction parameter PP_Intra supplied from the variable length code decoding unit 11, and the specified prediction mode is assigned to the target partition in, for example, raster scan order.

ここで、イントラ予測パラメータPP_Intraに基づく予測モードの特定は、以下のように行うことができる。(1)推定予測モードフラグを復号し、当該推定予測モードフラグが、処理対象である対象パーティションについての予測モードと、当該対象パーティションの周辺のパーティションに割り付けられた予測モードとが同一であることを示している場合には、対象パーティションに対して、当該対象パーティションの周辺のパーティションに割り付けられた予測モードを割り付ける。(2)一方で、推定予測モードフラグが、処理対象である対象パーティションについての予測モードと、当該対象パーティションの周辺のパーティションに割り付けられた予測モードとが同一でないことを示している場合には、残余予測モードインデックスを復号し、当該残余予測モードインデックスの示す予測モードを対象パーティションに対して割り付ける。   Here, the prediction mode based on the intra prediction parameter PP_Intra can be specified as follows. (1) The estimated prediction mode flag is decoded, and the estimated prediction mode flag indicates that the prediction mode for the target partition to be processed is the same as the prediction mode assigned to the peripheral partition of the target partition. If the target partition is indicated, the prediction mode assigned to the partition around the target partition is assigned to the target partition. (2) On the other hand, when the estimated prediction mode flag indicates that the prediction mode for the target partition to be processed is not the same as the prediction mode assigned to the partitions around the target partition, The residual prediction mode index is decoded, and the prediction mode indicated by the residual prediction mode index is assigned to the target partition.

イントラ予測画像生成部12cは、対象パーティションに割り付けられた予測モードの示す予測方法に従って、画面内予測によって、(局所)復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部12cによって生成されたイントラ予測画像Pred_Intraは、予測方式決定部12dに供給される。なお、イントラ予測画像生成部12cは、画面内予測によって、適応フィルタ済復号画像P_ALFから予測画像Pred_Intraを生成する構成とすることも可能である。   The intra predicted image generation unit 12c generates a predicted image Pred_Intra from the (local) decoded image P by intra prediction according to the prediction method indicated by the prediction mode assigned to the target partition. The intra predicted image Pred_Intra generated by the intra predicted image generation unit 12c is supplied to the prediction method determination unit 12d. Note that the intra predicted image generation unit 12c can also be configured to generate the predicted image Pred_Intra from the adaptive filtered decoded image P_ALF by intra prediction.

図14を用いて、予測モードの定義について説明する。図14は、予測モードの定義を示している。同図に示すように、36種類の予測モードが定義されており、それぞれの予測モードは、「0」〜「35」の番号(イントラ予測モードインデックス)によって特定される。また、図15に示すように、各予測モードには次のような名称が割り当てられている。すなわち、「0」は、“Intra_Planar(プラナー予測モード、平面予測モード)”であり、「1」は、“Intra DC(イントラDC予測モード)”であり、「2」〜「34」は、“Intra Angular(方向予測)”であり、「35」は、“Intra From Luma”である。「35」は、色差予測モード固有のものであり、輝度の予測に基づいて色差の予測を行うモードである。言い換えれば、色差予測モード「35」は、輝度画素値と色差画素値との相関を利用した予測モードである。色差予測モード「35」はLMモードとも称する。予測モード数(intraPredModeNum)は、対象ブロックのサイズによらず「35」である。   The definition of the prediction mode will be described with reference to FIG. FIG. 14 shows the definition of the prediction mode. As shown in the figure, 36 types of prediction modes are defined, and each prediction mode is specified by a number (intra prediction mode index) from “0” to “35”. Further, as shown in FIG. 15, the following names are assigned to the respective prediction modes. That is, “0” is “Intra_Planar (planar prediction mode, plane prediction mode)”, “1” is “Intra DC (intra DC prediction mode)”, and “2” to “34” are “ "Intra Angular (direction prediction)" and "35" is "Intra From Luma". “35” is unique to the color difference prediction mode, and is a mode for performing color difference prediction based on luminance prediction. In other words, the color difference prediction mode “35” is a prediction mode using the correlation between the luminance pixel value and the color difference pixel value. The color difference prediction mode “35” is also referred to as an LM mode. The number of prediction modes (intraPredModeNum) is “35” regardless of the size of the target block.

(予測方式決定部12d)
予測方式決定部12dは、各パーティションが属するPUについての予測タイプ情報Pred_typeに基づいて、各パーティションがインター予測を行うべきインター予測パーティションであるのか、イントラ予測を行うべきイントラ予測パーティションであるのかを決定する。そして、前者の場合には、インター予測画像生成部12bにて生成されたインター予測画像Pred_Interを予測画像Predとして加算器14に供給し、後者の場合には、イントラ予測画像生成部12cにて生成されたイントラ予測画像Pred_Intraを予測画像Predとして加算器14に供給する。
(Prediction method determination unit 12d)
The prediction method determination unit 12d determines whether each partition is an inter prediction partition for performing inter prediction or an intra prediction partition for performing intra prediction based on prediction type information Pred_type for the PU to which each partition belongs. To do. In the former case, the inter prediction image Pred_Inter generated by the inter prediction image generation unit 12b is supplied to the adder 14 as the prediction image Pred. In the latter case, the inter prediction image generation unit 12c generates the inter prediction image Pred_Inter. The intra predicted image Pred_Intra that has been processed is supplied to the adder 14 as the predicted image Pred.

(逆量子化・逆変換部13)
逆量子化・逆変換部13は、(1)符号化データ#1の量子化残差情報QDから復号された変換係数Coeffを逆量子化し、(2)逆量子化によって得られた変換係数Coeff_IQに対して逆DCT(Discrete Cosine Transform)変換等の逆周波数変換を施し、(3)逆周波数変換によって得られた予測残差Dを加算器14に供給する。なお、量子化残差情報QDから復号された変換係数Coeffを逆量子化する際に、逆量子化・逆変換部13は、可変長符号復号部11から供給された量子化パラメータ差分Δqpから量子化ステップQPを導出する。量子化パラメータqpは、直前に逆量子化及び逆周波数変換したTUに関する量子化パラメータqp’に量子化パラメータ差分Δqpを加算することによって導出でき、量子化ステップQPは、量子化パラメータqpから例えばQP=2pq/6によって導出できる。また、逆量子化・逆変換部13による予測残差Dの生成は、TUあるいはTUを分割したブロックを単位として行われる。
(Inverse quantization / inverse transform unit 13)
The inverse quantization / inverse transform unit 13 (1) inversely quantizes the transform coefficient Coeff decoded from the quantized residual information QD of the encoded data # 1, and (2) transform coefficient Coeff_IQ obtained by the inverse quantization. Are subjected to inverse frequency transformation such as inverse DCT (Discrete Cosine Transform) transformation, and (3) the prediction residual D obtained by the inverse frequency transformation is supplied to the adder 14. Note that when the transform coefficient Coeff decoded from the quantization residual information QD is inversely quantized, the inverse quantization / inverse transform unit 13 performs quantization from the quantization parameter difference Δqp supplied from the variable length code decoding unit 11. Deriving step QP. The quantization parameter qp can be derived by adding the quantization parameter difference Δqp to the quantization parameter qp ′ relating to the TU that has just been inversely quantized and inversely frequency transformed immediately before, and the quantization step QP can be derived from the quantization parameter qp, for example QP = 2 pq / 6 . The generation of the prediction residual D by the inverse quantization / inverse transform unit 13 is performed in units of blocks obtained by dividing TUs or TUs.

なお、逆量子化・逆変換部13によって行われる逆DCT変換は、例えば、対象ブロックのサイズが8×8画素である場合、当該対象ブロックにおける画素の位置を(i、j)(0≦i≦7、0≦j≦7)とし、位置(i、j)における予測残差Dの値をD(i、j)と表すことにし、周波数成分(u、v)(0≦u≦7、0≦v≦7)における逆量子化された変換係数をCoeff_IQ(u、v)と表すことにすると、例えば、以下の数式(1)によって与えられる。   For example, when the size of the target block is 8 × 8 pixels, the inverse DCT transform performed by the inverse quantization / inverse transform unit 13 sets the pixel position in the target block to (i, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7), and the value of the prediction residual D at the position (i, j) is represented as D (i, j), and the frequency component (u, v) (0 ≦ u ≦ 7, When the inversely quantized transform coefficient in 0 ≦ v ≦ 7) is expressed as Coeff_IQ (u, v), it is given by, for example, the following formula (1).

Figure 2013223051
Figure 2013223051

ここで、(u、v)は、上述した(xC、yC)に対応する変数である。C(u)およびC(v)は、以下のように与えられる。 Here, (u, v) is a variable corresponding to (xC, yC) described above. C (u) and C (v) are given as follows.

・C(u)=1/√2 (u=0)
・C(u)=1 (u≠0)
・C(v)=1/√2 (v=0)
・C(v)=1 (v≠0)
(加算器14)
加算器14は、予測画像生成部12から供給された予測画像Predと、逆量子化・逆変換部13から供給された予測残差Dとを加算することによって復号画像Pを生成する。生成された復号画像Pは、フレームメモリ15に格納される。
・ C (u) = 1 / √2 (u = 0)
・ C (u) = 1 (u ≠ 0)
・ C (v) = 1 / √2 (v = 0)
・ C (v) = 1 (v ≠ 0)
(Adder 14)
The adder 14 generates the decoded image P by adding the prediction image Pred supplied from the prediction image generation unit 12 and the prediction residual D supplied from the inverse quantization / inverse conversion unit 13. The generated decoded image P is stored in the frame memory 15.

(ループフィルタ16)
ループフィルタ16は、(1)復号画像Pにおけるブロック境界、またはパーティション境界の周辺の画像の平滑化(デブロック処理)を行うデブロッキングフィルタ(DF:Deblocking Filter)としての機能と、(2)デブロッキングフィルタが作用した画像に対して、フィルタパラメータFPを用いて適応フィルタ処理を行う適応フィルタ(ALF:Adaptive Loop Filter)としての機能とを有している。
(Loop filter 16)
The loop filter 16 includes (1) a function as a deblocking filter (DF) that performs smoothing (deblocking processing) on an image around a block boundary or partition boundary in the decoded image P, and (2) a deblocking filter. It has a function as an adaptive filter (ALF: Adaptive Loop Filter) which performs an adaptive filter process using the filter parameter FP with respect to the image which the blocking filter acted on.

(量子化残差情報復号部111)
量子化残差情報復号部111は、符号化データ#1に含まれる量子化残差情報QDから、各周波数成分(xC、yC)についての量子化された変換係数Coeff(xC、yC)を復号するための構成である。ここで、xCおよびyCは、周波数領域における各周波数成分の位置を表すインデックスであり、それぞれ、上述した水平方向周波数uおよび垂直方向周波数vに対応するインデックスである。以下では、量子化された変換係数Coeffを、単に、変換係数Coeffと呼ぶこともある。
(Quantization residual information decoding unit 111)
The quantization residual information decoding unit 111 decodes the quantized transform coefficient Coeff (xC, yC) for each frequency component (xC, yC) from the quantization residual information QD included in the encoded data # 1. It is the structure for doing. Here, xC and yC are indexes representing the position of each frequency component in the frequency domain, and are indexes corresponding to the above-described horizontal frequency u and vertical frequency v, respectively. Hereinafter, the quantized transform coefficient Coeff may be simply referred to as transform coefficient Coeff.

図16は、量子化残差情報復号部111の構成を示すブロック図である。図16に示すように、量子化残差情報復号部111は、変換係数復号部120及び算術符号復号部130を備えている。   FIG. 16 is a block diagram illustrating a configuration of the quantized residual information decoding unit 111. As illustrated in FIG. 16, the quantized residual information decoding unit 111 includes a transform coefficient decoding unit 120 and an arithmetic code decoding unit 130.

(算術符号復号部130)
算術符号復号部130は、量子化残差情報QDに含まれる各ビットをコンテキストを参照して復号するための構成であり、図16に示すように、コンテキスト記録更新部131及びビット復号部132を備えている。
(Arithmetic Code Decoding Unit 130)
The arithmetic code decoding unit 130 is configured to decode each bit included in the quantized residual information QD with reference to the context. As illustrated in FIG. 16, the context recording update unit 131 and the bit decoding unit 132 are provided. I have.

(コンテキスト記録更新部131)
コンテキスト記録更新部131は、各コンテキストインデックスctxIdxによって管理されるコンテキスト変数CVを記録及び更新するための構成である。ここで、コンテキスト変数CVには、(1)発生確率が高い優勢シンボルMPS(most probable symbol)と、(2)その優勢シンボルMPSの発生確率を指定する確率状態インデックスpStateIdxとが含まれている。
(Context record update unit 131)
The context recording / updating unit 131 is configured to record and update the context variable CV managed by each context index ctxIdx. Here, the context variable CV includes (1) a dominant symbol MPS (most probable symbol) having a high occurrence probability and (2) a probability state index pStateIdx for designating the occurrence probability of the dominant symbol MPS.

コンテキスト記録更新部131は、変換係数復号部120の備える各部から供給されるコンテキストインデックスctxIdx及びビット復号部132によって復号されたBinの値を参照することによってコンテキスト変数CVを更新すると共に、更新されたコンテキスト変数CVを次回更新されるまで記録する。なお、優勢シンボルMPSは0か1である。また、優勢シンボルMPSと確率状態インデックスpStateIdxは、ビット復号部132がBinを1つ復号する毎に更新される。   The context recording update unit 131 updates the context variable CV by referring to the context index ctxIdx supplied from each unit of the transform coefficient decoding unit 120 and the Bin value decoded by the bit decoding unit 132, and updated. Record the context variable CV until the next update. The dominant symbol MPS is 0 or 1. Further, the dominant symbol MPS and the probability state index pStateIdx are updated every time the bit decoding unit 132 decodes one Bin.

また、コンテキストインデックスctxIdxは、各周波数成分についてのコンテキストを直接指定するものであってもよいし、処理対象のTU毎に設定されるコンテキストインデックスのオフセットからの増分値であってもよい(以下同様)。   The context index ctxIdx may directly specify the context for each frequency component, or may be an increment value from the context index offset set for each TU to be processed (the same applies hereinafter). ).

(ビット復号部132)
ビット復号部132は、コンテキスト記録更新部131に記録されているコンテキスト変数CVを参照し、量子化残差情報QDに含まれる各ビット(Binとも呼ぶ)を復号する。また、復号して得られたBinの値を変換係数復号部120の備える各部に供給する。また、復号して得られたBinの値は、コンテキスト記録更新部131にも供給され、コンテキスト変数CVを更新するために参照される。
(Bit decoding unit 132)
The bit decoding unit 132 refers to the context variable CV recorded in the context recording update unit 131 and decodes each bit (also referred to as Bin) included in the quantization residual information QD. Further, the Bin value obtained by decoding is supplied to each unit included in the transform coefficient decoding unit 120. Further, the value of Bin obtained by decoding is also supplied to the context recording update unit 131 and is referred to in order to update the context variable CV.

(変換係数復号部120)
図16に示すように、変換係数復号部120は、ラスト係数位置復号部121、スキャン順テーブル格納部122、係数復号制御部123、係数レベル復号部124、係数符号復号部125、復号係数記憶部126、及び、サブブロック係数有無フラグ復号部127を備えている。
(Transform coefficient decoding unit 120)
As shown in FIG. 16, the transform coefficient decoding unit 120 includes a last coefficient position decoding unit 121, a scan order table storage unit 122, a coefficient decoding control unit 123, a coefficient level decoding unit 124, a coefficient code decoding unit 125, and a decoded coefficient storage unit. 126, and a sub-block coefficient presence / absence flag decoding unit 127.

(ラスト係数位置復号部121)
ラスト係数位置復号部121は、ビット復号部132より供給される復号ビット(Bin)を解釈し、シンタックスlast_significant_coeff_x及びlast_significant_coeff_yを復号する。復号したシンタックスlast_significant_coeff_x及びlast_significant_coeff_yは、係数復号制御部123に供給される。また、ラスト係数位置復号部121は、算術符号復号部130にてシンタックスlast_significant_coeff_x及びlast_significant_coeff_yのBinを復号するために用いられるコンテキストを決定するためのコンテキストインデックスctxIdxを算出する。算出されたコンテキストインデックスctxIdxは、コンテキスト記録更新部131に供給される。
(Last coefficient position decoding unit 121)
The last coefficient position decoding unit 121 interprets the decoded bit (Bin) supplied from the bit decoding unit 132, and decodes the syntax last_significant_coeff_x and last_significant_coeff_y. The decoded syntax last_significant_coeff_x and last_significant_coeff_y are supplied to the coefficient decoding control unit 123. Further, the last coefficient position decoding unit 121 calculates a context index ctxIdx for determining a context used for decoding the bins of the syntax last_significant_coeff_x and last_significant_coeff_y in the arithmetic code decoding unit 130. The calculated context index ctxIdx is supplied to the context recording update unit 131.

(スキャン順テーブル格納部122)
スキャン順テーブル格納部122には、処理対象のTU(ブロック)のサイズ、スキャン方向の種別を表すスキャンインデックス、及びスキャン順に沿って付与された周波数成分識別インデックスを引数として、処理対象の周波数成分の周波数領域における位置を与えるテーブルが格納されている。
(Scan order table storage unit 122)
The scan order table storage unit 122 uses as arguments the size of the TU (block) to be processed, the scan index representing the type of scan direction, and the frequency component identification index given along the scan order. A table for giving a position in the frequency domain is stored.

このようなスキャン順テーブルの一例としては、図6及び図7に示したScanOrderが挙げられる。図6及び図7に示したScanOrderにおいて、log2TrafoWidthは、処理対象のTUの横幅のサイズを表わし、log2TrafoHeightは、処理対象のTUの縦幅のサイズを表わしており、scanIdxはスキャンインデックスを表しており、nは、スキャン順に沿って付与された周波数成分識別インデックスを表している。また、図6及び図7において、xC及びyCは、処理対象の周波数成分の周波数領域における位置を表している。   An example of such a scan order table is ScanOrder shown in FIGS. 6 and 7. In ScanOrder shown in FIGS. 6 and 7, log2TrafoWidth represents the width of the TU to be processed, log2TrafoHeight represents the height of the TU to be processed, and scanIdx represents the scan index. , N represent frequency component identification indexes given along the scan order. 6 and 7, xC and yC represent the positions of the frequency components to be processed in the frequency domain.

また、スキャン順テーブル格納部122に格納されたテーブルは、処理対象のTU(ブロック)のサイズとイントラ予測モードの予測モードインデックスとに関連付けられたスキャンインデックスscanIdxによって指定される。処理対象のTUに用いられた予測方法がイントラ予測である場合には、係数復号制御部123は、当該TUのサイズと当該TUの予測モードとに関連付けられたスキャンインデックスscanIdxによって指定されるテーブルを参照して周波数成分のスキャン順を決定する。   The table stored in the scan order table storage unit 122 is specified by the scan index scanIdx associated with the size of the TU (block) to be processed and the prediction mode index of the intra prediction mode. When the prediction method used for the TU to be processed is intra prediction, the coefficient decoding control unit 123 creates a table specified by the scan index scanIdx associated with the size of the TU and the prediction mode of the TU. The scanning order of the frequency components is determined with reference to it.

図17は、イントラ予測モードインデックスIntraPredModeと、TUサイズを指定する値log2TrafoSizeとによって指定されるスキャンインデックスscanIdxの例を示している。図17において、log2TrafoSize-2=0は、TUサイズが4×4(4×4画素に対応)であることを示しており、log2TrafoSize-2=1は、TUサイズが8×8(8×8画素に対応)であることを示している。図17に示すように、例えば、TUサイズが4×4であり、イントラ予測モードインデックスが1であるとき、スキャンインデックス=0が用いられ、TUサイズが4×4であり、イントラ予測モードインデックスが6であるとき、スキャンインデックス=2が用いられる。   FIG. 17 illustrates an example of the scan index scanIdx specified by the intra prediction mode index IntraPredMode and the value log2TrafoSize specifying the TU size. In FIG. 17, log2TrafoSize-2 = 0 indicates that the TU size is 4 × 4 (corresponding to 4 × 4 pixels), and log2TrafoSize-2 = 1 indicates that the TU size is 8 × 8 (8 × 8 Corresponding to a pixel). As shown in FIG. 17, for example, when the TU size is 4 × 4 and the intra prediction mode index is 1, the scan index = 0 is used, the TU size is 4 × 4, and the intra prediction mode index is When 6, scan index = 2 is used.

図18(a)は、スキャンインデックスscanIdxの各値によって指定されるスキャンタイプScanTypeを示している。図18(a)に示すように、スキャンインデックスが0であるとき、斜め方向スキャン(Up-right diagonal scan)が指定され、スキャンインデックスが1であるとき、水平方向優先スキャン(horizontal fast scan)が指定され、スキャンインデックスが2であるとき、垂直方向優先スキャン(vertical fact scan)が指定される。   FIG. 18A shows the scan type ScanType specified by each value of the scan index scanIdx. As shown in FIG. 18A, when the scan index is 0, an up-right diagonal scan is designated, and when the scan index is 1, a horizontal fast scan is performed. When specified and the scan index is 2, a vertical fact scan is specified.

なお、CU予測方式情報PredModeがインター予測の場合には、TUサイズを用いてスキャンインデックスを導出することができる。TUサイズが、TUサイズの幅と高さが一致する場合には水平優先および垂直優先以外のスキャン順(スキャンインデックス=0)を使用する。TUサイズの幅と高さが一致しない場合で、TUサイズの幅が高さよりも大きい場合には、水平優先のスキャン順(スキャンインデックス=1)を使用する。一方、TUサイズの高さが幅よりも大きい場合には、垂直優先のスキャン順(スキャンインデックス=2)を使用する。   In addition, when the CU prediction method information PredMode is inter prediction, a scan index can be derived using the TU size. When the TU size matches the width and height of the TU size, a scan order other than horizontal priority and vertical priority (scan index = 0) is used. If the width and height of the TU size do not match and the width of the TU size is larger than the height, the horizontal priority scan order (scan index = 1) is used. On the other hand, when the height of the TU size is larger than the width, the scan order with priority (scan index = 2) is used.

また、図18(b)〜(d)は、TUサイズが4×4であるときの、スキャンインデックスscanIdxで指定される各スキャンタイプ(水平方向優先スキャン(horizontal fast scan)、垂直方向優先スキャン(vertical fast scan)、及び、斜め方向スキャン(Up-right diagonal scan))のスキャン順の一例を示している。また、図18(b)〜(d)に示す各例は、順スキャン方向を示している。図18(b)に示す水平方向優先スキャンは、サブブロックを上下半分に分割した小サブブロック単位に、水平方向へ斜め1列毎に係数をスキャンすることを特徴とし、水平方向周波数成分に係数が集中する場合に好適である。また、図18(c)に示す垂直方向優先スキャンは、サブブロックを左右半分に分割した小サブブロック単位に垂直方向へ斜め1列毎に係数をスキャンすることを特徴とし、垂直方向周波数成分に係数が集中する場合に好適である。   18B to 18D show the scan types (horizontal fast scan) and vertical direction priority scan (specified by the scan index scanIdx) when the TU size is 4 × 4. An example of the scan order of vertical fast scan) and diagonal scan (Up-right diagonal scan) is shown. In addition, each example illustrated in FIGS. 18B to 18D indicates the forward scan direction. The horizontal direction priority scan shown in FIG. 18B is characterized in that a coefficient is scanned for each diagonal row in the horizontal direction in units of small sub-blocks obtained by dividing the sub-block into upper and lower halves. It is suitable when the concentration is concentrated. Further, the vertical priority scan shown in FIG. 18C is characterized in that the coefficient is scanned diagonally for each column in the vertical direction in small sub-block units obtained by dividing the sub-block into left and right halves. This is suitable when the coefficients are concentrated.

図19(a)〜(c)は、TUサイズが8×8であり、かつサブブロックサイズが4×4であるときの、スキャンインデックスscanIdxで指定される各スキャンタイプのスキャン順の一例を示している。また、図19(a)〜(c)に示す各例は、順スキャン方向を示している。図19(a)に示す水平方向優先スキャンは、サブブロックを上下半分に分割した小サブブロック単位に、水平方向へ斜め1列毎に係数をスキャンすることを特徴とし、水平方向周波数成分に係数が集中する場合に好適である。また、図19(b)に示す垂直方向優先スキャンは、サブブロックを左右半分に分割した小サブブロック単位に垂直方向へ斜め1列毎に係数をスキャンすることを特徴とし、垂直方向周波数成分に係数が集中する場合に好適である。   FIGS. 19A to 19C show an example of the scan order of each scan type specified by the scan index scanIdx when the TU size is 8 × 8 and the sub-block size is 4 × 4. ing. Each example shown in FIGS. 19A to 19C indicates the forward scan direction. The horizontal direction priority scan shown in FIG. 19 (a) is characterized in that a coefficient is scanned for each diagonal row in the horizontal direction in small sub-block units obtained by dividing the sub-block into upper and lower halves. It is suitable when the concentration is concentrated. Further, the vertical priority scan shown in FIG. 19B is characterized in that the coefficient is scanned for each diagonal column in the vertical direction in small sub-block units obtained by dividing the sub-block into left and right halves. This is suitable when the coefficients are concentrated.

(サブブロックスキャン順テーブル)
また、スキャン順テーブル格納部122には、サブブロックのスキャン順を指定するためのサブブロックスキャン順テーブルが格納されている。サブブロックスキャン順テーブルは、処理対象のTU(ブロック)のサイズとイントラ予測モードの予測モードインデックス(予測方向)とに関連付けられたスキャンインデックスscanIdxによって指定される。処理対象のTUに用いられた予測方法がイントラ予測である場合には、係数復号制御部123は、当該TUのサイズと当該TUの予測モードとに関連付けられたスキャンインデックスscanIdxによって指定されるテーブルを参照してサブブロックのスキャン順を決定する。
(Sub-block scan order table)
The scan order table storage unit 122 stores a sub-block scan order table for designating the scan order of sub-blocks. The sub-block scan order table is specified by the scan index scanIdx associated with the size of the TU (block) to be processed and the prediction mode index (prediction direction) of the intra prediction mode. When the prediction method used for the TU to be processed is intra prediction, the coefficient decoding control unit 123 creates a table specified by the scan index scanIdx associated with the size of the TU and the prediction mode of the TU. The scanning order of the sub-blocks is determined with reference to it.

(係数復号制御部123)
係数復号制御部123は、量子化残差情報復号部111の備える各部における復号処理の順序を制御するための構成である。
(Coefficient decoding control unit 123)
The coefficient decoding control unit 123 is configured to control the order of decoding processing in each unit included in the quantization residual information decoding unit 111.

係数復号制御部123は、ラスト係数位置復号部121から供給されるシンタックスlast_significant_coeff_x及びlast_significant_coeff_yを参照し、順スキャンに沿った最後の非0変換係数の位置を特定すると共に、特定した最後の非0変換係数を含むサブブロックの位置を起点とするスキャン順であって、スキャン順テーブル格納部122に格納されたサブブロックスキャン順テーブルによって与えられるスキャン順の逆スキャン順に、各サブブロックの位置(xCG、yCG)を、サブブロック係数有無フラグ復号部127に供給する。また、係数復号制御部123は、当該TUのサイズと当該TUの予測モードとに関連付けられたスキャンインデックスscanIdxを、係数レベル復号部124へ供給する。   The coefficient decoding control unit 123 refers to the syntaxes last_significant_coeff_x and last_significant_coeff_y supplied from the last coefficient position decoding unit 121, identifies the position of the last non-zero transform coefficient along the forward scan, and identifies the identified last non-zero The position of each sub-block (xCG) in the scan order starting from the position of the sub-block including the transform coefficient and in the reverse scan order of the scan order given by the sub-block scan order table stored in the scan order table storage unit 122 , YCG) is supplied to the sub-block coefficient presence / absence flag decoding unit 127. Further, the coefficient decoding control unit 123 supplies the scan index scanIdx associated with the size of the TU and the prediction mode of the TU to the coefficient level decoding unit 124.

また、係数復号制御部123は、処理対象となるサブブロックに関して、スキャン順テーブル格納部122に格納されたスキャン順テーブルよって与えられるスキャン順の逆スキャン順に、当該処理対象となるサブブロックに含まれる各周波数成分の位置(xC、yC)を、係数レベル復号部124及び復号係数記憶部126に供給する。ここで、処理対象となるサブブロックに含まれる各周波数成分のスキャン順としては、イントラ予測の場合には、イントラ予測モードインデックスIntraPredModeと、TUサイズを指定する値log2TrafoSizeとによって指定されるスキャンインデックスscanIdxの示すスキャン順(水平方向優先スキャン、垂直方向優先スキャン、斜め方向スキャンのいずれか)を用い、インター予測の場合には、斜め方向スキャン(Up-right diagonal scan)を用いればよい。   Also, the coefficient decoding control unit 123 includes the subblocks to be processed in the reverse scan order of the scan order given by the scan order table stored in the scan order table storage unit 122 for the subblocks to be processed. The position (xC, yC) of each frequency component is supplied to the coefficient level decoding unit 124 and the decoded coefficient storage unit 126. Here, as the scan order of each frequency component included in the sub-block to be processed, in the case of intra prediction, the scan index scanIdx specified by the intra prediction mode index IntraPredMode and the value log2TrafoSize specifying the TU size In the case of inter prediction, an oblique scan (Up-right diagonal scan) may be used.

このように、係数復号制御部123は、処理対象の単位領域(ブロック、TU)に適用された予測方式がイントラ予測である場合に、該イントラ予測の予測方向に応じて、サブブロックスキャン順、及びサブブロック内スキャン順を設定する構成である。   Thus, when the prediction scheme applied to the unit region (block, TU) to be processed is intra prediction, the coefficient decoding control unit 123 determines the sub-block scan order according to the prediction direction of the intra prediction, In addition, the scan order within the sub-block is set.

一般に、イントラ予測モードと変換係数の偏りとは互いに相関を有しているため、イントラ予測モードに応じてスキャン順を切り替えることにより、サブブロック係数有無フラグ、係数有無フラグの偏りに適したスキャンを行うことができる。これによって、符号化及び復号対象となるサブブロック係数有無フラグおよび係数有無フラグの符号量を削減することができるので、処理量が削減されると共に、符号化効率が向上する。   In general, the intra prediction mode and the bias of the transform coefficient are correlated with each other. Therefore, by switching the scan order according to the intra prediction mode, a scan suitable for the bias of the subblock coefficient presence / absence flag and the coefficient presence / absence flag is performed. It can be carried out. As a result, the coding amount of the subblock coefficient presence / absence flag and coefficient presence / absence flag to be encoded and decoded can be reduced, so that the processing amount is reduced and the coding efficiency is improved.

(サブブロック係数有無フラグ復号部127)
サブブロック係数有無フラグ復号部127は、ビット復号部132から供給される各Binを解釈し、各サブブロック位置(xCG、yCG)によって指定されるシンタックスsignificant_coeff_group_flag[xCG][yCG]を復号する。また、サブブロック係数有無フラグ復号部127は、算術符号復号部130にてシンタックスsignificant_coeff_group_flag[xCG][yCG]のBinを復号するために用いられるコンテキストを決定するためのコンテキストインデックスctxIdxを算出する。算出されたコンテキストインデックスctxIdxは、コンテキスト記録更新部131に供給される。ここで、シンタックスsignificant_coeff_group_flag[xCG][yCG]は、サブブロック位置(xCG、yCG)によって指定されるサブブロックに、少なくとも1つの非0変換係数が含まれている場合に1をとり、非0変換係数が1つも含まれていない場合に0をとるシンタックスである。復号されたシンタックスsignificant_coeff_group_flag[xCG][yCG]の値は、復号係数記憶部126に格納される。
(Subblock coefficient presence / absence flag decoding unit 127)
The subblock coefficient presence / absence flag decoding unit 127 interprets each Bin supplied from the bit decoding unit 132, and decodes the syntax significant_coeff_group_flag [xCG] [yCG] specified by each subblock position (xCG, yCG). Also, the sub-block coefficient presence / absence flag decoding unit 127 calculates a context index ctxIdx for determining a context used for decoding Bin of the syntax significant_coeff_group_flag [xCG] [yCG] in the arithmetic code decoding unit 130. The calculated context index ctxIdx is supplied to the context recording update unit 131. Here, the syntax significant_coeff_group_flag [xCG] [yCG] is 1 when the subblock specified by the subblock position (xCG, yCG) includes at least one nonzero transform coefficient, and is nonzero. This is a syntax that takes 0 when no conversion coefficient is included. The decoded syntax significant_coeff_group_flag [xCG] [yCG] value is stored in the decoded coefficient storage unit 126.

なお、サブブロック係数有無フラグ復号部127のより具体的な構成については後述する。   Note that a more specific configuration of the sub-block coefficient presence / absence flag decoding unit 127 will be described later.

(係数レベル復号部124)
本実施形態に係る係数レベル復号部124は、各係数位置(xC、yC)によって指定されるシンタックスsignificant_coeff_flag[xC][yC]、coeff_abs_level_greater1_flag、coeff_abs_level_remainingを復号し、変換係数のレベルtransCoeffLevel[xC][yC]を導出する。復号された変換係数のレベル transCoeffLevel[xC][yC]の値は、復号係数記憶部126に格納される。また、係数レベル復号部124は、算術符号復号部130にてシンタックスsignificant_coeff_flag[xC][yC]のBinを復号するために用いられるコンテキストを決定するためのコンテキストインデックスctxIdxを算出する。算出されたコンテキストインデックスctxIdxは、コンテキスト記録更新部131に供給される。係数レベル復号部124の具体的な構成については後述する。
(Coefficient level decoding unit 124)
The coefficient level decoding unit 124 according to the present embodiment decodes the syntax significant_coeff_flag [xC] [yC], coeff_abs_level_greater1_flag, and coeff_abs_level_remaining specified by each coefficient position (xC, yC), and transform coefficient level transCoeffLevel [xC] [ yC] is derived. The value of the decoded transform coefficient level transCoeffLevel [xC] [yC] is stored in the decoded coefficient storage unit 126. Also, the coefficient level decoding unit 124 calculates a context index ctxIdx for determining a context used for decoding Bin of the syntax significant_coeff_flag [xC] [yC] in the arithmetic code decoding unit 130. The calculated context index ctxIdx is supplied to the context recording update unit 131. A specific configuration of the coefficient level decoding unit 124 will be described later.

(係数符号復号部125)
係数符号復号部125は、ビット復号部132から供給される各Binを解釈し、シンタックスcoeff_sign_flagを復号すると共に、これらのシンタックスを復号した結果に基づき、処理対象の周波数成分における変換係数(より具体的には非0変換係数)の値を導出する。また、各種シンタックスの復号に用いたコンテキストインデックスctxIdxは、コンテキスト記録更新部131に供給される。導出された変換係数の値は、復号係数記憶部126に格納される。
(Coefficient code decoding unit 125)
The coefficient code decoding unit 125 interprets each Bin supplied from the bit decoding unit 132, decodes the syntax coeff_sign_flag, and, based on the decoding result of these syntaxes, transform coefficients (more than Specifically, the value of the non-zero conversion coefficient is derived. Also, the context index ctxIdx used for decoding various syntaxes is supplied to the context recording update unit 131. The derived transform coefficient value is stored in the decoded coefficient storage unit 126.

(復号係数記憶部126)
復号係数記憶部126は、係数符号復号部125によって復号された変換係数の各値を記憶しておくための構成である。また、復号係数記憶部126には、係数レベル復号部124によって復号されたシンタックスsignificant_coeff_flagの各値が記憶される。復号係数記憶部126によって記憶されている変換係数の各値は、逆量子化・逆変換部13に供給される。
(Decoding coefficient storage unit 126)
The decoding coefficient storage unit 126 is a configuration for storing each value of the transform coefficient decoded by the coefficient code decoding unit 125. In addition, each value of the syntax significant_coeff_flag decoded by the coefficient level decoding unit 124 is stored in the decoding coefficient storage unit 126. Each value of the transform coefficient stored in the decoded coefficient storage unit 126 is supplied to the inverse quantization / inverse transform unit 13.

(サブブロック係数有無フラグ復号部127の構成例)
以下では、図20を参照して、サブブロック係数有無フラグ復号部127の具体的な構成例について説明する。
(Configuration example of subblock coefficient presence / absence flag decoding unit 127)
Hereinafter, a specific configuration example of the sub-block coefficient presence / absence flag decoding unit 127 will be described with reference to FIG.

図20は、サブブロック係数有無フラグ復号部127の構成例を示すブロック図である。図20に示すように、サブブロック係数有無フラグ復号部127は、サブブロック係数有無フラグコンテキスト導出部127a、サブブロック係数有無フラグ記憶部127b、及び、サブブロック係数有無フラグ設定部127cを備えている。   FIG. 20 is a block diagram illustrating a configuration example of the sub-block coefficient presence / absence flag decoding unit 127. As shown in FIG. 20, the sub-block coefficient presence / absence flag decoding unit 127 includes a sub-block coefficient presence / absence flag context deriving unit 127a, a sub-block coefficient presence / absence flag storage unit 127b, and a sub-block coefficient presence / absence flag setting unit 127c. .

以下では、サブブロック係数有無フラグ復号部127に対して、係数復号制御部123から、サブブロック位置(xCG、yCG)が逆スキャン順に供給される場合を例に挙げて説明を行う。なお、この場合、サブブロック係数有無フラグ復号部127に対応する符号化装置側の構成では、サブブロック位置(xCG、yCG)が順スキャン順に供給されることになる。   Hereinafter, a case where the sub-block coefficient presence / absence flag decoding unit 127 is supplied with sub-block positions (xCG, yCG) from the coefficient decoding control unit 123 in the reverse scan order will be described as an example. In this case, in the configuration on the encoding device side corresponding to the sub-block coefficient presence / absence flag decoding unit 127, the sub-block positions (xCG, yCG) are supplied in the forward scan order.

(サブブロック係数有無フラグコンテキスト導出部127a)
サブブロック係数有無フラグ復号部127の備えるサブブロック係数有無フラグコンテキスト導出部127aは、各サブブロック位置(xCG、yCG)によって指定されるサブブロックに割り付けるコンテキストインデックスを導出する。サブブロックに割り付けられたコンテキストインデックスは、当該サブブロックについてのシンタックスsignificant_coeff_group_flagを示すBinを復号する際に用いられる。また、コンテキストインデックスを導出する際には、サブブロック係数有無フラグ記憶部127bに記憶された復号済みのサブブロック係数有無フラグの値が参照される。サブブロック係数有無フラグコンテキスト導出部127aは、導出したコンテキストインデックスをコンテキスト記録更新部131に供給する。
(Subblock coefficient presence / absence flag context deriving unit 127a)
The subblock coefficient presence / absence flag context deriving unit 127a included in the subblock coefficient presence / absence flag decoding unit 127 derives a context index to be allocated to the subblock specified by each subblock position (xCG, yCG). The context index assigned to the sub-block is used when decoding Bin indicating the syntax significant_coeff_group_flag for the sub-block. Further, when the context index is derived, the value of the decoded sub-block coefficient presence / absence flag stored in the sub-block coefficient presence / absence flag storage unit 127b is referred to. The sub-block coefficient presence / absence flag context deriving unit 127a supplies the derived context index to the context recording / updating unit 131.

サブブロックに割り付けるコンテキストインデックスの導出では、サブブロック位置(xCG、yCG)の右隣に位置するサブブロック(xCG+1,yCG)(図21(b)を参照)のサブブロック係数有無フラグと、サブブロック位置(xCG,yCG)の下に位置するサブブロック(xCG,yCG+1)(図21(b)を参照)のサブブロック係数有無フラグとが参照される。   In the derivation of the context index to be assigned to the sub-block, the sub-block coefficient presence / absence flag of the sub-block (xCG + 1, yCG) (see FIG. 21B) located immediately to the right of the sub-block position (xCG, yCG) and the sub-block The sub block coefficient presence / absence flag of the sub block (xCG, yCG + 1) (see FIG. 21B) located below the position (xCG, yCG) is referred to.

すなわち、サブブロックに割り付けるコンテキストインデックスは、具体的には、サブブロック位置(xCG,yCG)、及びサブブロック係数有無フラグ記憶部127bに記憶された復号済みのサブブロック係数有無フラグの値を用いて導出される。   That is, the context index to be assigned to the sub-block is specifically determined by using the sub-block position (xCG, yCG) and the value of the decoded sub-block coefficient presence / absence flag stored in the sub-block coefficient presence / absence flag storage unit 127b. Derived.

より詳細には、コンテキストインデックスは、サブブロック位置(xCG、yCG)の右隣に位置するサブブロック(xCG+1,yCG)について復号されている復号済みサブブロック係数有無フラグsignificant_coeff_group_flag[xCG+1][yCG]の値と、サブブロック位置(xCG,yCG)の下に位置するサブブロック(xCG,yCG+1)について復号されている復号済サブブロック係数有無フラグsiginificant_coeff_group_flag[xCG][yCG+1]の値とを参照して次のように設定される。   More specifically, the context index is a decoded subblock coefficient presence / absence flag significant_coeff_group_flag [xCG + 1] [yCG decoded for a subblock (xCG + 1, yCG) located to the right of the subblock position (xCG, yCG). ] And the value of the decoded subblock coefficient presence / absence flag siginificant_coeff_group_flag [xCG] [yCG + 1] decoded for the subblock (xCG, yCG + 1) located below the subblock position (xCG, yCG) It is set as follows with reference.

ctxIdx = ctxIdxOffset + Min ((significant_coeff_group_flag[xCG+1][yCG]+significant_coeff_group_flag[xCG][yCG+1] ), 1)
なお、初期値ctxIdxOffsetは、色空間を示すcIdxにより定まる。なお、(xCG+1,yCG)、あるいは(xCG、yCG+1)に位置する復号済サブブロックが存在しない場合は、(xCG+1、yCG)、あるいは(xCG、yCG+1)に位置するサブブロック係数有無フラグの値をゼロとして扱う。
ctxIdx = ctxIdxOffset + Min ((significant_coeff_group_flag [xCG + 1] [yCG] + significant_coeff_group_flag [xCG] [yCG + 1]), 1)
Note that the initial value ctxIdxOffset is determined by cIdx indicating a color space. When there is no decoded sub-block located at (xCG + 1, yCG) or (xCG, yCG + 1), the value of the sub-block coefficient presence / absence flag located at (xCG + 1, yCG) or (xCG, yCG + 1) is set. Treat as zero.

(サブブロック係数有無フラグ記憶部127b)
サブブロック係数有無フラグ記憶部127bには、サブブロック係数有無フラグ設定部127cによって復号又は設定されたシンタックスsignificant_coeff_group_flagの各値が記憶されている。サブブロック係数有無フラグ設定部127cは、隣接サブブロックに割り付けられたシンタックスsignificant_coeff_group_flagを、サブブロック係数有無フラグ記憶部127bから読み出すことができる。
(Subblock coefficient presence / absence flag storage unit 127b)
Each value of the syntax significant_coeff_group_flag decoded or set by the subblock coefficient presence / absence flag setting unit 127c is stored in the subblock coefficient presence / absence flag storage unit 127b. The subblock coefficient presence / absence flag setting unit 127c can read the syntax significant_coeff_group_flag allocated to the adjacent subblock from the subblock coefficient presence / absence flag storage unit 127b.

(サブブロック係数有無フラグ設定部127c)
サブブロック係数有無フラグ設定部127cは、ビット復号部132から供給される各Binを解釈し、シンタックスsignificant_coeff_group_flag[xCG][yCG]を復号または設定する。より具体的には、サブブロック係数有無フラグ設定部127cは、サブブロック位置(xCG、yCG)、及び、サブブロック位置(xCG、yCG)によって指定されるサブブロックに隣接するサブブロック(隣接サブブロックとも呼ぶ)に割り付けられたシンタックスsignificant_coeff_group_flagを参照し、シンタックスsignificant_coeff_group_flag[xCG][yCG]を復号または設定する。また、復号または設定されたシンタックスsignificant_coeff_group_flag[xCG][yCG]の値は、係数レベル復号部124に供給される。
(Subblock coefficient presence / absence flag setting unit 127c)
The sub-block coefficient presence / absence flag setting unit 127c interprets each Bin supplied from the bit decoding unit 132, and decodes or sets the syntax significant_coeff_group_flag [xCG] [yCG]. More specifically, the subblock coefficient presence / absence flag setting unit 127c includes a subblock position (xCG, yCG) and a subblock adjacent to the subblock specified by the subblock position (xCG, yCG) (adjacent subblock). Also, the syntax significant_coeff_group_flag [xCG] [yCG] is decoded or set. Further, the value of the syntax significant_coeff_group_flag [xCG] [yCG] decoded or set is supplied to the coefficient level decoding unit 124.

サブブロック係数有無フラグ設定部127cは、図21(c)に示すように、サブブロック(xCG、yCG)に隣接するサブブロック(xCG+1、yCG)に割り付けられたサブブロック係数有無フラグsignificant_coeff_group_flag[xCG+1][yCG]の値とサブブロック(xCG、yCG+1)に割り付けられたサブブロック係数有無フラグsignificant_coeff_group_flag[xCG][yCG+1]の値とを参照し、サブブロック係数有無フラグsignificant_coeff_group_flag[xCG][yCG]を復号するために用いるコンテキストインデックスを導出する。   The sub-block coefficient presence / absence flag setting unit 127c, as shown in FIG. 21 (c), sub-block coefficient presence / absence flag significant_coeff_group_flag [xCG + assigned to the sub-block (xCG + 1, yCG) adjacent to the sub-block (xCG, yCG). 1] Referring to the value of [yCG] and the value of subblock coefficient presence / absence flag significant_coeff_group_flag [xCG] [yCG + 1] assigned to the subblock (xCG, yCG + 1), subblock coefficient presence / absence flag significant_coeff_group_flag [xCG] [ The context index used for decoding yCG] is derived.

なお、サブブロック係数有無フラグが0とされたブロックでは、係数レベル復号部124が、係数有無フラグsignificant_coeff_flagの復号をスキップすることができるため、復号処理が簡略化される。   Note that in a block in which the sub-block coefficient presence / absence flag is set to 0, the coefficient level decoding unit 124 can skip decoding of the coefficient presence / absence flag significant_coeff_flag, thereby simplifying the decoding process.

図22を用いて、具体的に例示すると次のとおりである。図22(a)に示すように変換係数が分布している場合、それぞれのサブブロックに割り付けられるサブブロック係数有無フラグは、図22(b)に示すとおりとなる。すなわち、4×4のサブブロックのうち、1行目のサブブロックでは、非0係数が存在しているが、2行目以降のサブブロックでは、非0係数が存在しない。   A specific example using FIG. 22 is as follows. When transform coefficients are distributed as shown in FIG. 22 (a), the sub-block coefficient presence / absence flags assigned to the respective sub-blocks are as shown in FIG. 22 (b). That is, among the 4 × 4 sub-blocks, the non-zero coefficient exists in the sub-block in the first row, but the non-zero coefficient does not exist in the sub-blocks after the second row.

よって、図22(b)に示す例では、係数レベル復号部124は、2行目以降のサブブロックの復号において、係数有無フラグsignificant_coeff_flagの復号をスキップすることができる。   Therefore, in the example illustrated in FIG. 22B, the coefficient level decoding unit 124 can skip decoding of the coefficient presence / absence flag significant_coeff_flag in decoding of the sub-blocks in the second and subsequent rows.

<係数レベル復号部124の第1の構成例>
以下では、図1、図23(a)を参照して、係数レベル復号部124の第1の構成例について説明する。以下に説明する係数レベル復号部124の第1の構成例では、係数有無フラグのコンテキストインデックス導出に関して、スキャンインデックス、及び係数の位置に応じて、周辺参照コンテキストに用いる係数の参照位置(テンプレートの形状)を切り替える。
<First Configuration Example of Coefficient Level Decoding Unit 124>
Below, the 1st structural example of the coefficient level decoding part 124 is demonstrated with reference to FIG. 1, FIG. 23 (a). In the first configuration example of the coefficient level decoding unit 124 described below, regarding the context index derivation of the coefficient presence / absence flag, the reference position of the coefficient used for the peripheral reference context (the shape of the template) according to the scan index and the position of the coefficient ).

図1は、係数レベル復号部124の構成例を示すブロック図である。なお、以下では、図1に示す部材のうち、第1の構成例の説明に必要なものだけを参照する。すなわち、図1には、非0変換係数カウント部124yを図示しているが、非0変換係数カウント部124yは、第1の構成例に係る係数レベル復号部124では省略することができる。   FIG. 1 is a block diagram illustrating a configuration example of the coefficient level decoding unit 124. In the following, only the members shown in FIG. 1 that are necessary for the description of the first configuration example will be referred to. That is, FIG. 1 illustrates the non-zero transform coefficient count unit 124y, but the non-zero transform coefficient count unit 124y can be omitted in the coefficient level decoding unit 124 according to the first configuration example.

図1に示すように、係数レベル復号部124は、係数有無フラグコンテキスト導出部124z、係数レベル記憶部124d、及び係数有無フラグ設定部124e、係数レベル復号処理部124fを備えている。   As shown in FIG. 1, the coefficient level decoding unit 124 includes a coefficient presence / absence flag context deriving unit 124z, a coefficient level storage unit 124d, a coefficient presence / absence flag setting unit 124e, and a coefficient level decoding processing unit 124f.

(係数有無フラグコンテキスト導出部124z)
係数有無フラグコンテキスト導出部124zは、復号対象の周波数成分に対するコンテキストインデックスctxIdxを、当該周波数成分の周辺の周波数成分について復号済みの絶対値和sumAbsLevelに基づいて導出する。より具体的には、係数有無フラグコンテキスト導出部124zは、対象周波数成分の位置(xC,yC)、もしくは、対象周波数成分が属するサブブロックの位置(xCG,yCG)が次の条件を満たす場合、スキャンインデックスscanIdxと変換係数の位置に応じて異なる参照位置(テンプレート)を用いて復号済みの絶対値和sumAbsLevelを導出する。
(Coefficient presence / absence flag context deriving unit 124z)
The coefficient presence / absence flag context deriving unit 124z derives the context index ctxIdx for the frequency component to be decoded based on the decoded absolute value sumAbsLevel for the frequency components around the frequency component. More specifically, the coefficient presence / absence flag context deriving unit 124z, when the position of the target frequency component (xC, yC) or the position of the sub-block to which the target frequency component belongs (xCG, yCG) satisfies the following condition: A decoded absolute value sum sumAbsLevel is derived using a reference position (template) that differs depending on the scan index scanIdx and the position of the transform coefficient.

上記の条件下において、係数有無フラグコンテキスト導出部124zは、スキャンインデックスscanIdxと変換係数の位置に応じて異なる参照位置(テンプレート)を用いて復号済みの絶対値和sumAbsLevelを導出する。また、係数有無フラグコンテキスト導出部124zは、このようにして導出した復号済みの絶対値和sumAbsLevelに基づいてコンテキストインデックスctxIdxを導出する。   Under the above conditions, the coefficient presence / absence flag context deriving unit 124z derives a decoded absolute value sum sumAbsLevel using a reference position (template) that differs depending on the scan index scanIdx and the position of the transform coefficient. Also, the coefficient presence / absence flag context deriving unit 124z derives the context index ctxIdx based on the decoded absolute value sum sumAbsLevel derived in this way.

係数有無フラグコンテキスト導出部124zは、以下のとおり、スキャンインデックスscanIdxと変換係数の位置に応じて異なる参照位置(テンプレート)を用いて復号済みの絶対値和sumAbsLevelを導出する。図24(a)は、スキャンインデックスscanIdxが斜め方向スキャンを示す場合において、サブブロック内の周波数成分上の位置と、選択するテンプレートの関係とを示す図である。4×4成分のサブブロックにおいて、位置に示す表記が(b)の場合には、図24(b)に示すテンプレートを用い、表記が(c)の場合には図24(c)に示すテンプレートを用いる。図24(b)(c)はテンプレートの形状を示す。すなわち、参照周波数成分(例えば、c1、c2、c3、c4、c5)と対象周波数成分xとの相対位置を示す。図24(e)は、4×4サブブロックにおける斜め方向スキャンのスキャン順(逆スキャン順)を表わす図である。   The coefficient presence / absence flag context deriving unit 124z derives a decoded absolute value sum sumAbsLevel using a reference position (template) that differs depending on the scan index scanIdx and the position of the transform coefficient as follows. FIG. 24A is a diagram illustrating a position on a frequency component in a sub-block and a relationship between templates to be selected when the scan index scanIdx indicates oblique scan. In the 4 × 4 component sub-block, when the notation shown in the position is (b), the template shown in FIG. 24B is used, and when the notation is (c), the template shown in FIG. 24C is used. Is used. 24B and 24C show the shape of the template. That is, it indicates the relative position between the reference frequency component (for example, c1, c2, c3, c4, c5) and the target frequency component x. FIG. 24E is a diagram illustrating the scan order (reverse scan order) of the oblique scan in the 4 × 4 sub-block.

処理は、変換係数の位置(xC, yC)が以下の式(eq.A3)を満たす場合、すなわち、変換係数の位置がサブブロックの左上である、もしくは、変換係数の位置がサブブロックの右下の一つ上の場合と、それ以外の場合とで異なる。   Processing is performed when the position of the transform coefficient (xC, yC) satisfies the following equation (eq.A3), that is, the position of the transform coefficient is at the upper left of the sub-block, or the position of the transform coefficient is at the right of the sub-block. There is a difference between the case above the one below and the other cases.

((xC &3)==0 && (yC &3)==0) || ((xC &3)==3 && (yC &3)==2) (eq.A3)
なお、上記式(eq.A3)において、演算子‘&’はビット単位の論理和を取る演算子であり、‘&&’は、論理積を示す演算子であり、‘||’は、論理和を示す演算子である(以下において、同様)。
((xC & 3) == 0 && (yC & 3) == 0) || ((xC & 3) == 3 && (yC & 3) == 2) (eq.A3)
In the above equation (eq.A3), the operator “&” is a bitwise OR operator, “&&” is a logical product operator, and “||” is a logical operator. It is an operator indicating the sum (the same applies hereinafter).

また、式(eq.A3)は式(eq.A3’)によっても表現することができる。   The equation (eq.A3) can also be expressed by the equation (eq.A3 ′).

((xC %4)==0 && (yC %4)==0) || ((xC %4)==3 && (yC %4)==2) (eq.A3’)
なお、上記式(eq.A3’)において、“%”は、剰余を求める演算子である(以下において、同様)。
((xC% 4) == 0 && (yC% 4) == 0) || ((xC% 4) == 3 && (yC% 4) == 2) (eq.A3 ')
In the above equation (eq.A3 ′), “%” is an operator for calculating the remainder (the same applies hereinafter).

(絶対値和sumAbsLevelの導出)
(式(eq.A3)を満たす場合)
変換係数の位置(xC, yC)が、式(eq.A3)を満たす場合、図24(c)に示す参照周波数成分(c1、c2、c4、c5)を用いて、
復号済みの変換係数の絶対値和sumAbsLevelを以下の式(eq.A4)によって導出する。
(Derivation of sum of absolute values sumAbsLevel)
(If the expression (eq.A3) is satisfied)
When the position (xC, yC) of the transform coefficient satisfies the equation (eq.A3), the reference frequency components (c1, c2, c4, c5) shown in FIG.
The absolute value sum sumAbsLevel of the decoded transform coefficients is derived by the following equation (eq.A4).

sumAbsLevel = clipAbsCoeff[xC+1][yC] // c1
+ clipAbsCoeff[xC+2][yC] // c2
+ clipAbsCoeff[xC+1][yC+1] // c4
+ clipAbsCoeff[xC][yC+2] // c5 ・・・(eq.A4)
ここでclipAbsCoeff[xC][yC]は、以下の式により、所定の値LevelTHでクリップ後の復号済みの変換係数の絶対値である。
sumAbsLevel = clipAbsCoeff [xC + 1] [yC] // c1
+ clipAbsCoeff [xC + 2] [yC] // c2
+ clipAbsCoeff [xC + 1] [yC + 1] // c4
+ clipAbsCoeff [xC] [yC + 2] // c5 ・ ・ ・ (eq.A4)
Here, clipAbsCoeff [xC] [yC] is the absolute value of the decoded transform coefficient after clipping with the predetermined value LevelTH by the following equation.

clipAbsCoeff[xC][yC] = Min (abs(transCoeffLevel[xC][yC]), LevelTH)
なお、後述するように、係数レベル記憶部124dに記憶している復号済みの変換係数のレベルが、既にクリップ後の値である場合には、係数有無フラグコンテキスト導出部124zでクリップ処理を行わなくてもかまわない。
clipAbsCoeff [xC] [yC] = Min (abs (transCoeffLevel [xC] [yC]), LevelTH)
As will be described later, when the level of the decoded transform coefficient stored in the coefficient level storage unit 124d is already a value after clipping, the coefficient presence / absence flag context deriving unit 124z does not perform the clipping process. It doesn't matter.

(式(eq.A3)を満たさない場合)
変換係数の位置(xC, yC)が、式(eq.A3)を満たさない場合は、図24(b)に示す参照周波数成分c1〜c5を用いて、以下の式(eq.A5)によって、絶対値和sumAbsLevelを算出する。
(If the expression (eq.A3) is not satisfied)
When the position (xC, yC) of the transform coefficient does not satisfy the equation (eq.A3), the following equation (eq.A5) is used by using the reference frequency components c1 to c5 shown in FIG. The absolute value sum sumAbsLevel is calculated.

sumAbsLevel = clipAbsCoeff[xC+1][yC] // c1
+ clipAbsCoeff[xC+2][yC] // c2
+ clipAbsCoeff[xC][yC+1] // c3
+ clipAbsCoeff[xC+1][yC+1] // c4
+ clipAbsCoeff[xC][yC+2] // c5 ・・・(eq.A5)
(コンテキストインデックスctxIdxの導出)
続いて、係数有無フラグコンテキスト導出部124zは、図23(a)にも参照番号A6にて示しているが、以下の式(eq.A6)を用いてコンテキストインデックスctxIdxを導出し、その導出結果ctxIdxをコンテキスト記録更新部131に供給する。
sumAbsLevel = clipAbsCoeff [xC + 1] [yC] // c1
+ clipAbsCoeff [xC + 2] [yC] // c2
+ clipAbsCoeff [xC] [yC + 1] // c3
+ clipAbsCoeff [xC + 1] [yC + 1] // c4
+ clipAbsCoeff [xC] [yC + 2] // c5 ・ ・ ・ (eq.A5)
(Derivation of context index ctxIdx)
Subsequently, the coefficient presence / absence flag context deriving unit 124z derives a context index ctxIdx using the following equation (eq.A6), which is also indicated by the reference number A6 in FIG. ctxIdx is supplied to the context recording update unit 131.

ctxIdx = Min(sumAbsLevel, 5) + baseCtx ・・・(eq.A6)
(係数有無フラグ設定部124e)
係数有無フラグ設定部124eは、ビット復号部132から供給される各Binを解釈し、シンタックスsignificant_coeff_flag[xC][yC]を設定する。設定されたシンタックスsignificant_coeff_flag[xC][yC]は、復号係数記憶部126に供給される。
ctxIdx = Min (sumAbsLevel, 5) + baseCtx (eq.A6)
(Coefficient presence / absence flag setting unit 124e)
The coefficient presence / absence flag setting unit 124e interprets each Bin supplied from the bit decoding unit 132, and sets the syntax significant_coeff_flag [xC] [yC]. The set syntax significant_coeff_flag [xC] [yC] is supplied to the decoding coefficient storage unit 126.

係数有無フラグ設定部124eは、対象周波数領域がサブブロックに分割されている場合、対象サブブロックに割り付けられたシンタックスsignificant_coeff_group_flag[xCG][yCG]を参照し、significant_coeff_group_flag[xCG][yCG]の値が0である場合には、当該対象サブブロックに含まれる全ての周波数成分についてのsignificant_coeff_flag[xC][yC]を0に設定する。   When the target frequency region is divided into sub-blocks, the coefficient presence / absence flag setting unit 124e refers to the syntax significant_coeff_group_flag [xCG] [yCG] assigned to the target sub-block, and the value of significant_coeff_group_flag [xCG] [yCG] Is 0, significant_coeff_flag [xC] [yC] is set to 0 for all frequency components included in the target sub-block.

(係数レベル復号処理部124f)
係数レベル復号処理部124fは、非0係数に対して、変換係数のレベルを示すシンタックスcoeff_abs_greater1_flag、coeff_abs_remainingを復号する。係数レベル復号処理部124fは、具体的には、シンタックスcoeff_abs_greater1_flag、coeff_abs_remainingのコンテキストインデックスを導出し、ビット復号部132に供給する。次に、係数レベル復号処理部124fは、ビット復号部132から供給される各Binを解釈し、変換係数のレベルtransCoeffLevel [xC][yC]を導出する。係数レベル復号処理部124fは、導出したシンタックス変換係数のレベルtransCoeffLevel [xC][yC]を、復号係数記憶部126に供給する。また、これと同時に、係数レベル復号処理部124fは、変換係数のレベルtransCoeffLevel [xC][yC]を、係数レベル記憶部124dにも格納する。
(Coefficient level decoding processing unit 124f)
The coefficient level decoding processing unit 124f decodes the syntax coeff_abs_greater1_flag and coeff_abs_remaining indicating the level of the transform coefficient for the non-zero coefficient. Specifically, the coefficient level decoding processing unit 124f derives a context index with the syntax coeff_abs_greater1_flag and coeff_abs_remaining and supplies the context index to the bit decoding unit 132. Next, the coefficient level decoding processing unit 124f interprets each Bin supplied from the bit decoding unit 132, and derives a transform coefficient level transCoeffLevel [xC] [yC]. The coefficient level decoding processing unit 124 f supplies the derived syntax transform coefficient level transCoeffLevel [xC] [yC] to the decoded coefficient storage unit 126. At the same time, the coefficient level decoding processing unit 124f also stores the transform coefficient level transCoeffLevel [xC] [yC] in the coefficient level storage unit 124d.

係数レベル復号処理部124fは、変換係数のレベルを示すシンタックスcoeff_abs_greater1_flagのコンテキストインデックスを、既に復号された変換係数のレベルをクリップした値に応じて、コンテキストインデックスを導出する。具体的には、復号済みの絶対値和sumAbsLevelと変換係数の数cntを用いてコンテキストインデックスctxIdx_c1を導出する。   The coefficient level decoding processing unit 124f derives the context index of the syntax coeff_abs_greater1_flag indicating the level of the transform coefficient in accordance with the value obtained by clipping the level of the already decoded transform coefficient. Specifically, the context index ctxIdx_c1 is derived using the decrypted absolute value sum sumAbsLevel and the number of transform coefficients cnt.

sumAbsLevel = clipAbsCoeff[xC+1][yC] // c1
+ clipAbsCoeff[xC+2][yC] // c2
+ clipAbsCoeff[xC][yC+1] // c3
+ clipAbsCoeff[xC+1][yC+1] // c4
+ clipAbsCoeff[xC][yC+2] // c5 ・・・(eq.A5)
cnt = (transCoeffLevel [xC+1][yC] != 0) // c1
+ transCoeffLevel [xC+2][yC] != 0) // c2
+ transCoeffLevel [xC][yC+1] != 0) // c3
+ transCoeffLevel [xC+1][yC+1] != 0) // c4
+ transCoeffLevel [xC][yC+2] != 0) // c5
ctxIdx_c1 = Min(sumAbsLevel-cnt, 4) + baseCtx_c1
なお、sumAbsLevelM1(=sumAbsLevel-cnt)は次の式で求めても良い。
sumAbsLevel = clipAbsCoeff [xC + 1] [yC] // c1
+ clipAbsCoeff [xC + 2] [yC] // c2
+ clipAbsCoeff [xC] [yC + 1] // c3
+ clipAbsCoeff [xC + 1] [yC + 1] // c4
+ clipAbsCoeff [xC] [yC + 2] // c5 ・ ・ ・ (eq.A5)
cnt = (transCoeffLevel [xC + 1] [yC]! = 0) // c1
+ transCoeffLevel [xC + 2] [yC]! = 0) // c2
+ transCoeffLevel [xC] [yC + 1]! = 0) // c3
+ transCoeffLevel [xC + 1] [yC + 1]! = 0) // c4
+ transCoeffLevel [xC] [yC + 2]! = 0) // c5
ctxIdx_c1 = Min (sumAbsLevel-cnt, 4) + baseCtx_c1
Note that sumAbsLevelM1 (= sumAbsLevel-cnt) may be obtained by the following equation.

sumAbsLevel = clipAbsCoeffM1[xC+1][yC] // c1
+ clipAbsCoeffM1[xC+2][yC] // c2
+ clipAbsCoeffM1[xC][yC+1] // c3
+ clipAbsCoeffM1[xC+1][yC+1] // c4
+ clipAbsCoeffM1[xC][yC+2] // c5 ・・・(eq.A5)
clipAbsCoeffM1[xC][yC] = transCoeffLevel[xC][yC] == 0 ? 0 : Min (abs(transCoeffLevel[xC][yC] - 1), LevelTH)
係数レベル復号処理部124fは、変換係数のレベルを示すシンタックスcoeff_abs_remaininを復号する場合に用いるゴロムライス符号のパラメータrを導出し、このパラメータrを用いてコンテキストを用いない算術符号復号であるバイパスにより、シンタックスcoeff_abs_remainingを復号する。なお、パラメータrは、復号済みの絶対値和sumAbsLevelと変換係数の数cntを用いて以下の式で求める。この式は、復号済みの絶対値和sumAbsLevel及び変換係数の数cntとrの対応を示すテーブルにより実現することもできる。
sumAbsLevel = clipAbsCoeffM1 [xC + 1] [yC] // c1
+ clipAbsCoeffM1 [xC + 2] [yC] // c2
+ clipAbsCoeffM1 [xC] [yC + 1] // c3
+ clipAbsCoeffM1 [xC + 1] [yC + 1] // c4
+ clipAbsCoeffM1 [xC] [yC + 2] // c5 ・ ・ ・ (eq.A5)
clipAbsCoeffM1 [xC] [yC] = transCoeffLevel [xC] [yC] == 0? 0: Min (abs (transCoeffLevel [xC] [yC]-1), LevelTH)
The coefficient level decoding processing unit 124f derives a parameter r of the Golomb-Rice code used when decoding the syntax coeff_abs_remainin indicating the level of the transform coefficient, and by bypass that is arithmetic code decoding without using the context using the parameter r, Decode the syntax coeff_abs_remaining. The parameter r is obtained by the following expression using the decoded absolute value sum sumAbsLevel and the number of transform coefficients cnt. This equation can also be realized by a table indicating the correspondence between the decoded absolute value sum sumAbsLevel and the number of transform coefficients cnt and r.

r=0(0≦Min(sumAbsLevel-cnt)<4)
1(4≦Min(sumAbsLevel-cnt)<10)
2(10≦Min(sumAbsLevel-cnt)<21)
3(21≦Min(sumAbsLevel-cnt)
(係数レベル記憶部124d)
係数レベル記憶部124dには、クリップ後の変換係数のレベルtransCoeffLevel [xC][yC]の各値が格納される。つまり、Min (abs (transCoeffLevel[xC][yC]) , LevelTH)の値が格納される。係数レベル記憶部124dに格納された transCoeffLevel[xC][yC]の各値は、係数有無フラグコンテキスト導出部124zによって参照される。
r = 0 (0 ≦ Min (sumAbsLevel-cnt) <4)
1 (4 ≦ Min (sumAbsLevel-cnt) <10)
2 (10 ≦ Min (sumAbsLevel-cnt) <21)
3 (21 ≦ Min (sumAbsLevel-cnt)
(Coefficient level storage unit 124d)
The coefficient level storage unit 124d stores each value of the level of transform coefficient transCoeffLevel [xC] [yC] after clipping. That is, the value of Min (abs (transCoeffLevel [xC] [yC]), LevelTH) is stored. Each value of transCoeffLevel [xC] [yC] stored in the coefficient level storage unit 124d is referred to by the coefficient presence / absence flag context deriving unit 124z.

以上の構成では、係数有無フラグコンテキスト導出部124zにおいて、既に復号された変換係数のレベルのクリップされた値に応じて、コンテキストインデックスを導出する。変換係数のレベルを用いることにより、非0の変換係数の数を用いる場合に比べ、高い精度のコンテキスト分類が可能になり、変換係数の符号量が低減する効果を奏する。また、既に復号された変換係数のレベルと所定のマスクとの積を用いるため、係数レベル記憶部124dに必要なメモリサイズを低減する効果を奏する。   In the above configuration, the coefficient presence / absence flag context deriving unit 124z derives a context index according to the clipped value of the level of the already decoded transform coefficient. By using the level of transform coefficients, context classification can be performed with higher accuracy than when the number of non-zero transform coefficients is used, and the code amount of transform coefficients is reduced. In addition, since the product of the level of the transform coefficient that has already been decoded and a predetermined mask is used, the memory size required for the coefficient level storage unit 124d is reduced.

<係数レベル復号部124の第2の構成例>
以下では、図23(b)を参照して、係数レベル復号部124の第2の構成例について説明する。以下に説明する係数レベル復号部124の第2の構成例では、図1に示す非0変換係数カウント部124yを備える点を除き、係数レベル復号部124の第1の構成例と同じ構成を用いる。
<Second Configuration Example of Coefficient Level Decoding Unit 124>
Hereinafter, a second configuration example of the coefficient level decoding unit 124 will be described with reference to FIG. The second configuration example of the coefficient level decoding unit 124 described below uses the same configuration as the first configuration example of the coefficient level decoding unit 124 except that the coefficient level decoding unit 124 includes the non-zero transform coefficient counting unit 124y illustrated in FIG. .

非0変換係数カウント部124yは、係数有無フラグの復号結果に基づいて、対象サブブロック内の非0変換係数の数numSigCoeffをカウントし、係数有無フラグコンテキスト導出部124zに供給する。   Based on the decoding result of the coefficient presence / absence flag, the non-zero transform coefficient counting unit 124y counts the number of non-zero transform coefficients numSigCoeff in the target sub-block, and supplies it to the coefficient presence / absence flag context deriving unit 124z.

図23(b)は、係数レベル復号部124の第2の構成例におけるコンテキスト導出処理を示す図である。   FIG. 23B is a diagram showing context derivation processing in the second configuration example of the coefficient level decoding unit 124.

図23(b)のA7に示す通り、対象サブブロック内の変換係数の数numSigCoeffが所定の閾値TH未満である場合には、既に復号した変換係数のレベルの和を用いてコンテキストインデックスctxIdxを導出する。逆に所定の閾値TH以上である場合には、対象サブブロックで最後に用いたコンテキストインデックスlastCtxIdxを用いる。なお、コンテキストインデックスの導出は、第1の実施形態と同様、クリップ後の変換係数transCoeffLevel [xC][yC]の和を用いると、メモリサイズの低減を行うこともできる。また、以下のように、クリップのない変換係数transCoeffLevel [xC][yC]を用いても良い。   As indicated by A7 in FIG. 23 (b), when the number of transform coefficients numSigCoeff in the target sub-block is less than a predetermined threshold TH, a context index ctxIdx is derived using the sum of the levels of transform coefficients that have already been decoded. To do. On the other hand, when the value is equal to or greater than the predetermined threshold TH, the context index lastCtxIdx used last in the target sub-block is used. Note that the derivation of the context index can also reduce the memory size by using the sum of the transformation coefficients transCoeffLevel [xC] [yC] after clipping, as in the first embodiment. Further, as described below, a transform coefficient transCoeffLevel [xC] [yC] without a clip may be used.

sumAbsLevel = | Coeff[xC+1][yC] |
+ | Coeff[xC+2][yC] |
+ | Coeff[xC][yC+1] |
+ | Coeff[xC+1][yC+1] |
+ | Coeff[xC][yC+2] |
本構成は、既に説明した係数有無フラグsignificant_coeff_flagのコンテキストインデックス導出および、変換係数のレベルを示すシンタックスcoeff_abs_greater1_flagのコンテキストインデックス導出に好適に利用することができる。
sumAbsLevel = | Coeff [xC + 1] [yC] |
+ | Coeff [xC + 2] [yC] |
+ | Coeff [xC] [yC + 1] |
+ | Coeff [xC + 1] [yC + 1] |
+ | Coeff [xC] [yC + 2] |
This configuration can be suitably used for the context index derivation of the coefficient presence / absence flag significant_coeff_flag already described and the context index derivation of the syntax coeff_abs_greater1_flag indicating the level of the transform coefficient.

なお、逆に所定の閾値TH以上である場合には、対象サブブロックで最後に用いたコンテキストインデックスlastCtxIdxを用いる代わりに、対象変換係数を復号する前に対象サブブロックで用いたコンテキストインデックスの最大値を用いても良い。また、対象変換係数を復号する前に用いたsumAbsLeveの最大値を用いてコンテキストインデックスを導出しても良い。また、逆に所定の閾値TH以上である場合には、専用の固定のコンテキストインデックスを用いても良い。所定の閾値TH以上である場合には、非0係数の出現確率が高い、もしくは、レベルの大きい変換係数が出現しやすい性質をもつため専用のコンテキストを用いることで高い精度で出現確率を推定することができる。   On the other hand, when the value is equal to or greater than the predetermined threshold TH, the maximum value of the context index used in the target subblock before decoding the target transform coefficient, instead of using the last context index lastCtxIdx used in the target subblock. May be used. Further, the context index may be derived using the maximum value of sumAbsLeve used before decoding the target transform coefficient. Conversely, when the threshold is equal to or higher than the predetermined threshold TH, a dedicated fixed context index may be used. When the threshold value is equal to or higher than the predetermined threshold TH, the appearance probability is estimated with high accuracy by using a dedicated context because the appearance probability of a non-zero coefficient is high or a conversion coefficient having a large level is likely to appear. be able to.

また、コンテキストインデックスによらず、変換係数のレベルを示すシンタックス(例えばcoeff_abs_remaining)を復号する場合に用いるパラメータrを導出する場合に同様の手法が用いることができる。すなわち、対象サブブロックで最後に用いたパラメータr、対象変換係数を復号する前に対象サブブロックで用いたrの最大値、対象変換係数を復号する前に用いたsumAbsLevelの最大値、所定の閾値TH以上である場合の固定値を用いることができる。   In addition, the same method can be used when deriving the parameter r used when decoding the syntax indicating the level of the transform coefficient (for example, coeff_abs_remaining) regardless of the context index. That is, the parameter r last used in the target sub-block, the maximum value of r used in the target sub-block before decoding the target transform coefficient, the maximum value of sumAbsLevel used before decoding the target transform coefficient, a predetermined threshold A fixed value can be used when it is greater than or equal to TH.

以上の構成では、対象サブブロック内の変換係数の数が多い場合には、所定の数以上の変換係数について、周辺参照(既に復号した変換係数)を用いずに、コンテキストインデックスを導出するため、スループットが向上する効果を奏する。また、所定の数以上の変換係数においても、既に復号した変換係数の値に基づいて、もしくは、固定の値に基づいて好適なコンテキストインデックスを導出することができるため、符号化効率を維持したままスループットの高い変換係数の復号が可能になる。コンテキストインデックスに限らず、変換係数の値を復号するためのパラメータの導出においても同様の効果を奏する。   In the above configuration, when the number of transform coefficients in the target sub-block is large, the context index is derived for the transform coefficients of a predetermined number or more without using the peripheral reference (transformed coefficients that have already been decoded). There is an effect of improving the throughput. In addition, even with a predetermined number of transform coefficients or more, a suitable context index can be derived based on the value of a transform coefficient that has already been decoded or based on a fixed value, so that encoding efficiency is maintained. It is possible to decode transform coefficients with high throughput. The same effect can be obtained not only in the context index but also in the derivation of parameters for decoding the value of the transform coefficient.

<係数レベル復号部124の第3の構成例>
以下では、図23(c)を参照して、係数レベル復号部124の第3の構成例について説明する。以下に説明する係数レベル復号部124の第2の構成例では、図1に示す非0変換係数カウント部124yを備える点を除き、係数レベル復号部124の第1の構成例と同じ構成を用いる。
<Third Configuration Example of Coefficient Level Decoding Unit 124>
Hereinafter, a third configuration example of the coefficient level decoding unit 124 will be described with reference to FIG. The second configuration example of the coefficient level decoding unit 124 described below uses the same configuration as the first configuration example of the coefficient level decoding unit 124 except that the coefficient level decoding unit 124 includes the non-zero transform coefficient counting unit 124y illustrated in FIG. .

非0変換係数カウント部124yは、係数有無フラグの復号結果に基づいて、対象サブブロック内の非0変換係数の数の直前値lastNumSigCoeffをカウントし、係数有無フラグコンテキスト導出部124zに供給する。   Based on the decoding result of the coefficient presence / absence flag, the non-zero transform coefficient counting unit 124y counts the last value lastNumSigCoeff of the number of non-zero transform coefficients in the target sub-block and supplies the counted value to the coefficient presence / absence flag context deriving unit 124z.

図23(c)は、係数レベル復号部124の第2の構成例におけるコンテキスト導出処理を示す図である。   FIG. 23C is a diagram illustrating context derivation processing in the second configuration example of the coefficient level decoding unit 124.

図23(c)のA8に示す通り、対象サブブロック内の変換係数の数の直前値lastNumSigCoeffが所定の閾値TH未満である場合には、既に復号した変換係数のレベルの和を用いてコンテキストインデックスctxIdxを導出する。逆に所定の閾値以下である場合には、対象サブブロックで最後に用いたコンテキストインデックスlastCtxIdxを用いる。なお、コンテキストインデックスの導出は、第1の実施形態と同様、クリップ後の変換係数transCoeffLevel [xC][yC]の和を用いると、メモリサイズの低減を行うこともできる。また、以下のように、クリップのない変換係数transCoeffLevel [xC][yC]を用いても良い。   As indicated by A8 in FIG. 23C, when the last value lastNumSigCoeff of the number of transform coefficients in the target sub-block is less than a predetermined threshold TH, the context index is calculated using the sum of the levels of transform coefficients that have already been decoded. Derive ctxIdx. On the other hand, when the value is equal to or less than the predetermined threshold, the context index lastCtxIdx used last in the target sub-block is used. Note that the derivation of the context index can also reduce the memory size by using the sum of the transformation coefficients transCoeffLevel [xC] [yC] after clipping, as in the first embodiment. Further, as described below, a transform coefficient transCoeffLevel [xC] [yC] without a clip may be used.

以上の構成では、対象サブブロック内の変換係数の数が多い場合には、周辺参照(既に復号した変換係数)を用いずに、コンテキストインデックスを導出するため、スループットが向上する効果を奏する。また、lastNumSigCoeffは直前に復号した係数有無フラグの復号結果に依存しないため、係数有無フラグの復号と、次の係数有無フラグのコンテキストインデックスを並行で実行できるためスループットがさらに向上する。なお、対象サブブロック内の変換係数の数の直前値lastNumSigCoeffの導出方法の詳細は、図27を用いて後述する。   With the above configuration, when there are a large number of transform coefficients in the target sub-block, the context index is derived without using the peripheral reference (already decoded transform coefficients), so that the throughput is improved. Further, since lastNumSigCoeff does not depend on the decoding result of the coefficient presence / absence flag decoded immediately before, decoding of the coefficient presence / absence flag and the context index of the next coefficient presence / absence flag can be executed in parallel, thereby further improving the throughput. Details of a method for deriving the last value lastNumSigCoeff of the number of transform coefficients in the target sub-block will be described later with reference to FIG.

また、以上の構成では、対象サブブロック内の変換係数の数の直前値lastNumSigCoeff、すなわち対象変換係数の前の前の非0変換係数有無フラグを復号した時点での非0変換係数の数を用いる構成であったが、これに限られない。   Further, in the above configuration, the last value lastNumSigCoeff of the number of transform coefficients in the target sub-block, that is, the number of non-zero transform coefficients at the time of decoding the non-zero transform coefficient presence flag before the target transform coefficient is used. Although it was a structure, it is not restricted to this.

lastNumSigCoeffのさらに直前値を用いる構成としてもよい。すなわち、対象変換係数のより所定数前の非0変換係数有無フラグを復号した時点での非0変換係数の数を用いる構成としてもよい。lastlastNumSigCoeffは一つの例である。   It may be configured to use a value immediately before lastNumSigCoeff. In other words, the number of non-zero transform coefficients at the time of decoding the non-zero transform coefficient presence / absence flag that is a predetermined number before the target transform coefficient may be used. lastlastNumSigCoeff is an example.

<変換係数復号部120による処理の流れ>
以下では、変換係数復号部120による変換係数復号処理の流れについて、図25を参照して説明する。
<Processing Flow by Transform Coefficient Decoding Unit 120>
Hereinafter, the flow of transform coefficient decoding processing by the transform coefficient decoding unit 120 will be described with reference to FIG.

図25は、変換係数復号部120による変換係数復号処理の流れを示すフローチャートである。   FIG. 25 is a flowchart showing the flow of transform coefficient decoding processing by the transform coefficient decoding unit 120.

(ステップS21)
まず、変換係数復号部120の備える係数復号制御部123は、スキャンタイプScanTypeを選択する。
(Step S21)
First, the coefficient decoding control unit 123 included in the transform coefficient decoding unit 120 selects a scan type ScanType.

(ステップS22)
続いて、変換係数復号部120の備えるラスト係数位置復号部121は、順スキャンに沿って最後の変換係数の位置を示すシンタックスlast_significant_coeff_x及びlast_significant_coeff_yを復号する。
(Step S22)
Subsequently, the last coefficient position decoding unit 121 included in the transform coefficient decoding unit 120 decodes the syntaxes last_significant_coeff_x and last_significant_coeff_y indicating the position of the last transform coefficient along the forward scan.

(ステップS23)
続いて、係数復号制御部123は、サブブロックを単位とするループを開始する。なお、ラスト係数のあるサブブロックをループの開始位置とし、サブブロックスキャンの逆スキャン順に、サブブロック単位の復号処理が行われる。
(Step S23)
Subsequently, the coefficient decoding control unit 123 starts a loop in units of sub blocks. Note that a sub-block having a last coefficient is set as a loop start position, and decoding processing in units of sub-blocks is performed in reverse scan order of sub-block scan.

(ステップS24)
続いて、変換係数復号部120の備えるサブブロック係数有無フラグ復号部127は、サブブロック係数有無フラグsignificant_coeff_group_flagを復号する。
(Step S24)
Subsequently, the subblock coefficient presence / absence flag decoding unit 127 included in the transform coefficient decoding unit 120 decodes the subblock coefficient presence / absence flag significant_coeff_group_flag.

(ステップS25)
続いて、変換係数復号部120の備える係数レベル復号部124は、対象サブブロック内の各非ゼロ変換係数有無フラグsignificant_coeff_flagと非ゼロ変換係数の大きさを復号する。非ゼロ変換係数の大きさは、coeff_abs_level_greater1_flag、coeff_abs_level_remainingを復号することによって行われる。coeff_abs_level_remainingは、コンテストを用いない算術符号であるバイパスにより復号される。
(Step S25)
Subsequently, the coefficient level decoding unit 124 included in the transform coefficient decoding unit 120 decodes each non-zero transform coefficient presence / absence flag significant_coeff_flag and the magnitude of the non-zero transform coefficient in the target sub-block. The magnitude of the non-zero transform coefficient is determined by decoding coeff_abs_level_greater1_flag and coeff_abs_level_remaining. coeff_abs_level_remaining is decoded by bypass, which is an arithmetic code that does not use a contest.

(ステップS26)
続いて、変換係数復号部120の備える係数符号復号部125は、対象サブブロック内の非0変換係数の符号coeff_sign_flagを復号する。coeff_sign_flagは、コンテストを用いない算術符号であるバイパスにより復号される。
(Step S26)
Subsequently, the coefficient code decoding unit 125 included in the transform coefficient decoding unit 120 decodes the code coeff_sign_flag of the non-zero transform coefficient in the target subblock. coeff_sign_flag is decoded by bypass, which is an arithmetic code that does not use a contest.

(ステップS27)
本ステップは、サブブロックを単位とするループの終端である。(ステップS23のサブブロックを単位とするループの終端)
S23〜S27の流れでは、サブブロック内のループとして、変換係数有無フラグと、変換係数の大きさを示すシンタックスを復号するループと、符号を復号するループの2つのループから構成される。
(Step S27)
This step is the end of the loop in units of sub-blocks. (End of loop in units of sub-blocks in step S23)
In the flow from S23 to S27, the loop in the sub-block is composed of two loops: a transform coefficient presence / absence flag, a loop for decoding the syntax indicating the magnitude of the transform coefficient, and a loop for decoding the code.

以上の構成では、1つのサブブロック内において、個々の変換係数有無フラグと、変換係数の大きさを示すシンタックスを連続して配置した符号化データを復号することにより、変換係数有無フラグおよび変換係数の大きさを示すシンタックスのコンテキストインデックスを、既に復号した変換係数の値を用いて定めることができ、シンタックスの符号量が低減する効果を奏する。同時に、1つのサブブロック内の集合としてまとまられた変換係数の符号を連続してバイパスで復号することにより、一度に復号できる符号量が増加しスループットが向上する効果を奏する。
<<サブブロック係数有無フラグの復号処理>>
図26は、サブブロック係数有無フラグを復号する処理(ステップS24)をより具体的に説明するためのフローチャートである。
In the above configuration, the transform coefficient presence / absence flag and the transform are obtained by decoding the encoded data in which the individual transform coefficient presence / absence flags and the syntax indicating the size of the transform coefficient are sequentially arranged in one sub-block. A context index of syntax indicating the size of the coefficient can be determined using the value of the transform coefficient that has already been decoded, and the code amount of the syntax is reduced. At the same time, by successively decoding the codes of the transform coefficients collected as a set in one sub-block by bypass, the amount of codes that can be decoded at a time increases, and the throughput is improved.
<< Decoding processing of subblock coefficient presence / absence flag >>
FIG. 26 is a flowchart for more specifically explaining the process of decoding the subblock coefficient presence / absence flag (step S24).

サブブロック係数有無フラグ復号部127は、サブブロックのループを開始する前に対象周波数領域に含まれるサブブロック係数有無フラグsignificant_coeff_group_flagの値を初期化する。この初期化処理は、DC係数を含むサブブロックのサブブロック係数有無フラグと、ラスト係数を含むサブブロックのサブブロック係数有無フラグとを1に設定し、その他のサブブロック係数有無フラグを0に設定することによって行われる。   The sub-block coefficient presence / absence flag decoding unit 127 initializes the value of the sub-block coefficient presence / absence flag significant_coeff_group_flag included in the target frequency region before starting the sub-block loop. In this initialization process, the sub block coefficient presence / absence flag of the sub block including the DC coefficient and the sub block coefficient presence / absence flag of the sub block including the last coefficient are set to 1, and the other sub block coefficient presence / absence flags are set to 0. Is done by doing.

(ステップS244)
サブブロック係数有無フラグ復号部127は、サブブロックの位置を取得する。
(Step S244)
The subblock coefficient presence / absence flag decoding unit 127 acquires the position of the subblock.

(ステップS247)
サブブロック係数有無フラグ復号部127は、対象サブブロックがラスト係数を含むサブブロック、もしくはDC係数であるか否かを判別する。
(Step S247)
The sub-block coefficient presence / absence flag decoding unit 127 determines whether the target sub-block is a sub-block including the last coefficient or a DC coefficient.

(ステップS248)
対象サブブロックがラスト係数を含むサブブロック、もしくはDC係数でないとき(ステップS247でNo)、係数有無フラグ復号部124は、サブブロック係数有無フラグsignificant_coeff_group_flagを復号する。
<<係数有無フラグと変換係数の大きさの復号処理>>
図27は、係数レベル復号部124におけるサブブロック内の各非ゼロ変換係数有無フラグsignificant_coeff_flagと非ゼロ変換係数の大きさを復号する処理(図25のステップS25)をより具体的に説明するためのフローチャートである。
(Step S248)
When the target subblock is not a subblock including the last coefficient or a DC coefficient (No in step S247), the coefficient presence / absence flag decoding unit 124 decodes the subblock coefficient presence / absence flag significant_coeff_group_flag.
<< Decoding processing of coefficient presence / absence flag and transform coefficient >>
FIG. 27 is a diagram for more specifically explaining the process (step S25 in FIG. 25) for decoding the non-zero transform coefficient presence / absence flag significant_coeff_flag and the magnitude of the non-zero transform coefficient in the sub-block in the coefficient level decoding unit 124. It is a flowchart.

(ステップS2501)
続いて、係数レベル復号部124は、対象サブブロック内の変換係数の数numSigCoeffを0に初期化する。また、対象サブブロック内の変換係数の数の直前値lastNumSigCoeffを0に初期化する。対象サブブロック内の変換係数の数の直前値の直前値lastlastNumSigCoeffを用いる場合には、lastlastNumSigCoeffを0に初期化する。
(Step S2501)
Subsequently, the coefficient level decoding unit 124 initializes the number numSigCoeff of transform coefficients in the target sub-block to 0. Also, the immediately preceding value lastNumSigCoeff of the number of transform coefficients in the target sub-block is initialized to zero. When the lastlastNumSigCoeff immediately before the number of transform coefficients in the target sub-block is used, lastlastNumSigCoeff is initialized to 0.

(ステップS2502)
係数レベル復号部124は、対象サブブロック内のループを開始する。当該ループは、周波数成分を単位とするループである。
(Step S2502)
The coefficient level decoding unit 124 starts a loop in the target subblock. The loop is a loop having a frequency component as a unit.

(ステップS2503)
係数レベル復号部124は、変換係数の位置がラスト位置であるか否かを判別する。
(Step S2503)
The coefficient level decoding unit 124 determines whether or not the position of the transform coefficient is the last position.

(ステップS2504)
変換係数の位置がラスト位置でないとき(ステップS2504でNo)、係数レベル復号部124は、変換係数有無フラグsignificant_coeff_flagを復号する。
(Step S2504)
When the position of the transform coefficient is not the last position (No in step S2504), the coefficient level decoding unit 124 decodes the transform coefficient presence / absence flag significant_coeff_flag.

(ステップS2505)
対象サブブロック内の変換係数の数の直前値lastNumSigCoeffに、変換係数の数numSigCoeffを代入する。なお、この処理(直前値lastNumSigCoeffの更新)は、対象サブブロック内の変換係数numSigCoeffの数を更新する処理(ステップS2507)の前で処理することが必要である。なお、numSigCoeffの前で処理する限り、他の順序で処理を行っても良い。なお、対象サブブロック内の変換係数の数の直前値の直前値lastlastNumSigCoeffを用いる場合には、直前値lastNumSigCoeffを更新する前に、lastNumSigCoeffの更新を行う。
(Step S2505)
The number of transform coefficients numSigCoeff is substituted for the last value lastNumSigCoeff of the number of transform coefficients in the target sub-block. Note that this process (updating the last value lastNumSigCoeff) needs to be performed before the process of updating the number of transform coefficients numSigCoeff in the target sub-block (step S2507). In addition, as long as it processes before numSigCoeff, you may process in another order. When the immediately preceding value lastlastNumSigCoeff of the immediately preceding value of the number of transform coefficients in the target sub-block is used, lastNumSigCoeff is updated before updating the immediately preceding value lastNumSigCoeff.

(ステップS2506)
係数レベル復号部124は、変換係数が非ゼロ係数であるか否かを判別する。
(Step S2506)
The coefficient level decoding unit 124 determines whether or not the transform coefficient is a non-zero coefficient.

(ステップS2507)
変換係数の位置が非ゼロ係数であるとき(ステップS2506でYes)、変換係数の数numSigCoeffを1だけインクリメントする。
(Step S2507)
When the position of the transform coefficient is a non-zero coefficient (Yes in step S2506), the number of transform coefficients numSigCoeff is incremented by 1.

(ステップS2508)
変換係数の位置が非ゼロ係数であるとき(ステップS2506でYes)、ステップS2506に続いて、係数レベル復号部124は、変換係数の大きさを復号する。
(Step S2508)
When the position of the transform coefficient is a non-zero coefficient (Yes in step S2506), the coefficient level decoding unit 124 decodes the magnitude of the transform coefficient following step S2506.

(ステップS2509)
本ステップは、周波数成分を単位とするループの終端である。(ステップS2502の周波数成分を単位とするループの終端)
<<変換係数の符号の復号処理>>
図28は、サブブロック内の各非ゼロ変換係数の符号を復号する処理(図25のステップS26)をより具体的に説明するためのフローチャートである。
(Step S2509)
This step is the end of the loop in units of frequency components. (End of loop in units of frequency components in step S2502)
<< Decoding processing of transform coefficient code >>
FIG. 28 is a flowchart for more specifically explaining the process (step S26 in FIG. 25) for decoding the code of each non-zero transform coefficient in the sub-block.

(ステップS2601)
係数符号復号部125は、対象サブブロック内のループを開始する。当該ループは、周波数成分を単位とするループである。
(Step S2601)
The coefficient code decoding unit 125 starts a loop in the target subblock. The loop is a loop having a frequency component as a unit.

(ステップS2602)
係数符号復号部125は、変換係数が非ゼロ係数であるか否かを判別する。
(Step S2602)
The coefficient code decoding unit 125 determines whether or not the transform coefficient is a non-zero coefficient.

(ステップS2603)
変換係数が非ゼロ係数であるとき(ステップS2602でYes)、係数符号復号部125は、サインハイディングを行うか否かを判別する。
(Step S2603)
When the transform coefficient is a non-zero coefficient (Yes in step S2602), the coefficient code decoding unit 125 determines whether or not to perform sign hiding.

(ステップS2604)
係数符号復号部125は、サインハイディングを行わないとき(ステップS2603でNo)、係数符号復号部125は、変換係数の符号を復号する。
(Step S2604)
When the coefficient code decoding unit 125 does not perform sign hiding (No in step S2603), the coefficient code decoding unit 125 decodes the code of the transform coefficient.

(ステップS2605)
本ステップは、周波数成分を単位とするループの終端である。(ステップS2601の周波数成分を単位とするループの終端)
<<変換係数の大きさの復号処理>>
図29は、係数レベル復号部124におけるサブブロック内の各非ゼロ変換係数の符号を復号する処理(図27のステップS2507)をより具体的に説明するためのフローチャートである。
(Step S2605)
This step is the end of the loop in units of frequency components. (End of loop in units of frequency components in step S2601)
<< Decoding processing of transform coefficient size >>
FIG. 29 is a flowchart for more specifically explaining the process (step S2507 in FIG. 27) for decoding the code of each non-zero transform coefficient in the sub-block in the coefficient level decoding unit 124.

(ステップS2507A)
係数レベル復号部124は、変換係数の数numSigCoeffが所定の閾値TH未満か否かを判別する。この判別において、直前に復号した変換係数有無フラグの値に依存しないように、変換係数の数numSigCoeffの代わりにlastNumSigCoeffを用いても良い。なお、lastNumSigCoeffを用いる場合には、以下の記載のnumSigCoeffをlastNumSigCoeffに置き換える。
(Step S2507A)
The coefficient level decoding unit 124 determines whether the number of transform coefficients numSigCoeff is less than a predetermined threshold TH. In this determination, lastNumSigCoeff may be used instead of the number of transform coefficients numSigCoeff so as not to depend on the value of the transform coefficient presence / absence flag decoded immediately before. When lastNumSigCoeff is used, numSigCoeff described below is replaced with lastNumSigCoeff.

(ステップS2507B)
変換係数の数numSigCoeffが所定の閾値TH未満であるとき(ステップS2507AでYes)、係数レベル復号部124は、coeff_abs_greater1_flagを復号する。
(Step S2507B)
When the number of transform coefficients numSigCoeff is less than the predetermined threshold TH (Yes in step S2507A), the coefficient level decoding unit 124 decodes coeff_abs_greater1_flag.

(ステップS2507C)
変換係数の数numSigCoeffが所定の閾値TH以上であるとき(ステップS2507AでNo)、係数レベル復号部124は、coeff_abs_greater1_flagを0に設定する。なお、変換係数の数numSigCoeffが所定の閾値TH以上であるときは、ハイスループットモードに対応する。
(Step S2507C)
When the number of transform coefficients numSigCoeff is equal to or greater than a predetermined threshold TH (No in step S2507A), the coefficient level decoding unit 124 sets coeff_abs_greater1_flag to 0. When the number of transform coefficients numSigCoeff is equal to or greater than a predetermined threshold value TH, this corresponds to the high throughput mode.

(ステップS2507D)
係数レベル復号部124は、baseLevelを1とcoeff_abs_greater1_flagとの和により導出する。
(Step S2507D)
The coefficient level decoding unit 124 derives baseLevel by the sum of 1 and coeff_abs_greater1_flag.

(ステップS2507E)
係数レベル復号部124は、baseLevelが所定の値に一致するか否かを判別する。所定の値は、変換係数の数numSigCoeffが所定の閾値TH未満には2、それ以外の場合には1とする。
(Step S2507E)
The coefficient level decoding unit 124 determines whether or not baseLevel matches a predetermined value. The predetermined value is 2 when the number of conversion coefficients numSigCoeff is less than the predetermined threshold TH, and 1 otherwise.

(ステップS2507F)
係数レベル復号部124はbaseLevelが所定の値に一致するとき(ステップS2507EでYes)、coeff_abs_remainingを復号する。
(Step S2507F)
When the baseLevel matches a predetermined value (Yes in step S2507E), the coefficient level decoding unit 124 decodes coeff_abs_remaining.

(ステップS2507G)
係数レベル復号部124はbaseLevelが所定の値に一致しないとき(ステップS2507EでNo)、coeff_abs_remainingを0とする。
(Step S2507G)
The coefficient level decoding unit 124 sets coeff_abs_remaining to 0 when baseLevel does not match a predetermined value (No in step S2507E).

(ステップS2507H)
係数レベル復号部124は変換係数の大きさtransCoeffLevelをcoeff_abs_remainingとbaseLevelとの和により導出する。
(Step S2507H)
The coefficient level decoding unit 124 derives the transform coefficient magnitude transCoeffLevel by the sum of coeff_abs_remaining and baseLevel.

以上に示したように、動画像復号装置1は、対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって得られた符号化データを復号する。また、動画像復号装置1は、処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割する可変長符号復号部11と、分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ設定部127cと、上記各サブブロック内の各変換係数が0である否かを表す非0変換係数有無フラグを復号する係数有無フラグ設定部124eと、上記各サブブロック内の各変換係数の大きさを復号する係数レベル復号処理部124fと、復号済みの変換係数の値を参照することによってコンテキストインデックスを導出する係数有無フラグコンテキスト導出部123zと、を備える構成である。   As described above, the moving image decoding apparatus 1 arithmetically encodes various syntaxes representing transform coefficients for transform coefficients obtained for each frequency component by performing frequency transform on the target image for each unit region. The encoded data obtained by this is decoded. In addition, the video decoding device 1 includes a variable length code decoding unit 11 that divides a target frequency region corresponding to a unit region to be processed into sub-blocks of a predetermined size, and a non-blocking sub-block for each sub-block. A subblock coefficient presence / absence flag setting unit 127c for decoding a subblock coefficient presence / absence flag indicating whether or not at least one 0 transform coefficient is included, and non-representation indicating whether each transform coefficient in each subblock is 0 or not. Refer to the coefficient presence / absence flag setting unit 124e for decoding the 0 transform coefficient presence / absence flag, the coefficient level decoding processing unit 124f for decoding the size of each transform coefficient in each sub-block, and the value of the transformed transform coefficient. And a coefficient presence / absence flag context deriving unit 123z for deriving a context index.

上記構成によれば、符号化効率を維持したまま、従来の構成に比べて変換係数の符号化及び復号に係るメモリ量を削減すること、および、スループットを向上させることができる。
〔動画像符号化装置2〕
本実施形態に係る動画像符号化装置2の構成について図30〜図34を参照して説明する。動画像符号化装置2は、H.264/MPEG−4 AVC規格に採用されている技術、および、その後継コーデックであるHEVC(High-Efficiency Video Coding)にて提案されている技術を実装している符号化装置である。以下では、既に説明した部分と同じ部分については同じ符号を付し、その説明を省略する。
According to the above configuration, it is possible to reduce the amount of memory related to encoding and decoding transform coefficients and improve the throughput while maintaining the encoding efficiency as compared with the conventional configuration.
[Moving picture encoding apparatus 2]
A configuration of the moving picture encoding apparatus 2 according to the present embodiment will be described with reference to FIGS. 30 to 34. The moving image encoding apparatus 2 is an H.264 standard. It is an encoding device that implements the technology adopted in the H.264 / MPEG-4 AVC standard and the technology proposed in HEVC (High-Efficiency Video Coding) as a successor codec. In the following, the same parts as those already described are denoted by the same reference numerals, and the description thereof is omitted.

図30は、動画像符号化装置2の構成を示すブロック図である。図30に示すように、動画像符号化装置2は、予測画像生成部21、変換・量子化部22、逆量子化・逆変換部23、加算器24、フレームメモリ25、ループフィルタ26、可変長符号符号化部27、および、減算器28を備えている。また、図30に示すように、予測画像生成部21は、イントラ予測画像生成部21a、動きベクトル検出部21b、インター予測画像生成部21c、予測方式制御部21d、および、動きベクトル冗長性削除部21eを備えている。動画像符号化装置2は、動画像#10(符号化対象画像)を符号化することによって、符号化データ#1を生成する装置である。   FIG. 30 is a block diagram illustrating a configuration of the moving image encoding device 2. As illustrated in FIG. 30, the moving image encoding apparatus 2 includes a predicted image generation unit 21, a transform / quantization unit 22, an inverse quantization / inverse transform unit 23, an adder 24, a frame memory 25, a loop filter 26, a variable A long code encoding unit 27 and a subtracter 28 are provided. In addition, as illustrated in FIG. 30, the prediction image generation unit 21 includes an intra prediction image generation unit 21 a, a motion vector detection unit 21 b, an inter prediction image generation unit 21 c, a prediction method control unit 21 d, and a motion vector redundancy deletion unit. 21e. The moving image encoding device 2 is a device that generates encoded data # 1 by encoding moving image # 10 (encoding target image).

(予測画像生成部21)
予測画像生成部21は、処理対象LCUを、1または複数の下位CUに再帰的に分割し、各リーフCUをさらに1または複数のパーティションに分割し、パーティション毎に、画面間予測を用いたインター予測画像Pred_Inter、または、画面内予測を用いたイントラ予測画像Pred_Intraを生成する。生成されたインター予測画像Pred_Interおよびイントラ予測画像Pred_Intraは、予測画像Predとして、加算器24および減算器28に供給される。
(Predicted image generation unit 21)
The predicted image generation unit 21 recursively divides the processing target LCU into one or a plurality of lower-order CUs, further divides each leaf CU into one or a plurality of partitions, and uses an inter-screen prediction for each partition. A predicted image Pred_Inter or an intra predicted image Pred_Intra using intra prediction is generated. The generated inter prediction image Pred_Inter and intra prediction image Pred_Intra are supplied to the adder 24 and the subtracter 28 as the prediction image Pred.

なお、予測画像生成部21は、スキップモードの適応されたPUについては、当該PUに属する他のパラメータの符号化を省略する。また、(1)対象LCUにおける下位CUおよびパーティションへの分割の態様、(2)スキップモードを適用するか否か、および、(3)パーティション毎にインター予測画像Pred_Interおよびイントラ予測画像Pred_Intraの何れを生成するか、は、符号化効率を最適化するように決定される。   Note that the predicted image generation unit 21 omits encoding of other parameters belonging to the PU for the PU to which the skip mode is applied. Also, (1) the mode of division into lower CUs and partitions in the target LCU, (2) whether to apply the skip mode, and (3) which of the inter predicted image Pred_Inter and the intra predicted image Pred_Intra for each partition Whether to generate is determined so as to optimize the encoding efficiency.

(イントラ予測画像生成部21a)
イントラ予測画像生成部21aは、画面内予測によって、各パーティションに関する予測画像Pred_Intraを生成する。具体的には、(1)各パーティションついてイントラ予測に用いる予測モードを選択し、(2)選択した予測モードを用いて、復号画像Pから予測画像Pred_Intraを生成する。イントラ予測画像生成部21aは、生成したイントラ予測画像Pred_Intraを、予測方式制御部21dに供給する。
(Intra predicted image generation unit 21a)
The intra predicted image generation unit 21a generates a predicted image Pred_Intra for each partition by intra prediction. Specifically, (1) a prediction mode used for intra prediction is selected for each partition, and (2) a prediction image Pred_Intra is generated from the decoded image P using the selected prediction mode. The intra predicted image generation unit 21a supplies the generated intra predicted image Pred_Intra to the prediction method control unit 21d.

また、イントラ予測画像生成部21aは、対象パーティションの周辺のパーティションに割り付けられた予測モードから対象パーティションに対する推定予測モードを決定し、当該推定予測モードと、対象パーティションについて実際に選択された予測モードとが同じであるか否かを示す推定予測モードフラグを、イントラ予測パラメータPP_Intraの一部として、予測方式制御部21dを介して可変長符号符号化部27に供給し、可変長符号符号化部27は、当該フラグを、符号化データ#1に含める構成とする。   In addition, the intra predicted image generation unit 21a determines an estimated prediction mode for the target partition from the prediction modes assigned to the peripheral partitions of the target partition, and the estimated prediction mode and the prediction mode actually selected for the target partition Are supplied to the variable-length code encoding unit 27 via the prediction scheme control unit 21d as a part of the intra-prediction parameter PP_Intra, and the variable-length code encoding unit 27 Is configured to include the flag in the encoded data # 1.

また、イントラ予測画像生成部21aは、対象パーティションについての推定予測モードと、対象パーティションについて実際に選択された予測モードとが異なる場合には、対象パーティションについての予測モードを示す残余予測モードインデックスを、イントラ予測パラメータPP_Intraの一部として、予測方式制御部21dを介して可変長符号符号化部27に供給し、可変長符号符号化部27は当該残余予測モードインデックスを符号化データ#1に含める構成とする。   In addition, when the estimated prediction mode for the target partition is different from the prediction mode actually selected for the target partition, the intra predicted image generation unit 21a sets a residual prediction mode index indicating the prediction mode for the target partition, As a part of the intra prediction parameter PP_Intra, the prediction method control unit 21d supplies the variable length code encoding unit 27 to the variable length code encoding unit 27. The variable length code encoding unit 27 includes the residual prediction mode index in the encoded data # 1. And

なお、イントラ予測画像生成部21aは、予測画像Pred_Intraを生成する際に、図14に示した予測モードから、より符号化効率が向上する予測モードを選択して適用する。   In addition, when generating the predicted image Pred_Intra, the intra predicted image generation unit 21a selects and applies a prediction mode that further improves the coding efficiency from the prediction mode illustrated in FIG.

(動きベクトル検出部21b)
動きベクトル検出部21bは、各パーティションに関する動きベクトルmvを検出する。具体的には、(1)参照画像として利用する適応フィルタ済復号画像P_ALF’を選択し、(2)選択した適応フィルタ済復号画像P_ALF’において対象パーティションを最良近似する領域を探索することによって、対象パーティションに関する動きベクトルmvを検出する。ここで、適応フィルタ済復号画像P_ALF’は、既にフレーム全体の復号が完了した復号済みの復号画像に対して、ループフィルタ26による適応的フィルタ処理を施すことによって得られる画像であり、動きベクトル検出部21bは、適応フィルタ済復号画像P_ALF’を構成する各画素の画素値をフレームメモリ25から読み出すことができる。動きベクトル検出部21bは、検出した動きベクトルmvを、参照画像として利用した適応フィルタ済復号画像P_ALF’を指定する参照画像インデックスRIと共に、インター予測画像生成部21c及び動きベクトル冗長性削除部21eに供給する。
(Motion vector detection unit 21b)
The motion vector detection unit 21b detects a motion vector mv regarding each partition. Specifically, (1) by selecting an adaptive filtered decoded image P_ALF ′ used as a reference image, and (2) by searching for a region that best approximates the target partition in the selected adaptive filtered decoded image P_ALF ′, A motion vector mv related to the target partition is detected. Here, the adaptive filtered decoded image P_ALF ′ is an image obtained by performing an adaptive filter process by the loop filter 26 on a decoded image that has already been decoded for the entire frame, and is a motion vector detection unit. The unit 21b can read out the pixel value of each pixel constituting the adaptive filtered decoded image P_ALF ′ from the frame memory 25. The motion vector detection unit 21b sends the detected motion vector mv to the inter-predicted image generation unit 21c and the motion vector redundancy deletion unit 21e together with the reference image index RI designating the adaptive filtered decoded image P_ALF ′ used as a reference image. Supply.

(インター予測画像生成部21c)
インター予測画像生成部21cは、画面間予測によって、各インター予測パーティションに関する動き補償画像mcを生成する。具体的には、動きベクトル検出部21bから供給された動きベクトルmvを用いて、動きベクトル検出部21bから供給された参照画像インデックスRIによって指定される適応フィルタ済復号画像P_ALF’から動き補償画像mcを生成する。動きベクトル検出部21bと同様に、インター予測画像生成部21cは、適応フィルタ済復号画像P_ALF’を構成する各画素の画素値をフレームメモリ25から読み出すことができる。インター予測画像生成部21cは、生成した動き補償画像mc(インター予測画像Pred_Inter)を、動きベクトル検出部21bから供給された参照画像インデックスRIと共に、予測方式制御部21dに供給する。
(Inter prediction image generation unit 21c)
The inter prediction image generation unit 21c generates a motion compensated image mc related to each inter prediction partition by inter-screen prediction. Specifically, using the motion vector mv supplied from the motion vector detection unit 21b, the motion compensated image mc from the adaptive filtered decoded image P_ALF ′ designated by the reference image index RI supplied from the motion vector detection unit 21b. Is generated. Similar to the motion vector detection unit 21b, the inter prediction image generation unit 21c can read out the pixel value of each pixel constituting the adaptive filtered decoded image P_ALF ′ from the frame memory 25. The inter prediction image generation unit 21c supplies the generated motion compensated image mc (inter prediction image Pred_Inter) together with the reference image index RI supplied from the motion vector detection unit 21b to the prediction method control unit 21d.

(予測方式制御部21d)
予測方式制御部21dは、イントラ予測画像Pred_Intra及びインター予測画像Pred_Interを符号化対象画像と比較し、イントラ予測を行うかインター予測を行うかを選択する。イントラ予測を選択した場合、予測方式制御部21dは、イントラ予測画像Pred_Intraを予測画像Predとして加算器24及び減算器28に供給すると共に、イントラ予測画像生成部21aから供給されるイントラ予測パラメータPP_Intraを可変長符号符号化部27に供給する。一方、インター予測を選択した場合、予測方式制御部21dは、インター予測画像Pred_Interを予測画像Predとして加算器24及び減算器28に供給すると共に、参照画像インデックスRI、並びに、後述する動きベクトル冗長性削除部21eから供給された推定動きベクトルインデックスPMVI及び動きベクトル残差MVDをインター予測パラメータPP_Interとして可変長符号符号化部27に供給する。また、予測方式制御部21dは、イントラ予測画像Pred_Intra及びインター予測画像Pred_Interのうち何れの予測画像を選択したのかを示す予測タイプ情報Pred_typeを可変長符号符号化部27に供給する。
(Prediction method controller 21d)
The prediction scheme control unit 21d compares the intra predicted image Pred_Intra and the inter predicted image Pred_Inter with the encoding target image, and selects whether to perform intra prediction or inter prediction. When the intra prediction is selected, the prediction scheme control unit 21d supplies the intra prediction image Pred_Intra as the prediction image Pred to the adder 24 and the subtracter 28, and sets the intra prediction parameter PP_Intra supplied from the intra prediction image generation unit 21a. This is supplied to the variable length code encoding unit 27. On the other hand, when the inter prediction is selected, the prediction scheme control unit 21d supplies the inter prediction image Pred_Inter as the prediction image Pred to the adder 24 and the subtracter 28, and the reference image index RI and motion vector redundancy described later. The estimated motion vector index PMVI and the motion vector residual MVD supplied from the deletion unit 21e are supplied to the variable length code encoding unit 27 as an inter prediction parameter PP_Inter. Further, the prediction scheme control unit 21 d supplies prediction type information Pred_type indicating which prediction image is selected from the intra prediction image Pred_Intra and the inter prediction image Pred_Inter to the variable length code encoding unit 27.

(動きベクトル冗長性削除部21e)
動きベクトル冗長性削除部21eは、動きベクトル検出部21bによって検出された動きベクトルmvにおける冗長性を削除する。具体的には、(1)動きベクトルmvの推定に用いる推定方法を選択し、(2)選択した推定方法に従って推定動きベクトルpmvを導出し、(3)動きベクトルmvから推定動きベクトルpmvを減算することにより動きベクトル残差MVDを生成する。動きベクトル冗長性削除部21eは、生成した動きベクトル残差MVDを、選択した推定方法を示す推定動きベクトルインデックスPMVIと共に、予測方式制御部21dに供給する。
(Motion vector redundancy deleting unit 21e)
The motion vector redundancy deletion unit 21e deletes redundancy in the motion vector mv detected by the motion vector detection unit 21b. Specifically, (1) an estimation method used for estimating the motion vector mv is selected, (2) an estimated motion vector pmv is derived according to the selected estimation method, and (3) the estimated motion vector pmv is subtracted from the motion vector mv. As a result, a motion vector residual MVD is generated. The motion vector redundancy deleting unit 21e supplies the generated motion vector residual MVD to the prediction method control unit 21d together with the estimated motion vector index PMVI indicating the selected estimation method.

(変換・量子化部22)
変換・量子化部22は、(1)符号化対象画像から予測画像Predを減算した予測残差Dに対してブロック(変換単位)毎にDCT変換(Discrete Cosine Transform)等の周波数変換を施し、(2)周波数変換により得られた変換係数Coeff_IQを量子化し、(3)量子化により得られた変換係数Coeffを可変長符号符号化部27及び逆量子化・逆変換部23に供給する。なお、変換・量子化部22は、(1)量子化の際に用いる量子化ステップQPをTU毎に選択し、(2)選択した量子化ステップQPの大きさを示す量子化パラメータ差分Δqpを可変長符号符号化部28に供給し、(3)選択した量子化ステップQPを逆量子化・逆変換部23に供給する。ここで、量子化パラメータ差分Δqpとは、周波数変換及び量子化するTUに関する量子化パラメータqp(例えばQP=2pq/6)の値から、直前に周波数変換及び量子化したTUに関する量子化パラメータqp’の値を減算して得られる差分値のことを指す。
(Transformation / quantization unit 22)
The transform / quantization unit 22 (1) performs frequency transform such as DCT transform (Discrete Cosine Transform) for each block (transform unit) on the prediction residual D obtained by subtracting the prediction image Pred from the encoding target image, (2) The transform coefficient Coeff_IQ obtained by frequency transform is quantized, and (3) the transform coefficient Coeff obtained by quantization is supplied to the variable length code encoding unit 27 and the inverse quantization / inverse transform unit 23. The transform / quantization unit 22 (1) selects a quantization step QP to be used for quantization for each TU, and (2) sets a quantization parameter difference Δqp indicating the size of the selected quantization step QP. The variable length code encoding unit 28 is supplied, and (3) the selected quantization step QP is supplied to the inverse quantization / inverse transform unit 23. Here, the quantization parameter difference Δqp is the quantization parameter qp related to the TU that has been frequency converted and quantized immediately before, from the value of the quantization parameter qp (for example, QP = 2 pq / 6 ) related to the frequency conversion and quantization TU. The difference value obtained by subtracting the value of '.

なお、変換・量子化部22によって行われるDCT変換は、例えば、対象ブロックのサイズが8×8画素である場合、水平方向の周波数uおよび垂直方向の周波数vについての量子化前の変換係数をCoeff_IQ(u、v)(0≦u≦7、0≦v≦7)と表すことにすると、例えば、以下の数式(2)によって与えられる。   Note that the DCT transform performed by the transform / quantization unit 22 is, for example, when transforming coefficients before quantization for the horizontal frequency u and the vertical frequency v when the size of the target block is 8 × 8 pixels. Coeff_IQ (u, v) (0 ≦ u ≦ 7, 0 ≦ v ≦ 7) is given by, for example, the following formula (2).

Figure 2013223051
Figure 2013223051

ここで、D(i、j)(0≦i≦7、0≦j≦7)は、対象ブロックにおける位置(i、j)での予測残差Dを表している。また、C(u)およびC(v)は、以下のように与えられる。 Here, D (i, j) (0 ≦ i ≦ 7, 0 ≦ j ≦ 7) represents the prediction residual D at the position (i, j) in the target block. C (u) and C (v) are given as follows.

・C(u)=1/√2 (u=0)
・C(u)=1 (u≠0)
・C(v)=1/√2 (v=0)
・C(v)=1 (v≠0)
(逆量子化・逆変換部23)
逆量子化・逆変換部23は、(1)量子化された変換係数Coeffを逆量子化し、(2)逆量子化によって得られた変換係数Coeff_IQに対して逆DCT(Discrete Cosine Transform)変換等の逆周波数変換を施し、(3)逆周波数変換によって得られた予測残差Dを加算器24に供給する。量子化された変換係数Coeffを逆量子化する際には、変換・量子化部22から供給された量子化ステップQPを利用する。なお、逆量子化・逆変換部23から出力される予測残差Dは、変換・量子化部22に入力される予測残差Dに量子化誤差が加わったものであるが、ここでは簡単のために共通の呼称を用いる。逆量子化・逆変換部23のより具体的な動作は、動画像復号装置1の備える逆量子化・逆変換部13とほぼ同様である。
・ C (u) = 1 / √2 (u = 0)
・ C (u) = 1 (u ≠ 0)
・ C (v) = 1 / √2 (v = 0)
・ C (v) = 1 (v ≠ 0)
(Inverse quantization / inverse transform unit 23)
The inverse quantization / inverse transform unit 23 (1) inversely quantizes the quantized transform coefficient Coeff, and (2) inverse DCT (Discrete Cosine Transform) transform or the like on the transform coefficient Coeff_IQ obtained by the inverse quantization. (3) The prediction residual D obtained by the inverse frequency conversion is supplied to the adder 24. When the quantized transform coefficient Coeff is inversely quantized, the quantization step QP supplied from the transform / quantization unit 22 is used. Note that the prediction residual D output from the inverse quantization / inverse transform unit 23 is obtained by adding a quantization error to the prediction residual D input to the transform / quantization unit 22. Common names are used for this purpose. A more specific operation of the inverse quantization / inverse transform unit 23 is substantially the same as that of the inverse quantization / inverse transform unit 13 included in the video decoding device 1.

(加算器24)
加算器24は、予測方式制御部21dにて選択された予測画像Predを、逆量子化・逆変換部23にて生成された予測残差Dに加算することによって、(局所)復号画像Pを生成する。加算器24にて生成された(局所)復号画像Pは、ループフィルタ26に供給されると共にフレームメモリ25に格納され、イントラ予測における参照画像として利用される。
(Adder 24)
The adder 24 adds the predicted image Pred selected by the prediction scheme control unit 21d to the prediction residual D generated by the inverse quantization / inverse transform unit 23, thereby obtaining the (local) decoded image P. Generate. The (local) decoded image P generated by the adder 24 is supplied to the loop filter 26 and stored in the frame memory 25, and is used as a reference image in intra prediction.

(可変長符号符号化部27)
可変長符号符号化部27は、(1)変換・量子化部22から供給された量子化後の変換係数Coeff並びにΔqp、(2)予測方式制御部21dから供給された量子化パラメータPP(インター予測パラメータPP_Inter、および、イントラ予測パラメータPP_Intra)、(3)予測タイプ情報Pred_type、および、(4)ループフィルタ26から供給されたフィルタパラメータFPを可変長符号化することによって、符号化データ#1を生成する。
(Variable-length code encoding unit 27)
The variable length code encoding unit 27 (1) the quantized transform coefficient Coeff and Δqp supplied from the transform / quantization unit 22, and (2) the quantization parameter PP (interpolation) supplied from the prediction scheme control unit 21d. Prediction parameter PP_Inter and Intra prediction parameter PP_Intra), (3) Prediction type information Pred_type, and (4) Variable parameter coding of filter parameter FP supplied from loop filter 26, thereby encoding encoded data # 1. Generate.

図31は、可変長符号符号化部27の構成を示すブロック図である。図31に示すように、可変長符号符号化部27は、量子化後の変換係数Coeffを符号化する量子化残差情報符号化部271、予測パラメータPPを符号化する予測パラメータ符号化部272、予測タイプ情報Pred_typeを符号化する予測タイプ情報符号化部273、および、フィルタパラメータFPを符号化するフィルタパラメータ符号化部274を備えている。量子化残差情報符号化部271の具体的な構成については後述するためここでは説明を省略する。   FIG. 31 is a block diagram showing a configuration of the variable length code encoding unit 27. As shown in FIG. 31, the variable-length code encoding unit 27 includes a quantization residual information encoding unit 271 that encodes the quantized transform coefficient Coeff, and a prediction parameter encoding unit 272 that encodes the prediction parameter PP. A prediction type information encoding unit 273 that encodes the prediction type information Pred_type, and a filter parameter encoding unit 274 that encodes the filter parameter FP. Since the specific configuration of the quantization residual information encoding unit 271 will be described later, the description thereof is omitted here.

(減算器28)
減算器28は、予測方式制御部21dにて選択された予測画像Predを、符号化対象画像から減算することによって、予測残差Dを生成する。減算器28にて生成された予測残差Dは、変換・量子化部22によって周波数変換及び量子化される。
(Subtractor 28)
The subtracter 28 generates the prediction residual D by subtracting the prediction image Pred selected by the prediction method control unit 21d from the encoding target image. The prediction residual D generated by the subtracter 28 is frequency-transformed and quantized by the transform / quantization unit 22.

(ループフィルタ26)
ループフィルタ26は、(1)復号画像Pにおけるブロック境界、またはパーティション境界の周辺の画像の平滑化(デブロック処理)を行うデブロッキングフィルタ(DF:Deblocking Filter)としての機能と、(2)デブロッキングフィルタが作用した画像に対して、フィルタパラメータFPを用いて適応フィルタ処理を行う適応フィルタ(ALF:Adaptive Loop Filter)としての機能を有している。
(Loop filter 26)
The loop filter 26 includes (1) a function as a deblocking filter (DF: Deblocking Filter) that performs smoothing (deblocking processing) on an image around a block boundary or partition boundary in the decoded image P; It has a function as an adaptive filter (ALF: Adaptive Loop Filter) which performs an adaptive filter process using the filter parameter FP with respect to the image which the blocking filter acted on.

(量子化残差情報符号化部271)
量子化残差情報符号化部271は、量子化された変換係数Coeff(xC、yC)をコンテキスト適応型2値算術符号化(CABAC:(Context-based Adaptive Binary Arithmetic Coding))することによって、量子化残差情報QDを生成する。生成された量子化残差情報QDに含まれるシンタックスは、図6及び図7に示した各シンタックス、及びsignificant_coeff_group_flagである。
(Quantization residual information encoding unit 271)
The quantization residual information encoding unit 271 performs quantum adaptive encoding (CABAC: (Context-based Adaptive Binary Arithmetic Coding)) on the quantized transform coefficient Coeff (xC, yC). Generated residual information QD. The syntaxes included in the generated quantization residual information QD are the syntaxes shown in FIGS. 6 and 7 and significant_coeff_group_flag.

なお、xCおよびyCは、上述のように、周波数領域における各周波数成分の位置を表すインデックスであり、それぞれ、上述した水平方向周波数uおよび垂直方向周波数vに対応するインデックスである。なお、以下では、量子化された変換係数Coeffを、単に、変換係数Coeffと呼ぶこともある。   Note that, as described above, xC and yC are indexes representing the position of each frequency component in the frequency domain, and are indexes corresponding to the above-described horizontal frequency u and vertical frequency v, respectively. Hereinafter, the quantized transform coefficient Coeff may be simply referred to as a transform coefficient Coeff.

(量子化残差情報符号化部271)
図32は、量子化残差情報符号化部271の構成を示すブロック図である。図32に示すように、量子化残差情報符号化部271は、変換係数符号化部220及び算術符号符号化部230を備えている。
(Quantization residual information encoding unit 271)
FIG. 32 is a block diagram illustrating a configuration of the quantization residual information encoding unit 271. As illustrated in FIG. 32, the quantization residual information encoding unit 271 includes a transform coefficient encoding unit 220 and an arithmetic code encoding unit 230.

(算術符号符号化部230)
算術符号符号化部230は、変換係数符号化部220から供給される各Binをコンテキストを参照して符号化することによって量子化残差情報QDを生成するための構成であり、図32に示すように、コンテキスト記録更新部231及びビット符号化部232を備えている。
(Arithmetic Code Encoding Unit 230)
The arithmetic code encoder 230 is configured to generate the quantized residual information QD by encoding each Bin supplied from the transform coefficient encoder 220 with reference to the context, and is shown in FIG. As described above, a context recording update unit 231 and a bit encoding unit 232 are provided.

(コンテキスト記録更新部231)
コンテキスト記録更新部231は、各コンテキストインデックスctxIdxによって管理されるコンテキスト変数CVを記録及び更新するための構成である。ここで、コンテキスト変数CVには、(1)発生確率が高い優勢シンボルMPS(most probable symbol)と、(2)その優勢シンボルMPSの発生確率を指定する確率状態インデックスpStateIdxとが含まれている。
(Context record update unit 231)
The context recording / updating unit 231 is configured to record and update the context variable CV managed by each context index ctxIdx. Here, the context variable CV includes (1) a dominant symbol MPS (most probable symbol) having a high occurrence probability and (2) a probability state index pStateIdx for designating the occurrence probability of the dominant symbol MPS.

コンテキスト記録更新部231は、変換係数符号化部220の備える各部から供給されるコンテキストインデックスctxIdx及びビット符号化部232によって符号化されたBinの値を参照することによってコンテキスト変数CVを更新すると共に、更新されたコンテキスト変数CVを次回更新されるまで記録する。なお、優勢シンボルMPSは0か1である。また、優勢シンボルMPSと確率状態インデックスpStateIdxは、ビット符号化部232がBinを1つ符号化する毎に更新される。   The context recording update unit 231 updates the context variable CV by referring to the context index ctxIdx supplied from each unit of the transform coefficient encoding unit 220 and the Bin value encoded by the bit encoding unit 232, and The updated context variable CV is recorded until the next update. The dominant symbol MPS is 0 or 1. The dominant symbol MPS and the probability state index pStateIdx are updated every time the bit encoding unit 232 encodes one Bin.

また、コンテキストインデックスctxIdxは、各周波数成分についてのコンテキストを直接指定するものであってもよいし、処理対象のTU毎に設定されるコンテキストインデックスのオフセットからの増分値であってもよい(以下同様)。   The context index ctxIdx may directly specify the context for each frequency component, or may be an increment value from the context index offset set for each TU to be processed (the same applies hereinafter). ).

(ビット符号化部232)
ビット符号化部232は、コンテキスト記録更新部231に記録されているコンテキスト変数CVを参照し、変換係数符号化部220の備える各部から供給される各Binを符号化することによって量子化残差情報QDを生成する。また、符号化したBinの値はコンテキスト記録更新部231にも供給され、コンテキスト変数CVを更新するために参照される。
(Bit Encoding Unit 232)
The bit encoding unit 232 refers to the context variable CV recorded in the context recording / updating unit 231, and encodes each Bin supplied from each unit of the transform coefficient encoding unit 220, thereby quantizing residual information. Generate a QD. The encoded Bin value is also supplied to the context recording update unit 231 and is referred to in order to update the context variable CV.

(変換係数符号化部220)
図32に示すように、変換係数符号化部220は、ラスト位置符号化部221、スキャン順テーブル格納部222、係数符号化制御部223、係数レベル符号化部224、係数符号符号化部225、符号化係数記憶部226、サブブロック係数有無フラグ227、及びシンタックス導出部228を備えている。
(Transform coefficient coding unit 220)
As shown in FIG. 32, the transform coefficient coding unit 220 includes a last position coding unit 221, a scan order table storage unit 222, a coefficient coding control unit 223, a coefficient level coding unit 224, a coefficient code coding unit 225, An encoding coefficient storage unit 226, a sub-block coefficient presence / absence flag 227, and a syntax derivation unit 228 are provided.

(シンタックス導出部228)
シンタックス導出部228は、変換係数Coeff(xC、yC)の各値を参照し、対象周波数領域におけるこれらの変換係数を特定するためのシンタックスlast_significant_coeff_x、last_significant_coeff_y、significant_coeff_flag、coeff_abs_level_greater1_flag、coeff_sign_flag、及びcoeff_abs_level_remainingの各値を導出する。導出された各シンタックスは、符号化係数記憶部226に供給される。また、導出されたシンタックスのうちlast_significant_coeff_x、last_significant_coeff_yは、係数符号化制御部223及びラスト位置符号化部221にも供給される。また、導出されたシンタックスのうちsignificant_coeff_flagは、係数レベル符号化部224にも供給される。なお、各シンタックスが示す内容については上述したためここでは説明を省略する。
(Syntax derivation unit 228)
The syntax deriving unit 228 refers to each value of the transform coefficients Coeff (xC, yC), and syntaxes for identifying these transform coefficients in the target frequency domain, last_significant_coeff_x, last_significant_coeff_y, significant_coeff_flag, coeff_abs_level_greater1_flag, level_great_main_flag_, coeff_sign_flag_ Deriving each value. Each derived syntax is supplied to the coding coefficient storage unit 226. Of the derived syntax, last_significant_coeff_x and last_significant_coeff_y are also supplied to the coefficient coding control unit 223 and the last position coding unit 221. Further, significant_coeff_flag in the derived syntax is also supplied to the coefficient level encoding unit 224. In addition, since the content which each syntax shows was mentioned above, description is abbreviate | omitted here.

(ラスト位置符号化部221)
ラスト位置符号化部221は、シンタックス導出部228より供給されるシンタックスlast_significant_coeff_x、last_significant_coeff_yを示すBinを生成する。また、生成した各Binをビット符号化部232に供給する。また、シンタックスlast_significant_coeff_x及びlast_significant_coeff_yのBinを符号化するために参照されるコンテキストを指定するコンテキストインデックスctxIdxを、コンテキスト記録更新部231に供給する。
(Last position encoding unit 221)
The last position encoding unit 221 generates Bin indicating the syntax last_significant_coeff_x and last_significant_coeff_y supplied from the syntax deriving unit 228. Further, each generated Bin is supplied to the bit encoding unit 232. Also, the context record update unit 231 is supplied with a context index ctxIdx that designates a context to be referred to in order to encode Bin of the syntax last_significant_coeff_x and last_significant_coeff_y.

(スキャン順テーブル格納部222)
スキャン順テーブル格納部222には、処理対象のTU(ブロック)のサイズ、スキャン方向の種別を表すスキャンインデックス、及びスキャン順に沿って付与された周波数成分識別インデックスを引数として、処理対象の周波数成分の周波数領域における位置を与えるテーブルが格納されている。このようなスキャン順テーブルの一例としては、図6及び図7に示したScanOrderが挙げられる。
(Scan order table storage unit 222)
The scan order table storage unit 222 uses the size of the TU (block) to be processed, the scan index indicating the type of scan direction, and the frequency component identification index given along the scan order as arguments. A table for giving a position in the frequency domain is stored. An example of such a scan order table is ScanOrder shown in FIGS. 6 and 7.

また、スキャン順テーブル格納部222には、サブブロックのスキャン順を指定するためのサブブロックスキャン順テーブルが格納されている。ここで、サブブロックスキャン順テーブルは、処理対象のTU(ブロック)のサイズとイントラ予測モードの予測モードインデックスとに関連付けられたスキャンインデックスscanIdxによって指定される。   The scan order table storage unit 222 stores a sub-block scan order table for designating the scan order of sub-blocks. Here, the sub-block scan order table is specified by the scan index scanIdx associated with the size of the TU (block) to be processed and the prediction mode index of the intra prediction mode.

スキャン順テーブル格納部222に格納されているスキャン順テーブル及びサブブロックスキャン順テーブルは、動画像復号装置1の備えるスキャン順テーブル格納部122に格納されているものと同様であるので、ここでは説明を省略する。   The scan order table and the sub-block scan order table stored in the scan order table storage unit 222 are the same as those stored in the scan order table storage unit 122 included in the moving image decoding apparatus 1, and will be described here. Is omitted.

(係数符号化制御部223)
係数符号化制御部223は、量子化残差情報符号化部271の備える各部における符号化処理の順序を制御するための構成である。
(Coefficient encoding control unit 223)
The coefficient encoding control unit 223 is a configuration for controlling the order of encoding processing in each unit included in the quantization residual information encoding unit 271.

(TUサイズが所定のサイズ以下である場合)
TUサイズが所定のサイズ以下(例えば4×4TU等)である場合、係数符号化制御部223は、シンタックス導出部228より供給されるシンタックスlast_significant_coeff_x及びlast_significant_coeff_yを参照し、順スキャンに沿った最後の非0変換係数の位置を特定すると共に、特定した最後の非0変換係数の位置を起点とするスキャン順であって、スキャン順テーブル格納部222に格納されたスキャン順テーブルよって与えられるスキャン順の逆スキャン順に、各周波数成分の位置(xC、yC)を、係数レベル符号化部224に供給する。
(When TU size is less than or equal to the specified size)
When the TU size is equal to or smaller than a predetermined size (for example, 4 × 4 TU or the like), the coefficient encoding control unit 223 refers to the syntax last_significant_coeff_x and last_significant_coeff_y supplied from the syntax deriving unit 228, and performs the last along the forward scan. The scan order specified by the scan order table stored in the scan order table storage unit 222 is specified in the scan order starting from the position of the last specified non-zero transform coefficient. The position (xC, yC) of each frequency component is supplied to the coefficient level encoding unit 224 in the reverse scan order.

また、係数符号化制御部223は、処理対象のTUのサイズを、変換係数符号化部220の備える各部に供給する(図示省略)。   Also, the coefficient coding control unit 223 supplies the size of the TU to be processed to each unit included in the transform coefficient coding unit 220 (not shown).

なお、係数符号化制御部223は、スキャン順テーブル格納部222に格納されたスキャン順テーブルよって与えられるスキャン順の順スキャン順に、各周波数成分の位置(xC、yC)を、係数レベル符号化部224に供給する構成としてもよい。   The coefficient encoding control unit 223 displays the position (xC, yC) of each frequency component in the order of the scan order given by the scan order table stored in the scan order table storage unit 222, as a coefficient level encoding unit. It is good also as a structure supplied to 224.

係数符号化制御部223は、シンタックス導出部228から供給されるシンタックスlast_significant_coeff_x及びlast_significant_coeff_yを参照し、順スキャンに沿った最後の非0変換係数の位置を特定すると共に、特定した最後の非0変換係数を含むサブブロックの位置を起点とするスキャン順であって、スキャン順テーブル格納部222に格納されたサブブロックスキャン順テーブルよって与えられるスキャン順の逆スキャン順に、各サブブロックの位置(xCG、yCG)を、サブブロック係数有無フラグ符号化部227に供給する。   The coefficient coding control unit 223 refers to the syntax last_significant_coeff_x and last_significant_coeff_y supplied from the syntax deriving unit 228, identifies the position of the last non-zero transform coefficient along the forward scan, and identifies the identified last non-zero The position of each sub-block (xCG) in the scan order starting from the position of the sub-block including the transform coefficient and in the reverse scan order of the scan order given by the sub-block scan order table stored in the scan order table storage unit 222 , YCG) is supplied to the sub-block coefficient presence / absence flag encoding unit 227.

また、係数符号化制御部223は、処理対象となるサブブロックに関して、スキャン順テーブル格納部222に格納されたスキャン順テーブルよって与えられるスキャン順の逆スキャン順に、当該処理対象となるサブブロックに含まれる各周波数成分の位置(xC、yC)を、係数レベル符号化部224に供給する。ここで、処理対象となるサブブロックに含まれる各周波数成分のスキャン順としては、イントラ予測の場合には、イントラ予測モードインデックスIntraPredModeと、TUサイズを指定する値log2TrafoSizeとによって指定されるスキャンインデックスscanIdxの示すスキャン順(水平方向優先スキャン、垂直方向優先スキャン、斜め方向スキャンのいずれか)を用い、インター予測の場合には、斜め方向スキャン(Up-right diagonal scan)を用いればよい。また、係数符号化制御部223は、当該TUのサイズと当該TUの予測モードとに関連付けられたスキャンインデックスscanIdxを、係数レベル符号化部224へ供給する。   Further, the coefficient encoding control unit 223 includes the subblocks to be processed in the reverse scan order of the scan order given by the scan order table stored in the scan order table storage unit 222 for the subblocks to be processed. The position (xC, yC) of each frequency component is supplied to the coefficient level encoding unit 224. Here, as the scan order of each frequency component included in the sub-block to be processed, in the case of intra prediction, the scan index scanIdx specified by the intra prediction mode index IntraPredMode and the value log2TrafoSize specifying the TU size In the case of inter prediction, an oblique scan (Up-right diagonal scan) may be used. Also, the coefficient coding control unit 223 supplies the scan index scanIdx associated with the size of the TU and the prediction mode of the TU to the coefficient level coding unit 224.

このように、係数符号化制御部223は、イントラ予測モード毎に、スキャン順を切り替える構成である。一般に、イントラ予測モードと変換係数の偏りとは互いに相関を有しているため、イントラ予測モードに応じてスキャン順を切り替えることにより、サブブロック係数有無フラグ、係数有無フラグの偏りに適したスキャンを行うことができる。これによって、符号化及び復号対象となるサブブロック係数有無フラグおよび係数有無フラグの符号量を削減することができ、符号化効率が向上する。   Thus, the coefficient encoding control unit 223 is configured to switch the scan order for each intra prediction mode. In general, the intra prediction mode and the bias of the transform coefficient are correlated with each other. Therefore, by switching the scan order according to the intra prediction mode, a scan suitable for the bias of the subblock coefficient presence / absence flag and the coefficient presence / absence flag is performed. It can be carried out. As a result, the coding amount of the sub-block coefficient presence / absence flag and coefficient presence / absence flag to be encoded and decoded can be reduced, and the coding efficiency is improved.

(係数符号符号化部225)
係数符号符号化部225は、シンタックス導出部228から供給されるシンタックスcoeff_sign_flagを示すBinを生成する。また、生成した各Binをビット符号化部232に供給する。また、これらのシンタックスのBinを符号化するために参照されるコンテキストを指定するコンテキストインデックスctxIdxを、コンテキスト記録更新部231に供給する。
(Coefficient Code Encoding Unit 225)
The coefficient code encoding unit 225 generates Bin indicating the syntax coeff_sign_flag supplied from the syntax deriving unit 228. Further, each generated Bin is supplied to the bit encoding unit 232. In addition, a context index ctxIdx that specifies a context to be referred to in order to encode Bin of these syntaxes is supplied to the context recording update unit 231.

(係数レベル符号化部224)
本実施形態に係る係数レベル符号化部224は、各位置(xC、yC)によって指定されるシンタックスsignificant_coeff_flag[xC][yC]、coeff_abs_level_greater1_flag、及びcoeff_abs_level_remainingを符号化する。より具体的には、係数レベル符号化部224は、各位置(xC、yC)によって指定されるシンタックスsignificant_coeff_flag[xC][yC]を示すBinを生成する。生成された各Binは、ビット符号化部232に供給される。また、係数レベル符号化部224は、算術符号符号化部230にてシンタックスsignificant_coeff_flag[xC][yC]のBinを符号化するために用いられるコンテキストを決定するためのコンテキストインデックスctxIdxを算出する。算出されたコンテキストインデックスctxIdxは、コンテキスト記録更新部231に供給される。
(Coefficient level encoding unit 224)
The coefficient level coding unit 224 according to the present embodiment codes the syntax significant_coeff_flag [xC] [yC], coeff_abs_level_greater1_flag, and coeff_abs_level_remaining specified by each position (xC, yC). More specifically, the coefficient level encoding unit 224 generates Bin indicating the syntax significant_coeff_flag [xC] [yC] specified by each position (xC, yC). Each generated Bin is supplied to the bit encoding unit 232. Also, the coefficient level encoding unit 224 calculates a context index ctxIdx for determining a context used for encoding the Bin of the syntax significant_coeff_flag [xC] [yC] in the arithmetic code encoding unit 230. The calculated context index ctxIdx is supplied to the context recording update unit 231.

(係数レベル符号化部224の第1の構成例)
図33は、本実施形態に係る係数レベル符号化部224の第1の構成例を示すブロック図である。図33に示すように、係数レベル符号化部224は、係数有無フラグコンテキスト導出部224z、及び、係数有無フラグ設定部224e、係数レベル符号化処理部224fを備えている。
(First Configuration Example of Coefficient Level Encoding Unit 224)
FIG. 33 is a block diagram illustrating a first configuration example of the coefficient level encoding unit 224 according to the present embodiment. As shown in FIG. 33, the coefficient level encoding unit 224 includes a coefficient presence / absence flag context deriving unit 224z, a coefficient presence / absence flag setting unit 224e, and a coefficient level encoding processing unit 224f.

(係数有無フラグコンテキスト導出部224z)
係数有無フラグコンテキスト導出部224zは、符号化対象の周波数成分に対するコンテキストインデックスctxIdxを、当該周波数成分の周辺の周波数成分について符号化済みの非0変換係数の数cntに基づいて導出する。より具体的には、係数有無フラグコンテキスト導出部224zは、対象周波数成分の位置(xC,yC)、もしくは、対象周波数成分が属するサブブロックの位置(xCG,yCG)が所定の条件を満たす場合、スキャンインデックスscanIdxと変換係数の位置に応じて異なる参照位置(テンプレート)を用いて符号化済みの非0変換係数の数cntを導出する。
(Coefficient presence / absence flag context deriving unit 224z)
The coefficient presence / absence flag context deriving unit 224z derives the context index ctxIdx for the frequency component to be encoded based on the number cnt of non-zero transform coefficients that have been encoded for the frequency components around the frequency component. More specifically, the coefficient presence / absence flag context deriving unit 224z, when the position of the target frequency component (xC, yC) or the position of the sub block to which the target frequency component belongs (xCG, yCG) satisfies a predetermined condition, The number cnt of encoded non-zero transform coefficients is derived using a reference position (template) that differs depending on the scan index scanIdx and the position of the transform coefficient.

係数有無フラグコンテキスト導出部224zによる具体的な処理は、動画像復号装置1の備える係数有無フラグコンテキスト導出部124zと同様であるので、ここでは説明を省略する。   Specific processing by the coefficient presence / absence flag context deriving unit 224z is the same as that of the coefficient presence / absence flag context deriving unit 124z included in the video decoding device 1, and thus the description thereof is omitted here.

(係数有無フラグ設定部224e)
係数有無フラグ設定部224eは、シンタックス導出部228から供給されるシンタックスsignificant_coeff_flag[xC][yC]を示すBinを生成する。生成したBinは、ビット符号化部232に供給される。また、係数有無フラグ設定部224eは、対象サブブロックに含まれるsignificant_coeff_flag[xC][yC]の値を参照し、対象サブブロックに含まれる全てのsignificant_coeff_flag[xC][yC]が0である場合、すなわち、当該対象サブブロックに非0変換係数が含まれていない場合に、当該対象サブブロックに関するsignificant_coeff_group_flag[xCG][yCG]の値を0に設定し、そうでない場合に当該対象サブブロックに関するsignificant_coeff_group_flag[xCG][yCG]の値を1に設定する。このように値が付されたsignificant_coeff_group_flag[xCG][yCG]は、サブブロック係数有無フラグ符号化部227に供給される。
(Coefficient presence / absence flag setting unit 224e)
The coefficient presence / absence flag setting unit 224e generates Bin indicating the syntax significant_coeff_flag [xC] [yC] supplied from the syntax deriving unit 228. The generated Bin is supplied to the bit encoding unit 232. In addition, the coefficient presence / absence flag setting unit 224e refers to the value of significant_coeff_flag [xC] [yC] included in the target subblock, and when all the significant_coeff_flag [xC] [yC] included in the target subblock is 0, That is, when a non-zero transform coefficient is not included in the target subblock, the value of significant_coeff_group_flag [xCG] [yCG] related to the target subblock is set to 0, otherwise significant_coeff_group_flag [ Set the value of xCG] [yCG] to 1. The significant_coeff_group_flag [xCG] [yCG] to which the value is added in this way is supplied to the sub-block coefficient presence / absence flag encoding unit 227.

(係数レベル符号化処理部224f)
係数レベル符号化処理部224fは、シンタックス導出部228から供給されるシンタックスcoeff_abs_greater1_flag[xC][yC]、coeff_abs_remaining[xC][yC]を示すBinと符号化に用いるコンテキストインデックスを生成する。係数レベル符号化処理部224fは、生成したBinをビット符号化部232に供給する。また、係数レベル符号化処理部224fは、生成したコンテキストインデックスをコンテキスト記録更新部231に供給する。
(Coefficient level encoding processing unit 224f)
The coefficient level encoding processing unit 224f generates a Bin indicating the syntax coeff_abs_greater1_flag [xC] [yC] and coeff_abs_remaining [xC] [yC] supplied from the syntax deriving unit 228 and a context index used for encoding. The coefficient level encoding processing unit 224 f supplies the generated Bin to the bit encoding unit 232. Further, the coefficient level encoding processing unit 224f supplies the generated context index to the context recording update unit 231.

(サブブロック係数有無フラグ符号化部227)
サブブロック係数有無フラグ符号化部227は、各サブブロック位置(xCG、yCG)によって指定されるシンタックスsignificant_coeff_group_flag[xCG][yCG]を符号化する。より具体的には、各サブブロック位置(xCG、yCG)によって指定されるシンタックスsignificant_coeff_group_flag[xCG][yCG]を示すBinを生成する。生成された各Binは、ビット符号化部232に供給される。また、サブブロック係数有無フラグ符号化部227は、算術符号符号化部230にてシンタックスsignificant_coeff_flag[xC][yC]のBinを符号化するために用いられるコンテキストを決定するためのコンテキストインデックスctxIdxを算出する。算出されたコンテキストインデックスctxIdxは、コンテキスト記録更新部231に供給される。
(Subblock coefficient presence / absence flag encoding unit 227)
The subblock coefficient presence / absence flag encoding unit 227 encodes syntax significant_coeff_group_flag [xCG] [yCG] specified by each subblock position (xCG, yCG). More specifically, Bin indicating the syntax significant_coeff_group_flag [xCG] [yCG] specified by each sub-block position (xCG, yCG) is generated. Each generated Bin is supplied to the bit encoding unit 232. In addition, the sub-block coefficient presence / absence flag encoding unit 227 determines a context index ctxIdx for determining a context used for encoding Bin of the syntax significant_coeff_flag [xC] [yC] in the arithmetic code encoding unit 230. calculate. The calculated context index ctxIdx is supplied to the context recording update unit 231.

図34は、サブブロック係数有無フラグ符号化部227の構成を示すブロック図である。図34に示すように、サブブロック係数有無フラグ符号化部227は、コンテキスト導出部227a、サブブロック係数有無フラグ記憶部227b、及びサブブロック係数有無フラグ設定部227cを備えている。   FIG. 34 is a block diagram showing a configuration of the sub-block coefficient presence / absence flag encoding unit 227. As shown in FIG. 34, the sub-block coefficient presence / absence flag encoding unit 227 includes a context deriving unit 227a, a sub-block coefficient presence / absence flag storage unit 227b, and a sub-block coefficient presence / absence flag setting unit 227c.

以下では、サブブロック係数有無フラグ符号化部227に対して、係数符号化制御部223から、サブブロック位置(xCG、yCG)が順スキャン順に供給される場合を例に挙げて説明を行う。なお、この場合、動画像復号装置1の備えるサブブロック係数有無フラグ復号部127では、サブブロック位置(xCG、yCG)が逆スキャン順に供給されることが好ましい。   Hereinafter, the case where the sub block position (xCG, yCG) is supplied to the sub block coefficient presence / absence flag encoding unit 227 from the coefficient encoding control unit 223 in the order of the forward scan will be described as an example. In this case, it is preferable that the sub-block coefficient presence / absence flag decoding unit 127 included in the video decoding device 1 supplies the sub-block positions (xCG, yCG) in reverse scan order.

(コンテキスト導出部227a)
サブブロック係数有無フラグ符号化部227の備えるコンテキスト導出部227aは、各サブブロック位置(xCG、yCG)によって指定されるサブブロックに割り付けるコンテキストインデックスを導出する。サブブロックに割り付けられたコンテキストインデックスは、当該サブブロックについてのシンタックスsignificant_coeff_group_flagを示すBinを復号する際に用いられる。また、コンテキストインデックスを導出する際には、サブブロック係数有無フラグ記憶部227bに記憶されたサブブロック係数有無フラグの値が参照される。コンテキスト導出部227aは、導出したコンテキストインデックスをコンテキスト記録更新部231に供給する。
(Context deriving unit 227a)
The context deriving unit 227a included in the subblock coefficient presence / absence flag encoding unit 227 derives a context index to be allocated to the subblock specified by each subblock position (xCG, yCG). The context index assigned to the sub-block is used when decoding Bin indicating the syntax significant_coeff_group_flag for the sub-block. Further, when the context index is derived, the value of the subblock coefficient presence / absence flag stored in the subblock coefficient presence / absence flag storage unit 227b is referred to. The context deriving unit 227a supplies the derived context index to the context record updating unit 231.

(サブブロック係数有無フラグ記憶部227b)
サブブロック係数有無フラグ記憶部227bには、係数レベル符号化部224から供給されたシンタックスsignificant_coeffgroup_flagの各値が記憶されている。サブブロック係数有無フラグ設定部227cは、隣接サブブロックに割り付けられたシンタックスsignificant_coeffgroup_flagを、サブブロック係数有無フラグ記憶部227bから読み出すことができる。
(Subblock coefficient presence / absence flag storage unit 227b)
Each value of the syntax significant_coeffgroup_flag supplied from the coefficient level encoding unit 224 is stored in the sub-block coefficient presence / absence flag storage unit 227b. The subblock coefficient presence / absence flag setting unit 227c can read the syntax significant_coeffgroup_flag assigned to the adjacent subblock from the subblock coefficient presence / absence flag storage unit 227b.

(サブブロック係数有無フラグ設定部227c)
サブブロック係数有無フラグ設定部227cは、サブブロック係数有無フラグ設定部227cは、係数レベル符号化部224から供給されるシンタックスsignificant_coeff_group_flag[xCG][yCG]を示すBinを生成する。生成したBinは、ビット符号化部232に供給される。
〔付記事項1〕
図35および図36を用いて、動画像符号化装置2及び動画像復号装置1の応用例について説明する。上述した動画像符号化装置2及び動画像復号装置1は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
(Subblock coefficient presence / absence flag setting unit 227c)
The sub-block coefficient presence / absence flag setting unit 227c generates the Bin indicating the syntax significant_coeff_group_flag [xCG] [yCG] supplied from the coefficient level encoding unit 224. The generated Bin is supplied to the bit encoding unit 232.
[Appendix 1]
Application examples of the moving image encoding device 2 and the moving image decoding device 1 will be described with reference to FIGS. 35 and 36. The above-described moving image encoding device 2 and moving image decoding device 1 can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images. The moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like.

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

図35の(a)は、動画像符号化装置2を搭載した送信装置PROD_Aの構成を示したブロック図である。図35の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_A1として利用される。   FIG. 35A is a block diagram illustrating a configuration of a transmission apparatus PROD_A in which the moving image encoding apparatus 2 is mounted. As illustrated in (a) of FIG. 35, the transmission device PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_A1. Thus, 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 are provided. The moving image encoding apparatus 2 described above is used as the encoding unit PROD_A1.

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

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

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

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

なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。   Note that the transmission medium for transmitting the modulation 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 transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.

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

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

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

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

図36の(a)は、上述した動画像符号化装置2を搭載した記録装置PROD_Cの構成を示したブロック図である。図36の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_C1として利用される。   FIG. 36A is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described moving picture encoding apparatus 2 is mounted. As shown in (a) of FIG. 36, the recording apparatus PROD_C has an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M. A writing unit PROD_C2 for writing. The moving image encoding apparatus 2 described above is used as the encoding 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 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 Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.

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

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

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

図36の(b)は、上述した動画像復号装置1を搭載した再生装置PROD_Dの構成を示したブロックである。図36の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置1は、この復号部PROD_D2として利用される。   FIG. 36 (b) is a block diagram illustrating a configuration of a playback device PROD_D in which the above-described video decoding device 1 is mounted. As shown in (b) of FIG. 36, the playback device PROD_D reads the moving image by decoding the reading unit PROD_D1 that reads the encoded data written on the recording medium PROD_M and the encoded data read by the reading unit PROD_D1. And a decoding unit PROD_D2 to be obtained. The moving picture decoding apparatus 1 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に内蔵されたドライブ装置(不図示)に装填されるものであってもよい。   Note that the recording medium PROD_M may be of the 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 (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.

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

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

このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3又は送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4又は送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型又はタブレット型PC(この場合、ディスプレイPROD_D3又は送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3又は送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。
〔付記事項2〕
上述した動画像復号装置1、および動画像符号化装置2の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main supply destination of moving images). . In addition, a television receiver (in this case, the display PROD_D3 is a main supply destination of moving images), a digital signage (also referred to as an electronic signboard or an electronic bulletin board), and the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images. Desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main video image supply destination), laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a moving image) A smartphone (which is a main image supply destination), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination), and the like are also examples of such a playback device PROD_D.
[Appendix 2]
Each block of the moving picture decoding apparatus 1 and the moving picture encoding apparatus 2 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). ) May be implemented in software.

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

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−R等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。   Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and disks including optical disks such as CD-ROM / MO / MD / DVD / CD-R. IC cards (including memory cards) / optical cards, semiconductor memories such as mask ROM / EPROM / EEPROM / flash ROM, PLD (Programmable logic device), FPGA (Field Programmable Gate Array), etc. Logic circuits can be used.

また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。   Further, each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited as long as it can transmit the program code. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, and the like can be used. The transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, even with wired lines such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, and ADSL (Asymmetric Digital Subscriber Line) line, infrared rays such as IrDA and remote control, Bluetooth (registered trademark), IEEE 802.11 wireless, HDR ( It can also be used by radio such as High Data Rate (NFC), Near Field Communication (NFC), Digital Living Network Alliance (DLNA), mobile phone network, satellite line, and digital terrestrial network.

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

本発明は、算術符号化された符号化データを復号する算術復号装置、および、算術符号化された符号化データを生成する算術符号化装置に好適に用いることができる。   The present invention can be suitably used for an arithmetic decoding device that decodes arithmetically encoded data and an arithmetic encoding device that generates arithmetically encoded data.

1 動画像復号装置(画像復号装置)
11 可変長符号復号部(サブブロック分割手段)
111 量子化残差情報復号部(算術復号装置)
120 変換係数復号部
123 係数復号制御部
124 係数レベル復号部
124d 係数レベル記憶部
124e 係数有無フラグ設定部(非0変換係数有無フラグ復号手段)
124f 係数レベル復号処理部(係数値復号手段)
124y 非0変換係数カウント部(カウント手段)
124z 係数有無フラグコンテキスト導出部(コンテキストインデックス導出手段)
125 係数符号復号部
127 サブブロック係数有無フラグ復号部
127a サブブロック係数有無フラグコンテキスト導出部
127b サブブロック係数有無フラグ記憶部
127c サブブロック係数有無フラグ設定部(サブブロック係数有無フラグ復号手段)
130 算術符号復号部
131 コンテキスト記録更新部
132 ビット復号部
2 動画像符号化装置(画像符号化装置)
27 可変長符号符号化部(サブブロック分割手段)
271 量子化残差情報符号化部(算術符号化装置)
220 変換係数符号化部
223 係数符号化制御部
224 係数レベル符号化部
224z 係数有無フラグコンテキスト導出部(コンテキストインデックス導出手段)
224e 係数有無フラグ設定部(非0変換係数有無フラグ符号化手段)
224f 係数レベル符号化処理部(係数値符号化手段)
225 係数符号符号化部
227 サブブロック係数有無フラグ符号化部(サブブロック係数有無フラグ符号化手段)
227a コンテキスト導出部
227b サブブロック係数有無フラグ記憶部
227c サブブロック係数有無フラグ設定部
228 シンタックス導出部
230 算術符号符号化部
231 コンテキスト記録更新部
232 ビット符号化部
1 video decoding device (image decoding device)
11 Variable length code decoding unit (sub-block dividing means)
111 Quantization residual information decoding unit (arithmetic decoding device)
120 transform coefficient decoding unit 123 coefficient decoding control unit 124 coefficient level decoding unit 124d coefficient level storage unit 124e coefficient presence / absence flag setting unit (non-zero transform coefficient presence / absence flag decoding means)
124f Coefficient level decoding processing unit (coefficient value decoding means)
124y non-zero conversion coefficient count unit (counting means)
124z Coefficient presence / absence flag context deriving unit (context index deriving means)
125 coefficient code decoding unit 127 subblock coefficient presence / absence flag decoding unit 127a subblock coefficient presence / absence flag context deriving unit 127b subblock coefficient presence / absence flag storage unit 127c subblock coefficient presence / absence flag setting unit (subblock coefficient presence / absence flag decoding unit)
130 Arithmetic Code Decoding Unit 131 Context Recording Update Unit 132 Bit Decoding Unit 2 Video Coding Device (Image Coding Device)
27 Variable length code encoding unit (sub-block dividing means)
271 Quantization residual information encoding unit (arithmetic encoding device)
220 transform coefficient encoding unit 223 coefficient encoding control unit 224 coefficient level encoding unit 224z coefficient presence / absence flag context deriving unit (context index deriving unit)
224e Coefficient presence / absence flag setting unit (non-zero conversion coefficient presence / absence flag encoding means)
224f Coefficient level encoding processing unit (coefficient value encoding means)
225 Coefficient code encoding unit 227 Subblock coefficient presence / absence flag encoding unit (subblock coefficient presence / absence flag encoding means)
227a Context deriving unit 227b Subblock coefficient presence / absence flag storage unit 227c Subblock coefficient presence / absence flag setting unit 228 Syntax deriving unit 230 Arithmetic code coding unit 231 Context recording update unit 232 Bit coding unit

Claims (8)

対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって得られた符号化データを復号する算術復号装置であって、
処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割するサブブロック分割手段と、
上記サブブロック分割手段により分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ復号手段と、
上記各サブブロック内の各変換係数が0であるか否かを表す非0変換係数有無フラグを復号する非0変換係数有無フラグ復号手段と、
上記各サブブロック内の各変換係数の大きさを復号する係数値復号手段と、
復号済みの変換係数の値を参照することによってコンテキストインデックスを導出するコンテキストインデックス導出手段と、を備えることを特徴とする算術復号装置。
Arithmetic decoding apparatus that decodes encoded data obtained by arithmetically encoding various syntaxes representing transform coefficients for transform coefficients obtained for each frequency component by performing frequency transform on the target image for each unit region Because
Sub-block dividing means for dividing a target frequency region corresponding to a unit region to be processed into sub-blocks of a predetermined size;
Subblock coefficient presence / absence flag decoding means for decoding a subblock coefficient presence / absence flag indicating whether or not at least one non-zero transform coefficient is included in the subblock for each subblock divided by the subblock division means;
Non-zero transform coefficient presence / absence flag decoding means for decoding a non-zero transform coefficient presence / absence flag indicating whether or not each transform coefficient in each sub-block is 0;
Coefficient value decoding means for decoding the magnitude of each transform coefficient in each sub-block;
An arithmetic decoding apparatus comprising: context index deriving means for deriving a context index by referring to a value of a decoded transform coefficient.
上記コンテキストインデックス導出手段は、復号済みの変換係数の絶対値を所定の値でクリップした値の和を用いることによってコンテキストインデックスを導出することを特徴とする請求項1に記載の算術復号装置。   2. The arithmetic decoding apparatus according to claim 1, wherein the context index deriving unit derives a context index by using a sum of values obtained by clipping absolute values of decoded transform coefficients by a predetermined value. サブブロック内で復号された非0変換係数の数をカウントするカウント手段を備え、
上記コンテキストインデックス導出手段は、上記非0変換係数の数が所定の数以下の場合に、復号済みの変換係数の絶対値を用いてコンテキストインデックスを導出することを特徴とする請求項1に記載の算術復号装置。
Counting means for counting the number of non-zero transform coefficients decoded in the sub-block,
The context index deriving means derives a context index using an absolute value of a decoded transform coefficient when the number of the non-zero transform coefficients is equal to or less than a predetermined number. Arithmetic decoding device.
サブブロック内で復号された非0変換係数の数をカウントするカウント手段を備え、
上記コンテキストインデックス導出手段は、対象変換係数よりも所定数前の非0変換係数有無フラグを復号した時点での上記非0変換係数の数が所定の数以下の場合に、復号済みの変換係数の絶対値を用いてコンテキストインデックスを導出することを特徴とする請求項1に記載の算術復号装置。
Counting means for counting the number of non-zero transform coefficients decoded in the sub-block,
The context index deriving means, when the number of the non-zero transform coefficients at the time of decoding the non-zero transform coefficient presence flag that is a predetermined number before the target transform coefficient is equal to or less than the predetermined number, The arithmetic decoding apparatus according to claim 1, wherein a context index is derived using an absolute value.
サブブロック内のループにおいて非0変換係数有無フラグを復号し、該ループとは別のサブブロック内のループにおいて変換係数の符号を復号することを特徴とする請求項1に記載の算術復号装置。   2. The arithmetic decoding apparatus according to claim 1, wherein a non-zero transform coefficient presence / absence flag is decoded in a loop in the sub-block, and a sign of the transform coefficient is decoded in a loop in a sub-block different from the loop. 請求項1から5の何れか1項に記載の算術復号装置と、
上記算術復号装置によって復号された変換係数を逆周波数変換することによって残差画像を生成する逆周波数変換手段と、
上記逆周波数変換手段によって生成された残差画像と、生成済みの復号画像から予測された予測画像とを加算することによって復号画像を生成する復号画像生成手段と、
を備えていることを特徴とする画像復号装置。
The arithmetic decoding device according to any one of claims 1 to 5,
Inverse frequency transforming means for generating a residual image by inverse frequency transforming transform coefficients decoded by the arithmetic decoding device;
Decoded image generating means for generating a decoded image by adding the residual image generated by the inverse frequency transform means and the predicted image predicted from the generated decoded image;
An image decoding apparatus comprising:
対象画像を単位領域毎に周波数変換することによって周波数成分毎に得られる各変換係数について、該変換係数を表す各種シンタックスを算術符号化することによって符号化データを生成する算術符号化装置であって、
処理対象の単位領域に対応する対象周波数領域を所定サイズのサブブロックに分割するサブブロック分割手段と、
上記サブブロック分割手段により分割された各サブブロックについて、当該サブブロックに非0変換係数が少なくとも1つ含まれるか否かを表すサブブロック係数有無フラグを復号するサブブロック係数有無フラグ復号手段と、
上記各サブブロック内の各変換係数が0であるか否かを表す非0変換係数有無フラグを符号化する非0変換係数有無フラグ符号化手段と、
上記各サブブロック内の各変換係数の大きさを符号化する係数値符号化手段と、
符号化済みの変換係数の値を参照することによってコンテキストインデックスを導出するコンテキストインデックス導出手段と、を備えることを特徴とする算術符号化装置。
An arithmetic encoding device that generates encoded data by arithmetically encoding various syntaxes representing transform coefficients for each transform coefficient obtained by performing frequency transform on a target image for each unit region. And
Sub-block dividing means for dividing a target frequency region corresponding to a unit region to be processed into sub-blocks of a predetermined size;
Subblock coefficient presence / absence flag decoding means for decoding a subblock coefficient presence / absence flag indicating whether or not at least one non-zero transform coefficient is included in the subblock for each subblock divided by the subblock division means;
Non-zero transform coefficient presence / absence flag encoding means for encoding a non-zero transform coefficient presence / absence flag indicating whether or not each transform coefficient in each sub-block is 0;
Coefficient value encoding means for encoding the magnitude of each transform coefficient in each of the sub-blocks;
An arithmetic coding apparatus comprising: context index deriving means for deriving a context index by referring to a value of an encoded transform coefficient.
符号化対象画像と予測画像との残差画像を単位領域毎に周波数変換することによって変換係数を生成する変換係数生成手段と、
請求項7に記載の算術符号化装置と、
を備えており、
上記算術符号化装置は、上記変換係数生成手段によって生成された変換係数を表す各種のシンタックスを算術符号化することによって符号化データを生成するものである、
ことを特徴とする画像符号化装置。
Transform coefficient generating means for generating a transform coefficient by frequency transforming the residual image between the encoding target image and the predicted image for each unit region;
The arithmetic encoding device according to claim 7,
With
The arithmetic encoding device generates encoded data by arithmetically encoding various syntaxes representing transform coefficients generated by the transform coefficient generating means.
An image encoding apparatus characterized by that.
JP2012092483A 2012-04-13 2012-04-13 Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device Pending JP2013223051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012092483A JP2013223051A (en) 2012-04-13 2012-04-13 Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012092483A JP2013223051A (en) 2012-04-13 2012-04-13 Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device

Publications (1)

Publication Number Publication Date
JP2013223051A true JP2013223051A (en) 2013-10-28

Family

ID=49593751

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012092483A Pending JP2013223051A (en) 2012-04-13 2012-04-13 Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device

Country Status (1)

Country Link
JP (1) JP2013223051A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302364A (en) * 2012-01-20 2017-10-27 Ge视频压缩有限责任公司 There is the device of multiple conversion coefficients of conversion coefficient rank from data stream
CN113906747A (en) * 2019-06-24 2022-01-07 Kddi 株式会社 Image decoding device, image decoding method, and program
US11968395B2 (en) 2023-03-23 2024-04-23 Ge Video Compression, Llc Transform coefficient coding

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302364A (en) * 2012-01-20 2017-10-27 Ge视频压缩有限责任公司 There is the device of multiple conversion coefficients of conversion coefficient rank from data stream
US10757447B2 (en) 2012-01-20 2020-08-25 Ge Video Compression, Llc Transform coefficient coding
CN107302364B (en) * 2012-01-20 2021-01-19 Ge视频压缩有限责任公司 Apparatus for decoding a plurality of transform coefficients having a transform coefficient level from a data stream
US11616982B2 (en) 2012-01-20 2023-03-28 Ge Video Compression, Llc Transform coefficient coding
CN113906747A (en) * 2019-06-24 2022-01-07 Kddi 株式会社 Image decoding device, image decoding method, and program
US11968395B2 (en) 2023-03-23 2024-04-23 Ge Video Compression, Llc Transform coefficient coding

Similar Documents

Publication Publication Date Title
US11509898B2 (en) Arithmetic decoding device, image decoding apparatus, arithmetic coding device, and image coding apparatus
US11627337B2 (en) Image decoding device
JP6560702B2 (en) Arithmetic decoding apparatus, arithmetic encoding apparatus, arithmetic decoding method, and arithmetic encoding method
JP7001768B2 (en) Arithmetic decoding device
US10547861B2 (en) Image decoding device
JP6441406B2 (en) Moving picture decoding device
WO2016203881A1 (en) Arithmetic decoding device and arithmetic coding device
WO2016203981A1 (en) Image decoding device and image encoding device
JP2013192118A (en) Arithmetic decoder, image decoder, arithmetic encoder, and image encoder
JP2013187869A (en) Arithmetic decoding device, arithmetic coding device, image decoding device, and image coding device
JP2013223051A (en) Arithmetic decoding device, image decoding device, arithmetic coding device, and image coding device
WO2012090962A1 (en) Image decoding device, image encoding device, data structure of encoded data, arithmetic decoding device, and arithmetic encoding device
WO2019139012A1 (en) Image filter device, image decoder, image encoder, and data structure
JP2013251827A (en) Image filter device, image decoding device, image encoding device, and data structure