JP2021093574A - Coding device, decoding device and program - Google Patents

Coding device, decoding device and program Download PDF

Info

Publication number
JP2021093574A
JP2021093574A JP2019221544A JP2019221544A JP2021093574A JP 2021093574 A JP2021093574 A JP 2021093574A JP 2019221544 A JP2019221544 A JP 2019221544A JP 2019221544 A JP2019221544 A JP 2019221544A JP 2021093574 A JP2021093574 A JP 2021093574A
Authority
JP
Japan
Prior art keywords
unit
block
coordinate value
intra prediction
prediction mode
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.)
Granted
Application number
JP2019221544A
Other languages
Japanese (ja)
Other versions
JP7388900B2 (en
Inventor
井口 和久
Kazuhisa Iguchi
和久 井口
俊輔 岩村
Shunsuke Iwamura
俊輔 岩村
慎平 根本
Shimpei Nemoto
慎平 根本
市ヶ谷 敦郎
Atsuro Ichigaya
敦郎 市ヶ谷
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.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting 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 Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2019221544A priority Critical patent/JP7388900B2/en
Publication of JP2021093574A publication Critical patent/JP2021093574A/en
Priority to JP2023194983A priority patent/JP2024003218A/en
Application granted granted Critical
Publication of JP7388900B2 publication Critical patent/JP7388900B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide a coding device that can be improved in efficiency of coding a last significant coefficient coordinate (a last position) included in a conversion coefficient, a decoding device and a program.SOLUTION: A coding device 1 that performs coding in a block unit constituting an image comprises: an intra-prediction part that generates a prediction block corresponding to a block to be coded, by intra-prediction using a decoded pixel around the block to be coded; a conversion/quantization part 120 that performs conversion processing and quantization processing to a prediction residual in the block unit representing a difference between the block to be coded and the prediction block; and an entropy coding part that codes a conversion coefficient in the block unit which is outputted by the conversion/quantization part. The entropy coding part has a coding control part that determines a binarization method that is applied in binarizing a last significant coefficient coordinate indicating a position of a last significant coefficient included in the conversion coefficient, on the basis of an intra-prediction mode used in the intra-prediction.SELECTED DRAWING: Figure 1

Description

本発明は、符号化装置、復号装置、及びプログラムに関する。 The present invention relates to a coding device, a decoding device, and a program.

HEVC(High Efficiency Video Coding)に代表される符号化方式では、インター予測やイントラ予測による予測画像と原画像との差分により得られる予測残差が一般に低周波成分にエネルギーが集中する傾向があるという性質を利用して、変換処理により予測残差を周波数成分に分解(変換)することで、エントロピーの低減を実現している(例えば、非特許文献1参照)。 In the coding method represented by HEVC (High Efficiency Video Coding), it is said that the predicted residual obtained by the difference between the predicted image and the original image by inter-prediction or intra-prediction generally tends to concentrate energy on low frequency components. By utilizing the property and decomposing (converting) the predicted residual into frequency components by conversion processing, reduction of entropy is realized (see, for example, Non-Patent Document 1).

予測残差に対して変換処理を行うことにより得られる変換係数の最も左上の成分はDC(Direct Current)成分であり、下にいくにつれて垂直方向の周波数の高い成分を、右にいくにつれて水平方向の周波数の高い成分を表している。符号化装置では予測残差をストリーム出力するため、量子化後の変換係数の有意な成分である有意係数の位置や値をエントロピー符号化して伝送する。有意係数とは、ゼロではない変換係数(非ゼロ係数)をいう。 The upper left component of the conversion coefficient obtained by performing the conversion process on the predicted residual is the DC (Direct Current) component, with the higher frequency component in the vertical direction going down and the horizontal direction going to the right. Represents the high frequency component of. Since the coding device outputs the predicted residual as a stream, the position and value of the significance coefficient, which is a significant component of the conversion coefficient after quantization, are entropy-coded and transmitted. The significance coefficient means a conversion coefficient (non-zero coefficient) that is not zero.

符号化装置は、ブロック内の変換係数を高周波から低周波に向かって、符号化順を表すスキャン順に応じてシリアライズし、シリアライズされた変換係数をエントロピー符号化する。その際に、シリアライズされた変換係数のうち最も高周波側の最後の有意係数の位置を示す最終有意係数座標(last position)を伝送し、last positionからDC成分までの有意係数の位置や値を効率的に符号化する。 The coding device serializes the conversion coefficient in the block from high frequency to low frequency according to the scan order representing the coding order, and entropy encodes the serialized conversion coefficient. At that time, the final significance coefficient coordinates (last position) indicating the position of the last significance coefficient on the highest frequency side of the serialized conversion coefficients are transmitted, and the position and value of the significance coefficient from the last position to the DC component are made efficient. Coordinated.

HEVCでは、変換係数の二値化の際のスキャン順がイントラ予測モードに応じて切り替えられる。具体的には、イントラ予測モードに応じた予測残差の分布の統計的な偏りを利用し、適応的にスキャン順を切り替えることにより、符号化効率を改善している。 In HEVC, the scanning order at the time of binarizing the conversion coefficient is switched according to the intra prediction mode. Specifically, the coding efficiency is improved by adaptively switching the scan order by utilizing the statistical bias of the distribution of the prediction residual according to the intra prediction mode.

また、HEVCでは、last positionのエントロピー符号化において、last positionのブロック内の座標(DC成分を基準とした相対位置)であるX、Yの2つの値(last_sig_coeff_x,last_sig_coeff_y)を別々にエントロピー符号化する。予測残差は、一般に低周波成分にエネルギーが集中する傾向にあることから、last positionは変換係数の左上領域に生じる可能性が高い。このため、last_sig_coeff_x及びlast_sig_coeff_yを伝送するための二値化の際に、小さい値には少ないビット数を割り当て、大きい値には多くのビット数を割り当てることで、last positionを効率的に符号化している。 Further, in HEVC, in the entropy coding of the last position, the two values (last_sig_coeff_x, last_sig_coeff_y), which are the coordinates (relative positions with respect to the DC component) in the block of the last position, are separately entropy-coded. To do. Since the predicted residual generally tends to concentrate energy on the low frequency component, the last position is likely to occur in the upper left region of the conversion coefficient. Therefore, when binarizing to transmit last_sig_coeff_x and last_sig_coeff_y, the last position is efficiently encoded by allocating a small number of bits to a small value and a large number of bits to a large value. There is.

Recommendation ITU−T H.265,(12/2016), “High efficiency video coding”, International Telecommunication UnionRecognition ITU-T H. 265, (12/2016), “High efficiency video coding”, International Telecommunication Union

上述のように、イントラ予測モードに応じて予測残差の分布に統計的な偏りが生じる。言い換えると、イントラ予測モードに応じて、変換係数の値が大きくなる確率が高い領域が変化する。例えば、イントラ予測モードが垂直に近い方向性予測モードである場合、ブロック上部に大きな値の変換係数が現われる可能性が高い。 As described above, there is a statistical bias in the distribution of the forecast residuals depending on the intra-prediction mode. In other words, the region where the probability that the value of the conversion coefficient becomes large changes depending on the intra prediction mode. For example, when the intra prediction mode is a directional prediction mode close to vertical, there is a high possibility that a conversion coefficient of a large value appears at the upper part of the block.

同様に、last positionが出現する位置もイントラ予測モードにより変化すると考えられる。例えば、イントラ予測モードが垂直に近い方向性予測モードである場合、ブロック上部にlast positionが現われる可能性が高い。しかしながら、従来の符号化方式では、last positionを伝送するための二値化がイントラ予測モードに応じて制御されていないため、last positionの符号化の効率が悪いという課題があった。 Similarly, it is considered that the position where the last position appears also changes depending on the intra prediction mode. For example, when the intra prediction mode is a directional prediction mode that is close to vertical, there is a high possibility that the last position will appear at the top of the block. However, in the conventional coding method, since the binarization for transmitting the last position is not controlled according to the intra-prediction mode, there is a problem that the coding efficiency of the last position is poor.

そこで、本発明は、最終有意係数座標(last position)の符号化の効率を改善する符号化装置、復号装置、及びプログラムを提供することを目的とする。 Therefore, an object of the present invention is to provide a coding device, a decoding device, and a program for improving the efficiency of coding the last position.

第1の態様に係る符号化装置は、画像を構成するブロック単位で符号化を行う符号化装置であって、符号化対象ブロックの周辺の復号済み画素を用いるイントラ予測によって、前記符号化対象ブロックに対応する予測ブロックを生成するイントラ予測部と、前記符号化対象ブロックと前記予測ブロックとの差を表すブロック単位の予測残差に対して変換処理及び量子化処理を行う変換・量子化部と、前記変換・量子化部が出力するブロック単位の変換係数を符号化するエントロピー符号化部と、を備え、前記エントロピー符号化部は、前記イントラ予測に用いたイントラ予測モードに基づいて、前記変換係数に含まれる最終有意係数の位置を示す最終有意係数座標の二値化に適用する二値化方式を決定する符号化制御部を有することを要旨とする。 The coding device according to the first aspect is a coding device that encodes in units of blocks constituting an image, and the coding target block is based on intra-prediction using decoded pixels around the coding target block. An intra-prediction unit that generates a prediction block corresponding to the above, and a conversion / quantization unit that performs conversion processing and quantization processing on the prediction residual in block units representing the difference between the coding target block and the prediction block. , The entropy coding unit that encodes the conversion coefficient of each block output by the conversion / quantization unit, and the entropy coding unit is based on the intra prediction mode used for the intra prediction. The gist is to have a coding control unit that determines the binarization method applied to the binarization of the final significance coefficient coordinates that indicate the position of the final significance coefficient included in the coefficient.

第2の態様に係る復号装置は、画像を構成するブロック単位で復号を行う復号装置であって、復号対象ブロックの周辺の復号済み画素を用いるイントラ予測によって、前記復号対象ブロックに対応する予測ブロックを生成するイントラ予測部と、符号化ストリームを復号することで、前記復号対象ブロックの変換係数を出力するエントロピー復号部と、前記エントロピー復号部が出力する前記変換係数に対して逆量子化処理及び逆変換処理を行ってブロック単位の予測残差を復元する逆量子化・逆変換部と、前記予測ブロックと前記復元した予測残差とを合成して前記復号対象ブロックを復元する合成部と、を備え、前記エントロピー復号部は、前記イントラ予測に用いるイントラ予測モードに基づいて、前記変換係数に含まれる最終有意係数の位置を示す最終有意係数座標の二値化に適用されている二値化方式を特定する復号制御部を有することを要旨とする。 The decoding device according to the second aspect is a decoding device that decodes in block units constituting an image, and is a prediction block corresponding to the decoding target block by intra-prediction using decoded pixels around the decoding target block. The intra-prediction unit that generates the above, the entropy decoding unit that outputs the conversion coefficient of the decoding target block by decoding the coded stream, and the dequantization processing and the inverse quantization processing for the conversion coefficient output by the entropy decoding unit. An inverse quantization / inverse conversion unit that performs inverse conversion processing to restore the predicted residual in block units, a synthesis unit that synthesizes the predicted block and the restored predicted residual, and restores the decoding target block. The entropy decoding unit is applied to binarization of the final significance coefficient coordinates indicating the position of the final significance coefficient included in the conversion coefficient based on the intra prediction mode used for the intra prediction. The gist is to have a decoding control unit that specifies the method.

第3の態様に係るプログラムは、コンピュータを第1の態様に係る符号化装置として機能させることを要旨とする。 The gist of the program according to the third aspect is to make the computer function as a coding device according to the first aspect.

第4の態様に係るプログラムは、コンピュータを第2の態様に係る復号装置として機能させることを要旨とする。 The gist of the program according to the fourth aspect is to make the computer function as a decoding device according to the second aspect.

本発明によれば、最終有意係数座標(last position)の符号化の効率を改善する符号化装置、復号装置、及びプログラムを提供できる。 According to the present invention, it is possible to provide a coding device, a decoding device, and a program that improve the efficiency of coding the last position.

実施形態に係る符号化装置1の構成を示す図である。It is a figure which shows the structure of the coding apparatus 1 which concerns on embodiment. 実施形態に係るイントラ予測モードの候補を示す図である。It is a figure which shows the candidate of the intra prediction mode which concerns on embodiment. 実施形態に係るエントロピー符号化部の構成を示す図である。It is a figure which shows the structure of the entropy coding part which concerns on embodiment. 実施形態に係るシリアライズ部の動作例を示す図である。It is a figure which shows the operation example of the serialization part which concerns on embodiment. 実施形態に係るシリアライズ部の動作例を示す図である。It is a figure which shows the operation example of the serialization part which concerns on embodiment. 実施形態に係る符号化制御部及び復号制御部の動作を示す図である。It is a figure which shows the operation of the coding control unit and the decoding control unit which concerns on embodiment. 実施形態に係る対応付け情報を示す図である。It is a figure which shows the association information which concerns on embodiment. 座標値の表現に必要なビット数を示す図である。It is a figure which shows the number of bits required for the representation of a coordinate value. 実施形態に係る復号装置の構成を示す図である。It is a figure which shows the structure of the decoding apparatus which concerns on embodiment. 実施形態に係るエントロピー復号部の構成を示す図である。It is a figure which shows the structure of the entropy decoding part which concerns on embodiment. その他の実施形態を説明するための図である。It is a figure for demonstrating another embodiment.

図面を参照して、実施形態に係る符号化装置及び復号装置について説明する。実施形態に係る符号化装置及び復号装置は、MPEGに代表される動画像の符号化及び復号をそれぞれ行う。以下の図面の記載において、同一又は類似の部分には同一又は類似の符号を付している。 The coding device and the decoding device according to the embodiment will be described with reference to the drawings. The coding device and the decoding device according to the embodiment encode and decode a moving image represented by MPEG, respectively. In the description of the drawings below, the same or similar parts are designated by the same or similar reference numerals.

<符号化装置>
本実施形態に係る符号化装置について説明する。
<Coding device>
The coding apparatus according to this embodiment will be described.

(符号化装置の構成)
まず、本実施形態に係る符号化装置の構成について説明する。図1は、本実施形態に係る符号化装置1の構成を示す図である。
(Configuration of coding device)
First, the configuration of the coding apparatus according to the present embodiment will be described. FIG. 1 is a diagram showing a configuration of a coding device 1 according to the present embodiment.

図1に示すように、符号化装置1は、ブロック分割部100と、減算部110と、変換・量子化部120と、エントロピー符号化部130と、逆量子化・逆変換部140と、合成部150と、メモリ160と、予測部170とを有する。 As shown in FIG. 1, the coding device 1 synthesizes a block dividing unit 100, a subtracting unit 110, a conversion / quantization unit 120, an entropy coding unit 130, an inverse quantization / inverse conversion unit 140, and the like. It has a unit 150, a memory 160, and a prediction unit 170.

ブロック分割部100は、動画像を構成するフレーム(或いはピクチャ)単位の入力画像である原画像を複数の画像ブロックに分割し、分割により得た画像ブロックを減算部110に出力する。画像ブロックのサイズは、例えば32×32画素、16×16画素、8×8画素、又は4×4画素等である。画像ブロックの形状は正方形に限らず長方形(非正方形)であってもよい。画像ブロックは、符号化装置1が符号化を行う単位(すなわち、符号化対象ブロック)であり、且つ復号装置が復号を行う単位(すなわち、復号対象ブロック)である。このような画像ブロックはCU(Coding Unit)と呼ばれることがある。 The block division unit 100 divides an original image, which is an input image for each frame (or picture) constituting a moving image, into a plurality of image blocks, and outputs the image block obtained by the division to the subtraction unit 110. The size of the image block is, for example, 32 × 32 pixels, 16 × 16 pixels, 8 × 8 pixels, 4 × 4 pixels, or the like. The shape of the image block is not limited to a square and may be a rectangle (non-square). The image block is a unit for coding by the coding device 1 (that is, a block to be coded) and a unit for decoding by the decoding device (that is, a block to be decoded). Such an image block is sometimes called a CU (Coding Unit).

例えば、ブロック分割部100は、画像を構成する輝度信号及び色差信号に対してブロック分割を行うことで、輝度ブロック及び色差ブロックを出力する。輝度信号と色差信号とで分割を独立に制御可能であってもよい。輝度ブロック及び色差ブロックを特に区別しないときは単に符号化対象ブロックと呼ぶ。 For example, the block division unit 100 outputs a luminance block and a luminance block by performing block partitioning on the luminance signal and the color difference signal constituting the image. The division may be independently controllable for the luminance signal and the color difference signal. When the luminance block and the color difference block are not particularly distinguished, they are simply referred to as a coded block.

減算部110は、ブロック分割部100から出力される符号化対象ブロックと、符号化対象ブロックを予測部170が予測して得た予測ブロックとの差分(誤差)を表す予測残差を算出する。具体的には、減算部110は、ブロックの各画素値から予測ブロックの各画素値を減算することにより予測残差を算出し、算出した予測残差を変換・量子化部120に出力する。 The subtraction unit 110 calculates a prediction residual representing a difference (error) between the coding target block output from the block division unit 100 and the prediction block obtained by predicting the coding target block by the prediction unit 170. Specifically, the subtraction unit 110 calculates the prediction residual by subtracting each pixel value of the prediction block from each pixel value of the block, and outputs the calculated prediction residual to the conversion / quantization unit 120.

変換・量子化部120は、ブロック単位で変換処理及び量子化処理を行う。変換・量子化部120は、変換部121と、量子化部122とを有する。 The conversion / quantization unit 120 performs conversion processing and quantization processing on a block-by-block basis. The conversion / quantization unit 120 includes a conversion unit 121 and a quantization unit 122.

変換部121は、減算部110から出力される予測残差に対して変換処理を行って変換係数を算出し、算出した変換係数を量子化部122に出力する。変換処理とは、例えば、離散コサイン変換(DCT)や離散サイン変換(DST)、カルーネンレーブ変換(KLT)等をいう。但し、変換処理には、画素領域の信号を周波数領域の信号に変換することなくスケーリング等により調整する変換スキップを含んでもよい。変換部121は、符号化対象ブロックに適用する変換処理に関する情報をエントロピー符号化部130に出力する。 The conversion unit 121 performs conversion processing on the predicted residual output from the subtraction unit 110 to calculate a conversion coefficient, and outputs the calculated conversion coefficient to the quantization unit 122. The conversion process refers to, for example, the discrete cosine transform (DCT), the discrete sine transform (DST), the carunen-reve transform (KLT), and the like. However, the conversion process may include a conversion skip that adjusts by scaling or the like without converting the signal in the pixel region into the signal in the frequency domain. The conversion unit 121 outputs information regarding the conversion process applied to the coded target block to the entropy coding unit 130.

量子化部122は、変換部121から出力される変換係数を量子化パラメータ(Qp)及び量子化行列を用いて量子化し、量子化した変換係数をエントロピー符号化部130及び逆量子化・逆変換部140に出力する。 The quantization unit 122 quantizes the conversion coefficient output from the conversion unit 121 using the quantization parameter (Qp) and the quantization matrix, and the quantized conversion coefficient is the entropy coding unit 130 and the inverse quantization / inverse conversion. Output to unit 140.

エントロピー符号化部130は、量子化部122から出力される変換係数に対してエントロピー符号化を行い、データ圧縮を行って符号化データ(ビットストリーム)を生成し、符号化データを符号化装置1の外部に出力する。エントロピー符号化には、ハフマン符号やCABAC(Context−based Adaptive Binary Arithmetic Coding;コンテキスト適応型2値算術符号)等を用いることができる。具体的には、エントロピー符号化部130は、2次元に配列された変換係数を所定のスキャン順で読み出し、サブブロック単位で符号化を行う。 The entropy coding unit 130 performs entropy coding on the conversion coefficient output from the quantization unit 122, performs data compression to generate coded data (bit stream), and encodes the coded data in the coding device 1. Output to the outside of. For the entropy coding, a Huffman code, a CABAC (Context-based Adaptive Binary Arithmetic Coding; context-adaptive binary arithmetic code) or the like can be used. Specifically, the entropy coding unit 130 reads out the conversion coefficients arranged in two dimensions in a predetermined scan order and encodes them in subblock units.

エントロピー符号化部130は、このような変換係数のスキャン処理及び符号化処理に加えて、変換部121から出力される変換処理に関する情報の符号化や、予測部170から出力される予測処理に関する情報の符号化も行う。 In addition to such conversion coefficient scanning processing and coding processing, the entropy coding unit 130 encodes information related to the conversion processing output from the conversion unit 121 and information related to the prediction processing output from the prediction unit 170. Is also coded.

逆量子化・逆変換部140は、ブロック単位で逆量子化処理及び逆変換処理を行う。逆量子化・逆変換部140は、逆量子化部141と、逆変換部142とを有する。 The inverse quantization / inverse transformation unit 140 performs the inverse quantization process and the inverse transformation process on a block-by-block basis. The inverse quantization / inverse conversion unit 140 includes an inverse quantization unit 141 and an inverse conversion unit 142.

逆量子化部141は、量子化部122が行う量子化処理に対応する逆量子化処理を行う。具体的には、逆量子化部141は、量子化部122から出力される変換係数を、量子化パラメータ(Qp)及び量子化行列を用いて逆量子化することにより変換係数を復元し、復元した変換係数を逆変換部142に出力する。 The inverse quantization unit 141 performs an inverse quantization process corresponding to the quantization process performed by the quantization unit 122. Specifically, the inverse quantization unit 141 restores and restores the conversion coefficient by inversely quantizing the conversion coefficient output from the quantization unit 122 using the quantization parameter (Qp) and the quantization matrix. The converted conversion coefficient is output to the inverse conversion unit 142.

逆変換部142は、変換部121が行う変換処理に対応する逆変換処理を行う。例えば、変換部121が離散コサイン変換を行った場合には、逆変換部142は逆離散コサイン変換を行う。逆変換部142は、逆量子化部141から出力される変換係数に対して逆変換処理を行って予測残差を復元し、復元した予測残差である復元予測残差を合成部150に出力する。 The inverse conversion unit 142 performs an inverse conversion process corresponding to the conversion process performed by the conversion unit 121. For example, when the conversion unit 121 performs the discrete cosine transform, the inverse transform unit 142 performs the inverse discrete cosine transform. The inverse transformation unit 142 performs an inverse transformation process on the conversion coefficient output from the inverse quantization unit 141 to restore the predicted residual, and outputs the restored predicted residual, which is the restored predicted residual, to the synthesis unit 150. To do.

合成部150は、逆変換部142から出力される復元予測残差を、予測部170から出力される予測ブロックと画素単位で合成する。合成部150は、復元予測残差の各画素値と予測ブロックの各画素値を加算して符号化対象ブロックを復号(再構成)し、復号済みブロックをメモリ160に出力する。なお、復号済みブロックは、再構成ブロックと呼ばれることもある。 The synthesizing unit 150 synthesizes the restoration prediction residual output from the inverse conversion unit 142 with the prediction block output from the prediction unit 170 on a pixel-by-pixel basis. The synthesizing unit 150 adds each pixel value of the restoration prediction residual and each pixel value of the prediction block to decode (reconstruct) the coded block, and outputs the decoded block to the memory 160. The decrypted block is sometimes called a reconstructed block.

メモリ160は、合成部150から出力される復号済みブロックを記憶し、復号済みブロックをフレーム単位で復号済み画像として蓄積する。メモリ160は、記憶している復号済みブロック若しくは復号済み画像を予測部170に出力する。なお、合成部150とメモリ160との間にループフィルタが設けられてもよい。 The memory 160 stores the decoded blocks output from the compositing unit 150, and stores the decoded blocks as a decoded image in frame units. The memory 160 outputs the stored decoded block or decoded image to the prediction unit 170. A loop filter may be provided between the compositing unit 150 and the memory 160.

予測部170は、ブロック単位で予測処理を行う。予測部170は、インター予測部171と、イントラ予測部172と、切替部173とを有する。 The prediction unit 170 performs prediction processing in block units. The prediction unit 170 includes an inter-prediction unit 171, an intra-prediction unit 172, and a switching unit 173.

インター予測部171は、フレーム間の相関を利用したインター予測を行う。具体的には、インター予測部171は、メモリ160に記憶された復号済み画像を参照画像として用いて、ブロックマッチングなどの手法により動きベクトルを算出し、インター予測の対象ブロックを予測してインター予測ブロックを生成し、生成したインター予測ブロックを切替部173に出力する。ここで、インター予測部171は、複数の参照画像を用いるインター予測(典型的には、双予測)や、1つの参照画像を用いるインター予測(片方向予測)の中から最適なインター予測方法を選択し、選択したインター予測方法を用いてインター予測を行う。インター予測部171は、インター予測に関する情報(動きベクトル等)をエントロピー符号化部130に出力する。 The inter-prediction unit 171 performs inter-prediction using the correlation between frames. Specifically, the inter-prediction unit 171 uses the decoded image stored in the memory 160 as a reference image, calculates a motion vector by a method such as block matching, predicts the target block of inter-prediction, and inter-predicts. A block is generated, and the generated inter-prediction block is output to the switching unit 173. Here, the inter-prediction unit 171 selects the optimum inter-prediction method from inter-prediction using a plurality of reference images (typically bi-prediction) and inter-prediction using one reference image (one-way prediction). Select and perform inter-prediction using the selected inter-prediction method. The inter-prediction unit 171 outputs information (motion vector, etc.) related to the inter-prediction to the entropy coding unit 130.

イントラ予測部172は、フレーム内の空間的な相関を利用したイントラ予測を行う。具体的には、イントラ予測部172は、メモリ160に記憶された復号済み画像のうち、イントラ予測の対象ブロックの周辺にある復号済み画素を参照してイントラ予測ブロックを生成し、生成したイントラ予測ブロックを切替部173に出力する。イントラ予測部172は、複数のイントラ予測モードの中から、イントラ予測の対象ブロックに適用するイントラ予測モードを選択し、選択したイントラ予測モードを用いて対象ブロックを予測する。イントラ予測部172は、選択したイントラ予測モードを示すイントラ予測モードシンタックスをエントロピー符号化部130に出力する。 The intra prediction unit 172 performs intra prediction using the spatial correlation in the frame. Specifically, the intra prediction unit 172 generates an intra prediction block by referring to the decoded pixels around the target block of the intra prediction among the decoded images stored in the memory 160, and generates the intra prediction. The block is output to the switching unit 173. The intra prediction unit 172 selects an intra prediction mode to be applied to the target block of the intra prediction from the plurality of intra prediction modes, and predicts the target block using the selected intra prediction mode. The intra prediction unit 172 outputs the intra prediction mode syntax indicating the selected intra prediction mode to the entropy coding unit 130.

イントラ予測モードシンタックスには、例えば、intra_luma_mpm_flag、intra_luma_not_planar_flag、intra_luma_mpm_idx、及びintra_luma_mpm_remainderがある。 Intra-prediction mode syntax includes, for example, intra_luma_mpm_flag, intra_luma_not_planar_flag, intra_luma_mpm_idx, and intra_luma_mpm_reminder.

intra_luma_mpm_flagは、イントラ予測に用いたイントラ予測モードが複数の優先イントラ予測モード(以下、「MPMモード」と呼ぶ)に含まれるか否かを示すフラグである。intra_luma_mpm_flagが“1”である場合、イントラ予測モードがMPMモードに含まれることを示す。一方、intra_luma_mpm_flagが“0”である場合、イントラ予測モードがMPMモードに含まれない、すなわち、イントラ予測モードが複数の非優先イントラ予測モード(以下、「非MPMモード」と呼ぶ)に含まれることを示す。 The intra_luma_mpm_flag is a flag indicating whether or not the intra prediction mode used for the intra prediction is included in a plurality of priority intra prediction modes (hereinafter, referred to as “MPM mode”). When intra_luma_mpm_flag is "1", it indicates that the intra prediction mode is included in the MPM mode. On the other hand, when intra_luma_mpm_flag is "0", the intra prediction mode is not included in the MPM mode, that is, the intra prediction mode is included in a plurality of non-priority intra prediction modes (hereinafter, referred to as "non-MPM mode"). Is shown.

intra_luma_not_planar_flagは、intra_luma_mpm_flagが“1”である場合において、イントラ予測モードがPlanarモードであるか否かを示すフラグである。intra_luma_not_planar_flagが“1”である場合、イントラ予測モードがPlanarモードではないことを示す。一方、intra_luma_not_planar_flagが“0”である場合、イントラ予測モードがPlanarモードであることを示す。 intra_luma_not_planar_flag is a flag indicating whether or not the intra prediction mode is Planar mode when intra_luma_mpm_flag is "1". When intra_luma_not_planar_flag is "1", it indicates that the intra prediction mode is not Planar mode. On the other hand, when intra_luma_not_planar_flag is "0", it indicates that the intra prediction mode is Planar mode.

intra_luma_mpm_idxは、intra_luma_not_planar_flagが“1”である場合において、イントラ予測モードがMPMの何番目であるかを示すインデックスである。なお、intra_luma_mpm_idxはTruncated Unary encodingを用いてMPM1からMPM5までのいずれかの番号を示す。 intra_luma_mpm_idx is an index indicating the number of the MPM in the intra prediction mode when intra_luma_not_planar_flag is "1". Intra_luma_mpm_idx indicates any number from MPM1 to MPM5 using Truncated Unary encoding.

intra_luma_mpm_remainderは、intra_luma_mpm_flagが“0”である場合において、非MPMのイントラ予測モードのいずれかを示す非MPMモード番号である。 intra_luma_mpm_reminder is a non-MPM mode number indicating any of the non-MPM intra-prediction modes when intra_luma_mpm_flag is "0".

切替部173は、インター予測部171から出力されるインター予測ブロックとイントラ予測部172から出力されるイントラ予測ブロックとを切り替えて、いずれかの予測ブロックを減算部110及び合成部150に出力する。 The switching unit 173 switches between the inter prediction block output from the inter prediction unit 171 and the intra prediction block output from the intra prediction unit 172, and outputs one of the prediction blocks to the subtraction unit 110 and the synthesis unit 150.

図2は、本実施形態に係るイントラ予測モードの候補を示す図である。図2に示すように、イントラ予測モードの候補は、0から66までの67通りがある。イントラ予測モードのモード「0」はPlanar予測であり、イントラ予測モードのモード「1」はDC予測であり、イントラ予測モードのモード「2」乃至「66」は方向性予測である。 FIG. 2 is a diagram showing candidates for the intra prediction mode according to the present embodiment. As shown in FIG. 2, there are 67 candidates for the intra prediction mode from 0 to 66. The mode "0" of the intra prediction mode is Planar prediction, the mode "1" of the intra prediction mode is DC prediction, and the modes "2" to "66" of the intra prediction mode are directional prediction.

方向性予測において、矢印の方向は参照方向を示し、矢印の起点は予測対象の画素の位置を示し、矢印の終点はこの予測対象画素の予測に用いる参照画素の位置を示す。ブロックの右上頂点及び左下頂点を通る対角線に平行な参照方向として、左下方向を参照するイントラ予測モードであるモード「2」と、右上方向を参照するイントラ予測モードであるモード「66」とがあり、モード「2」からモード「66」まで時計回りに所定角度ごとにモード番号が割り振られている。なお、モード「2」乃至「18」は、イントラ予測の対象ブロックの左側のみの参照画素を参照する予測モードである。一方で、モード「50」乃至「66」は、イントラ予測の対象ブロックの上側のみの参照画素を参照する予測モードである。 In the directionality prediction, the direction of the arrow indicates the reference direction, the starting point of the arrow indicates the position of the pixel to be predicted, and the end point of the arrow indicates the position of the reference pixel used to predict the pixel to be predicted. As reference directions parallel to the diagonal line passing through the upper right and lower left vertices of the block, there are an intra prediction mode "2" that refers to the lower left direction and a mode "66" that is an intra prediction mode that refers to the upper right direction. , Mode numbers are assigned to each predetermined angle clockwise from the mode "2" to the mode "66". The modes "2" to "18" are prediction modes that refer to reference pixels only on the left side of the target block for intra prediction. On the other hand, the modes "50" to "66" are prediction modes that refer to reference pixels only on the upper side of the target block for intra prediction.

このように、本実施形態に係る符号化装置1は、画像を構成するブロック単位で符号化を行う。符号化装置1は、符号化対象ブロックの周辺の復号済み画素を用いるイントラ予測によって、符号化対象ブロックに対応する予測ブロックを生成するイントラ予測部172と、符号化対象ブロックと予測ブロックとの差を表すブロック単位の予測残差に対して変換処理及び量子化処理を行う変換・量子化部120と、変換・量子化部120が出力するブロック単位の変換係数を符号化するエントロピー符号化部130とを有する。 As described above, the coding device 1 according to the present embodiment encodes in block units constituting the image. The coding device 1 has an intra prediction unit 172 that generates a prediction block corresponding to the coding target block by intra prediction using decoded pixels around the coding target block, and a difference between the coding target block and the prediction block. The conversion / quantization unit 120 that performs conversion processing and quantization processing on the predicted residual of the block unit representing the above, and the entropy coding unit 130 that encodes the conversion coefficient of the block unit output by the conversion / quantization unit 120. And have.

(エントロピー符号化部の構成)
次に、本実施形態に係るエントロピー符号化部130の構成について説明する。図3は、本実施形態に係るエントロピー符号化部130の構成を示す図である。
(Structure of entropy encoding unit)
Next, the configuration of the entropy encoding unit 130 according to the present embodiment will be described. FIG. 3 is a diagram showing the configuration of the entropy coding unit 130 according to the present embodiment.

図3に示すように、エントロピー符号化部130は、シリアライズ部131と、二値化部132と、符号化部133と、符号化制御部134とを有する。 As shown in FIG. 3, the entropy coding unit 130 includes a serialization unit 131, a binarization unit 132, a coding unit 133, and a coding control unit 134.

シリアライズ部131は、ブロック単位の変換係数について、このブロック内の変換係数をスキャン順によりスキャン(シリアライズ)し、シリアライズ後の変換係数を二値化部132に出力する。 The serialization unit 131 scans (serializes) the conversion coefficient in the block with respect to the conversion coefficient in the block unit in the scanning order, and outputs the serialized conversion coefficient to the binarization unit 132.

図4及び図5は、本実施形態に係るシリアライズ部131の動作例を示す図である。図4及び図5において、符号化対象ブロックのサイズが8×8である一例を示している。ここでは、4×4単位でのサブブロック単位でスキャンを行う一例を示している。 4 and 5 are diagrams showing an operation example of the serialization unit 131 according to the present embodiment. 4 and 5 show an example in which the size of the coded block is 8 × 8. Here, an example of scanning in units of subblocks in units of 4 × 4 is shown.

図4に示すように、シリアライズ部131は、斜め方向スキャンにより、ブロック内の変換係数を最高周波数成分からDC成分に向かってスキャンする。 As shown in FIG. 4, the serialization unit 131 scans the conversion coefficient in the block from the highest frequency component toward the DC component by oblique scanning.

図5に示すように、シリアライズ部131は、シリアライズされた変換係数のうち、最も高周波側の最後の有意係数の位置を示す最終有意係数座標(last position)を生成し、last positionを二値化部132に出力する。具体的には、シリアライズ部131は、スキャン順で最初の有意係数の座標(すなわち、DC成分を基準とした相対位置)をx,yの2つの値(last_sig_coeff_x,last_sig_coeff_y)で表現したlast positionを二値化部132に出力する。ここで、last_sig_coeff_xはX座標値であり、last_sig_coeff_yはY座標値である。図5の例において、(last_sig_coeff_x,last_sig_coeff_y)=(6,5)である。last_sig_coeff_x及びlast_sig_coeff_yのそれぞれは、プリフィックス部とサフィックス部とで構成される。 As shown in FIG. 5, the serialization unit 131 generates the last significance coordinate (last position) indicating the position of the last significance coefficient on the highest frequency side among the serialized conversion coefficients, and binarizes the last position. Output to unit 132. Specifically, the serialization unit 131 represents the last position in which the coordinates of the first significance coefficient in the scan order (that is, the relative position with respect to the DC component) are expressed by two values of x and y (last_sig_coeff_x, last_sig_coeff_y). Output to the binarization unit 132. Here, last_sig_coeff_x is the X coordinate value, and last_sig_coeff_y is the Y coordinate value. In the example of FIG. 5, (last_sig_coeff_x, last_sig_coeff_y) = (6, 5). Each of last_sig_coeff_x and last_sig_coeff_y is composed of a prefix portion and a suffix portion.

また、シリアライズ部131は、サブブロック単位で変換係数の構成を示す各種情報(シンタックス要素)を生成し、生成した情報を二値化部132に出力する。例えば、シリアライズ部131は、サブブロック内に有意係数があるか否かを示すフラグであるcoded_sub_block_flagを二値化部132に出力する。図5の例において、シリアライズ部131は、左下サブブロックについては、このサブブロック内に有意係数が無いことを示すcoded_sub_block_flagを二値化部132に出力する。 Further, the serialization unit 131 generates various information (syntax elements) indicating the configuration of the conversion coefficient in sub-block units, and outputs the generated information to the binarization unit 132. For example, the serialization unit 131 outputs coded_sub_block_flag, which is a flag indicating whether or not there is a significance coefficient in the subblock, to the binarization unit 132. In the example of FIG. 5, the serialization unit 131 outputs a coded_sub_block_flag indicating that there is no significance coefficient in the lower left subblock to the binarization unit 132.

また、本実施形態において、符号化制御部134は、イントラ予測部172が出力するイントラ予測モードシンタックスに基づいて、変換係数に含まれる最終有意係数の位置を示すlast positionの二値化に適用する二値化方式を決定する。符号化制御部134は、決定した二値化方式で二値化を行うように二値化部132を制御する。 Further, in the present embodiment, the coding control unit 134 is applied to the binarization of the last position indicating the position of the final significance coefficient included in the conversion coefficient based on the intra prediction mode syntax output by the intra prediction unit 172. Determine the binarization method to be performed. The coding control unit 134 controls the binarization unit 132 so as to perform binarization by the determined binarization method.

図6は、本実施形態に係る符号化制御部134の動作を示す図である。 FIG. 6 is a diagram showing the operation of the coding control unit 134 according to the present embodiment.

図6(a)に示すように、符号化対象ブロックに適用されたイントラ予測モードが垂直方向の方向性予測モードを示す場合、ブロック上部に大きな変換係数及び最終有意係数がある可能性が高い。略垂直方向の方向性予測モードとは、図2に示す方向性予測モードのうち垂直方向予測を含む一定の範囲内の方向性予測モードをいう。 As shown in FIG. 6A, when the intra prediction mode applied to the coded block indicates the vertical direction prediction mode, it is highly possible that there is a large conversion coefficient and a final significance coefficient at the upper part of the block. The direction prediction mode in the substantially vertical direction refers to a direction prediction mode within a certain range including the vertical direction prediction among the direction prediction modes shown in FIG.

また、図2に示す方向性予測モードのうち水平方向予測を含む一定の範囲内の方向性予測モードを、略水平方向の方向性予測モードという。 Further, among the direction prediction modes shown in FIG. 2, the direction prediction mode within a certain range including the horizontal direction prediction is referred to as a substantially horizontal direction direction prediction mode.

本実施形態において、符号化制御部134は、符号化対象ブロックのイントラ予測に用いたイントラ予測モードを示すイントラ予測モードシンタックスに応じて、略垂直方向の方向性予測モードであるか、略水平方向の方向性予測モードであるか、それ以外の予測モードであるかを決定する。ここで、符号化制御部134は、イントラ予測モードを示すイントラ予測モードシンタックスからイントラ予測モードを特定することなく、イントラ予測モードを示すイントラ予測モードシンタックスから略垂直方向の方向性予測モードであるか、略水平方向の方向性予測モードであるか、それ以外の予測モードであるかを直接的に決定する。 In the present embodiment, the coding control unit 134 is in a substantially vertical directional prediction mode or is substantially horizontal, depending on the intra prediction mode syntax indicating the intra prediction mode used for the intra prediction of the coded block. Determines whether it is a directional prediction mode or another prediction mode. Here, the coding control unit 134 does not specify the intra prediction mode from the intra prediction mode syntax indicating the intra prediction mode, but in the direction prediction mode in the substantially vertical direction from the intra prediction mode syntax indicating the intra prediction mode. It directly determines whether there is a directional prediction mode in a substantially horizontal direction, or a prediction mode other than that.

具体的には、符号化制御部134は、イントラ予測に用いたイントラ予測モードが非MPMモードに含まれることをintra_luma_mpm_flagが示す場合、すなわち、intra_luma_mpm_flagが“0”である場合、イントラ予測モードを示すイントラ予測モードシンタックスから略垂直方向の方向性予測モードであるか、略水平方向の方向性予測モードであるか、それ以外の予測モードであるかを直接的に決定する。 Specifically, the coding control unit 134 indicates the intra prediction mode when the intra_luma_mpm_flag indicates that the intra prediction mode used for the intra prediction is included in the non-MPM mode, that is, when the intra_luma_mpm_flag is “0”. From the intra prediction mode syntax, it is directly determined whether the prediction mode is the direction prediction mode in the substantially vertical direction, the direction prediction mode in the substantially horizontal direction, or the other prediction mode.

例えば、符号化制御部134は、イントラ予測に用いたイントラ予測モードが非MPMモードに含まれることをintra_luma_mpm_flagが示す場合、各非MPMモード番号をイントラ予測モードのグループと対応付ける対応付け情報を用いて、イントラ予測モードを示すイントラ予測モードシンタックスに含まれる非MPMモード番号(intra_luma_mpm_remainder)に応じて、略垂直方向の方向性予測モードであるか、略水平方向の方向性予測モードであるか、それ以外の予測モードであるか決定する。 For example, when intra_luma_mpm_flag indicates that the intra prediction mode used for intra prediction is included in the non-MPM mode, the coding control unit 134 uses the association information that associates each non-MPM mode number with the group of the intra prediction mode. , Depending on the non-MPM mode number (intra_luma_mpm_reminder) included in the intra prediction mode syntax indicating the intra prediction mode, whether it is a substantially vertical direction prediction mode or a substantially horizontal direction prediction mode. Determine if the prediction mode is other than.

図7は、本実施形態に係る対応付け情報を示す図である。 FIG. 7 is a diagram showing association information according to the present embodiment.

図7に示すように、6つのMPMモード以外の61の非MPMモード(non−MPM mode)について、参照方向が左下から右上にかけて小さい番号から順に番号を割り当てて表している。各非MPMモード番号には、イントラ予測モードのグループ(group)が対応付けられている。 As shown in FIG. 7, 61 non-MPM modes (non-MPM modes) other than the 6 MPM modes are assigned numbers in ascending order from the lower left to the upper right in the reference direction. Each non-MPM mode number is associated with a group of intra-prediction modes.

具体的には、非MPMモード番号は、第1グループ乃至第3グループにグループ分けされている。第1グループは、方向性予測モードであって、予測方向が垂直方向よりも水平方向に近いイントラ予測モードと対応付けられたグループである。第2グループは、方向性予測モードであって、予測方向が水平方向よりも垂直方向に近いイントラ予測モードと対応付けられたグループである。第3グループは、第1グループ及び第2グループ以外のグループである。 Specifically, the non-MPM mode numbers are grouped into first to third groups. The first group is a directional prediction mode, and is a group associated with an intra prediction mode in which the prediction direction is closer to the horizontal direction than the vertical direction. The second group is a directional prediction mode, and is a group associated with an intra prediction mode in which the prediction direction is closer to the vertical direction than the horizontal direction. The third group is a group other than the first group and the second group.

図7において、非MPMモード番号“9”乃至“20”が第1グループに相当し、非MPMモード番号“39”乃至“52”が第2グループに相当し、それ以外の非MPMモード番号が第3グループに相当する。対応付け情報は、第1グループを略水平方向の方向性予測モード(group=1)と対応付け、第2グループを略垂直方向の方向性予測モード(group=2)と対応付け、第3グループをそれ以外の予測モード(group=0)と対応付ける。 In FIG. 7, the non-MPM mode numbers “9” to “20” correspond to the first group, the non-MPM mode numbers “39” to “52” correspond to the second group, and the other non-MPM mode numbers correspond to the first group. Corresponds to the third group. As for the association information, the first group is associated with the substantially horizontal direction prediction mode (group = 1), the second group is associated with the substantially vertical direction prediction mode (group = 2), and the third group. Is associated with other prediction modes (group = 0).

ここで、どのようなイントラ予測モードがMPMモードに選択されても、水平方向又は垂直方向にある程度近い非MPMモードがgroup=1又はgroup=2に含まれるように範囲を設定している。また、この範囲は図7に示す例に固定されるものではなく、範囲は可変であるものとする。 Here, no matter what intra prediction mode is selected as the MPM mode, the range is set so that the non-MPM mode that is close to the horizontal direction or the vertical direction to some extent is included in group = 1 or group = 2. Further, this range is not fixed to the example shown in FIG. 7, and the range is variable.

また、intra_luma_mpm_flagが“1”である場合、intra_luma_mpm_flagが“0”である場合(すなわち、イントラ予測に用いたイントラ予測モードがMPMモードに含まれることをintra_luma_mpm_flagが示す場合)は、group=0(それ以外の予測モード)と決定する。 Further, when intra_luma_mpm_flag is "1" and intra_luma_mpm_flag is "0" (that is, when intra_luma_mpm_flag indicates that the intra prediction mode used for intra prediction is included in MPM mode), group = 0 (that is). Prediction mode other than) is determined.

