JP5995448B2 - Image decoding apparatus and image encoding apparatus - Google Patents

Image decoding apparatus and image encoding apparatus Download PDF

Info

Publication number
JP5995448B2
JP5995448B2 JP2012009446A JP2012009446A JP5995448B2 JP 5995448 B2 JP5995448 B2 JP 5995448B2 JP 2012009446 A JP2012009446 A JP 2012009446A JP 2012009446 A JP2012009446 A JP 2012009446A JP 5995448 B2 JP5995448 B2 JP 5995448B2
Authority
JP
Japan
Prior art keywords
prediction
prediction mode
color difference
unit
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012009446A
Other languages
Japanese (ja)
Other versions
JP2013150178A (en
JP2013150178A5 (en
Inventor
将伸 八杉
将伸 八杉
山本 智幸
智幸 山本
知宏 猪飼
知宏 猪飼
健史 筑波
健史 筑波
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 JP2012009446A priority Critical patent/JP5995448B2/en
Publication of JP2013150178A publication Critical patent/JP2013150178A/en
Publication of JP2013150178A5 publication Critical patent/JP2013150178A5/ja
Application granted granted Critical
Publication of JP5995448B2 publication Critical patent/JP5995448B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、画像を表す符号化データを復号する画像復号装置、および画像を符号化することによって符号化データを生成する画像符号化装置に関する。   The present invention relates to an image decoding apparatus that decodes encoded data representing an image, and an image encoding apparatus that generates encoded data by encoding an image.

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

具体的な動画像符号化方式としては、例えば、H.264/MPEG−4.AVC、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている方式、TMuC(Test Model under Consideration)ソフトウェアに採用されている方式や、その後継コーデックであるHEVC(High-Efficiency Video Coding)にて提案されている方式(非特許文献1)などが挙げられる。   As a specific moving picture encoding method, for example, H.264 is used. H.264 / MPEG-4. A method used in KTA software, which is a codec for joint development in AVC and VCEG (Video Coding Expert Group), a method used in TMuC (Test Model under Consideration) software, and a successor codec, HEVC (High- Efficiency Video Coding) (Non-Patent Document 1) and the like can be mentioned.

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

インター予測においては、フレーム全体が復号された参照フレーム(復号画像)内の参照画像に対し、動きベクトルを用いた動き補償を適用することによって、予測対象フレーム内の予測画像が予測単位(例えば、ブロック)毎に生成される。   In inter prediction, by applying motion compensation using a motion vector to a reference image in a reference frame (decoded image) obtained by decoding the entire frame, a predicted image in a prediction target frame is converted into a prediction unit (for example, Generated every block).

一方、イントラ予測においては、同一フレーム内の局所復号画像に基づいて、当該フレームにおける予測画像が順次生成される。具体的には、イントラ予測においては、通常、予測単位(例えば、ブロック)毎に、予め定められた予測モード群に含まれる予測モードの中から何れかの予測モードが選択されると共に、選択された予測モードに対応付けられる予測方式に基づいて予測画像が生成される。予測方式には、水平予測、垂直予測、DC予測、Planar予測、Angular予測が含まれる。各予測モードには一意の予測モード番号が割り当てられており、動画像復号装置では、符号化データより復号された予測モード番号に基づいて予測対象領域に適用すべき予測方式を決定する。なお、Angular予測には複数の予測方向に対応する予測モードが対応付けられており、動画像復号装置では、予測モード番号に基づいて予測方向を決定し、決定した予測方向に基づいて予測画像が生成される。   On the other hand, in intra prediction, based on locally decoded images in the same frame, predicted images in the frame are sequentially generated. Specifically, in intra prediction, usually, any prediction mode is selected and selected from prediction modes included in a predetermined prediction mode group for each prediction unit (for example, block). A prediction image is generated based on the prediction method associated with the prediction mode. Prediction methods include horizontal prediction, vertical prediction, DC prediction, Planar prediction, and Angular prediction. A unique prediction mode number is assigned to each prediction mode, and the video decoding apparatus determines a prediction method to be applied to the prediction target region based on the prediction mode number decoded from the encoded data. Note that prediction modes corresponding to a plurality of prediction directions are associated with Angular prediction, and the video decoding device determines a prediction direction based on the prediction mode number, and the prediction image is based on the determined prediction direction. Generated.

輝度の予測モードについては、隣接予測単位の予測モードに基づいて導出される推定予測モードに対して短い符号が割り当てられている。一方、色差の予測モードについては、対応する輝度予測単位に適用された予測モードを再利用する推定予測モード(輝度予測モード再利用)に対して、短い符号が割り当てられている。   For the luminance prediction mode, a short code is assigned to the estimated prediction mode derived based on the prediction mode of the adjacent prediction unit. On the other hand, for the color difference prediction mode, a short code is assigned to an estimated prediction mode (luminance prediction mode reuse) that reuses a prediction mode applied to a corresponding luminance prediction unit.

「WD5: Working Draft 5 of High-Efficiency Video Coding (JCTVC-G1103_d3)」, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 7th Meeting:Geneva, CH, 21-30 November, 2011(2012年1月9日公開)`` WD5: Working Draft 5 of High-Efficiency Video Coding (JCTVC-G1103_d3) '', Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 7th Meeting: Geneva, CH, 21-30 November, 2011 (released January 9, 2012)

しかしながら、上述の輝度予測モード再利用は、入力画像の色フォーマット(YUVフォーマット)が4:2:0形式の場合は適切だが、色フォーマットが4:2:2形式である場合は、符号化効率の低下を生じさせてしまう。以下、具体的に説明する。   However, the above-described luminance prediction mode reuse is appropriate when the color format (YUV format) of the input image is 4: 2: 0 format, but when the color format is 4: 2: 2 format, encoding efficiency is improved. Cause a drop in This will be specifically described below.

非特許文献1では、輝度予測モード再利用を用いる場合、輝度の予測単位に適用された予測モードと同一の予測モードを色差の対象予測単位における予測画像生成に用いる。ここで、入力画像の色フォーマットが4:2:0形式で、予測モードが方向予測である場合、輝度予測モード再利用は、輝度領域における予測方向と色差領域における予測方向とが一致することを意味する。   In Non-Patent Document 1, when the luminance prediction mode reuse is used, the same prediction mode as the prediction mode applied to the luminance prediction unit is used for prediction image generation in the target prediction unit of color difference. Here, when the color format of the input image is 4: 2: 0 and the prediction mode is directional prediction, the luminance prediction mode reuse indicates that the prediction direction in the luminance region matches the prediction direction in the color difference region. means.

一方、入力画像の色フォーマットが4:2:2形式の場合、特定の輝度領域に対応する色差領域のサイズを画素数で表現すれば、輝度領域の画素数を横方向に半分にしたサイズとなる。したがって、色差画素の座標系は、輝度画素の座標系を水平方向に2倍にした形状であり、輝度領域においてある予測モードに対応づけられる予測方向は、色差領域において同じ予測モードに対応づけられる予測方向と必ずしも一致しない。   On the other hand, when the color format of the input image is 4: 2: 2, if the size of the color difference area corresponding to a specific luminance area is expressed by the number of pixels, the size of the luminance area is halved in the horizontal direction. Become. Therefore, the coordinate system of the chrominance pixel has a shape obtained by doubling the coordinate system of the luminance pixel in the horizontal direction, and the prediction direction associated with a certain prediction mode in the luminance region is associated with the same prediction mode in the chrominance region. It does not necessarily match the predicted direction.

そのため、非特許文献1の方式では、入力画像の色フォーマットが4:2:2形式であって、輝度の予測単位に適用された予測モードが方向予測である場合に、輝度予測モード再利用によって生成された予測画像が、輝度領域と色差領域のサイズの関係を反映できておらず不正確であるという問題を生じる。   Therefore, in the method of Non-Patent Document 1, when the color format of the input image is 4: 2: 2 format and the prediction mode applied to the luminance prediction unit is direction prediction, the luminance prediction mode is reused. There is a problem that the generated predicted image is inaccurate because it does not reflect the relationship between the size of the luminance area and the color difference area.

本発明は、上記の問題に鑑みてなされたものであり、その目的は、入力画像における輝度領域と色差領域とが相似でない場合でも、輝度予測モード再利用により生成される予測画像を正確にすることで復号画像の画質を向上する画像復号装置等を実現することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to make an accurate prediction image generated by reusing the luminance prediction mode even when the luminance region and the color difference region in the input image are not similar. Thus, an image decoding device or the like that improves the image quality of the decoded image is realized.

上記課題を解決するために、本発明に係る画像復号装置は、予測モードに対応付けられたイントラ予測方式によって、輝度および色差について予測画像を生成することで符号化データから画像を復元する画像復号装置において、方向予測のイントラ予測方式に関して、主方向からの勾配により表現される予測方向に対応する予測モードが使用可能であり、輝度予測画像生成に用いた該予測モードに基づいて色差予測画像生成を行う際、上記輝度画素と上記色差画素との間で画素の形状が異なる場合に予測方向を補正する色差予測手段を備えることを特徴としている。   In order to solve the above problems, an image decoding apparatus according to the present invention performs image decoding that restores an image from encoded data by generating a prediction image for luminance and color difference by an intra prediction method associated with a prediction mode. In the apparatus, with respect to the intra prediction method of direction prediction, a prediction mode corresponding to a prediction direction expressed by a gradient from the main direction can be used, and color difference prediction image generation is performed based on the prediction mode used for luminance prediction image generation When performing the above, color difference prediction means for correcting a prediction direction when the shape of the pixel is different between the luminance pixel and the color difference pixel is provided.

上記の構成では、方向予測のイントラ予測方式に関して、主方向からの勾配により表現される予測方向に対応する予測モードを使用する。主方向は、基準となる方向のことを意味しており、例えば、垂直方向および水平方向である。また、勾配は、予測方向と主方向とのなす角度により規定され得る。   In the above configuration, the prediction mode corresponding to the prediction direction expressed by the gradient from the main direction is used for the intra prediction method of direction prediction. The main direction means a reference direction, for example, a vertical direction and a horizontal direction. Further, the gradient can be defined by the angle formed between the prediction direction and the main direction.

また、上記構成では、輝度および色差について予測モードが指定され、当該指定された予測モードに基づいて予測画像が生成される。   In the above configuration, a prediction mode is specified for luminance and color difference, and a prediction image is generated based on the specified prediction mode.

また、輝度予測画像生成に用いた予測モードを色差予測画像生成に用いることができる。このような予測モードは、いわゆる輝度予測モード再利用を行うものであり、DMモードと呼ばれることもある。   Moreover, the prediction mode used for luminance prediction image generation can be used for color difference prediction image generation. Such a prediction mode performs so-called luminance prediction mode reuse, and is sometimes called a DM mode.

ここで、輝度画素と色差画素との間で画素の形状が異なる場合について説明すると次のとおりである。   Here, a case where the shape of the pixel is different between the luminance pixel and the color difference pixel will be described as follows.

画素は、輝度成分(Y)と、色差成分(U,V)の組み合わせにより表現される。また、動画像の符号化においては、色差画素の解像度を、輝度画素の解像度よりも下げてデータ量の削減を図ることがある。   A pixel is represented by a combination of a luminance component (Y) and a color difference component (U, V). In encoding a moving image, the data amount may be reduced by lowering the resolution of the color difference pixels below that of the luminance pixels.

このように、さまざまな解像度の輝度および色差の組み合わせで画像を表現する画像フォーマットには、例えば、4:4:4形式、4:2:2形式、4:1:1形式、4:2:0形式などがある。   As described above, examples of an image format for expressing an image with a combination of luminance and color difference of various resolutions include a 4: 4: 4 format, a 4: 2: 2 format, a 4: 1: 1 format, and a 4: 2: format. There are 0 formats.

4:4:4形式では、輝度の解像度と、色差の解像度とが同じである。   In the 4: 4: 4 format, the luminance resolution and the color difference resolution are the same.

4:2:2形式は、4:4:4形式において水平方向の解像度を1/2としたものである。   The 4: 2: 2 format is one in which the horizontal resolution is halved in the 4: 4: 4 format.

4:1:1形式は、4:2:2形式において、さらに水平方向の解像度を1/2としたものである。   The 4: 1: 1 format is a format in which the horizontal resolution is halved in the 4: 2: 2 format.

4:2:0形式は、輝度の解像度に対して、色差の解像度を水平方向および垂直方向ともに1/2としたものである。   In the 4: 2: 0 format, the resolution of the color difference is halved in both the horizontal direction and the vertical direction with respect to the luminance resolution.

また、4:4:4形式および4:2:0形式では、それぞれ、輝度画素と色差画素との間でアスペクト比が同じである。これに対して、4:2:2形式および4:1:1形式は、輝度画素と色差画素との間でアスペクト比が異なる。   In the 4: 4: 4 format and the 4: 2: 0 format, the aspect ratio is the same between the luminance pixel and the color difference pixel, respectively. In contrast, the 4: 2: 2 format and the 4: 1: 1 format have different aspect ratios between the luminance pixels and the color difference pixels.

輝度画素と色差画素との間で画素の形状が異なるとは、上記のように、輝度画素と色差画素との間で、アスペクト比が異なり、両者が相似形でないような場合のことをいう。さらに言えば、画素の拡大縮小を行っても、輝度画素の形状と色差画素の形状とが一致しないような場合のことをいう。   The difference in pixel shape between the luminance pixel and the chrominance pixel means that the luminance pixel and the chrominance pixel have different aspect ratios and are not similar to each other as described above. Furthermore, it means a case where the shape of the luminance pixel and the shape of the color difference pixel do not match even when the pixel is enlarged or reduced.

上記の構成によれば、DMモードを用いて色差予測画像生成を生成する際、このように輝度画素と色差画素との間で画素の形状が異なる場合において、予測方向を補正する。よって、DMモードにおいて、輝度画素と色差画素とが相似形でないことにより生じる予測方向のずれを補正することができ、これにより色差領域により適した予測方向を得ることができる。その結果、輝度予測モード再利用によって生成される色差予測画像をより正確なものにして復号画像の画質を向上させることができるという効果を奏する。   According to the above configuration, when generating the color difference prediction image generation using the DM mode, the prediction direction is corrected when the pixel shape is different between the luminance pixel and the color difference pixel. Therefore, in the DM mode, it is possible to correct a prediction direction shift caused by a luminance pixel and a color difference pixel not being similar, and thus a prediction direction more suitable for the color difference region can be obtained. As a result, it is possible to improve the image quality of the decoded image by making the color difference prediction image generated by reusing the luminance prediction mode more accurate.

本発明に係る画像復号装置では、上記色差予測手段は、上記主方向と、上記輝度画素および上記色差画素のサイズ比とに基づいて上記予測方向の勾配を補正するものであってもよい。   In the image decoding apparatus according to the present invention, the color difference prediction means may correct the gradient of the prediction direction based on the main direction and the size ratio of the luminance pixel and the color difference pixel.

予測方向は、2次元ベクトルで表現することもできる。また、輝度空間での予測方向ベクトル(vxL,vyL)と色差空間での予測方向ベクトル(vxC,vyC)との間に、vxL=α・vxC、vyL=β・vyCの関係がある場合には、色差に適用する勾配intraPredAngleの値は、輝度に適用する勾配intraPredAngleの値に対して、主方向が水平方向の場合は(α/β)倍、主方向が垂直方向の場合は(β/α)倍にすることが好ましい。また、係数αは、輝度画素および色差画素の間の水平方向のサイズ比を表し、係数βは、輝度画素および色差画素の間の垂直方向のサイズ比を表しているといえる。   The prediction direction can also be expressed by a two-dimensional vector. If there is a relationship of vxL = α ・ vxC, vyL = β ・ vyC between the prediction direction vector (vxL, vyL) in the luminance space and the prediction direction vector (vxC, vyC) in the color difference space The gradient intraPredAngle value applied to the color difference is (α / β) times larger than the gradient intraPredAngle value applied to the luminance when the main direction is horizontal, and (β / α when the main direction is vertical. ) Is preferably doubled. The coefficient α represents the horizontal size ratio between the luminance pixel and the chrominance pixel, and the coefficient β represents the vertical size ratio between the luminance pixel and the chrominance pixel.

上記の構成によれば、上記主方向と、輝度画素および色差画素のサイズ比とに基づいて上記予測方向の勾配を補正する。このような補正では、輝度の予測方向を表すベクトルに対して上述のサイズ比を適用する演算を行う。そしてこのような演算により、補正後の色差の予測方向を表すベクトルを得ることができる。   According to said structure, the gradient of the said prediction direction is correct | amended based on the said main direction and the size ratio of a luminance pixel and a colour-difference pixel. In such correction, an operation for applying the above-described size ratio to a vector representing a luminance prediction direction is performed. By such a calculation, a vector representing the corrected color difference prediction direction can be obtained.

このように演算により予測方向の勾配を補正することができるので、輝度の予測方向と色差の予測方向とを対応付けるためのテーブルを設けなくても済む。その結果、色差予測画像生成処理におけるメモリ削減を図ることができる。   In this way, the gradient of the prediction direction can be corrected by the calculation, so that it is not necessary to provide a table for associating the luminance prediction direction with the color difference prediction direction. As a result, memory reduction in the color difference predicted image generation process can be achieved.

本発明に係る画像復号装置では、上記色差予測手段は、輝度予測画像生成に用いる予測モードに基づいて得られる予測画像を、上記主方向に応じて、上記輝度画素の形状と上記色差画素の形状との違いによって定まる縮小率で縮小することで、上記予測方向を補正するものであってもよい。   In the image decoding apparatus according to the present invention, the color difference prediction means generates a prediction image obtained based on a prediction mode used for luminance prediction image generation, according to the main direction, the shape of the luminance pixel and the shape of the color difference pixel. The prediction direction may be corrected by reducing at a reduction rate determined by the difference between the prediction direction and the prediction direction.

上記の構成によれば、予測方向の補正は、輝度予測画像を、上記主方向に応じて、色差画素のサイズに縮小することによって間接的に行う。これにより、輝度画素および色差画素のサイズ(解像度)の差異に基づいて、輝度予測画像のサイズを、色差画素のサイズに変換することができる。   According to said structure, correction | amendment of a prediction direction is indirectly performed by reducing a brightness | luminance prediction image to the size of a color difference pixel according to the said main direction. Accordingly, the size of the luminance predicted image can be converted into the size of the color difference pixel based on the difference in size (resolution) between the luminance pixel and the color difference pixel.

このため、輝度予測画像を再利用して色差予測画素を生成することができるという効果を奏する。   For this reason, there is an effect that the color difference prediction pixel can be generated by reusing the luminance prediction image.

本発明に係る画像復号装置では、輝度予測画像生成に用いる予測モードと、色差予測画像生成に用いる予測モードとを対応付ける予測モード変換テーブルを備え、上記色差予測手段は、上記予測モード変換テーブルを参照して、予測モードを変換することで、上記予測方向を補正するものであってもよい。   The image decoding apparatus according to the present invention includes a prediction mode conversion table that associates a prediction mode used for luminance prediction image generation with a prediction mode used for color difference prediction image generation, and the color difference prediction means refers to the prediction mode conversion table. Then, the prediction direction may be corrected by converting the prediction mode.

上記の構成によれば、輝度予測画像生成に用いる予測モードを、色差予測画像生成に用いる予測モードに変換する。この変換テーブルでは、輝度の予測モードと色差の予測モードとがほぼ同じ勾配の予測方向となるように対応付けることができる。   According to said structure, the prediction mode used for brightness | luminance prediction image generation is converted into the prediction mode used for color difference prediction image generation. In this conversion table, the luminance prediction mode and the color difference prediction mode can be associated with each other so that the prediction directions have substantially the same gradient.

例えば、4:2:2形式の場合において、輝度の予測モードVER+8は、色差の予測モードとしては、VER+5に変換してもよい。具体的に説明すると次のとおりである。   For example, in the 4: 2: 2 format, the luminance prediction mode VER + 8 may be converted to VER + 5 as the color difference prediction mode. Specifically, it is as follows.

VER+8の勾配の値が水平方向に+32であるとすると、色差でVER+8に対応する変位の値は+32を2で割った+16である。   If the gradient value of VER + 8 is +32 in the horizontal direction, the displacement value corresponding to VER + 8 in the color difference is +16 obtained by dividing +32 by 2.

ここで、VER+5の勾配が+17であり、上記の+16に最も近い水平方向の勾配であったとする。このとき輝度における予測モードVER+8は、色差においては予測モードVER+5に対応付ければよい。   Here, it is assumed that the gradient of VER + 5 is +17, which is the horizontal gradient closest to +16. At this time, the prediction mode VER + 8 in luminance may be associated with the prediction mode VER + 5 in color difference.

このように対応付けておけば、予測モードVER+5の勾配は、輝度および色差においてともに+17であり、予測モードVER+8の勾配は、輝度および色差においてともに+32である。   With this association, the gradient of the prediction mode VER + 5 is +17 in both luminance and color difference, and the gradient of the prediction mode VER + 8 is +32 in both luminance and color difference.

このように、補正により予測方向の精度の向上を図りつつ、予測モードと勾配との対応を、輝度および色差の間で統一することができる。   In this way, it is possible to unify the correspondence between the prediction mode and the gradient between the luminance and the color difference while improving the accuracy of the prediction direction by correction.

本発明に係る画像復号装置では、上記輝度画素と上記色差画素との間で画素の形状が異なる場合とは、色フォーマットが、4:2:2フォーマットである場合であり、上記色差予測手段は、色差に適用する勾配を、輝度に適用する勾配の値に対して、主方向が水平方向である場合には2倍に設定し、主方向が垂直方向である場合には1/2倍に設定するものであってもよい。   In the image decoding apparatus according to the present invention, the case where the pixel shape is different between the luminance pixel and the color difference pixel is a case where the color format is 4: 2: 2 format, and the color difference prediction means includes The gradient applied to the color difference is set to twice the gradient value applied to the luminance when the main direction is the horizontal direction, and is halved when the main direction is the vertical direction. It may be set.

上記の構成によれば、水平方向の解像度が1/2である4:2:2形式において予測方向の補正を好ましく施すことができる。   According to said structure, correction | amendment of a prediction direction can be preferably given in 4: 2: 2 format whose horizontal direction resolution is 1/2.

上記課題を解決するために、本発明に係る画像符号化装置は、予測モードに対応付けられたイントラ予測方式によって、輝度および色差について予測画像を生成して、原画像と該予測画像との差をとることで得られる予測残差を符号化する画像符号化装置において、方向予測のイントラ予測方式に関して、主方向からの勾配により表現される予測方向に対応する予測モードが使用可能であり、輝度予測画像生成に用いた該予測モードに基づいて色差予測画像生成を行う際、上記輝度画素と上記色差画素との間で画素の形状が異なる場合に予測方向を補正する色差予測手段を備えることを特徴としている。   In order to solve the above-described problem, the image coding apparatus according to the present invention generates a prediction image for luminance and color difference by an intra prediction method associated with a prediction mode, and calculates a difference between the original image and the prediction image. In the image encoding apparatus that encodes the prediction residual obtained by taking the prediction prediction mode corresponding to the prediction direction expressed by the gradient from the main direction can be used for the intra prediction method of direction prediction, and the luminance When color difference prediction image generation is performed based on the prediction mode used for prediction image generation, a color difference prediction unit is provided that corrects the prediction direction when the pixel shape is different between the luminance pixel and the color difference pixel. It is a feature.

上記の構成では、方向予測のイントラ予測方式に関して、主方向からの勾配により表現される予測方向に対応する予測モードを使用する。主方向は、基準となる方向のことを意味しており、例えば、垂直方向および水平方向である。また、勾配は、予測方向と主方向とのなす角度により規定され得る。   In the above configuration, the prediction mode corresponding to the prediction direction expressed by the gradient from the main direction is used for the intra prediction method of direction prediction. The main direction means a reference direction, for example, a vertical direction and a horizontal direction. Further, the gradient can be defined by the angle formed between the prediction direction and the main direction.

また、上記構成では、輝度および色差について予測モードが指定され、当該指定された予測モードに基づいて予測画像が生成される。   In the above configuration, a prediction mode is specified for luminance and color difference, and a prediction image is generated based on the specified prediction mode.

また、輝度予測画像生成に用いた予測モードを色差予測画像生成に用いることができる。このような予測モードは、いわゆる輝度予測モード再利用を行うものであり、DMモードと呼ばれることもある。   Moreover, the prediction mode used for luminance prediction image generation can be used for color difference prediction image generation. Such a prediction mode performs so-called luminance prediction mode reuse, and is sometimes called a DM mode.

そして、画像フォーマットの種類によっては、輝度画素と色差画素との間で、アスペクト比が異なり、両者が相似形でない場合、すなわち、輝度画素と色差画素との間で画素の形状が異なる場合がある。   Depending on the type of image format, the aspect ratio differs between the luminance pixel and the chrominance pixel, and they are not similar, that is, the pixel shape may differ between the luminance pixel and the chrominance pixel. .

上記の構成によれば、DMモードを用いて色差予測画像生成を生成する際に輝度画素と色差画素との間で画素の形状が異なる場合において、予測方向を補正する。よって、DMモードにおいて、輝度画素と色差画素とが相似形でないことにより生じる予測方向のずれを補正することができ、これにより色差領域により適した予測方向を得ることができる。その結果、輝度予測モード再利用によって生成される色差予測画像をより正確なものとすることができるという効果を奏する。   According to the above configuration, when the color difference prediction image generation is generated using the DM mode, the prediction direction is corrected when the pixel shape is different between the luminance pixel and the color difference pixel. Therefore, in the DM mode, it is possible to correct a prediction direction shift caused by a luminance pixel and a color difference pixel not being similar, and thus a prediction direction more suitable for the color difference region can be obtained. As a result, there is an effect that the color difference prediction image generated by reusing the luminance prediction mode can be made more accurate.

以上のように、本発明に係る画像復号装置は、方向予測のイントラ予測方式に関して、主方向からの勾配により表現される予測方向に対応する予測モードが使用可能であり、輝度予測画像生成に用いた該予測モードに基づいて色差予測画像生成を行う際、上記輝度画素と上記色差画素との間で画素の形状が異なる場合に予測方向を補正する色差予測手段を備える構成である。   As described above, the image decoding apparatus according to the present invention can use the prediction mode corresponding to the prediction direction expressed by the gradient from the main direction with respect to the intra prediction method of direction prediction, and can be used for generating a luminance prediction image. When the color difference prediction image is generated based on the prediction mode, the color difference prediction unit corrects the prediction direction when the pixel shape is different between the luminance pixel and the color difference pixel.

上記の構成によれば、DMモードを用いて色差予測画像生成を生成する際、このように輝度画素と色差画素との間で画素の形状が異なる場合において、予測方向を補正する。よって、DMモードにおいて、輝度画素と色差画素とが相似形でないことにより生じる予測方向のずれを補正することができ、これにより色差領域により適した予測方向を得ることができる。その結果、輝度予測モード再利用によって生成される色差予測画像をより正確なものにして復号画像の画質を向上させることができるという効果を奏する。   According to the above configuration, when generating the color difference prediction image generation using the DM mode, the prediction direction is corrected when the pixel shape is different between the luminance pixel and the color difference pixel. Therefore, in the DM mode, it is possible to correct a prediction direction shift caused by a luminance pixel and a color difference pixel not being similar, and thus a prediction direction more suitable for the color difference region can be obtained. As a result, it is possible to improve the image quality of the decoded image by making the color difference prediction image generated by reusing the luminance prediction mode more accurate.

また、本発明に係る画像符号化装置は、予測モードに対応付けられたイントラ予測方式によって、輝度および色差について予測画像を生成して、原画像と該予測画像との差をとることで得られる予測残差を符号化する画像符号化装置において、方向予測のイントラ予測方式に関して、主方向からの勾配により表現される予測方向に対応する予測モードが使用可能であり、輝度予測画像生成に用いた該予測モードに基づいて色差予測画像生成を行う際、上記輝度画素と上記色差画素との間で画素の形状が異なる場合に予測方向を補正する色差予測手段を備えることを特徴としている。   In addition, the image coding apparatus according to the present invention is obtained by generating a prediction image for luminance and color difference using an intra prediction method associated with a prediction mode, and taking the difference between the original image and the prediction image. In an image encoding apparatus that encodes a prediction residual, a prediction mode corresponding to a prediction direction expressed by a gradient from a main direction can be used for an intra prediction method of direction prediction, and is used for luminance prediction image generation. When the color difference prediction image is generated based on the prediction mode, color difference prediction means for correcting a prediction direction when the pixel shape is different between the luminance pixel and the color difference pixel is provided.

上記の構成によれば、DMモードを用いて色差予測画像生成を生成する際に輝度画素と色差画素との間で画素の形状が異なる場合において、予測方向を補正する。よって、DMモードにおいて、輝度画素と色差画素とが相似形でないことにより生じる予測方向のずれを補正することができ、これにより色差領域により適した予測方向を得ることができる。その結果、輝度予測モード再利用によって生成される色差予測画像をより正確なものとすることができるという効果を奏する。   According to the above configuration, when the color difference prediction image generation is generated using the DM mode, the prediction direction is corrected when the pixel shape is different between the luminance pixel and the color difference pixel. Therefore, in the DM mode, it is possible to correct a prediction direction shift caused by a luminance pixel and a color difference pixel not being similar, and thus a prediction direction more suitable for the color difference region can be obtained. As a result, there is an effect that the color difference prediction image generated by reusing the luminance prediction mode can be made more accurate.

本発明の一実施形態に係る動画像復号装置における予測方向導出部の一構成例を示す機能ブロック図である。It is a functional block diagram which shows the example of 1 structure of the prediction direction derivation | leading-out part in the moving image decoding apparatus which concerns on one Embodiment of this invention. 上記動画像復号装置の概略的構成について示した機能ブロック図である。It is the functional block diagram shown about the schematic structure of the said moving image decoding apparatus. 本発明の一実施形態に係る動画像符号化装置によって生成され、上記動画像復号装置によって復号される符号化データのデータ構成を示す図であり、(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 one Embodiment of this invention, and decoded by the said moving image decoder, (a)-(d) is a picture, respectively. It is a figure which shows a layer, a slice layer, a tree block layer, and a CU layer. 上記動画像復号装置で利用されるイントラ予測方式の分類と対応する予測モード番号の例を示す図である。It is a figure which shows the example of the prediction mode number corresponding to the classification | category of the intra prediction method utilized with the said moving image decoding apparatus. 方向予測に属する33種類の予測モードについて、予測モードの識別子に対応する予測方向を示す図である。It is a figure which shows the prediction direction corresponding to the identifier of a prediction mode about 33 types of prediction modes which belong to direction prediction. イントラ予測方式と予測モード番号との対応の定義である予測モード定義の一例を示す図である。It is a figure which shows an example of the prediction mode definition which is a definition of a response | compatibility with an intra prediction method and a prediction mode number. 上記動画像復号装置が備える予測画像生成部の構成例について示す機能ブロック図である。It is a functional block diagram shown about the structural example of the estimated image generation part with which the said moving image decoding apparatus is provided. 入力画像が4:2:0のYUVフォーマットである場合のPUの設定順序およびCU内に含まれるPUを示す図である。(A)は、対象CUのサイズが8×8画素であり、かつ、分割タイプがN×Nである場合のCU内のPUを示す。(B)は、対象CUのサイズが16×16画素であり、かつ、分割タイプが2N×2Nである場合のCU内のPUを示す。It is a figure which shows PU setting order and PU contained in CU when an input image is a YUV format of 4: 2: 0. (A) shows PUs in the CU when the size of the target CU is 8 × 8 pixels and the division type is N × N. (B) shows PUs in the CU when the size of the target CU is 16 × 16 pixels and the division type is 2N × 2N. 入力画像が4:2:2のYUVフォーマットである場合のPUの設定順序およびCU内に含まれるPUを示す図である。(A)は、対象CUのサイズが8×8画素であり、かつ、分割タイプがN×Nである場合のCU内のPUを示す。(B)は、対象CUのサイズが16×16画素であり、かつ、分割タイプが2N×2Nである場合のCU内のPUを示す。It is a figure which shows PU setting order and PU contained in CU when an input image is a YUV format of 4: 2: 2. (A) shows PUs in the CU when the size of the target CU is 8 × 8 pixels and the division type is N × N. (B) shows PUs in the CU when the size of the target CU is 16 × 16 pixels and the division type is 2N × 2N. 入力画像が4:2:2のYUVフォーマットである場合のPUの別の設定順序およびCU内に含まれるPUを示す図である。(A)は、対象CUのサイズが8×8画素であり、かつ、分割タイプがN×Nである場合のCU内のPUを示す。(B)は、対象CUのサイズが16×16画素であり、かつ、分割タイプが2N×2Nである場合のCU内のPUを示す。It is a figure which shows PU contained in another setting order of PU, and CU in case an input image is a YUV format of 4: 2: 2. (A) shows PUs in the CU when the size of the target CU is 8 × 8 pixels and the division type is N × N. (B) shows PUs in the CU when the size of the target CU is 16 × 16 pixels and the division type is 2N × 2N. 上記予測画像生成部におけるCU単位の予測画像生成処理の概略を示すフローチャートである。It is a flowchart which shows the outline of the prediction image generation process of the CU unit in the said prediction image generation part. 上記予測画像生成部が備える輝度予測部の詳細構成を示すブロック図である。It is a block diagram which shows the detailed structure of the brightness | luminance prediction part with which the said estimated image generation part is provided. 予測モード識別子と勾配intraPredAngleの値との対応関係の一例を示すテーブルである。It is a table which shows an example of the correspondence of a prediction mode identifier and the value of gradient intraPredAngle. 上記輝度予測部におけるAngular予測処理を示すフローチャートである。It is a flowchart which shows the Angular prediction process in the said brightness | luminance prediction part. 上記予測画像生成部が備える色差予測部の詳細構成を示すブロック図である。It is a block diagram which shows the detailed structure of the color difference prediction part with which the said estimated image generation part is provided. 予測画像生成対象が色差画素である場合の、予測モード識別子と勾配intraPredAngleの値との対応関係の一例を示すテーブルである。10 is a table showing an example of a correspondence relationship between a prediction mode identifier and a gradient intraPredAngle value when a prediction image generation target is a color difference pixel. 上記動画像復号装置が備える可変長復号部の構成例について示す機能ブロック図である。It is a functional block diagram shown about the structural example of the variable length decoding part with which the said moving image decoding apparatus is provided. 上記可変長復号部が備えるMPM導出部におけるMPM候補の導出方式について示す図である。It is a figure shown about the derivation method of the MPM candidate in the MPM derivation part with which the above-mentioned variable length decoding part is provided. イントラ色差予測モード指定情報chroma_modeおよび輝度の予測モード(IntraPredMode[xB][yB])と、色差予測モード(IntraPredModeC)との対応付けを定義したテーブルを示す図である。It is a figure which shows the table which defined matching with intra color difference prediction mode designation | designated information chroma_mode and the prediction mode (IntraPredMode [xB] [yB]) of brightness | luminance, and color difference prediction mode (IntraPredModeC). 上記動画像復号装置における予測モード復元処理の概略的な流れの一例を示すフローチャートである。It is a flowchart which shows an example of the schematic flow of the prediction mode restoration process in the said moving image decoding apparatus. 本発明の一実施形態に係る動画像符号化装置の構成について示す機能ブロック図である。It is a functional block diagram shown about the structure of the moving image encoder which concerns on one Embodiment of this invention. 上記動画像符号化装置が備える符号化データ生成部の一構成例を示す機能ブロック図である。It is a functional block diagram which shows the example of 1 structure of the encoding data generation part with which the said moving image encoder is provided. 上記動画像符号化装置における予測モード符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the prediction mode encoding process in the said moving image encoder. 上記動画像復号装置における予測方向導出部のす機能ブロックの変形例を示す図である。It is a figure which shows the modification of the functional block of the prediction direction derivation | leading-out part in the said moving image decoding apparatus. 上記予測画像生成部が備える色差予測部の変形例を示すブロック図である。It is a block diagram which shows the modification of the color difference prediction part with which the said prediction image generation part is provided. 上記動画像復号装置における予測方向導出部のす機能ブロックのさらなる変形例を示す図である。It is a figure which shows the further modification of the functional block of the prediction direction derivation | leading-out part in the said moving image decoding apparatus. 上記予測画像生成部が備える色差予測部のさらなる変形例を示すブロック図である。It is a block diagram which shows the further modification of the color difference estimation part with which the said estimated image generation part is provided. 色フォーマットが4:2:2形式である場合において、輝度の予測モードと色差の予測モードとがほぼ同じ勾配の予測方向となるように対応づけたテーブルを示す図である。It is a figure which shows the table which matched so that the prediction mode of a brightness | luminance prediction mode and the prediction mode of a color difference might become the prediction direction of the substantially same gradient, when a color format is 4: 2: 2. 上記予測画像生成部が備える色差予測部のさらなる変形例を示すブロック図である。It is a block diagram which shows the further modification of the color difference estimation part with which the said estimated image generation part is provided. 上記動画像復号装置で利用されるイントラ予測方式の分類と対応する予測モード番号の例を示す図である。It is a figure which shows the example of the prediction mode number corresponding to the classification | category of the intra prediction method utilized with the said moving image decoding apparatus. 上記動画像符号化装置を搭載した送信装置、および、上記動画像復号装置を搭載した受信装置の構成について示した図である。(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.

〔概要〕
本発明の一実施形態について図1〜図32を参照して説明する。まず、図2を参照しながら、動画像復号装置(画像復号装置)1および動画像符号化装置(画像符号化装置)2の概要について説明する。図2は、動画像復号装置1の概略的構成を示す機能ブロック図である。
〔Overview〕
An embodiment of the present invention will be described with reference to FIGS. First, an overview of the moving picture decoding apparatus (image decoding apparatus) 1 and the moving picture encoding apparatus (image encoding apparatus) 2 will be described with reference to FIG. FIG. 2 is a functional block diagram showing a schematic configuration of the moving picture decoding apparatus 1.

図2に示す動画像復号装置1および動画像符号化装置2は、H.264/MPEG−4 AVC規格に採用されている技術、VCEG(Video Coding Expert Group)における共同開発用コーデックであるKTAソフトウェアに採用されている技術、TMuC(Test Model under Consideration)ソフトウェアに採用されている技術、および、その後継コーデックであるHEVC(High-Efficiency Video Coding)にて提案されている技術を実装している。   The moving picture decoding apparatus 1 and the moving picture encoding apparatus 2 shown in FIG. 264 / MPEG-4 AVC standard technology, VCEG (Video Coding Expert Group) codec for joint development in KTA software, TMuC (Test Model under Consideration) software The technology and the technology proposed by HEVC (High-Efficiency Video Coding), which is the successor codec, are implemented.

動画像符号化装置2は、これらの動画像符号化方式において、エンコーダからデコーダに伝送されることが規定されているシンタックス(syntax)の値をエントロピー符号化して符号化データ#1を生成する。   The video encoding device 2 generates encoded data # 1 by entropy encoding a syntax value defined to be transmitted from the encoder to the decoder in these video encoding schemes. .

エントロピー符号化方式としては、コンテキスト適応型可変長符号化(CAVLC:Context-based Adaptive Variable Length Coding)、および、コンテキスト適応型2値算術符号化(CABAC:Context-based Adaptive Binary Arithmetic Coding)が知られている。   As entropy coding methods, context adaptive variable length coding (CAVLC) and context adaptive binary arithmetic coding (CABAC) are known. ing.

CAVLCおよびCABACによる符号化/復号においては、コンテキストに適応した処理が行われる。コンテキストとは、符号化/復号の状況(文脈)のことであり、関連シンタックスの過去の符号化/復号結果により定まるものである。関連シンタックスとしては、例えば、イントラ予測、インター予測に関する各種シンタックス、輝度(Luma)、色差(Chroma)に関する各種シンタックス、およびCU(Coding Unit 符号化単位)サイズに関する各種シンタックスなどがある。また、CABACでは、シンタックスに対応する2値データ(バイナリ列)における、符号化/復号対象となるバイナリの位置をコンテキストとして用いる場合もある。   In encoding / decoding by CAVLC and CABAC, processing adapted to the context is performed. The context is an encoding / decoding situation (context), and is determined by past encoding / decoding results of related syntax. Examples of the related syntax include various syntaxes related to intra prediction and inter prediction, various syntaxes related to luminance (Luma) and chrominance (Chroma), and various syntaxes related to CU (Coding Unit coding unit) size. In CABAC, the binary position to be encoded / decoded in binary data (binary string) corresponding to the syntax may be used as the context.

CAVLCでは、符号化に用いるVLCテーブルを適応的に変更して、各種シンタックスが符号化される。一方、CABACでは、予測モードおよび変換係数等の多値を取り得るシンタックスに対して2値化処理が施され、この2値化処理によって得られた2値データが発生確率に応じて適応的に算術符号化される。具体的には、バイナリ値(0または1)の発生確率を保持するバッファを複数用意し、コンテキストに応じて一つのバッファを選択し、当該バッファに記録されている発生確率に基づいて算術符号化を行う。また、復号/符号化するバイナリ値に基づいて、当該バッファの発生確率を更新することで、コンテキストに応じて適切な発生確率を維持できる。   In CAVLC, various syntaxes are encoded by adaptively changing the VLC table used for encoding. On the other hand, in CABAC, binarization processing is performed on syntax that can take multiple values such as a prediction mode and a conversion coefficient, and binary data obtained by this binarization processing is adaptive according to the occurrence probability. Are arithmetically encoded. Specifically, multiple buffers that hold the occurrence probability of binary values (0 or 1) are prepared, one buffer is selected according to the context, and arithmetic coding is performed based on the occurrence probability recorded in the buffer I do. Further, by updating the occurrence probability of the buffer based on the binary value to be decoded / encoded, an appropriate occurrence probability can be maintained according to the context.

動画像復号装置1には、動画像符号化装置2が動画像を符号化した符号化データ#1が入力される。動画像復号装置1は、入力された符号化データ#1を復号して動画像#2を外部に出力する。動画像復号装置1の詳細な説明に先立ち、符号化データ#1の構成を以下に説明する。
〔符号化データの構成〕
図3を用いて、動画像符号化装置2によって生成され、動画像復号装置1によって復号される符号化データ#1の構成例について説明する。符号化データ#1は、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。
The moving image decoding apparatus 1 receives encoded data # 1 obtained by encoding a moving image by the moving image encoding apparatus 2. The video decoding device 1 decodes the input encoded data # 1 and outputs the video # 2 to the outside. Prior to detailed description of the moving picture decoding apparatus 1, the configuration of the encoded data # 1 will be described below.
[Configuration of encoded data]
A configuration example of encoded data # 1 that is generated by the video encoding device 2 and decoded by the video 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におけるピクチャレイヤ以下の階層の構造を図3に示す。図3の(a)〜(d)は、それぞれ、ピクチャPICTを規定するピクチャレイヤ、スライスSを規定するスライスレイヤ、ツリーブロック(Tree block)TBLKを規定するツリーブロックレイヤ、ツリーブロックTBLKに含まれる符号化単位(Coding Unit;CU)を規定するCUレイヤを示す図である。   The hierarchical structure below the picture layer in the encoded data # 1 is shown in FIG. 3A to 3D 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は、図3の(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. 3A, the picture PICT includes a picture header PH and slices S 1 to S NS (where 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が参照する符号化パラメータ群が含まれている。例えば、予測残差の量子化ステップのピクチャ内における基準値(pic_init_qp_minus26)は、ピクチャヘッダPHに含まれる符号化パラメータの一例である。   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. For example, the reference value (pic_init_qp_minus26) in the picture in the quantization step of the prediction residual is an example of a coding parameter included in the picture header PH.

なお、ピクチャヘッダPHは、ピクチャー・パラメーター・セット(PPS:Picture Parameter Set)とも称される。   The picture header PH is also called a picture parameter set (PPS).

(スライスレイヤ)
スライスレイヤでは、処理対象のスライスS(対象スライスとも称する)を復号するために動画像復号装置1が参照するデータの集合が規定されている。スライスSは、図3の(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. 3B, 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スライスなどが挙げられる。   As slice types that can be specified by the slice type specification information, (1) I slice that uses only intra prediction at the time of encoding, (2) P slice that uses unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.

また、スライスヘッダSHには、動画像復号装置1の備えるループフィルタ(不図示)によって参照されるフィルタパラメータが含まれていてもよい。   Further, the slice header SH may include a filter parameter referred to by a loop filter (not shown) included in the video decoding device 1.

(ツリーブロックレイヤ)
ツリーブロックレイヤでは、処理対象のツリーブロック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情報と称する)CU〜CUNLは、ツリーブロックTBLKを再帰的に4分木分割して得られる各符号化ノード(符号化単位)に対応する情報である。 That is, coding unit information (hereinafter referred to as CU 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. is there.

また、符号化ツリーのルート(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に含まれる、符号化ノードのサイズ指定情報に依存する。ツリーブロックが符号化ノードのルートとなることから、符号化ノードの最大サイズはツリーブロックのサイズとなる。ツリーブロックの最大サイズが符号化ノード(CU)の最大サイズに一致することから、ツリーブロックの呼称としてLCU(Largest CU)が用いられることもある。最小サイズに関しては、例えば、サイズ指定情報として最小符号化ノードサイズ(log2_min_coding_block_size_minus3)と最大と最小の符号化ノードサイズの差(log2_diff_max_min_coding_block_size)が用いられる。一般的な設定では、最大符号化ノードサイズが64×64画素、最小符号化ノードサイズが8×8画素となる符号化ノードのサイズ指定情報が用いられる。その場合、符号化ノードと符号化単位CUのサイズは、64×64画素、32×32画素、16×16画素、または、8×8画素のいずれかとなる。   The size that each coding node can take depends on the size specification information of the coding node included in the size of the tree block and the sequence parameter set SPS of the coded data # 1. Since the tree block is the root of the encoding node, the maximum size of the encoding node is the size of the tree block. Since the maximum size of the tree block matches the maximum size of the coding node (CU), LCU (Largest CU) may be used as the name of the tree block. Regarding the minimum size, for example, the minimum encoding node size (log2_min_coding_block_size_minus3) and the difference between the maximum and minimum encoding node sizes (log2_diff_max_min_coding_block_size) are used as size designation information. In a general setting, size specification information of a coding node having a maximum coding node size of 64 × 64 pixels and a minimum coding node size of 8 × 8 pixels is used. In this case, the size of the encoding node and the encoding unit CU is 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, or 8 × 8 pixels.

(ツリーブロックヘッダ)
ツリーブロックヘッダTBLKHには、対象ツリーブロックの復号方法を決定するために動画像復号装置1が参照する符号化パラメータが含まれる。具体的には、図3の(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 (c) of FIG. 3, 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に含まれるデータの具体的な内容の説明をする前に、CUに含まれるデータの木構造について説明する。符号化ノードは、予測ツリー(prediction tree;PT)および変換ツリー(transform tree;TT)のルートのノードとなる。予測ツリーおよび変換ツリーについて説明すると次のとおりである。   Here, before describing specific contents of data included in the CU 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)とも称する。   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).

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

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

PT情報PTIは、CUに含まれるPTに関する情報である。言い換えれば、PT情報PTIは、PTに含まれる1または複数のPUそれぞれに関する情報の集合であり、動画像復号装置1により予測画像を生成する際に参照される。PT情報PTIは、図3の(d)に示すように、予測タイプ情報PType、および、予測情報PInfoを含んでいる。   The PT information PTI is information related to the PT included in the CU. In other words, the PT information PTI is a set of information related to each of one or more PUs included in the PT, and is referred to when the moving image decoding apparatus 1 generates a predicted image. As shown in FIG. 3D, the PT information PTI includes prediction type information PType and prediction information PInfo.

予測タイプ情報PTypeは、対象PUについての予測画像生成方法として、イントラ予測を用いるのか、または、インター予測を用いるのかを指定する情報である。   The prediction type information PType is information that specifies whether intra prediction or inter prediction is used as a predicted image generation method for the target PU.

予測情報PInfoは、予測タイプ情報PTypeが何れの予測方法を指定するのかに応じて、イントラ予測情報、または、インター予測情報より構成される。以下では、イントラ予測が適用されるPUをイントラPUとも呼称し、インター予測が適用されるPUをインターPUとも呼称する。   The prediction information PInfo is configured from intra prediction information or inter prediction information depending on which prediction method is specified by the prediction type information PType. 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.

また、予測情報PInfoは、対象PUの形状、サイズ、および、位置を指定する情報が含まれる。上述のとおり予測画像の生成は、PUを単位として行われる。予測情報PInfoの詳細については後述する。   Further, the prediction information PInfo includes information specifying the shape, size, and position of the target PU. As described above, the generation of the predicted image is performed in units of PU. Details of the prediction information PInfo will be described later.

TT情報TTIは、CUに含まれるTTに関する情報である。言い換えれば、TT情報TTIは、TTに含まれる1または複数のTUそれぞれに関する情報の集合であり、動画像復号装置1により残差データを復号する際に参照される。なお、以下、TUのことを変換ブロックと称することもある。   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 conversion block.

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

TT分割情報SP_TUは、具体的には、対象CUに含まれる各TUの形状、サイズ、および、対象CU内での位置を決定するための情報である。例えば、TT分割情報SP_TUは、対象となるノードの分割を行うのか否かを示す情報(split_transform_unit_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_unit_flag) indicating whether or not the target node is 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分割情報SP_TUには、各TUに非ゼロの変換係数が存在するか否かの情報が含まれる。例えば、個々のTUに対する非ゼロ係数の存否情報(CBP;Coded Block Flag)や、複数のTUに対する非ゼロ係数の存否情報(no_residual_data_flag)が TU分割情報SP_TUに含まれる。   The TU partition information SP_TU includes information on whether or not a non-zero transform coefficient exists in each TU. For example, non-zero coefficient existence information (CBP; Coded Block Flag) for individual TUs and non-zero coefficient existence information (no_residual_data_flag) for multiple TUs are included in the TU partition information SP_TU.

TU情報TUI1〜TUINTは、TTに含まれる1または複数のTUそれぞれに関する個別の情報である。例えば、TU情報TUIは、量子化予測残差を含んでいる。 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.

各量子化予測残差は、動画像符号化装置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: 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 ).

(予測情報PInfo)
上述のとおり、予測情報PInfoには、インター予測情報およびイントラ予測情報の2種類がある。
(Prediction information PInfo)
As described above, there are two types of prediction information PInfo: inter prediction information and intra prediction information.

インター予測情報には、動画像復号装置1が、インター予測によってインター予測画像を生成する際に参照される符号化パラメータが含まれる。より具体的には、インター予測情報には、対象CUの各インターPUへの分割パターンを指定するインターPU分割情報、および、各インターPUについてのインター予測パラメータが含まれる。   The inter prediction information includes a coding parameter that is referred to when the video decoding device 1 generates an inter prediction image by inter prediction. More specifically, the inter prediction information includes inter PU division information that specifies a division pattern of the target CU into each inter PU, and inter prediction parameters for each inter PU.

インター予測パラメータには、参照画像インデックスと、推定動きベクトルインデックスと、動きベクトル残差とが含まれる。   The inter prediction parameters include a reference image index, an estimated motion vector index, and a motion vector residual.

一方、イントラ予測情報には、動画像復号装置1が、イントラ予測によってイントラ予測画像を生成する際に参照される符号化パラメータが含まれる。より具体的には、イントラ予測情報には、対象CUの各イントラPUへの分割パターンを指定するイントラPU分割情報、および、各イントラPUについてのイントラ予測パラメータが含まれる。イントラ予測パラメータは、各イントラPUについてのイントラ予測(予測モード)を復元するためのパラメータである。   On the other hand, the intra prediction information includes an encoding parameter that is referred to when the video decoding device 1 generates an intra predicted image by intra prediction. More specifically, the intra prediction information includes intra PU division information that specifies a division pattern of the target CU into each intra PU, and intra prediction parameters for each intra PU. The intra prediction parameter is a parameter for restoring intra prediction (prediction mode) for each intra PU.

予測モードを復元するためのパラメータには、MPM(Most Probable Mode、以下同様)に関するフラグであるmpm_flag、MPMを選択するためのインデックスであるmpm_idx、および、MPM以外の予測モードを指定するためのインデックスであるrem_idxが含まれる。ここで、MPMとは、対象パーティションで選択される可能性が高い推定予測モードである。例えば、対象パーティションの周辺のパーティションに割り付けられた予測モードに基づいて推定された推定予測モードや、一般的に発生確率の高いDCモードやPlanarモードがMPMに含まれ得る。   The parameters for restoring the prediction mode include mpm_flag which is a flag related to MPM (Most Probable Mode, the same applies hereinafter), mpm_idx which is an index for selecting the MPM, and an index for designating a prediction mode other than the MPM. Rem_idx is included. Here, MPM is an estimated prediction mode that is highly likely to be selected in the target partition. For example, the MPM may include an estimated prediction mode estimated based on prediction modes assigned to partitions around the target partition, and a DC mode or Planar mode that generally has a high probability of occurrence.

また、以下において、単に“予測モード”と表記する場合、輝度予測モードのことを指す。色差予測モードについては、“色差予測モード”と表記し、輝度予測モードと区別する。また、予測モードを復元するパラメータには、色差予測モードを指定するためのパラメータであるchroma_modeが含まれる。   Further, in the following, when simply described as “prediction mode”, it indicates the luminance prediction mode. The color difference prediction mode is described as “color difference prediction mode” and is distinguished from the luminance prediction mode. The parameter for restoring the prediction mode includes chroma_mode, which is a parameter for designating the color difference prediction mode.

なお、mpm_flag、mpm_idx、rem_idx、およびchroma_modeのパラメータの詳細については、後述する。   Details of parameters of mpm_flag, mpm_idx, rem_idx, and chroma_mode will be described later.

また、mpm_flagおよびrem_indexは、それぞれ、非特許文献1における“prev_intra_luma_pred_flag”および“rem_intra_luma_pred_mode”に対応している。また、chroma_modeは、“intra_chroma_pred_mode”に対応している。
〔動画像復号装置〕
以下では、本実施形態に係る動画像復号装置1の構成について、図1〜図20を参照して説明する。
Further, mpm_flag and rem_index correspond to “prev_intra_luma_pred_flag” and “rem_intra_luma_pred_mode” in Non-Patent Document 1, respectively. Further, chroma_mode corresponds to “intra_chroma_pred_mode”.
[Video decoding device]
Below, the structure of the moving image decoding apparatus 1 which concerns on this embodiment is demonstrated with reference to FIGS.

(動画像復号装置の概要)
動画像復号装置1は、PU毎に予測画像を生成し、生成された予測画像と、符号化データ#1から復号された予測残差とを加算することによって復号画像#2を生成し、生成された復号画像#2を外部に出力する。
(Outline of video decoding device)
The video decoding device 1 generates a predicted image for each PU, generates a decoded image # 2 by adding the generated predicted image and a prediction residual decoded from the encoded data # 1, and generates The decoded image # 2 is output to the outside.

ここで、予測画像の生成は、符号化データ#1を復号することによって得られる符号化パラメータを参照して行われる。符号化パラメータとは、予測画像を生成するために参照されるパラメータのことである。符号化パラメータには、画面間予測において参照される動きベクトルや画面内予測において参照される予測モードなどの予測パラメータに加えて、PUのサイズや形状、ブロックのサイズや形状、および、原画像と予測画像との残差データなどが含まれる。以下では、符号化パラメータに含まれる情報のうち、上記残差データを除く全ての情報の集合を、サイド情報と呼ぶ。   Here, the generation of the predicted image is performed with reference to an encoding parameter obtained by decoding the encoded data # 1. An encoding parameter is a parameter referred in order to generate a prediction image. In addition to prediction parameters such as a motion vector referred to in inter-screen prediction and a prediction mode referred to in intra-screen prediction, the encoding parameters include PU size and shape, block size and shape, and original image and Residual data with the predicted image is included. Hereinafter, a set of all information excluding the residual data among the information included in the encoding parameter is referred to as side information.

また、以下では、復号の対象となるピクチャ(フレーム)、スライス、ツリーブロック、CU、ブロック、および、PUをそれぞれ、対象ピクチャ、対象スライス、対象ツリーブロック、対象CU、対象ブロック、および、対象PUと呼ぶことにする。   Also, in the following, a picture (frame), a slice, a tree block, a CU, a block, and a PU to be decoded are a target picture, a target slice, a target tree block, a target CU, a target block, and a target PU, respectively. I will call it.

なお、ツリーブロックのサイズは、例えば64×64画素であり、CUのサイズは、例えば、64×64画素、32×32画素、16×16画素、8×8画素であり、PUのサイズは、例えば、64×64画素、32×32画素、16×16画素、8×8画素や4×4画素などである。しかしながら、これらのサイズは、単なる例示であり、ツリーブロック、CU、および、PUのサイズは以上に示したサイズ以外のサイズであってもよい。特に、色フォーマットが4:2:2形式である場合には、32×64画素、16×32画素、8×16画素、4×8画素などのサイズのPUを利用することが好ましい。これは、色フォーマットが4:2:2形式の画像では色差画素のアスペクト比が、縦:横=1:2と横長であることから、色差領域においては、垂直方向の画素数が水平方向の画素数の2倍である領域が視覚的には正方形となるためである。   The size of the tree block is, for example, 64 × 64 pixels, the size of the CU is, for example, 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, and 8 × 8 pixels, and the size of the PU is For example, 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, 8 × 8 pixels, 4 × 4 pixels, and the like. However, these sizes are merely examples, and the sizes of the tree block, CU, and PU may be other than the sizes shown above. In particular, when the color format is 4: 2: 2, it is preferable to use a PU having a size of 32 × 64 pixels, 16 × 32 pixels, 8 × 16 pixels, 4 × 8 pixels, or the like. This is because the aspect ratio of the chrominance pixels in the 4: 2: 2 color format image is horizontally long, ie, vertical: horizontal = 1: 2, so that the number of pixels in the vertical direction is the horizontal direction in the chrominance region. This is because an area that is twice the number of pixels is visually a square.

(動画像復号装置の構成)
再び、図2を参照して、動画像復号装置1の概略的構成について説明すると次のとおりである。図2は、動画像復号装置1の概略的構成について示した機能ブロック図である。
(Configuration of video decoding device)
Referring to FIG. 2 again, the schematic configuration of the moving picture decoding apparatus 1 will be described as follows. FIG. 2 is a functional block diagram showing a schematic configuration of the moving picture decoding apparatus 1.

図2に示すように動画像復号装置1は、可変長復号部11、逆量子化・逆変換部13、予測画像生成部14、加算器15およびフレームメモリ16を備えている。   As illustrated in FIG. 2, the video decoding device 1 includes a variable length decoding unit 11, an inverse quantization / inverse conversion unit 13, a predicted image generation unit 14, an adder 15, and a frame memory 16.

[可変長復号部]
可変長復号部11は、動画像復号装置1から入力された符号化データ#1に含まれる各種のパラメータを復号する。以下の説明では、可変長復号部11が、CABACおよびCAVLC等のエントロピー符号化方式により符号化されているパラメータの復号を適宜行うものとする。可変長復号部11は、具体的には、以下の手順により、1フレーム分の符号化データ#1を復号する。
[Variable length decoding unit]
The variable length decoding unit 11 decodes various parameters included in the encoded data # 1 input from the video decoding device 1. In the following description, it is assumed that the variable length decoding unit 11 appropriately decodes a parameter encoded by an entropy encoding method such as CABAC and CAVLC. Specifically, the variable length decoding unit 11 decodes encoded data # 1 for one frame according to the following procedure.

まず、可変長復号部11は、1フレーム分の符号化データ#1を、逆多重化することで、図3に示した階層構造に含まれる各種情報に分離する。例えば、可変長復号部11は、各種ヘッダに含まれる情報を参照して、符号化データ#1を、スライス、ツリーブロックに順次分離する。   First, the variable length decoding unit 11 demultiplexes encoded data # 1 for one frame into various types of information included in the hierarchical structure shown in FIG. For example, the variable length decoding unit 11 refers to information included in various headers and sequentially separates the encoded data # 1 into slices and tree blocks.

ここで、各種ヘッダには、(1)対象ピクチャのスライスへの分割方法についての情報、および(2)対象スライスに属するツリーブロックのサイズ、形状および対象スライス内での位置についての情報が含まれる。   Here, the various headers include (1) information about the method of dividing the target picture into slices, and (2) information about the size, shape, and position of the tree block belonging to the target slice. .

そして、可変長復号部11は、ツリーブロックヘッダTBLKHに含まれるツリーブロック分割情報SP_TBLKを参照して、対象ツリーブロックを、CUに分割する。また、可変長復号部11は、対象CUについて得られる変換ツリーに関するTT情報TTI、および、対象CUについて得られる予測ツリーに関するPT情報PTIを復号する。   Then, the variable length decoding unit 11 divides the target tree block into CUs with reference to the tree block division information SP_TBLK included in the tree block header TBLKH. Further, the variable length decoding unit 11 decodes the TT information TTI related to the conversion tree obtained for the target CU and the PT information PTI related to the prediction tree obtained for the target CU.

なお、TT情報TTIには、上述のとおり、変換ツリーに含まれるTUに対応するTU情報TUIが含まれる。また、PT情報PTIには、上述のとおり、対象予測ツリーに含まれるPUに対応するPU情報PUIが含まれる。   The TT information TTI includes the TU information TUI corresponding to the TU included in the conversion tree as described above. Further, as described above, the PT information PTI includes the PU information PUI corresponding to the PU included in the target prediction tree.

可変長復号部11は、対象CUについて得られたTT情報TTIをTU情報復号部12に供給する。また、可変長復号部11は、対象CUについて得られたPT情報PTIを予測画像生成部14に供給する。なお、可変長復号部11の構成については、後ほど、より詳しく説明する。   The variable length decoding unit 11 supplies the TT information TTI obtained for the target CU to the TU information decoding unit 12. Further, the variable length decoding unit 11 supplies the PT information PTI obtained for the target CU to the predicted image generation unit 14. The configuration of the variable length decoding unit 11 will be described in more detail later.

[逆量子化・逆変換部]
逆量子化・逆変換部13は、対象CUに含まれる各ブロックについて、TT情報TTIに基づいて逆量子化・逆変換処理を実行する。具体的には、逆量子化・逆変換部13は、各対象TUについて、対象TUに対応するTU情報TUIに含まれる量子化予測残差を逆量子化および逆直交変換することによって、画素毎の予測残差Dを復元する。なお、ここで直交変換とは、画素領域から周波数領域への直交変換のことを指す。したがって、逆直交変換は、周波数領域から画素領域への変換である。また、逆直交変換の例としては、逆DCT変換(Inverse Discrete Cosine Transform)、および逆DST変換(Inverse Discrete Sine Transform)等が挙げられる。逆量子化・逆変換部13は、復元した予測残差Dを加算器15に供給する。
[Inverse quantization / inverse transform unit]
The inverse quantization / inverse transform unit 13 performs an inverse quantization / inverse transform process on each block included in the target CU based on the TT information TTI. Specifically, for each target TU, the inverse quantization / inverse transform unit 13 performs inverse quantization and inverse orthogonal transform on the quantized prediction residual included in the TU information TUI corresponding to the target TU, so that each pixel is per pixel. Is restored. Here, the orthogonal transform refers to an orthogonal transform from the pixel region to the frequency region. Therefore, the inverse orthogonal transform is a transform from the frequency domain to the pixel domain. Examples of inverse orthogonal transform include inverse DCT transform (Inverse Discrete Cosine Transform), inverse DST transform (Inverse Discrete Sine Transform), and the like. The inverse quantization / inverse transform unit 13 supplies the restored prediction residual D to the adder 15.

[予測画像生成部]
予測画像生成部14は、対象CUに含まれる各PUについて、PT情報PTIに基づいて予測画像を生成する。具体的には、予測画像生成部14は、各対象PUについて、対象PUに対応するPU情報PUIに含まれるパラメータに従ってイントラ予測またはインター予測を行うことにより、復号済み画像である局所復号画像P’から予測画像Predを生成する。予測画像生成部14は、生成した予測画像Predを加算器15に供給する。なお、予測画像生成部14の構成については、後ほど、より詳しく説明する。
[Predicted image generator]
The predicted image generation unit 14 generates a predicted image based on the PT information PTI for each PU included in the target CU. Specifically, the predicted image generation unit 14 performs, for each target PU, a local decoded image P ′ that is a decoded image by performing intra prediction or inter prediction according to the parameters included in the PU information PUI corresponding to the target PU. Is used to generate a predicted image Pred. The predicted image generation unit 14 supplies the generated predicted image Pred to the adder 15. The configuration of the predicted image generation unit 14 will be described in more detail later.

[加算器]
加算器15は、予測画像生成部14より供給される予測画像Predと、逆量子化・逆変換部13より供給される予測残差Dとを加算することによって、対象CUについての復号画像Pを生成する。
[Adder]
The adder 15 adds the predicted image Pred supplied from the predicted image generation unit 14 and the prediction residual D supplied from the inverse quantization / inverse transform unit 13, thereby obtaining the decoded image P for the target CU. Generate.

[フレームメモリ]
フレームメモリ16には、復号された復号画像Pが順次記録される。フレームメモリ16には、対象ツリーブロックを復号する時点において、当該対象ツリーブロックよりも先に復号された全てのツリーブロック(例えば、ラスタスキャン順で先行する全てのツリーブロック)に対応する復号画像が記録されている。
[Frame memory]
The decoded image P that has been decoded is sequentially recorded in the frame memory 16. In the frame memory 16, at the time of decoding the target tree block, decoded images corresponding to all tree blocks decoded before the target tree block (for example, all tree blocks preceding in the raster scan order) are stored. It is recorded.

また、対象CUを復号する時点において、当該対象CUよりも先に復号された全てのCUに対応する復号画像が記録されている。   Also, at the time of decoding the target CU, decoded images corresponding to all the CUs decoded before the target CU are recorded.

なお、動画像復号装置1において、画像内の全てのツリーブロックに対して、ツリーブロック単位の復号画像生成処理が終わった時点で、動画像復号装置1に入力された1フレーム分の符号化データ#1に対応する復号画像#2が外部に出力される。   In the video decoding device 1, the encoded data for one frame input to the video decoding device 1 at the time when the decoded image generation processing for each tree block is completed for all tree blocks in the image. Decoded image # 2 corresponding to # 1 is output to the outside.

(予測モードの定義)
前述の通り、予測画像生成部14は、PT情報PTIに基づいて予測画像を生成して出力する。対象CUがイントラCUの場合、予測画像生成部14に入力されるPU情報PTIは、予測モード(IntraPredMode)と、色差予測モード(IntraPredModeC)を含む。以下、予測モード(輝度・色差)の定義について、図4〜6を参照して説明する。
(概要)
図4は、動画像復号装置1で利用されるイントラ予測方式の分類と対応する予測モード番号の例を示している。Planar予測(Intra_Planar)に‘0’、垂直予測(Intra_Vertical)に‘1’、水平予測(Intra_Horizontal)に‘2’、DC予測(Intra_DC)に‘3’、Angular予測(Intra_Angular)に‘4’〜 ‘34’、LM予測(Intra_FromLuma)に‘35’の予測モード番号がそれぞれ割り当てられている。LM予測は輝度の復号画素値に基づいて色差の画素値を予測する方式であり、色差の予測時のみ選択可能である。その他の予測モードは輝度と色差いずれにおいても選択され得る。なお、水平予測、垂直予測、Angular予測を総称して方向予測と呼ぶ。方向予測は、対象PU周辺の隣接画素値を特定の方向に外挿することで予測画像を生成する予測方式である。
(Definition of prediction mode)
As described above, the predicted image generation unit 14 generates and outputs a predicted image based on the PT information PTI. When the target CU is an intra CU, the PU information PTI input to the predicted image generation unit 14 includes a prediction mode (IntraPredMode) and a color difference prediction mode (IntraPredModeC). Hereinafter, the definition of the prediction mode (luminance / color difference) will be described with reference to FIGS.
(Overview)
FIG. 4 shows an example of the prediction mode number corresponding to the classification of the intra prediction method used in the video decoding device 1. '0' for Planar prediction (Intra_Planar), '1' for vertical prediction (Intra_Vertical), '2' for horizontal prediction (Intra_Horizontal), '3' for DC prediction (Intra_DC), '4' for Angular prediction (Intra_Angular) A prediction mode number of “35” is assigned to “34” and LM prediction (Intra_FromLuma), respectively. The LM prediction is a method for predicting the pixel value of the color difference based on the decoded pixel value of the luminance, and can be selected only when the color difference is predicted. Other prediction modes can be selected for both luminance and color difference. Horizontal prediction, vertical prediction, and angular prediction are collectively referred to as direction prediction. The direction prediction is a prediction method for generating a prediction image by extrapolating adjacent pixel values around the target PU in a specific direction.

次に、図5を用いて、方向予測に含まれる各予測モードの識別子を説明する。図5には方向予測に属する33種類の予測モードについて、予測モードの識別子と対応する予測方向が図示されている。図5中の矢印の方向は予測方向を表すが、より正確には、予測対象画素から予測対象画素が参照する復号済画素へのベクトルの向きを示している。その意味で、予測方向のことを参照方向とも呼ぶ。各予測モードの識別子は、主方向が水平方向(HOR)か垂直方向(VER)かを表す符号と、主方向に対する変位の組み合わせからなる識別子が対応付けられている。例えば、水平予測にはHOR、垂直予測にはVER、右上45度方向の周辺画素を参照する予測モードにはVER+8、左上45度方向の周辺画素を参照する予測モードにはVER−8、左下45度方向の周辺画素を参照する予測モードにはHOR+8の符号がそれぞれ割り当てられる。方向予測には、VER−8〜VER+8の17個の主方向が垂直方向の予測モードと、HOR−7〜HOR+8の16個の主方向が水平予測の予測モードが定義されている。   Next, the identifier of each prediction mode included in the direction prediction will be described with reference to FIG. FIG. 5 shows prediction modes corresponding to prediction mode identifiers for 33 types of prediction modes belonging to direction prediction. The direction of the arrow in FIG. 5 represents the prediction direction, but more accurately indicates the direction of the vector from the prediction target pixel to the decoded pixel referred to by the prediction target pixel. In that sense, the prediction direction is also referred to as a reference direction. The identifier of each prediction mode is associated with a code indicating whether the main direction is the horizontal direction (HOR) or the vertical direction (VER) and an identifier composed of a combination of displacements with respect to the main direction. For example, HOR for horizontal prediction, VER for vertical prediction, VER + 8 for prediction mode referring to surrounding pixels in the upper right 45 degree direction, VER-8 for prediction mode referring to surrounding pixels in the upper left 45 degree direction, and lower left 45 A prediction mode that refers to peripheral pixels in the direction of the degree is assigned a code of HOR + 8. In the direction prediction, 17 prediction directions of VER-8 to VER + 8 are defined as a vertical prediction mode, and 16 prediction directions of HOR-7 to HOR + 8 are defined as a prediction mode of horizontal prediction.

動画像復号装置1で適用されるイントラ予測方式と予測モード番号との対応は、例えば、図6に示すように定義されていてもよい。図6は、イントラ予測方式と予測モード番号との対応の定義である予測モード定義DEFPM1の一例を示す図である。図6に示す予測モード定義DEFPM1では、Planar予測に‘0’、垂直予測に‘1’、水平予測に‘2’、DC予測に‘3’の予測モード番号が割り当てられている。予測モード番号‘4’〜‘18’までは、主方向からの変位が偶数であるAngular予測モードが、変位が小さい予測モードの順であって、変位が等しい場合は主方向が垂直、水平となる順に、予測モード番号に割り当てられている。予測モード番号‘19’〜‘35’までは、主方向からの変位が奇数であるAngular予測モードが、変位が小さい予測モードの順であって、変位が等しい場合は主方向が垂直、水平となる順に、予測モード番号に割り当てられている。   The correspondence between the intra prediction method and the prediction mode number applied in the video decoding device 1 may be defined as shown in FIG. 6, for example. FIG. 6 is a diagram illustrating an example of a prediction mode definition DEFPM1 that is a definition of correspondence between an intra prediction method and a prediction mode number. In the prediction mode definition DEFPM1 shown in FIG. 6, prediction mode numbers “0” for Planar prediction, “1” for vertical prediction, “2” for horizontal prediction, and “3” for DC prediction are assigned. From prediction mode numbers “4” to “18”, the Angular prediction mode in which the displacement from the main direction is an even number is in the order of the prediction mode in which the displacement is small. When the displacements are equal, the main direction is vertical and horizontal The prediction mode numbers are assigned in this order. From prediction mode numbers '19' to '35', the Angular prediction mode in which the displacement from the main direction is an odd number is in the order of the prediction mode in which the displacement is small. When the displacements are equal, the main direction is vertical and horizontal. The prediction mode numbers are assigned in this order.

(予測画像生成部の詳細)
次に、図7を用いて予測画像生成部14の構成についてさらに詳しく説明する。図7は予測画像生成部14の構成例について示す機能ブロック図である。なお、本構成例は、予測画像生成部14の機能のうち、イントラCUの予測画像生成に係る機能ブロックを図示している。
(Details of predicted image generator)
Next, the configuration of the predicted image generation unit 14 will be described in more detail with reference to FIG. FIG. 7 is a functional block diagram illustrating a configuration example of the predicted image generation unit 14. In addition, this structural example has illustrated the functional block which concerns on the prediction image production | generation of intra CU among the functions of the prediction image production | generation part 14. FIG.

図7に示すように、予測画像生成部14は、予測単位設定部141、参照画素設定部142、スイッチ143、参照画素フィルタ部144、輝度予測部145、および色差予測部146を備える。   As illustrated in FIG. 7, the predicted image generation unit 14 includes a prediction unit setting unit 141, a reference pixel setting unit 142, a switch 143, a reference pixel filter unit 144, a luminance prediction unit 145, and a color difference prediction unit 146.

予測単位設定部141は、対象CUに含まれるPUを規定の設定順序で対象PUに設定し、対象PUに関する情報(対象PU情報)を出力する。対象PU情報には、対象PUのサイズ、対象PUのCU内の位置、対象PUの輝度または色差プレーンを示すインデックス(輝度色差インデックスcIdx)が少なくとも含まれる。   The prediction unit setting unit 141 sets PUs included in the target CU as target PUs in a prescribed setting order, and outputs information related to the target PU (target PU information). The target PU information includes at least a size of the target PU, a position in the CU of the target PU, and an index (luminance color difference index cIdx) indicating the luminance or color difference plane of the target PU.

PUの設定順序は、例えば、入力画像がYUVフォーマットである場合、対象CUに含まれるYに対応するPUをラスタスキャン順に設定し、続いて、U、Vの順に対応するPUをそれぞれラスタスキャン順に設定する順序を利用する。   For example, when the input image is in YUV format, the PU setting order is such that PUs corresponding to Y included in the target CU are set in raster scan order, and subsequently, PUs corresponding to the order of U and V are set in raster scan order. Use the order of setting.

入力画像が4:2:0のYUVフォーマットである場合のPUの設定順序およびCU内に含まれるPUを図示した図8を用いて説明する。   The setting sequence of PUs when the input image is in the 4: 2: 0 YUV format and PUs included in the CU will be described with reference to FIG.

図8の(A)は、対象CUのサイズが8×8画素であり、かつ、分割タイプがN×Nである場合のCU内のPUを図示している。まず、輝度Yに対応する4個の4×4画素のPUがラスタスキャン順(PU_Y0、PU_Y1、PU_Y2、PU_Y3の順)に設定される。次に、色差Uに対応する1個の4×4画素のPU(PU_U0)が設定される。最後に、色差Vに対応する1個の4×4画素の予測単位(PU_V0)が設定される。   FIG. 8A illustrates PUs in a CU when the size of the target CU is 8 × 8 pixels and the division type is N × N. First, four 4 × 4 pixel PUs corresponding to the luminance Y are set in the raster scan order (in the order of PU_Y0, PU_Y1, PU_Y2, PU_Y3). Next, one 4 × 4 pixel PU (PU_U0) corresponding to the color difference U is set. Finally, one 4 × 4 pixel prediction unit (PU_V0) corresponding to the color difference V is set.

図8の(B)は、対象CUのサイズが16×16画素であり、かつ、分割タイプが2N×2Nである場合のCU内のPUを図示している。まず、輝度Yに対応する1個の16×16画素の予測単位(PU_Y0)が設定される。次に、色差Uに対応する1個の8×8画素の予測単位(PU_U0)が設定される。最後に、色差Vに対応する1個の8×8画素の予測単位(PU_V0)が設定される。   (B) of FIG. 8 illustrates PUs in the CU when the size of the target CU is 16 × 16 pixels and the division type is 2N × 2N. First, one 16 × 16 pixel prediction unit (PU_Y0) corresponding to the luminance Y is set. Next, one 8 × 8 pixel prediction unit (PU_U0) corresponding to the color difference U is set. Finally, one 8 × 8 pixel prediction unit (PU_V0) corresponding to the color difference V is set.

次に、入力画像が4:2:2のYUVフォーマットである場合のPUの設定順序およびCU内に含まれるPUを図示した図9を用いて説明する。   Next, description will be made with reference to FIG. 9 illustrating PU setting order and PUs included in the CU when the input image is in a 4: 2: 2 YUV format.

図9の(A)は、対象CUのサイズが8×8画素であり、かつ、分割タイプがN×Nである場合のCU内のPUを図示している。まず、輝度Yに対応する4個の4×4画素のPUがラスタスキャン順(PU_Y0、PU_Y1、PU_Y2、PU_Y3の順)に設定される。次に、色差Uに対応する1個の4×8画素のPU(PU_U0)が設定される。最後に、色差Vに対応する1個の4×8画素の予測単位(PU_V0)が設定される。   FIG. 9A illustrates PUs in a CU when the size of the target CU is 8 × 8 pixels and the division type is N × N. First, four 4 × 4 pixel PUs corresponding to the luminance Y are set in the raster scan order (in the order of PU_Y0, PU_Y1, PU_Y2, PU_Y3). Next, one 4 × 8 pixel PU (PU_U0) corresponding to the color difference U is set. Finally, one 4 × 8 pixel prediction unit (PU_V0) corresponding to the color difference V is set.

図9の(B)は、対象CUのサイズが16×16画素であり、かつ、分割タイプが2N×2Nである場合のCU内のPUを図示している。まず、輝度Yに対応する1個の16×16画素の予測単位(PU_Y0)が設定される。次に、色差Uに対応する1個の8×16画素の予測単位(PU_U0)が設定される。最後に、色差Vに対応する1個の8×16画素の予測単位(PU_V0)が設定される。   FIG. 9B illustrates PUs in a CU when the size of the target CU is 16 × 16 pixels and the division type is 2N × 2N. First, one 16 × 16 pixel prediction unit (PU_Y0) corresponding to the luminance Y is set. Next, one 8 × 16 pixel prediction unit (PU_U0) corresponding to the color difference U is set. Finally, one 8 × 16 pixel prediction unit (PU_V0) corresponding to the color difference V is set.

また、図10は、別のPU設定を示している。図10の(A)は、対象CUのサイズが8×8画素であり、かつ、分割タイプがN×Nである場合のCU内のPUの別の例を図示している。まず、輝度Yに対応する4個の4×4画素のPUがラスタスキャン順(PU_Y0、PU_Y1、PU_Y2、PU_Y3の順)に設定される。次に、色差Uに対応する2個の4×4画素のPU(PU_U0、PU_U1)が設定される。最後に、色差Vに対応する2個の4×4画素のPU(PU_V0、PU_V1)が設定される。   FIG. 10 shows another PU setting. FIG. 10A illustrates another example of PUs in a CU when the size of the target CU is 8 × 8 pixels and the division type is N × N. First, four 4 × 4 pixel PUs corresponding to the luminance Y are set in the raster scan order (in the order of PU_Y0, PU_Y1, PU_Y2, PU_Y3). Next, two 4 × 4 pixel PUs (PU_U0, PU_U1) corresponding to the color difference U are set. Finally, two 4 × 4 pixel PUs (PU_V0, PU_V1) corresponding to the color difference V are set.

図10の(B)は分割タイプが2N×2Nの場合であり、図9の(B)と同じPU設定を示している。   FIG. 10B shows a case where the division type is 2N × 2N, and shows the same PU setting as in FIG. 9B.

以下の説明では、図9に図示した分割を用いるものとするが、図10に図示した分割を用いた場合にも、色差の各PUにおいて同様の処理を適用可能である。   In the following description, the division illustrated in FIG. 9 is used, but the same processing can be applied to each color difference PU even when the division illustrated in FIG. 10 is used.

参照画素設定部142は、入力される対象PU情報に基づいて、フレームメモリに記録されている対象PU周辺の復号画像の画素値(複号画素値)を読出し、予測画像生成時に参照される参照画素を設定する。参照画素値p(x,y)は復号画素値r(x,y)を利用して次式により設定される。   The reference pixel setting unit 142 reads a pixel value (decoded pixel value) of a decoded image around the target PU recorded in the frame memory based on the input target PU information, and is referred to when generating a predicted image Set the pixel. The reference pixel value p (x, y) is set by the following equation using the decoded pixel value r (x, y).

p(x,y)=r(xB+x,yB+y) x=-1, y=-1 .. (nS*2-1)、および、x=0..(nS*2-1),y=-1
ここで、(xB,yB)は対象PU内左上画素の位置、nSは対象PUのサイズを表し、対象PUの幅または高さのうち大きい方の値を示す。上式では、基本的には、対象PUの上辺に隣接する復号画素のラインおよび対象PUの左辺に隣接する復号画素のコラムに含まれる復号画素値を対応する参照画素値にコピーしている。なお、特定の参照画素位置に対応する復号画素値が存在しない、または、参照できない場合には、既定の値を利用してもよいし、対応する復号画素値の近傍に存在する参照可能な復号画素値を利用してもよい。
p (x, y) = r (xB + x, yB + y) x = -1, y = -1 .. (nS * 2-1) and x = 0 .. (nS * 2-1) , y = -1
Here, (xB, yB) represents the position of the upper left pixel in the target PU, nS represents the size of the target PU, and indicates the larger value of the width or height of the target PU. In the above equation, basically, the decoded pixel value included in the decoded pixel line adjacent to the upper side of the target PU and the decoded pixel column adjacent to the left side of the target PU is copied to the corresponding reference pixel value. Note that when there is no decoded pixel value corresponding to a specific reference pixel position or when reference cannot be made, a predetermined value may be used, or referenceable decoding existing in the vicinity of the corresponding decoded pixel value. Pixel values may be used.

スイッチ143は、入力される対象PU情報に基づいて、対象PUが輝度か色差かを判定し、対応する出力方向に対して入力される参照画素を出力する。   The switch 143 determines whether the target PU is luminance or color difference based on the input target PU information, and outputs a reference pixel input in the corresponding output direction.

参照画素フィルタ部144は、入力される予測モードに応じて、入力される参照画素値にフィルタを適用して、フィルタ適用後の参照画素値を出力する。具体的には、参照画素フィルタ部144は、フィルタの適用有無を、対象PUサイズと予測モードとに応じて決定する。   The reference pixel filter unit 144 applies a filter to the input reference pixel value according to the input prediction mode, and outputs the reference pixel value after the filter application. Specifically, the reference pixel filter unit 144 determines whether to apply the filter according to the target PU size and the prediction mode.

輝度予測部145は、入力される予測モードと参照画素に基づいて対象PUの輝度予測画像を生成して出力する。輝度予測部145の詳細な説明は後述する。   The luminance prediction unit 145 generates and outputs a luminance prediction image of the target PU based on the input prediction mode and reference pixels. Detailed description of the luminance prediction unit 145 will be described later.

色差予測部146は、入力される予測モードと参照画素に基づいて対象PUの色差予測画像を生成して出力する。色差予測部146の詳細な説明は後述する。   The color difference prediction unit 146 generates and outputs a color difference prediction image of the target PU based on the input prediction mode and reference pixels. Detailed description of the color difference prediction unit 146 will be described later.

(予測画像生成処理の流れ)
次に、予測画像生成部14におけるCU単位の予測画像生成処理の概略を図11のフローチャートを用いて説明する。CU単位の予測画像生成処理が始まると、まず、予測単位設定部141がCU内に含まれるPUの一つを既定の順序に従って対象PUに設定して対象PU情報を参照画素設定部142およびスイッチ143に出力する(S11)。次に、参照画素設定部142は対象PUの参照画素を、外部のフレームメモリから読み出した復号画素値を用いて設定する(S12)。次に、スイッチ143が、入力された対象PU情報に基づいて対象PUが輝度か色差かを判定し、当該判定結果に応じて出力を切り替える(S13)。
(Flow of predicted image generation processing)
Next, an outline of the prediction image generation processing for each CU in the prediction image generation unit 14 will be described with reference to the flowchart of FIG. When the predicted image generation processing for each CU starts, first, the prediction unit setting unit 141 sets one of the PUs included in the CU as the target PU according to a predetermined order, and sets the target PU information as the reference pixel setting unit 142 and the switch. It outputs to 143 (S11). Next, the reference pixel setting unit 142 sets the reference pixel of the target PU using the decoded pixel value read from the external frame memory (S12). Next, the switch 143 determines whether the target PU is luminance or color difference based on the input target PU information, and switches the output according to the determination result (S13).

対象PUが輝度である場合(S13でYES)、スイッチ143の出力は参照画素フィルタ部144に接続される。続いて、参照画素フィルタ部144に対し参照画素が入力され、別途入力された予測モードに応じて参照画素フィルタが適用され、フィルタ適用後の参照画素が輝度予測部145に出力される(S14)。次に、輝度予測部145は、入力される参照画素と予測モードに基づいて対象PUにおける輝度予測画像を生成して出力する(S15)。   When the target PU is luminance (YES in S13), the output of the switch 143 is connected to the reference pixel filter unit 144. Subsequently, the reference pixel is input to the reference pixel filter unit 144, the reference pixel filter is applied according to the prediction mode separately input, and the reference pixel after the filter application is output to the luminance prediction unit 145 (S14). . Next, the brightness prediction unit 145 generates and outputs a brightness prediction image in the target PU based on the input reference pixel and the prediction mode (S15).

一方、対象PUが色差の場合(S13でNO)、スイッチ143の出力は色差予測部146に接続される。続いて、色差予測部146は、入力される参照画素と予測モードに基づいて対象PUにおける色差予測画像を生成して出力する(S16)。対象PUの輝度または色差の予測画像の生成が終わると、予測単位設定部141が、対象CU内の全てのPUの予測画像が生成されたかを判定する(S17)。対象CU内の一部のPUの予測画像が生成されていない場合(S17でNO)、上記S1に戻り、対象CU内の次のPUの予測画像生成処理を実行する。対象CU内の全てのPUの予測画像が生成されている場合(S17でYES)、対象CU内の各PUの輝度および色差の予測画像を合わせて対象CUの予測画像として出力し、処理を終了する。
(輝度予測部の詳細)
続いて図12を用いて、輝度予測部145の詳細について説明する。図12に輝度予測部145の詳細構成を示す。図12に示すように、輝度予測部145は、予測方式選択部1451および予測画像導出部1452を備える。
On the other hand, when the target PU is a color difference (NO in S13), the output of the switch 143 is connected to the color difference prediction unit 146. Subsequently, the color difference prediction unit 146 generates and outputs a color difference prediction image in the target PU based on the input reference pixel and the prediction mode (S16). When the generation of the prediction image of the luminance or color difference of the target PU is completed, the prediction unit setting unit 141 determines whether the prediction images of all the PUs in the target CU have been generated (S17). When the prediction image of some PUs in the target CU has not been generated (NO in S17), the process returns to S1, and the prediction image generation process for the next PU in the target CU is executed. If predicted images of all PUs in the target CU have been generated (YES in S17), the predicted images of the luminance and color difference of each PU in the target CU are combined and output as a predicted image of the target CU, and the process ends. To do.
(Details of luminance prediction part)
Next, details of the luminance prediction unit 145 will be described with reference to FIG. FIG. 12 shows a detailed configuration of the luminance prediction unit 145. As illustrated in FIG. 12, the luminance prediction unit 145 includes a prediction method selection unit 1451 and a predicted image derivation unit 1452.

予測方式選択部1451は、入力される予測モードに基づいて予測画像生成に用いる予測方式を選択して選択結果を出力する。予測方式の選択は、前述の図4の定義に基づいて、入力される予測モードの予測モード番号に対応する予測方式を選択することで実現される。   The prediction method selection unit 1451 selects a prediction method used for prediction image generation based on the input prediction mode and outputs a selection result. The selection of the prediction method is realized by selecting a prediction method corresponding to the prediction mode number of the input prediction mode based on the definition of FIG. 4 described above.

予測画像導出部1452は、予測方式選択部1451が出力した予測方式の選択結果に応じた予測画像を導出する。予測画像導出部1452は、より具体的には、DC予測部1452D、Planar予測部1452P、水平予測部1452H、垂直予測部1452V、Angular予測部1452A、および、予測方向導出部1453を備える。また、予測画像導出部1452は、予測方式が、Planer、垂直予測、水平予測、DC予測、およびAngularの場合、それぞれ、 Planar予測部1452P、垂直予測部1452V、水平予測部1452H、およびAngular予測部1452Aにより予測画像を導出する。   The prediction image deriving unit 1452 derives a prediction image corresponding to the prediction method selection result output by the prediction method selecting unit 1451. More specifically, the predicted image derivation unit 1452 includes a DC prediction unit 1452D, a Planar prediction unit 1452P, a horizontal prediction unit 1452H, a vertical prediction unit 1452V, an Angular prediction unit 1452A, and a prediction direction derivation unit 1453. Further, when the prediction method is Planer, vertical prediction, horizontal prediction, DC prediction, and Angular, the predicted image derivation unit 1452 is a Planar prediction unit 1452P, a vertical prediction unit 1452V, a horizontal prediction unit 1452H, and an Angular prediction unit, respectively. A prediction image is derived by 1452A.

DC予測部1452Dは、入力される参照画素の画素値の平均値に相当するDC予測値を導出し、導出されたDC予測値を画素値とする予測画像を出力する。   The DC prediction unit 1452D derives a DC prediction value corresponding to the average value of the pixel values of the input reference pixels, and outputs a prediction image using the derived DC prediction value as a pixel value.

Planar予測部1452Pは、予測対象画素との距離に応じて複数の参照画素を線形加算することで導出した画素値により予測画像を生成して出力する。例えば、予測画像の画素値predSamples[x,y]は、参照画素値p[x,y]と対象PUのサイズnSを用いて以下の式により導出できる。   The Planar prediction unit 1452P generates and outputs a predicted image based on pixel values derived by linearly adding a plurality of reference pixels according to the distance from the prediction target pixel. For example, the pixel value predSamples [x, y] of the predicted image can be derived by the following equation using the reference pixel value p [x, y] and the size nS of the target PU.

predSamples[ x, y ] = (
( nS - 1 - x ) * p[ -1, y ] + ( x + 1 ) * p[ nS, -1 ] +
( nS - 1 - y ) * p[ x ,-1 ] + ( y + 1 ) * p[ -1, nS ] + nS ) >> ( k + 1 )
ここで、x, y = 0..nS-1であり、 k = log2( nS )と定義される。
predSamples [x, y] = (
(nS-1-x) * p [-1, y] + (x + 1) * p [nS, -1] +
(nS-1-y) * p [x, -1] + (y + 1) * p [-1, nS] + nS) >> (k + 1)
Here, x, y = 0..nS-1 and it is defined as k = log2 (nS).

水平予測部1452Hは、対象PUの左辺隣接画素を水平方向に外挿して得られる予測画像を入力される参照画素に基づいて生成し、結果を予測画像として出力する。   The horizontal prediction unit 1452H generates a predicted image obtained by extrapolating the left side adjacent pixels of the target PU in the horizontal direction based on the input reference pixels, and outputs the result as a predicted image.

垂直予測部1452Vは、対象PUの上辺隣接画素を鉛直方向に外挿して得られる予測画像を入力される参照画素に基づいて生成し、結果を予測画像として出力する。   The vertical prediction unit 1452V generates a predicted image obtained by extrapolating the upper side adjacent pixels of the target PU in the vertical direction based on the input reference pixels, and outputs the result as a predicted image.

予測方向導出部1453は、入力される予測モードが方向予測モードである場合、当該予測モードに関連付けられる予測方向(参照方向)を決定して出力する。出力される予測方向は、主方向が垂直方向か否かを表す主方向フラグbRefVer、および、予測方向の主方向に対する勾配(オフセット)intraPredAngleの組み合わせで表現される。主方向フラグbRefVerの値が0である場合、主方向が水平方向であることを示し、値が1の場合、主方向が垂直方向であることを示す。   When the input prediction mode is the direction prediction mode, the prediction direction deriving unit 1453 determines and outputs a prediction direction (reference direction) associated with the prediction mode. The output prediction direction is expressed by a combination of a main direction flag bRefVer indicating whether or not the main direction is a vertical direction and a gradient (offset) intraPredAngle of the prediction direction with respect to the main direction. When the value of the main direction flag bRefVer is 0, the main direction is the horizontal direction, and when the value is 1, the main direction is the vertical direction.

図1を用いて、予測方向導出部1453の具体的構成について説明すると次のとおりである。図1は、予測方向導出部1453の一構成例を示す機能ブロック図である。図1に示すように、予測方向導出部1453は、より具体的には、主方向導出部1453Aおよび勾配導出部1453Bを備える。   A specific configuration of the prediction direction deriving unit 1453 will be described with reference to FIG. FIG. 1 is a functional block diagram illustrating a configuration example of the prediction direction deriving unit 1453. As shown in FIG. 1, more specifically, the prediction direction deriving unit 1453 includes a main direction deriving unit 1453A and a gradient deriving unit 1453B.

主方向導出部1453Aは、主方向フラグbRefVerを導出する。また、主方向導出部1453Aは、図6の予測モード定義DEFPM1を参照することができる。主方向フラグbRefVerは、予測モード番号mに対応づけられる主方向に基づいて導出される。   The main direction deriving unit 1453A derives a main direction flag bRefVer. Further, the main direction deriving unit 1453A can refer to the prediction mode definition DEFPM1 of FIG. The main direction flag bRefVer is derived based on the main direction associated with the prediction mode number m.

勾配導出部1453Bは、勾配intraPredAngleを導出する。また、勾配導出部1453Bは、図13に示す勾配定義テーブルDEFANG1を参照することができる。図13に示す勾配定義テーブルDEFANG1は、予測モード識別子と勾配intraPredAngleとの値の対応関係を示すテーブルである。勾配導出部1453Bは、勾配定義テーブルDEFANG1に基づいて、勾配intraPredAngleを導出してもよい。勾配intraPredAngleの値は、予測方向の勾配を表す値である。より正確には、主方向が垂直方向である場合、(intraPredAngle,−32)で表現されるベクトルの方向が予測方向となる。主方向が水平方向である場合、(−32,intraPredAngle)で表現されるベクトルの方向が予測方向となる。図13に示す勾配定義テーブルDEFANG1よると、主方向に対する変位の絶対値0〜8に対応する勾配intraPredAngleの絶対値は、輝度領域の場合には順に0、2、5、9、13、17、21、26、32となる。主方向に対する変位の符号と勾配intraPredAngleの符号は等しい。例えば、識別子HOR−1に対応する勾配intraPredAngleの値は輝度領域の場合には−2となる。   The gradient deriving unit 1453B derives the gradient intraPredAngle. Further, the gradient deriving unit 1453B can refer to the gradient definition table DEFANG1 shown in FIG. The gradient definition table DEFANG1 shown in FIG. 13 is a table showing the correspondence between the prediction mode identifier and the value of the gradient intraPredAngle. The gradient deriving unit 1453B may derive the gradient intraPredAngle based on the gradient definition table DEFANG1. The value of the gradient intraPredAngle is a value representing the gradient in the prediction direction. More precisely, when the main direction is the vertical direction, the direction of the vector represented by (intraPredAngle, -32) is the prediction direction. When the main direction is the horizontal direction, the vector direction represented by (−32, intraPredAngle) is the prediction direction. According to the gradient definition table DEFANG1 shown in FIG. 13, the absolute value of the gradient intraPredAngle corresponding to the absolute values 0 to 8 of the displacement with respect to the main direction is 0, 2, 5, 9, 13, 17, 21, 26, 32. The sign of displacement with respect to the main direction and the sign of gradient intraPredAngle are equal. For example, the value of the gradient intraPredAngle corresponding to the identifier HOR-1 is −2 in the luminance region.

また、勾配導出部1453Bは、予測画像生成対象が色差画素の場合には、図16に示す色差勾配定義テーブルDEFANG1Cも参照することができる。予測画像生成対象が色差画素の場合における勾配導出部1453Bの処理については後述する。   The gradient deriving unit 1453B can also refer to the color difference gradient definition table DEFANG1C shown in FIG. 16 when the prediction image generation target is a color difference pixel. The processing of the gradient deriving unit 1453B when the predicted image generation target is a color difference pixel will be described later.

Angular予測部1452Aは、入力される予測方向(参照方向)の参照画素を用いて対象PU内に対応する予測画像を生成して出力する。Angular予測による予測画像の生成処理では、主方向フラグbRefVerの値に応じて主参照画素を設定し、予測画像をPU内のラインまたはコラムの単位で主参照画素を参照して生成する。主方向フラグbRefVerの値が1(主方向が垂直方向)の場合、予測画像の生成単位をラインに設定するとともに対象PUの上方の参照画素を主参照画素に設定する。具体的には次式により参照画素p[x,y]の値を用いて主参照画素refMain[x]が設定される。   The Angular prediction unit 1452A generates and outputs a predicted image corresponding to the target PU using the reference pixels in the input prediction direction (reference direction). In the process of generating a predicted image by Angular prediction, a main reference pixel is set according to the value of the main direction flag bRefVer, and a predicted image is generated by referring to the main reference pixel in units of lines or columns in the PU. When the value of the main direction flag bRefVer is 1 (the main direction is the vertical direction), the prediction image generation unit is set to a line, and the reference pixel above the target PU is set to the main reference pixel. Specifically, the main reference pixel refMain [x] is set using the value of the reference pixel p [x, y] by the following equation.

refMain[x] = p[ -1+x, -1 ], with x=0..2*nS
refMain[x] = p[ -1, -1+( ( x*invAngle+128 )>>8 ) ], with x=-nS..-1
なお、ここでinvAngleは予測方向の変位intraPredAngleの逆数をスケール(8192を乗算)した値に相当する。上記の式により、xが0以上の範囲では、refMain[x]の値は対象PUの上辺に隣接する画素の復号画素値が設定される。また、xが0未満の範囲では、refMain[x]の値として、対象PUの左辺に隣接する画素の復号画素値が、予測方向に基づき導出される位置に設定される。予測画像predSamples[x,y]は次式により計算される。
refMain [x] = p [-1 + x, -1], with x = 0..2 * nS
refMain [x] = p [-1, -1+ ((x * invAngle + 128) >> 8)], with x = -nS ..- 1
Here, invAngle corresponds to a value obtained by scaling (multiplying by 8192) the reciprocal of the displacement intraPredAngle in the prediction direction. According to the above formula, in the range where x is 0 or more, the decoded pixel value of the pixel adjacent to the upper side of the target PU is set as the value of refMain [x]. In the range where x is less than 0, the decoded pixel value of the pixel adjacent to the left side of the target PU is set as a value derived from the prediction direction as the value of refMain [x]. The predicted image predSamples [x, y] is calculated by the following equation.

predSamples[x,y] =
((32-iFact)*refMain[x+iIdx+1] + iFact*refMain[x+iIdx+2] + 16) >> 5
ここで、iIdxとiFactは、予測対象ラインと主参照画素の距離(y+1)と勾配intraPredAngleに応じて計算される予測対象画素の生成に用いる主参照画素の位置を表す。iIdxは画素単位における整数精度の位置、iFactは画素単位における小数精度の位置に相当し、以下の式で導出される。
predSamples [x, y] =
((32-iFact) * refMain [x + iIdx + 1] + iFact * refMain [x + iIdx + 2] + 16) >> 5
Here, iIdx and iFact represent the position of the main reference pixel used for generating the prediction target pixel calculated according to the distance (y + 1) between the prediction target line and the main reference pixel and the gradient intraPredAngle. iIdx corresponds to the position of integer precision in pixel units, and iFact corresponds to the position of decimal precision in pixel units, and is derived by the following equation.

iIdx = ( ( y + 1 )*intraPredAngle ) >> 5
iFact = ( ( y + 1 )*intraPredAngle ) && 31
主方向フラグbRefVerの値が0(主方向が水平方向)の場合、予測画像の生成単位をコラムに設定するとともに対象PUの左側の参照画素を主参照画素に設定する。具体的には次式により参照画素p[x,y]の値を用いて主参照画素refMain[x]が設定される。
iIdx = ((y + 1) * intraPredAngle) >> 5
iFact = ((y + 1) * intraPredAngle) && 31
When the value of the main direction flag bRefVer is 0 (the main direction is the horizontal direction), the prediction image generation unit is set to a column, and the left reference pixel of the target PU is set to the main reference pixel. Specifically, the main reference pixel refMain [x] is set using the value of the reference pixel p [x, y] by the following equation.

refMain[ x ] = p[ -1, -1+x ], with x=0..nS
refMain[ x ] = p[ -1+( ( x*invAngle+128 )>>8 ), -1 ], with x=-nS..-1
予測画像predSamples[x,y]は次式により計算される。
refMain [x] = p [-1, -1 + x], with x = 0..nS
refMain [x] = p [-1+ ((x * invAngle + 128) >> 8), -1], with x = -nS ..- 1
The predicted image predSamples [x, y] is calculated by the following equation.

predSamples[x,y] =
((32-iFact)*refMain[y+iIdx+1] + iFact*refMain[y+iIdx+2] + 16) >> 5
ここで、iIdxとiFactは、予測対象コラムと主参照画素の距離(x+1)と勾配intraPredAngleに応じて計算される予測参照画素の生成に用いる主参照画素の位置を表す。iIdxは画素単位における整数精度の位置、iFactは画素単位における少数精度の位置に相当し、以下の式で導出される。
predSamples [x, y] =
((32-iFact) * refMain [y + iIdx + 1] + iFact * refMain [y + iIdx + 2] + 16) >> 5
Here, iIdx and iFact represent the position of the main reference pixel used for generating the prediction reference pixel calculated according to the distance (x + 1) between the prediction target column and the main reference pixel and the gradient intraPredAngle. iIdx corresponds to an integer-precision position in pixel units, and iFact corresponds to a decimal-precision position in pixel units.

iIdx = ( ( x + 1 )*intraPredAngle ) >> 5
iFact = ( ( x + 1 )*intraPredAngle ) & 31
ここで、‘&’は論理積のビット演算を表す演算子であり、“A&31”の結果は、整数Aを32で除算した余りを意味する。
(Angular予測処理の流れ)
次に、予測モードがAngular予測である場合の輝度予測部145における予測画像生成処理について、図14のフローチャートを用いて説明する。図14は、輝度予測部におけるAngular予測処理を示すフローチャートである。まず、予測方式選択部1451に入力された予測モードがAngular予測である場合、Angular予測による予測画像生成処理が開始される。予測方向導出部1453は、入力される予測モードに基づいて予測方向の主方向を決定してAngular予測部1452Aに出力する(S21)。次に、予測方向導出部1453は、入力される予測モードに基づいて予測方向の主方向に対するオフセットintraPredAngleを決定してAngular予測部1452Aに出力する(S22)。Angular予測部1452Aは、入力された主方向に基づいて主参照画素を設定する(S23)。続いて、Angular予測部1452Aは予測対象ラインまたはコラムを設定し(S24)、対象ラインまたはコラムに対する予測画像を生成する(S25)。対象PUの全ライン/コラムの予測画像生成が完了しているかどうかを確認し(S26)、完了していない場合(S26でNO)、S24の処理を実行する。完了している場合(S26でYES)、対象PUの予測画像を出力して処理を終了する。
(色差予測部の詳細)
続いて、図15を用いて、色差予測部146の詳細について説明する。図15に色差予測部146の詳細構成を示す。色差予測部146は、予測方式選択部1451、予測画像導出部1452、および、予測方向導出部1453を備える。予測画像導出部1452は、DC予測部1452D、Planar予測部1452P、水平予測部1452H、垂直予測部1452V、Angular予測部1452A、およびLM予測部1452Lを備える。なお、LM予測部1452L以外の構成要素は、輝度予測部145に含まれる対応する構成要素と同じ機能を有するため、同じ符号を付与して説明を省略する。ただし、予測方向導出部1453に含まれる、勾配導出部1453Bについては、色差画像に対して輝度画像と異なる動作をするため、ここで説明する。
iIdx = ((x + 1) * intraPredAngle) >> 5
iFact = ((x + 1) * intraPredAngle) & 31
Here, “&” is an operator representing a logical bit operation, and the result of “A & 31” means a remainder obtained by dividing the integer A by 32.
(Angular prediction process flow)
Next, a prediction image generation process in the luminance prediction unit 145 when the prediction mode is Angular prediction will be described with reference to the flowchart of FIG. FIG. 14 is a flowchart showing the Angular prediction process in the luminance prediction unit. First, when the prediction mode input to the prediction method selection part 1451 is Angular prediction, the prediction image generation process by Angular prediction is started. The prediction direction deriving unit 1453 determines the main direction of the prediction direction based on the input prediction mode, and outputs it to the Angular prediction unit 1452A (S21). Next, the prediction direction deriving unit 1453 determines an offset intraPredAngle with respect to the main direction of the prediction direction based on the input prediction mode, and outputs it to the Angular prediction unit 1452A (S22). The Angular prediction unit 1452A sets a main reference pixel based on the input main direction (S23). Subsequently, the Angular prediction unit 1452A sets a prediction target line or column (S24), and generates a prediction image for the target line or column (S25). It is confirmed whether predicted image generation for all lines / columns of the target PU has been completed (S26). If not completed (NO in S26), the process of S24 is executed. If completed (YES in S26), the prediction image of the target PU is output and the process is terminated.
(Details of color difference prediction unit)
Next, details of the color difference prediction unit 146 will be described with reference to FIG. FIG. 15 shows a detailed configuration of the color difference prediction unit 146. The color difference prediction unit 146 includes a prediction method selection unit 1451, a predicted image derivation unit 1452, and a prediction direction derivation unit 1453. The predicted image derivation unit 1452 includes a DC prediction unit 1452D, a Planar prediction unit 1452P, a horizontal prediction unit 1452H, a vertical prediction unit 1452V, an Angular prediction unit 1452A, and an LM prediction unit 1452L. Note that the constituent elements other than the LM prediction unit 1452L have the same functions as the corresponding constituent elements included in the luminance prediction unit 145, and thus the same reference numerals are given and description thereof is omitted. However, since the gradient deriving unit 1453B included in the prediction direction deriving unit 1453 operates differently from the luminance image with respect to the color difference image, it will be described here.

勾配導出部1453Bは、予測画像生成対象が色差画素である場合、勾配定義テーブルとして、図16に示す色差勾配定義テーブルDEFANG1Cを用いる。図16に示す勾配定義テーブルDEFANG1Cよると、主方向に対する変位の絶対値0〜8に対応する勾配intraPredAngleの絶対値は、主方向が垂直方向の場合には順に0、1、2、4、6、8、10、13、16となり、主方向が水平方向の場合には順に0、4、10、18、26、34、42、52、64となる。図16に示す色差勾配定義テーブルDEFANG1Cでは、主方向が垂直方向の場合には、図13に示す勾配定義テーブルDEFANG1において同一のIntraPredModeに対応づけられたintraPredAngleの値の半分の値(整数未満切り捨て)であり、主方向が水平方向の場合には、図13に示す勾配定義テーブルDEFANG1において同一のIntraPredModeに対応づけられたintraPredAngleの値の2倍である。   When the predicted image generation target is a color difference pixel, the gradient deriving unit 1453B uses the color difference gradient definition table DEFANG1C shown in FIG. 16 as the gradient definition table. According to the gradient definition table DEFANG1C shown in FIG. 16, the absolute values of the gradient intraPredAngle corresponding to the absolute values 0 to 8 of the displacement with respect to the main direction are 0, 1, 2, 4, 6 in order when the main direction is the vertical direction. , 8, 10, 13, 16, and when the main direction is the horizontal direction, 0, 4, 10, 18, 26, 34, 42, 52, 64 in order. In the color difference gradient definition table DEFANG1C shown in FIG. 16, when the main direction is the vertical direction, half the value of intraPredAngle associated with the same IntraPredMode in the gradient definition table DEFANG1 shown in FIG. When the main direction is the horizontal direction, it is twice the value of intraPredAngle associated with the same IntraPredMode in the gradient definition table DEFANG1 shown in FIG.

なお、勾配導出部1453Bは、図13に示す色差勾配定義テーブルDEFANG1のみを参照し、予測画像生成対象が色差画素である場合には、主方向が垂直方向であれば図15に示す勾配定義テーブルDEFANG1を参照して得た値を2で割った値、主方向が水平方向であれば図13に示す勾配定義テーブルDEFANG1を参照して得た値を2倍した値をintraPredAngleとして用いれば、同一の処理が実現できる。このとき図16に示す色差勾配定義テーブルDEFANG1Cの定義および選択的な参照は不要であり、メモリを節約することができる。   Note that the gradient deriving unit 1453B refers only to the color difference gradient definition table DEFANG1 shown in FIG. 13, and when the predicted image generation target is a color difference pixel, if the main direction is the vertical direction, the gradient definition table shown in FIG. If the value obtained by referring to DEFANG1 is divided by 2, and if the main direction is horizontal, the value obtained by doubling the value obtained by referring to the gradient definition table DEFANG1 shown in FIG. 13 is used as intraPredAngle. Can be realized. At this time, the definition and selective reference of the color difference gradient definition table DEFANG1C shown in FIG. 16 are unnecessary, and the memory can be saved.

また、上記の輝度と色差の間の勾配intraPredAngleの値の関係は、4:2:2フォーマットの画像において、輝度空間でのベクトル(vxL,vyL)と色差空間でのベクトル(vxC,vyC)の間に、vxL=2vxC、vyL=vyCの関係があることに基づく。色差空間におけるベクトル(vxC,vyC)の水平方向の勾配は(vyC/vxC)=2(vyL/vxL)であり、輝度空間におけるベクトルの水平方向の勾配の2倍となる。一方、色差空間におけるベクトル(vxC,vyC)の垂直方向の勾配は(vxC/vyC)=0.5(vxL/vyL)であり、輝度空間におけるベクトルの垂直方向の勾配の半分となる。一般に、入力画像において、輝度空間でのベクトル(vxL,vyL)と色差空間でのベクトル(vxC,vyC)の間に、vxL=α・vxC、vyL=β・vyCの関係がある場合には、色差に適用する勾配intraPredAngleの値は、輝度に適用する勾配intraPredAngleの値に対して、主方向が水平方向の場合は(α/β)倍、主方向が垂直方向の場合は(β/α)倍にすることが好ましい。   In addition, the relationship of the value of the gradient intraPredAngle between the luminance and the color difference is as follows: in the 4: 2: 2 format image, the vector (vxL, vyL) in the luminance space and the vector (vxC, vyC) in the color difference space Based on the relationship of vxL = 2vxC and vyL = vyC between them. The horizontal gradient of the vector (vxC, vyC) in the color difference space is (vyC / vxC) = 2 (vyL / vxL), which is twice the horizontal gradient of the vector in the luminance space. On the other hand, the vertical gradient of the vector (vxC, vyC) in the color difference space is (vxC / vyC) = 0.5 (vxL / vyL), which is half the vertical gradient of the vector in the luminance space. In general, in the input image, if there is a relationship of vxL = α ・ vxC, vyL = β ・ vyC between the vector (vxL, vyL) in the luminance space and the vector (vxC, vyC) in the color difference space, The value of the gradient intraPredAngle applied to the color difference is (α / β) times when the main direction is horizontal and (β / α) when the main direction is vertical compared to the value of the gradient intraPredAngle applied to the luminance. It is preferable to double.

LM予測部1452Lは、対象PU内における輝度画素値と色差画素値の相関に係るパラメータを対象PU周辺の輝度復号画素値と、参照画素値(色差復号画素値)の相関に基づいて推定する。相関パラメータは相関係数aとオフセットbを含む。予測対象PU、すなわち色差の予測画像predSamuplesC[xC,yC]は、対象PUに対応する輝度復号画像の画素値recY[xL,yL]と相関パラメータを用いて次式により計算される。   The LM prediction unit 1452L estimates a parameter related to the correlation between the luminance pixel value and the chrominance pixel value in the target PU based on the correlation between the luminance decoded pixel value around the target PU and the reference pixel value (color difference decoded pixel value). The correlation parameter includes a correlation coefficient a and an offset b. The prediction target PU, that is, the color difference prediction image predSamuplesC [xC, yC] is calculated by the following equation using the pixel value recY [xL, yL] of the luminance decoded image corresponding to the target PU and the correlation parameter.

predSamplesC[xC,yC] = a * recY[xL,yL] + b
ここで、xC,yCは色差画素単位の座標値であり、xL,yLは、それぞれxC,yCと対応する位置を示す輝度画素単位の座標値である。4:2:2のYUVフォーマットである場合、例えば xL = 2 * xC および yL = yC と対応づける。
predSamplesC [xC, yC] = a * recY [xL, yL] + b
Here, xC and yC are coordinate values in color difference pixel units, and xL and yL are coordinate values in luminance pixel units indicating positions corresponding to xC and yC, respectively. When the 4: 2: 2 YUV format is used, for example, xL = 2 * xC and yL = yC are associated.

以上で予測画像生成部14における対象CUの予測画像生成処理の説明を終える。   This is the end of the description of the prediction image generation processing of the target CU in the prediction image generation unit 14.

(可変長復号部の詳細)
次に、図17を用いて可変長復号部11の構成についてさらに詳しく説明する。図17は、可変長復号部11の構成例について示す機能ブロック図である。なお、図17では、可変長復号部11の構成のうち、予測モードを復号する構成について詳細に示している。
(Details of variable length decoding unit)
Next, the configuration of the variable length decoding unit 11 will be described in more detail with reference to FIG. FIG. 17 is a functional block diagram illustrating a configuration example of the variable length decoding unit 11. In FIG. 17, the configuration for decoding the prediction mode among the configurations of the variable length decoding unit 11 is shown in detail.

図17に示すように、可変長復号部11は、予測セット決定部111、MPM導出部112、MPM判定部113、予測モード復元部114、色差予測モード復元部116、およびコンテキスト記憶部117を備える。   As shown in FIG. 17, the variable length decoding unit 11 includes a prediction set determination unit 111, an MPM derivation unit 112, an MPM determination unit 113, a prediction mode restoration unit 114, a color difference prediction mode restoration unit 116, and a context storage unit 117. .

予測セット決定部111は、予測処理に用いる予測モードの集合である予測セットを決定する。予測セット決定部111は、一例として、対象ブロックのサイズに応じて予測処理に用いる予測モードの数を算出し、予測モードの定義から、算出した数だけ予測モードを選択することで予測セットを決定する。言い換えれば、予測セットは、対象ブロックのサイズごと、あるいは対象PUにおいて利用可能な予測モードの数ごとに定義されている。   The prediction set determination unit 111 determines a prediction set that is a set of prediction modes used for prediction processing. For example, the prediction set determination unit 111 calculates the number of prediction modes used for prediction processing according to the size of the target block, and determines the prediction set by selecting the calculated number of prediction modes from the prediction mode definition. To do. In other words, the prediction set is defined for each size of the target block or for each number of prediction modes available in the target PU.

MPM導出部112は、対象パーティションの周辺のパーティションに割り付けられた予測モードに基づいてMPMを導出する。   The MPM deriving unit 112 derives the MPM based on the prediction mode assigned to the partitions around the target partition.

MPM導出部112は、例示的に、2つのMPMを導出する。MPM導出部112は、第1のMPM候補(以下、MPM0と表記する)および第2のMPM候補(以下、MPM1と表記する)を、それぞれ以下のとおり導出する。   For example, the MPM deriving unit 112 derives two MPMs. The MPM deriving unit 112 derives a first MPM candidate (hereinafter referred to as MPM0) and a second MPM candidate (hereinafter referred to as MPM1) as follows.

まず、図18に示すように、pmAに対象PU:Rの左に隣接する左隣接PU:Nの予測モード、pmBに対象PU:Rの上に隣接する上隣接PU:Nの予測モードを設定する。左隣接PUまたは上隣接PUの予測モードが利用不可の場合、既定の予測モード、例えば“Intra_Planar”を設定する。隣接PUが利用不可の場合には、隣接PUの予測モードが未復号の場合、隣接PUが上隣接PUであって異なるLCU(ツリーブロック)に属する場合が含まれる。 First, as shown in FIG. 18, the object to PMA PU: Left neighboring adjacent to the left of R T PU: prediction mode N A, subject to PMB PU: adjacent on adjacent on the R T PU: the N B Set the prediction mode. When the prediction mode of the left adjacent PU or the upper adjacent PU is not available, a default prediction mode, for example, “Intra_Planar” is set. The case where the adjacent PU is unavailable includes a case where the prediction mode of the adjacent PU is not decoded, and the case where the adjacent PU is an upper adjacent PU and belongs to a different LCU (tree block).

そして、MPM導出部112は、MPM0を、次の式(1)に従って導出する。   Then, the MPM deriving unit 112 derives MPM0 according to the following equation (1).

MPM0 = pmA … (1)
次に、MPM導出部112は、MPM1を、pmAとpmBが一致するか否かに応じて導出する。pmAとpmBが一致しない場合、MPM1を次の式(2)に従って導出する。
MPM0 = pmA (1)
Next, the MPM deriving unit 112 derives MPM1 depending on whether pmA and pmB match. If pmA and pmB do not match, MPM1 is derived according to the following equation (2).

MPM1 = pmB … (2)
一方、pmAと、pmBとが一致する場合、MPM導出部112は、pmAが“Intra_DC”ならば、“Intra_Planar”をMPM1に設定し、pmAが“Intra_DC”以外であれば、“Intra_DC”をMPM1に設定する。
MPM1 = pmB (2)
On the other hand, if pmA and pmB match, the MPM deriving unit 112 sets “Intra_Planar” to MPM1 if pmA is “Intra_DC”, and sets “Intra_DC” to MPM1 if pmA is other than “Intra_DC”. Set to.

MPM判定部113は、符号化データに含まれるmpm_flagに基づいて、対象PUの予測モードが、推定予測モードMPMと一致しているか否かを判定する。mpm_flagは、対象PUの予測モードが推定予測モードMPMと一致している場合、“1”であり、対象PUの予測モードが推定予測モードMPMと一致していない場合、“0”である。MPM判定部113は、判定結果を、予測モード復元部114に通知する。   The MPM determination unit 113 determines whether or not the prediction mode of the target PU matches the estimated prediction mode MPM based on mpm_flag included in the encoded data. mpm_flag is “1” when the prediction mode of the target PU matches the estimated prediction mode MPM, and “0” when the prediction mode of the target PU does not match the estimated prediction mode MPM. The MPM determination unit 113 notifies the prediction mode restoration unit 114 of the determination result.

なお、MPM判定部113は、コンテキスト記憶部117に記憶されているコンテキストに応じて、符号化データからmpm_flagを復号する。   The MPM determination unit 113 decodes mpm_flag from the encoded data in accordance with the context stored in the context storage unit 117.

予測モード復元部114は、対象PUについての予測モードを復元する。予測モード復元部114は、MPM判定部113から通知される判定結果に応じて、予測モードを復元する。   The prediction mode restoration unit 114 restores the prediction mode for the target PU. The prediction mode restoration unit 114 restores the prediction mode according to the determination result notified from the MPM determination unit 113.

対象PUの予測モードが推定予測モードMPMと一致している場合、予測モード復元部114は、符号化データからmpm_idxを復号し、その値に基づいて予測モードを復元する。mpm_idxは、対象PUの予測モードが、MPM0と一致する場合、“0”であり、対象PUの予測モードが、MPM1と一致する場合、“1”である。   When the prediction mode of the target PU matches the estimated prediction mode MPM, the prediction mode restoration unit 114 decodes mpm_idx from the encoded data, and restores the prediction mode based on the value. mpm_idx is “0” when the prediction mode of the target PU matches MPM0, and “1” when the prediction mode of the target PU matches MPM1.

対象PUの予測モードが推定予測モードMPMと一致していない場合、予測モード復元部114は、符号化データに含まれるrem_idxに基づいて予測モードを復元する。具体的には、まず、MPM0とMPM1のうち、小さい予測モード番号がMPM0に割り当てられるようMPM0とMPM1の値を条件付きでスワップする。次に、rem_idxの値がMPM0の値以上の場合、rem_idxの値を1加算する。次に、rem_idxの値がMPM1の値以上の場合、rem_idxの値を1加算する。最後に、rem_idxの値の予測モード番号に対応する予測モードを復元する。   When the prediction mode of the target PU does not match the estimated prediction mode MPM, the prediction mode restoration unit 114 restores the prediction mode based on rem_idx included in the encoded data. Specifically, first, the values of MPM0 and MPM1 are conditionally swapped so that a smaller prediction mode number of MPM0 and MPM1 is assigned to MPM0. Next, when the value of rem_idx is equal to or greater than the value of MPM0, 1 is added to the value of rem_idx. Next, when the value of rem_idx is equal to or greater than the value of MPM1, 1 is added to the value of rem_idx. Finally, the prediction mode corresponding to the prediction mode number of the value of rem_idx is restored.

色差予測モード復元部116は、対象PUについての色差予測モードを復元する。より詳細には、色差予測モード復元部116は、以下のようにして色差予測モードを復元する。   The color difference prediction mode restoration unit 116 restores the color difference prediction mode for the target PU. More specifically, the color difference prediction mode restoration unit 116 restores the color difference prediction mode as follows.

まず、色差予測モード復元部116は、符号化データ#1に含まれるイントラ色差予測モード指定情報chroma_mode(intra_chroma_pred_mode)を復号する。そして、色差予測モード復元部116は、復元したイントラ色差予測モード指定情報chroma_modeと、輝度の予測モード(IntraPredMode[xB][yB])とに基づいて、色差予測モードを復元する。これについて、以下で詳細に説明する。   First, the color difference prediction mode restoring unit 116 decodes intra color difference prediction mode designation information chroma_mode (intra_chroma_pred_mode) included in the encoded data # 1. Then, the color difference prediction mode restoration unit 116 restores the color difference prediction mode based on the restored intra color difference prediction mode designation information chroma_mode and the luminance prediction mode (IntraPredMode [xB] [yB]). This will be described in detail below.

図19は、イントラ色差予測モード指定情報chroma_modeおよび輝度の予測モード(IntraPredMode[xB][yB])と、色差予測モード(IntraPredModeC)の対応付けを定義したテーブルである。テーブル中、“LM”は既に説明したLMモードを用いることを示している。また、“X”は、輝度の予測モード(IntraPredMode[xB][yB])の値をそのまま用いることを示している。ここでは、“X”に該当する予測モードをDMモードと呼ぶ。   FIG. 19 is a table in which the intra color difference prediction mode designation information chroma_mode and the luminance prediction mode (IntraPredMode [xB] [yB]) are associated with the color difference prediction mode (IntraPredModeC). In the table, “LM” indicates that the LM mode already described is used. “X” indicates that the value of the luminance prediction mode (IntraPredMode [xB] [yB]) is used as it is. Here, the prediction mode corresponding to “X” is referred to as a DM mode.

[概略的な流れ]
まず、図20に示すフローチャートを用いて、動画像復号装置1における予測モード復元処理の概略的な流れの一例について説明する。
[Schematic flow]
First, an example of a schematic flow of a prediction mode restoration process in the video decoding device 1 will be described with reference to a flowchart shown in FIG.

動画像復号装置1において予測モード復元処理が開始されると、MPM導出部112が、MPM0を導出する(S21)。続いてMPM導出部112が、MPM1を導出する(S22)。   When the prediction mode restoration process is started in the video decoding device 1, the MPM deriving unit 112 derives MPM0 (S21). Subsequently, the MPM deriving unit 112 derives MPM1 (S22).

次に、MPM判定部113が、mpm_flagに基づいて、対象PUの予測モードが推定予測モードMPMと一致しているか否かを判定する(S23)。   Next, the MPM determination unit 113 determines whether or not the prediction mode of the target PU matches the estimated prediction mode MPM based on mpm_flag (S23).

対象PUの予測モードが推定予測モードMPM、すなわちMPM0またはMPM1と一致している場合(S23においてYES)、予測モード復元部114が、mpm_idxに基づいて予測モードを復元する。予測モード復元部114は、mpm_idxが“0”であれば、MPM0を、対象PUの予測モードpmTとする一方で、mpm_idxが“1”であれば、MPM1を、対象PUの予測モードpmTとする(S24)。   When the prediction mode of the target PU matches the estimated prediction mode MPM, that is, MPM0 or MPM1 (YES in S23), the prediction mode restoration unit 114 restores the prediction mode based on mpm_idx. When mpm_idx is “0”, the prediction mode restoration unit 114 sets MPM0 as the prediction mode pmT of the target PU, while when mpm_idx is “1”, sets MPM1 as the prediction mode pmT of the target PU. (S24).

一方、対象PUの予測モードが推定予測モードMPMと一致していない場合(S23においてNO)、予測モード復元部114は、MPM0とMPM1を比較し、MPM1の予測モード番号がMPM0の予測モード番号より小さければ、MPM0とMPM1をスワップする(S25)。続いて、予測モード復元部114は、rem_modeの配列を生成する(S26)。最後に、予測モード復元部114は、rem_modeの配列のうちrem_idx番目の要素を予測モードとして選択する(S27)。   On the other hand, when the prediction mode of the target PU does not match the estimated prediction mode MPM (NO in S23), the prediction mode restoration unit 114 compares MPM0 and MPM1, and the prediction mode number of MPM1 is greater than the prediction mode number of MPM0. If it is smaller, MPM0 and MPM1 are swapped (S25). Subsequently, the prediction mode restoration unit 114 generates an array of rem_mode (S26). Finally, the prediction mode restoration unit 114 selects the rem_idx-th element from the rem_mode array as the prediction mode (S27).

〔動画像符号化装置〕
以下において、本実施形態に係る動画像符号化装置2について、図21〜図23を参照して説明する。
[Moving picture encoding device]
Hereinafter, the moving picture coding apparatus 2 according to the present embodiment will be described with reference to FIGS.

(動画像符号化装置の概要)
動画像符号化装置2は、概略的に言えば、入力画像#10を符号化することによって符号化データ#1を生成し、出力する装置である。
(Outline of video encoding device)
Generally speaking, the moving image encoding device 2 is a device that generates and outputs encoded data # 1 by encoding the input image # 10.

(動画像符号化装置の構成)
まず、図21を用いて、動画像符号化装置2の構成例について説明する。図21は、動画像符号化装置2の構成について示す機能ブロック図である。図21に示すように、動画像符号化装置2は、符号化設定部21、逆量子化・逆変換部22、予測画像生成部23、加算器24、フレームメモリ25、減算器26、変換・量子化部27、および符号化データ生成部29を備えている。
(Configuration of video encoding device)
First, a configuration example of the video encoding device 2 will be described with reference to FIG. FIG. 21 is a functional block diagram showing the configuration of the moving image encoding device 2. As illustrated in FIG. 21, the moving image encoding device 2 includes an encoding setting unit 21, an inverse quantization / inverse conversion unit 22, a predicted image generation unit 23, an adder 24, a frame memory 25, a subtractor 26, a conversion / A quantization unit 27 and an encoded data generation unit 29 are provided.

符号化設定部21は、入力画像#10に基づいて、符号化に関する画像データおよび各種の設定情報を生成する。   The encoding setting unit 21 generates image data related to encoding and various setting information based on the input image # 10.

具体的には、符号化設定部21は、次の画像データおよび設定情報を生成する。   Specifically, the encoding setting unit 21 generates the next image data and setting information.

まず、符号化設定部21は、入力画像#10を、スライス単位、ツリーブロック単位、CU単位に順次分割することにより、対象CUについてのCU画像#100を生成する。   First, the encoding setting unit 21 generates the CU image # 100 for the target CU by sequentially dividing the input image # 10 into slice units, tree block units, and CU units.

また、符号化設定部21は、分割処理の結果に基づいて、ヘッダ情報H’を生成する。ヘッダ情報H’は、(1)対象スライスに属するツリーブロックのサイズ、形状および対象スライス内での位置についての情報、並びに、(2)各ツリーブロックに属するCUのサイズ、形状および対象ツリーブロック内での位置についてのCU情報CU’を含んでいる。   Also, the encoding setting unit 21 generates header information H ′ based on the result of the division process. The header information H ′ includes (1) information on the size and shape of the tree block belonging to the target slice and the position in the target slice, and (2) the size, shape and shape of the CU belonging to each tree block. CU information CU ′ for the position at

さらに、符号化設定部21は、CU画像#100、および、CU情報CU’を参照して、PT設定情報PTI’を生成する。PT設定情報PTI’には、(1)対象CUの各PUへの可能な分割パターン、および、(2)各PUに割り付ける可能な予測モード、の全ての組み合わせに関する情報が含まれる。   Further, the encoding setting unit 21 refers to the CU image # 100 and the CU information CU 'to generate PT setting information PTI'. The PT setting information PTI 'includes information on all combinations of (1) possible division patterns of the target CU for each PU and (2) prediction modes that can be assigned to each PU.

符号化設定部21は、CU画像#100を減算器26に供給する。また、符号化設定部21は、ヘッダ情報H’を符号化データ生成部29に供給する。また、符号化設定部21は、PT設定情報PTI’を予測画像生成部23に供給する。   The encoding setting unit 21 supplies the CU image # 100 to the subtractor 26. In addition, the encoding setting unit 21 supplies the header information H ′ to the encoded data generation unit 29. Also, the encoding setting unit 21 supplies the PT setting information PTI ′ to the predicted image generation unit 23.

逆量子化・逆変換部22は、変換・量子化部27より供給される、ブロック毎の量子化予測残差を、逆量子化、および、逆直交変換することによって、ブロック毎の予測残差を復元する。逆直交変換については、図1に示す逆量子化・逆変換部13について、既に説明したとおりであるので、ここではその説明を省略する。   The inverse quantization / inverse transform unit 22 performs inverse quantization and inverse orthogonal transform on the quantized prediction residual for each block supplied from the transform / quantization unit 27, thereby predicting the prediction residual for each block. To restore. The inverse orthogonal transform is as already described for the inverse quantization / inverse transform unit 13 shown in FIG.

また、逆量子化・逆変換部22は、ブロック毎の予測残差を、TT分割情報(後述)により指定される分割パターンに従って統合し、対象CUについての予測残差Dを生成する。逆量子化・逆変換部22は、生成した対象CUについての予測残差Dを、加算器24に供給する。   Further, the inverse quantization / inverse transform unit 22 integrates the prediction residual for each block according to the division pattern specified by the TT division information (described later), and generates a prediction residual D for the target CU. The inverse quantization / inverse transform unit 22 supplies the prediction residual D for the generated target CU to the adder 24.

予測画像生成部23は、フレームメモリ25に記録されている局所復号画像P’、および、PT設定情報PTI’を参照して、対象CUについての予測画像Predを生成する。予測画像生成部23は、予測画像生成処理により得られた予測パラメータを、PT設定情報PTI’に設定し、設定後のPT設定情報PTI’を符号化データ生成部29に転送する。なお、予測画像生成部23による予測画像生成処理は、動画像復号装置1の備える予測画像生成部14と同様であるので、ここでは説明を省略する。   The predicted image generation unit 23 refers to the locally decoded image P ′ and the PT setting information PTI ′ recorded in the frame memory 25 to generate a predicted image Pred for the target CU. The predicted image generation unit 23 sets the prediction parameter obtained by the predicted image generation process in the PT setting information PTI ′, and transfers the set PT setting information PTI ′ to the encoded data generation unit 29. Note that the predicted image generation process performed by the predicted image generation unit 23 is the same as that performed by the predicted image generation unit 14 included in the video decoding device 1, and thus description thereof is omitted here.

加算器24は、予測画像生成部23より供給される予測画像Predと、逆量子化・逆変換部22より供給される予測残差Dとを加算することによって、対象CUについての復号画像Pを生成する。   The adder 24 adds the predicted image Pred supplied from the predicted image generation unit 23 and the prediction residual D supplied from the inverse quantization / inverse transform unit 22 to thereby obtain the decoded image P for the target CU. Generate.

フレームメモリ25には、復号された復号画像Pが順次記録される。フレームメモリ25には、対象ツリーブロックを復号する時点において、当該対象ツリーブロックよりも先に復号された全てのツリーブロック(例えば、ラスタスキャン順で先行する全てのツリーブロック)に対応する復号画像が記録されている。   Decoded decoded images P are sequentially recorded in the frame memory 25. In the frame memory 25, decoded images corresponding to all tree blocks decoded prior to the target tree block (for example, all tree blocks preceding in the raster scan order) at the time of decoding the target tree block. It is recorded.

減算器26は、CU画像#100から予測画像Predを減算することによって、対象CUについての予測残差Dを生成する。減算器26は、生成した予測残差Dを、変換・量子化部27に供給する。   The subtractor 26 generates a prediction residual D for the target CU by subtracting the prediction image Pred from the CU image # 100. The subtractor 26 supplies the generated prediction residual D to the transform / quantization unit 27.

変換・量子化部27は、予測残差Dに対して、直交変換および量子化を行うことで量子化予測残差を生成する。なお、ここで直交変換とは、画素領域から周波数領域への変換のことをさす。また、逆直交変換の例としては、DCT変換(Discrete Cosine Transform)、およびDST変換(Discrete Sine Transform)等が挙げられる。   The transform / quantization unit 27 generates a quantized prediction residual by performing orthogonal transform and quantization on the prediction residual D. Here, the orthogonal transformation refers to transformation from the pixel region to the frequency region. Examples of inverse orthogonal transform include DCT transform (Discrete Cosine Transform), DST transform (Discrete Sine Transform), and the like.

具体的には、変換・量子化部27は、CU画像#100、および、CU情報CU’を参照し、対象CUの1または複数のブロックへの分割パターンを決定する。また、決定された分割パターンに従って、予測残差Dを、各ブロックについての予測残差に分割する。   Specifically, the transform / quantization unit 27 refers to the CU image # 100 and the CU information CU ', and determines a division pattern of the target CU into one or a plurality of blocks. Further, according to the determined division pattern, the prediction residual D is divided into prediction residuals for each block.

また、変換・量子化部27は、各ブロックについての予測残差を直交変換することによって周波数領域における予測残差を生成した後、当該周波数領域における予測残差を量子化することによってブロック毎の量子化予測残差を生成する。   The transform / quantization unit 27 generates a prediction residual in the frequency domain by orthogonally transforming the prediction residual for each block, and then quantizes the prediction residual in the frequency domain to Generate quantized prediction residuals.

また、変換・量子化部27は、生成したブロック毎の量子化予測残差と、対象CUの分割パターンを指定するTT分割情報と、対象CUの各ブロックへの可能な全分割パターンに関する情報とを含むTT設定情報TTI’を生成する。変換・量子化部27は、生成したTT設定情報TTI’を逆量子化・逆変換部22および符号化データ生成部29に供給する。   In addition, the transform / quantization unit 27 generates the quantization prediction residual for each block, TT division information that specifies the division pattern of the target CU, information about all possible division patterns for each block of the target CU, and TT setting information TTI ′ including is generated. The transform / quantization unit 27 supplies the generated TT setting information TTI ′ to the inverse quantization / inverse transform unit 22 and the encoded data generation unit 29.

符号化データ生成部29は、ヘッダ情報H’、TT設定情報TTI’、およびPT設定情報PTI’を符号化し、符号化したヘッダ情報H、TT設定情報TTI、およびPT設定情報PTIを多重化して符号化データ#1を生成し、出力する。   The encoded data generation unit 29 encodes header information H ′, TT setting information TTI ′, and PT setting information PTI ′, and multiplexes the encoded header information H, TT setting information TTI, and PT setting information PTI. Coded data # 1 is generated and output.

(符号化データ生成部の詳細)
次に、図22を用いて、符号化データ生成部29の詳細について説明する。図22は、符号化データ生成部29の構成例について示す機能ブロック図である。
(Details of encoded data generator)
Next, details of the encoded data generation unit 29 will be described with reference to FIG. FIG. 22 is a functional block diagram illustrating a configuration example of the encoded data generation unit 29.

なお、以下では、符号化データ生成部29が、TT設定情報TTI’に含まれるパラメータのうち、予測モード(輝度)および色差予測モードに関するパラメータを符号化するための構成について説明する。   Hereinafter, a configuration for the encoded data generation unit 29 to encode parameters related to the prediction mode (luminance) and the color difference prediction mode among the parameters included in the TT setting information TTI ′ will be described.

しかしながら、これに限られず符号化データ生成部29は、TT情報TTI’に含まれる変換係数以外のデータ、例えば、サイド情報等を符号化することができる。   However, the present invention is not limited to this, and the encoded data generation unit 29 can encode data other than transform coefficients included in the TT information TTI ′, for example, side information.

図22に示すように、符号化データ生成部29は、コンテキスト記憶部117、予測セット決定部291、MPM導出部292、MPM判定部293、予測モード符号化部294、および色差予測モード符号化部296を備える。   As illustrated in FIG. 22, the encoded data generation unit 29 includes a context storage unit 117, a prediction set determination unit 291, an MPM derivation unit 292, an MPM determination unit 293, a prediction mode encoding unit 294, and a color difference prediction mode encoding unit. 296.

また、例えば、MPMの導出については、動画像復号装置1および動画像符号化装置2の間で相違しない。   Further, for example, the MPM derivation is not different between the video decoding device 1 and the video encoding device 2.

このように、動画像復号装置1および動画像符号化装置2の間で対応している構成または同様の処理を行う構成については、動画像符号化装置2において、動画像復号装置1の構成を用いることができる。   As described above, the configuration of the video decoding device 1 is the same as the configuration corresponding to the video decoding device 1 and the video encoding device 2 or the configuration that performs the same processing. Can be used.

従って、予測セット決定部291、MPM導出部292は、それぞれ、図1に示したコンテキスト記憶部151、色差予測モード定義記憶部154、予測セット決定部111、およびMPM導出部112と同様である。よって、ここではその説明を省略する。   Therefore, the prediction set determination unit 291 and the MPM derivation unit 292 are the same as the context storage unit 151, the color difference prediction mode definition storage unit 154, the prediction set determination unit 111, and the MPM derivation unit 112 shown in FIG. Therefore, the description is omitted here.

以下では、MPM判定部293、予測モード符号化部294、および色差予測モード符号化部296について説明する。   Below, the MPM determination part 293, the prediction mode encoding part 294, and the color difference prediction mode encoding part 296 are demonstrated.

MPM判定部293は、MPMが予測モードと一致するか否かを判定し、判定結果に応じてmpm_flagを符号化する。符号化の処理については、図1に示した可変長復号部11について、既に説明済みであるので、ここではその説明を省略する。   The MPM determination unit 293 determines whether or not the MPM matches the prediction mode, and encodes mpm_flag according to the determination result. Since the encoding process has already been described for the variable length decoding unit 11 shown in FIG. 1, the description thereof is omitted here.

予測モード符号化部294は、MPM判定部293の判定結果に応じて、予測モードに関する情報(mpm_idx、rem_idx)を符号化する。予測モード符号化部294は、MPMを用いる場合は、mpm_idxを符号化し、MPMを用いない場合は、rem_idxを符号化する。   The prediction mode encoding unit 294 encodes information (mpm_idx, rem_idx) regarding the prediction mode according to the determination result of the MPM determination unit 293. The prediction mode encoding unit 294 encodes mpm_idx when MPM is used, and encodes rem_idx when MPM is not used.

mpm_idxの符号化については、図1に示した可変長復号部11について、既に説明済みであるので、ここではその説明を省略する。   Since the encoding of mpm_idx has already been described for the variable length decoding unit 11 shown in FIG. 1, the description thereof is omitted here.

rem_idxの符号化については後述する。   The encoding of rem_idx will be described later.

色差予測モード符号化部296は、対象PUについての色差予測モードを符号化する。より詳細には、色差予測モード符号化部296は、以下のようにして色差予測モードを符号化する。   The color difference prediction mode encoding unit 296 encodes the color difference prediction mode for the target PU. More specifically, the color difference prediction mode encoding unit 296 encodes the color difference prediction mode as follows.

まず、色差予測モード符号化部296は、輝度に対する予測モードおよび色差予測モードを用いて、イントラ色差予測モード指定情報chroma_mode(intra_chroma_pred_mode)の値を取得する。   First, the color difference prediction mode encoding unit 296 acquires the value of intra color difference prediction mode designation information chroma_mode (intra_chroma_pred_mode) using the prediction mode and the color difference prediction mode for luminance.

そして、色差予測モード符号化部296は、取得したイントラ色差予測モード指定情報chroma_modeの値を符号化する。   Then, the color difference prediction mode encoding unit 296 encodes the value of the acquired intra color difference prediction mode designation information chroma_mode.

次に、図23を用いて、動画像符号化装置2における予測モード符号化処理の流れについて説明する。   Next, the flow of the prediction mode encoding process in the moving image encoding device 2 will be described with reference to FIG.

まず、図23に示すフローチャートを用いて、動画像符号化装置2における予測モード符号化処理の概略的な流れの一例について説明する。   First, an example of a schematic flow of a prediction mode encoding process in the video encoding device 2 will be described with reference to a flowchart shown in FIG.

動画像符号化装置2において予測モード符号化処理が開始されると、MPM導出部292が、MPM0を導出する(S31)。続いて、MPM導出部292が、MPM1を導出する(S32)。   When the prediction mode encoding process is started in the moving image encoding device 2, the MPM deriving unit 292 derives MPM0 (S31). Subsequently, the MPM deriving unit 292 derives MPM1 (S32).

次に、MPM判定部293が、予測モードと、MPM(MPM0またはMPM1)とが一致しているか否かを判定する(S33)。   Next, the MPM determination unit 293 determines whether or not the prediction mode matches the MPM (MPM0 or MPM1) (S33).

ここで、予測モードと、MPMとが一致している場合(S33においてYES)、MPM判定部293が、mpm_flag=1を符号化する(S34)とともに、予測モード符号化部294が、MPM0およびMPM1のうち、予測モードと一致している方について、mpm_idxを導出する(S35)。   Here, when the prediction mode and the MPM match (YES in S33), the MPM determination unit 293 encodes mpm_flag = 1 (S34), and the prediction mode encoding unit 294 includes MPM0 and MPM1. Of these, mpm_idx is derived for the one that matches the prediction mode (S35).

一方、予測モードと、MPMとが一致していない場合(S33においてNO)、MPM判定部293が、mpm_flag=0を符号化する(S36)。予測モード符号化部294は、MPM0とMPM1を比較し、MPM1の予測モード番号がMPM0の予測モード番号より小さければ、MPM0とMPM1をスワップする(S37)。続いて、予測モード符号化部294は、rem_modeの配列を生成する(S38)。最後に、予測モード符号化部294が、rem_idxを導出する(S39)。   On the other hand, when the prediction mode and the MPM do not match (NO in S33), the MPM determination unit 293 encodes mpm_flag = 0 (S36). The prediction mode encoding unit 294 compares MPM0 and MPM1, and if the prediction mode number of MPM1 is smaller than the prediction mode number of MPM0, swaps MPM0 and MPM1 (S37). Subsequently, the prediction mode encoding unit 294 generates an array of rem_mode (S38). Finally, the prediction mode encoding unit 294 derives rem_idx (S39).

(作用・効果)
以上に示したように、動画像復号装置1は、4:2:2のYUVフォーマットの画像データを復号し、予測モードに対応付けられたイントラ予測方式により予測画像を生成する動画像復号装置1において、Angular予測の輝度予測モードを色差予測モードとして再利用する際に、輝度画素と色差画素の画素アスペクト比の差異に基づいて輝度画像における予測方向を補正して色差画像における予測方向を導出する予測方向導出部を備える構成である。
(Action / Effect)
As described above, the moving image decoding apparatus 1 decodes image data in 4: 2: 2 YUV format and generates a predicted image by an intra prediction method associated with the prediction mode. When reusing the luminance prediction mode of Angular prediction as the color difference prediction mode, the prediction direction in the luminance image is corrected based on the difference in pixel aspect ratio between the luminance pixel and the color difference pixel to derive the prediction direction in the color difference image. The prediction direction deriving unit is provided.

また、以上に示したように、動画像符号化装置2は、4:2:2のYUVフォーマットの画像データを復号し、予測モードに対応付けられたイントラ予測方式により予測画像を生成する動画像符号化装置2において、Angular予測の輝度予測モードを色差予測モードとして再利用する際に、輝度画素と色差画素の画素形状の差異に基づいて輝度画像における予測方向を補正して色差画像における予測方向を導出する予測方向導出部を備える構成である。   Further, as described above, the moving image encoding apparatus 2 decodes image data in 4: 2: 2 YUV format and generates a predicted image by an intra prediction method associated with the prediction mode. In the encoding device 2, when the luminance prediction mode of Angular prediction is reused as the color difference prediction mode, the prediction direction in the luminance image is corrected based on the difference in pixel shape between the luminance pixel and the color difference pixel, and the prediction direction in the color difference image Is provided with a prediction direction deriving unit for deriving.

上記構成において、輝度画素と色差画素の画素形状の差異に基づいて予測方向を補正することにより、輝度の予測方向を色差の予測方向としてそのまま適用した場合に生じる角度の違いを低減でき、より高精度な予測画像を生成することができる。
〔変形例〕
<変形例1:予測画像生成時における予測方向の補正>
DMモード使用時、すなわち、輝度予測モードを再利用して色差予測モードとして用いる際、動画像復号装置1の予測方向導出部1453において方向の補正を行わず、Angular予測部1452Aにおいて補正を行ってもよい。例えば、図1の予測方向導出部1453の構成を図24で示すように変更し、また、図15の色差予測部146の構成を図25で示すように変更すればよい。
In the above configuration, by correcting the prediction direction based on the difference in pixel shape between the luminance pixel and the color difference pixel, the difference in angle that occurs when the luminance prediction direction is applied as it is as the color difference prediction direction can be reduced. An accurate predicted image can be generated.
[Modification]
<Modification 1: Correction of prediction direction when generating predicted image>
When the DM mode is used, that is, when the luminance prediction mode is reused and used as the color difference prediction mode, the prediction direction deriving unit 1453 of the video decoding device 1 does not correct the direction, and the Angular prediction unit 1452A performs the correction. Also good. For example, the configuration of the prediction direction deriving unit 1453 of FIG. 1 may be changed as shown in FIG. 24, and the configuration of the color difference prediction unit 146 of FIG. 15 may be changed as shown in FIG.

以下では、図24と図25を用いて、これを説明する。既に説明した構成要素と同じ機能を有する構成要素は、同じ符号を付与して説明を省略する。   Below, this is demonstrated using FIG. 24 and FIG. Components having the same functions as those already described are assigned the same reference numerals and description thereof is omitted.

図24は、図1の予測方向導出部1453の変形例である予測方向導出部1453_1を示している。予測方向導出部1453_1は予測方向導出部1453の勾配導出部1453Bに代えて勾配導出部1453B_1を備える。勾配導出部1453B_1は、処理対象が輝度領域であるか色差領域であるかによらず、常に図13に示す勾配定義テーブルDEFANG1を用いる。したがって、予測方向導出部1453_1では勾配の補正は行われない。   FIG. 24 illustrates a prediction direction deriving unit 1453_1 that is a modification of the prediction direction deriving unit 1453 of FIG. The prediction direction deriving unit 1453_1 includes a gradient deriving unit 1453B_1 instead of the gradient deriving unit 1453B of the prediction direction deriving unit 1453. The gradient deriving unit 1453B_1 always uses the gradient definition table DEFANG1 shown in FIG. 13 regardless of whether the processing target is a luminance region or a color difference region. Therefore, the prediction direction deriving unit 1453_1 does not correct the gradient.

図25は、図15の色差予測部146の変形例である色差予測部146_1を示している。色差予測部146_1は、色差予測部146の予測方向導出部1453に代えて予測方向導出部1453_1を、また、Angular予測部1452Aに代えてAngular予測部1452A_1を備える。Angular予測部1452A_1においては、一旦、輝度画像と同一の座標系を用いて色差予測画像を生成し、それを4:2:2のYUVフォーマットにおける色差座標系に合わせて再度間引き処理あるいはフィルタリングして縮小する。この処理における縮小率は、上記輝度画素の形状と上記色差画素の形状との違いによって定まる。   FIG. 25 illustrates a color difference prediction unit 146_1 that is a modification of the color difference prediction unit 146 of FIG. The color difference prediction unit 146_1 includes a prediction direction deriving unit 1453_1 instead of the prediction direction deriving unit 1453 of the color difference prediction unit 146, and an Angular prediction unit 1452A_1 instead of the Angular prediction unit 1452A. In the Angular prediction unit 1452A_1, a color difference prediction image is once generated using the same coordinate system as the luminance image, and is subjected to thinning processing or filtering again according to the color difference coordinate system in the 4: 2: 2 YUV format. to shrink. The reduction ratio in this process is determined by the difference between the shape of the luminance pixel and the shape of the color difference pixel.

具体的には、Angular予測部1452Aにおける予測画像の生成処理において、水平方向には色差予測画像で必要な画素数の2倍の画素数を持つような中間画像predSamples’[x,y]を生成する。つまり、対象PUにおける色差予測画像の幅と高さをそれぞれnWc画素およびnHc画素とすれば、中間画像predSamples’[x,y]のサイズは、2nWc×nHc画素である。中間画像predSamples’[x,y]の生成方法をさらに詳細に説明すれば、以下のようになる。   Specifically, in the prediction image generation process in the Angular prediction unit 1452A, intermediate images predSamples ′ [x, y] that have twice the number of pixels necessary for the color difference prediction image in the horizontal direction are generated. To do. That is, if the width and height of the color difference prediction image in the target PU are nWc pixels and nHc pixels, respectively, the size of the intermediate image predSamples ′ [x, y] is 2nWc × nHc pixels. The method for generating the intermediate image predSamples ′ [x, y] will be described in more detail as follows.

主方向フラグbRefVerの値が1(主方向が垂直方向)の場合には、主参照画素refMain[x]を以下の式で導出する。   When the value of the main direction flag bRefVer is 1 (the main direction is the vertical direction), the main reference pixel refMain [x] is derived by the following equation.

refMain[2*x] = p[ -1+x, -1 ], with x=0..2*nWc
refMain[2*x] = p[ -1, -1+( ( x*invAngle+128 )>>8 ) ], with x=-nWc..-1
refMain[2*x+1] = (refMain[2*x] + refMain[2*x+2]+1)>>1, with x=-nWc..2*nWc-1
これにより、水平方向の画素数が2倍の主参照画素refMain[x]を得ることができる。
refMain [2 * x] = p [-1 + x, -1], with x = 0..2 * nWc
refMain [2 * x] = p [-1, -1+ ((x * invAngle + 128) >> 8)], with x = -nWc ..- 1
refMain [2 * x + 1] = (refMain [2 * x] + refMain [2 * x + 2] +1) >> 1, with x = -nWc..2 * nWc-1
Thereby, it is possible to obtain the main reference pixel refMain [x] whose number of pixels in the horizontal direction is double.

なお、主方向フラグbRefVerの値が0(主方向が水平方向)の場合には、この変形は不要である。これは、色フォーマットが4:2:2の場合、垂直方向の解像度は輝度と色差で等しいためであり、refMain[x]は以下の式で導出する。   Note that this modification is not necessary when the value of the main direction flag bRefVer is 0 (the main direction is the horizontal direction). This is because when the color format is 4: 2: 2, the resolution in the vertical direction is equal to the luminance and the color difference, and refMain [x] is derived by the following equation.

refMain[x] = p[ -1+x, -1 ], with x=0..2*nHc
refMain[x] = p[ -1, -1+( ( x*invAngle+128 )>>8 ) ], with x=-nHc..-1
次に、この主参照画素refMain[x]から生成される予測画像を、中間画像predSamples’[x,y]に格納する。
refMain [x] = p [-1 + x, -1], with x = 0..2 * nHc
refMain [x] = p [-1, -1+ ((x * invAngle + 128) >> 8)], with x = -nHc ..- 1
Next, the prediction image generated from the main reference pixel refMain [x] is stored in the intermediate image predSamples ′ [x, y].

predSamples’[x,y] =
((32-iFact)*refMain[x+iIdx+1] + iFact*refMain[x+iIdx+2] + 16) >> 5
ここで、x,yの範囲はそれぞれ、x=0..2*nWc-1 および y=0..nHc-1 である。
predSamples' [x, y] =
((32-iFact) * refMain [x + iIdx + 1] + iFact * refMain [x + iIdx + 2] + 16) >> 5
Here, the ranges of x and y are x = 0..2 * nWc-1 and y = 0..nHc-1, respectively.

最後に、予測画像predSamples[x,y]は、中間画像predSamples’[x,y]から以下の式で導出される。   Finally, the predicted image predSamples [x, y] is derived from the intermediate image predSamples ′ [x, y] by the following equation.

predSamples[x,y] = predSamples’[2*x,y], with x=0..nWc, y=0..nHc
上記の式では中間画像predSamples’[x,y]のうちxが奇数である画素は参照されないため、半数の画素は導出を省略することができる。あるいは、中間画像predSamples’[x,y]のうちxが奇数である画素を導出しておけば、中間画像predSamples’[x,y]をフィルタリングしてより高精度な予測画像predSamples[x,y]を生成する際に用いることもできる。
predSamples [x, y] = predSamples' [2 * x, y], with x = 0..nWc, y = 0..nHc
In the above formula, pixels in which x is an odd number in the intermediate image predSamples ′ [x, y] are not referred to, so that derivation of half of the pixels can be omitted. Alternatively, if pixels having an odd number x in the intermediate image predSamples '[x, y] are derived, the intermediate image predSamples' [x, y] is filtered to obtain a more accurate predicted image predSamples [x, y ] Can also be used to generate.

なお、中間画像predSamples’[x,y] の生成は説明の便宜上のものである。中間画像predSamples’[x,y]を介さずに画素値の導出結果をpredSamples[x,y]に直接格納してもよい。   Note that the generation of the intermediate image predSamples ′ [x, y] is for convenience of explanation. The pixel value derivation result may be directly stored in predSamples [x, y] without going through the intermediate image predSamples ′ [x, y].

このようにすれば、色フォーマットが4:2:2形式である画像において輝度の予測モードを再利用する場合であっても、輝度と相似の座標系を用いて中間的に生成した予測画像を色差の座標系に変換して色差予測画像を生成することで、輝度の予測モードが表す予測方向と一致するように予測方向を補正できる。これにより、輝度と色差の予測画像における予測方向の相違が解消され、色差予測画像の正確さを向上することができる。
<変形例2:予測モードのマッピングによる予測方向の補正>
DMモード使用時、すなわち、輝度予測モードを再利用して色差予測モードとして用いる際、動画像復号装置1の予測方向導出部1453において、勾配定義テーブルの切り換えを行わず、輝度の予測モードを他の予測モードにマッピングすることで、予測方向を補正してもよい。例えば、図1の予測方向導出部1453を図26に示すように変形し、図15の色差予測部146を図27に示すように変更するとよい。
In this way, even if the luminance prediction mode is reused in an image having a 4: 2: 2 color format, a predicted image generated intermediately using a coordinate system similar to luminance is used. By converting to a color difference coordinate system and generating a color difference prediction image, the prediction direction can be corrected to match the prediction direction represented by the luminance prediction mode. Thereby, the difference of the prediction direction in the prediction image of a brightness | luminance and a color difference is eliminated, and the accuracy of a color difference prediction image can be improved.
<Modification 2: Correction of prediction direction by mapping of prediction mode>
When the DM mode is used, that is, when the luminance prediction mode is reused and used as the color difference prediction mode, the prediction direction deriving unit 1453 of the video decoding device 1 does not switch the gradient definition table, and the luminance prediction mode is not changed. The prediction direction may be corrected by mapping to the prediction mode. For example, the prediction direction deriving unit 1453 of FIG. 1 may be modified as shown in FIG. 26 and the color difference prediction unit 146 of FIG. 15 may be changed as shown in FIG.

図26に示す勾配導出部1453B_2は、勾配定義テーブルの切り換えを行わず、常に図13に示す勾配定義テーブルDEFANG1を用いるようにする一方、図28に示す変換テーブルCNVPM1を参照できるようにする。勾配導出部1453B_2は、色差領域に対しては、予測モード定義DEFPM1によって輝度の予測モード(IntraPredMode)に対応する予測方向(NAME(Luma)で表される)を、図28に示す変換テーブルCNVPM1を用いて変換し、色差の予測モード(IntraPredModeC)に対応する予測方向(NAME(Chroma)で表される)を得る。図28に示す変換テーブルCNVPM1は、色フォーマットが4:2:2形式である場合において、輝度の予測モードと色差の予測モードとがほぼ同じ勾配の予測方向となるように対応づけたテーブルである。例えば、輝度の予測モードVER+8は、色差の予測モードとしては、VER+5に変換される。VER+8の変位の値は水平方向に+32であり、色差でVER+8に対応する変位の値は+32を2で割った+16である。ここで、+16に最も近い水平方向の変位を持つ予測モードは+17の変位をもつVER+5であることから、輝度における予測モードVER+8は、色差においては予測モードVER+5に対応付けられる。また別の例では、輝度における予測モードHOR+8の変位の値は垂直方向に+32である。しかし色差において垂直方向の変位が+32*2=64となる予測モードは主方向が水平である予測モードとしては存在していない。そこで、主方向が垂直である予測モードのうちで勾配が最も近い、VER+5に対応付けられている。VER+5の勾配は[+17, -32] であり、HOR+8の勾配[-32, +64]と近い値である。
図28に示す変換テーブルCNVPM1では、他の予測モードについても同様に、それぞれ勾配の類似した予測モードに対応付けられている。
The gradient deriving unit 1453B_2 shown in FIG. 26 does not switch the gradient definition table and always uses the gradient definition table DEFANG1 shown in FIG. 13, while making it possible to refer to the conversion table CNVPM1 shown in FIG. The gradient deriving unit 1453B_2 uses the conversion table CNVPM1 shown in FIG. 28 as the prediction direction (represented by NAME (Luma)) corresponding to the luminance prediction mode (IntraPredMode) according to the prediction mode definition DEFPM1 for the color difference region. To obtain a prediction direction (represented by NAME (Chroma)) corresponding to the color difference prediction mode (IntraPredModeC). The conversion table CNVPM1 shown in FIG. 28 is a table in which the luminance prediction mode and the color difference prediction mode are associated with each other so that the prediction directions have substantially the same gradient when the color format is 4: 2: 2. . For example, the luminance prediction mode VER + 8 is converted to VER + 5 as the color difference prediction mode. The displacement value of VER + 8 is +32 in the horizontal direction, and the displacement value corresponding to VER + 8 in the color difference is +16 obtained by dividing +32 by 2. Here, since the prediction mode having the horizontal displacement closest to +16 is VER + 5 having a displacement of +17, the prediction mode VER + 8 in luminance is associated with the prediction mode VER + 5 in color difference. In another example, the value of displacement of the prediction mode HOR + 8 in luminance is +32 in the vertical direction. However, the prediction mode in which the vertical displacement in the color difference is + 32 * 2 = 64 does not exist as the prediction mode in which the main direction is horizontal. Therefore, it is associated with VER + 5, which has the closest gradient among the prediction modes in which the main direction is vertical. The gradient of VER + 5 is [+17, −32], which is close to the gradient [−32, +64] of HOR + 8.
In the conversion table CNVPM1 shown in FIG. 28, the other prediction modes are similarly associated with prediction modes having similar gradients.

図27に示す色差予測部146_2は、図15の予測方向導出部1453の代わりに予測方向導出部1453_2を備えるようにしたものである。   The color difference predicting unit 146_2 shown in FIG. 27 is provided with a prediction direction deriving unit 1453_2 instead of the prediction direction deriving unit 1453 of FIG.

このようにすれば、輝度の予測モードが再利用される場合にも、色差領域で同じ方向を示す予測モードに適切に変換され、色差予測画像の精度が向上する。
<変形例3:色差における予測モードの制限>
また別の変形例としては、色差における予測モードを制限する方法がある。例えば、図15の色差予測部146を、図29で示すように変更するとよい。図29で示す色差予測部146_3は、図15の予測方式選択部1451に代えて予測方式選択部1451_3を備える。また、図29で示す色差予測部146_3は、予測方向導出部とAngular予測部を備えていない。
In this way, even when the luminance prediction mode is reused, it is appropriately converted to the prediction mode indicating the same direction in the color difference area, and the accuracy of the color difference prediction image is improved.
<Modification 3: Restriction of prediction mode in color difference>
As another modification, there is a method of limiting the prediction mode for color difference. For example, the color difference prediction unit 146 in FIG. 15 may be changed as shown in FIG. The color difference prediction unit 146_3 illustrated in FIG. 29 includes a prediction method selection unit 1451_3 instead of the prediction method selection unit 1451 of FIG. In addition, the color difference prediction unit 146_3 illustrated in FIG. 29 does not include a prediction direction deriving unit and an Angular prediction unit.

図29に示す予測方式選択部1451_3は、入力される予測モードに基づいて予測画像生成に用いる予測方式を選択して選択結果を出力する。予測方式の選択は、輝度については図4に示した定義に基づいて、色差については図30に示した定義に基づいて、入力される予測モードの予測モード番号に対応する予測方式を選択することで実現される。   The prediction method selection unit 1451_3 illustrated in FIG. 29 selects a prediction method used for prediction image generation based on the input prediction mode and outputs a selection result. The prediction method is selected by selecting the prediction method corresponding to the prediction mode number of the input prediction mode based on the definition shown in FIG. 4 for luminance and the definition shown in FIG. 30 for color difference. It is realized with.

図30は、色差領域で用いられるイントラ予測方式の分類と対応する予測モード番号の例である。図4に示した例と異なり、Angular予測にあたる‘4’〜‘34’には予測モード番号を割り当てていない。色差領域においては図30に示した予測モードの定義を用いることにより、Angular予測が用いられることがなく、予測方向の誤差による予測画像の精度の低下を回避することができる。   FIG. 30 is an example of the prediction mode number corresponding to the intra prediction method classification used in the color difference area. Unlike the example shown in FIG. 4, no prediction mode number is assigned to ‘4’ to ‘34’ corresponding to Angular prediction. By using the prediction mode definition shown in FIG. 30 in the color difference region, Angular prediction is not used, and a decrease in the accuracy of the predicted image due to an error in the prediction direction can be avoided.

〔応用例〕
上述した動画像符号化装置2及び動画像復号装置1は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
[Application example]
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を、動画像の送信及び受信に利用できることを、図31を参照して説明する。   First, it will be described with reference to FIG. 31 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.

図31の(a)は、動画像符号化装置2を搭載した送信装置PROD_Aの構成を示したブロック図である。図31の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_A1として利用される。   FIG. 31A is a block diagram illustrating a configuration of a transmission device PROD_A in which the moving image encoding device 2 is mounted. As illustrated in (a) of FIG. 31, 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を更に備えていてもよい。図31の(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, and an input terminal PROD_A6 for inputting the moving image from the outside as a supply source of the moving image input to the encoding unit PROD_A1. And an image processing unit A7 for generating or processing an image. FIG. 31A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but a part of the configuration 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.

図31の(b)は、動画像復号装置1を搭載した受信装置PROD_Bの構成を示したブロック図である。図31の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した動画像復号装置1は、この復号部PROD_B3として利用される。   FIG. 31B 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. 31, 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を更に備えていてもよい。図31の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。   The receiving device PROD_B has a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3. PROD_B6 may be further provided. In FIG. 31B, a configuration in which all of these are provided in the receiving device PROD_B is illustrated, but a part 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を、動画像の記録及び再生に利用できることを、図32を参照して説明する。   Next, the fact 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 will be described with reference to FIG.

図32の(a)は、上述した動画像符号化装置2を搭載した記録装置PROD_Cの構成を示したブロック図である。図32の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した動画像符号化装置2は、この符号化部PROD_C1として利用される。   FIG. 32A is a block diagram illustrating 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. 32, the recording device PROD_C includes 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を更に備えていてもよい。図32の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。   The recording device PROD_C receives a moving image as a supply source of a moving image to be input to the encoding unit PROD_C1, a camera PROD_C3 that captures a moving image, an input terminal PROD_C4 for inputting a moving image from the outside, and a moving image. May include a receiving unit PROD_C5 and an image processing unit C6 that generates or processes an image. FIG. 32A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them 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レコーダ、HD(Hard Disk)レコーダなどが挙げられる(この場合、入力端子PROD_C4又は受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3又は受信部PROD_C5又は画像処理部C6が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。   Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HD (Hard Disk) 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 is a main source of moving images), a smartphone (in this case, the camera PROD_C3 or The receiving unit PROD_C5 or the image processing unit C6 is a main supply source of moving images) is also an example of such a recording apparatus PROD_C.

図32の(b)は、上述した動画像復号装置1を搭載した再生装置PROD_Dの構成を示したブロックである。図32の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置1は、この復号部PROD_D2として利用される。   (B) of FIG. 32 is a block showing 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. 32, the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written on the recording medium PROD_M and a coded data read by the read 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を更に備えていてもよい。図32の(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. 32B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.

なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。     The transmission unit PROD_D5 may transmit an unencoded moving image, or transmits 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の一例である。   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.

(ハードウェア的実現およびソフトウェア的実現)
また、上述した動画像復号装置1および動画像符号化装置2の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Hardware implementation and software implementation)
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(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD−R(CD Recordable)/ブルーレイディスク(Blu-ray Disc:登録商標)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable and Programmable Read-Only Memory)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。   Examples of the recording medium include tapes such as magnetic tape and cassette tape, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROM (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical discs), and the like. ) / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray Disc: registered trademark) and other optical discs, IC cards (including memory cards) / Cards such as optical cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory) / Semiconductor memories such as flash ROM, or PLD (Programmable Logic Device) or FPGA Logic circuits such as (Field Programmable Gate Array) can be used.

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

本発明は、画像データが符号化された符号化データを復号する画像復号装置、および、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。   The present invention can be suitably applied to an image decoding apparatus that decodes encoded data obtained by encoding image data and an image encoding apparatus that generates encoded data obtained by encoding image data. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.

1 動画像復号装置(画像復号装置)
14 予測画像生成部
141 予測単位設定部
142 参照画素設定部
143 スイッチ
144 参照画素フィルタ部
145 輝度予測部
146 色差予測部
1451 予測方式選択部
1452 予測画像導出部
1452D DC予測部
1452P Planar予測部
1452H 水平予測部
1452V 垂直予測部
1452A Angular予測部
1452L LM予測部
1453 予測方向導出部
1453A 主方向導出部
1453B 勾配導出部(色差予測手段)
2 動画像符号化装置(画像符号化装置)
23 予測画像生成部(色差予測手段)
1 video decoding device (image decoding device)
14 prediction image generation unit 141 prediction unit setting unit 142 reference pixel setting unit 143 switch 144 reference pixel filter unit 145 luminance prediction unit 146 color difference prediction unit 1451 prediction method selection unit 1452 prediction image derivation unit 1452D DC prediction unit 1452P Planar prediction unit 1452H horizontal Prediction unit 1452V Vertical prediction unit 1452A Angular prediction unit 1452L LM prediction unit 1453 Prediction direction deriving unit 1453A Main direction deriving unit 1453B Gradient deriving unit (color difference prediction means)
2 Video encoding device (image encoding device)
23 Predicted image generator (color difference predicting means)

Claims (2)

予測モードに対応付けられたイントラ予測方式によって、輝度および色差について予測画像を生成することで符号化データから画像を復元する画像復号装置において、
輝度予測画像生成に用いた該予測モードに基づいて色差予測画像生成を行う際、上記画像の色フォーマットが4:2:2形式である場合に予測方向を補正する色差予測手段を備え、
上記色差予測手段は、少なくとも輝度予測画像生成に用いる第1の予測モードより少ない個数を持つイントラ色差予測モード指定インデックスに基づいて、色差予測画像生成に用いる第2の予測モードを導出し、
前記イントラ色差予測モード指定インデックスの値が第1の値であり、前記第1の予測モードがPlanar予測モードである場合、前記色差予測手段は、前記第2の予測モードとして、斜め方向予測モードに対応するインデックス値を導出し、
前記イントラ色差予測モード指定インデックスの値が第1の値であり、前記第1の予測モードがPlanar予測モード以外である場合、前記色差予測手段は、前記第2の予測モードとして、Planar予測モードに対応するインデックス値を導出することを特徴とする画像復号装置。
In an image decoding apparatus that restores an image from encoded data by generating a prediction image for luminance and color difference by an intra prediction method associated with a prediction mode,
A color difference prediction unit that corrects a prediction direction when the color format of the image is 4: 2: 2 when the color difference prediction image is generated based on the prediction mode used for luminance prediction image generation;
The color difference prediction means derives a second prediction mode used for color difference prediction image generation based on an intra color difference prediction mode designation index having a smaller number than at least the first prediction mode used for luminance prediction image generation,
When the value of the intra color difference prediction mode designation index is the first value and the first prediction mode is the Planar prediction mode, the color difference prediction means sets the diagonal prediction mode as the second prediction mode. Derive the corresponding index value ,
When the value of the intra color difference prediction mode designation index is a first value and the first prediction mode is other than the Planar prediction mode, the color difference prediction means sets the Planar prediction mode as the second prediction mode. An image decoding apparatus characterized by deriving a corresponding index value .
予測モードに対応付けられたイントラ予測方式によって、輝度および色差について予測画像を生成することで符号化データから画像を復元する画像復号方法であって、
輝度予測画像生成に用いた該予測モードに基づいて色差予測画像生成を行う際、上記画像の色フォーマットが4:2:2形式である場合に予測方向を補正する色差予測ステップを備え、
上記色差予測ステップは、少なくとも輝度予測画像生成に用いる第1の予測モードより少ない個数を持つイントラ色差予測モード指定インデックスに基づいて、色差予測画像生成に用いる第2の予測モードを導出し、
前記イントラ色差予測モード指定インデックスの値が第1の値であり、前記第1の予測モードがPlanar予測モードである場合、前記色差予測ステップは、前記第2の予測モードとして、斜め方向予測モードに対応するインデックス値を導出し、
前記イントラ色差予測モード指定インデックスの値が第1の値であり、前記第1の予測モードがPlanar予測モード以外である場合、前記色差予測ステップは、前記第2の予測モードとして、Planar予測モードに対応するインデックス値を導出することを特徴とする画像復号方法。
An image decoding method for restoring an image from encoded data by generating a predicted image for luminance and color difference by an intra prediction method associated with a prediction mode,
A color difference prediction step of correcting a prediction direction when the color format of the image is 4: 2: 2 when generating a color difference prediction image based on the prediction mode used for luminance prediction image generation;
The color difference prediction step derives a second prediction mode used for color difference prediction image generation based on an intra color difference prediction mode designation index having a smaller number than at least the first prediction mode used for luminance prediction image generation,
When the value of the intra color difference prediction mode designation index is the first value and the first prediction mode is the Planar prediction mode, the color difference prediction step is changed to the oblique direction prediction mode as the second prediction mode. Derive the corresponding index value ,
When the value of the intra color difference prediction mode designation index is a first value and the first prediction mode is other than the Planar prediction mode, the color difference prediction step sets the Planar prediction mode as the second prediction mode. An image decoding method characterized by deriving a corresponding index value .
JP2012009446A 2012-01-19 2012-01-19 Image decoding apparatus and image encoding apparatus Active JP5995448B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012009446A JP5995448B2 (en) 2012-01-19 2012-01-19 Image decoding apparatus and image encoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012009446A JP5995448B2 (en) 2012-01-19 2012-01-19 Image decoding apparatus and image encoding apparatus

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2016096811A Division JP6162289B2 (en) 2016-05-13 2016-05-13 Image decoding apparatus and image decoding method

Publications (3)

Publication Number Publication Date
JP2013150178A JP2013150178A (en) 2013-08-01
JP2013150178A5 JP2013150178A5 (en) 2015-03-05
JP5995448B2 true JP5995448B2 (en) 2016-09-21

Family

ID=49047274

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012009446A Active JP5995448B2 (en) 2012-01-19 2012-01-19 Image decoding apparatus and image encoding apparatus

Country Status (1)

Country Link
JP (1) JP5995448B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2501535A (en) 2012-04-26 2013-10-30 Sony Corp Chrominance Processing in High Efficiency Video Codecs
JP6112031B2 (en) * 2013-03-29 2017-04-12 株式会社Jvcケンウッド Image decoding apparatus, image decoding method, and image decoding program
JPWO2014163200A1 (en) * 2013-04-05 2017-02-16 三菱電機株式会社 Color image encoding device, color image decoding device, color image encoding method, and color image decoding method
AU2013202653A1 (en) * 2013-04-05 2014-10-23 Canon Kabushiki Kaisha Method, apparatus and system for generating intra-predicted samples
US10873746B2 (en) * 2016-12-21 2020-12-22 Sharp Kabushiki Kaisha Intra prediction image generation device using cross-component liner model, image decoding apparatus, and image coding apparatus using same
CN118075473A (en) * 2017-11-28 2024-05-24 Lx 半导体科技有限公司 Image encoding/decoding method, image data transmission method, and storage medium
CN111684805B (en) * 2018-02-06 2024-04-02 松下电器(美国)知识产权公司 Encoding device, decoding device, encoding method, and decoding method
EP3893500A4 (en) * 2019-01-02 2022-06-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Intra prediction method and device, and computer storage medium
CN113965764B (en) * 2020-07-21 2023-04-07 Oppo广东移动通信有限公司 Image encoding method, image decoding method and related device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5678818B2 (en) * 2011-06-23 2015-03-04 株式会社Jvcケンウッド Image decoding apparatus, image decoding method, and image decoding program, and receiving apparatus, receiving method, and receiving program

Also Published As

Publication number Publication date
JP2013150178A (en) 2013-08-01

Similar Documents

Publication Publication Date Title
JP6441418B2 (en) Image decoding apparatus, image decoding method, image coding apparatus, and image coding method
WO2014115283A1 (en) Image decoding device and image encoding device
JP5995448B2 (en) Image decoding apparatus and image encoding apparatus
WO2016203981A1 (en) Image decoding device and image encoding device
US10136161B2 (en) DMM prediction section, image decoding device, and image coding device
WO2016203881A1 (en) Arithmetic decoding device and arithmetic coding device
WO2017068856A1 (en) Predictive image generation device, image decoding device, and image encoding device
JP6653860B2 (en) Image decoding device, image encoding device, image decoding method, image encoding method, and computer-readable recording medium
JPWO2015163456A1 (en) Image decoding apparatus, image encoding apparatus, and encoded data conversion apparatus
WO2017195532A1 (en) Image decoding device and image encoding device
CN114902669A (en) Method and apparatus for encoding/decoding image using color space conversion and method of transmitting bitstream
WO2014007131A1 (en) Image decoding device and image encoding device
WO2012121352A1 (en) Video decoding device, video coding device, and data structure
JP6162289B2 (en) Image decoding apparatus and image decoding method
JP2014176039A (en) Image decoder and image encoder
WO2014050554A1 (en) Image decoding device and image coding device
JP2016076904A (en) Dc offset information decoder, image decoder and dc offset information encoder
JP2016072941A (en) Dmm prediction device, image decoding device and image encoding device
JP2013251827A (en) Image filter device, image decoding device, image encoding device, and data structure
JP2014082729A (en) Image decoder, and image encoder
WO2012081636A1 (en) Image decoding device, image coding device, and data structure of coded data
JP2020195013A (en) Image decoding device and image encoding device
WO2012043676A1 (en) Decoding device, encoding device, and data structure
JP2014013976A (en) Image decoding device and image coding device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150116

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151102

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151110

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160108

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160329

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160513

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20160531

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160726

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160823

R150 Certificate of patent (=grant) or registration of utility model

Ref document number: 5995448

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150