符号化制御部134は、イントラ予測モードが非MPMモードに含まれることをintra_luma_mpm_flagが示す場合、図7に示すようなテーブル(対応付け情報)を用いて、イントラ予測モードシンタックスに含まれる非MPMモード番号(intra_luma_mpm_remainder)をスキャン順の番号(“0”、“1”、“2”のいずれか)に変換できるため、非MPMモード番号から略水平方向の方向性予測モードであるか、略垂直方向の方向性予測モードであるか、それ以外の予測モードであるかを直接的に決定できる。 When intra_luma_mpm_flag indicates that the intra prediction mode is included in the non-MPM mode, the coding control unit 134 uses the table (correspondence information) as shown in FIG. 7 to use the non-MPM included in the intra prediction mode syntax. Since the mode number (intra_luma_mpm_reminder) can be converted into a scan order number (either "0", "1", or "2"), the non-MPM mode number can be converted into a direction prediction mode in a substantially horizontal direction or a direction prediction mode in a substantially horizontal direction. It is possible to directly determine whether it is the direction prediction mode of the direction or the other prediction mode.

図6(a)に示すように、符号化対象ブロックに適用されたイントラ予測モードシンタックスが略垂直方向の方向性予測モードを示す場合、符号化制御部134は、last positionを構成するX座標値(last_sig_coeff_x)に固定長二値化方式を適用するとともに、last positionを構成するY座標値(last_sig_coeff_y)に可変長二値化方式を適用する。 As shown in FIG. 6A, when the intra prediction mode syntax applied to the coded block indicates a direction prediction mode in a substantially vertical direction, the coding control unit 134 sets the X coordinate constituting the last position. The fixed-length binarization method is applied to the value (last_sig_coeff_x), and the variable-length binarization method is applied to the Y coordinate value (last_sig_coeff_y) constituting the last position.

ここで、固定長二値化方式は、二値化後のビット数が既定ビット数になる二値化方式である。固定長二値化方式は、固定長バイナライゼーションと呼ばれてもよい。以下において、固定長二値化方式が適用されるべき座標値を適宜「P座標値」と呼ぶ。 Here, the fixed-length binarization method is a binarization method in which the number of bits after binarization becomes the default number of bits. The fixed-length binarization method may be referred to as fixed-length binarization. In the following, the coordinate value to which the fixed length binarization method should be applied is appropriately referred to as "P coordinate value".

一方、可変長二値化方式は、座標値の増加につれて二値化後のビット数が多くなる二値化方式である。言い換えると、可変長二値化方式は、座標値の減少につれて二値化後のビット数が少なくなる二値化方式である。可変長二値化方式は、トランケーデッド・ライス・バイナライゼーションであってもよい。以下において、可変長二値化方式が適用されるべき座標値を適宜「Q座標値」と呼ぶ。 On the other hand, the variable length binarization method is a binarization method in which the number of bits after binarization increases as the coordinate value increases. In other words, the variable length binarization method is a binarization method in which the number of bits after binarization decreases as the coordinate value decreases. The variable length binarization method may be tranked rice binarization. In the following, the coordinate value to which the variable length binarization method should be applied is appropriately referred to as "Q coordinate value".

座標値が小さい場合、可変長二値化方式は、固定長二値化方式に比べて二値化後のビット数が少なくなる。図6(a)の場合、ブロック上部に最終有意係数がある可能性が高い、すなわち、Y座標値が小さい値である可能性が高いため、Y座標値(last_sig_coeff_y)に可変長二値化方式を適用することにより、二値化後のビット数を少なくすることができる。 When the coordinate value is small, the variable length binarization method has a smaller number of bits after binarization than the fixed length binarization method. In the case of FIG. 6A, there is a high possibility that the final significance coefficient is at the upper part of the block, that is, there is a high possibility that the Y coordinate value is a small value. By applying, the number of bits after binarization can be reduced.

一方、座標値が大きい場合、固定長二値化方式は、可変長二値化方式に比べて二値化後のビット数が少なくなる。図6(a)の場合、ブロック上部に最終有意係数がある可能性が高いが、X座標値は大きい値になり得る。このため、X座標値(last_sig_coeff_x)に固定長二値化方式を適用することにより、二値化後のビット数を少なくすることができる。但し、ブロックサイズが小さいような場合、座標値がそもそも小さい値であるため、例外的に、X座標値に可変長二値化方式を適用してもよい。 On the other hand, when the coordinate value is large, the fixed-length binarization method has a smaller number of bits after binarization than the variable-length binarization method. In the case of FIG. 6A, there is a high possibility that the final significance coefficient is at the upper part of the block, but the X coordinate value can be a large value. Therefore, by applying the fixed-length binarization method to the X coordinate value (last_sig_coeff_x), the number of bits after binarization can be reduced. However, when the block size is small, the coordinate value is small in the first place, and therefore, as an exception, the variable length binarization method may be applied to the X coordinate value.

図6(b)に示すように、符号化対象ブロックに適用されたイントラ予測モードが略水平方向の方向性予測モードを示す場合、ブロック左部に大きな変換係数及び最終有意係数がある可能性が高い。略水平方向の方向性予測モードとは、上述したように、図2に示す方向性予測モードのうち水平方向予測を含む一定の範囲内の方向性予測モードをいう。 As shown in FIG. 6B, when the intra prediction mode applied to the coded block indicates a substantially horizontal directional prediction mode, there may be a large conversion coefficient and a final significance coefficient on the left side of the block. high. As described above, the substantially horizontal directional prediction mode refers to the directional prediction mode within a certain range including the horizontal direction prediction among the directional prediction modes shown in FIG.

また、図6(b)に示すように、符号化対象ブロックに適用されたイントラ予測モードが略水平方向の方向性予測モードを示す場合、符号化制御部134は、last positionを構成するX座標値(last_sig_coeff_x)に可変長二値化方式を適用するとともに、last positionを構成するY座標値(last_sig_coeff_y)に固定長二値化方式を適用する。 Further, as shown in FIG. 6B, when the intra prediction mode applied to the coded target block indicates the directional prediction mode in the substantially horizontal direction, the coding control unit 134 has the X coordinates constituting the last position. The variable length binarization method is applied to the value (last_sig_coeff_x), and the fixed length binarization method is applied to the Y coordinate value (last_sig_coeff_y) constituting the last position.

上述のように、座標値が小さい場合、可変長二値化方式は、固定長二値化方式に比べて二値化後のビット数が少なくなる。図6(b)の場合、ブロック左部に最終有意係数がある可能性が高い、すなわち、X座標値が小さい値である可能性が高いため、X座標値(last_sig_coeff_x)に可変長二値化方式を適用することにより、二値化後のビット数を少なくすることができる。 As described above, when the coordinate value is small, the variable length binarization method has a smaller number of bits after binarization than the fixed length binarization method. In the case of FIG. 6B, there is a high possibility that the final significance coefficient is on the left side of the block, that is, there is a high possibility that the X coordinate value is a small value, so that the X coordinate value (last_sig_coeff_x) is binarized to a variable length. By applying the method, the number of bits after binarization can be reduced.

一方、座標値が大きい場合、固定長二値化方式は、可変長二値化方式に比べて二値化後のビット数が少なくなる。図6(b)の場合、ブロック左部に最終有意係数がある可能性が高いが、Y座標値は大きい値になり得る。このため、Y座標値(last_sig_coeff_y)に固定長二値化方式を適用することにより、二値化後のビット数を少なくすることができる。但し、ブロックサイズが小さいような場合、座標値がそもそも小さい値であるため、例外的に、Y座標値に可変長二値化方式を適用してもよい。 On the other hand, when the coordinate value is large, the fixed-length binarization method has a smaller number of bits after binarization than the variable-length binarization method. In the case of FIG. 6B, there is a high possibility that the final significance coefficient is on the left side of the block, but the Y coordinate value can be a large value. Therefore, by applying the fixed-length binarization method to the Y coordinate value (last_sig_coeff_y), the number of bits after binarization can be reduced. However, when the block size is small, the coordinate value is small in the first place, so that the variable length binarization method may be applied to the Y coordinate value as an exception.

図6(c)に示すように、符号化対象ブロックに適用されたイントラ予測モードシンタックスが略垂直方向の方向性予測モード及び略水平方向の方向性予測モード以外のイントラ予測モードシンタックスである場合(すなわち、符号化制御部134がgroup=0と決定した場合)、ブロック左上部に大きな変換係数及び最終有意係数がある可能性が高い。 As shown in FIG. 6C, the intra prediction mode syntax applied to the coded block is an intra prediction mode syntax other than the substantially vertical direction prediction mode and the substantially horizontal direction direction prediction mode. In the case (that is, when the coding control unit 134 determines group = 0), it is likely that there is a large conversion coefficient and final significant coefficient in the upper left part of the block.

図7(c)の場合、符号化制御部134は、last positionを構成するX座標値(last_sig_coeff_x)及びY座標値(last_sig_coeff_y)の両方に可変長二値化方式を適用する。 In the case of FIG. 7C, the coding control unit 134 applies the variable length binarization method to both the X coordinate value (last_sig_coeff_x) and the Y coordinate value (last_sig_coeff_y) constituting the last position.

上述のように、座標値が小さい場合、可変長二値化方式は、固定長二値化方式に比べて二値化後のビット数が少なくなる。図7(c)の場合、X座標値及びY座標値の両方が小さい値である可能性が高いため、X座標値(last_sig_coeff_x)及びY座標値(last_sig_coeff_y)の両方に可変長二値化方式を適用することにより、二値化後のビット数を少なくすることができる。 As described above, when the coordinate value is small, the variable length binarization method has a smaller number of bits after binarization than the fixed length binarization method. In the case of FIG. 7C, since both the X coordinate value and the Y coordinate value are likely to be small values, the variable length binarization method is used for both the X coordinate value (last_sig_coeff_x) and the Y coordinate value (last_sig_coeff_y). By applying, the number of bits after binarization can be reduced.

図3に戻り、二値化部132は、シリアライズ部131が出力する多値信号を二値信号へ変換し、二値信号を符号化部133に出力する。二値化部132は、符号化制御部134により決定された二値化方式に応じて、last_sig_coeff_x及びlast_sig_coeff_yのそれぞれを二値化(バイナライゼーション)する。 Returning to FIG. 3, the binarization unit 132 converts the multi-valued signal output by the serialization unit 131 into a binary signal, and outputs the binary signal to the coding unit 133. The binarization unit 132 binarizes each of last_sig_coeff_x and last_sig_coeff_y according to the binarization method determined by the coding control unit 134.

符号化部133は、二値化部132が出力する二値信号を算術符号化により符号化して符号化ストリームを生成し、生成した符号化ストリームを出力する。 The coding unit 133 encodes the binary signal output by the binarizing unit 132 by arithmetic coding to generate a coded stream, and outputs the generated coded stream.

(二値化の具体例)
次に、本実施形態に係る二値化の具体例について説明する。
(Specific example of binarization)
Next, a specific example of binarization according to the present embodiment will be described.

第1に、本実施形態の比較例として、HEVC方式における最終有意係数の二値化方式について説明する。HEVC方式、ブロック内における最終有意係数(last significant coefficient)のX座標値及びY座標値を伝送する。X座標値については、プリフィックス部であるlast_sig_coeff_x_prefixとサフィックス部であるlast_sig_coeff_x_suffixとに分けて伝送する。 First, as a comparative example of the present embodiment, a binarization method of the final significance coefficient in the HEVC method will be described. In the HEVC method, the X-coordinate value and the Y-coordinate value of the last significant coefficient in the block are transmitted. The X coordinate value is transmitted separately to the prefix part last_sig_coeff_x_prefix and the suffix part last_sig_coeff_x_suffix.

ここで、last_sig_coeff_x_prefixの最小値は0、最大値は(log2TrafoSize<<1)−1であり、TR(Truncated Rice)(RiceParam=0)で二値化される。ここで、「log2TrafoSize」はブロックの辺長の2を底とした対数である。例えば、ブロックサイズの幅が16の場合、log2TrafoSizeは4となり、伝送されるlast_sig_coeff_x_prefixの最大値は7となる。 Here, the minimum value of last_sig_coeff_x_prefix is 0, the maximum value is (log2TrafoSize << 1) -1, and it is binarized by TR (Truncated Rice) (RiceParam = 0). Here, "log2TrafoSize" is a logarithm with the side length of the block being 2 as the base. For example, when the width of the block size is 16, the log2TrafoSize is 4, and the maximum value of the last_sig_coeff_x_prefix to be transmitted is 7.

ここで、RiceParam=0のTRは、二値化対象の値の数だけ”1”を並べ、その値が最大値未満の場合は最後に”0”をN並べることで二値化を行う。例えば、最大値が7のとき、TR(RiceParam=0)で4を二値化すると”11110”となり、7を二値化すると”1111111”となる。 Here, in the TR of SpeceParam = 0, "1" is arranged by the number of values to be binarized, and if the value is less than the maximum value, "0" is arranged by N at the end to perform binarization. For example, when the maximum value is 7, when 4 is binarized by TR (RiceParam = 0), it becomes "11110", and when 7 is binarized, it becomes "1111111".

last_sig_coeff_x_suffixは、last_sig_coeff_x_prefix<=3の場合、伝送されない。last_sig_coeff_x_prefix>3の場合、伝送されるlast_sig_coeff_x_suffixの最小値は0、最大値は(1<<((last_sig_coeff_x_prefix>>1)−1))−1であり、FL(Fixed−Length)で二値化される。例えば、ブロックサイズが16×16で、last_sig_coeff_x_prefixが10の場合、伝送されるlast_sig_coeff_x_suffixの最大値は3となる。 The last_sig_coeff_x_suffix is not transmitted when last_sig_coeff_x_prefix <= 3. In the case of last_sig_coeff_x_prefix> 3, the minimum value of the transmitted last_sig_coeff_x_suffix is 0, the maximum value is (1 << ((last_sig_coeff_x_prefix >> 1) -1)) -1, and FL (Fixed-Leng) To. For example, when the block size is 16 × 16 and the last_sig_coeff_x_prefix is 10, the maximum value of the last_sig_coeff_x_sufix to be transmitted is 3.

ここで、FLは、ceil(log2(二値化対象の最大値+1))ビットの二進数として、二値化対象の値を二値化する。例えば、最大値が7のとき、FLで4を二値化すると”100”となり、7を二値化すると”111”となる。 Here, FL binarizes the value to be binarized as the binary number of the ceil (log2 (maximum value to be binarized + 1)) bit. For example, when the maximum value is 7, when 4 is binarized in FL, it becomes "100", and when 7 is binarized, it becomes "111".

X座標値は、last_sig_coeff_x_suffixが伝送されない場合はX=last_sig_coeff_x_prefixとして求め、last_sig_coeff_x_suffixが伝送される場合はX=(1<<((last_sig_coeff_x_prefix>>1)−1)*(2+(last_sig_coeff_x_prefix & 1))+last_sig_coeff_x_suffixとして求める。 X coordinate values, if Last_sig_coeff_x_suffix is not transmitted determined as X = Last_sig_coeff_x_prefix, the X = (1 << if Last_sig_coeff_x_suffix is transmitted ((last_sig_coeff_x_prefix >> 1) -1) * (2+ (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix Ask as.

Y座標値についても同様であり、last_sig_coeff_y_prefix及びlast_sig_coeff_y_suffixを用いて伝送する。 The same applies to the Y coordinate value, and transmission is performed using last_sig_coeff_y_prefix and last_sig_coeff_y_suffix.

次世代符号化方式であるVVC方式では、長方形のブロックがあるため、上記のlog2TrafoSizeの代わりにX座標値についてはブロックサイズの幅の2を底とした対数であるlog2ZoTbWidthを用い、Y座標値についてはブロックサイズの高さの2を底とした対数であるlog2ZoTbHeightを用いる点が異なる。 In the VVC method, which is the next-generation coding method, since there are rectangular blocks, log2ZoTbWith, which is the logarithm of the block size width with the base of 2, is used for the X coordinate value instead of the above log2TrafoSize. Is different in that log2ZoTbHeight, which is a logarithm with the height of the block size of 2 as the base, is used.

上述のように、最終有意係数のX座標値及びY座標値の表現に用いる二値化後のビット数は、ブロックの左上が最も少なく、右あるいは下に行くほど大きくなる。 As described above, the number of binarized bits used to represent the X-coordinate value and the Y-coordinate value of the final significance coefficient is the smallest at the upper left of the block and increases toward the right or lower.

図8は、座標値の表現に必要なビット数を示す図である。ここでは、16×16のブロックサイズの場合の例を示す。 FIG. 8 is a diagram showing the number of bits required to represent the coordinate values. Here, an example in the case of a block size of 16 × 16 is shown.

図8(a)に示すように、最終有意係数のX座標値が白抜きで示す領域にある場合、last_sig_coeff_x_prefixのみを伝送し、last_sig_coeff_x_suffixは伝送しない。したがって、最も短い二値化後ビット数でX座標値が表現可能な領域である。 As shown in FIG. 8A, when the X coordinate value of the final significance coefficient is in the region shown by white, only last_sig_coeff_x_prefix is transmitted, and last_sig_coeff_x_sufix is not transmitted. Therefore, it is a region in which the X coordinate value can be expressed by the shortest binarized bit number.

図8(a)に示すように、最終有意係数のX座標値が斜線で示す領域にある場合、last_sig_coeff_x_prefixに加え、last_sig_coeff_x_suffixを伝送し、last_sig_coeff_x_suffixの最大値は1である。 As shown in FIG. 8A, when the X coordinate value of the final significance coefficient is in the area indicated by the diagonal line, last_sig_coeff_x_suffix is transmitted in addition to last_sig_coeff_x_prefix, and the maximum value of last_sig_coeff_x_suffix is 1.

図8(a)に示すように、最終有意係数のX座標値が網掛けで示す領域にある場合、last_sig_coeff_x_prefixに加え、last_sig_coeff_x_suffixも伝送し、last_sig_coeff_x_suffix最大値は3である。したがって、X座標値の表現に最も長い二値化後ビット数が必要な領域である。 As shown in FIG. 8A, when the X coordinate value of the final significance coefficient is in the shaded area, the last_sig_coeff_x_sufix is also transmitted in addition to the last_sig_coeff_x_prefix, and the maximum value of the last_sig_coeff_x_suffix is 3. Therefore, it is an area where the longest binarized bit number is required to represent the X coordinate value.

Y座標値についても同様であり、各領域を図8(b)に示す。 The same applies to the Y coordinate value, and each region is shown in FIG. 8 (b).

比較例の二値化方式は、イントラ予測の方向性を考慮していないため、二値化後のビット数が増加し得る。例えば、略垂直方向の方向性予測モードの場合(すなわち垂直に近い方向性予測モード)の場合、ブロック上部に最終有意係数が出現する確率が高いにもかかわらず、X座標値が大きいと、X座標値の表現に必要なビット数が増加してしまう。 Since the binarization method of the comparative example does not consider the direction of intra-prediction, the number of bits after binarization can increase. For example, in the case of the direction prediction mode in the substantially vertical direction (that is, the direction prediction mode close to vertical), if the X coordinate value is large even though the probability that the final significance coefficient appears at the upper part of the block is high, X The number of bits required to represent the coordinate values increases.

例えば、略垂直方向の方向性予測モードの場合(すなわち、垂直に近い方向性予測モード)の場合、図8に示す16×16のブロックにおいて(X,Y)=(14,0)の位置に最終有意係数がある可能性は、(X,Y)=(0,3)の位置に最終有意係数がある可能性より高い。しかしながら、(X,Y)=(14,0)の位置に最終有意係数がある場合の方が、(X,Y)=(0,3)の位置に最終有意係数がある場合に比べて、最終有意係数位置の表現に必要な二値化後ビット数が多くなってしまう。 For example, in the case of the directional prediction mode in the substantially vertical direction (that is, the directional prediction mode close to vertical), at the position of (X, Y) = (14,0) in the 16 × 16 block shown in FIG. The possibility of having a final significance coefficient is higher than the possibility of having a final significance coefficient at the position (X, Y) = (0,3). However, the case where the final significance coefficient is located at the position (X, Y) = (14,0) is higher than the case where the final significance coefficient is located at the position (X, Y) = (0,3). The number of binarized bits required to express the final significance coefficient position increases.

具体的には、(X,Y)=(14,0)のX座標値“14”を二値化すると、last_sig_coeff_x_prefix=“1111111”、last_sig_coeff_x_suffix=“10”であり、Y座標値“0”を二値化すると、last_sig_coeff_y_prefix=“0”、last_sig_coeff_y_suffixは伝送なしとなり、X座標値及びY座標値の合計で二値化後ビット数が10ビットである。 Specifically, when the X coordinate value “14” of (X, Y) = (14,0) is binarized, the last_sig_coeff_x_prefix = “1111111” and the last_sig_coeff_x_sufix = “10”, and the Y coordinate value “0” is obtained. When binarized, last_sig_coeff_y_prefix = "0" and last_sig_coeff_y_suffix are not transmitted, and the total number of bits after binarization is 10 bits in total of the X coordinate value and the Y coordinate value.

一方、(X,Y)=(0,3)のX座標値“0”を二値化すると、last_sig_coeff_x_prefix=“0”、last_sig_coeff_x_suffix伝送なしであり、Y座標値“3”を二値化すると、last_sig_coeff_y_prefix=“1110”、last_sig_coeff_y_suffixは伝送なしとなり、X座標値及びY座標値の合計で二値化後ビット数が5ビットである。 On the other hand, when the X coordinate value “0” of (X, Y) = (0,3) is binarized, there is no last_sig_coeff_x_prefix = “0” and last_sig_coeff_x_suffix transmission, and when the Y coordinate value “3” is binarized, Last_sig_coeff_y_prefix = "1110", last_sig_coeff_y_suffix is not transmitted, and the total number of binarized bits of the X coordinate value and the Y coordinate value is 5 bits.

なお、この後でprefixについては符号化部133で算術符号化を行うため、二値化後のビット数で符号化後のストリームの長短と直結はしないが、算術符号化前のビット数が少ないほど一般的に符号化後のストリームも短かい傾向がある。一方、suffixはバイパスで符号化されるため、二値化後ビット数と符号化後ビット数とが一致する。 Since the binarization unit 133 performs arithmetic coding on the prefix after this, the number of bits after binarization is not directly linked to the length of the stream after coding, but the number of bits before arithmetic coding is small. Generally, the encoded stream also tends to be short. On the other hand, since the suffix is encoded by bypass, the number of bits after binarization and the number of bits after encoding match.

第2に、本実施形態に係る二値化について説明する。以下の具体例では、X座標値、Y座標値のかわりに、P座標値、Q座標値という用語を用いる。 Secondly, the binarization according to the present embodiment will be described. In the following specific example, the terms P coordinate value and Q coordinate value are used instead of the X coordinate value and the Y coordinate value.

上述のように、P座標値は、固定長二値化方式で二値化されるため、位置に応じた二値化後ビット数の変化が少ない。これに対し、Q座標値は、HEVCと同様な可変長二値化方式で二値化されるため、位置に応じた二値化後ビット数の変化が大きい。 As described above, since the P coordinate value is binarized by the fixed length binarization method, the change in the number of bits after binarization according to the position is small. On the other hand, since the Q coordinate value is binarized by the same variable length binarization method as HEVC, the number of bits after binarization changes greatly depending on the position.

以下において、P座標値に対応するブロックの辺の長さをpSizeとし、pSizeの2を底とする対数をlog2pSizeとする。Q座標値に対応するブロックの辺の長さをqSizeとし、qSizeの2を底とする対数をlog2qSizeとする。 In the following, the length of the side of the block corresponding to the P coordinate value is defined as pSize, and the logarithm with the base 2 of pSize is defined as log2pSize. Let qSize be the length of the side of the block corresponding to the Q coordinate value, and let log2qSize be the logarithm of qSize with 2 as the base.

本実施形態では、イントラ予測モードシンタックスが略垂直方向の方向性予測モードである場合、X座標値の表現としてP座標値の表現を用い、Y座標値の表現としてQ座標値の表現を用いる。イントラ予測モードシンタックスが略水平方向の方向性予測モードであ場合、X座標値の表現としてQ座標値の表現を用い、Y座標値の表現としてP座標値の表現を用いる。それ以外の場合は、X座標値の表現及びY座標値の表現ともにQ座標値の表現を用いる(この場合、X座標値、Y座標値ともにHEVCの二値化方式と等しくなる)。 In the present embodiment, when the intra prediction mode syntax is the directional prediction mode in the substantially vertical direction, the representation of the P coordinate value is used as the representation of the X coordinate value, and the representation of the Q coordinate value is used as the representation of the Y coordinate value. .. When the intra prediction mode syntax is the directional prediction mode in the substantially horizontal direction, the expression of the Q coordinate value is used as the expression of the X coordinate value, and the expression of the P coordinate value is used as the expression of the Y coordinate value. In other cases, the expression of the Q coordinate value is used for both the expression of the X coordinate value and the expression of the Y coordinate value (in this case, both the X coordinate value and the Y coordinate value are equal to the binarization method of HEVC).

エントロピー符号化部130は、P座標値については、last_sig_coeff_p_suffixを伝送し、last_sig_coeff_p_prefixは伝送しない。なお、last_sig_coeff_p_suffixの最大値は、pLengthである。 The entropy encoding unit 130 transmits the last_sig_coeff_p_sufix for the P coordinate value, and does not transmit the last_sig_coeff_p_prefix. The maximum value of last_sig_coeff_p_sufix is pLength.

エントロピー符号化部130は、Q座標値については、last_sig_coeff_q_prefix及びlast_sig_coeff_q_suffixの両方を伝送する。last_sig_coeff_q_prefixの最小値は0、最大値は(log2qSize<<1)−1である。ここで、log2qSizeはブロックの辺長の2を底とした対数である。例えば、変換ブロックサイズの幅が16の場合、log2qSizeは4となり、伝送されるlast_sig_coeff_q_prefixの最大値は7となる。 The entropy encoding unit 130 transmits both last_sig_coeff_q_prefix and last_sig_coeff_q_sufix for the Q coordinate value. The minimum value of last_sig_coeff_q_prefix is 0, and the maximum value is (log2qSize << 1) -1. Here, log2qSize is a logarithm with the side length of the block being 2 as the base. For example, when the width of the conversion block size is 16, log2qSize is 4, and the maximum value of the transmitted last_sig_coeff_q_prefix is 7.

last_sig_coeff_q_suffixは、last_sig_coeff_q_prefix<=3の場合は伝送しない。last_sig_coeff_q_prefix>3の場合、伝送されるlast_sig_coeff_q_suffixの最小値は0、最大値は(1<<((last_sig_coeff_q_prefix>>1)−1))−1である。 The last_sig_coeff_q_suffix is not transmitted when last_sig_coeff_q_prefix <= 3. In the case of last_sig_coeff_q_prefix> 3, the minimum value of the transmitted last_sig_coeff_q_sufix is 0, and the maximum value is (1 << ((last_sig_coeff_q_prefix >> 1) -1) -1) -1.

Q座標値は、last_sig_coeff_q_suffixが伝送されない場合はQ=last_sig_coeff_q_prefixとして求め、last_sig_coeff_q_suffixが伝送される場合はQ=(1<<((last_sig_coeff_q_prefix>>1)−1)*(2+(last_sig_coeff_q_prefix & 1))+last_sig_coeff_q_suffixとして求める。 Q coordinate values, if Last_sig_coeff_q_suffix is not transmitted determined as Q = Last_sig_coeff_q_prefix, if Last_sig_coeff_q_suffix is transmitted Q = (1 << ((last_sig_coeff_q_prefix >> 1) -1) * (2+ (last_sig_coeff_q_prefix & 1)) + last_sig_coeff_q_suffix Ask as.

本実施形態では、上記と同様な条件下で、16×16のブロックにおいて(X,Y)=(14,0)及び(X,Y)=(0,3)のそれぞれを二値化すると、次のようになる。具体的には、略垂直方向の方向性予測モードの場合、X座標値の表現としてP座標値の表現を用い、Y座標値の表現としてQ座標値の表現を用いる。 In the present embodiment, under the same conditions as above, when each of (X, Y) = (14,0) and (X, Y) = (0,3) is binarized in a 16 × 16 block, It looks like this: Specifically, in the case of the direction prediction mode in the substantially vertical direction, the expression of the P coordinate value is used as the expression of the X coordinate value, and the expression of the Q coordinate value is used as the expression of the Y coordinate value.

(X,Y)=(14,0)のX座標値(P座標値)“14”を二値化すると、last_sig_coeff_x_prefixは伝送なし、last_sig_coeff_x_suffix=”1110”であり、Y座標値(Q座標値)“0”を二値化すると、last_sig_coeff_y_prefix=“0”、last_sig_coeff_y_suffixは伝送なしとなり、X座標値及びY座標値の合計で二値化後ビット数が5ビットである。 When the X coordinate value (P coordinate value) “14” of (X, Y) = (14,0) is binarized, the last_sig_coeff_x_prefix is no transmission, the last_sig_coeff_x_sufix = “1110”, and the Y coordinate value (Q coordinate value). When "0" is binarized, last_sig_coeff_y_prefix = "0" and last_sig_coeff_y_suffix are not transmitted, and the total number of bits after binarization is 5 bits in total of the X coordinate value and the Y coordinate value.

(X,Y)=(0,3)のX座標値(P座標値)“0”を二値化すると、last_sig_coeff_x_prefixは伝送なし、last_sig_coeff_x_suffix=“0000”であり、Y座標値(Q座標値)“3”を二値化すると、last_sig_coeff_y_prefix=“1110”、last_sig_coeff_y_suffixは伝送なしとなり、X座標値及びY座標値の合計で二値化後ビット数が8ビットである。 When the X coordinate value (P coordinate value) “0” of (X, Y) = (0,3) is binarized, the last_sig_coeff_x_prefix is not transmitted, the last_sig_coeff_x_sufix = “0000”, and the Y coordinate value (Q coordinate value). When "3" is binarized, last_sig_coeff_y_prefix = "1110" and last_sig_coeff_y_suffix are not transmitted, and the total number of bits after binarization is 8 bits in total of the X coordinate value and the Y coordinate value.

略垂直方向の方向性予測モードの場合、(X,Y)=(14,0)の位置に最終有意係数がある確率は、(X,Y)=(0,3)の位置に最終有意係数がある確率が高いため、本実施形態に係るエントロピー符号化部130によれば二値化後ビット数を比較例よりも削減できる。 In the case of the direction prediction mode in the substantially vertical direction, the probability that the final significance coefficient is at the position (X, Y) = (14,0) is the final significance coefficient at the position (X, Y) = (0,3). Therefore, according to the entropy coding unit 130 according to the present embodiment, the number of bits after binarization can be reduced as compared with the comparative example.

但し、本実施形態において、P座標値の最大値とQ座標値の最大値とが大きく異なる場合、すなわち、ブロックが縦長又は横長の形状である場合、エントロピー符号化部130は、P座標値も従来の表現(すなわち、可変長二値化方式)で二値化及び伝送してもよい。大きく異なるとは、P座標値及びQ座標値のうち大きい方の最大値が、小さい方の最大値の例えば2倍以上の場合をいう。 However, in the present embodiment, when the maximum value of the P coordinate value and the maximum value of the Q coordinate value are significantly different, that is, when the block has a vertically or horizontally long shape, the entropy coding unit 130 also has the P coordinate value. It may be binarized and transmitted in the conventional representation (ie, variable length binarization method). The term "significantly different" means that the maximum value of the larger of the P coordinate value and the Q coordinate value is, for example, twice or more the maximum value of the smaller one.

また、本実施形態において、P座標値の最大値が所定値以下である場合、エントロピー符号化部130は、P座標値も従来の表現(すなわち、可変長二値化方式)で二値化及び伝送してもよい。所定値は、例えば4である。 Further, in the present embodiment, when the maximum value of the P coordinate value is equal to or less than a predetermined value, the entropy coding unit 130 also binarizes the P coordinate value by the conventional expression (that is, the variable length binarization method). It may be transmitted. The predetermined value is, for example, 4.

<復号装置>
次に、本実施形態に係る復号装置について、上述の符号化装置1との相違点を主として説明する。
<Decoding device>
Next, the decoding device according to the present embodiment will be mainly described as being different from the coding device 1 described above.

(復号装置の構成)
図9は、本実施形態に係る復号装置2の構成を示す図である。図9に示すように、復号装置2は、エントロピー復号部200と、逆量子化・逆変換部210と、合成部220と、メモリ230と、予測部240とを有する。
(Configuration of decoding device)
FIG. 9 is a diagram showing a configuration of a decoding device 2 according to the present embodiment. As shown in FIG. 9, the decoding device 2 includes an entropy decoding unit 200, an inverse quantization / inverse conversion unit 210, a synthesis unit 220, a memory 230, and a prediction unit 240.

エントロピー復号部200は、符号化装置1が生成した符号化ストリームを復号する。エントロピー復号部200は、予測処理に関する情報や変換処理に関する情報を取得し、予測処理に関する情報を予測部240に出力し、変換処理に関する情報を逆量子化・逆変換部210に出力する。予測処理に関する情報は、イントラ予測モードシンタックスを含む。 The entropy decoding unit 200 decodes the coded stream generated by the coding device 1. The entropy decoding unit 200 acquires information on the prediction process and information on the conversion process, outputs the information on the prediction process to the prediction unit 240, and outputs the information on the conversion process to the inverse quantization / inverse conversion unit 210. Information about the prediction process includes intra-prediction mode syntax.

エントロピー復号部200は、符号化データに対する算術復号処理が行われた後の変換係数の多値化処理において、スキャン順に応じたスキャン処理を行うことにより、復号対象ブロックに対応する変換係数(具体的には、量子化された変換係数)を逆量子化・逆変換部210に出力する。 The entropy decoding unit 200 performs a scanning process according to the scanning order in the multi-valued conversion processing of the conversion coefficient after the arithmetic decoding processing on the coded data is performed, so that the conversion coefficient corresponding to the decoding target block (specifically). The quantized conversion coefficient) is output to the inverse quantization / inverse conversion unit 210.

逆量子化・逆変換部210は、ブロック単位で逆量子化処理及び逆変換処理を行う。逆量子化・逆変換部210は、逆量子化部211と、逆変換部212とを有する。 The inverse quantization / inverse transformation unit 210 performs the inverse quantization process and the inverse transformation process on a block-by-block basis. The inverse quantization / inverse conversion unit 210 includes an inverse quantization unit 211 and an inverse conversion unit 212.

逆量子化部211は、符号化装置1の量子化部122が行う量子化処理に対応する逆量子化処理を行う。逆量子化部211は、エントロピー復号部200から出力される量子化変換係数を、量子化パラメータ(Qp)及び量子化行列を用いて逆量子化することにより、復号対象ブロックの変換係数を復元し、復元した変換係数を逆変換部212に出力する。 The inverse quantization unit 211 performs an inverse quantization process corresponding to the quantization process performed by the quantization unit 122 of the coding apparatus 1. The inverse quantization unit 211 restores the conversion coefficient of the decoding target block by inversely quantizing the quantization conversion coefficient output from the entropy decoding unit 200 using the quantization parameter (Qp) and the quantization matrix. , The restored conversion coefficient is output to the inverse conversion unit 212.

逆変換部212は、符号化装置1の変換部121が行う変換処理に対応する逆変換処理を行う。逆変換部212は、逆量子化部211から出力される変換係数に対して逆変換処理を行って予測残差を復元し、復元した予測残差(復元予測残差)を合成部220に出力する。 The inverse conversion unit 212 performs an inverse conversion process corresponding to the conversion process performed by the conversion unit 121 of the coding apparatus 1. The inverse conversion unit 212 performs inverse transformation processing on the conversion coefficient output from the inverse quantization unit 211 to restore the predicted residual, and outputs the restored predicted residual (restored predicted residual) to the synthesis unit 220. To do.

合成部220は、逆変換部212から出力される予測残差と、予測部240から出力される予測ブロックとを画素単位で合成することにより、元のブロックを復号(再構成)し、復号済みブロックをメモリ230に出力する。 The synthesis unit 220 decodes (reconstructs) the original block by synthesizing the prediction residual output from the inverse conversion unit 212 and the prediction block output from the prediction unit 240 on a pixel-by-pixel basis, and has already been decoded. The block is output to the memory 230.

メモリ230は、合成部220から出力される復号済みブロックを記憶し、復号済みブロックをフレーム単位で復号済み画像として蓄積する。メモリ230は、復号済みブロック若しくは復号済み画像を予測部240に出力する。また、メモリ230は、フレーム単位の復号済み画像を復号装置2の外部に出力する。なお、合成部220とメモリ230との間にループフィルタが設けられてもよい。 The memory 230 stores the decoded blocks output from the compositing unit 220, and stores the decoded blocks as a decoded image in frame units. The memory 230 outputs the decoded block or the decoded image to the prediction unit 240. Further, the memory 230 outputs the decoded image in frame units to the outside of the decoding device 2. A loop filter may be provided between the compositing unit 220 and the memory 230.

予測部240は、ブロック単位で予測を行う。予測部240は、インター予測部241と、イントラ予測部242と、切替部243とを有する。 The prediction unit 240 makes a prediction in block units. The prediction unit 240 has an inter prediction unit 241, an intra prediction unit 242, and a switching unit 243.

インター予測部241は、フレーム間の相関を利用したインター予測を行う。具体的には、インター予測部241は、エントロピー復号部200から出力されるインター予測に関する情報(例えば、動きベクトル情報)に基づいて、メモリ230に記憶された復号済み画像を参照画像として用いてインター予測の対象ブロックを予測してインター予測ブロックを生成し、生成したインター予測ブロックを切替部243に出力する。 The inter-prediction unit 241 performs inter-prediction using the correlation between frames. Specifically, the inter-prediction unit 241 uses the decoded image stored in the memory 230 as a reference image based on the inter-prediction information (for example, motion vector information) output from the entropy decoding unit 200. The target block for prediction is predicted, an inter-prediction block is generated, and the generated inter-prediction block is output to the switching unit 243.

イントラ予測部242は、フレーム内の空間的な相関を利用したイントラ予測を行う。具体的には、イントラ予測部242は、エントロピー復号部200から出力されるイントラ予測に関する情報(すなわち、イントラ予測モードシンタックス)に応じたイントラ予測モードを用いて、メモリ230に記憶された復号済み画像のうちイントラ予測の対象ブロックの周辺にある復号済み画素を参照してイントラ予測ブロックを生成し、生成したイントラ予測ブロックを切替部243に出力する。 The intra prediction unit 242 performs intra prediction using the spatial correlation in the frame. Specifically, the intra-prediction unit 242 uses the intra-prediction mode corresponding to the information regarding the intra-prediction output from the entropy decoding unit 200 (that is, the intra-prediction mode syntax), and has been decoded stored in the memory 230. The intra-prediction block is generated by referring to the decoded pixels around the target block of the intra-prediction in the image, and the generated intra-prediction block is output to the switching unit 243.

切替部243は、インター予測部241から出力されるインター予測ブロックとイントラ予測部242から出力されるイントラ予測ブロックとを切り替えて、いずれかの予測ブロックを合成部220に出力する。 The switching unit 243 switches between the inter prediction block output from the inter prediction unit 241 and the intra prediction block output from the intra prediction unit 242, and outputs one of the prediction blocks to the synthesis unit 220.

このように、本実施形態に係る復号装置2は、画像を構成するブロック単位で復号を行う。復号装置2は、復号対象ブロックの周辺の復号済み画素を用いるイントラ予測によって、復号対象ブロックに対応する予測ブロックを生成するイントラ予測部242と、符号化ストリームを復号することで、復号対象ブロックの変換係数を出力するエントロピー復号部200と、エントロピー復号部が出力する変換係数に対して逆量子化処理及び逆変換処理を行ってブロック単位の予測残差を復元する逆量子化・逆変換部210と、予測ブロックと復元した予測残差とを合成して復号対象ブロックを復元する合成部220とを有する。 As described above, the decoding device 2 according to the present embodiment decodes each block constituting the image. The decoding device 2 has an intra prediction unit 242 that generates a prediction block corresponding to the decoding target block by intra prediction using the decoded pixels around the decoding target block, and a decoding target block by decoding the coded stream. The entropy decoding unit 200 that outputs the conversion coefficient and the inverse quantization / inverse conversion unit 210 that restores the predicted residual in block units by performing inverse quantization processing and inverse conversion processing on the conversion coefficient output by the entropy decoding unit. And a synthesis unit 220 that restores the decoding target block by synthesizing the predicted block and the restored predicted residual.

(エントロピー復号部の構成)
次に、本実施形態に係るエントロピー復号部200の構成について説明する。図10は、本実施形態に係るエントロピー復号部200の構成を示す図である。
(Structure of entropy decoding unit)
Next, the configuration of the entropy decoding unit 200 according to the present embodiment will be described. FIG. 10 is a diagram showing the configuration of the entropy decoding unit 200 according to the present embodiment.

図10に示すように、エントロピー復号部200は、復号部201と、多値化部202と、デシリアライズ部203と、復号制御部204とを有する。 As shown in FIG. 10, the entropy decoding unit 200 includes a decoding unit 201, a multi-valued unit 202, a deserialization unit 203, and a decoding control unit 204.

復号部201は、符号化ストリームを構文解析(パーシング)するとともに、符号化ストリームから二値信号を復号する。本実施形態において、復号部201は、イントラ予測モードシンタックスを取得し、イントラ予測モードシンタックスを復号制御部204に出力する。 The decoding unit 201 parses the coded stream and decodes the binary signal from the coded stream. In the present embodiment, the decoding unit 201 acquires the intra prediction mode syntax and outputs the intra prediction mode syntax to the decoding control unit 204.

多値化部202は、復号制御部204の制御下で、復号部201が出力する二値信号を多値信号へ変換し、多値信号をデシリアライズ部203に出力する。これにより、量子化された変換係数が復元される。また、多値化部202は、二値化されたlast position(last_sig_coeff_x、last_sig_coeff_y)を多値信号である座標値に変換して出力する。 Under the control of the decoding control unit 204, the multi-value conversion unit 202 converts the binary signal output by the decoding unit 201 into a multi-value signal, and outputs the multi-value signal to the deserialization unit 203. This restores the quantized conversion factor. Further, the multi-valued unit 202 converts the binarized last position (last_sig_coeff_x, last_sig_coeff_y) into a coordinate value which is a multi-valued signal and outputs it.

デシリアライズ部203は、多値化部202が出力する多値信号を、スキャン順に応じてデシリアライズすることにより、ブロック単位の変換係数(量子化された変換係数)を逆量子化部211に出力する。 The deserialization unit 203 outputs the conversion coefficient (quantized conversion coefficient) in block units to the inverse quantization unit 211 by deserializing the multi-valued signal output by the multi-valued unit 202 according to the scanning order. To do.

復号制御部204は、復号対象ブロックに適用するイントラ予測モードを示すイントラ予測モードシンタックスに基づいて、last positionの二値化に適用されている二値化方式を特定する。復号制御部204は、特定した二値化方式に応じた多値化を行うように多値化部202を制御する。 The decoding control unit 204 identifies the binarization method applied to the binarization of the last position based on the intra-prediction mode syntax indicating the intra-prediction mode applied to the decoding target block. The decoding control unit 204 controls the multi-value unit 202 so as to perform multi-value according to the specified binarization method.

本実施形態において、復号制御部204は、復号対象ブロックのイントラ予測に用いるイントラ予測モードを示すイントラ予測モードシンタックスに応じて、略垂直方向の方向性予測モードであるか、略水平方向の方向性予測モードであるか、それ以外の予測モードであるかを決定する。ここで、復号制御部204は、イントラ予測モードシンタックスからイントラ予測モードを特定することなく、イントラ予測モードを示すイントラ予測モードシンタックスから略垂直方向の方向性予測モードであるか、略水平方向の方向性予測モードであるか、それ以外の予測モードであるかを直接的に決定する。このような直接的に決定する動作については、上述した符号化制御部134における決定動作と同様である。 In the present embodiment, the decoding control unit 204 is in a substantially vertical direction prediction mode or a substantially horizontal direction depending on the intra prediction mode syntax indicating the intra prediction mode used for the intra prediction of the block to be decoded. Determine whether it is a sex prediction mode or another prediction mode. Here, the decoding control unit 204 does not specify the intra prediction mode from the intra prediction mode syntax, and is in the direction prediction mode in the substantially vertical direction from the intra prediction mode syntax indicating the intra prediction mode, or in the substantially horizontal direction. It directly determines whether it is the direction prediction mode of or other prediction modes. Such a direct determination operation is the same as the determination operation in the coding control unit 134 described above.

図6(a)に示すように、復号対象ブロックに適用するイントラ予測モードシンタックスが略垂直方向の方向性予測モードを示す場合、復号制御部204は、last positionを構成するX座標値(last_sig_coeff_x)に、固定長二値化方式に対応する多値化を適用するとともに、last positionを構成するY座標値(last_sig_coeff_y)に、可変長二値化方式に対応する多値化を適用する。 As shown in FIG. 6A, when the intra prediction mode syntax applied to the decoding target block indicates the directionality prediction mode in the substantially vertical direction, the decoding control unit 204 sets the X coordinate value (last_sig_coeff_x) constituting the last position. ), The multi-valued version corresponding to the fixed-length binarization method is applied, and the multi-valued value corresponding to the variable-length binarization method is applied to the Y coordinate value (last_sig_coeff_y) constituting the last position.

図7(b)に示すように、復号対象ブロックに適用するイントラ予測モードシンタックスが略水平方向の方向性予測モードを示す場合、復号制御部204は、last positionを構成するX座標値(last_sig_coeff_x)に、可変長二値化方式に対応する多値化を適用するとともに、last positionを構成するY座標値(last_sig_coeff_y)に、固定長二値化方式に対応する多値化を適用する。 As shown in FIG. 7B, when the intra prediction mode syntax applied to the decoding target block indicates the directionality prediction mode in the substantially horizontal direction, the decoding control unit 204 sets the X coordinate value (last_sig_coeff_x) constituting the last position. ), The multi-valued version corresponding to the variable-length binarization method is applied, and the multi-valued value corresponding to the fixed-length binarization method is applied to the Y coordinate value (last_sig_coeff_y) constituting the last position.

図7(c)に示すように、復号対象ブロックに適用するイントラ予測モードシンタックスが略垂直方向の方向性予測モード及び略水平方向の方向性予測モード以外のイントラ予測モードシンタックスである場合、復号制御部204は、last positionを構成するX座標値(last_sig_coeff_x)及びY座標値(last_sig_coeff_y)の両方に、可変長二値化方式に対応する多値化を適用する。 As shown in FIG. 7C, when the intra-prediction mode syntax applied to the decoding target block is an intra-prediction mode syntax other than the substantially vertical direction prediction mode and the substantially horizontal direction direction prediction mode. The decoding control unit 204 applies multi-valued corresponding to the variable length binarization method to both the X coordinate value (last_sig_coeff_x) and the Y coordinate value (last_sig_coeff_y) constituting the last position.

<作用・効果>
本実施形態に係るエントロピー符号化部130は、イントラ予測に用いたイントラ予測モードシンタックスに基づいて、変換係数に含まれる最終有意係数の位置を示すlast positionの二値化に適用する二値化方式を決定する符号化制御部134を有する。
<Action / effect>
The entropy coding unit 130 according to the present embodiment is binarized to be applied to the binarization of the last position indicating the position of the final significance coefficient included in the conversion coefficient based on the intra prediction mode syntax used for the intra prediction. It has a coding control unit 134 that determines the method.

また、本実施形態に係るエントロピー復号部200は、イントラ予測に用いるイントラ予測モードシンタックスに基づいて、変換係数に含まれる最終有意係数の位置を示すlast positionの二値化に適用されている二値化方式を特定する復号制御部204を有する。 Further, the entropy decoding unit 200 according to the present embodiment is applied to binarize the last position indicating the position of the final significance coefficient included in the conversion coefficient based on the intra prediction mode syntax used for the intra prediction. It has a decoding control unit 204 that specifies a binarization method.

このように、last positionを伝送するための二値化をイントラ予測モードシンタックスに応じて制御可能することで、last positionの符号化の効率を改善できる。 In this way, by controlling the binarization for transmitting the last position according to the intra-prediction mode syntax, the efficiency of coding the last position can be improved.

<変更例>
上述した実施形態において、符号化制御部134が、イントラ予測モードを示すシンタックスからイントラ予測モードを特定することなく、このシンタックスから二値化方式を直接的に決定する一例について説明した。同様に、復号制御部204が、イントラ予測モードを示すシンタックスからイントラ予測モードを特定することなく、このシンタックスから二値化方式を直接的に特定する一例について説明した。
<Change example>
In the above-described embodiment, an example has been described in which the coding control unit 134 directly determines the binarization method from this syntax without specifying the intra prediction mode from the syntax indicating the intra prediction mode. Similarly, an example in which the decoding control unit 204 directly specifies the binarization method from this syntax without specifying the intra prediction mode from the syntax indicating the intra prediction mode has been described.

しかしながら、実施形態の変更例として、符号化制御部134は、イントラ予測モードを示すシンタックスからイントラ予測モードを特定したうえで、特定したイントラ予測モードから二値化方式を決定してもよい。同様に、実施形態の変更例として、復号制御部204は、イントラ予測モードを示すシンタックスからイントラ予測モードを特定したうえで、特定したイントラ予測モードから二値化方式を特定してもよい。 However, as a modification of the embodiment, the coding control unit 134 may specify the intra prediction mode from the syntax indicating the intra prediction mode, and then determine the binarization method from the specified intra prediction mode. Similarly, as a modification of the embodiment, the decoding control unit 204 may specify the intra prediction mode from the syntax indicating the intra prediction mode, and then specify the binarization method from the specified intra prediction mode.

このため、「イントラ予測モードに基づいて二値化方式を決定・特定する」とは、上述した実施形態の方法で二値化方式を決定・特定する場合と、実施形態の変更例の方法で二値化方式を決定・特定する場合との両方の場合を含むものとする。 Therefore, "determining / specifying the binarization method based on the intra-prediction mode" means that the binarization method is determined / specified by the method of the above-described embodiment and the method of the modification of the embodiment. It shall include both cases of determining and specifying the binarization method.

<その他の実施形態>
上述のように、垂直に近いイントラ予測では、ブロック上部に大きな値の変換係数が現われる可能性が高いと考えられる。しかしながら、図11に示すように、ブロック上部から離れると、出現する確率の高い位置はブロックの左側に変化すると考えられる。図11に示す黒塗りの領域は、垂直に近いイントラ予測が行われた際に大きな値の変換係数が表れる可能性が高いと考えられる領域である。このような場合、P座標値の表現をQ座標値に応じて変化させることで効率を改善できると考えられる。
<Other Embodiments>
As mentioned above, in the near-vertical intra-prediction, it is highly likely that a large conversion coefficient appears at the top of the block. However, as shown in FIG. 11, it is considered that the position with a high probability of appearing changes to the left side of the block as the distance from the upper part of the block is increased. The black-painted area shown in FIG. 11 is an area in which it is highly likely that a conversion coefficient of a large value appears when an intra-prediction that is close to vertical is performed. In such a case, it is considered that the efficiency can be improved by changing the expression of the P coordinate value according to the Q coordinate value.

そこで、エントロピー符号化部130は、Q座標値については、上述した実施形態と同じ伝送を行う。一方、P座標値については、エントロピー符号化部130は、Q座標値に応じてP座標値の表現に用いるlast_coeff_p_suffixの最大値を変化させる。具体的には、エントロピー符号化部130は、last_coeff_p_suffixの最大値が0の場合、last_coeff_p_suffixは伝送しない。例えば、エントロピー符号化部130は、Q座標値がN以下のときは、P座標値を伝送する際にlast_coeff_p_suffixの最大値を0とし、last_coeff_p_suffixは伝送しない。Q座標値がNより大きいときは、P座標値は従来と同じ表現で伝送する。Nは例えば0や1などの小さな値が好適である。このように、エントロピー符号化部130(符号化制御部134)は、Q座標値に基づいて、固定長二値化方式に代えて可変長二値化方式をP座標値に適用する。 Therefore, the entropy coding unit 130 transmits the Q coordinate value in the same manner as in the above-described embodiment. On the other hand, with respect to the P coordinate value, the entropy coding unit 130 changes the maximum value of last_coeff_p_sufix used for expressing the P coordinate value according to the Q coordinate value. Specifically, the entropy encoding unit 130 does not transmit last_coeff_p_sufix when the maximum value of last_coeff_p_sufix is 0. For example, when the Q coordinate value is N or less, the entropy coding unit 130 sets the maximum value of last_coeff_p_sufix to 0 when transmitting the P coordinate value, and does not transmit the last_coeff_p_sufix. When the Q coordinate value is larger than N, the P coordinate value is transmitted in the same expression as before. N is preferably a small value such as 0 or 1. In this way, the entropy coding unit 130 (coding control unit 134) applies the variable length binarization method to the P coordinate value instead of the fixed length binarization method based on the Q coordinate value.

Q座標値に応じてP座標値の二値化方式を異ならせる場合、エントロピー符号化部130は、P座標値の伝送よりも前にQ座標値の伝送を行う。例えば、エントロピー符号化部130は、符号化対象ブロックに適用するイントラ予測モードが略垂直方向の方向性予測モードである場合、X座標値=P座標値、Y座標値=Q座標値とし、Y座標値を先に伝送しX座標値を後に伝送する。それ以外の場合は、従来と同様にX座標値を先に伝送しY座標値を後に伝送する。 When the binarization method of the P coordinate value is changed according to the Q coordinate value, the entropy coding unit 130 transmits the Q coordinate value before the transmission of the P coordinate value. For example, when the intra prediction mode applied to the coded block is the directionality prediction mode in the substantially vertical direction, the entropy coding unit 130 sets X coordinate value = P coordinate value and Y coordinate value = Q coordinate value, and Y The coordinate value is transmitted first, and the X coordinate value is transmitted later. In other cases, the X coordinate value is transmitted first and the Y coordinate value is transmitted later as in the conventional case.

なお、符号化装置1が行う各処理をコンピュータに実行させるプログラムが提供されてもよい。復号装置2が行う各処理をコンピュータに実行させるプログラムが提供されてもよい。プログラムは、コンピュータ読取り可能媒体に記録されていてもよい。コンピュータ読取り可能媒体を用いれば、コンピュータにプログラムをインストールすることが可能である。ここで、プログラムが記録されたコンピュータ読取り可能媒体は、非一過性の記録媒体であってもよい。非一過性の記録媒体は、特に限定されるものではないが、例えば、CD−ROMやDVD−ROM等の記録媒体であってもよい。 A program that causes the computer to execute each process performed by the coding device 1 may be provided. A program that causes a computer to execute each process performed by the decoding device 2 may be provided. The program may be recorded on a computer-readable medium. Computer-readable media allow you to install programs on your computer. Here, the computer-readable medium on which the program is recorded may be a non-transient recording medium. The non-transient recording medium is not particularly limited, but may be, for example, a recording medium such as a CD-ROM or a DVD-ROM.

符号化装置1が行う各処理を実行する回路を集積化し、符号化装置1を半導体集積回路(チップセット、SoC)により構成してもよい。復号装置2が行う各処理を実行する回路を集積化し、復号装置2を半導体集積回路(チップセット、SoC)により構成してもよい。 A circuit that executes each process performed by the coding device 1 may be integrated, and the coding device 1 may be configured by a semiconductor integrated circuit (chipset, SoC). A circuit that executes each process performed by the decoding device 2 may be integrated, and the decoding device 2 may be configured by a semiconductor integrated circuit (chipset, SoC).

以上、図面を参照して実施形態について詳しく説明したが、具体的な構成は上述のものに限られることはなく、要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 Although the embodiments have been described in detail with reference to the drawings, the specific configuration is not limited to the above, and various design changes and the like can be made within a range that does not deviate from the gist.

1 :符号化装置
2 :復号装置
100 :ブロック分割部
110 :減算部
120 :変換・量子化部
121 :変換部
122 :量子化部
130 :エントロピー符号化部
131 :シリアライズ部
132 :二値化部
133 :符号化部
134 :符号化制御部
140 :逆量子化・逆変換部
141 :逆量子化部
142 :逆変換部
150 :合成部
160 :メモリ
170 :予測部
171 :インター予測部
172 :イントラ予測部
173 :切替部
200 :エントロピー復号部
201 :復号部
202 :多値化部
203 :デシリアライズ部
204 :復号制御部
210 :逆量子化・逆変換部
211 :逆量子化部
212 :逆変換部
220 :合成部
230 :メモリ
240 :予測部
241 :インター予測部
242 :イントラ予測部
243 :切替部
1: Coding device 2: Decoding device 100: Block division unit 110: Subtraction unit 120: Conversion / quantization unit 121: Conversion unit 122: Quantization unit 130: Entropy coding unit 131: Serialization unit 132: Binarization unit 133: Coding unit 134: Coding control unit 140: Inverse quantization / inverse conversion unit 141: Inverse quantization unit 142: Inverse conversion unit 150: Synthesis unit 160: Memory 170: Prediction unit 171: Inter prediction unit 172: Intra Prediction unit 173: Switching unit 200: Entropy decoding unit 201: Decoding unit 202: Multi-valued unit 203: Deserialization unit 204: Decoding control unit 210: Inverse quantization / inverse conversion unit 211: Inverse quantization unit 212: Inverse conversion Unit 220: Synthesis unit 230: Memory 240: Prediction unit 241: Inter-prediction unit 242: Intra-prediction unit 243: Switching unit

Claims (10)

画像を構成するブロック単位で符号化を行う符号化装置であって、
符号化対象ブロックの周辺の復号済み画素を用いるイントラ予測によって、前記符号化対象ブロックに対応する予測ブロックを生成するイントラ予測部と、
前記符号化対象ブロックと前記予測ブロックとの差を表すブロック単位の予測残差に対して変換処理及び量子化処理を行う変換・量子化部と、
前記変換・量子化部が出力するブロック単位の変換係数を符号化するエントロピー符号化部と、を備え、
前記エントロピー符号化部は、前記イントラ予測に用いたイントラ予測モードに基づいて、前記変換係数に含まれる最終有意係数の位置を示す最終有意係数座標の二値化に適用する二値化方式を決定する符号化制御部を有することを特徴とする符号化装置。
A coding device that encodes in block units that make up an image.
An intra prediction unit that generates a prediction block corresponding to the code target block by intra prediction using decoded pixels around the code target block, and an intra prediction unit.
A conversion / quantization unit that performs conversion processing and quantization processing on the predicted residual in block units representing the difference between the coded block and the predicted block.
It is provided with an entropy coding unit that encodes the conversion coefficient of each block output by the conversion / quantization unit.
The entropy encoding unit determines a binarization method applied to binarization of the final significance coefficient coordinates indicating the position of the final significance coefficient included in the conversion coefficient based on the intra prediction mode used for the intra prediction. A coding device having a coding control unit for the function of the code.
前記符号化制御部は、前記イントラ予測モードを示すシンタックスに基づいて前記二値化方式を決定する場合、前記シンタックスから前記イントラ予測モードを特定することなく、前記シンタックスから二値化方式を直接的に決定することを特徴とする請求項1に記載の符号化装置。 When the coding control unit determines the binarization method based on the syntax indicating the intra prediction mode, the binarization method is performed from the syntax without specifying the intra prediction mode from the syntax. The coding apparatus according to claim 1, wherein the coding apparatus is directly determined. 前記符号化制御部は、前記イントラ予測モードに基づいて、前記最終有意係数座標を構成する一方の座標値に固定長二値化方式を適用するとともに、前記最終有意係数座標を構成する他方の座標値に可変長二値化方式を適用し、
前記固定長二値化方式は、二値化後のビット数が既定ビット数になる二値化方式であり、
前記可変長二値化方式は、前記他方の座標値の増加につれて二値化後のビット数が多くなる二値化方式であることを特徴とする請求項1又は2に記載の符号化装置。
Based on the intra prediction mode, the coding control unit applies a fixed-length binarization method to one coordinate value that constitutes the final significance coefficient coordinate, and the other coordinate that constitutes the final significance coefficient coordinate. Apply the variable length binarization method to the value,
The fixed-length binarization method is a binarization method in which the number of bits after binarization becomes the default number of bits.
The coding apparatus according to claim 1 or 2, wherein the variable length binarization method is a binarization method in which the number of bits after binarization increases as the other coordinate value increases.
前記イントラ予測モードが略垂直方向の方向性予測モードである場合、前記符号化制御部は、前記一方の座標値としてX座標値に前記固定長二値化方式を適用するとともに、前記他方の座標値としてY座標値に前記可変長二値化方式を適用し、
前記イントラ予測モードが略水平方向の方向性予測モードである場合、前記符号化制御部は、前記一方の座標値としてY座標値に前記固定長二値化方式を適用するとともに、前記他方の座標値としてX座標値に前記可変長二値化方式を適用することを特徴とする請求項3に記載の符号化装置。
When the intra prediction mode is a directional prediction mode in a substantially vertical direction, the coding control unit applies the fixed length binarization method to the X coordinate value as the one coordinate value, and the other coordinate. Applying the variable length binarization method to the Y coordinate value as the value,
When the intra prediction mode is a directional prediction mode in a substantially horizontal direction, the coding control unit applies the fixed length binarization method to the Y coordinate value as the one coordinate value, and the other coordinate. The coding apparatus according to claim 3, wherein the variable length binarization method is applied to an X coordinate value as a value.
前記符号化制御部は、前記符号化対象ブロックのサイズ又は形状に基づいて、前記固定長二値化方式に代えて前記可変長二値化方式を前記一方の座標値に適用することを特徴とする請求項4に記載の符号化装置。 The coding control unit is characterized in that the variable length binarization method is applied to the one coordinate value instead of the fixed length binarization method based on the size or shape of the coded block. The coding apparatus according to claim 4. 前記符号化制御部は、前記他方の座標値に基づいて、前記固定長二値化方式に代えて前記可変長二値化方式を前記一方の座標値に適用することを特徴とする請求項4又は5に記載の符号化装置。 4. The coding control unit is characterized in that the variable length binarization method is applied to the one coordinate value instead of the fixed length binarization method based on the other coordinate value. Or the coding apparatus according to 5. 前記他方の座標値に基づいて前記一方の座標値の二値化方式を異ならせる場合、前記エントロピー符号化部は、前記一方の座標値の伝送よりも前に前記他方の座標値の伝送を行うことを特徴とする請求項6に記載の符号化装置。 When the binarization method of the one coordinate value is different based on the other coordinate value, the entropy encoding unit transmits the other coordinate value before the transmission of the one coordinate value. The coding apparatus according to claim 6, wherein the coding apparatus is characterized by the above. 画像を構成するブロック単位で復号を行う復号装置であって、
復号対象ブロックの周辺の復号済み画素を用いるイントラ予測によって、前記復号対象ブロックに対応する予測ブロックを生成するイントラ予測部と、
符号化ストリームを復号することで、前記復号対象ブロックの変換係数を出力するエントロピー復号部と、
前記エントロピー復号部が出力する前記変換係数に対して逆量子化処理及び逆変換処理を行ってブロック単位の予測残差を復元する逆量子化・逆変換部と、
前記予測ブロックと前記復元した予測残差とを合成して前記復号対象ブロックを復元する合成部と、を備え、
前記エントロピー復号部は、前記イントラ予測に用いるイントラ予測モードに基づいて、前記変換係数に含まれる最終有意係数の位置を示す最終有意係数座標の二値化に適用されている二値化方式を特定する復号制御部を有することを特徴とする復号装置。
A decoding device that decodes each block that constitutes an image.
An intra prediction unit that generates a prediction block corresponding to the decoding target block by intra prediction using decoded pixels around the decoding target block, and an intra prediction unit.
An entropy decoding unit that outputs the conversion coefficient of the block to be decoded by decoding the coded stream, and
An inverse quantization / inverse transformation unit that restores the predicted residuals in block units by performing inverse quantization processing and inverse transformation processing on the conversion coefficient output by the entropy decoding unit.
A synthesis unit for synthesizing the predicted block and the restored predicted residual to restore the decoding target block is provided.
The entropy decoding unit identifies a binarization method applied to binarization of the final significance coefficient coordinates indicating the position of the final significance coefficient included in the conversion coefficient based on the intra prediction mode used for the intra prediction. A decoding device characterized by having a decoding control unit.
前記エントロピー復号部は、前記イントラ予測に用いるイントラ予測モードを示すシンタックスを取得し、
前記復号制御部は、前記シンタックスから前記イントラ予測モードを特定することなく、前記シンタックスから前記二値化方式を直接的に特定することを特徴とする請求項8に記載の復号装置。
The entropy decoding unit acquires a syntax indicating the intra prediction mode used for the intra prediction, and obtains a syntax indicating the intra prediction mode.
The decoding device according to claim 8, wherein the decoding control unit directly identifies the binarization method from the syntax without specifying the intra prediction mode from the syntax.
コンピュータを請求項1乃至7のいずれか1項に記載の符号化装置、又は、請求項8又は9に記載の復号装置として機能させることを特徴とするプログラム。 A program comprising the computer functioning as the coding device according to any one of claims 1 to 7 or the decoding device according to claim 8 or 9.
JP2019221544A 2019-12-06 2019-12-06 Encoding device, decoding device, and program Active JP7388900B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019221544A JP7388900B2 (en) 2019-12-06 2019-12-06 Encoding device, decoding device, and program
JP2023194983A JP2024003218A (en) 2019-12-06 2023-11-16 Decoding device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019221544A JP7388900B2 (en) 2019-12-06 2019-12-06 Encoding device, decoding device, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2023194983A Division JP2024003218A (en) 2019-12-06 2023-11-16 Decoding device and program

Publications (2)

Publication Number Publication Date
JP2021093574A true JP2021093574A (en) 2021-06-17
JP7388900B2 JP7388900B2 (en) 2023-11-29

Family

ID=76312262

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2019221544A Active JP7388900B2 (en) 2019-12-06 2019-12-06 Encoding device, decoding device, and program
JP2023194983A Pending JP2024003218A (en) 2019-12-06 2023-11-16 Decoding device and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2023194983A Pending JP2024003218A (en) 2019-12-06 2023-11-16 Decoding device and program

Country Status (1)

Country Link
JP (2) JP7388900B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101457399B1 (en) 2011-06-28 2014-11-04 삼성전자주식회사 Method and apparatus for video encoding with arithmectic encoding, method and apparatus for video decoding with arithmectic decoding
EP2810440A1 (en) 2012-02-04 2014-12-10 General Instrument Corporation Devices and methods for context reduction in last significant coefficient position coding

Also Published As

Publication number Publication date
JP7388900B2 (en) 2023-11-29
JP2024003218A (en) 2024-01-11

Similar Documents

Publication Publication Date Title
KR102081350B1 (en) Intra-prediction method, and encoder and decoder using same
JP5922244B2 (en) Sample adaptive offset merged with adaptive loop filter in video coding
KR20220151140A (en) Method for image encoding and computer readable redording meduim thereof
JP2021519544A (en) Dependent quantization
US20130101033A1 (en) Coding non-symmetric distributions of data
CN110602509A (en) Apparatus and method for context reduction in last significant coefficient position coding
KR20180040515A (en) Coding device, decoding device, and coding and decoding method thereof
TWI789668B (en) Determining a parametrization for context-adaptive binary arithmetic coding
CN114450950B (en) Encoding device, decoding device, and storage medium
JP2024053019A (en) Encoding device, decoding device, and program
US20230269383A1 (en) Decoding device, program, and decoding method
JP2021005867A (en) Encoding device, decoding device and program
JP7388900B2 (en) Encoding device, decoding device, and program
JP7332385B2 (en) Intra prediction device, image coding device, image decoding device, and program
JP7219030B2 (en) Chroma intra prediction candidate generation device, image coding device, image decoding device, and program
CN114830642A (en) Image encoding method and image decoding method
KR20220138876A (en) Intra prediction device, image decoding device, and program
JPWO2015151513A1 (en) Video encoding apparatus, method and program, and video decoding apparatus, method and program
JP7441638B2 (en) Encoding device, decoding device, and program
WO2021132404A1 (en) Encoding device, decoding device, and program
JP2021093634A (en) Coding device, decoding device and program
JP2021129148A (en) Prediction device, encoding device, decoding device, and program
JP2022538007A (en) Image data encoding and decoding
JP2022548685A (en) Encoding and decoding image data
CN114788270A (en) Image encoding method and image decoding method

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20200529

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20200612

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221104

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: 20231024

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231116

R150 Certificate of patent or registration of utility model

Ref document number: 7388900

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150